@viasat/beam-react 2.41.0 → 2.43.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/assets/FloatingUI.css +1 -1
- package/assets/panel.css +1 -1
- package/chunks/FloatingUI.arrow.DDrTOpE-.js +1 -0
- package/chunks/{FloatingUI.arrow.90ecVA1X.js → FloatingUI.arrow.DGlk005P.js} +8 -7
- package/chunks/panel.module.BzLGa7GY.js +1 -0
- package/chunks/{panel.module.CnHWv4EZ.js → panel.module.CgFBtvbR.js} +6 -6
- package/lib/Autocomplete/AutocompleteDropdown.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteDropdown.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.arrow.es.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.cjs.js +1 -1
- package/lib/FloatingUI/FloatingUI.content.es.js +1 -1
- package/lib/Search/SearchDropdown.cjs.js +1 -1
- package/lib/Search/SearchDropdown.es.js +1 -1
- package/lib/Select/SelectDropdown.cjs.js +1 -1
- package/lib/Select/SelectDropdown.es.js +1 -1
- package/lib/wip/DateField/DateField.cjs.js +1 -1
- package/lib/wip/DateField/DateField.es.js +75 -71
- package/lib/wip/DateField/useDateFieldKeyboard.cjs.js +1 -1
- package/lib/wip/DateField/useDateFieldKeyboard.d.ts +15 -1
- package/lib/wip/DateField/useDateFieldKeyboard.es.js +33 -29
- package/lib/wip/DateField/useDateFieldValue.cjs.js +1 -1
- package/lib/wip/DateField/useDateFieldValue.d.ts +19 -0
- package/lib/wip/DateField/useDateFieldValue.es.js +84 -66
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.cjs.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.d.ts +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.Actions.es.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.cjs.js +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.d.ts +1 -1
- package/lib/wip/Panel/Footer/Panel.Footer.es.js +21 -20
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentAfter.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.ContentBefore.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Description.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Heading.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Row.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Subheader.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.Subheader.es.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.cjs.js +1 -1
- package/lib/wip/Panel/Header/Panel.Header.d.ts +1 -1
- package/lib/wip/Panel/Header/Panel.Header.es.js +35 -34
- package/lib/wip/Panel/Panel.Body.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Body.d.ts +1 -1
- package/lib/wip/Panel/Panel.Body.es.js +16 -14
- package/lib/wip/Panel/Panel.Inline.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Inline.d.ts +3 -3
- package/lib/wip/Panel/Panel.Inline.es.js +4 -4
- package/lib/wip/Panel/Panel.Overlay.cjs.js +1 -1
- package/lib/wip/Panel/Panel.Overlay.d.ts +3 -3
- package/lib/wip/Panel/Panel.Overlay.es.js +83 -80
- package/lib/wip/Panel/Panel.ResizeHandle.cjs.js +1 -1
- package/lib/wip/Panel/Panel.ResizeHandle.es.js +1 -1
- package/lib/wip/Panel/Panel.cjs.js +1 -1
- package/lib/wip/Panel/Panel.context.d.ts +12 -1
- package/lib/wip/Panel/Panel.d.ts +2 -2
- package/lib/wip/Panel/Panel.es.js +135 -120
- package/lib/wip/Panel/Panel.helpers.cjs.js +1 -1
- package/lib/wip/Panel/Panel.helpers.d.ts +3 -3
- package/lib/wip/Panel/Panel.helpers.es.js +19 -19
- package/lib/wip/Panel/Panel.types.d.ts +94 -92
- package/lib/wip/Panel/index.d.ts +1 -1
- package/package.json +6 -6
- package/chunks/FloatingUI.arrow.DR8hzVDP.js +0 -1
- package/chunks/panel.module.BVmRxZHo.js +0 -1
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
function
|
|
3
|
-
disabled:
|
|
4
|
-
readOnly:
|
|
5
|
-
fieldRef:
|
|
6
|
-
focusNext:
|
|
7
|
-
focusPrevious:
|
|
8
|
-
adjustSegment:
|
|
1
|
+
import { useMemo as f, useCallback as h } from "react";
|
|
2
|
+
function b({
|
|
3
|
+
disabled: p,
|
|
4
|
+
readOnly: e,
|
|
5
|
+
fieldRef: u,
|
|
6
|
+
focusNext: l,
|
|
7
|
+
focusPrevious: i,
|
|
8
|
+
adjustSegment: n,
|
|
9
|
+
deleteLastDigit: w,
|
|
10
|
+
clearSegment: y
|
|
9
11
|
}) {
|
|
10
|
-
const
|
|
12
|
+
const a = f(
|
|
11
13
|
() => {
|
|
12
14
|
const o = {
|
|
13
15
|
// Nav keys always own the event (arrows are contentEditable caret keys we
|
|
14
16
|
// suppress even at the first/last segment), so they always report handled.
|
|
15
|
-
ArrowRight: ({ segment: r, isRTL:
|
|
16
|
-
ArrowLeft: ({ segment: r, isRTL:
|
|
17
|
+
ArrowRight: ({ segment: r, isRTL: t }) => ((t ? i : l)(r), !0),
|
|
18
|
+
ArrowLeft: ({ segment: r, isRTL: t }) => ((t ? l : i)(r), !0)
|
|
17
19
|
};
|
|
18
|
-
return
|
|
20
|
+
return e ? o : {
|
|
19
21
|
...o,
|
|
20
|
-
ArrowUp: ({ segment: r }) =>
|
|
21
|
-
ArrowDown: ({ segment: r }) =>
|
|
22
|
-
PageUp: ({ segment: r }) =>
|
|
23
|
-
PageDown: ({ segment: r }) =>
|
|
24
|
-
Home: ({ segment: r }) =>
|
|
25
|
-
End: ({ segment: r }) =>
|
|
26
|
-
//
|
|
27
|
-
//
|
|
22
|
+
ArrowUp: ({ segment: r }) => n(r, 1),
|
|
23
|
+
ArrowDown: ({ segment: r }) => n(r, -1),
|
|
24
|
+
PageUp: ({ segment: r }) => n(r, 5),
|
|
25
|
+
PageDown: ({ segment: r }) => n(r, -5),
|
|
26
|
+
Home: ({ segment: r }) => n(r, "min"),
|
|
27
|
+
End: ({ segment: r }) => n(r, "max"),
|
|
28
|
+
// DF-5: Backspace removes the last digit (empty → focus previous); Delete clears the segment.
|
|
29
|
+
// Both always own the key (delete or focus-hop), so they report handled.
|
|
30
|
+
Backspace: ({ segment: r }) => (w(r).wasEmpty && i(r), !0),
|
|
31
|
+
Delete: ({ segment: r }) => (y(r), !0)
|
|
28
32
|
};
|
|
29
33
|
},
|
|
30
|
-
[
|
|
34
|
+
[n, y, w, l, i, e]
|
|
31
35
|
);
|
|
32
|
-
return
|
|
36
|
+
return h(
|
|
33
37
|
(o, r) => {
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
37
|
-
const c =
|
|
38
|
-
|
|
38
|
+
if (p || r.altKey || r.ctrlKey || r.metaKey || r.shiftKey) return;
|
|
39
|
+
const t = a[r.key];
|
|
40
|
+
if (!t) return;
|
|
41
|
+
const c = u.current, K = !!c && (getComputedStyle(c).direction === "rtl" || !!c.closest('[dir="rtl"]'));
|
|
42
|
+
t({ segment: o, event: r, isRTL: K }) && r.preventDefault();
|
|
39
43
|
},
|
|
40
|
-
[
|
|
44
|
+
[p, a, u]
|
|
41
45
|
);
|
|
42
46
|
}
|
|
43
47
|
export {
|
|
44
|
-
|
|
48
|
+
b as useDateFieldKeyboard
|
|
45
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),r=require("./DateField.utils.cjs.js"),E=require("./DateField.validation.cjs.js");function M({value:l,defaultValue:F,onChange:g}){const T=t.useRef(l!==void 0),b=T.current,[i,S]=t.useState(()=>r.segmentTextFromValue(b?l??null:F??null)),[_,h]=t.useState(!1),c=t.useRef(i),d=t.useRef(new Set),o=t.useRef(!1),y={day:r.segmentNumber("day",i.day),month:r.segmentNumber("month",i.month),year:r.segmentNumber("year",i.year)},D=r.deriveValue(y),x=t.useRef(D),R=t.useRef(b?l??null:null),m=t.useRef(g);t.useEffect(()=>{m.current=g},[g]),t.useEffect(()=>{if(!T.current||o.current||r.isSameDateValue(l??null,R.current))return;R.current=l??null;const e=r.segmentTextFromValue(l??null);c.current=e,S(e),x.current=r.deriveValueFromText(e)},[l]);const f=t.useCallback(e=>{var u;const n=r.deriveValueFromText(e);r.isSameDateValue(n,x.current)||(x.current=n,(u=m.current)==null||u.call(m,n))},[]),a=t.useCallback((e,n,{replace:u})=>{const s={...c.current,[e]:n};c.current=s,S(s),h(!0),f(s),u?d.current.add(e):d.current.delete(e)},[f]),N=t.useCallback((e,n)=>{const u=d.current.has(e)?"":c.current[e],s=E.tryAppendDigit(e,u,n);return s.rejected?{advanced:!1,rejected:!0}:(a(e,s.newBuffer,{replace:s.shouldAdvance}),{advanced:s.shouldAdvance,rejected:!1})},[a]),k=t.useCallback((e,n)=>{const u=c.current,s=r.segmentNumber(e,u[e]),p=r.getDaysInMonth(r.segmentNumber("year",u.year),r.segmentNumber("month",u.month)),V=r.adjustSegmentValue(e,s,n,{daysInMonth:p,today:r.todayParts()});return V==null?!1:(o.current=!0,a(e,String(V).padStart(E.SEGMENT_MAX_LENGTH[e],"0"),{replace:!0}),!0)},[a]),C=t.useCallback(e=>{const n=c.current[e];return n===""?{wasEmpty:!0}:(o.current=!0,a(e,n.slice(0,-1),{replace:!1}),{wasEmpty:!1})},[a]),v=t.useCallback(e=>{c.current[e]!==""&&(o.current=!0,a(e,"",{replace:!1}))},[a]),w=t.useCallback(e=>{o.current=!0,d.current.add(e)},[]),j=t.useCallback(()=>{o.current=!1;const e=c.current,n={day:r.normalizeSegmentText("day",e.day),month:r.normalizeSegmentText("month",e.month),year:r.normalizeSegmentText("year",e.year)};c.current=n,S(n),h(!0),f(n)},[f]);return{segmentText:i,segmentValues:y,currentValue:D,isControlled:b,wasTouched:_,appendDigit:N,adjustSegment:k,deleteLastDigit:C,clearSegment:v,beginSegmentEdit:w,commitOnBlur:j}}exports.useDateFieldValue=M;
|
|
@@ -32,6 +32,25 @@ export interface UseDateFieldValueReturn {
|
|
|
32
32
|
* the key to native (e.g. page scroll).
|
|
33
33
|
*/
|
|
34
34
|
adjustSegment: (type: SegmentType, amount: SegmentAdjustment) => boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Removes the last raw digit from the segment buffer (Backspace behaviour).
|
|
37
|
+
*
|
|
38
|
+
* Returns `{ wasEmpty: true }` when the buffer was already empty so the
|
|
39
|
+
* caller (keyboard handler) knows to move focus to the previous segment.
|
|
40
|
+
* Clears `replaceNextRef` for the segment so a digit typed immediately after
|
|
41
|
+
* appends rather than replaces.
|
|
42
|
+
*/
|
|
43
|
+
deleteLastDigit: (type: SegmentType) => {
|
|
44
|
+
wasEmpty: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Clears the entire segment buffer to `''` (Delete behaviour).
|
|
48
|
+
*
|
|
49
|
+
* Focus stays on the current segment. Fires `onChange(null)` via
|
|
50
|
+
* `emitIfChanged` when the cleared segment was part of a complete date.
|
|
51
|
+
* Clears `replaceNextRef` for the segment so the next digit appends.
|
|
52
|
+
*/
|
|
53
|
+
clearSegment: (type: SegmentType) => void;
|
|
35
54
|
beginSegmentEdit: (type: SegmentType) => void;
|
|
36
55
|
commitOnBlur: () => void;
|
|
37
56
|
}
|
|
@@ -1,78 +1,96 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { segmentTextFromValue as v, segmentNumber as
|
|
3
|
-
import { tryAppendDigit as
|
|
4
|
-
function
|
|
5
|
-
value:
|
|
6
|
-
defaultValue:
|
|
7
|
-
onChange:
|
|
1
|
+
import { useRef as o, useState as w, useEffect as b, useCallback as s } from "react";
|
|
2
|
+
import { segmentTextFromValue as v, segmentNumber as d, deriveValue as C, isSameDateValue as A, deriveValueFromText as M, getDaysInMonth as H, adjustSegmentValue as O, todayParts as P, normalizeSegmentText as T } from "./DateField.utils.es.js";
|
|
3
|
+
import { tryAppendDigit as W, SEGMENT_MAX_LENGTH as X } from "./DateField.validation.es.js";
|
|
4
|
+
function Q({
|
|
5
|
+
value: a,
|
|
6
|
+
defaultValue: N,
|
|
7
|
+
onChange: x
|
|
8
8
|
}) {
|
|
9
|
-
const
|
|
10
|
-
() => v(
|
|
11
|
-
), [
|
|
12
|
-
day:
|
|
13
|
-
month:
|
|
14
|
-
year:
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, [
|
|
21
|
-
if (!
|
|
22
|
-
|
|
23
|
-
const e = v(
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
const
|
|
27
|
-
var
|
|
28
|
-
const t =
|
|
29
|
-
|
|
30
|
-
}, []),
|
|
9
|
+
const E = o(a !== void 0), h = E.current, [i, S] = w(
|
|
10
|
+
() => v(h ? a ?? null : N ?? null)
|
|
11
|
+
), [F, V] = w(!1), c = o(i), m = o(/* @__PURE__ */ new Set()), l = o(!1), p = {
|
|
12
|
+
day: d("day", i.day),
|
|
13
|
+
month: d("month", i.month),
|
|
14
|
+
year: d("year", i.year)
|
|
15
|
+
}, D = C(p), y = o(D), R = o(
|
|
16
|
+
h ? a ?? null : null
|
|
17
|
+
), f = o(x);
|
|
18
|
+
b(() => {
|
|
19
|
+
f.current = x;
|
|
20
|
+
}, [x]), b(() => {
|
|
21
|
+
if (!E.current || l.current || A(a ?? null, R.current)) return;
|
|
22
|
+
R.current = a ?? null;
|
|
23
|
+
const e = v(a ?? null);
|
|
24
|
+
c.current = e, S(e), y.current = M(e);
|
|
25
|
+
}, [a]);
|
|
26
|
+
const g = s((e) => {
|
|
27
|
+
var r;
|
|
28
|
+
const t = M(e);
|
|
29
|
+
A(t, y.current) || (y.current = t, (r = f.current) == null || r.call(f, t));
|
|
30
|
+
}, []), u = s(
|
|
31
|
+
(e, t, { replace: r }) => {
|
|
32
|
+
const n = { ...c.current, [e]: t };
|
|
33
|
+
c.current = n, S(n), V(!0), g(n), r ? m.current.add(e) : m.current.delete(e);
|
|
34
|
+
},
|
|
35
|
+
[g]
|
|
36
|
+
), I = s(
|
|
31
37
|
(e, t) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const m = { ...r.current, [e]: o.newBuffer };
|
|
35
|
-
return r.current = m, f(m), T(!0), s(m), o.shouldAdvance ? l.current.add(e) : l.current.delete(e), { advanced: o.shouldAdvance, rejected: !1 };
|
|
38
|
+
const r = m.current.has(e) ? "" : c.current[e], n = W(e, r, t);
|
|
39
|
+
return n.rejected ? { advanced: !1, rejected: !0 } : (u(e, n.newBuffer, { replace: n.shouldAdvance }), { advanced: n.shouldAdvance, rejected: !1 });
|
|
36
40
|
},
|
|
37
|
-
[
|
|
38
|
-
),
|
|
41
|
+
[u]
|
|
42
|
+
), B = s(
|
|
39
43
|
(e, t) => {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
),
|
|
44
|
-
daysInMonth:
|
|
45
|
-
today:
|
|
44
|
+
const r = c.current, n = d(e, r[e]), z = H(
|
|
45
|
+
d("year", r.year),
|
|
46
|
+
d("month", r.month)
|
|
47
|
+
), j = O(e, n, t, {
|
|
48
|
+
daysInMonth: z,
|
|
49
|
+
today: P()
|
|
46
50
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
return j == null ? !1 : (l.current = !0, u(
|
|
52
|
+
e,
|
|
53
|
+
String(j).padStart(X[e], "0"),
|
|
54
|
+
{ replace: !0 }
|
|
55
|
+
), !0);
|
|
56
|
+
},
|
|
57
|
+
[u]
|
|
58
|
+
), G = s(
|
|
59
|
+
(e) => {
|
|
60
|
+
const t = c.current[e];
|
|
61
|
+
return t === "" ? { wasEmpty: !0 } : (l.current = !0, u(e, t.slice(0, -1), { replace: !1 }), { wasEmpty: !1 });
|
|
62
|
+
},
|
|
63
|
+
[u]
|
|
64
|
+
), L = s(
|
|
65
|
+
(e) => {
|
|
66
|
+
c.current[e] !== "" && (l.current = !0, u(e, "", { replace: !1 }));
|
|
51
67
|
},
|
|
52
|
-
[
|
|
53
|
-
),
|
|
54
|
-
|
|
55
|
-
}, []),
|
|
56
|
-
|
|
57
|
-
const e =
|
|
58
|
-
day:
|
|
59
|
-
month:
|
|
60
|
-
year:
|
|
68
|
+
[u]
|
|
69
|
+
), _ = s((e) => {
|
|
70
|
+
l.current = !0, m.current.add(e);
|
|
71
|
+
}, []), k = s(() => {
|
|
72
|
+
l.current = !1;
|
|
73
|
+
const e = c.current, t = {
|
|
74
|
+
day: T("day", e.day),
|
|
75
|
+
month: T("month", e.month),
|
|
76
|
+
year: T("year", e.year)
|
|
61
77
|
};
|
|
62
|
-
|
|
63
|
-
}, [
|
|
78
|
+
c.current = t, S(t), V(!0), g(t);
|
|
79
|
+
}, [g]);
|
|
64
80
|
return {
|
|
65
|
-
segmentText:
|
|
66
|
-
segmentValues:
|
|
67
|
-
currentValue:
|
|
68
|
-
isControlled:
|
|
69
|
-
wasTouched:
|
|
70
|
-
appendDigit:
|
|
71
|
-
adjustSegment:
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
segmentText: i,
|
|
82
|
+
segmentValues: p,
|
|
83
|
+
currentValue: D,
|
|
84
|
+
isControlled: h,
|
|
85
|
+
wasTouched: F,
|
|
86
|
+
appendDigit: I,
|
|
87
|
+
adjustSegment: B,
|
|
88
|
+
deleteLastDigit: G,
|
|
89
|
+
clearSegment: L,
|
|
90
|
+
beginSegmentEdit: _,
|
|
91
|
+
commitOnBlur: k
|
|
74
92
|
};
|
|
75
93
|
}
|
|
76
94
|
export {
|
|
77
|
-
|
|
95
|
+
Q as useDateFieldValue
|
|
78
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const e=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),i=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const e=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:m}=u.getBEMClassNames("panel"),t=({layout:n="end",children:o,className:a,...c})=>{const s=`${m}footer__actions`,r=i(e.styles[s],e.styles[`${s}--${n}`],a);return l.jsx("div",{className:r,...c,children:o})};t.displayName="Panel.Footer.Actions";exports.Actions=t;
|
|
@@ -6,7 +6,7 @@ export interface PanelFooterActionsProps extends ComponentPropsWithoutRef<'div'>
|
|
|
6
6
|
*/
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
/**
|
|
9
|
-
* Specify the
|
|
9
|
+
* Specify how the actions are arranged in the footer
|
|
10
10
|
* @default 'end'
|
|
11
11
|
*/
|
|
12
12
|
layout?: FooterActionLayout;
|
|
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import i from "clsx";
|
|
3
3
|
import { g as c } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { s as o } from "../../../../chunks/panel.module.
|
|
5
|
+
import { s as o } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
6
6
|
const { subElementClassPrefix: l } = c("panel"), p = ({
|
|
7
7
|
layout: t = "end",
|
|
8
8
|
children: a,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const C=require("../../../Divider/Divider.cjs.js"),P=require("../../../Box/Box.cjs.js"),m=require("../Panel.helpers.cjs.js"),q=require("../Panel.context.cjs.js"),v=require("./Panel.Footer.Actions.cjs.js"),g=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:p}=b.getBEMClassNames("panel"),D=`${p}footer`,o=({children:r,className:s,divider:t=!0,dividerColor:i,backgroundColor:n,...l})=>{const{backgroundColor:c,dividerColor:a}=q.usePanelContext(),_=i??a??m.DEFAULT_PANEL_DIVIDER_COLOR,u=n??c,d=x(g.styles[D],s);return e.jsxs(e.Fragment,{children:[t&&e.jsx(C.Divider,{borderColor:_}),e.jsx(P.Box,{as:"footer",className:d,backgroundColor:u,...l,children:r})]})};o.displayName="Panel.Footer";o.Actions=v.Actions;exports.Footer=o;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { g
|
|
1
|
+
import { jsxs as f, Fragment as C, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import x from "clsx";
|
|
3
|
+
import { g } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { Divider as
|
|
6
|
-
import { Box as
|
|
7
|
-
import { DEFAULT_PANEL_DIVIDER_COLOR as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
5
|
+
import { Divider as u } from "../../../Divider/Divider.es.js";
|
|
6
|
+
import { Box as v } from "../../../Box/Box.es.js";
|
|
7
|
+
import { DEFAULT_PANEL_DIVIDER_COLOR as D } from "../Panel.helpers.es.js";
|
|
8
|
+
import { usePanelContext as b } from "../Panel.context.es.js";
|
|
9
|
+
import { Actions as E } from "./Panel.Footer.Actions.es.js";
|
|
10
|
+
import { s as N } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
11
|
+
const { subElementClassPrefix: A } = g("panel"), B = `${A}footer`, r = ({
|
|
11
12
|
children: s,
|
|
12
13
|
className: t,
|
|
13
14
|
divider: e = !0,
|
|
14
|
-
dividerColor: m
|
|
15
|
-
backgroundColor:
|
|
16
|
-
...
|
|
15
|
+
dividerColor: m,
|
|
16
|
+
backgroundColor: i,
|
|
17
|
+
...l
|
|
17
18
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
e && /* @__PURE__ */ o(
|
|
19
|
+
const { backgroundColor: a, dividerColor: n } = b(), c = m ?? n ?? D, p = i ?? a, d = x(N[B], t);
|
|
20
|
+
return /* @__PURE__ */ f(C, { children: [
|
|
21
|
+
e && /* @__PURE__ */ o(u, { borderColor: c }),
|
|
21
22
|
/* @__PURE__ */ o(
|
|
22
|
-
|
|
23
|
+
v,
|
|
23
24
|
{
|
|
24
25
|
as: "footer",
|
|
25
|
-
className:
|
|
26
|
-
backgroundColor:
|
|
27
|
-
...
|
|
26
|
+
className: d,
|
|
27
|
+
backgroundColor: p,
|
|
28
|
+
...l,
|
|
28
29
|
children: s
|
|
29
30
|
}
|
|
30
31
|
)
|
|
31
32
|
] });
|
|
32
33
|
};
|
|
33
34
|
r.displayName = "Panel.Footer";
|
|
34
|
-
r.Actions =
|
|
35
|
+
r.Actions = E;
|
|
35
36
|
export {
|
|
36
37
|
r as Footer
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:i}=o.getBEMClassNames("panel"),u=`${i}header`,e=({children:s,className:t,...n})=>{const r=l(c.styles[`${u}__content-after`],t);return a.jsx("div",{className:r,...n,children:s})};e.displayName="Panel.Header.ContentAfter";exports.ContentAfter=e;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface PanelHeaderContentAfterProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
|
-
* Specify the content after the heading
|
|
4
|
+
* Specify the content shown after the heading
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { g as m } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { s as n } from "../../../../chunks/panel.module.
|
|
5
|
+
import { s as n } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
6
6
|
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:i}=l.getBEMClassNames("panel"),u=`${i}header`,e=({children:s,className:t,...n})=>{const r=a(c.styles[`${u}__content-before`],t);return o.jsx("div",{className:r,...n,children:s})};e.displayName="Panel.Header.ContentBefore";exports.ContentBefore=e;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface PanelHeaderContentBeforeProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
|
-
* Specify the content before the heading
|
|
4
|
+
* Specify the content shown before the heading
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import a from "clsx";
|
|
3
3
|
import { g as m } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { s as n } from "../../../../chunks/panel.module.
|
|
5
|
+
import { s as n } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
6
6
|
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
7
|
children: e,
|
|
8
8
|
className: s,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const l=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const l=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:o}=c.getBEMClassNames("panel"),u=`${o}header`,e=({children:s,className:r,...t})=>{const a=n(l.styles[`${u}__description`],r);return i.jsx("div",{className:a,...t,children:s})};e.displayName="Panel.Header.Description";exports.Description=e;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface PanelHeaderDescriptionProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
|
-
* Specify the description
|
|
4
|
+
* Specify the content for the header description
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "clsx";
|
|
3
3
|
import { g as i } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { s as m } from "../../../../chunks/panel.module.
|
|
5
|
+
import { s as m } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
6
6
|
const { subElementClassPrefix: l } = i("panel"), n = `${l}header`, p = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),o=require("react"),g=require("clsx"),m=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const q=require("../../../../chunks/FloatingUI.context.B15Tz_4h.js"),b=require("../Panel.context.cjs.js"),x=require("../../../../utils/hooks/useId.cjs.js"),I=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),o=require("react"),g=require("clsx"),m=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const q=require("../../../../chunks/FloatingUI.context.B15Tz_4h.js"),b=require("../Panel.context.cjs.js"),x=require("../../../../utils/hooks/useId.cjs.js"),I=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:y}=m.getBEMClassNames("panel"),P=`${y}header`,a=({children:r,className:i,id:c,...l})=>{const u=x.useId(),e=c??u,d=g(I.styles[`${P}__heading`],i),t=o.useContext(b.PanelContext),n=o.useContext(q.BmFloatingUIContext),s=(t==null?void 0:t.kind)==="overlay"?n==null?void 0:n.setLabelId:void 0;return o.useLayoutEffect(()=>{if(!(!s||!e))return s(e),()=>s(void 0)},[e,s]),_.jsx("div",{id:e,className:d,...l,children:r})};a.displayName="Panel.Header.Heading";exports.Heading=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export interface PanelHeaderHeadingProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
3
|
/**
|
|
4
|
-
* Specify the heading
|
|
4
|
+
* Specify the content for the heading
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
}
|
|
@@ -6,7 +6,7 @@ import "../../../../chunks/constants.Cruz2A1w.js";
|
|
|
6
6
|
import { B as g } from "../../../../chunks/FloatingUI.context.Dl4Y1y1z.js";
|
|
7
7
|
import { PanelContext as x } from "../Panel.context.es.js";
|
|
8
8
|
import { useId as I } from "../../../../utils/hooks/useId.es.js";
|
|
9
|
-
import { s as b } from "../../../../chunks/panel.module.
|
|
9
|
+
import { s as b } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
10
10
|
const { subElementClassPrefix: v } = u("panel"), y = `${v}header`, C = ({
|
|
11
11
|
children: a,
|
|
12
12
|
className: m,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const m=require("../../../CloseButton/CloseButton.cjs.js"),_=require("../../../Tooltip/Tooltip.cjs.js"),p=require("../Panel.context.cjs.js"),t=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const m=require("../../../CloseButton/CloseButton.cjs.js"),_=require("../../../Tooltip/Tooltip.cjs.js"),p=require("../Panel.context.cjs.js"),t=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:x}=b.getBEMClassNames("panel"),l=`${x}header`,o=({children:n,className:r,...a})=>{const{dismissible:i,closeButtonAriaLabel:s,requestClose:c}=p.usePanelContext(),u=d(t.styles[`${l}__row`],r);return e.jsxs("div",{className:u,...a,children:[n,i&&e.jsx("div",{className:t.styles[`${l}__close-button`],children:e.jsx(_.Tooltip,{text:s,placement:"bottom",portalled:!0,role:{enabled:!1},children:e.jsx(m.CloseButton,{"aria-label":s,onClick:()=>c("closeButton"),size:"lg"})})})]})};o.displayName="Panel.Header.Row";exports.Row=o;
|
|
@@ -5,7 +5,7 @@ import "../../../../chunks/constants.Cruz2A1w.js";
|
|
|
5
5
|
import { CloseButton as f } from "../../../CloseButton/CloseButton.es.js";
|
|
6
6
|
import { Tooltip as u } from "../../../Tooltip/Tooltip.es.js";
|
|
7
7
|
import { usePanelContext as b } from "../Panel.context.es.js";
|
|
8
|
-
import { s as o } from "../../../../chunks/panel.module.
|
|
8
|
+
import { s as o } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
9
9
|
const { subElementClassPrefix: x } = d("panel"), t = `${x}header`, C = ({
|
|
10
10
|
children: l,
|
|
11
11
|
className: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const c=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:o}=u.getBEMClassNames("panel"),i=`${o}header`,e=({children:s,className:a,...r})=>{const t=n(c.styles[`${i}__subheader`],a);return l.jsx("div",{className:t,...r,children:s})};e.displayName="Panel.Header.Subheader";exports.Subheader=e;
|
|
@@ -2,7 +2,7 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import o from "clsx";
|
|
3
3
|
import { g as t } from "../../../../chunks/classNames.ZWNk1hey.js";
|
|
4
4
|
import "../../../../chunks/constants.Cruz2A1w.js";
|
|
5
|
-
import { s as l } from "../../../../chunks/panel.module.
|
|
5
|
+
import { s as l } from "../../../../chunks/panel.module.CgFBtvbR.js";
|
|
6
6
|
const { subElementClassPrefix: i } = t("panel"), n = `${i}header`, p = ({
|
|
7
7
|
children: s,
|
|
8
8
|
className: e,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),P=require("clsx"),b=require("../../../../chunks/classNames.DC8Ra4sw.js");require("../../../../chunks/constants.CgMu0_1M.js");const H=require("../../../Divider/Divider.cjs.js"),C=require("../../../Box/Box.cjs.js"),p=require("../Panel.helpers.cjs.js"),q=require("../Panel.context.cjs.js"),x=require("./Panel.Header.Row.cjs.js"),g=require("./Panel.Header.ContentBefore.cjs.js"),w=require("./Panel.Header.Heading.cjs.js"),D=require("./Panel.Header.ContentAfter.cjs.js"),m=require("./Panel.Header.Description.cjs.js"),v=require("./Panel.Header.Subheader.cjs.js"),B=require("../../../../chunks/panel.module.BzLGa7GY.js"),{subElementClassPrefix:f}=b.getBEMClassNames("panel"),h=`${f}header`,e=({children:n,className:o,divider:a=!0,dividerColor:i,backgroundColor:t,...s})=>{const{backgroundColor:l,dividerColor:_}=q.usePanelContext(),d=i??_??p.DEFAULT_PANEL_DIVIDER_COLOR,c=t??l,u=P(B.styles[h],o);return r.jsxs(r.Fragment,{children:[r.jsx(C.Box,{as:"header",className:u,backgroundColor:c,...s,children:n}),a&&r.jsx(H.Divider,{borderColor:d})]})};e.displayName="Panel.Header";e.Row=x.Row;e.ContentBefore=g.ContentBefore;e.Heading=w.Heading;e.Description=m.Description;e.ContentAfter=D.ContentAfter;e.Subheader=v.Subheader;exports.Header=e;
|
|
@@ -7,7 +7,7 @@ export interface PanelHeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
|
7
7
|
*/
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Specify whether to show a divider below the header
|
|
11
11
|
* @default true
|
|
12
12
|
*/
|
|
13
13
|
divider?: boolean;
|