mainstack-design-system 1.11.0 → 1.12.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/assets/styles.css +1 -1
- package/dist/assets/theme/tokenTheme.css +72 -0
- package/dist/index.d.ts +3 -0
- package/dist/mainstack-design-system530.cjs +1 -1
- package/dist/mainstack-design-system530.js +28 -17
- package/dist/mainstack-design-system575.cjs +1 -1
- package/dist/mainstack-design-system575.js +40 -40
- package/package.json +1 -1
|
@@ -1016,6 +1016,14 @@ E.g: public:p-20 will apply padding 20px when data-ui-theme="public in html root
|
|
|
1016
1016
|
--animate-content-fade-out: content-fade-out 500ms ease-in-out;
|
|
1017
1017
|
--animate-content-scale-in: content-scale-in 250ms ease-out;
|
|
1018
1018
|
--animate-content-scale-out: content-scale-out 350ms ease-in;
|
|
1019
|
+
--animate-content-slide-in-left: content-slide-in-left 500ms ease-in-out;
|
|
1020
|
+
--animate-content-slide-in-right: content-slide-in-right 500ms ease-in-out;
|
|
1021
|
+
--animate-content-slide-in-top: content-slide-in-top 500ms ease-in-out;
|
|
1022
|
+
--animate-content-slide-in-bottom: content-slide-in-bottom 500ms ease-in-out;
|
|
1023
|
+
--animate-content-slide-out-left: content-slide-out-left 500ms ease-in-out;
|
|
1024
|
+
--animate-content-slide-out-right: content-slide-out-right 500ms ease-in-out;
|
|
1025
|
+
--animate-content-slide-out-top: content-slide-out-top 500ms ease-in-out;
|
|
1026
|
+
--animate-content-slide-out-bottom: content-slide-out-bottom 500ms ease-in-out;
|
|
1019
1027
|
--animate-caret-blink: caret-blink 1.25s ease-out infinite;
|
|
1020
1028
|
@keyframes pulse-wiggle {
|
|
1021
1029
|
0%,
|
|
@@ -1066,6 +1074,70 @@ E.g: public:p-20 will apply padding 20px when data-ui-theme="public in html root
|
|
|
1066
1074
|
transform: scale(0.7);
|
|
1067
1075
|
}
|
|
1068
1076
|
}
|
|
1077
|
+
@keyframes content-slide-in-left {
|
|
1078
|
+
from {
|
|
1079
|
+
translate: -200% 0%;
|
|
1080
|
+
}
|
|
1081
|
+
to {
|
|
1082
|
+
translate: 0% 0%;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
@keyframes content-slide-in-right {
|
|
1086
|
+
from {
|
|
1087
|
+
translate: 200% 0%;
|
|
1088
|
+
}
|
|
1089
|
+
to {
|
|
1090
|
+
translate: 0% 0%;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
@keyframes content-slide-in-top {
|
|
1094
|
+
from {
|
|
1095
|
+
translate: 0% -200%;
|
|
1096
|
+
}
|
|
1097
|
+
to {
|
|
1098
|
+
translate: 0% 0%;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
@keyframes content-slide-in-bottom {
|
|
1102
|
+
from {
|
|
1103
|
+
translate: 0% 200%;
|
|
1104
|
+
}
|
|
1105
|
+
to {
|
|
1106
|
+
translate: 0% 0%;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
@keyframes content-slide-out-left {
|
|
1110
|
+
from {
|
|
1111
|
+
translate: 0% 0%;
|
|
1112
|
+
}
|
|
1113
|
+
to {
|
|
1114
|
+
translate: -200% 0%;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
@keyframes content-slide-out-right {
|
|
1118
|
+
from {
|
|
1119
|
+
translate: 0% 0%;
|
|
1120
|
+
}
|
|
1121
|
+
to {
|
|
1122
|
+
translate: 200% 0%;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
@keyframes content-slide-out-top {
|
|
1126
|
+
from {
|
|
1127
|
+
translate: 0% 0%;
|
|
1128
|
+
}
|
|
1129
|
+
to {
|
|
1130
|
+
translate: 0% -200%;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
@keyframes content-slide-out-bottom {
|
|
1134
|
+
from {
|
|
1135
|
+
translate: 0% 0%;
|
|
1136
|
+
}
|
|
1137
|
+
to {
|
|
1138
|
+
translate: 0% 200%;
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1069
1141
|
@keyframes caret-blink {
|
|
1070
1142
|
0% {
|
|
1071
1143
|
opacity: 1;
|
package/dist/index.d.ts
CHANGED
|
@@ -5791,6 +5791,9 @@ export declare const MilitaryTechIcon: ({ variant, ...props }: VariableIconProps
|
|
|
5791
5791
|
export declare const ModalBody: ForwardRefExoticComponent<Omit<ModalBodyProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
5792
5792
|
|
|
5793
5793
|
export declare interface ModalBodyProps extends ComponentPropsWithRef<typeof DialogContent> {
|
|
5794
|
+
layout?: "dialog" | "sidebar";
|
|
5795
|
+
direction?: "left" | "right" | "top" | "bottom" | "center";
|
|
5796
|
+
placement?: "left" | "right" | "top" | "bottom" | "center";
|
|
5794
5797
|
}
|
|
5795
5798
|
|
|
5796
5799
|
export declare const ModalClose: ForwardRefExoticComponent<Omit<ModalCloseProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("./index-HSoR75mY.cjs"),r=require("react"),c=require("./utils-sX9NhwD-.cjs"),u=require("./index-DvzX668K.cjs"),a=r.forwardRef(({children:d,className:s,layout:n="dialog",direction:m="center",placement:i="center",...o},l)=>t.jsx("div",{className:"mds:fixed mds:w-full mds:h-full mds:flex mds:justify-center mds:top-0 mds:left-0 mds:items-end mds:z-100 mds:sm:items-center mds:has-data-[placement=left]:sm:justify-start mds:has-data-[placement=right]:sm:justify-end mds:has-data-[placement=top]:sm:items-start mds:has-data-[placement=bottom]:sm:items-end ",children:t.jsxs(e.DialogContent,{ref:l,"data-slot":"modal-body","data-layout":n,"data-direction":m,"data-placement":i,className:c.cn("mds:group/Modal-body mds:flex-1 mds:flex mds:will-change-transform mds:max-h-[90dvh] mds:max-w-980 mds:shadow-600 mds:rounded-t-20 mds:overflow-hidden mds:bg-surface-neutral-l1 mds:sm:rounded-20 mds:sm:m-20 mds:data-[layout=sidebar]:max-w-456 mds:data-[layout=sidebar]:sm:min-h-[95dvh] ","mds:animate-content-slide-out-bottom mds:data-[state=open]:animate-content-slide-in-bottom mds:data-[direction=center]:sm:animate-content-scale-out mds:data-[direction=left]:sm:animate-content-slide-out-left mds:data-[direction=right]:sm:animate-content-slide-out-right mds:data-[direction=top]:sm:animate-content-slide-out-top mds:data-[direction=bottom]:sm:animate-content-slide-out-bottom mds:data-[direction=center]:data-[state=open]:sm:animate-content-scale-in mds:data-[direction=left]:data-[state=open]:sm:animate-content-slide-in-left mds:data-[direction=right]:data-[state=open]:sm:animate-content-slide-in-right mds:data-[direction=top]:data-[state=open]:sm:animate-content-slide-in-top mds:data-[direction=bottom]:data-[state=open]:sm:animate-content-slide-in-bottom",s),...o,children:[d,t.jsx(u.VisuallyHidden,{children:t.jsx(e.DialogDescription,{})})]})}));a.displayName="ModalBody";exports.ModalBody=a;
|
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { D as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c as
|
|
6
|
-
import { V as
|
|
7
|
-
const
|
|
8
|
-
({
|
|
9
|
-
|
|
2
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { D as l, a as r } from "./index-DDHQjaCF.js";
|
|
4
|
+
import { forwardRef as c } from "react";
|
|
5
|
+
import { c as p } from "./utils-BuJ7DVbu.js";
|
|
6
|
+
import { V as f } from "./index-DJT9m8v7.js";
|
|
7
|
+
const u = c(
|
|
8
|
+
({
|
|
9
|
+
children: a,
|
|
10
|
+
className: d,
|
|
11
|
+
layout: e = "dialog",
|
|
12
|
+
direction: s = "center",
|
|
13
|
+
placement: m = "center",
|
|
14
|
+
...o
|
|
15
|
+
}, n) => /* @__PURE__ */ t("div", { className: "mds:fixed mds:w-full mds:h-full mds:flex mds:justify-center mds:top-0 mds:left-0 mds:items-end mds:z-100 mds:sm:items-center mds:has-data-[placement=left]:sm:justify-start mds:has-data-[placement=right]:sm:justify-end mds:has-data-[placement=top]:sm:items-start mds:has-data-[placement=bottom]:sm:items-end ", children: /* @__PURE__ */ i(
|
|
16
|
+
l,
|
|
10
17
|
{
|
|
11
|
-
ref:
|
|
18
|
+
ref: n,
|
|
12
19
|
"data-slot": "modal-body",
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
"data-layout": e,
|
|
21
|
+
"data-direction": s,
|
|
22
|
+
"data-placement": m,
|
|
23
|
+
className: p(
|
|
24
|
+
"mds:group/Modal-body mds:flex-1 mds:flex mds:will-change-transform mds:max-h-[90dvh] mds:max-w-980 mds:shadow-600 mds:rounded-t-20 mds:overflow-hidden mds:bg-surface-neutral-l1 mds:sm:rounded-20 mds:sm:m-20 mds:data-[layout=sidebar]:max-w-456 mds:data-[layout=sidebar]:sm:min-h-[95dvh] ",
|
|
25
|
+
"mds:animate-content-slide-out-bottom mds:data-[state=open]:animate-content-slide-in-bottom mds:data-[direction=center]:sm:animate-content-scale-out mds:data-[direction=left]:sm:animate-content-slide-out-left mds:data-[direction=right]:sm:animate-content-slide-out-right mds:data-[direction=top]:sm:animate-content-slide-out-top mds:data-[direction=bottom]:sm:animate-content-slide-out-bottom mds:data-[direction=center]:data-[state=open]:sm:animate-content-scale-in mds:data-[direction=left]:data-[state=open]:sm:animate-content-slide-in-left mds:data-[direction=right]:data-[state=open]:sm:animate-content-slide-in-right mds:data-[direction=top]:data-[state=open]:sm:animate-content-slide-in-top mds:data-[direction=bottom]:data-[state=open]:sm:animate-content-slide-in-bottom",
|
|
26
|
+
d
|
|
16
27
|
),
|
|
17
|
-
...
|
|
28
|
+
...o,
|
|
18
29
|
children: [
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */
|
|
30
|
+
a,
|
|
31
|
+
/* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(r, {}) })
|
|
21
32
|
]
|
|
22
33
|
}
|
|
23
34
|
) })
|
|
24
35
|
);
|
|
25
|
-
|
|
36
|
+
u.displayName = "ModalBody";
|
|
26
37
|
export {
|
|
27
|
-
|
|
38
|
+
u as ModalBody
|
|
28
39
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),m=require("./index-C8aODXfJ.cjs"),E=require("./index-4R9KShCu.cjs"),o=require("react"),I=require("./mainstack-design-system588.cjs"),y=require("./mainstack-design-system602.cjs"),b=o.forwardRef(({isDisabled:x,isError:C,isMultiSelect:c=!1,isSuccess:d,children:h,value:i,defaultValue:n,inputReadOnly:j,isCreatableSelect:q,options:l=[],isOptionOpen:P,onOptionOpenChange:v,onValueChange:u,onOptionSelect:R},t)=>{const a=o.useRef(null),[s,A]=o.useState(y.parseSelectOptions(l)),[r,_]=m.useControllableState({prop:i,defaultProp:y.mapDefaultValuesToSelectedOption({isMultiSelect:c,defaultValue:n,options:l}),onChange:u}),[T,S]=o.useState(()=>typeof i=="string"?s.map.get(i)?.label||"":typeof n=="string"&&s.map.get(n)?.label||""),[O,f]=m.useControllableState({prop:P,defaultProp:!1,onChange:v}),[D,g]=o.useState("idle");return p.jsx(I.SelectContext.Provider,{value:{defaultValue:n,options:s,selectedOption:r,isOptionOpen:O,isDisabled:x,isError:C,isMultiSelect:c,isSuccess:d,inputValue:T,inputReadOnly:j,previousAction:D,isCreatableSelect:q,rootElementRef:a,setOptions:A,setPreviousAction:g,setInputValue:S,setSelectedOption:_,onOptionOpenChange:f,onValueChange:u,onOptionSelect:R},children:p.jsx(E.Popover,{open:O,onOpenChange:e=>{f(e),r&&!Array.isArray(r)&&!e&&(S(s.map.get(r)?.label||""),g("selection"))},children:p.jsx("div",{ref:e=>{a.current=e,typeof t=="function"?t(e):typeof t=="object"&&t?.current&&(t.current=e)},"data-slot":"select-root",children:h})})})});b.displayName="SelectRoot";exports.SelectRoot=b;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { u as
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import { u as y } from "./index-437EL2iq.js";
|
|
4
4
|
import { P as I } from "./index-RoCFhqzC.js";
|
|
5
|
-
import { forwardRef as N, useRef as T, useState as
|
|
5
|
+
import { forwardRef as N, useRef as T, useState as s } from "react";
|
|
6
6
|
import { SelectContext as k } from "./mainstack-design-system588.js";
|
|
7
7
|
import { parseSelectOptions as q, mapDefaultValuesToSelectedOption as z } from "./mainstack-design-system602.js";
|
|
8
8
|
const B = N(
|
|
9
9
|
({
|
|
10
10
|
isDisabled: S,
|
|
11
11
|
isError: h,
|
|
12
|
-
isMultiSelect:
|
|
13
|
-
isSuccess:
|
|
14
|
-
children:
|
|
15
|
-
value:
|
|
12
|
+
isMultiSelect: l = !1,
|
|
13
|
+
isSuccess: C,
|
|
14
|
+
children: P,
|
|
15
|
+
value: r,
|
|
16
16
|
defaultValue: e,
|
|
17
|
-
inputReadOnly:
|
|
18
|
-
isCreatableSelect:
|
|
19
|
-
options:
|
|
17
|
+
inputReadOnly: b,
|
|
18
|
+
isCreatableSelect: v,
|
|
19
|
+
options: c = [],
|
|
20
20
|
isOptionOpen: A,
|
|
21
21
|
onOptionOpenChange: x,
|
|
22
|
-
onValueChange:
|
|
22
|
+
onValueChange: a,
|
|
23
23
|
onOptionSelect: d
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
q(
|
|
27
|
-
), [
|
|
28
|
-
prop:
|
|
24
|
+
}, o) => {
|
|
25
|
+
const m = T(null), [n, j] = s(
|
|
26
|
+
q(c)
|
|
27
|
+
), [p, R] = y({
|
|
28
|
+
prop: r,
|
|
29
29
|
defaultProp: z({
|
|
30
|
-
isMultiSelect:
|
|
30
|
+
isMultiSelect: l,
|
|
31
31
|
defaultValue: e,
|
|
32
|
-
options:
|
|
32
|
+
options: c
|
|
33
33
|
}),
|
|
34
|
-
onChange:
|
|
35
|
-
}), [D,
|
|
34
|
+
onChange: a
|
|
35
|
+
}), [D, f] = s(() => typeof r == "string" ? n.map.get(r)?.label || "" : typeof e == "string" && n.map.get(e)?.label || ""), [u, O] = y({
|
|
36
36
|
prop: A,
|
|
37
37
|
defaultProp: !1,
|
|
38
38
|
onChange: x
|
|
39
|
-
}), [E,
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
}), [E, g] = s("idle");
|
|
40
|
+
return /* @__PURE__ */ i(
|
|
41
41
|
k.Provider,
|
|
42
42
|
{
|
|
43
43
|
value: {
|
|
44
44
|
defaultValue: e,
|
|
45
|
-
options:
|
|
46
|
-
selectedOption:
|
|
45
|
+
options: n,
|
|
46
|
+
selectedOption: p,
|
|
47
47
|
isOptionOpen: u,
|
|
48
48
|
isDisabled: S,
|
|
49
49
|
isError: h,
|
|
50
|
-
isMultiSelect:
|
|
51
|
-
isSuccess:
|
|
50
|
+
isMultiSelect: l,
|
|
51
|
+
isSuccess: C,
|
|
52
52
|
inputValue: D,
|
|
53
|
-
inputReadOnly:
|
|
53
|
+
inputReadOnly: b,
|
|
54
54
|
previousAction: E,
|
|
55
|
-
isCreatableSelect:
|
|
56
|
-
rootElementRef:
|
|
55
|
+
isCreatableSelect: v,
|
|
56
|
+
rootElementRef: m,
|
|
57
57
|
setOptions: j,
|
|
58
|
-
setPreviousAction:
|
|
59
|
-
setInputValue:
|
|
58
|
+
setPreviousAction: g,
|
|
59
|
+
setInputValue: f,
|
|
60
60
|
setSelectedOption: R,
|
|
61
|
-
onOptionOpenChange:
|
|
62
|
-
onValueChange:
|
|
61
|
+
onOptionOpenChange: O,
|
|
62
|
+
onValueChange: a,
|
|
63
63
|
onOptionSelect: d
|
|
64
64
|
},
|
|
65
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ i(
|
|
66
66
|
I,
|
|
67
67
|
{
|
|
68
68
|
open: u,
|
|
69
|
-
onOpenChange: (
|
|
70
|
-
|
|
69
|
+
onOpenChange: (t) => {
|
|
70
|
+
O(t), p && !Array.isArray(p) && !t && (f(n.map.get(p)?.label || ""), g("selection"));
|
|
71
71
|
},
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ i(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
|
-
ref: (
|
|
76
|
-
|
|
75
|
+
ref: (t) => {
|
|
76
|
+
m.current = t, typeof o == "function" ? o(t) : typeof o == "object" && o?.current && (o.current = t);
|
|
77
77
|
},
|
|
78
78
|
"data-slot": "select-root",
|
|
79
|
-
children:
|
|
79
|
+
children: P
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
}
|