@reapit/elements 5.0.0-beta.67 → 5.0.0-beta.68
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/js/{anchor-positioning-CmSZkNof.cjs → anchor-positioning-B-1bVP2v.cjs} +7 -7
- package/dist/js/{anchor-positioning-B3GGsbFM.js → anchor-positioning-mAfJClCi.js} +39 -36
- package/dist/js/{app-switcher-DNyr8R9j.js → app-switcher-B3Gme35H.js} +3 -3
- package/dist/js/{app-switcher-Da0jpH_0.cjs → app-switcher-alq1ioRt.cjs} +1 -1
- package/dist/js/{at-a-glance-N68VKcxo.cjs → at-a-glance-Bowg_R7J.cjs} +1 -1
- package/dist/js/{at-a-glance-B0WukTyX.js → at-a-glance-Bvs_m_s8.js} +1 -1
- package/dist/js/{autocomplete-Cbhl4kCC.cjs → autocomplete-BXNYfkuS.cjs} +1 -1
- package/dist/js/{autocomplete-Cjqj5b4A.js → autocomplete-BY50e2OI.js} +2 -2
- package/dist/js/{autocomplete-control-B1yvpZcw.cjs → autocomplete-control-7AtK271I.cjs} +1 -1
- package/dist/js/{autocomplete-control-tyu0N1_5.js → autocomplete-control-D3qPiyZB.js} +1 -1
- package/dist/js/{badge-C9eQWVc1.cjs → badge-BvLnt-2S.cjs} +1 -1
- package/dist/js/{badge-BH7WvutW.js → badge-C_Za5PMD.js} +1 -1
- package/dist/js/{bottom-bar-CiDA0QAt.js → bottom-bar-DIdKkbsi.js} +1 -1
- package/dist/js/{bottom-bar-y_VAqgE3.cjs → bottom-bar-DeODIkXt.cjs} +1 -1
- package/dist/js/{combobox-BMcjE-Hz.js → combobox-1az8akBD.js} +43 -45
- package/dist/js/combobox-DEZrdZM-.cjs +1 -0
- package/dist/js/{compact-select-CGGyCX2N.cjs → compact-select-BAqO95r3.cjs} +1 -1
- package/dist/js/{compact-select-B-fRAGbk.js → compact-select-Cj_eJ_Gk.js} +3 -3
- package/dist/js/core/app-switcher.cjs +1 -1
- package/dist/js/core/app-switcher.js +1 -1
- package/dist/js/core/at-a-glance.cjs +1 -1
- package/dist/js/core/at-a-glance.js +1 -1
- package/dist/js/core/autocomplete-control.cjs +1 -1
- package/dist/js/core/autocomplete-control.js +1 -1
- package/dist/js/core/autocomplete.cjs +1 -1
- package/dist/js/core/autocomplete.js +1 -1
- package/dist/js/core/badge.cjs +1 -1
- package/dist/js/core/badge.js +1 -1
- package/dist/js/core/bottom-bar.cjs +1 -1
- package/dist/js/core/bottom-bar.js +1 -1
- package/dist/js/core/combobox.cjs +1 -1
- package/dist/js/core/combobox.js +30 -31
- package/dist/js/core/compact-select.cjs +1 -1
- package/dist/js/core/compact-select.js +1 -1
- package/dist/js/core/dialog.cjs +1 -1
- package/dist/js/core/dialog.js +3 -3
- package/dist/js/core/drawer.cjs +1 -1
- package/dist/js/core/drawer.js +12 -12
- package/dist/js/core/features.cjs +1 -1
- package/dist/js/core/features.js +1 -1
- package/dist/js/core/menu.cjs +1 -1
- package/dist/js/core/menu.js +1 -1
- package/dist/js/core/office-switcher.cjs +1 -1
- package/dist/js/core/office-switcher.js +128 -34
- package/dist/js/core/section-message.cjs +1 -1
- package/dist/js/core/section-message.js +1 -1
- package/dist/js/core/select-control.cjs +1 -1
- package/dist/js/core/select-control.js +1 -1
- package/dist/js/core/select.cjs +1 -1
- package/dist/js/core/select.js +1 -1
- package/dist/js/core/side-bar.cjs +1 -1
- package/dist/js/core/side-bar.js +1 -1
- package/dist/js/core/split-button.cjs +1 -1
- package/dist/js/core/split-button.js +1 -1
- package/dist/js/core/table.cjs +1 -1
- package/dist/js/core/table.js +1 -1
- package/dist/js/core/tooltip.cjs +1 -1
- package/dist/js/core/tooltip.js +1 -1
- package/dist/js/core/top-bar.cjs +1 -1
- package/dist/js/core/top-bar.js +1 -1
- package/dist/js/dialog-X9q5RTrQ.js +121 -0
- package/dist/js/dialog-j6m9UOwL.cjs +1 -0
- package/dist/js/drawer-DeMe2YSy.cjs +1 -0
- package/dist/js/drawer-n8sZIGeL.js +202 -0
- package/dist/js/{features-xa9s_F2X.cjs → features-DDWY0bS-.cjs} +1 -1
- package/dist/js/{features-DPy7FK5b.js → features-xSaxyxVa.js} +1 -1
- package/dist/js/index.cjs +1 -1
- package/dist/js/index.js +473 -472
- package/dist/js/lab/select-custom.cjs +1 -1
- package/dist/js/lab/select-custom.js +2 -2
- package/dist/js/{line-clamp-CcqDlxOD.js → line-clamp-B8Z8vzU2.js} +1 -1
- package/dist/js/{line-clamp-BHxcW-g_.cjs → line-clamp-xEX76LvR.cjs} +1 -1
- package/dist/js/{listbox-DaqNCLTr.js → listbox-LxpZYH0B.js} +7 -7
- package/dist/js/listbox-uSbN6RQG.cjs +1 -0
- package/dist/js/{menu-BB1lyDsI.cjs → menu-C5zczNsx.cjs} +1 -1
- package/dist/js/{menu-DUQjcwNM.js → menu-CP0Bep1V.js} +1 -1
- package/dist/js/popover-Xyg0sgru.cjs +1 -0
- package/dist/js/{popover-BWnbK_dO.js → popover-dzUc2bK7.js} +21 -19
- package/dist/js/{section-message-79DbPIVf.cjs → section-message-Bn33yi2F.cjs} +1 -1
- package/dist/js/{section-message-DhkYCDQk.js → section-message-CEzwuyor.js} +1 -1
- package/dist/js/{select-C9m1ujim.js → select-BUeFgouh.js} +2 -2
- package/dist/js/{select-C8XEaJmE.cjs → select-BlpaGf5-.cjs} +1 -1
- package/dist/js/{select-control-CNKEx3wt.js → select-control-BlU3KNOJ.js} +3 -3
- package/dist/js/{select-control-C5inPWYx.cjs → select-control-DlaKfZ3x.cjs} +1 -1
- package/dist/js/{side-bar-q0Dapddc.cjs → side-bar-BkE4eONG.cjs} +1 -1
- package/dist/js/{side-bar-CsPEFLGc.js → side-bar-D6aRZHCV.js} +1 -1
- package/dist/js/{split-button-GzVuhKx-.cjs → split-button-Bnyv8DHF.cjs} +1 -1
- package/dist/js/{split-button-DHHUZ-41.js → split-button-CrofNP3Q.js} +1 -1
- package/dist/js/style.css +1 -1
- package/dist/js/{table-BVLzp-xe.js → table-2CxL0Pev.js} +1 -1
- package/dist/js/{table-skEBWgL8.cjs → table-WHyA-HQG.cjs} +1 -1
- package/dist/js/{tooltip-9vKZqx5w.cjs → tooltip-BU8hYqZ9.cjs} +1 -1
- package/dist/js/{tooltip-C2y49rDB.js → tooltip-Bj7DqYdo.js} +1 -1
- package/dist/js/{top-bar-BnR_HVWD.js → top-bar-BvxpBZri.js} +2 -2
- package/dist/js/{top-bar-CXJfqax_.cjs → top-bar-CjUR7fhL.cjs} +1 -1
- package/dist/js/utils/anchor-positioning.cjs +1 -1
- package/dist/js/utils/anchor-positioning.js +1 -1
- package/dist/js/utils/dialog.cjs +1 -0
- package/dist/js/utils/dialog.js +9 -0
- package/dist/js/utils/line-clamp.cjs +1 -1
- package/dist/js/utils/line-clamp.js +1 -1
- package/dist/js/utils/listbox.cjs +1 -1
- package/dist/js/utils/listbox.js +1 -1
- package/dist/js/utils/popover.cjs +1 -1
- package/dist/js/utils/popover.js +2 -2
- package/dist/types/core/combobox/popup-dialog/event-handlers.d.ts +0 -15
- package/dist/types/core/combobox/popup-dialog/event-handlers.d.ts.map +1 -1
- package/dist/types/core/combobox/popup-dialog/popup-dialog.d.ts.map +1 -1
- package/dist/types/core/dialog/dialog.d.ts +13 -18
- package/dist/types/core/dialog/dialog.d.ts.map +1 -1
- package/dist/types/core/dialog/dialog.stories.d.ts +25 -0
- package/dist/types/core/dialog/dialog.stories.d.ts.map +1 -1
- package/dist/types/core/dialog/styles.d.ts +1 -6
- package/dist/types/core/dialog/styles.d.ts.map +1 -1
- package/dist/types/core/drawer/drawer.d.ts +13 -18
- package/dist/types/core/drawer/drawer.d.ts.map +1 -1
- package/dist/types/core/drawer/drawer.stories.d.ts +25 -0
- package/dist/types/core/drawer/drawer.stories.d.ts.map +1 -1
- package/dist/types/core/drawer/styles.d.ts +1 -1
- package/dist/types/core/drawer/styles.d.ts.map +1 -1
- package/dist/types/core/office-switcher/__tests__/office-switcher-select-optgroup.test.d.ts +2 -0
- package/dist/types/core/office-switcher/__tests__/office-switcher-select-optgroup.test.d.ts.map +1 -0
- package/dist/types/core/office-switcher/__tests__/office-switcher-select-option.test.d.ts +2 -0
- package/dist/types/core/office-switcher/__tests__/office-switcher-select-option.test.d.ts.map +1 -0
- package/dist/types/core/office-switcher/index.d.ts +4 -0
- package/dist/types/core/office-switcher/index.d.ts.map +1 -1
- package/dist/types/core/office-switcher/office-group/__tests__/office-group-summary.test.d.ts +2 -0
- package/dist/types/core/office-switcher/office-group/__tests__/office-group-summary.test.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/__tests__/office-group.test.d.ts +2 -0
- package/dist/types/core/office-switcher/office-group/__tests__/office-group.test.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/index.d.ts +4 -0
- package/dist/types/core/office-switcher/office-group/index.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/office-group-summary.d.ts +22 -0
- package/dist/types/core/office-switcher/office-group/office-group-summary.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/office-group.d.ts +20 -0
- package/dist/types/core/office-switcher/office-group/office-group.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/office-group.stories.d.ts +20 -0
- package/dist/types/core/office-switcher/office-group/office-group.stories.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-group/styles.d.ts +5 -0
- package/dist/types/core/office-switcher/office-group/styles.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-item/__tests__/office-item.test.d.ts +2 -0
- package/dist/types/core/office-switcher/office-item/__tests__/office-item.test.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-item/index.d.ts +3 -0
- package/dist/types/core/office-switcher/office-item/index.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-item/office-item.d.ts +18 -0
- package/dist/types/core/office-switcher/office-item/office-item.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-item/office-item.stories.d.ts +42 -0
- package/dist/types/core/office-switcher/office-item/office-item.stories.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-item/styles.d.ts +6 -0
- package/dist/types/core/office-switcher/office-item/styles.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-popup.figma.d.ts +2 -0
- package/dist/types/core/office-switcher/office-switcher-popup.figma.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-select-optgroup.d.ts +24 -0
- package/dist/types/core/office-switcher/office-switcher-select-optgroup.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-select-optgroup.figma.d.ts +2 -0
- package/dist/types/core/office-switcher/office-switcher-select-optgroup.figma.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-select-option.d.ts +15 -0
- package/dist/types/core/office-switcher/office-switcher-select-option.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-select-option.figma.d.ts +2 -0
- package/dist/types/core/office-switcher/office-switcher-select-option.figma.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher-select.figma.d.ts +2 -0
- package/dist/types/core/office-switcher/office-switcher-select.figma.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher.d.ts +23 -3
- package/dist/types/core/office-switcher/office-switcher.d.ts.map +1 -1
- package/dist/types/core/office-switcher/office-switcher.figma.d.ts +2 -0
- package/dist/types/core/office-switcher/office-switcher.figma.d.ts.map +1 -0
- package/dist/types/core/office-switcher/office-switcher.stories.d.ts +4 -0
- package/dist/types/core/office-switcher/office-switcher.stories.d.ts.map +1 -1
- package/dist/types/utils/anchor-positioning/anchor-positioning.d.ts +1 -1
- package/dist/types/utils/anchor-positioning/anchor-positioning.d.ts.map +1 -1
- package/dist/types/utils/anchor-positioning/anchor-positioning.stories.d.ts.map +1 -1
- package/dist/types/utils/anchor-positioning/build-anchor-positioning-css.d.ts +5 -1
- package/dist/types/utils/anchor-positioning/build-anchor-positioning-css.d.ts.map +1 -1
- package/dist/types/utils/dialog/__tests__/close-on-backdrop-click.test.d.ts +2 -0
- package/dist/types/utils/dialog/__tests__/close-on-backdrop-click.test.d.ts.map +1 -0
- package/dist/types/utils/dialog/close-on-backdrop-click.d.ts +24 -0
- package/dist/types/utils/dialog/close-on-backdrop-click.d.ts.map +1 -0
- package/dist/types/utils/dialog/index.d.ts +2 -0
- package/dist/types/utils/dialog/index.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/listbox/dom-helpers/selectors.d.ts +8 -2
- package/dist/types/utils/listbox/dom-helpers/selectors.d.ts.map +1 -1
- package/dist/types/utils/popover/popover.d.ts +6 -2
- package/dist/types/utils/popover/popover.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/js/combobox-ykwrJ8qP.cjs +0 -1
- package/dist/js/dialog-CjN2Nll1.js +0 -116
- package/dist/js/dialog-oPE93fe0.cjs +0 -1
- package/dist/js/drawer-DcgSXF1g.cjs +0 -1
- package/dist/js/drawer-GNG7AmHl.js +0 -197
- package/dist/js/listbox-BGrp52Hs.cjs +0 -1
- package/dist/js/popover-CA0t-z5e.cjs +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Listbox } from '#src/utils/listbox';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export declare namespace OfficeSwitcherSelectOptgroup {
|
|
4
|
+
interface Props extends Listbox.OptgroupProps {
|
|
5
|
+
/**
|
|
6
|
+
* The office items to display within the group. Typically a collection of
|
|
7
|
+
* `OfficeSwitcher.Option` components.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Indicates whether the group is open/expanded.
|
|
12
|
+
*/
|
|
13
|
+
open?: boolean;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Integrates `OfficeSwitcherOfficeGroup` with the internal `<select>` element. Provides a
|
|
18
|
+
* collapsible group of office options and renders as a native `<optgroup>` when needed.
|
|
19
|
+
*/
|
|
20
|
+
export declare function OfficeSwitcherSelectOptgroup(props: OfficeSwitcherSelectOptgroup.Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare namespace OfficeSwitcherSelectOptgroup {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=office-switcher-select-optgroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher-select-optgroup.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher-select-optgroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,KAAM,SAAQ,OAAO,CAAC,aAAa;QAClD;;;WAGG;QACH,QAAQ,CAAC,EAAE,SAAS,CAAA;QACpB;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAA;KACf;CACF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,4BAA4B,CAAC,KAAK,2CAErF;yBAFe,4BAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher-select-optgroup.figma.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher-select-optgroup.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OfficeItem } from './office-item';
|
|
2
|
+
import { Listbox } from '#src/utils/listbox';
|
|
3
|
+
export declare namespace OfficeSwitcherSelectOption {
|
|
4
|
+
interface Props extends OfficeItem.Props, Listbox.OptionProps {
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Integrates `OfficeItem` with the internal `<select>` element. Updates checked/selected state
|
|
9
|
+
* automatically and renders as a native `<option>` when needed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function OfficeSwitcherSelectOption(props: OfficeSwitcherSelectOption.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare namespace OfficeSwitcherSelectOption {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=office-switcher-select-option.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher-select-option.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher-select-option.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C,yBAAiB,0BAA0B,CAAC;IAC1C,UAAiB,KAAM,SAAQ,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW;KAAG;CACxE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,0BAA0B,CAAC,KAAK,2CAEjF;yBAFe,0BAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher-select-option.figma.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher-select-option.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher-select.figma.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher-select.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
import { Combobox } from '#src/core/combobox';
|
|
2
|
+
import { CompactSelect } from '#src/core/compact-select';
|
|
1
3
|
import { OfficeSwitcherPopup } from './office-switcher-popup';
|
|
2
|
-
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
4
|
import { OfficeSwitcherSelect } from './office-switcher-select';
|
|
5
|
+
import { OfficeSwitcherSelectOptgroup } from './office-switcher-select-optgroup';
|
|
6
|
+
import { OfficeSwitcherSelectOption } from './office-switcher-select-option';
|
|
7
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
4
8
|
export declare namespace OfficeSwitcher {
|
|
9
|
+
interface ButtonProps extends CompactSelect.ButtonProps {
|
|
10
|
+
}
|
|
11
|
+
interface DividerProps extends CompactSelect.DividerProps {
|
|
12
|
+
}
|
|
13
|
+
interface ListboxProps extends CompactSelect.ListboxProps {
|
|
14
|
+
}
|
|
15
|
+
interface OptgroupProps extends OfficeSwitcherSelectOptgroup.Props {
|
|
16
|
+
}
|
|
17
|
+
interface OptionProps extends OfficeSwitcherSelectOption.Props {
|
|
18
|
+
}
|
|
19
|
+
interface PopupProps extends OfficeSwitcherPopup.Props {
|
|
20
|
+
}
|
|
21
|
+
interface SearchInputProps extends Combobox.SearchInputProps {
|
|
22
|
+
}
|
|
23
|
+
interface SelectProps extends OfficeSwitcherSelect.Props {
|
|
24
|
+
}
|
|
5
25
|
interface Props extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
6
26
|
/** The office switcher. Either plain text for single-office users or an `OfficeSwitcher.Select`. */
|
|
7
27
|
children: ReactNode;
|
|
@@ -21,8 +41,8 @@ export declare namespace OfficeSwitcher {
|
|
|
21
41
|
var Button: typeof import("../compact-select/compact-select-button").CompactSelectButton;
|
|
22
42
|
var Divider: typeof import("..").Divider;
|
|
23
43
|
var Listbox: typeof import("#src/core/combobox").ComboboxListbox;
|
|
24
|
-
var Option: typeof
|
|
25
|
-
var Optgroup: typeof
|
|
44
|
+
var Option: typeof OfficeSwitcherSelectOption;
|
|
45
|
+
var Optgroup: typeof OfficeSwitcherSelectOptgroup;
|
|
26
46
|
var Popup: typeof OfficeSwitcherPopup;
|
|
27
47
|
var SearchInput: typeof import("../combobox/search-input").ComboboxSearchInput;
|
|
28
48
|
var Select: typeof OfficeSwitcherSelect;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"office-switcher.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"office-switcher.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtD,yBAAiB,cAAc,CAAC;IAC9B,UAAiB,WAAY,SAAQ,aAAa,CAAC,WAAW;KAAG;IACjE,UAAiB,YAAa,SAAQ,aAAa,CAAC,YAAY;KAAG;IACnE,UAAiB,YAAa,SAAQ,aAAa,CAAC,YAAY;KAAG;IACnE,UAAiB,aAAc,SAAQ,4BAA4B,CAAC,KAAK;KAAG;IAC5E,UAAiB,WAAY,SAAQ,0BAA0B,CAAC,KAAK;KAAG;IACxE,UAAiB,UAAW,SAAQ,mBAAmB,CAAC,KAAK;KAAG;IAChE,UAAiB,gBAAiB,SAAQ,QAAQ,CAAC,gBAAgB;KAAG;IACtE,UAAiB,WAAY,SAAQ,oBAAoB,CAAC,KAAK;KAAG;IAElE,UAAiB,KAAM,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;QAC7E,oGAAoG;QACpG,QAAQ,EAAE,SAAS,CAAA;KACpB;CACF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,CAAC,KAAK,2CAEzE;yBAFe,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"office-switcher.figma.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher.figma.tsx"],"names":[],"mappings":""}
|
|
@@ -29,4 +29,8 @@ export declare const Selector: Story;
|
|
|
29
29
|
* For multi-office users with many offices, the dropdown can be searchable.
|
|
30
30
|
*/
|
|
31
31
|
export declare const Searchable: Story;
|
|
32
|
+
/**
|
|
33
|
+
* In some cases, offices may need to be grouped.
|
|
34
|
+
*/
|
|
35
|
+
export declare const Groups: Story;
|
|
32
36
|
//# sourceMappingURL=office-switcher.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"office-switcher.stories.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAa6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA"}
|
|
1
|
+
{"version":3,"file":"office-switcher.stories.d.ts","sourceRoot":"/","sources":["core/office-switcher/office-switcher.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAE3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAa6B,CAAA;AAEvC,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAexB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,KAsBpB,CAAA"}
|
|
@@ -15,5 +15,5 @@ export declare namespace AnchorPositioning {
|
|
|
15
15
|
* Renders a <style> element containing a stylesheet with the anchor positioning styles. This
|
|
16
16
|
* stylesheet will be modified by the polyfill if it is applied.
|
|
17
17
|
*/
|
|
18
|
-
export declare function AnchorPositioning({ alignSelf, anchorElementId, bottom, gap, justifySelf, left, maxWidth, minWidth, placement, positionedElementId, positionTryFallbacks, right, top, }: AnchorPositioning.Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function AnchorPositioning({ alignSelf, anchorElementId, bottom, gap, justifySelf, left, maxWidth, minWidth, placement, position, positionedElementId, positionTryFallbacks, right, top, }: AnchorPositioning.Props): import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
//# sourceMappingURL=anchor-positioning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-positioning.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/anchor-positioning.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,gBAAiB,SAAQ,yBAAyB,CAAC,KAAK;KAAG;IAC5E,UAAiB,KAAM,SAAQ,yBAAyB,CAAC,KAAK,EAAE,cAAc,CAAC,gBAAgB,CAAC;KAAG;CACpG;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,eAAe,EACf,MAAM,EACN,GAAS,EACT,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,oBAA6B,EAC7B,KAAK,EACL,GAAG,GACJ,EAAE,iBAAiB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"anchor-positioning.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/anchor-positioning.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,gBAAiB,SAAQ,yBAAyB,CAAC,KAAK;KAAG;IAC5E,UAAiB,KAAM,SAAQ,yBAAyB,CAAC,KAAK,EAAE,cAAc,CAAC,gBAAgB,CAAC;KAAG;CACpG;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,eAAe,EACf,MAAM,EACN,GAAS,EACT,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,oBAA6B,EAC7B,KAAK,EACL,GAAG,GACJ,EAAE,iBAAiB,CAAC,KAAK,2CAsCzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-positioning.stories.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/anchor-positioning.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAIxD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCgC,CAAA;AAE1C,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"anchor-positioning.stories.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/anchor-positioning.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAIxD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCgC,CAAA;AAE1C,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KA+BvB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,GAAG,EAAE,KAMjB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAA"}
|
|
@@ -16,6 +16,10 @@ export declare namespace buildAnchorPositioningCSS {
|
|
|
16
16
|
* Defaults to content width. Prefer `--size-*` variables.
|
|
17
17
|
*/
|
|
18
18
|
minWidth?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The position of the element. Must be absolute or fixed. Default is absolute.
|
|
21
|
+
*/
|
|
22
|
+
position?: 'absolute' | 'fixed';
|
|
19
23
|
/**
|
|
20
24
|
* Positioned element ID.
|
|
21
25
|
*/
|
|
@@ -36,5 +40,5 @@ export declare namespace buildAnchorPositioningCSS {
|
|
|
36
40
|
*
|
|
37
41
|
* The `placement` property takes priority over inset properties when specified.
|
|
38
42
|
*/
|
|
39
|
-
export declare function buildAnchorPositioningCSS({ alignSelf, anchorElementId, bottom, gap, justifySelf, left, maxWidth, minWidth, placement, positionedElementId, positionTryFallbacks, right, top, }: buildAnchorPositioningCSS.Input): string;
|
|
43
|
+
export declare function buildAnchorPositioningCSS({ alignSelf, anchorElementId, bottom, gap, justifySelf, left, maxWidth, minWidth, placement, position, positionedElementId, positionTryFallbacks, right, top, }: buildAnchorPositioningCSS.Input): string;
|
|
40
44
|
//# sourceMappingURL=build-anchor-positioning-css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-anchor-positioning-css.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/build-anchor-positioning-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK;QACjF,gCAAgC;QAChC,eAAe,EAAE,MAAM,CAAA;QACvB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAA;QAC3B;;;;;;WAMG;QACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAC9B;CACF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,eAAe,EACf,MAAM,EACN,GAAG,EACH,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,oBAA6B,EAC7B,KAAK,EACL,GAAG,GACJ,EAAE,yBAAyB,CAAC,KAAK,GAAG,MAAM,CA+B1C"}
|
|
1
|
+
{"version":3,"file":"build-anchor-positioning-css.d.ts","sourceRoot":"/","sources":["utils/anchor-positioning/build-anchor-positioning-css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK;QACjF,gCAAgC;QAChC,eAAe,EAAE,MAAM,CAAA;QACvB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB;;;;WAIG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB;;WAEG;QACH,QAAQ,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;QAC/B;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAA;QAC3B;;;;;;WAMG;QACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAC9B;CACF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,eAAe,EACf,MAAM,EACN,GAAG,EACH,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAqB,EACrB,mBAAmB,EACnB,oBAA6B,EAC7B,KAAK,EACL,GAAG,GACJ,EAAE,yBAAyB,CAAC,KAAK,GAAG,MAAM,CA+B1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-on-backdrop-click.test.d.ts","sourceRoot":"/","sources":["utils/dialog/__tests__/close-on-backdrop-click.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Closes the dialog when clicking on the backdrop (Safari workaround for closedby='any').
|
|
4
|
+
*
|
|
5
|
+
* Safari doesn't support the closedby='any' attribute, so we handle backdrop clicks manually.
|
|
6
|
+
* This function checks whether the dialog has closedby='any' set and, if the browser doesn't
|
|
7
|
+
* support closedBy natively, closes the dialog when the backdrop is clicked.
|
|
8
|
+
*
|
|
9
|
+
* The function does nothing when:
|
|
10
|
+
* - The dialog doesn't have closedby='any' attribute
|
|
11
|
+
* - The browser supports closedBy natively
|
|
12
|
+
* - The click was on dialogue content (not the backdrop)
|
|
13
|
+
*
|
|
14
|
+
* Safe to call unconditionally - it will only close the dialog when all conditions are met.
|
|
15
|
+
*
|
|
16
|
+
* @param event The click event from the dialog element
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const handleClick = (event: MouseEvent<HTMLDialogElement>) => {
|
|
20
|
+
* maybeCloseOnBackdropClick(event)
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
export declare function maybeCloseOnBackdropClick(event: MouseEvent<HTMLDialogElement>): void;
|
|
24
|
+
//# sourceMappingURL=close-on-backdrop-click.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-on-backdrop-click.d.ts","sourceRoot":"/","sources":["utils/dialog/close-on-backdrop-click.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAepF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,UAAU,CAAA;AACxB,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA"}
|
|
@@ -4,8 +4,14 @@
|
|
|
4
4
|
* Matches button elements with the role="option" attribute, which represent
|
|
5
5
|
* individual options within a listbox. These are the interactive elements that
|
|
6
6
|
* users can click or navigate to with the keyboard.
|
|
7
|
+
*
|
|
8
|
+
* Also matches summary elements in order to support use-cases where the listbox
|
|
9
|
+
* contains collapsible groups of options using details and summary elements.
|
|
10
|
+
*
|
|
11
|
+
* TODO: It's possible we should support custom selectors via a prop on the listbox,
|
|
12
|
+
* as summary element support is, at time of writing, only required by OfficeSwitcher.
|
|
7
13
|
*/
|
|
8
|
-
export declare const OPTION_SELECTOR = "button[role=\"option\"]";
|
|
14
|
+
export declare const OPTION_SELECTOR = ":is(button[role=\"option\"], summary)";
|
|
9
15
|
/**
|
|
10
16
|
* CSS selector for selected listbox option elements.
|
|
11
17
|
*
|
|
@@ -19,5 +25,5 @@ export declare const OPTION_SELECTOR = "button[role=\"option\"]";
|
|
|
19
25
|
* This follows the ARIA listbox pattern specification:
|
|
20
26
|
* https://www.w3.org/WAI/ARIA/apg/patterns/listbox
|
|
21
27
|
*/
|
|
22
|
-
export declare const SELECTED_OPTION_SELECTOR = "button[role=\"option\"]:is([aria-checked=\"true\"], [aria-selected=\"true\"])";
|
|
28
|
+
export declare const SELECTED_OPTION_SELECTOR = ":is(button[role=\"option\"], summary):is([aria-checked=\"true\"], [aria-selected=\"true\"])";
|
|
23
29
|
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"/","sources":["utils/listbox/dom-helpers/selectors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"/","sources":["utils/listbox/dom-helpers/selectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,0CAAwC,CAAA;AAEpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,gGAAyE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnchorPositioning } from '#src/utils/anchor-positioning';
|
|
2
2
|
import { getPopoverTriggerProps } from './get-popover-trigger-props';
|
|
3
3
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
4
|
-
type AttributesToOmit = 'anchorElementId' | 'positionedElementId';
|
|
4
|
+
type AttributesToOmit = 'anchorElementId' | 'position' | 'positionedElementId';
|
|
5
5
|
export declare namespace Popover {
|
|
6
6
|
interface Props extends Omit<AnchorPositioning.PositioningProps, AttributesToOmit>, HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/** ID of the element to anchor this popover to. */
|
|
@@ -33,6 +33,10 @@ export declare namespace Popover {
|
|
|
33
33
|
* `popover` attribute, the element won't render in the top layer and may encounter z-index issues.
|
|
34
34
|
*/
|
|
35
35
|
popover?: 'auto' | 'hint' | 'manual' | null;
|
|
36
|
+
/**
|
|
37
|
+
* The position of the popover. Must be absolute or fixed. Default is absolute.
|
|
38
|
+
*/
|
|
39
|
+
position?: AnchorPositioning.Props['position'];
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
@@ -51,7 +55,7 @@ export type PopoverProps = Popover.Props;
|
|
|
51
55
|
* **Note:** React 18 users should use `getPopoverTriggerProps` to avoid type and runtime errors
|
|
52
56
|
* with [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) attributes.
|
|
53
57
|
*/
|
|
54
|
-
export declare function Popover({ alignSelf, anchorId, borderRadius, children, className, bottom, elevation, gap, id, justifySelf, left, maxHeight, maxWidth, minWidth, placement, positionTryFallbacks, popover, right, style, top, ...rest }: Popover.Props): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function Popover({ alignSelf, anchorId, borderRadius, children, className, bottom, elevation, gap, id, justifySelf, left, maxHeight, maxWidth, minWidth, placement, position, positionTryFallbacks, popover, right, style, top, ...rest }: Popover.Props): import("react/jsx-runtime").JSX.Element;
|
|
55
59
|
export declare namespace Popover {
|
|
56
60
|
var getTriggerProps: typeof getPopoverTriggerProps;
|
|
57
61
|
var getClosestPopoverElement: typeof import("./get-closest-popover-element").getClosestPopoverElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"/","sources":["utils/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,KAAK,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrE,KAAK,gBAAgB,GAAG,iBAAiB,GAAG,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"/","sources":["utils/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAIjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,KAAK,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGrE,KAAK,gBAAgB,GAAG,iBAAiB,GAAG,UAAU,GAAG,qBAAqB,CAAA;AAE9E,yBAAiB,OAAO,CAAC;IACvB,UAAiB,KACf,SAAQ,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC;QAClG,mDAAmD;QACnD,QAAQ,EAAE,MAAM,CAAA;QAChB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,uBAAuB;QACvB,QAAQ,EAAE,SAAS,CAAA;QACnB,iDAAiD;QACjD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAA;QACV;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB;;;;;;;;WAQG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAA;QAC3C;;WAEG;QACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;KAC/C;CACF;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAA;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,MAAM,EACN,SAAkB,EAClB,GAAG,EACH,EAAE,EACF,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAqB,EACrB,oBAAoB,EACpB,OAAgB,EAChB,KAAK,EACL,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,OAAO,CAAC,KAAK,2CAoCf;yBA3De,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reapit/elements",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.68",
|
|
4
4
|
"description": "A collection of React components and utilities for building apps for Reapit Marketplace",
|
|
5
5
|
"homepage": "https://github.com/reapit/elements#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime");require("./button-base-BR_9696S.cjs");const d=require("react"),V=require("./button-DwYL4ezg.cjs"),C=require("./listbox-BGrp52Hs.cjs"),Z=require("./icons/close.cjs"),Qo=require("./icons/chevron-down.cjs"),oo=require("./search-input-BN3bSLzw.cjs"),Zo=require("./anchor-positioning-CmSZkNof.cjs"),N=require("./drawer-DcgSXF1g.cjs"),eo=require("./index-8ctufnBx.cjs"),i=require("./index-BAGJrh44.cjs"),to=require("./utils/breakpoints.cjs"),no=require("./use-match-media-BfoAxEfC.cjs"),oe=require("./icons/check.cjs"),ao=require("./chip-group-Dcj6D4iB.cjs");function so({"aria-label":o="Clear selection","aria-controls":e,onClick:t,...a}){const s=r=>{t?.(r),C.clearListboxValue(e)};return n.jsx(V.Button,{...a,"aria-controls":e,"aria-label":o,hasNoPadding:!0,iconLeft:n.jsx(Z.CloseIcon,{}),onClick:s,size:"small",variant:"tertiary"})}function v(o){const e=typeof o=="string"?document.getElementById(o):o;if(!e){const t=typeof o=="string"?`with ID "${o}"`:"(passed by reference)";throw new Error(`closeComboboxPopup: Element ${t} not found in the DOM`)}if(!(e instanceof HTMLDialogElement)){const t=typeof o=="string"?`with ID "${o}"`:"(passed by reference)";throw new Error(`closeComboboxPopup: Element ${t} is not an HTMLDialogElement`)}e.close()}const j={AUTO:"auto",ALWAYS:"always",NEVER:"never"};function lo(o){if(o.defaultPrevented||!o.isTrusted)return;const e=ro(o.target);if(!e)return;const{closeOnSelection:t}=o.currentTarget.dataset;if(t!==j.NEVER){if(t===j.ALWAYS){v(o.currentTarget);return}if(t===j.AUTO){const{listboxId:a}=e.dataset,s=a?document.getElementById(a):null;ee(s)&&v(o.currentTarget)}}}function io(o){!("closedBy"in HTMLDialogElement.prototype)&&o.target===o.currentTarget&&o.currentTarget.close()}function ro(o){return o instanceof HTMLElement?o.closest('[role="option"]'):null}function ee(o){return"ariaMultiSelectable"in Element.prototype?o?.ariaMultiSelectable==="false":o?.getAttribute("aria-multiselectable")==="false"}function bo(o){const{preserveSearchOnClose:e}=o.currentTarget.dataset;if(e==="true")return;const t=o.currentTarget.querySelector("input");t instanceof HTMLInputElement&&oo.clearSearchInput(t)}const _=d.createContext(null);function $(){const o=d.useContext(_);if(!o)throw new Error("useComboboxPopupDialogContext requires a ComboboxPopupDialog ancestor");return o}function w(o){const e=typeof o=="string"?document.getElementById(o):o;if(!e){const t=typeof o=="string"?`with ID "${o}"`:"(passed by reference)";throw new Error(`openComboboxPopup: Element ${t} not found in the DOM`)}if(!(e instanceof HTMLDialogElement)){const t=typeof o=="string"?`with ID "${o}"`:"(passed by reference)";throw new Error(`openComboboxPopup: Element ${t} is not an HTMLDialogElement`)}e.showModal()}function te(){const o=e=>{N.getClosestDialogElement(e.currentTarget)?.close()};return n.jsx(V.Button,{"aria-label":"Close",iconLeft:n.jsx(Z.CloseIcon,{"aria-hidden":!0}),onClick:o,size:"large",type:"button",variant:"tertiary"})}const co="el-combobox-popup-dialog",uo=i.styled_default("div")({name:"ElComboboxPopupDialogHeader",class:"el-combobox-popup-dialog-header",propsAsIs:!1}),po=i.styled_default("div")({name:"ElComboboxPopupDialogListboxContainer",class:"el-combobox-popup-dialog-listbox-container",propsAsIs:!1}),H="calc(anchor-size(width) + 2 * var(--combobox-popup-padding))",xo="calc(anchor(left) - var(--combobox-popup-padding))",Co="calc(anchor(top) - var(--combobox-popup-padding))";function g({"aria-labelledby":o,children:e,className:t,closeOnSelection:a="auto",id:s,maxHeight:r,maxWidth:b=H,minWidth:c=H,onCancel:p,onClose:x,onClick:m,preserveSearchOnClose:f=!1,search:E,style:B,variant:h="auto",...A}){const D=no.useMatchMedia(to.isWidthAtOrAbove("SM")),M=h==="popover"||h==="auto"&&D,Q=h==="drawer"||h==="auto"&&!D,Xo=N.useCancelCloseRequests("any",p),Jo=N.useWithStopPropagation(y=>{x?.(y),E&&bo(y)}),Ko=y=>{m?.(y),lo(y),io(y)};return n.jsx("dialog",{...A,"aria-labelledby":o,className:eo.cx_default(co,t),closedby:"any","data-close-on-selection":a,"data-preserve-search-on-close":f,"data-variant":h,id:s,onCancel:Xo,onClose:Jo,onClick:Ko,style:{...B,maxHeight:r},children:n.jsxs(_.Provider,{value:{variant:h},children:[M&&n.jsx(Zo.AnchorPositioning,{anchorElementId:o,left:xo,maxWidth:b,minWidth:c,positionedElementId:s,positionTryFallbacks:"flip-block, flip-inline",top:Co}),(E||Q)&&n.jsxs(uo,{children:[E,Q&&n.jsx(te,{})]}),n.jsx(po,{children:e})]})})}g.Context=_;g.useContext=$;g.open=w;g.close=v;function mo(o,e){const t=d.useRef(e);d.useEffect(function(){t.current=e},[e]),d.useEffect(function(){const s=document.getElementById(o);if(s instanceof HTMLElement){const r=new AbortController;return s.addEventListener("toggle",b=>t.current(b),{signal:r.signal}),()=>r.abort()}},[o])}function fo(o){const[e,t]=d.useState(!1);return mo(o,a=>{t(a.newState==="open")}),e}function Eo({"aria-label":o="Open popup","aria-controls":e,onClick:t,...a}){const s=r=>{t?.(r),w(e)};return n.jsx(V.Button,{...a,"aria-controls":e,"aria-label":o,hasNoPadding:!0,iconLeft:n.jsx(Qo.ChevronDownIcon,{}),onClick:s,size:"small",tabIndex:-1,variant:"tertiary"})}const ho=i.styled_default("div")({name:"ElComboboxButtonContainer",class:"el-combobox-button-container",propsAsIs:!1}),go=i.styled_default("button")({name:"ElComboboxButton",class:"el-combobox-button",propsAsIs:!1}),Io=i.styled_default("span")({name:"ElComboboxButtonIconContainer",class:"el-combobox-button-icon-container",propsAsIs:!1}),Oo=i.styled_default("span")({name:"ElComboboxButtonLabelContainer",class:"el-combobox-button-label-container",propsAsIs:!1}),yo=i.styled_default("span")({name:"ElComboboxButtonActionContainer",class:"el-combobox-button-action-container",propsAsIs:!1});function L({action:o,"aria-controls":e,"aria-expanded":t,children:a,className:s,id:r,leadingIcon:b,placeholder:c="Select an option",size:p="medium",style:x,...m}){const f=!!a;return n.jsxs(ho,{className:s,"data-size":p,style:x,children:[n.jsxs(go,{...m,"aria-autocomplete":"list","aria-controls":e,"aria-expanded":t,"aria-haspopup":"dialog",id:r,role:"combobox",type:"button",children:[b&&n.jsx(Io,{children:b}),n.jsx(Oo,{"data-has-selection":f,"data-placeholder":c,children:f?a:c})]}),o&&n.jsx(yo,{children:o})]})}L.ClearButton=so;L.OpenPopupButton=Eo;const Lo=i.styled_default("div")({name:"ElComboboxCard",class:"el-combobox-card",propsAsIs:!1}),So=i.styled_default("button")({name:"ElComboboxCardButton",class:"el-combobox-card-button",propsAsIs:!1}),Ao=i.styled_default("span")({name:"ElComboboxCardActionContainer",class:"el-combobox-card-action-container",propsAsIs:!1});function Po({action:o,"aria-controls":e,"aria-disabled":t=!0,"aria-expanded":a,children:s,className:r,id:b,onClick:c,size:p="medium",style:x,...m}){const f=E=>{if(E.currentTarget.getAttribute("aria-disabled")==="true"){E.stopPropagation(),E.preventDefault();return}c?.(E)};return n.jsxs(Lo,{className:r,"data-size":p,style:x,children:[n.jsx(So,{...m,"aria-autocomplete":"list","aria-controls":e,"aria-disabled":t,"aria-expanded":a,"aria-haspopup":"dialog",id:b,onClick:f,role:"combobox",type:"button",children:s}),o&&n.jsx(Ao,{children:o})]})}const Bo=i.styled_default("span")({name:"ElComboboxCardDefaultContent",class:"el-combobox-card-default-content",propsAsIs:!1}),Do=i.styled_default("span")({name:"ElComboboxCardDefaultContentLabel",class:"el-combobox-card-default-content-label",propsAsIs:!1}),jo=i.styled_default("span")({name:"ElComboboxCardDefaultContentAdditionalInfo",class:"el-combobox-card-default-content-additional-info",propsAsIs:!1});function z({additionalInfo:o,children:e,...t}){return n.jsxs(Bo,{...t,children:[n.jsx(Do,{children:e}),n.jsx(jo,{children:o})]})}z.displayName="Combobox.CardDefaultContent";const T=d.createContext(null);function I(){const o=d.useContext(T);if(!o)throw new Error("useComboboxContext requires a Combobox ancestor");return o}const vo=d.createContext([]);function k(){return d.useContext(vo)}const _o=i.styled_default("div")({name:"ElComboboxListbox",class:"el-combobox-listbox",propsAsIs:!1}),wo=i.styled_default("div")({name:"ElComboboxListboxPlaceholder",class:"el-combobox-listbox-placeholder",propsAsIs:!1});function R({children:o,...e}){const{size:t}=I();return C.useListboxRenderContext()==="native"?null:n.jsx(wo,{...e,"aria-live":"polite","data-size":t,role:"status",children:o})}R.displayName="Combobox.ListboxPlaceholder";const To=i.styled_default("div")({name:"ElComboboxOptgroup",class:"el-combobox-optgroup",propsAsIs:!1}),ko=i.styled_default("div")({name:"ElComboboxOptgroupLabelContainer",class:"el-combobox-optgroup-label-container",propsAsIs:!1});function qo({"aria-label":o,children:e,label:t,...a}){const s=d.useId();return n.jsxs(To,{...a,"aria-label":o,"aria-labelledby":o?void 0:s,role:"group",children:[t&&n.jsx(ko,{id:s,children:t}),e]})}function W(o){return n.jsx(C.Listbox.Optgroup,{as:qo,...o})}W.displayName="Combobox.Optgroup";function F(o){return"ariaLabelledByElements"in Element.prototype?o.ariaLabelledByElements?.at(0)?.textContent??o.textContent:document.getElementById(o.getAttribute("aria-labelledby"))?.textContent??o.textContent}const Mo=i.styled_default("button")({name:"ElComboboxOption",class:"el-combobox-option",propsAsIs:!1}),No=i.styled_default("span")({name:"ElComboboxOptionCheckIconContainer",class:"el-combobox-option-check-icon-container",propsAsIs:!1}),Ho=i.styled_default("span")({name:"ElComboboxOptionLabel",class:"el-combobox-option-label",propsAsIs:!1}),G=i.styled_default("span")({name:"ElComboboxOptionTextContainer",class:"el-combobox-option-text-container",propsAsIs:!1}),U=i.styled_default("span")({name:"ElComboboxOptionBadgeContainer",class:"el-combobox-option-badge-container",propsAsIs:!1}),Vo=i.styled_default("span")({name:"ElComboboxOptionAdditionalInfoContainer",class:"el-combobox-option-additional-info-container",propsAsIs:!1}),$o=i.styled_default("span")({name:"ElComboboxOptionAdditionalInfo",class:"el-combobox-option-additional-info",propsAsIs:!1}),zo=i.styled_default("span")({name:"ElComboboxOptionAdditionalInfoIconContainer",class:"el-combobox-option-additional-info-icon-container",propsAsIs:!1});function Y({badge:o,children:e,icon:t,...a}){return n.jsxs($o,{...a,children:[t&&n.jsx(zo,{children:t}),n.jsx(G,{children:e}),o&&n.jsx(U,{children:o})]})}Y.displayName="Combobox.OptionAdditionalInfo";function S({badge:o,children:e,additionalInfo:t,size:a="medium",...s}){const r=d.useId(),b=d.useId(),c=d.useId(),p=[o&&r,t&&c].filter(x=>!!x).join(" ")||void 0;return n.jsxs(Mo,{...s,"aria-labelledby":b,"aria-details":p,"data-size":a,role:"option",type:"button",children:[n.jsx(No,{"aria-hidden":!0,children:n.jsx(oe.CheckIcon,{})}),n.jsxs(Ho,{children:[n.jsx(G,{id:b,children:e}),o&&n.jsx(U,{id:r,children:o})]}),t&&n.jsx(Vo,{id:c,children:t})]})}S.getOptionLabel=F;S.AdditionalInfo=Y;function O(o){const{size:e}=I();return n.jsx(C.Listbox.Option,{as:S,...o,size:e==="small"?"medium":e})}O.displayName="Combobox.Option";O.getLabel=S.getOptionLabel;O.AdditionalInfo=S.AdditionalInfo;function u({defaultValue:o,...e}){const a=k().map(p=>p.value),{disabled:s,listboxId:r,multiple:b,required:c}=I();return n.jsx(C.Listbox,{...e,as:_o,"aria-disabled":s,"aria-multiselectable":b,"aria-orientation":"vertical","aria-required":c,defaultValue:o??a,id:r,selectionFollowsFocus:!1})}u.displayName="Combobox.Listbox";u.Divider=C.Listbox.Divider;u.Optgroup=W;u.Option=O;u.OptionAdditionalInfo=O.AdditionalInfo;u.Placeholder=R;u.clearValue=C.Listbox.clearValue;u.getOptionLabel=O.getLabel;u.getSelectedOptions=C.Listbox.getSelectedOptions;u.getValue=C.Listbox.getValue;u.setOptionSelectedState=C.Listbox.setOptionSelectedState;u.useState=C.Listbox.useState;function P(o){const{comboboxId:e,popupId:t}=I();return n.jsx(g,{...o,"aria-labelledby":e,id:t,children:o.children})}P.displayName="Combobox.Popup";P.show=g.open;P.hide=g.close;function ne({isXSBreakpoint:o,popupVariant:e}){switch(e){case"drawer":return"borderless";case"popover":return"default";case"auto":return o?"borderless":"default"}}function Ro(o){const{variant:e}=$(),t=no.useMatchMedia(to.isWidthBelow("SM")),a=ne({isXSBreakpoint:t,popupVariant:e});return n.jsx(oo.SearchInput,{...o,type:"text",variant:a})}Ro.displayName="Combobox.SearchInput";function q(o,e=[]){const[t,a]=d.useState(()=>e);return C.useListboxSelectionObserver(o,(s,r)=>{a(b=>{const c=b.filter(x=>r.includes(x.value)),p=s.filter(x=>!b.some(m=>m.value===x.value)).map(x=>({label:F(x),value:x.value}));return[...c,...p]})}),t}function ae({children:o,defaultOptions:e,listboxId:t}){const a=k(),s=q(t,e??a);return se(s)?o?.(s[0])??s[0].label:null}function se(o){return o.length>0}const Wo=d.createContext(null);function le(){const o=d.useContext(Wo);if(!o)throw new Error("useComboboxSelectionChipsContext requires a ComboboxSelectionChips ancestor");return o}function Fo({children:o,value:e,...t}){const a=le();return n.jsx(ao.ChipGroup.Item,{...t,"aria-controls":a.listboxId,"aria-label":`Remove ${o}`,onClick:()=>C.setListboxOptionSelectedState(a.listboxId,e,()=>!1),value:e,children:o})}const ie="el-combobox-selection-chips";function X({children:o,className:e,defaultOptions:t,listboxId:a,...s}){const r=k(),b=q(a,t??r);if(!re(b))return null;const c=o?.(b)??b.map(p=>n.jsx(Fo,{value:p.value,children:p.label},p.value));return n.jsx(ao.ChipGroup,{...s,className:eo.cx_default(ie,e),variant:"selection",children:n.jsx(Wo.Provider,{value:{listboxId:a},children:c})})}function re(o){return o.length>0}X.Item=Fo;const Go=i.styled_default("div")({name:"ElCombobox",class:"el-combobox",propsAsIs:!1});function J(o){return`${o}-listbox`}function K(o){return`${o}-popup`}function Uo({onClick:o}={}){const{ariaDescribedBy:e,ariaErrorMessage:t,ariaInvalid:a,ariaLabelledBy:s,comboboxId:r,disabled:b,popupId:c,required:p}=I(),x=fo(c);return{"aria-controls":c,"aria-describedby":e,"aria-errormessage":t,"aria-expanded":x,"aria-invalid":a,"aria-labelledby":s,"aria-required":p,disabled:b,id:r,onClick:f=>{o?.(f),w(c)},role:"combobox"}}function Yo(o){const[e,t]=d.useState(!1);return C.useListboxSelectionObserver(o,(a,s)=>{t(s.length>0)}),e}function l({"aria-describedby":o,"aria-errormessage":e,"aria-invalid":t,"aria-labelledby":a,children:s,disabled:r=!1,id:b,maxWidth:c,multiple:p=!1,required:x=!1,showValidity:m=!1,size:f="medium",style:E,...B}){const h=d.useId(),A=b??h,D=J(A),M=K(A);return n.jsx(T.Provider,{value:{ariaDescribedBy:o,ariaErrorMessage:e,ariaInvalid:t,ariaLabelledBy:a,comboboxId:A,disabled:r,listboxId:D,multiple:p,popupId:M,required:x,size:f},children:n.jsx(Go,{...B,"data-show-validity":m,style:{"--combobox-max-width":c,...E},children:s})})}l.getOptionLabel=u.getOptionLabel;l.getListboxValue=C.Listbox.getValue;l.getListboxId=J;l.getPopupId=K;l.Button=L;l.Card=Po;l.CardDefaultContent=z;l.ClearButton=L.ClearButton;l.Divider=u.Divider;l.Listbox=u;l.ListboxPlaceholder=u.Placeholder;l.OpenPopupButton=L.OpenPopupButton;l.Optgroup=u.Optgroup;l.Option=u.Option;l.OptionAdditionalInfo=u.OptionAdditionalInfo;l.Popup=P;l.SearchInput=Ro;l.SelectedContent=ae;l.SelectionChips=X;l.SelectionChipsItem=X.Item;l.Context=T;l.DefaultOptionsContext=vo;l.useButton=Uo;l.useContext=I;l.useDefaultOptionsContext=k;l.useHasSelection=Yo;l.useSelectedOptions=q;l.useState=u.useState;exports.CLOSE_ON_SELECTION=j;exports.Combobox=l;exports.ComboboxButton=L;exports.ComboboxButtonClearButton=so;exports.ComboboxButtonOpenPopupButton=Eo;exports.ComboboxCard=Po;exports.ComboboxCardDefaultContent=z;exports.ComboboxContext=T;exports.ComboboxListbox=u;exports.ComboboxListboxOptgroup=W;exports.ComboboxListboxOption=O;exports.ComboboxListboxPlaceholder=R;exports.ComboboxOptgroup=qo;exports.ComboboxOption=S;exports.ComboboxOptionAdditionalInfo=Y;exports.ComboboxPopup=P;exports.ComboboxPopupDialog=g;exports.ComboboxPopupDialogContext=_;exports.ElCombobox=Go;exports.ElComboboxButton=go;exports.ElComboboxButtonActionContainer=yo;exports.ElComboboxButtonContainer=ho;exports.ElComboboxButtonIconContainer=Io;exports.ElComboboxButtonLabelContainer=Oo;exports.ElComboboxCard=Lo;exports.ElComboboxCardActionContainer=Ao;exports.ElComboboxCardButton=So;exports.ElComboboxCardDefaultContent=Bo;exports.ElComboboxCardDefaultContentAdditionalInfo=jo;exports.ElComboboxCardDefaultContentLabel=Do;exports.ElComboboxListbox=_o;exports.ElComboboxListboxPlaceholder=wo;exports.ElComboboxOptgroup=To;exports.ElComboboxOptgroupLabelContainer=ko;exports.ElComboboxOption=Mo;exports.ElComboboxOptionAdditionalInfo=$o;exports.ElComboboxOptionAdditionalInfoContainer=Vo;exports.ElComboboxOptionAdditionalInfoIconContainer=zo;exports.ElComboboxOptionBadgeContainer=U;exports.ElComboboxOptionCheckIconContainer=No;exports.ElComboboxOptionLabel=Ho;exports.ElComboboxOptionTextContainer=G;exports.ElComboboxPopupDialogHeader=uo;exports.ElComboboxPopupDialogListboxContainer=po;exports.clearSearchInputOnClose=bo;exports.closeComboboxPopup=v;exports.closeOnBackdropClick=io;exports.defaultPopupInsetLeft=xo;exports.defaultPopupInsetTop=Co;exports.defaultPopupWidth=H;exports.elComboboxPopupDialog=co;exports.getComboboxListboxId=J;exports.getComboboxPopupId=K;exports.getOptionElement=ro;exports.getOptionLabel=F;exports.maybeCloseOnSelection=lo;exports.openComboboxPopup=w;exports.useComboboxButton=Uo;exports.useComboboxContext=I;exports.useComboboxHasSelection=Yo;exports.useComboboxPopupDialogContext=$;exports.useComboboxPopupObserver=mo;exports.useComboboxPopupState=fo;exports.useComboboxSelectedOptions=q;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as x } from "react/jsx-runtime";
|
|
2
|
-
import { s as l } from "./index-AHmiDD3r.js";
|
|
3
|
-
import { createContext as B, useContext as b, useId as I } from "react";
|
|
4
|
-
import "./button-base-BxF98pDk.js";
|
|
5
|
-
import { B as A } from "./button-DYIdjjTt.js";
|
|
6
|
-
import { CloseIcon as v } from "./icons/close.js";
|
|
7
|
-
import { s as F, t as N, r as q, v as O, q as j } from "./drawer-GNG7AmHl.js";
|
|
8
|
-
const w = /* @__PURE__ */ l("article")({
|
|
9
|
-
name: "ElDialogBody",
|
|
10
|
-
class: "el-dialog-body",
|
|
11
|
-
propsAsIs: !1
|
|
12
|
-
});
|
|
13
|
-
function u({ children: e, ...a }) {
|
|
14
|
-
return /* @__PURE__ */ o(w, { ...a, children: e });
|
|
15
|
-
}
|
|
16
|
-
u.displayName = "Dialog.Body";
|
|
17
|
-
const d = B(null);
|
|
18
|
-
function D() {
|
|
19
|
-
const e = b(d);
|
|
20
|
-
if (!e)
|
|
21
|
-
throw new Error("DialogContext not defined: useDialogContext can only be used in a child of DialogContext");
|
|
22
|
-
return e;
|
|
23
|
-
}
|
|
24
|
-
const z = /* @__PURE__ */ l("footer")({
|
|
25
|
-
name: "ElDialogFooter",
|
|
26
|
-
class: "el-dialog-footer",
|
|
27
|
-
propsAsIs: !1
|
|
28
|
-
});
|
|
29
|
-
function p({ children: e, ...a }) {
|
|
30
|
-
return /* @__PURE__ */ o(z, { ...a, children: e });
|
|
31
|
-
}
|
|
32
|
-
p.displayName = "Dialog.Footer";
|
|
33
|
-
function f() {
|
|
34
|
-
return /* @__PURE__ */ o("form", { children: /* @__PURE__ */ o(
|
|
35
|
-
A,
|
|
36
|
-
{
|
|
37
|
-
autoFocus: !0,
|
|
38
|
-
"aria-label": "Close",
|
|
39
|
-
formMethod: "dialog",
|
|
40
|
-
iconLeft: /* @__PURE__ */ o(v, { "aria-hidden": !0 }),
|
|
41
|
-
size: "large",
|
|
42
|
-
type: "submit",
|
|
43
|
-
variant: "tertiary"
|
|
44
|
-
}
|
|
45
|
-
) });
|
|
46
|
-
}
|
|
47
|
-
f.displayName = "Dialog.HeaderCloseButton";
|
|
48
|
-
const P = /* @__PURE__ */ l("header")({
|
|
49
|
-
name: "ElDialogHeader",
|
|
50
|
-
class: "el-dialog-header",
|
|
51
|
-
propsAsIs: !1
|
|
52
|
-
}), T = /* @__PURE__ */ l("div")({
|
|
53
|
-
name: "ElDialogHeaderContentContainer",
|
|
54
|
-
class: "el-dialog-header-content-container",
|
|
55
|
-
propsAsIs: !1
|
|
56
|
-
}), L = /* @__PURE__ */ l("div")({
|
|
57
|
-
name: "ElDialogHeaderAction",
|
|
58
|
-
class: "el-dialog-header-action",
|
|
59
|
-
propsAsIs: !1
|
|
60
|
-
}), M = /* @__PURE__ */ l("h2")({
|
|
61
|
-
name: "ElDialogHeaderTitle",
|
|
62
|
-
class: "el-dialog-header-title",
|
|
63
|
-
propsAsIs: !1
|
|
64
|
-
});
|
|
65
|
-
function i({ action: e, children: a, "aria-label": n, ...r }) {
|
|
66
|
-
const { titleId: s } = D();
|
|
67
|
-
return (
|
|
68
|
-
// NOTE: If we don't have a visible title, we should have an aria-label on this root element.
|
|
69
|
-
/* @__PURE__ */ o(P, { ...r, "aria-label": n, id: a ? void 0 : s, children: /* @__PURE__ */ x(T, { children: [
|
|
70
|
-
e && /* @__PURE__ */ o(L, { children: e }),
|
|
71
|
-
a && /* @__PURE__ */ o(M, { id: s, children: a })
|
|
72
|
-
] }) })
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
i.displayName = "Dialog.Header";
|
|
76
|
-
i.CloseButton = f;
|
|
77
|
-
const R = /* @__PURE__ */ l("dialog")({
|
|
78
|
-
name: "ElDialog",
|
|
79
|
-
class: "el-dialog",
|
|
80
|
-
propsAsIs: !1
|
|
81
|
-
});
|
|
82
|
-
function t({
|
|
83
|
-
"aria-labelledby": e,
|
|
84
|
-
children: a,
|
|
85
|
-
closedBy: n = "closerequest",
|
|
86
|
-
isOpen: r,
|
|
87
|
-
onCancel: s,
|
|
88
|
-
onClose: m,
|
|
89
|
-
size: C,
|
|
90
|
-
...E
|
|
91
|
-
}) {
|
|
92
|
-
const c = F(r), y = N(c), g = I(), h = q(n, s), H = O(m);
|
|
93
|
-
return /* @__PURE__ */ o(
|
|
94
|
-
R,
|
|
95
|
-
{
|
|
96
|
-
...E,
|
|
97
|
-
"aria-labelledby": e ?? g,
|
|
98
|
-
"data-size": C,
|
|
99
|
-
ref: c,
|
|
100
|
-
onCancel: h,
|
|
101
|
-
onClose: H,
|
|
102
|
-
children: /* @__PURE__ */ o(d.Provider, { value: { titleId: g }, children: y && a })
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
t.Body = u;
|
|
107
|
-
t.Footer = p;
|
|
108
|
-
t.Header = i;
|
|
109
|
-
t.HeaderCloseButton = i.CloseButton;
|
|
110
|
-
t.Context = d;
|
|
111
|
-
t.useContext = D;
|
|
112
|
-
t.getClosestDialogElement = j;
|
|
113
|
-
export {
|
|
114
|
-
t as D,
|
|
115
|
-
R as E
|
|
116
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),a=require("./index-BAGJrh44.cjs"),c=require("react");require("./button-base-BR_9696S.cjs");const B=require("./button-DwYL4ezg.cjs"),I=require("./icons/close.cjs"),s=require("./drawer-DcgSXF1g.cjs"),q=a.styled_default("article")({name:"ElDialogBody",class:"el-dialog-body",propsAsIs:!1});function f({children:e,...l}){return o.jsx(q,{...l,children:e})}f.displayName="Dialog.Body";const u=c.createContext(null);function C(){const e=c.useContext(u);if(!e)throw new Error("DialogContext not defined: useDialogContext can only be used in a child of DialogContext");return e}const A=a.styled_default("footer")({name:"ElDialogFooter",class:"el-dialog-footer",propsAsIs:!1});function p({children:e,...l}){return o.jsx(A,{...l,children:e})}p.displayName="Dialog.Footer";function x(){return o.jsx("form",{children:o.jsx(B.Button,{autoFocus:!0,"aria-label":"Close",formMethod:"dialog",iconLeft:o.jsx(I.CloseIcon,{"aria-hidden":!0}),size:"large",type:"submit",variant:"tertiary"})})}x.displayName="Dialog.HeaderCloseButton";const _=a.styled_default("header")({name:"ElDialogHeader",class:"el-dialog-header",propsAsIs:!1}),v=a.styled_default("div")({name:"ElDialogHeaderContentContainer",class:"el-dialog-header-content-container",propsAsIs:!1}),F=a.styled_default("div")({name:"ElDialogHeaderAction",class:"el-dialog-header-action",propsAsIs:!1}),N=a.styled_default("h2")({name:"ElDialogHeaderTitle",class:"el-dialog-header-title",propsAsIs:!1});function i({action:e,children:l,"aria-label":r,...d}){const{titleId:n}=C();return o.jsx(_,{...d,"aria-label":r,id:l?void 0:n,children:o.jsxs(v,{children:[e&&o.jsx(F,{children:e}),l&&o.jsx(N,{id:n,children:l})]})})}i.displayName="Dialog.Header";i.CloseButton=x;const y=a.styled_default("dialog")({name:"ElDialog",class:"el-dialog",propsAsIs:!1});function t({"aria-labelledby":e,children:l,closedBy:r="closerequest",isOpen:d,onCancel:n,onClose:E,size:m,...h}){const g=s.useDialogController(d),H=s.useDialogObserver(g),D=c.useId(),b=s.useCancelCloseRequests(r,n),j=s.useWithStopPropagation(E);return o.jsx(y,{...h,"aria-labelledby":e??D,"data-size":m,ref:g,onCancel:b,onClose:j,children:o.jsx(u.Provider,{value:{titleId:D},children:H&&l})})}t.Body=f;t.Footer=p;t.Header=i;t.HeaderCloseButton=i.CloseButton;t.Context=u;t.useContext=C;t.getClosestDialogElement=s.getClosestDialogElement;exports.Dialog=t;exports.ElDialog=y;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("./index-BAGJrh44.cjs"),o=require("react");require("./button-base-BR_9696S.cjs");const P=require("./button-DwYL4ezg.cjs"),W=require("./icons/close.cjs"),y=s.styled_default("article")({name:"ElDrawerBody",class:"el-drawer-body",propsAsIs:!1});function D({children:e,...r}){return a.jsx(y,{...r,children:e})}D.displayName="Drawer.Body";const u=o.createContext(null);function f(){const e=o.useContext(u);if(!e)throw new Error("DrawerContext not defined: useDrawerContext can only be used in a child of DrawerContext");return e}const x=s.styled_default("footer")({name:"ElDrawerFooter",class:"el-drawer-footer",propsAsIs:!1});function C({children:e,...r}){return a.jsx(x,{...r,children:e})}C.displayName="Drawer.Footer";function E(){return a.jsx("form",{children:a.jsx(P.Button,{autoFocus:!0,"aria-label":"Close",formMethod:"dialog",iconLeft:a.jsx(W.CloseIcon,{"aria-hidden":!0}),size:"large",type:"submit",variant:"tertiary"})})}E.displayName="Drawer.HeaderCloseButton";const k="drawer-header",h=s.styled_default("header")({name:"ElDrawerHeader",class:"el-drawer-header",propsAsIs:!1}),m=s.styled_default("div")({name:"ElDrawerHeaderTabsContainer",class:"el-drawer-header-tabs-container",propsAsIs:!1}),g=s.styled_default("div")({name:"ElDrawerHeaderContentContainer",class:"el-drawer-header-content-container",propsAsIs:!1}),A=s.styled_default("div")({name:"ElDrawerHeaderTitleContainer",class:"el-drawer-header-title-container",propsAsIs:!1}),b=s.styled_default("div")({name:"ElDrawerHeaderAction",class:"el-drawer-header-action",propsAsIs:!1}),I=s.styled_default("div")({name:"ElDrawerHeaderOverline",class:"el-drawer-header-overline",propsAsIs:!1}),_=s.styled_default("h2")({name:"ElDrawerHeaderTitle",class:"el-drawer-header-title",propsAsIs:!1}),j=s.styled_default("div")({name:"ElDrawerHeaderSupplementaryInfo",class:"el-drawer-header-supplementary-info",propsAsIs:!1});function i({action:e,overline:r,children:t,supplementaryInfo:n,tabs:d,...c}){const{titleId:w}=f()??{};return a.jsx(h,{...c,children:a.jsxs(g,{children:[a.jsxs(A,{children:[e&&a.jsx(b,{children:e}),r&&a.jsx(I,{children:r}),a.jsx(_,{id:w,children:t}),n&&a.jsx(j,{children:n})]}),d&&a.jsx(m,{children:d})]})})}i.displayName="Drawer.Header";i.CloseButton=E;const v=s.styled_default("dialog")({name:"ElDrawer",class:"el-drawer",propsAsIs:!1});function B(e){return e.closest("dialog")}function R(e,r){return o.useCallback(t=>{t.stopPropagation(),e==="none"&&t.target===t.currentTarget?t.preventDefault():r?.(t)},[e,r])}function T(e){const r=o.useRef(null);return o.useLayoutEffect(function(){!r.current||e===void 0||(e?r.current.showModal():r.current.close())},[e]),r}function O(e){const[r,t]=o.useState(!1);return o.useLayoutEffect(()=>{if(!e.current)return;const n=e.current;t(n.open);const d=new MutationObserver(()=>{t(n.open)});return d.observe(n,{attributeFilter:["open"]}),()=>d.disconnect()},[e,t]),r}function N(e){return o.useCallback(r=>{r.stopPropagation(),e?.(r)},[e])}function l({"aria-label":e,"aria-labelledby":r,children:t,closedBy:n="closerequest",isOpen:d,onCancel:c,onClose:w,...S}){const p=T(d),q=O(p),H=o.useId(),F=R(n,c),M=N(w);return a.jsx(v,{...S,"aria-label":e,"aria-labelledby":e?void 0:r??H,ref:p,onCancel:F,onClose:M,children:a.jsx(u.Provider,{value:{titleId:H},children:q&&t})})}l.Body=D;l.Footer=C;l.Header=i;l.HeaderCloseButton=i.CloseButton;l.Context=u;l.useContext=f;l.getClosestDialogElement=B;exports.DRAWER_HEADER_CSS_CONTAINER_NAME=k;exports.Drawer=l;exports.DrawerBody=D;exports.DrawerContext=u;exports.DrawerFooter=C;exports.DrawerHeader=i;exports.DrawerHeaderCloseButton=E;exports.ElDrawer=v;exports.ElDrawerBody=y;exports.ElDrawerFooter=x;exports.ElDrawerHeader=h;exports.ElDrawerHeaderAction=b;exports.ElDrawerHeaderContentContainer=g;exports.ElDrawerHeaderOverline=I;exports.ElDrawerHeaderSupplementaryInfo=j;exports.ElDrawerHeaderTabsContainer=m;exports.ElDrawerHeaderTitle=_;exports.ElDrawerHeaderTitleContainer=A;exports.getClosestDialogElement=B;exports.useCancelCloseRequests=R;exports.useDialogController=T;exports.useDialogObserver=O;exports.useDrawerContext=f;exports.useWithStopPropagation=N;
|