@mw-kit/mw-ui 1.8.6 → 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.
- package/dist/components/ProgressBar/interfaces.d.ts +1 -2
- package/dist/components/ProgressBar/styles.d.ts +3 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -28
- package/dist/index.mjs +38 -40
- package/package.json +1 -1
|
@@ -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
|
@@ -30,7 +30,7 @@ type MappedTransitions<P extends string> = {
|
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
declare const theme: {
|
|
33
|
+
declare const theme$1: {
|
|
34
34
|
readonly button: {
|
|
35
35
|
readonly sizes: {
|
|
36
36
|
tiny: {
|
|
@@ -91,7 +91,7 @@ interface ThemeInterface {
|
|
|
91
91
|
isDarkColor: (color: ColorOptions, ifDark?: ColorOptions, ifLight?: ColorOptions) => ColorOptions;
|
|
92
92
|
spacings: typeof spacings;
|
|
93
93
|
typographies: typeof typographies;
|
|
94
|
-
components: typeof theme;
|
|
94
|
+
components: typeof theme$1;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
declare const colors: {
|
|
@@ -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;
|
|
@@ -1553,8 +1553,9 @@ interface ZoomProps {
|
|
|
1553
1553
|
|
|
1554
1554
|
declare const Zoom: (props: ZoomProps) => react_jsx_runtime.JSX.Element;
|
|
1555
1555
|
|
|
1556
|
+
declare const theme: ThemeInterface;
|
|
1556
1557
|
declare const ThemeProvider: (props: {
|
|
1557
1558
|
children: JSX.Element | string | (JSX.Element | string)[];
|
|
1558
1559
|
}) => react_jsx_runtime.JSX.Element;
|
|
1559
1560
|
|
|
1560
|
-
export { AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, useTransition as useMwTransition };
|
|
1561
|
+
export { AbsoluteContainer as MwAbsoluteContainer, AppliedFilters as MwAppliedFilters, Button as MwButton, Calendar as MwCalendar, Card as MwCard, EllipsisContainer as MwEllipsisContainer, Filters as MwFilters, Form as MwForm, Grid as MwGrid, Icon as MwIcon, Indicator as MwIndicator, Input as MwInput, Link as MwLink, Loader as MwLoader, Menu as MwMenu, Modal as MwModal, Placeholder as MwPlaceholder, ProgressBar as MwProgressBar, ScrollContainer as MwScrollContainer, Tabs as MwTabs, TextArea as MwTextArea, Toast as MwToast, Transition as MwTransition, Zoom as MwZoom, ThemeProvider, theme, useTransition as useMwTransition };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './components';
|
|
2
|
-
export { default as ThemeProvider } from './theme';
|
|
2
|
+
export { theme, default as ThemeProvider } from './theme';
|
package/dist/index.js
CHANGED
|
@@ -55,6 +55,7 @@ __export(index_exports, {
|
|
|
55
55
|
MwTransition: () => Transition_default2,
|
|
56
56
|
MwZoom: () => Zoom_default,
|
|
57
57
|
ThemeProvider: () => theme_default3,
|
|
58
|
+
theme: () => theme3,
|
|
58
59
|
useMwTransition: () => useTransition_default
|
|
59
60
|
});
|
|
60
61
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -16857,51 +16858,51 @@ var Container25 = import_styled_components71.default.div`
|
|
|
16857
16858
|
display: flex;
|
|
16858
16859
|
flex-direction: row;
|
|
16859
16860
|
align-items: center;
|
|
16861
|
+
opacity: ${({ $disabled: disabled }) => disabled ? 0.5 : 1};
|
|
16862
|
+
width: 100%;
|
|
16860
16863
|
|
|
16861
|
-
span {
|
|
16864
|
+
> span {
|
|
16862
16865
|
display: inline-block;
|
|
16863
16866
|
margin-left: 7px;
|
|
16864
16867
|
color: #000000cc;
|
|
16865
16868
|
}
|
|
16866
16869
|
`;
|
|
16867
16870
|
var Progress = import_styled_components71.default.div`
|
|
16868
|
-
width:
|
|
16871
|
+
width: 100%;
|
|
16869
16872
|
height: 12px;
|
|
16870
16873
|
border: 1px solid #e4e4e4;
|
|
16871
|
-
div {
|
|
16872
|
-
width: ${({ $value: value }) => `${value}%`};
|
|
16873
|
-
max-width: 64px;
|
|
16874
|
-
height: 100%;
|
|
16875
|
-
${({ theme: theme4, $type: type }) => type === "default" && import_styled_components71.css`
|
|
16876
|
-
background-color: ${theme4.colors.warningGray};
|
|
16877
|
-
`}
|
|
16878
16874
|
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16875
|
+
> span {
|
|
16876
|
+
content: '';
|
|
16877
|
+
display: flex;
|
|
16882
16878
|
|
|
16883
|
-
|
|
16884
|
-
background-color: ${theme4.colors.warningRed};
|
|
16885
|
-
`}
|
|
16879
|
+
height: 100%;
|
|
16886
16880
|
|
|
16887
|
-
|
|
16888
|
-
|
|
16889
|
-
|
|
16881
|
+
transition-property: width background-color;
|
|
16882
|
+
transition-duration: 0.25s;
|
|
16883
|
+
transition-timing-function: ease-in-out;
|
|
16890
16884
|
|
|
16891
|
-
${({ theme: theme4, $type: type }) =>
|
|
16892
|
-
|
|
16893
|
-
|
|
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
|
+
}};
|
|
16894
16895
|
}
|
|
16895
16896
|
`;
|
|
16896
16897
|
|
|
16897
16898
|
// src/components/ProgressBar/index.tsx
|
|
16898
16899
|
var import_jsx_runtime359 = require("react/jsx-runtime");
|
|
16899
16900
|
var ProgressBar = ({ type, value, ...props }) => {
|
|
16900
|
-
return /* @__PURE__ */ (0, import_jsx_runtime359.jsxs)(Container25, { children: [
|
|
16901
|
-
/* @__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}%` } }) }),
|
|
16902
16903
|
/* @__PURE__ */ (0, import_jsx_runtime359.jsxs)("span", { children: [
|
|
16903
16904
|
" ",
|
|
16904
|
-
value
|
|
16905
|
+
value === null ? "-" : value,
|
|
16905
16906
|
"%"
|
|
16906
16907
|
] })
|
|
16907
16908
|
] });
|
|
@@ -17136,10 +17137,7 @@ var Close2 = (props) => {
|
|
|
17136
17137
|
if (!await onClose(index, options[index], event)) {
|
|
17137
17138
|
return;
|
|
17138
17139
|
}
|
|
17139
|
-
const newactive =
|
|
17140
|
-
if (index < active) return active - 1;
|
|
17141
|
-
return active > 0 ? active - 1 : active;
|
|
17142
|
-
})();
|
|
17140
|
+
const newactive = index < active || !newOptions[active] ? active - 1 : active;
|
|
17143
17141
|
setActive(newactive, newOptions[newactive].data);
|
|
17144
17142
|
setOptions(newOptions);
|
|
17145
17143
|
},
|
|
@@ -17744,5 +17742,6 @@ var Zoom_default = Zoom;
|
|
|
17744
17742
|
MwTransition,
|
|
17745
17743
|
MwZoom,
|
|
17746
17744
|
ThemeProvider,
|
|
17745
|
+
theme,
|
|
17747
17746
|
useMwTransition
|
|
17748
17747
|
});
|
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;
|
|
@@ -17687,5 +17684,6 @@ export {
|
|
|
17687
17684
|
Transition_default2 as MwTransition,
|
|
17688
17685
|
Zoom_default as MwZoom,
|
|
17689
17686
|
theme_default3 as ThemeProvider,
|
|
17687
|
+
theme3 as theme,
|
|
17690
17688
|
useTransition_default as useMwTransition
|
|
17691
17689
|
};
|