@mw-kit/mw-ui 1.8.7 → 1.8.8
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.
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { StyledProgressBarProps } from './interfaces';
|
|
2
|
-
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").
|
|
2
|
+
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$disabled: boolean;
|
|
4
|
+
}>> & string;
|
|
3
5
|
export declare const Progress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProgressBarProps>> & string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1501,7 +1501,7 @@ declare const Placeholder: (props: PlaceholderProps) => react_jsx_runtime.JSX.El
|
|
|
1501
1501
|
|
|
1502
1502
|
interface ProgressBarProps {
|
|
1503
1503
|
type: 'default' | 'info' | 'danger' | 'success' | 'warning';
|
|
1504
|
-
value:
|
|
1504
|
+
value: number | null;
|
|
1505
1505
|
}
|
|
1506
1506
|
|
|
1507
1507
|
declare const ProgressBar: ({ type, value, ...props }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -16858,51 +16858,51 @@ var Container25 = import_styled_components71.default.div`
|
|
|
16858
16858
|
display: flex;
|
|
16859
16859
|
flex-direction: row;
|
|
16860
16860
|
align-items: center;
|
|
16861
|
+
opacity: ${({ $disabled: disabled }) => disabled ? 0.5 : 1};
|
|
16862
|
+
width: 100%;
|
|
16861
16863
|
|
|
16862
|
-
span {
|
|
16864
|
+
> span {
|
|
16863
16865
|
display: inline-block;
|
|
16864
16866
|
margin-left: 7px;
|
|
16865
16867
|
color: #000000cc;
|
|
16866
16868
|
}
|
|
16867
16869
|
`;
|
|
16868
16870
|
var Progress = import_styled_components71.default.div`
|
|
16869
|
-
width:
|
|
16871
|
+
width: 100%;
|
|
16870
16872
|
height: 12px;
|
|
16871
16873
|
border: 1px solid #e4e4e4;
|
|
16872
|
-
div {
|
|
16873
|
-
width: ${({ $value: value }) => `${value}%`};
|
|
16874
|
-
max-width: 64px;
|
|
16875
|
-
height: 100%;
|
|
16876
|
-
${({ theme: theme4, $type: type }) => type === "default" && import_styled_components71.css`
|
|
16877
|
-
background-color: ${theme4.colors.warningGray};
|
|
16878
|
-
`}
|
|
16879
16874
|
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16875
|
+
> span {
|
|
16876
|
+
content: '';
|
|
16877
|
+
display: flex;
|
|
16883
16878
|
|
|
16884
|
-
|
|
16885
|
-
background-color: ${theme4.colors.warningRed};
|
|
16886
|
-
`}
|
|
16879
|
+
height: 100%;
|
|
16887
16880
|
|
|
16888
|
-
|
|
16889
|
-
|
|
16890
|
-
|
|
16881
|
+
transition-property: width background-color;
|
|
16882
|
+
transition-duration: 0.25s;
|
|
16883
|
+
transition-timing-function: ease-in-out;
|
|
16891
16884
|
|
|
16892
|
-
${({ theme: theme4, $type: type }) =>
|
|
16893
|
-
|
|
16894
|
-
|
|
16885
|
+
background-color: ${({ theme: theme4, $type: type }) => {
|
|
16886
|
+
const colors2 = {
|
|
16887
|
+
default: "warningGray",
|
|
16888
|
+
info: "blue",
|
|
16889
|
+
danger: "warningRed",
|
|
16890
|
+
success: "green",
|
|
16891
|
+
warning: "warningYellow"
|
|
16892
|
+
};
|
|
16893
|
+
return theme4.colors[colors2[type]];
|
|
16894
|
+
}};
|
|
16895
16895
|
}
|
|
16896
16896
|
`;
|
|
16897
16897
|
|
|
16898
16898
|
// src/components/ProgressBar/index.tsx
|
|
16899
16899
|
var import_jsx_runtime359 = require("react/jsx-runtime");
|
|
16900
16900
|
var ProgressBar = ({ type, value, ...props }) => {
|
|
16901
|
-
return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(Container25, { children: [
|
|
16902
|
-
/* @__PURE__ */ (0, import_jsx_runtime359.jsx)(Progress, { ...props, $type: type,
|
|
16901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(Container25, { $disabled: value === null, children: [
|
|
16902
|
+
/* @__PURE__ */ (0, import_jsx_runtime359.jsx)(Progress, { ...props, $type: type, children: /* @__PURE__ */ (0, import_jsx_runtime359.jsx)("span", { style: { width: `${value || 0}%` } }) }),
|
|
16903
16903
|
/* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("span", { children: [
|
|
16904
16904
|
" ",
|
|
16905
|
-
value
|
|
16905
|
+
value === null ? "-" : value,
|
|
16906
16906
|
"%"
|
|
16907
16907
|
] })
|
|
16908
16908
|
] });
|
|
@@ -17137,10 +17137,7 @@ var Close2 = (props) => {
|
|
|
17137
17137
|
if (!await onClose(index, options[index], event)) {
|
|
17138
17138
|
return;
|
|
17139
17139
|
}
|
|
17140
|
-
const newactive =
|
|
17141
|
-
if (index < active) return active - 1;
|
|
17142
|
-
return active > 0 ? active - 1 : active;
|
|
17143
|
-
})();
|
|
17140
|
+
const newactive = index < active || !newOptions[active] ? active - 1 : active;
|
|
17144
17141
|
setActive(newactive, newOptions[newactive].data);
|
|
17145
17142
|
setOptions(newOptions);
|
|
17146
17143
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -16796,56 +16796,56 @@ var Placeholder = (props) => {
|
|
|
16796
16796
|
var Placeholder_default = Placeholder;
|
|
16797
16797
|
|
|
16798
16798
|
// src/components/ProgressBar/styles.ts
|
|
16799
|
-
import styled68
|
|
16799
|
+
import styled68 from "styled-components";
|
|
16800
16800
|
var Container25 = styled68.div`
|
|
16801
16801
|
display: flex;
|
|
16802
16802
|
flex-direction: row;
|
|
16803
16803
|
align-items: center;
|
|
16804
|
+
opacity: ${({ $disabled: disabled }) => disabled ? 0.5 : 1};
|
|
16805
|
+
width: 100%;
|
|
16804
16806
|
|
|
16805
|
-
span {
|
|
16807
|
+
> span {
|
|
16806
16808
|
display: inline-block;
|
|
16807
16809
|
margin-left: 7px;
|
|
16808
16810
|
color: #000000cc;
|
|
16809
16811
|
}
|
|
16810
16812
|
`;
|
|
16811
16813
|
var Progress = styled68.div`
|
|
16812
|
-
width:
|
|
16814
|
+
width: 100%;
|
|
16813
16815
|
height: 12px;
|
|
16814
16816
|
border: 1px solid #e4e4e4;
|
|
16815
|
-
div {
|
|
16816
|
-
width: ${({ $value: value }) => `${value}%`};
|
|
16817
|
-
max-width: 64px;
|
|
16818
|
-
height: 100%;
|
|
16819
|
-
${({ theme: theme4, $type: type }) => type === "default" && css48`
|
|
16820
|
-
background-color: ${theme4.colors.warningGray};
|
|
16821
|
-
`}
|
|
16822
16817
|
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16818
|
+
> span {
|
|
16819
|
+
content: '';
|
|
16820
|
+
display: flex;
|
|
16826
16821
|
|
|
16827
|
-
|
|
16828
|
-
background-color: ${theme4.colors.warningRed};
|
|
16829
|
-
`}
|
|
16822
|
+
height: 100%;
|
|
16830
16823
|
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16824
|
+
transition-property: width background-color;
|
|
16825
|
+
transition-duration: 0.25s;
|
|
16826
|
+
transition-timing-function: ease-in-out;
|
|
16834
16827
|
|
|
16835
|
-
${({ theme: theme4, $type: type }) =>
|
|
16836
|
-
|
|
16837
|
-
|
|
16828
|
+
background-color: ${({ theme: theme4, $type: type }) => {
|
|
16829
|
+
const colors2 = {
|
|
16830
|
+
default: "warningGray",
|
|
16831
|
+
info: "blue",
|
|
16832
|
+
danger: "warningRed",
|
|
16833
|
+
success: "green",
|
|
16834
|
+
warning: "warningYellow"
|
|
16835
|
+
};
|
|
16836
|
+
return theme4.colors[colors2[type]];
|
|
16837
|
+
}};
|
|
16838
16838
|
}
|
|
16839
16839
|
`;
|
|
16840
16840
|
|
|
16841
16841
|
// src/components/ProgressBar/index.tsx
|
|
16842
16842
|
import { jsx as jsx359, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
16843
16843
|
var ProgressBar = ({ type, value, ...props }) => {
|
|
16844
|
-
return /* @__PURE__ */ jsxs180(Container25, { children: [
|
|
16845
|
-
/* @__PURE__ */ jsx359(Progress, { ...props, $type: type,
|
|
16844
|
+
return /* @__PURE__ */ jsxs180(Container25, { $disabled: value === null, children: [
|
|
16845
|
+
/* @__PURE__ */ jsx359(Progress, { ...props, $type: type, children: /* @__PURE__ */ jsx359("span", { style: { width: `${value || 0}%` } }) }),
|
|
16846
16846
|
/* @__PURE__ */ jsxs180("span", { children: [
|
|
16847
16847
|
" ",
|
|
16848
|
-
value
|
|
16848
|
+
value === null ? "-" : value,
|
|
16849
16849
|
"%"
|
|
16850
16850
|
] })
|
|
16851
16851
|
] });
|
|
@@ -16909,7 +16909,7 @@ var ScrollButton = (props) => {
|
|
|
16909
16909
|
var ScrollButton_default = ScrollButton;
|
|
16910
16910
|
|
|
16911
16911
|
// src/components/Tabs/components/ScrollButtons/styled.ts
|
|
16912
|
-
import styled70, { css as
|
|
16912
|
+
import styled70, { css as css48 } from "styled-components";
|
|
16913
16913
|
var Container27 = styled70.div`
|
|
16914
16914
|
overflow-x: auto;
|
|
16915
16915
|
scrollbar-width: thin;
|
|
@@ -16925,7 +16925,7 @@ var Container27 = styled70.div`
|
|
|
16925
16925
|
display: none; /* Chrome, Safari, Opera */
|
|
16926
16926
|
}
|
|
16927
16927
|
|
|
16928
|
-
${({ theme: theme4, $internal: internal }) => internal &&
|
|
16928
|
+
${({ theme: theme4, $internal: internal }) => internal && css48`
|
|
16929
16929
|
gap: ${theme4.spacings.s6};
|
|
16930
16930
|
`}
|
|
16931
16931
|
`;
|
|
@@ -17080,10 +17080,7 @@ var Close2 = (props) => {
|
|
|
17080
17080
|
if (!await onClose(index, options[index], event)) {
|
|
17081
17081
|
return;
|
|
17082
17082
|
}
|
|
17083
|
-
const newactive =
|
|
17084
|
-
if (index < active) return active - 1;
|
|
17085
|
-
return active > 0 ? active - 1 : active;
|
|
17086
|
-
})();
|
|
17083
|
+
const newactive = index < active || !newOptions[active] ? active - 1 : active;
|
|
17087
17084
|
setActive(newactive, newOptions[newactive].data);
|
|
17088
17085
|
setOptions(newOptions);
|
|
17089
17086
|
},
|
|
@@ -17107,7 +17104,7 @@ var Close_default = Close2;
|
|
|
17107
17104
|
import { useState as useState25 } from "react";
|
|
17108
17105
|
|
|
17109
17106
|
// src/components/Tabs/components/TabItem/components/LabelItem/styled.ts
|
|
17110
|
-
import styled72, { css as
|
|
17107
|
+
import styled72, { css as css49 } from "styled-components";
|
|
17111
17108
|
var StyledTab = styled72.div`
|
|
17112
17109
|
position: relative;
|
|
17113
17110
|
flex: 1;
|
|
@@ -17141,7 +17138,7 @@ var StyledTab = styled72.div`
|
|
|
17141
17138
|
transition: --color 0.5s, --bgColor 0.5s;
|
|
17142
17139
|
}
|
|
17143
17140
|
|
|
17144
|
-
${({ $primary, $hasSiblings, $internal }) => $primary && $hasSiblings && !$internal &&
|
|
17141
|
+
${({ $primary, $hasSiblings, $internal }) => $primary && $hasSiblings && !$internal && css49`
|
|
17145
17142
|
&::before {
|
|
17146
17143
|
content: '';
|
|
17147
17144
|
position: absolute;
|
|
@@ -17263,7 +17260,7 @@ var TabItem = (props) => {
|
|
|
17263
17260
|
var TabItem_default = TabItem;
|
|
17264
17261
|
|
|
17265
17262
|
// src/components/Tabs/styled.ts
|
|
17266
|
-
import styled74, { css as
|
|
17263
|
+
import styled74, { css as css50 } from "styled-components";
|
|
17267
17264
|
var delimiters = {
|
|
17268
17265
|
blue: ["blue"],
|
|
17269
17266
|
grey: ["warningGray"]
|
|
@@ -17284,7 +17281,7 @@ var Tabs = styled74.div`
|
|
|
17284
17281
|
bottom: "s4",
|
|
17285
17282
|
left: "0"
|
|
17286
17283
|
}).split(" ");
|
|
17287
|
-
return
|
|
17284
|
+
return css50`
|
|
17288
17285
|
margin: ${top} 0 ${bottom} 0;
|
|
17289
17286
|
padding: 0 ${right} 0 ${left};
|
|
17290
17287
|
`;
|
|
@@ -17292,7 +17289,7 @@ var Tabs = styled74.div`
|
|
|
17292
17289
|
|
|
17293
17290
|
${({ theme: theme4, $internal: internal, $delimiter: delimiter }) => {
|
|
17294
17291
|
const border = delimiter === "none" ? "none" : internal ? `1px solid ${theme4.getColor(...delimiters[delimiter || "grey"])}` : `2px solid ${theme4.getColor(...delimiters[delimiter || "blue"])}`;
|
|
17295
|
-
return
|
|
17292
|
+
return css50`
|
|
17296
17293
|
border-bottom: ${border};
|
|
17297
17294
|
+ ${ComponentContainer} {
|
|
17298
17295
|
border: 1px solid ${theme4.getColor(...delimiters.grey)};
|
|
@@ -17448,7 +17445,7 @@ var TextArea = ({
|
|
|
17448
17445
|
var TextArea_default = TextArea;
|
|
17449
17446
|
|
|
17450
17447
|
// src/components/Toast/styles.ts
|
|
17451
|
-
import styled76, { css as
|
|
17448
|
+
import styled76, { css as css51 } from "styled-components";
|
|
17452
17449
|
var Container30 = styled76.div`
|
|
17453
17450
|
border-radius: 4px;
|
|
17454
17451
|
width: ${({ $size: size3 }) => size3 === "large" ? "837px" : "460px"};
|
|
@@ -17456,7 +17453,7 @@ var Container30 = styled76.div`
|
|
|
17456
17453
|
border: 1px solid transparent;
|
|
17457
17454
|
position: relative;
|
|
17458
17455
|
|
|
17459
|
-
${({ $color: color }) => color === "success" &&
|
|
17456
|
+
${({ $color: color }) => color === "success" && css51`
|
|
17460
17457
|
background-color: #fcfff5;
|
|
17461
17458
|
opacity: 1;
|
|
17462
17459
|
border-color: #a8c599;
|
|
@@ -17468,7 +17465,7 @@ var Container30 = styled76.div`
|
|
|
17468
17465
|
}
|
|
17469
17466
|
`}
|
|
17470
17467
|
|
|
17471
|
-
${({ $color: color }) => color === "error" &&
|
|
17468
|
+
${({ $color: color }) => color === "error" && css51`
|
|
17472
17469
|
background-color: #fff6f6;
|
|
17473
17470
|
opacity: 1;
|
|
17474
17471
|
border-color: #973937;
|
|
@@ -17480,7 +17477,7 @@ var Container30 = styled76.div`
|
|
|
17480
17477
|
}
|
|
17481
17478
|
`}
|
|
17482
17479
|
|
|
17483
|
-
${({ $color: color }) => color === "warning" &&
|
|
17480
|
+
${({ $color: color }) => color === "warning" && css51`
|
|
17484
17481
|
background-color: #fffaf3;
|
|
17485
17482
|
opacity: 1;
|
|
17486
17483
|
border-color: #ccbea0;
|