@viasat/beam-react 2.2.1 → 2.9.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/ActionList.css +1 -1
- package/assets/Checkbox.css +1 -1
- package/assets/RadioButton.css +1 -1
- package/assets/Search.Results.css +1 -0
- package/assets/card.css +1 -1
- package/assets/panel.css +1 -0
- package/chunks/ActionList.Group.B4PX5SKS.js +111 -0
- package/chunks/ActionList.Group.C2R56u2A.js +1 -0
- package/chunks/ActionList.Item.5Y-SwzjK.js +1 -0
- package/chunks/{ActionList.Item.Dg_KHGsm.js → ActionList.Item.BFcT86lS.js} +3 -2
- package/chunks/Search.Results.Item.CLmMBPz1.js +41 -0
- package/chunks/Search.Results.Item.Dkh2yo4p.js +1 -0
- package/chunks/card.module.8KnCe1uR.js +1 -0
- package/chunks/{card.module.Dy87qmTH.js → card.module.ByBYpexJ.js} +12 -6
- package/chunks/dom.DGM-dxLe.js +21 -0
- package/chunks/dom.zgzOBFUw.js +1 -0
- package/chunks/{form.context.B1PXIJNq.js → form.context.B26th8Od.js} +1 -1
- package/chunks/{form.context.CNWjF5qA.js → form.context.CfsTSQpm.js} +1 -1
- package/chunks/panel.module.BVm3KvDs.js +40 -0
- package/chunks/panel.module.BX1x4FlX.js +1 -0
- package/chunks/tokens.BD_71qmL.js +19 -0
- package/chunks/tokens.Bc11gmpN.js +1 -0
- package/index.cjs.js +1 -1
- package/index.es.js +17 -15
- package/lib/ActionList/ActionList.Group.cjs.js +1 -1
- package/lib/ActionList/ActionList.Group.d.ts +7 -4
- package/lib/ActionList/ActionList.Group.es.js +2 -2
- package/lib/ActionList/ActionList.IconButton.cjs.js +1 -1
- package/lib/ActionList/ActionList.IconButton.es.js +1 -1
- package/lib/ActionList/ActionList.Item.cjs.js +1 -1
- package/lib/ActionList/ActionList.Item.es.js +3 -3
- package/lib/ActionList/ActionList.cjs.js +1 -1
- package/lib/ActionList/ActionList.d.ts +1 -1
- package/lib/ActionList/ActionList.es.js +54 -54
- package/lib/ActionList/useActionListChildren.cjs.js +1 -1
- package/lib/ActionList/useActionListChildren.es.js +2 -2
- package/lib/Autocomplete/Autocomplete.cjs.js +1 -1
- package/lib/Autocomplete/Autocomplete.es.js +1 -1
- package/lib/Autocomplete/AutocompleteDropdown.cjs.js +1 -1
- package/lib/Autocomplete/AutocompleteDropdown.es.js +1 -1
- package/lib/Autocomplete/useAutocompleteA11y.cjs.js +1 -1
- package/lib/Autocomplete/useAutocompleteA11y.es.js +1 -1
- package/lib/Autocomplete/useAutocompleteDropdown.cjs.js +1 -1
- package/lib/Autocomplete/useAutocompleteDropdown.es.js +1 -1
- package/lib/Box/utils.cjs.js +1 -0
- package/lib/Box/utils.d.ts +6 -0
- package/lib/Box/utils.es.js +12 -0
- package/lib/Button/Button.cjs.js +1 -1
- package/lib/Button/Button.es.js +1 -1
- package/lib/Card/Card.Body.cjs.js +1 -1
- package/lib/Card/Card.Body.es.js +1 -1
- package/lib/Card/Card.Content.cjs.js +1 -1
- package/lib/Card/Card.Content.es.js +12 -17
- package/lib/Card/Card.Footer.cjs.js +1 -1
- package/lib/Card/Card.Footer.d.ts +1 -1
- package/lib/Card/Card.Footer.es.js +1 -1
- package/lib/Card/Card.Header.cjs.js +1 -1
- package/lib/Card/Card.Header.es.js +1 -1
- package/lib/Card/Card.Media.cjs.js +1 -1
- package/lib/Card/Card.Media.es.js +1 -1
- package/lib/Card/Card.cjs.js +1 -1
- package/lib/Card/Card.d.ts +61 -18
- package/lib/Card/Card.es.js +181 -82
- package/lib/Card/CardContext.cjs.js +1 -1
- package/lib/Card/CardContext.d.ts +10 -8
- package/lib/Card/CardContext.es.js +7 -12
- package/lib/Card/CardGroup.cjs.js +1 -0
- package/lib/Card/CardGroup.d.ts +55 -0
- package/lib/Card/CardGroup.es.js +67 -0
- package/lib/Card/card.utils.cjs.js +1 -0
- package/lib/Card/card.utils.d.ts +7 -0
- package/lib/Card/card.utils.es.js +14 -0
- package/lib/Card/index.cjs.js +1 -1
- package/lib/Card/index.d.ts +9 -1
- package/lib/Card/index.es.js +4 -2
- package/lib/Card/useCardGroup.cjs.js +1 -0
- package/lib/Card/useCardGroup.d.ts +27 -0
- package/lib/Card/useCardGroup.es.js +42 -0
- package/lib/Card/useCardGroupValue.cjs.js +1 -0
- package/lib/Card/useCardGroupValue.d.ts +14 -0
- package/lib/Card/useCardGroupValue.es.js +29 -0
- package/lib/Checkbox/Checkbox.cjs.js +1 -1
- package/lib/Checkbox/Checkbox.es.js +1 -1
- package/lib/Dialog/Dialog.Trigger.cjs.js +1 -1
- package/lib/Dialog/Dialog.Trigger.es.js +7 -6
- package/lib/EmptyState/EmptyState.cjs.js +1 -1
- package/lib/EmptyState/EmptyState.es.js +1 -1
- package/lib/FileUpload/FileUpload.List.Item.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.List.Item.es.js +20 -20
- package/lib/FileUpload/FileUpload.cjs.js +1 -1
- package/lib/FileUpload/FileUpload.es.js +1 -1
- package/lib/FloatingUI/index.cjs.js +1 -1
- package/lib/FloatingUI/index.d.ts +1 -0
- package/lib/FloatingUI/index.es.js +7 -5
- package/lib/FloatingUI/useBlur.cjs.js +1 -0
- package/lib/FloatingUI/useBlur.d.ts +8 -0
- package/lib/FloatingUI/useBlur.es.js +15 -0
- package/lib/FloatingUI/useTyping.cjs.js +1 -0
- package/lib/FloatingUI/useTyping.d.ts +10 -0
- package/lib/FloatingUI/useTyping.es.js +42 -0
- package/lib/Form/Form.cjs.js +1 -1
- package/lib/Form/Form.es.js +1 -1
- package/lib/Form/contexts/form.context.cjs.js +1 -1
- package/lib/Form/contexts/form.context.es.js +1 -1
- package/lib/Form/contexts/index.cjs.js +1 -1
- package/lib/Form/contexts/index.es.js +1 -1
- package/lib/Form/hooks/index.cjs.js +1 -1
- package/lib/Form/hooks/index.es.js +1 -1
- package/lib/Form/hooks/useFieldValidator.hook.cjs.js +1 -1
- package/lib/Form/hooks/useFieldValidator.hook.es.js +2 -2
- package/lib/HelperText/HelperText.cjs.js +1 -1
- package/lib/HelperText/HelperText.es.js +1 -1
- package/lib/HelperText/index.cjs.js +1 -1
- package/lib/HelperText/index.es.js +1 -1
- package/lib/InputChoiceGroup/InputChoiceGroup.cjs.js +1 -1
- package/lib/InputChoiceGroup/InputChoiceGroup.es.js +1 -1
- package/lib/Label/Label.cjs.js +1 -1
- package/lib/Label/Label.es.js +1 -1
- package/lib/Link/Link.cjs.js +1 -1
- package/lib/Link/Link.es.js +6 -6
- package/lib/NativeSelect/NativeSelect.cjs.js +1 -1
- package/lib/NativeSelect/NativeSelect.es.js +1 -1
- package/lib/Popover/Popover.cjs.js +1 -1
- package/lib/Popover/Popover.es.js +1 -1
- package/lib/Popover/Popover.trigger.cjs.js +1 -1
- package/lib/Popover/Popover.trigger.es.js +7 -6
- package/lib/Popover/Popover.utils.cjs.js +1 -1
- package/lib/Popover/Popover.utils.es.js +1 -1
- package/lib/ProgressBar/ProgressBar.cjs.js +1 -1
- package/lib/ProgressBar/ProgressBar.es.js +1 -1
- package/lib/RadioButton/RadioButton.cjs.js +1 -1
- package/lib/RadioButton/RadioButton.es.js +1 -1
- package/lib/Select/Select.cjs.js +1 -1
- package/lib/Select/Select.es.js +1 -1
- package/lib/Select/SelectDropdown.cjs.js +1 -1
- package/lib/Select/SelectDropdown.es.js +1 -1
- package/lib/Select/useSelectA11y.cjs.js +1 -1
- package/lib/Select/useSelectA11y.es.js +1 -1
- package/lib/SideNav/SideNavActionListGroup.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListGroup.es.js +1 -1
- package/lib/SideNav/SideNavActionListItem.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItem.es.js +1 -1
- package/lib/SideNav/SideNavActionListItemExpandable.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItemExpandable.es.js +1 -1
- package/lib/SideNav/SideNavActionListItemFlyout.cjs.js +1 -1
- package/lib/SideNav/SideNavActionListItemFlyout.es.js +1 -1
- package/lib/Slider/DualSlider.cjs.js +1 -1
- package/lib/Slider/DualSlider.d.ts +1 -1
- package/lib/Slider/DualSlider.es.js +73 -72
- package/lib/Slider/SingleSlider.cjs.js +1 -1
- package/lib/Slider/SingleSlider.d.ts +1 -1
- package/lib/Slider/SingleSlider.es.js +52 -51
- package/lib/Slider/Slider.Error.cjs.js +1 -1
- package/lib/Slider/Slider.Error.es.js +1 -1
- package/lib/Slider/Slider.Thumb.cjs.js +1 -1
- package/lib/Slider/Slider.Thumb.es.js +1 -1
- package/lib/Slider/Slider.cjs.js +1 -1
- package/lib/Slider/Slider.d.ts +1 -3
- package/lib/Slider/Slider.es.js +13 -11
- package/lib/Slider/Slider.types.d.ts +1 -1
- package/lib/Slider/hooks/useSliderBase.cjs.js +1 -1
- package/lib/Slider/hooks/useSliderBase.es.js +1 -1
- package/lib/Switch/Switch.cjs.js +1 -1
- package/lib/Switch/Switch.es.js +1 -1
- package/lib/Tabs/Tabs.Group.cjs.js +1 -1
- package/lib/Tabs/Tabs.Group.es.js +1 -1
- package/lib/TextArea/TextArea.cjs.js +1 -1
- package/lib/TextArea/TextArea.es.js +1 -1
- package/lib/TextField/TextField.cjs.js +1 -1
- package/lib/TextField/TextField.es.js +1 -1
- package/lib/Tooltip/Tooltip.cjs.js +1 -1
- package/lib/Tooltip/Tooltip.es.js +9 -9
- package/lib/_Options/useSelectValue.cjs.js +1 -1
- package/lib/_Options/useSelectValue.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +18 -16
- package/lib/wip/Panel/Panel.Body.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Body.d.ts +11 -0
- package/lib/wip/Panel/Panel.Body.es.js +17 -0
- package/lib/wip/Panel/Panel.Footer.Actions.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Footer.Actions.d.ts +17 -0
- package/lib/wip/Panel/Panel.Footer.Actions.es.js +22 -0
- package/lib/wip/Panel/Panel.Footer.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Footer.d.ts +20 -0
- package/lib/wip/Panel/Panel.Footer.es.js +24 -0
- package/lib/wip/Panel/Panel.Header.ContentAfter.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.ContentAfter.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.ContentAfter.es.js +17 -0
- package/lib/wip/Panel/Panel.Header.ContentBefore.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.ContentBefore.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.ContentBefore.es.js +17 -0
- package/lib/wip/Panel/Panel.Header.Description.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.Description.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.Description.es.js +17 -0
- package/lib/wip/Panel/Panel.Header.Heading.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.Heading.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.Heading.es.js +17 -0
- package/lib/wip/Panel/Panel.Header.Row.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.Row.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.Row.es.js +29 -0
- package/lib/wip/Panel/Panel.Header.Subheader.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.Subheader.d.ts +11 -0
- package/lib/wip/Panel/Panel.Header.Subheader.es.js +17 -0
- package/lib/wip/Panel/Panel.Header.cjs.js +1 -0
- package/lib/wip/Panel/Panel.Header.d.ts +40 -0
- package/lib/wip/Panel/Panel.Header.es.js +34 -0
- package/lib/wip/Panel/Panel.cjs.js +1 -0
- package/lib/wip/Panel/Panel.context.cjs.js +1 -0
- package/lib/wip/Panel/Panel.context.d.ts +21 -0
- package/lib/wip/Panel/Panel.context.es.js +11 -0
- package/lib/wip/Panel/Panel.d.ts +45 -0
- package/lib/wip/Panel/Panel.es.js +117 -0
- package/lib/wip/Panel/Panel.helpers.cjs.js +1 -0
- package/lib/wip/Panel/Panel.helpers.d.ts +13 -0
- package/lib/wip/Panel/Panel.helpers.es.js +40 -0
- package/lib/wip/Panel/Panel.types.cjs.js +1 -0
- package/lib/wip/Panel/Panel.types.d.ts +76 -0
- package/lib/wip/Panel/Panel.types.es.js +1 -0
- package/lib/wip/Panel/index.cjs.js +1 -0
- package/lib/wip/Panel/index.d.ts +12 -0
- package/lib/wip/Panel/index.es.js +4 -0
- package/lib/wip/Search/Search.Results.Item.cjs.js +1 -0
- package/lib/wip/Search/Search.Results.Item.d.ts +8 -0
- package/lib/wip/Search/Search.Results.Item.es.js +12 -0
- package/lib/wip/Search/Search.Results.cjs.js +1 -0
- package/lib/wip/Search/Search.Results.d.ts +12 -0
- package/lib/wip/Search/Search.Results.es.js +19 -0
- package/lib/wip/Search/Search.cjs.js +1 -0
- package/lib/wip/Search/Search.d.ts +88 -0
- package/lib/wip/Search/Search.es.js +157 -0
- package/lib/wip/Search/SearchDropdown.cjs.js +1 -0
- package/lib/wip/Search/SearchDropdown.d.ts +19 -0
- package/lib/wip/Search/SearchDropdown.es.js +71 -0
- package/lib/wip/Search/index.cjs.js +1 -0
- package/lib/wip/Search/index.d.ts +1 -0
- package/lib/wip/Search/index.es.js +4 -0
- package/lib/wip/Search/useSearchDropdown.cjs.js +1 -0
- package/lib/wip/Search/useSearchDropdown.d.ts +875 -0
- package/lib/wip/Search/useSearchDropdown.es.js +92 -0
- package/lib/wip/index.cjs.js +1 -1
- package/lib/wip/index.d.ts +2 -0
- package/lib/wip/index.es.js +6 -1
- package/package.json +6 -6
- package/utils/hooks/index.cjs.js +1 -1
- package/utils/hooks/index.d.ts +1 -0
- package/utils/hooks/index.es.js +33 -31
- package/utils/hooks/useDebounced.cjs.js +1 -0
- package/utils/hooks/useDebounced.d.ts +5 -0
- package/utils/hooks/useDebounced.es.js +18 -0
- package/utils/hooks/useEffectAfterMount.cjs.js +1 -0
- package/utils/hooks/useEffectAfterMount.d.ts +2 -0
- package/utils/hooks/useEffectAfterMount.es.js +14 -0
- package/utils/hooks/useInteractiveProps.cjs.js +1 -0
- package/utils/hooks/useInteractiveProps.d.ts +24 -0
- package/utils/hooks/useInteractiveProps.es.js +31 -0
- package/chunks/ActionList.Group.Bv9vgU22.js +0 -1
- package/chunks/ActionList.Group.DuNxYNZQ.js +0 -107
- package/chunks/ActionList.Item.D7Rg5iMb.js +0 -1
- package/chunks/card.module.BG9mkRao.js +0 -1
- package/chunks/dom.CVmkHCnh.js +0 -21
- package/chunks/dom.PCrm8EUc.js +0 -1
- package/chunks/tokens.Bgac_JPh.js +0 -1
- package/chunks/tokens.CXaNS8Cf.js +0 -13
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "clsx";
|
|
3
|
+
import { g as c } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { Divider as p } from "../../Divider/Divider.es.js";
|
|
6
|
+
import { Actions as f } from "./Panel.Footer.Actions.es.js";
|
|
7
|
+
import { s as x } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
8
|
+
const { subElementClassPrefix: d } = c("panel"), C = `${d}footer`, s = ({
|
|
9
|
+
children: r,
|
|
10
|
+
className: t,
|
|
11
|
+
divider: e = !0,
|
|
12
|
+
...m
|
|
13
|
+
}) => {
|
|
14
|
+
const a = n(x[C], t);
|
|
15
|
+
return /* @__PURE__ */ i(l, { children: [
|
|
16
|
+
e && /* @__PURE__ */ o(p, { borderColor: "01" }),
|
|
17
|
+
/* @__PURE__ */ o("footer", { className: a, ...m, children: r })
|
|
18
|
+
] });
|
|
19
|
+
};
|
|
20
|
+
s.displayName = "Panel.Footer";
|
|
21
|
+
s.Actions = f;
|
|
22
|
+
export {
|
|
23
|
+
s as Footer
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.BX1x4FlX.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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderContentAfterProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the content after the heading
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const ContentAfter: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderContentAfterProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import o from "clsx";
|
|
3
|
+
import { g as m } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { s as n } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
6
|
+
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
|
+
children: s,
|
|
8
|
+
className: e,
|
|
9
|
+
...t
|
|
10
|
+
}) => {
|
|
11
|
+
const a = o(n[`${c}__content-after`], e);
|
|
12
|
+
return /* @__PURE__ */ r("div", { className: a, ...t, children: s });
|
|
13
|
+
};
|
|
14
|
+
f.displayName = "Panel.Header.ContentAfter";
|
|
15
|
+
export {
|
|
16
|
+
f as ContentAfter
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),a=require("clsx"),l=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.BX1x4FlX.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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderContentBeforeProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the content before the heading
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const ContentBefore: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderContentBeforeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import a from "clsx";
|
|
3
|
+
import { g as m } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { s as n } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
6
|
+
const { subElementClassPrefix: l } = m("panel"), c = `${l}header`, f = ({
|
|
7
|
+
children: e,
|
|
8
|
+
className: s,
|
|
9
|
+
...o
|
|
10
|
+
}) => {
|
|
11
|
+
const t = a(n[`${c}__content-before`], s);
|
|
12
|
+
return /* @__PURE__ */ r("div", { className: t, ...o, children: e });
|
|
13
|
+
};
|
|
14
|
+
f.displayName = "Panel.Header.ContentBefore";
|
|
15
|
+
export {
|
|
16
|
+
f as ContentBefore
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),n=require("clsx"),c=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const l=require("../../../chunks/panel.module.BX1x4FlX.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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderDescriptionProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the description content
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Description: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { g as i } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { s as m } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
6
|
+
const { subElementClassPrefix: l } = i("panel"), n = `${l}header`, p = ({
|
|
7
|
+
children: s,
|
|
8
|
+
className: e,
|
|
9
|
+
...r
|
|
10
|
+
}) => {
|
|
11
|
+
const a = t(m[`${n}__description`], e);
|
|
12
|
+
return /* @__PURE__ */ o("div", { className: a, ...r, children: s });
|
|
13
|
+
};
|
|
14
|
+
p.displayName = "Panel.Header.Description";
|
|
15
|
+
export {
|
|
16
|
+
p as Description
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("clsx"),i=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.BX1x4FlX.js"),{subElementClassPrefix:o}=i.getBEMClassNames("panel"),u=`${o}header`,e=({children:s,className:a,...n})=>{const r=l(c.styles[`${u}__heading`],a);return t.jsx("div",{className:r,...n,children:s})};e.displayName="Panel.Header.Heading";exports.Heading=e;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderHeadingProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the heading content
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Heading: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import o from "clsx";
|
|
3
|
+
import { g as t } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { s as i } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
6
|
+
const { subElementClassPrefix: l } = t("panel"), n = `${l}header`, p = ({
|
|
7
|
+
children: s,
|
|
8
|
+
className: e,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const r = o(i[`${n}__heading`], e);
|
|
12
|
+
return /* @__PURE__ */ m("div", { className: r, ...a, children: s });
|
|
13
|
+
};
|
|
14
|
+
p.displayName = "Panel.Header.Heading";
|
|
15
|
+
export {
|
|
16
|
+
p as Heading
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),d=require("clsx"),m=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const _=require("../../CloseButton/CloseButton.cjs.js"),b=require("./Panel.context.cjs.js"),l=require("../../../chunks/panel.module.BX1x4FlX.js"),{subElementClassPrefix:x}=m.getBEMClassNames("panel"),t=`${x}header`,o=({children:a,className:n,...r})=>{const{dismissible:i,closeButtonAriaLabel:c,onOpenChange:e}=b.usePanelContext(),u=d(l.styles[`${t}__row`],n);return s.jsxs("div",{className:u,...r,children:[a,i&&s.jsx("div",{className:l.styles[`${t}__close-button`],children:s.jsx(_.CloseButton,{"aria-label":c,onClick:()=>e==null?void 0:e(!1),size:"lg"})})]})};o.displayName="Panel.Header.Row";exports.Row=o;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderRowProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the content for the header row
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Row: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderRowProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p from "clsx";
|
|
3
|
+
import { g as d } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { CloseButton as f } from "../../CloseButton/CloseButton.es.js";
|
|
6
|
+
import { usePanelContext as b } from "./Panel.context.es.js";
|
|
7
|
+
import { s as o } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
8
|
+
const { subElementClassPrefix: u } = d("panel"), a = `${u}header`, x = ({
|
|
9
|
+
children: l,
|
|
10
|
+
className: t,
|
|
11
|
+
...r
|
|
12
|
+
}) => {
|
|
13
|
+
const { dismissible: i, closeButtonAriaLabel: m, onOpenChange: s } = b(), c = p(o[`${a}__row`], t);
|
|
14
|
+
return /* @__PURE__ */ n("div", { className: c, ...r, children: [
|
|
15
|
+
l,
|
|
16
|
+
i && /* @__PURE__ */ e("div", { className: o[`${a}__close-button`], children: /* @__PURE__ */ e(
|
|
17
|
+
f,
|
|
18
|
+
{
|
|
19
|
+
"aria-label": m,
|
|
20
|
+
onClick: () => s == null ? void 0 : s(!1),
|
|
21
|
+
size: "lg"
|
|
22
|
+
}
|
|
23
|
+
) })
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
x.displayName = "Panel.Header.Row";
|
|
27
|
+
export {
|
|
28
|
+
x as Row
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),n=require("clsx"),u=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const c=require("../../../chunks/panel.module.BX1x4FlX.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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderSubheaderProps extends ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the subheader content
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const Subheader: {
|
|
9
|
+
({ children, className: _className, ...props }: PanelHeaderSubheaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import o from "clsx";
|
|
3
|
+
import { g as t } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { s as l } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
6
|
+
const { subElementClassPrefix: i } = t("panel"), n = `${i}header`, p = ({
|
|
7
|
+
children: s,
|
|
8
|
+
className: e,
|
|
9
|
+
...a
|
|
10
|
+
}) => {
|
|
11
|
+
const r = o(l[`${n}__subheader`], e);
|
|
12
|
+
return /* @__PURE__ */ m("div", { className: r, ...a, children: s });
|
|
13
|
+
};
|
|
14
|
+
p.displayName = "Panel.Header.Subheader";
|
|
15
|
+
export {
|
|
16
|
+
p as Subheader
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("clsx"),o=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const _=require("../../Divider/Divider.cjs.js"),d=require("./Panel.Header.Row.cjs.js"),c=require("./Panel.Header.ContentBefore.cjs.js"),u=require("./Panel.Header.Heading.cjs.js"),b=require("./Panel.Header.ContentAfter.cjs.js"),P=require("./Panel.Header.Description.cjs.js"),p=require("./Panel.Header.Subheader.cjs.js"),q=require("../../../chunks/panel.module.BX1x4FlX.js"),{subElementClassPrefix:H}=o.getBEMClassNames("panel"),m=`${H}header`,e=({children:n,className:a,divider:i=!0,...t})=>{const s=l(q.styles[m],a);return r.jsxs(r.Fragment,{children:[r.jsx("header",{className:s,...t,children:n}),i&&r.jsx(_.Divider,{borderColor:"01"})]})};e.displayName="Panel.Header";e.Row=d.Row;e.ContentBefore=c.ContentBefore;e.Heading=u.Heading;e.Description=P.Description;e.ContentAfter=b.ContentAfter;e.Subheader=p.Subheader;exports.Header=e;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PanelHeaderProps extends ComponentPropsWithoutRef<'header'> {
|
|
3
|
+
/**
|
|
4
|
+
* Specify the content for the panel header
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Whether to show a divider after the header
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
divider?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Header: {
|
|
14
|
+
({ children, className: _className, divider, ...props }: PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
Row: {
|
|
17
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Row').PanelHeaderRowProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
ContentBefore: {
|
|
21
|
+
({ children, className: _className, ...props }: import('./Panel.Header.ContentBefore').PanelHeaderContentBeforeProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
Heading: {
|
|
25
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
Description: {
|
|
29
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Description').PanelHeaderDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
ContentAfter: {
|
|
33
|
+
({ children, className: _className, ...props }: import('./Panel.Header.ContentAfter').PanelHeaderContentAfterProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
Subheader: {
|
|
37
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Subheader').PanelHeaderSubheaderProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as i, Fragment as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p from "clsx";
|
|
3
|
+
import { g as f } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { Divider as l } from "../../Divider/Divider.es.js";
|
|
6
|
+
import { Row as d } from "./Panel.Header.Row.es.js";
|
|
7
|
+
import { ContentBefore as c } from "./Panel.Header.ContentBefore.es.js";
|
|
8
|
+
import { Heading as C } from "./Panel.Header.Heading.es.js";
|
|
9
|
+
import { ContentAfter as b } from "./Panel.Header.ContentAfter.es.js";
|
|
10
|
+
import { Description as g } from "./Panel.Header.Description.es.js";
|
|
11
|
+
import { Subheader as h } from "./Panel.Header.Subheader.es.js";
|
|
12
|
+
import { s as u } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
13
|
+
const { subElementClassPrefix: x } = f("panel"), H = `${x}header`, r = ({
|
|
14
|
+
children: o,
|
|
15
|
+
className: t,
|
|
16
|
+
divider: m = !0,
|
|
17
|
+
...s
|
|
18
|
+
}) => {
|
|
19
|
+
const a = p(u[H], t);
|
|
20
|
+
return /* @__PURE__ */ i(n, { children: [
|
|
21
|
+
/* @__PURE__ */ e("header", { className: a, ...s, children: o }),
|
|
22
|
+
m && /* @__PURE__ */ e(l, { borderColor: "01" })
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
25
|
+
r.displayName = "Panel.Header";
|
|
26
|
+
r.Row = d;
|
|
27
|
+
r.ContentBefore = c;
|
|
28
|
+
r.Heading = C;
|
|
29
|
+
r.Description = g;
|
|
30
|
+
r.ContentAfter = b;
|
|
31
|
+
r.Subheader = h;
|
|
32
|
+
export {
|
|
33
|
+
r as Header
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("clsx"),S=require("../../../chunks/classNames.DAeKwerT.js");require("../../../chunks/constants.hwjHOsvT.js");const $=require("./Panel.context.cjs.js"),R=require("./Panel.Header.cjs.js"),U=require("./Panel.Body.cjs.js"),B=require("./Panel.Footer.cjs.js"),r=require("./Panel.helpers.cjs.js"),T=require("../../FloatingUI/FloatingUI.root.cjs.js"),A=require("../../FloatingUI/FloatingUI.content.cjs.js"),H=require("../../Divider/Divider.cjs.js"),s=require("../../../chunks/panel.module.BX1x4FlX.js"),{baseClassNamePrefix:t}=S.getBEMClassNames("panel"),a=({position:l,className:d})=>e.jsx(H.Divider,{borderColor:"01",orientation:l==="bottom"?"horizontal":"vertical",className:d}),n=({children:l,className:d,padding:q="md",onOpenChange:v,open:p,size:c,dismissible:g=!0,closeButtonAriaLabel:I="Close panel",kind:o="inline",position:P,divider:f=!0,isAnimated:y=!0,...x})=>{const i=r.getResolvedPanelPosition(P),m=u(s.styles[t],s.styles[`${t}--${o}`],c&&s.styles[`${t}--size-${c}`],s.styles[`${t}--padding-${q}`],s.styles[`${t}--position-${i}`],d),w=u(s.styles[`${t}__inline-wrapper`],c==="full"&&s.styles[`${t}__inline-wrapper--full`]),b={dismissible:g,closeButtonAriaLabel:I,onOpenChange:v,position:P},{inlineStatus:C,isInlineVisible:N}=r.useInlineTransition(o==="inline"?p:void 0,y),{showDivider:j,dividerBefore:D,dividerAfter:F}=r.getPanelDividerState(f,i),h=o==="overlay"?u(s.styles[`${t}__overlay-divider`],s.styles[`${t}__overlay-divider--${i}`]):void 0,_=j&&N;return o==="inline"?N?e.jsxs($.PanelContext.Provider,{value:b,children:[D&&_&&e.jsx(a,{position:i}),e.jsx("div",{className:w,"data-position":i,"data-status":C,children:e.jsxs("div",{className:s.styles[`${t}__inline-wrapper-content`],children:[i==="bottom"&&_&&e.jsx(a,{position:i}),e.jsx("aside",{className:m,...x,children:l})]})}),F&&_&&e.jsx(a,{position:i})]}):null:e.jsx($.PanelContext.Provider,{value:b,children:e.jsx(T.FloatingUIRoot,{open:p,onOpenChange:v,portalled:!0,transitionConfig:{duration:y?r.PANEL_TRANSITION_DURATION_MS:0},children:e.jsxs(A.Content,{className:m,skipFloatingStyles:!0,overlay:!0,...x,"data-position":i,children:[l,j&&e.jsx(a,{position:i,className:h})]})})})};n.displayName="Panel";n.Header=R.Header;n.Body=U.Body;n.Footer=B.Footer;exports.Panel=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=t.createContext(void 0),o=()=>{const e=t.useContext(n);if(!e)throw new Error("Panel subcomponents must be used within a Panel component");return e};exports.PanelContext=n;exports.usePanelContext=o;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PanelPosition } from './Panel.types';
|
|
2
|
+
export interface PanelContextValue {
|
|
3
|
+
/**
|
|
4
|
+
* Whether to show a dismissible button
|
|
5
|
+
*/
|
|
6
|
+
dismissible?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Aria label for the dismissible button
|
|
9
|
+
*/
|
|
10
|
+
closeButtonAriaLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Callback when panel open state changes
|
|
13
|
+
*/
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Panel position (determines divider placement)
|
|
17
|
+
*/
|
|
18
|
+
position?: PanelPosition;
|
|
19
|
+
}
|
|
20
|
+
export declare const PanelContext: import('react').Context<PanelContextValue | undefined>;
|
|
21
|
+
export declare const usePanelContext: () => PanelContextValue;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext as e, useContext as n } from "react";
|
|
2
|
+
const o = e(void 0), s = () => {
|
|
3
|
+
const t = n(o);
|
|
4
|
+
if (!t)
|
|
5
|
+
throw new Error("Panel subcomponents must be used within a Panel component");
|
|
6
|
+
return t;
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as PanelContext,
|
|
10
|
+
s as usePanelContext
|
|
11
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PanelProps } from './Panel.types';
|
|
2
|
+
export declare const Panel: {
|
|
3
|
+
({ children, className: _className, padding, onOpenChange, open, size, dismissible, closeButtonAriaLabel, kind, position, divider, isAnimated, ...props }: PanelProps): JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
Header: {
|
|
6
|
+
({ children, className: _className, divider, ...props }: import('./Panel.Header').PanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
Row: {
|
|
9
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Row').PanelHeaderRowProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
ContentBefore: {
|
|
13
|
+
({ children, className: _className, ...props }: import('./Panel.Header.ContentBefore').PanelHeaderContentBeforeProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
Heading: {
|
|
17
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Heading').PanelHeaderHeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Description: {
|
|
21
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Description').PanelHeaderDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
ContentAfter: {
|
|
25
|
+
({ children, className: _className, ...props }: import('./Panel.Header.ContentAfter').PanelHeaderContentAfterProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
Subheader: {
|
|
29
|
+
({ children, className: _className, ...props }: import('./Panel.Header.Subheader').PanelHeaderSubheaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
Body: {
|
|
34
|
+
({ children, className: _className, ...props }: import('./Panel.Body').PanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
Footer: {
|
|
38
|
+
({ children, className: _className, divider, ...props }: import('./Panel.Footer').PanelFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
Actions: {
|
|
41
|
+
({ layout, children, className: _className, ...props }: import('./Panel.Footer.Actions').PanelFooterActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import v from "clsx";
|
|
3
|
+
import { g as F } from "../../../chunks/classNames.DNsS4J__.js";
|
|
4
|
+
import "../../../chunks/constants.BBi77pmH.js";
|
|
5
|
+
import { PanelContext as I } from "./Panel.context.es.js";
|
|
6
|
+
import { Header as T } from "./Panel.Header.es.js";
|
|
7
|
+
import { Body as A } from "./Panel.Body.es.js";
|
|
8
|
+
import { Footer as j } from "./Panel.Footer.es.js";
|
|
9
|
+
import { getResolvedPanelPosition as E, useInlineTransition as H, getPanelDividerState as M, PANEL_TRANSITION_DURATION_MS as U } from "./Panel.helpers.es.js";
|
|
10
|
+
import { FloatingUIRoot as V } from "../../FloatingUI/FloatingUI.root.es.js";
|
|
11
|
+
import { Content as L } from "../../FloatingUI/FloatingUI.content.es.js";
|
|
12
|
+
import { Divider as O } from "../../Divider/Divider.es.js";
|
|
13
|
+
import { s as i } from "../../../chunks/panel.module.BVm3KvDs.js";
|
|
14
|
+
const { baseClassNamePrefix: o } = F("panel"), l = ({
|
|
15
|
+
position: t,
|
|
16
|
+
className: a
|
|
17
|
+
}) => /* @__PURE__ */ r(
|
|
18
|
+
O,
|
|
19
|
+
{
|
|
20
|
+
borderColor: "01",
|
|
21
|
+
orientation: t === "bottom" ? "horizontal" : "vertical",
|
|
22
|
+
className: a
|
|
23
|
+
}
|
|
24
|
+
), s = ({
|
|
25
|
+
children: t,
|
|
26
|
+
className: a,
|
|
27
|
+
padding: g = "md",
|
|
28
|
+
onOpenChange: c,
|
|
29
|
+
open: f,
|
|
30
|
+
size: d,
|
|
31
|
+
dismissible: h = !0,
|
|
32
|
+
closeButtonAriaLabel: x = "Close panel",
|
|
33
|
+
kind: n = "inline",
|
|
34
|
+
position: u,
|
|
35
|
+
divider: D = !0,
|
|
36
|
+
isAnimated: N = !0,
|
|
37
|
+
...$
|
|
38
|
+
}) => {
|
|
39
|
+
const e = E(u), _ = v(
|
|
40
|
+
i[o],
|
|
41
|
+
i[`${o}--${n}`],
|
|
42
|
+
d && i[`${o}--size-${d}`],
|
|
43
|
+
i[`${o}--padding-${g}`],
|
|
44
|
+
i[`${o}--position-${e}`],
|
|
45
|
+
a
|
|
46
|
+
), b = v(
|
|
47
|
+
i[`${o}__inline-wrapper`],
|
|
48
|
+
d === "full" && i[`${o}__inline-wrapper--full`]
|
|
49
|
+
), P = {
|
|
50
|
+
dismissible: h,
|
|
51
|
+
closeButtonAriaLabel: x,
|
|
52
|
+
onOpenChange: c,
|
|
53
|
+
position: u
|
|
54
|
+
}, { inlineStatus: R, isInlineVisible: y } = H(
|
|
55
|
+
n === "inline" ? f : void 0,
|
|
56
|
+
N
|
|
57
|
+
), { showDivider: C, dividerBefore: S, dividerAfter: w } = M(
|
|
58
|
+
D,
|
|
59
|
+
e
|
|
60
|
+
), B = n === "overlay" ? v(
|
|
61
|
+
i[`${o}__overlay-divider`],
|
|
62
|
+
i[`${o}__overlay-divider--${e}`]
|
|
63
|
+
) : void 0, m = C && y;
|
|
64
|
+
return n === "inline" ? y ? /* @__PURE__ */ p(I.Provider, { value: P, children: [
|
|
65
|
+
S && m && /* @__PURE__ */ r(l, { position: e }),
|
|
66
|
+
/* @__PURE__ */ r(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: b,
|
|
70
|
+
"data-position": e,
|
|
71
|
+
"data-status": R,
|
|
72
|
+
children: /* @__PURE__ */ p("div", { className: i[`${o}__inline-wrapper-content`], children: [
|
|
73
|
+
e === "bottom" && m && /* @__PURE__ */ r(l, { position: e }),
|
|
74
|
+
/* @__PURE__ */ r("aside", { className: _, ...$, children: t })
|
|
75
|
+
] })
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
w && m && /* @__PURE__ */ r(l, { position: e })
|
|
79
|
+
] }) : null : /* @__PURE__ */ r(I.Provider, { value: P, children: /* @__PURE__ */ r(
|
|
80
|
+
V,
|
|
81
|
+
{
|
|
82
|
+
open: f,
|
|
83
|
+
onOpenChange: c,
|
|
84
|
+
portalled: !0,
|
|
85
|
+
transitionConfig: {
|
|
86
|
+
duration: N ? U : 0
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ p(
|
|
89
|
+
L,
|
|
90
|
+
{
|
|
91
|
+
className: _,
|
|
92
|
+
skipFloatingStyles: !0,
|
|
93
|
+
overlay: !0,
|
|
94
|
+
...$,
|
|
95
|
+
"data-position": e,
|
|
96
|
+
children: [
|
|
97
|
+
t,
|
|
98
|
+
C && /* @__PURE__ */ r(
|
|
99
|
+
l,
|
|
100
|
+
{
|
|
101
|
+
position: e,
|
|
102
|
+
className: B
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
) });
|
|
110
|
+
};
|
|
111
|
+
s.displayName = "Panel";
|
|
112
|
+
s.Header = T;
|
|
113
|
+
s.Body = A;
|
|
114
|
+
s.Footer = j;
|
|
115
|
+
export {
|
|
116
|
+
s as Panel
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),o=400,c=e=>e||"end",d=(e,t)=>{const n=e&&t!=="full";return{showDivider:n,dividerBefore:n&&t!=="start"&&t!=="bottom",dividerAfter:n&&t==="start"}},I=(e,t)=>{const[n,i]=a.useState(void 0),[l,s]=a.useState(e!==!1);return a.useEffect(()=>{if(!t){s(e!==!1),i(void 0);return}if(e!==void 0)if(e){s(!0),i("close");let r;const u=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>i("open"))});return()=>{cancelAnimationFrame(u),cancelAnimationFrame(r)}}else{i("close");const r=setTimeout(()=>{s(!1),i(void 0)},o);return()=>clearTimeout(r)}},[t,e]),{inlineStatus:n,isInlineVisible:l}};exports.PANEL_TRANSITION_DURATION_MS=o;exports.getPanelDividerState=d;exports.getResolvedPanelPosition=c;exports.useInlineTransition=I;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PanelPosition } from './Panel.types';
|
|
2
|
+
export declare const PANEL_TRANSITION_DURATION_MS = 400;
|
|
3
|
+
export type PanelInlineStatus = 'open' | 'close' | undefined;
|
|
4
|
+
export declare const getResolvedPanelPosition: (position?: PanelPosition) => PanelPosition;
|
|
5
|
+
export declare const getPanelDividerState: (divider: boolean, position?: PanelPosition) => {
|
|
6
|
+
showDivider: boolean;
|
|
7
|
+
dividerBefore: boolean;
|
|
8
|
+
dividerAfter: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const useInlineTransition: (open: boolean | undefined, isAnimated: boolean) => {
|
|
11
|
+
inlineStatus: PanelInlineStatus;
|
|
12
|
+
isInlineVisible: boolean;
|
|
13
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useState as o, useEffect as u } from "react";
|
|
2
|
+
const c = 400, m = (e) => e || "end", f = (e, t) => {
|
|
3
|
+
const n = e && t !== "full";
|
|
4
|
+
return {
|
|
5
|
+
showDivider: n,
|
|
6
|
+
dividerBefore: n && t !== "start" && t !== "bottom",
|
|
7
|
+
dividerAfter: n && t === "start"
|
|
8
|
+
};
|
|
9
|
+
}, I = (e, t) => {
|
|
10
|
+
const [n, i] = o(void 0), [a, s] = o(e !== !1);
|
|
11
|
+
return u(() => {
|
|
12
|
+
if (!t) {
|
|
13
|
+
s(e !== !1), i(void 0);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (e !== void 0)
|
|
17
|
+
if (e) {
|
|
18
|
+
s(!0), i("close");
|
|
19
|
+
let r;
|
|
20
|
+
const l = requestAnimationFrame(() => {
|
|
21
|
+
r = requestAnimationFrame(() => i("open"));
|
|
22
|
+
});
|
|
23
|
+
return () => {
|
|
24
|
+
cancelAnimationFrame(l), cancelAnimationFrame(r);
|
|
25
|
+
};
|
|
26
|
+
} else {
|
|
27
|
+
i("close");
|
|
28
|
+
const r = setTimeout(() => {
|
|
29
|
+
s(!1), i(void 0);
|
|
30
|
+
}, c);
|
|
31
|
+
return () => clearTimeout(r);
|
|
32
|
+
}
|
|
33
|
+
}, [t, e]), { inlineStatus: n, isInlineVisible: a };
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
c as PANEL_TRANSITION_DURATION_MS,
|
|
37
|
+
f as getPanelDividerState,
|
|
38
|
+
m as getResolvedPanelPosition,
|
|
39
|
+
I as useInlineTransition
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|