mainstack-design-system 1.19.6 → 1.19.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/mainstack-design-system478.cjs +1 -1
- package/dist/mainstack-design-system478.js +27 -29
- package/dist/mainstack-design-system479.cjs +1 -1
- package/dist/mainstack-design-system479.js +35 -21
- package/dist/mainstack-design-system487.cjs +1 -1
- package/dist/mainstack-design-system487.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),g=require("./mainstack-design-system450.cjs"),j=require("./mainstack-design-system451.cjs");require("./mainstack-design-system449.cjs");require("./mainstack-design-system366.cjs");const O=require("./mainstack-design-system93.cjs"),v=require("./mainstack-design-system196.cjs");require("./player-C6X6nrWe.cjs");const o=require("./utils-BJ1u234q.cjs"),w=require("./mainstack-design-system606.cjs"),N=require("./index-4R9KShCu.cjs"),d=S.forwardRef(({onClick:r,children:u,className:p,onChange:i,...a},m)=>{const{isOptionOpen:s,inputValue:x,inputReadOnly:c,isDisabled:h,isError:I,isSuccess:f,selectedOption:l,isMultiSelect:n,setSelectedOption:q,setPreviousAction:b,setInputValue:y,onOptionOpenChange:_}=w.useSelectContext();return e.jsx(N.PopoverAnchor,{role:"combobox","aria-haspopup":"listbox","aria-expanded":s,"aria-controls":"select-portal","aria-owns":"select-portal",children:e.jsxs(g.InputRoot,{className:o.cn(n&&"mds:h-auto mds:py-10 ",p),children:[e.jsxs("div",{className:o.cn("mds:flex mds:flex-1 mds:h-auto mds:min-h-auto mds:items-center mds:flex-wrap mds:gap-6"),children:[u,e.jsx(j.InputField,{...a,readOnly:c,"data-slot":"select-input-field","data-select-options-opened":s,tabIndex:3,value:x,isError:I,isSuccess:f,disabled:h,className:o.cn(n&&"mds:h-auto mds:min-h-auto"),onChange:t=>{i&&i(t),b("typing"),y(t.currentTarget.value)},onClick:t=>{r&&r(t),_(!s),!c&&!window.matchMedia("(pointer: coarse)").matches&&t.currentTarget.focus()},ref:m,...a})]}),e.jsxs("div",{className:"mds:flex mds:items-center mds:gap-6",children:[n&&Array.isArray(l)&&l.length>0&&e.jsx(O,{role:"button",variant:"filled",className:"mds:size-20 mds:cursor-pointer mds:text-secondary",onClick:()=>{q([])}}),e.jsx(v,{"data-select-options-opened":s,className:"mds:size-16 mds:transition-transform mds:transition-1000 mds:data-[select-options-opened=true]:rotate-180"})]})]})})});d.displayName="SelectInputField";exports.SelectInputField=d;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { InputRoot as
|
|
5
|
-
import { InputField as
|
|
3
|
+
import { forwardRef as v } from "react";
|
|
4
|
+
import { InputRoot as w } from "./mainstack-design-system450.js";
|
|
5
|
+
import { InputField as N } from "./mainstack-design-system451.js";
|
|
6
6
|
import "./mainstack-design-system449.js";
|
|
7
7
|
import "./mainstack-design-system366.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import S from "./mainstack-design-system93.js";
|
|
9
|
+
import A from "./mainstack-design-system196.js";
|
|
10
10
|
import "./player-CgAfbAf_.js";
|
|
11
|
-
import { c as
|
|
12
|
-
import { useSelectContext as
|
|
13
|
-
import { d as
|
|
14
|
-
const
|
|
15
|
-
({ onClick:
|
|
11
|
+
import { c as a } from "./utils-D4bN6vBC.js";
|
|
12
|
+
import { useSelectContext as C } from "./mainstack-design-system606.js";
|
|
13
|
+
import { d as F } from "./index-RoCFhqzC.js";
|
|
14
|
+
const R = v(
|
|
15
|
+
({ onClick: i, children: c, className: p, onChange: n, ...m }, u) => {
|
|
16
16
|
const {
|
|
17
17
|
isOptionOpen: t,
|
|
18
18
|
inputValue: f,
|
|
19
|
-
inputReadOnly:
|
|
19
|
+
inputReadOnly: d,
|
|
20
20
|
isDisabled: h,
|
|
21
21
|
isError: x,
|
|
22
22
|
isSuccess: y,
|
|
@@ -26,9 +26,9 @@ const j = N(
|
|
|
26
26
|
setPreviousAction: I,
|
|
27
27
|
setInputValue: O,
|
|
28
28
|
onOptionOpenChange: g
|
|
29
|
-
} =
|
|
29
|
+
} = C();
|
|
30
30
|
return /* @__PURE__ */ o(
|
|
31
|
-
|
|
31
|
+
F,
|
|
32
32
|
{
|
|
33
33
|
role: "combobox",
|
|
34
34
|
"aria-haspopup": "listbox",
|
|
@@ -36,23 +36,23 @@ const j = N(
|
|
|
36
36
|
"aria-controls": "select-portal",
|
|
37
37
|
"aria-owns": "select-portal",
|
|
38
38
|
children: /* @__PURE__ */ r(
|
|
39
|
-
|
|
39
|
+
w,
|
|
40
40
|
{
|
|
41
|
-
className:
|
|
41
|
+
className: a(s && "mds:h-auto mds:py-10 ", p),
|
|
42
42
|
children: [
|
|
43
43
|
/* @__PURE__ */ r(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
className:
|
|
46
|
+
className: a(
|
|
47
47
|
"mds:flex mds:flex-1 mds:h-auto mds:min-h-auto mds:items-center mds:flex-wrap mds:gap-6"
|
|
48
48
|
),
|
|
49
49
|
children: [
|
|
50
|
-
|
|
50
|
+
c,
|
|
51
51
|
/* @__PURE__ */ o(
|
|
52
|
-
|
|
52
|
+
N,
|
|
53
53
|
{
|
|
54
|
-
...
|
|
55
|
-
readOnly:
|
|
54
|
+
...m,
|
|
55
|
+
readOnly: d,
|
|
56
56
|
"data-slot": "select-input-field",
|
|
57
57
|
"data-select-options-opened": t,
|
|
58
58
|
tabIndex: 3,
|
|
@@ -60,17 +60,15 @@ const j = N(
|
|
|
60
60
|
isError: x,
|
|
61
61
|
isSuccess: y,
|
|
62
62
|
disabled: h,
|
|
63
|
-
className:
|
|
63
|
+
className: a(s && "mds:h-auto mds:min-h-auto"),
|
|
64
64
|
onChange: (e) => {
|
|
65
65
|
n && n(e), I("typing"), O(e.currentTarget.value);
|
|
66
66
|
},
|
|
67
67
|
onClick: (e) => {
|
|
68
|
-
|
|
69
|
-
const v = e.currentTarget;
|
|
70
|
-
g(!t), m || v.focus();
|
|
68
|
+
i && i(e), g(!t), !d && !window.matchMedia("(pointer: coarse)").matches && e.currentTarget.focus();
|
|
71
69
|
},
|
|
72
70
|
ref: u,
|
|
73
|
-
...
|
|
71
|
+
...m
|
|
74
72
|
}
|
|
75
73
|
)
|
|
76
74
|
]
|
|
@@ -78,7 +76,7 @@ const j = N(
|
|
|
78
76
|
),
|
|
79
77
|
/* @__PURE__ */ r("div", { className: "mds:flex mds:items-center mds:gap-6", children: [
|
|
80
78
|
s && Array.isArray(l) && l.length > 0 && /* @__PURE__ */ o(
|
|
81
|
-
|
|
79
|
+
S,
|
|
82
80
|
{
|
|
83
81
|
role: "button",
|
|
84
82
|
variant: "filled",
|
|
@@ -89,7 +87,7 @@ const j = N(
|
|
|
89
87
|
}
|
|
90
88
|
),
|
|
91
89
|
/* @__PURE__ */ o(
|
|
92
|
-
|
|
90
|
+
A,
|
|
93
91
|
{
|
|
94
92
|
"data-select-options-opened": t,
|
|
95
93
|
className: "mds:size-16 mds:transition-transform mds:transition-1000 mds:data-[select-options-opened=true]:rotate-180"
|
|
@@ -103,7 +101,7 @@ const j = N(
|
|
|
103
101
|
);
|
|
104
102
|
}
|
|
105
103
|
);
|
|
106
|
-
|
|
104
|
+
R.displayName = "SelectInputField";
|
|
107
105
|
export {
|
|
108
|
-
|
|
106
|
+
R as SelectInputField
|
|
109
107
|
};
|
|
@@ -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 a=require("react/jsx-runtime"),i=require("./index-4R9KShCu.cjs"),m=require("react"),g=require("./utils-BJ1u234q.cjs"),P=require("./mainstack-design-system606.cjs"),c=m.forwardRef(({children:l,onWheel:t,onTouchMove:o,onPointerDownOutside:n,className:d,...u},p)=>{const{isOptionOpen:r,onOptionOpenChange:f,rootElementRef:s}=P.useSelectContext();return a.jsx(i.PopoverPortal,{forceMount:!0,children:a.jsx(i.PopoverContent,{"data-slot":"select-portal",role:"listbox",sideOffset:6,"data-select-options-opened":r,className:g.cn(" mds:hidden mds:will-change-transform mds:z-100 mds:data-[state=open]:animate-content-fade-in mds:animate-content-fade-out mds:w-(--radix-popover-trigger-width) ",r&&"mds:block",d),ref:p,onPointerDownOutside:e=>{if(s.current?.contains(e.target)){e.preventDefault();return}n&&n(e)},onInteractOutside:e=>{s.current?.contains(e.target)||f(!1)},onWheel:e=>{e.stopPropagation(),t&&t(e)},onTouchMove:e=>{e.stopPropagation(),o&&o(e)},...u,children:l})})});c.displayName="SelectPortal";exports.SelectPortal=c;
|
|
@@ -1,41 +1,55 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { b as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c as
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { b as f, c as l } from "./index-RoCFhqzC.js";
|
|
4
|
+
import { forwardRef as u } from "react";
|
|
5
|
+
import { c as g } from "./utils-D4bN6vBC.js";
|
|
6
6
|
import { useSelectContext as P } from "./mainstack-design-system606.js";
|
|
7
|
-
const
|
|
8
|
-
({
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const O = u(
|
|
8
|
+
({
|
|
9
|
+
children: i,
|
|
10
|
+
onWheel: e,
|
|
11
|
+
onTouchMove: o,
|
|
12
|
+
onPointerDownOutside: r,
|
|
13
|
+
className: p,
|
|
14
|
+
...m
|
|
15
|
+
}, c) => {
|
|
16
|
+
const { isOptionOpen: n, onOptionOpenChange: d, rootElementRef: a } = P();
|
|
17
|
+
return /* @__PURE__ */ s(f, { forceMount: !0, children: /* @__PURE__ */ s(
|
|
11
18
|
l,
|
|
12
19
|
{
|
|
13
20
|
"data-slot": "select-portal",
|
|
14
21
|
role: "listbox",
|
|
15
22
|
sideOffset: 6,
|
|
16
|
-
"data-select-options-opened":
|
|
17
|
-
className:
|
|
23
|
+
"data-select-options-opened": n,
|
|
24
|
+
className: g(
|
|
18
25
|
" mds:hidden mds:will-change-transform mds:z-100 mds:data-[state=open]:animate-content-fade-in mds:animate-content-fade-out mds:w-(--radix-popover-trigger-width) ",
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
n && "mds:block",
|
|
27
|
+
p
|
|
21
28
|
),
|
|
22
|
-
ref:
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
ref: c,
|
|
30
|
+
onPointerDownOutside: (t) => {
|
|
31
|
+
if (a.current?.contains(t.target)) {
|
|
32
|
+
t.preventDefault();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
r && r(t);
|
|
36
|
+
},
|
|
37
|
+
onInteractOutside: (t) => {
|
|
38
|
+
a.current?.contains(t.target) || d(!1);
|
|
25
39
|
},
|
|
26
40
|
onWheel: (t) => {
|
|
27
|
-
t.stopPropagation(),
|
|
41
|
+
t.stopPropagation(), e && e(t);
|
|
28
42
|
},
|
|
29
43
|
onTouchMove: (t) => {
|
|
30
|
-
t.stopPropagation(),
|
|
44
|
+
t.stopPropagation(), o && o(t);
|
|
31
45
|
},
|
|
32
|
-
...
|
|
33
|
-
children:
|
|
46
|
+
...m,
|
|
47
|
+
children: i
|
|
34
48
|
}
|
|
35
49
|
) });
|
|
36
50
|
}
|
|
37
51
|
);
|
|
38
|
-
|
|
52
|
+
O.displayName = "SelectPortal";
|
|
39
53
|
export {
|
|
40
|
-
|
|
54
|
+
O as SelectPortal
|
|
41
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-B43IDo7j.cjs"),n=require("./utils-BJ1u234q.cjs");require("./mainstack-design-system366.cjs");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./index-B43IDo7j.cjs"),n=require("./utils-BJ1u234q.cjs");require("./mainstack-design-system366.cjs");const i=require("./mainstack-design-system196.cjs");require("react");require("./player-C6X6nrWe.cjs");const l=({tabs:d,activeValue:o,onSelect:t,hasActiveTabInDropdown:m})=>e.jsxs(s.DropdownMenu,{children:[e.jsx(s.DropdownMenuTrigger,{asChild:!0,children:e.jsxs("div",{className:n.cn("mds:flex mds:cursor-pointer mds:items-center mds:gap-4 mds:p-9 mds:text-secondary mds:body-extrasmall-book"),"data-state":m?"active":"inactive",children:[e.jsx("p",{children:"More"}),e.jsx(i,{className:n.cn("mds:size-16 mds:transition-transform mds:duration-200","group-data-[state=open]:rotate-180")})]})}),e.jsx(s.DropdownMenuPortal,{children:e.jsx(s.DropdownMenuContent,{align:"end",sideOffset:5,className:"mds:z-100 mds:min-w-188 mds:flex mds:flex-col mds:gap-8 mds:bg-surface-neutral-l1 mds:shadow-200 mds:p-8 mds:rounded-12",children:d.map(r=>{const a=r.value===o;return e.jsx(s.DropdownMenuItem,{onSelect:()=>t(r.value),className:n.cn("mds:relative mds:flex mds:cursor-pointer mds:select-none mds:items-center mds:rounded-8 mds:p-8 mds:body-extrasmall-medium mds:outline-none mds:transition-colors mds:hover:bg-surface-neutral-l4 mds:focus:bg-surface-neutral-l4",a&&"mds:bg-surface-neutral-l4 mds:text-primary"),children:r.children},r.value)})})})]});exports.TabsOverflowDropdown=l;
|
|
@@ -15,7 +15,7 @@ const M = ({
|
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
className: r(
|
|
18
|
-
"mds:flex mds:items-center mds:gap-4 mds:p-9 mds:text-secondary mds:body-extrasmall-book"
|
|
18
|
+
"mds:flex mds:cursor-pointer mds:items-center mds:gap-4 mds:p-9 mds:text-secondary mds:body-extrasmall-book"
|
|
19
19
|
),
|
|
20
20
|
"data-state": a ? "active" : "inactive",
|
|
21
21
|
children: [
|