mainstack-design-system 1.16.6 → 1.17.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/index.d.ts +4 -0
- package/dist/mainstack-design-system406.cjs +1 -1
- package/dist/mainstack-design-system406.js +1 -1
- package/dist/mainstack-design-system531.cjs +1 -1
- package/dist/mainstack-design-system531.js +22 -22
- package/dist/mainstack-design-system534.cjs +1 -1
- package/dist/mainstack-design-system534.js +20 -18
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1099,6 +1099,10 @@ declare type DatePickerContextType = {
|
|
|
1099
1099
|
isDisabled?: boolean;
|
|
1100
1100
|
isError?: boolean;
|
|
1101
1101
|
isSuccess?: boolean;
|
|
1102
|
+
dateRange?: {
|
|
1103
|
+
from: Date;
|
|
1104
|
+
to?: Date | undefined;
|
|
1105
|
+
};
|
|
1102
1106
|
onValueChange: (value: Date | undefined) => void;
|
|
1103
1107
|
onOpenChange: Dispatch<SetStateAction<boolean>>;
|
|
1104
1108
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
mds:hover:bg-content-special-hover mds:hover:shadow-special-button-hover mds:outline-2 mds:outline-neutral-500
|
|
6
6
|
|
|
7
7
|
mds:active:bg-content-special mds:active:shadow-special-button-pressed mds:active:ring-2 mds:ring-offset-2 mds:ring-border-surface-spread-neutral
|
|
8
|
-
mds:disabled:bg-none mds:disabled:border-none mds:disabled:shadow-none mds:disabled:bg-interactive-primary-disabled mds:disabled:text-on-primary-disabled`},{status:"default",variant:"primary",class:`mds:bg-primary mds:text-on-primary
|
|
8
|
+
mds:disabled:bg-none mds:disabled:border-none mds:disabled:shadow-none mds:disabled:outline-none mds:disabled:bg-interactive-primary-disabled mds:disabled:text-on-primary-disabled`},{status:"default",variant:"primary",class:`mds:bg-primary mds:text-on-primary
|
|
9
9
|
mds:hover:bg-interactive-primary-hover
|
|
10
10
|
|
|
11
11
|
mds:active:bg-interactive-primary-pressed mds:active:ring-3 mds:active:ring-border-surface-spread-neutral
|
|
@@ -41,7 +41,7 @@ const r = e(
|
|
|
41
41
|
mds:hover:bg-content-special-hover mds:hover:shadow-special-button-hover mds:outline-2 mds:outline-neutral-500
|
|
42
42
|
|
|
43
43
|
mds:active:bg-content-special mds:active:shadow-special-button-pressed mds:active:ring-2 mds:ring-offset-2 mds:ring-border-surface-spread-neutral
|
|
44
|
-
mds:disabled:bg-none mds:disabled:border-none mds:disabled:shadow-none mds:disabled:bg-interactive-primary-disabled mds:disabled:text-on-primary-disabled`
|
|
44
|
+
mds:disabled:bg-none mds:disabled:border-none mds:disabled:shadow-none mds:disabled:outline-none mds:disabled:bg-interactive-primary-disabled mds:disabled:text-on-primary-disabled`
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
status: "default",
|
|
@@ -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 i=require("react/jsx-runtime"),k=require("react"),f=require("./utils-s-0cOrOT.cjs"),p=require("./mainstack-design-system614.cjs"),D=require("./DayPickerExtended-BI8ETMuv.cjs"),r=require("./isValid-914h5Kof.cjs"),o=k.forwardRef(({className:s,...d},c)=>{const{dateRange:a,value:e,isDisabled:t,onValueChange:n,onOpenChange:l}=p.useDatePickerContext(),u=t||(a?{before:a?.from||new Date,after:a?.to}:void 0);return i.jsx("div",{"data-slot":"date-picker-calendar",className:f.cn("@container",s),ref:c,children:i.jsx(D.DayPickerExtended,{animate:!0,mode:"single",captionLayout:"dropdown",numberOfMonths:1,navLayout:"around",defaultMonth:r.isValid(e)?e:void 0,className:"ms-single-date-picker",selected:r.isValid(e)?e:void 0,onSelect:(m=>{n&&n(m),l(!1)}),disabled:u,...d})})});o.displayName="DatePickerCalendar";exports.DatePickerCalendar=o;
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c } from "./utils-Z5JtG_Bc.js";
|
|
5
|
-
import { useDatePickerContext as
|
|
6
|
-
import { D
|
|
7
|
-
import { i
|
|
8
|
-
const
|
|
9
|
-
({ className:
|
|
10
|
-
const { value: e, isDisabled:
|
|
11
|
-
return /* @__PURE__ */
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as f } from "react";
|
|
4
|
+
import { c as p } from "./utils-Z5JtG_Bc.js";
|
|
5
|
+
import { useDatePickerContext as u } from "./mainstack-design-system614.js";
|
|
6
|
+
import { D } from "./DayPickerExtended-B8-AnC-D.js";
|
|
7
|
+
import { i } from "./isValid-nnPUOITD.js";
|
|
8
|
+
const h = f(
|
|
9
|
+
({ className: n, ...d }, s) => {
|
|
10
|
+
const { dateRange: a, value: e, isDisabled: o, onValueChange: t, onOpenChange: c } = u(), l = o || (a ? { before: a?.from || /* @__PURE__ */ new Date(), after: a?.to } : void 0);
|
|
11
|
+
return /* @__PURE__ */ r(
|
|
12
12
|
"div",
|
|
13
13
|
{
|
|
14
14
|
"data-slot": "date-picker-calendar",
|
|
15
|
-
className:
|
|
16
|
-
ref:
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
-
|
|
15
|
+
className: p("@container", n),
|
|
16
|
+
ref: s,
|
|
17
|
+
children: /* @__PURE__ */ r(
|
|
18
|
+
D,
|
|
19
19
|
{
|
|
20
20
|
animate: !0,
|
|
21
21
|
mode: "single",
|
|
22
22
|
captionLayout: "dropdown",
|
|
23
23
|
numberOfMonths: 1,
|
|
24
24
|
navLayout: "around",
|
|
25
|
-
|
|
26
|
-
defaultMonth: r(e) ? e : void 0,
|
|
25
|
+
defaultMonth: i(e) ? e : void 0,
|
|
27
26
|
className: "ms-single-date-picker",
|
|
28
|
-
selected:
|
|
29
|
-
onSelect: ((
|
|
30
|
-
|
|
27
|
+
selected: i(e) ? e : void 0,
|
|
28
|
+
onSelect: ((m) => {
|
|
29
|
+
t && t(m), c(!1);
|
|
31
30
|
}),
|
|
32
|
-
|
|
31
|
+
disabled: l,
|
|
32
|
+
...d
|
|
33
33
|
}
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
|
|
39
|
+
h.displayName = "DatePickerCalendar";
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
h as DatePickerCalendar
|
|
42
42
|
};
|
|
@@ -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"),v=require("react"),f=require("./mainstack-design-system614.cjs"),R=require("./index-4R9KShCu.cjs"),r=require("./index-C8aODXfJ.cjs"),a=v.forwardRef(({open:i,onOpenChange:c,value:s,onValueChange:l,isDisabled:u=!1,defaultValue:o,dateRange:p,isError:d,isSuccess:P,children:C,...g},h)=>{const[t,n]=r.useControllableState({prop:i,defaultProp:!1,onChange:c}),[x,k]=r.useControllableState({prop:s,defaultProp:o,onChange:l});return e.jsx(f.DatePickerContext.Provider,{value:{open:t,isDisabled:u,isError:d,isSuccess:P,defaultValue:o,value:x,dateRange:p,onValueChange:k,onOpenChange:n},children:e.jsx(R.Popover,{open:t,onOpenChange:n,children:e.jsx("div",{"data-slot":"date-picker-root",ref:h,...g,children:C})})})});a.displayName="DatePickerRoot";exports.DatePickerRoot=a;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { DatePickerContext as
|
|
5
|
-
import { P as
|
|
3
|
+
import { forwardRef as g } from "react";
|
|
4
|
+
import { DatePickerContext as v } from "./mainstack-design-system614.js";
|
|
5
|
+
import { P as k } from "./index-RoCFhqzC.js";
|
|
6
6
|
import { u as t } from "./index-437EL2iq.js";
|
|
7
|
-
const
|
|
7
|
+
const x = g(
|
|
8
8
|
({
|
|
9
9
|
open: n,
|
|
10
10
|
onOpenChange: p,
|
|
@@ -12,39 +12,41 @@ const k = P(
|
|
|
12
12
|
onValueChange: l,
|
|
13
13
|
isDisabled: m = !1,
|
|
14
14
|
defaultValue: e,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
dateRange: s,
|
|
16
|
+
isError: f,
|
|
17
|
+
isSuccess: c,
|
|
18
|
+
children: d,
|
|
19
|
+
...h
|
|
20
|
+
}, u) => {
|
|
20
21
|
const [r, a] = t({
|
|
21
22
|
prop: n,
|
|
22
23
|
defaultProp: !1,
|
|
23
24
|
onChange: p
|
|
24
|
-
}), [
|
|
25
|
+
}), [C, P] = t({
|
|
25
26
|
prop: i,
|
|
26
27
|
defaultProp: e,
|
|
27
28
|
onChange: l
|
|
28
29
|
});
|
|
29
30
|
return /* @__PURE__ */ o(
|
|
30
|
-
|
|
31
|
+
v.Provider,
|
|
31
32
|
{
|
|
32
33
|
value: {
|
|
33
34
|
open: r,
|
|
34
35
|
isDisabled: m,
|
|
35
|
-
isError:
|
|
36
|
-
isSuccess:
|
|
36
|
+
isError: f,
|
|
37
|
+
isSuccess: c,
|
|
37
38
|
defaultValue: e,
|
|
38
|
-
value:
|
|
39
|
-
|
|
39
|
+
value: C,
|
|
40
|
+
dateRange: s,
|
|
41
|
+
onValueChange: P,
|
|
40
42
|
onOpenChange: a
|
|
41
43
|
},
|
|
42
|
-
children: /* @__PURE__ */ o(
|
|
44
|
+
children: /* @__PURE__ */ o(k, { open: r, onOpenChange: a, children: /* @__PURE__ */ o("div", { "data-slot": "date-picker-root", ref: u, ...h, children: d }) })
|
|
43
45
|
}
|
|
44
46
|
);
|
|
45
47
|
}
|
|
46
48
|
);
|
|
47
|
-
|
|
49
|
+
x.displayName = "DatePickerRoot";
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
x as DatePickerRoot
|
|
50
52
|
};
|