@lion/ui 0.0.9 → 0.0.11
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/components/accordion/src/LionAccordion.js +2 -2
- package/components/core/src/SlotMixin.js +2 -1
- package/components/dialog/src/LionDialog.js +0 -28
- package/components/dialog/test/lion-dialog.test.js +11 -10
- package/components/form-integrations/test/form-group-methods.test.js +6 -4
- package/components/form-integrations/test/form-integrations.test.js +10 -5
- package/components/form-integrations/test/helpers/umbrella-form.js +10 -0
- package/components/form-integrations/test/model-value-consistency.test.js +29 -20
- package/components/input-datepicker/src/LionInputDatepicker.js +66 -104
- package/components/input-datepicker/src/localizeNamespaceLoader.js +188 -0
- package/components/input-datepicker/test/lion-input-datepicker.test.js +15 -20
- package/components/input-datepicker/test-helpers/DatepickerInputObject.js +3 -3
- package/components/input-tel/src/parsers.js +1 -1
- package/components/listbox/test-suites/ListboxMixin.suite.js +3 -3
- package/components/localize/src/singleton.js +1 -1
- package/components/localize/test/number/formatNumber.test.js +2 -6
- package/components/overlays/src/OverlayController.js +292 -291
- package/components/overlays/src/OverlayMixin.js +17 -18
- package/components/overlays/src/OverlaysManager.js +28 -53
- package/components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js +32 -0
- package/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js +76 -0
- package/components/overlays/src/configurations/withBottomSheetConfig.js +3 -0
- package/components/overlays/src/configurations/withDropdownConfig.js +3 -0
- package/components/overlays/src/configurations/withModalDialogConfig.js +3 -0
- package/components/overlays/src/configurations/withTooltipConfig.js +29 -0
- package/components/overlays/src/overlayDocumentStyle.js +24 -0
- package/components/overlays/src/overlayShadowDomStyle.js +138 -0
- package/components/overlays/src/singleton.js +3 -1
- package/components/overlays/test/ArrowMixin.test.js +0 -1
- package/components/overlays/test/OverlayController.test.js +372 -274
- package/components/overlays/test/OverlaysManager.test.js +23 -32
- package/components/overlays/test/global-positioning.test.js +4 -15
- package/components/overlays/test/local-positioning.test.js +65 -38
- package/components/overlays/test-suites/OverlayMixin.suite.js +18 -26
- package/components/overlays/types/OverlayConfig.ts +38 -11
- package/components/overlays/types/OverlayMixinTypes.ts +2 -2
- package/components/select-rich/src/LionSelectInvoker.js +2 -3
- package/components/select-rich/src/LionSelectRich.js +22 -20
- package/components/select-rich/test/lion-select-rich.test.js +5 -7
- package/components/tooltip/src/LionTooltip.js +3 -90
- package/components/tooltip/test/lion-tooltip.test.js +52 -20
- package/custom-elements.json +535 -503
- package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +0 -2
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts +4 -0
- package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts.map +1 -1
- package/dist-types/components/form-integrations/test/model-value-consistency.test.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +3 -3
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts +4 -0
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +56 -101
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlaysManager.d.ts +0 -7
- package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.d.ts +12 -0
- package/dist-types/components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.d.ts.map +1 -0
- package/dist-types/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.d.ts +18 -0
- package/dist-types/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.d.ts.map +1 -0
- package/dist-types/components/overlays/src/configurations/withBottomSheetConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withModalDialogConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/src/configurations/withTooltipConfig.d.ts +8 -0
- package/dist-types/components/overlays/src/configurations/withTooltipConfig.d.ts.map +1 -0
- package/dist-types/components/overlays/src/overlayDocumentStyle.d.ts +2 -0
- package/dist-types/components/overlays/src/overlayDocumentStyle.d.ts.map +1 -0
- package/dist-types/components/overlays/src/overlayShadowDomStyle.d.ts +2 -0
- package/dist-types/components/overlays/src/overlayShadowDomStyle.d.ts.map +1 -0
- package/dist-types/components/overlays/src/singleton.d.ts +2 -1
- package/dist-types/components/overlays/src/singleton.d.ts.map +1 -1
- package/dist-types/components/overlays/test-suites/OverlayMixin.suite.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +19 -10
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +2 -2
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts +3 -27
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich.test.d.ts.map +1 -1
- package/dist-types/components/tooltip/src/LionTooltip.d.ts +4 -20
- package/dist-types/components/tooltip/src/LionTooltip.d.ts.map +1 -1
- package/dist-types/components/tooltip/test/lion-tooltip.test.d.ts.map +1 -1
- package/dist-types/exports/input-datepicker.d.ts +0 -1
- package/dist-types/exports/overlays.d.ts +1 -1
- package/dist-types/exports/types/overlays.d.ts +1 -0
- package/dist-types/exports/types/overlays.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +5 -9
- package/docs/components/dialog/use-cases.md +43 -87
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/use-cases.md +4 -0
- package/docs/fundamentals/systems/form/validate.md +1 -1
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/assets/{applyDemoOverlayStyles.js → applyDemoOverlayStyles.mjs} +2 -1
- package/docs/fundamentals/systems/overlays/assets/demo-el-using-overlaymixin.mjs +119 -0
- package/docs/fundamentals/systems/overlays/assets/{demo-overlay-backdrop.js → demo-overlay-backdrop.mjs} +3 -4
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-positioning.mjs +537 -0
- package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -2
- package/docs/fundamentals/systems/overlays/configuration.md +56 -54
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +83 -77
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +6 -6
- package/docs/guides/how-to/extend-a-native-input.md +3 -3
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/exports/input-datepicker.js +0 -1
- package/exports/overlays.js +1 -1
- package/exports/types/overlays.ts +1 -0
- package/package.json +2 -1
- package/components/input-datepicker/src/LionCalendarOverlayFrame.js +0 -125
- package/components/overlays/src/globalOverlaysStyle.js +0 -139
- package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts +0 -10
- package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts.map +0 -1
- package/dist-types/components/overlays/src/globalOverlaysStyle.d.ts +0 -2
- package/dist-types/components/overlays/src/globalOverlaysStyle.d.ts.map +0 -1
- package/dist-types/exports/define/lion-calendar-overlay-frame.d.ts +0 -2
- package/dist-types/exports/define/lion-calendar-overlay-frame.d.ts.map +0 -1
- package/docs/fundamentals/systems/overlays/assets/demo-overlay-system.js +0 -42
- package/docs/fundamentals/systems/overlays/form-integration.md +0 -65
- package/docs/fundamentals/systems/overlays/scope.md +0 -176
- package/exports/define/lion-calendar-overlay-frame.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotMixin.d.ts","sourceRoot":"","sources":["../../../../components/core/src/SlotMixin.js"],"names":[],"mappings":"wBAMa,OAAO,4BAA4B,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"SlotMixin.d.ts","sourceRoot":"","sources":["../../../../components/core/src/SlotMixin.js"],"names":[],"mappings":"wBAMa,OAAO,4BAA4B,EAAE,SAAS;AA6O3D,mmBAA8D;uBA5OjD,OAAO,4BAA4B,EAAE,QAAQ;iCAC7C,OAAO,4BAA4B,EAAE,kBAAkB;iCACvD,OAAO,4BAA4B,EAAE,kBAAkB;yBACvD,OAAO,KAAK,EAAE,UAAU"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
declare const LionDialog_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("../../overlays/types/OverlayMixinTypes.js").OverlayHost> & Pick<typeof import("../../overlays/types/OverlayMixinTypes.js").OverlayHost, "prototype"> & Pick<typeof LitElement, "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "getPropertyOptions" | "shadowRootOptions">;
|
|
2
2
|
export class LionDialog extends LionDialog_base {
|
|
3
|
-
/** @private */
|
|
4
|
-
private __toggle;
|
|
5
3
|
render(): import("lit-html").TemplateResult<1>;
|
|
6
4
|
}
|
|
7
5
|
import { LitElement } from "lit";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionDialog.d.ts","sourceRoot":"","sources":["../../../../components/dialog/src/LionDialog.js"],"names":[],"mappings":";AAGA;
|
|
1
|
+
{"version":3,"file":"LionDialog.d.ts","sourceRoot":"","sources":["../../../../components/dialog/src/LionDialog.js"],"names":[],"mappings":";AAGA;IAWE,+CAOC;CACF"}
|
|
@@ -5,6 +5,10 @@ export class UmbrellaForm extends LitElement {
|
|
|
5
5
|
*/
|
|
6
6
|
set serializedValue(arg: string);
|
|
7
7
|
__serializedValue: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Prevents errors outside test from being thrown
|
|
10
|
+
*/
|
|
11
|
+
waitForAllChildrenUpdates(): Promise<any[]>;
|
|
8
12
|
render(): import("lit-html").TemplateResult<1>;
|
|
9
13
|
}
|
|
10
14
|
import { LitElement } from "lit";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"umbrella-form.d.ts","sourceRoot":"","sources":["../../../../../components/form-integrations/test/helpers/umbrella-form.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"umbrella-form.d.ts","sourceRoot":"","sources":["../../../../../components/form-integrations/test/helpers/umbrella-form.js"],"names":[],"mappings":"AA2BA;IACE,sEAIC;IAED;;OAEG;IACH,iCAEC;IADC,sCAA0B;IAG5B;;OAEG;IACH,4CAEC;IAED,+CAkIC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-value-consistency.test.d.ts","sourceRoot":"","sources":["../../../../components/form-integrations/test/model-value-consistency.test.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-value-consistency.test.d.ts","sourceRoot":"","sources":["../../../../components/form-integrations/test/model-value-consistency.test.js"],"names":[],"mappings":"yBAkCa,OAAO,KAAK,EAAE,UAAU;wBACxB,OAAO,kCAAkC,EAAE,SAAS;0BACpD,OAAO,gDAAgD,EAAE,eAAe,GAAG,UAAU,GAAG;IAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAAC,uBAAuB,WAAU;CAAE;wBAC7N,OAAO,8BAA8B,EAAE,SAAS;yBAChD,OAAO,gCAAgC,EAAE,UAAU;yBACnD,OAAO,iCAAiC,EAAE,UAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const LionInputDatepicker_base: typeof LionInputDate & import("@open-wc/dedupe-mixin").Constructor<import("../../
|
|
1
|
+
declare const LionInputDatepicker_base: typeof LionInputDate & import("@open-wc/dedupe-mixin").Constructor<import("../../localize/types/LocalizeMixinTypes.js").LocalizeMixinHost> & Pick<typeof import("../../localize/types/LocalizeMixinTypes.js").LocalizeMixinHost, "prototype" | "localizeNamespaces" | "waitForLocalizeNamespaces"> & Pick<typeof import("lit").LitElement, "prototype" | "_$litElement$" | "enabledWarnings" | "enableWarning" | "disableWarning" | "addInitializer" | "_initializers" | "elementProperties" | "properties" | "elementStyles" | "styles" | "observedAttributes" | "createProperty" | "getPropertyOptions" | "shadowRootOptions"> & import("@open-wc/dedupe-mixin").Constructor<import("../../overlays/types/OverlayMixinTypes.js").OverlayHost> & Pick<typeof import("../../overlays/types/OverlayMixinTypes.js").OverlayHost, "prototype"> & import("@open-wc/dedupe-mixin").Constructor<import("../../overlays/types/ArrowMixinTypes.js").ArrowHost> & Pick<typeof import("../../overlays/types/ArrowMixinTypes.js").ArrowHost, "prototype" | "properties" | "styles"> & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types.js").ScopedElementsHost>;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {import('../../form-core/src/validate/Validator.js').Validator} Validator
|
|
4
4
|
* @typedef {import('lit').RenderOptions} RenderOptions
|
|
@@ -9,8 +9,8 @@ declare const LionInputDatepicker_base: typeof LionInputDate & import("@open-wc/
|
|
|
9
9
|
export class LionInputDatepicker extends LionInputDatepicker_base {
|
|
10
10
|
static get scopedElements(): {
|
|
11
11
|
'lion-calendar': typeof LionCalendar;
|
|
12
|
-
'lion-calendar-overlay-frame': typeof LionCalendarOverlayFrame;
|
|
13
12
|
};
|
|
13
|
+
static get styles(): (import("lit").CSSResultOrNative | import("lit").CSSResultArray)[];
|
|
14
14
|
/** @type {any} */
|
|
15
15
|
static get properties(): any;
|
|
16
16
|
/**
|
|
@@ -62,6 +62,7 @@ export class LionInputDatepicker extends LionInputDatepicker_base {
|
|
|
62
62
|
* @protected
|
|
63
63
|
*/
|
|
64
64
|
protected _overlayTemplate(): import("lit-html").TemplateResult<1>;
|
|
65
|
+
_overlayFrameTemplate(): import("lit-html").TemplateResult<1>;
|
|
65
66
|
render(): import("lit-html").TemplateResult<1>;
|
|
66
67
|
/**
|
|
67
68
|
* Subclassers can replace this with their custom extension of
|
|
@@ -110,6 +111,5 @@ export type Validator = import('../../form-core/src/validate/Validator.js').Vali
|
|
|
110
111
|
export type RenderOptions = import('lit').RenderOptions;
|
|
111
112
|
import { LionInputDate } from "../../../exports/input-date.js";
|
|
112
113
|
import { LionCalendar } from "../../../exports/calendar.js";
|
|
113
|
-
import { LionCalendarOverlayFrame } from "./LionCalendarOverlayFrame.js";
|
|
114
114
|
export {};
|
|
115
115
|
//# sourceMappingURL=LionInputDatepicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionInputDatepicker.d.ts","sourceRoot":"","sources":["../../../../components/input-datepicker/src/LionInputDatepicker.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"LionInputDatepicker.d.ts","sourceRoot":"","sources":["../../../../components/input-datepicker/src/LionInputDatepicker.js"],"names":[],"mappings":";AAeA;;;GAGG;AAEH;;GAEG;AACH;IAGE;;MAKC;IAED,wFAgCC;IAED,kBAAkB;IAClB,6BA+BC;IAwQD;;;;;OAKG;IACH,gDAFa,IAAI,GAAC,SAAS,CAI1B;IAnQD;;OAEG;IACH,0CAEC;IAED;;;OAGG;IACH,4CAIC;IAIC,eAAe;IACf,oBAAiD;IACjD,iBAAiB;IACjB,uCAAoC;IAGpC,iBAAiB;IACjB,mDAA2C;IAC3C,iBAAiB;IACjB,qCAA6B;IAC7B,iBAAiB;IACjB,qCAA6B;IAC7B,iBAAiB;IACjB,gDAAyC;IA+K3C,uCAOC;IAYD;;OAEG;IACH,6DAFW;QAAE,MAAM,EAAE;YAAE,YAAY,EAAE,IAAI,CAAA;SAAE,CAAA;KAAC,QAc3C;IAzMD,eAAe;IACf,gCAEC;IAgBD,eAAe;IACf,gCAKC;IAgBG,qBAAyD;IAI7D;;;;;OAKG;IACH,mEASC;IAED,8DAoBC;IAED,+CAOC;IAED;;;OAGG;IAEH,0DAeC;IAED;;;OAGG;IAEH,yDAYC;IAKC,iDAEC;IAIH;;;;OAIG;IAEH,iCAHa,MAAM,CAmBlB;IAWD;;;OAGG;IACH,iCAIC;IAqCD;;;;OAIG;IACH,gCAFW,SAAS,EAAE,QAkBrB;IAVK,uBAAgC;IAEhC,uBAAgC;IAKhC,4BAAqC;IAK3C;;;;;;OAMG;IAEH,iCALW,KAAK,GAAC,WAAW,YACjB;QAAC,SAAS,EAAE,SAAS,CAAA;KAAC,QAUhC;IAgBC,mDAEC;CAIJ;wBAhaY,OAAO,2CAA2C,EAAE,SAAS;4BAC7D,OAAO,KAAK,EAAE,aAAa"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localizeNamespaceLoader.d.ts","sourceRoot":"","sources":["../../../../components/input-datepicker/src/localizeNamespaceLoader.js"],"names":[],"mappings":"AAcO,gDAA4C,MAAM;aAb7B,MAAM;GA0LjC"}
|
|
@@ -1,60 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* OverlayController is the fundament for every single type of overlay. With the right
|
|
3
3
|
* configuration, it can be used to build (modal) dialogs, tooltips, dropdowns, popovers,
|
|
4
4
|
* bottom/top/left/right sheets etc.
|
|
5
5
|
*
|
|
6
|
-
* ### About contentNode, contentWrapperNode and renderTarget.
|
|
7
|
-
*
|
|
8
|
-
* #### contentNode
|
|
9
|
-
* Node containing actual overlay contents.
|
|
10
|
-
* It will not be touched by the OverlayController, it will only set attributes needed
|
|
11
|
-
* for accessibility.
|
|
12
|
-
*
|
|
13
|
-
* #### contentWrapperNode
|
|
14
|
-
* The 'positioning' element.
|
|
15
|
-
* For local overlays, this node will be provided to Popper and all
|
|
16
|
-
* inline positioning styles will be added here. It will also act as the container of an arrow
|
|
17
|
-
* element (the arrow needs to be a sibling of contentNode for Popper to work correctly).
|
|
18
|
-
* When projecting a contentNode from a shadowRoot, it is essential to have the wrapper in
|
|
19
|
-
* shadow dom, so that contentNode can be styled via `::slotted` from the shadow root.
|
|
20
|
-
* The Popper arrow can then be styled from that same shadow root as well.
|
|
21
|
-
* For global overlays, the contentWrapperNode will be appended to the globalRootNode structure.
|
|
22
|
-
*
|
|
23
|
-
* #### renderTarget
|
|
24
|
-
* Usually the parent node of contentWrapperNode that either exists locally or globally.
|
|
25
|
-
* When a responsive scenario is created (in which we switch from global to local or vice versa)
|
|
26
|
-
* we need to know where we should reappend contentWrapperNode (or contentNode in case it's projected)
|
|
27
|
-
*
|
|
28
|
-
* So a regular flow can be summarized as follows:
|
|
29
|
-
* 1. Application Developer spawns an OverlayController with a contentNode reference
|
|
30
|
-
* 2. OverlayController will create a contentWrapperNode around contentNode (or consumes when provided)
|
|
31
|
-
* 3. contentWrapperNode will be appended to the right renderTarget
|
|
32
|
-
*
|
|
33
|
-
* There are subtle differences depending on the following factors:
|
|
34
|
-
* - whether in global/local placement mode
|
|
35
|
-
* - whether contentNode projected
|
|
36
|
-
* - whether an arrow is provided
|
|
37
|
-
*
|
|
38
|
-
* This leads to the following possible combinations:
|
|
39
|
-
* - [l1]. local + no content projection + no arrow
|
|
40
|
-
* - [l2]. local + content projection + no arrow
|
|
41
|
-
* - [l3]. local + no content projection + arrow
|
|
42
|
-
* - [l4]. local + content projection + arrow
|
|
43
|
-
* - [g1]. global
|
|
44
|
-
*
|
|
45
|
-
* #### html structure for a content projected node
|
|
46
|
-
* <div id="contentWrapperNode">
|
|
47
|
-
* <slot name="contentNode"></slot>
|
|
48
|
-
* <div x-arrow></div>
|
|
49
|
-
* </div>
|
|
50
|
-
*
|
|
51
|
-
* Structure above depicts [l4]
|
|
52
|
-
* So in case of [l1] and [l3], the <slot> element would be a regular element
|
|
53
|
-
* In case of [l1] and [l2], there would be no arrow.
|
|
54
|
-
* Note that a contentWrapperNode should be provided for [l2], [l3] and [l4]
|
|
55
|
-
* In case of a global overlay ([g1]), it's enough to provide just the contentNode.
|
|
56
|
-
* In case of a local overlay or a responsive overlay switching from placementMode, one should
|
|
57
|
-
* always configure as if it were a local overlay.
|
|
58
6
|
*/
|
|
59
7
|
export class OverlayController extends EventTargetShim {
|
|
60
8
|
/**
|
|
@@ -62,10 +10,12 @@ export class OverlayController extends EventTargetShim {
|
|
|
62
10
|
* @param {OverlayConfig} config initial config. Will be remembered as shared config
|
|
63
11
|
* when `.updateConfig()` is called.
|
|
64
12
|
*/
|
|
65
|
-
constructor(config?: OverlayConfig, manager?:
|
|
66
|
-
manager:
|
|
13
|
+
constructor(config?: OverlayConfig, manager?: import("./OverlaysManager.js").OverlaysManager);
|
|
14
|
+
manager: import("./OverlaysManager.js").OverlaysManager;
|
|
67
15
|
/** @private */
|
|
68
16
|
private __sharedConfig;
|
|
17
|
+
/** @type {OverlayConfig} */
|
|
18
|
+
config: OverlayConfig;
|
|
69
19
|
/**
|
|
70
20
|
* @type {OverlayConfig}
|
|
71
21
|
* @protected
|
|
@@ -75,16 +25,10 @@ export class OverlayController extends EventTargetShim {
|
|
|
75
25
|
protected _contentId: string;
|
|
76
26
|
/** @private */
|
|
77
27
|
private __originalAttrs;
|
|
78
|
-
__isContentNodeProjected: boolean | undefined;
|
|
79
28
|
/** @private */
|
|
80
29
|
private __hasActiveTrapsKeyboardFocus;
|
|
81
30
|
/** @private */
|
|
82
31
|
private __hasActiveBackdrop;
|
|
83
|
-
/**
|
|
84
|
-
* @type {HTMLElement | undefined}
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
private __backdropNodeToBeTornDown;
|
|
88
32
|
/** @private */
|
|
89
33
|
private __escKeyHandler;
|
|
90
34
|
/**
|
|
@@ -94,9 +38,9 @@ export class OverlayController extends EventTargetShim {
|
|
|
94
38
|
get invoker(): HTMLElement | undefined;
|
|
95
39
|
/**
|
|
96
40
|
* The contentWrapperNode
|
|
97
|
-
* @type {
|
|
41
|
+
* @type {HTMLDialogElement | HTMLDivElement}
|
|
98
42
|
*/
|
|
99
|
-
get content():
|
|
43
|
+
get content(): HTMLDialogElement | HTMLDivElement;
|
|
100
44
|
/**
|
|
101
45
|
* Determines the connection point in DOM (body vs next to invoker).
|
|
102
46
|
* @type {'global' | 'local' | undefined}
|
|
@@ -210,21 +154,13 @@ export class OverlayController extends EventTargetShim {
|
|
|
210
154
|
* Popper configuration. Will be used when placementMode is 'local'
|
|
211
155
|
* @type {PopperOptions}
|
|
212
156
|
*/
|
|
213
|
-
get popperConfig(): import("@popperjs/core
|
|
157
|
+
get popperConfig(): import("@popperjs/core").Options;
|
|
214
158
|
/**
|
|
215
159
|
* Viewport configuration. Will be used when placementMode is 'global'
|
|
216
160
|
* @type {ViewportConfig}
|
|
217
161
|
*/
|
|
218
|
-
get viewportConfig(): import("
|
|
219
|
-
|
|
220
|
-
* Usually the parent node of contentWrapperNode that either exists locally or globally.
|
|
221
|
-
* When a responsive scenario is created (in which we switch from global to local or vice versa)
|
|
222
|
-
* we need to know where we should reappend contentWrapperNode (or contentNode in case it's
|
|
223
|
-
* projected).
|
|
224
|
-
* @type {HTMLElement}
|
|
225
|
-
* @protected
|
|
226
|
-
*/
|
|
227
|
-
protected get _renderTarget(): HTMLElement;
|
|
162
|
+
get viewportConfig(): import("@lion/ui/types/overlays.js").ViewportConfig;
|
|
163
|
+
get visibilityTriggerFunction(): Function;
|
|
228
164
|
/**
|
|
229
165
|
* @desc The element our local overlay will be positioned relative to.
|
|
230
166
|
* @type {HTMLElement | undefined}
|
|
@@ -252,8 +188,6 @@ export class OverlayController extends EventTargetShim {
|
|
|
252
188
|
* @private
|
|
253
189
|
*/
|
|
254
190
|
private __prevConfig;
|
|
255
|
-
/** @type {OverlayConfig} */
|
|
256
|
-
config: import("../types/OverlayConfig.js").OverlayConfig | undefined;
|
|
257
191
|
/** @private */
|
|
258
192
|
private __elementToFocusAfterHide;
|
|
259
193
|
/**
|
|
@@ -262,25 +196,40 @@ export class OverlayController extends EventTargetShim {
|
|
|
262
196
|
*/
|
|
263
197
|
private __validateConfiguration;
|
|
264
198
|
/**
|
|
265
|
-
* @param {{ cfgToAdd: OverlayConfig }} options
|
|
266
199
|
* @protected
|
|
267
200
|
*/
|
|
268
|
-
protected _init(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
201
|
+
protected _init(): void;
|
|
202
|
+
__contentHasBeenInitialized: boolean | undefined;
|
|
203
|
+
__initOverlayStyles(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Here we arrange our content node via:
|
|
206
|
+
* 1. HTMLDialogElement: the content will always be painted to the browser's top layer
|
|
207
|
+
* - no matter what context the contentNode lives in, the overlay will be painted correctly via the <dialog> element,
|
|
208
|
+
* even if 'overflow:hidden' or a css transform is applied in its parent hierarchy.
|
|
209
|
+
* - the dialog element will be unstyled, but will span the whole screen
|
|
210
|
+
* - a backdrop element will be a child of the dialog element, so it leverages the capabilities of the parent
|
|
211
|
+
* (filling the whole screen if wanted an always painted to top layer)
|
|
212
|
+
* 2. ContentWrapper: the content receives the right positioning styles in a clean/non conflicting way:
|
|
213
|
+
* - local positioning: receive inline (position) styling that can never conflict with the already existing computed styles
|
|
214
|
+
* - global positioning: receive flex (child) classes that position the content correctly relative to the viewport
|
|
215
|
+
*
|
|
216
|
+
* The resulting structure that will be created looks like this:
|
|
217
|
+
*
|
|
218
|
+
* ...
|
|
219
|
+
* <dialog role="none">
|
|
220
|
+
* <div id="optional-backdrop"></div>
|
|
221
|
+
* <div id="content-wrapper-node">
|
|
222
|
+
* <!-- this was the (slot for) original content node -->
|
|
223
|
+
* <slot name="content"></slot>
|
|
224
|
+
* </div>
|
|
225
|
+
* </dialog>
|
|
226
|
+
* ...
|
|
227
|
+
*
|
|
277
228
|
* @private
|
|
278
229
|
*/
|
|
279
|
-
private
|
|
280
|
-
|
|
281
|
-
__contentWrapperNode:
|
|
282
|
-
/** config [l2], [l4] */
|
|
283
|
-
__originalContentParent: HTMLElement | undefined;
|
|
230
|
+
private __initContentDomStructure;
|
|
231
|
+
__wrappingDialogNode: HTMLDialogElement | HTMLDivElement | undefined;
|
|
232
|
+
__contentWrapperNode: HTMLDivElement | undefined;
|
|
284
233
|
/**
|
|
285
234
|
* Display local overlays on top of elements with no z-index that appear later in the DOM
|
|
286
235
|
* @param {{ phase: OverlayPhase }} config
|
|
@@ -351,22 +300,21 @@ export class OverlayController extends EventTargetShim {
|
|
|
351
300
|
* @param {{backdropNode:HTMLElement, contentNode:HTMLElement}} hideConfig
|
|
352
301
|
* @protected
|
|
353
302
|
*/
|
|
354
|
-
protected _transitionHide(
|
|
303
|
+
protected _transitionHide({ backdropNode, contentNode }: {
|
|
355
304
|
backdropNode: HTMLElement;
|
|
356
305
|
contentNode: HTMLElement;
|
|
357
306
|
}): Promise<void>;
|
|
358
|
-
__backdropAnimation: Promise<any> | undefined;
|
|
359
307
|
/**
|
|
360
308
|
* To be overridden by subclassers
|
|
361
309
|
*
|
|
362
|
-
* @param {{backdropNode:HTMLElement
|
|
310
|
+
* @param {{backdropNode:HTMLElement; contentNode:HTMLElement}} showConfig
|
|
363
311
|
*/
|
|
364
312
|
transitionShow(showConfig: {
|
|
365
313
|
backdropNode: HTMLElement;
|
|
366
314
|
contentNode: HTMLElement;
|
|
367
315
|
}): Promise<void>;
|
|
368
316
|
/**
|
|
369
|
-
* @param {{backdropNode:HTMLElement
|
|
317
|
+
* @param {{backdropNode:HTMLElement; contentNode:HTMLElement}} showConfig
|
|
370
318
|
*/
|
|
371
319
|
_transitionShow(showConfig: {
|
|
372
320
|
backdropNode: HTMLElement;
|
|
@@ -383,6 +331,13 @@ export class OverlayController extends EventTargetShim {
|
|
|
383
331
|
protected _handleFeatures({ phase }: {
|
|
384
332
|
phase: OverlayPhase;
|
|
385
333
|
}): void;
|
|
334
|
+
/**
|
|
335
|
+
* @param {{ phase: OverlayPhase }} config
|
|
336
|
+
*/
|
|
337
|
+
_handleUserInteraction({ phase }: {
|
|
338
|
+
phase: OverlayPhase;
|
|
339
|
+
}): void;
|
|
340
|
+
__userInteractionHandler: any;
|
|
386
341
|
/**
|
|
387
342
|
* @param {{ phase: OverlayPhase }} config
|
|
388
343
|
* @protected
|
|
@@ -410,6 +365,7 @@ export class OverlayController extends EventTargetShim {
|
|
|
410
365
|
phase: OverlayPhase;
|
|
411
366
|
}): void;
|
|
412
367
|
__backdropNode: HTMLDivElement | undefined;
|
|
368
|
+
__backdropInitialized: boolean | undefined;
|
|
413
369
|
get hasActiveTrapsKeyboardFocus(): boolean;
|
|
414
370
|
/**
|
|
415
371
|
* @param {{ phase: OverlayPhase }} config
|
|
@@ -461,20 +417,19 @@ export class OverlayController extends EventTargetShim {
|
|
|
461
417
|
phase: OverlayPhase;
|
|
462
418
|
}): void;
|
|
463
419
|
teardown(): void;
|
|
464
|
-
/** @protected */
|
|
465
|
-
protected _teardownContentWrapperNode(): void;
|
|
466
420
|
/** @private */
|
|
467
421
|
private __createPopperInstance;
|
|
468
422
|
_popper: any;
|
|
423
|
+
_hasDisabledInvoker(): boolean;
|
|
469
424
|
}
|
|
470
425
|
export namespace OverlayController {
|
|
471
426
|
const popperModule: Promise<PopperModule> | undefined;
|
|
472
427
|
}
|
|
473
|
-
export type OverlayConfig = import('
|
|
474
|
-
export type ViewportConfig = import('
|
|
428
|
+
export type OverlayConfig = import('@lion/ui/types/overlays.js').OverlayConfig;
|
|
429
|
+
export type ViewportConfig = import('@lion/ui/types/overlays.js').ViewportConfig;
|
|
475
430
|
export type Popper = any;
|
|
476
|
-
export type PopperOptions = import('@popperjs/core
|
|
477
|
-
export type Placement = import('@popperjs/core
|
|
431
|
+
export type PopperOptions = import('@popperjs/core').Options;
|
|
432
|
+
export type Placement = import('@popperjs/core').Placement;
|
|
478
433
|
export type PopperModule = {
|
|
479
434
|
createPopper: Popper;
|
|
480
435
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayController.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlayController.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverlayController.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlayController.js"],"names":[],"mappings":"AA6HA;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,qBAHW,aAAa,4DAsFvB;IAjFC,wDAAsB;IACtB,eAAe;IACf,uBAA4B;IAE5B,4BAA4B;IAC5B,QADW,aAAa,CACR;IAEhB;;;OAGG;IACH,0BAHU,aAAa,CA2DtB;IAGD,iBAAiB;IACjB,6BAAgF;IAChF,eAAe;IACf,wBAAgC;IAEhC,eAAe;IACf,sCAA0C;IAC1C,eAAe;IACf,4BAA+B;IAo4BjC,eAAe;IACf,wBAEC;IAl4BD;;;OAGG;IACH,uCAEC;IAED;;;OAGG;IACH,kDAEC;IAED;;;OAGG;IACH,oDAEC;IAED;;;OAGG;IACH,2CAEC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;OAGG;IACH,+BAEC;IAED;;;;;;OAMG;IACH,sCAIC;IAED;;;;OAIG;IACH,gCAEC;IAED;;;OAGG;IACH,2CAIC;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,0BAEC;IAED;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,kCAEC;IAED;;;OAGG;IACH,0BAEC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,iCAEC;IAED;;;;;;OAMG;IACH,0EAEC;IAED;;;;;;;;;;;OAWG;IACH,oCAEC;IAED;;;;OAIG;IACH,yBAEC;IAED;;;;OAIG;IACH,2DAEC;IAED;;;OAGG;IACH,qDAEC;IAED;;;OAGG;IACH,0EAEC;IAED,0CAEC;IAED;;;;OAIG;IACH,wDAEC;IAED;;OAEG;IACH,2BAGC;IAED;;OAEG;IACH,wBAEC;IAED;;;;;;OAMG;IACH,uBAFY,aAAa,QAmCxB;IA7BC;;;OAGG;IACH,qBAA+B;IAuB/B,eAAe;IACf,kCAA0C;IAG5C;;;OAGG;IAEH,gCAsBC;IAED;;OAEG;IACH,wBAkBC;IAfG,iDAAuC;IAiB3C,4BAOC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAwCC;IA3BC,qEAAiD;IAO/C,iDAAyD;IAsB7D;;;;OAIG;IACH;eAHoB,YAAY;aAc/B;IAED;;;OAGG;IACH,qCAkCC;IAED;;;;OAIG;IACH,6BAMC;IAED,eAAe;IACf,+BAWC;IAED,uBAEC;IAED;;;;OAIG;IACH,+BAFW,WAAW,iBA2CrB;IAnCC,wCAEE;IADA,iDAA2B;IAoC/B;;;OAGG;IACH;eAHoB,YAAY;sBA2B/B;IAED;;;OAGG;IACH;eAHoB,YAAY;aA2C/B;IArCK,sCAAkD;IAClD,uCAAoD;IACpD,4CAA8D;IAC9D,6CAAgE;IAK9D,sCAAiF;IACjF,uCAAmF;IA8B3F;;;OAGG;IACH,sBAiCC;IAhCC,wCAEE;IADA,iDAA2B;IAiC/B;;;;OAIG;IAGH;sBAJyB,WAAW;qBAAc,WAAW;sBAI1B;IAEnC;;;OAGG;IAEH;sBAJyB,WAAW;qBAAc,WAAW;sBAY5D;IAED;;;;OAIG;IAGH;sBAJyB,WAAW;qBAAc,WAAW;sBAI1B;IAEnC;;OAEG;IAEH;sBAHyB,WAAW;qBAAc,WAAW;sBAU5D;IAED,iBAAiB;IACjB,gCAeC;IAED,wBAEC;IAED;;;;OAIG;IACH;eAHoB,YAAY;aAqC/B;IAED;;OAEG;IACH;eAFoB,YAAY;aAW/B;IANK,8BAA2F;IAQjG;;;OAGG;IACH;eAHoB,YAAY;aAa/B;IAED;;;OAGG;IACH;eAHoB,YAAY;aAa/B;IAED,iCAEC;IAED;;;;;;OAMG;IACH;;eAHyC,YAAY;aA2BpD;IAlBS,2CAAmD;IAMrD,2CAAiC;IAczC,2CAEC;IAED;;;OAGG;IACH;eAHoB,YAAY;aAkB/B;IAED,iCAYC;IALC;;kBAA0D;IAO5D;;aAYC;IAOD;;;OAGG;IACH;eAHoB,YAAY;aAe/B;IAED;;;OAGG;IACH;eAHoB,YAAY;aAW/B;IAED,iBAAiB;IACjB,gDAkBC;IAED;;;OAGG;IACH;eAHoB,YAAY;aAyF/B;IA7DG,iDAAiD;IACjD,oEAGC;IAED,4CAGC;IAED,iDAAiD;IACjD,oEAYC;IAuCL;;;OAGG;IACH;eAHoB,YAAY;aAU/B;IAED,iBAEC;IAED,eAAe;IACf,+BAYC;IATG,aAAwB;IAW5B,+BAQC;CACF;;wBACU,QAAQ,YAAY,CAAC,GAAG,SAAS;;4BAtxC/B,OAAO,4BAA4B,EAAE,aAAa;6BAClD,OAAO,4BAA4B,EAAE,cAAc;;4BAEnD,OAAO,gBAAgB,EAAE,OAAO;wBAChC,OAAO,gBAAgB,EAAE,SAAS;2BAClC;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE;2BACxB,OAAO,GAAC,MAAM,GAAC,UAAU,GAAC,aAAa,GAAC,MAAM,GAAC,MAAM,GAAC,KAAK,GAAC,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayMixin.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlayMixin.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;;;GAGG;AACH,yCAHU,YAAY,
|
|
1
|
+
{"version":3,"file":"OverlayMixin.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlayMixin.js"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH;;;GAGG;AACH,yCAHU,YAAY,CAwWlB;2BA5WS,OAAO,+BAA+B,EAAE,YAAY;AA6WjE,gGAAoE;4BA/WvD,OAAO,2BAA2B,EAAE,aAAa;kCACjD,OAAO,+BAA+B,EAAE,mBAAmB"}
|
|
@@ -6,13 +6,7 @@ export namespace _browserDetection {
|
|
|
6
6
|
* `OverlaysManager` which manages overlays which are rendered into the body
|
|
7
7
|
*/
|
|
8
8
|
export class OverlaysManager {
|
|
9
|
-
static __createGlobalRootNode(): HTMLDivElement;
|
|
10
9
|
static __createGlobalStyleNode(): HTMLStyleElement;
|
|
11
|
-
/**
|
|
12
|
-
* no setter as .list is intended to be read-only
|
|
13
|
-
* You can use .add or .remove to modify it
|
|
14
|
-
*/
|
|
15
|
-
get globalRootNode(): HTMLElement;
|
|
16
10
|
/**
|
|
17
11
|
* no setter as .list is intended to be read-only
|
|
18
12
|
* You can use .add or .remove to modify it
|
|
@@ -87,7 +81,6 @@ export class OverlaysManager {
|
|
|
87
81
|
retractRequestToShowOnly(blockingCtrl: OverlayController): void;
|
|
88
82
|
}
|
|
89
83
|
export namespace OverlaysManager {
|
|
90
|
-
const __globalRootNode: HTMLElement | undefined;
|
|
91
84
|
const __globalStyleNode: HTMLStyleElement | undefined;
|
|
92
85
|
}
|
|
93
86
|
export type CSSResult = import('lit').CSSResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlaysManager.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlaysManager.js"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"OverlaysManager.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/OverlaysManager.js"],"names":[],"mappings":";;;;AAoBA;;GAEG;AACH;IACE,mDAMC;IAED;;;OAGG;IACH,iEAEC;IAED;;;OAGG;IACH,sEAEC;IAGC;;;OAGG;IACH,eAAgB;IAChB;;;OAGG;IACH,oBAAqB;IACrB,eAAe;IACf,wBAA4B;IAC5B;;;OAGG;IACH,sBAAkC;IAOpC;;;;OAIG;IACH,eAHW,iBAAiB,GACf,iBAAiB,CAQ7B;IAED;;OAEG;IACH,qBAFW,iBAAiB,QAQ3B;IAED;;OAEG;IACH,iBAFW,iBAAiB,QAe3B;IAED;;OAEG;IACH,iBAFW,GAAG,QAOb;IAED,iBAeC;IAED,yDAAyD;IAEzD,6BAEC;IAED,wCAMC;IAED;;OAEG;IACH,kDAFW,OAAO,GAAG,QAAQ,GAAG,SAAS,QAMxC;IAED;;OAEG;IACH;;;aAWC;IAED,qBAAqB;IAGrB,+BAYC;IAED,8BAgBC;IAED;;;OAGG;IACH,gCAFW,iBAAiB,QAM3B;IAED;;OAEG;IACH,uCAFW,iBAAiB,QAS3B;CACF;;6BAEU,gBAAgB,GAAG,SAAS;;wBA7O1B,OAAO,KAAK,EAAE,SAAS;gCACvB,OAAO,wBAAwB,EAAE,iBAAiB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('@lion/ui/types/overlays.js').OverlayConfig} OverlayConfig
|
|
3
|
+
* @typedef {import('@lion/ui/overlays.js').OverlayController} OverlayController
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Use for popovers/dropdowns, (modal) dialogs etc...
|
|
7
|
+
* @returns {Partial<OverlayConfig>}
|
|
8
|
+
*/
|
|
9
|
+
export function withClickInteraction(): Partial<OverlayConfig>;
|
|
10
|
+
export type OverlayConfig = import('@lion/ui/types/overlays.js').OverlayConfig;
|
|
11
|
+
export type OverlayController = import('@lion/ui/overlays.js').OverlayController;
|
|
12
|
+
//# sourceMappingURL=withClickInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withClickInteraction.d.ts","sourceRoot":"","sources":["../../../../../../components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wCAFa,QAAQ,aAAa,CAAC,CAwBlC;4BA9BY,OAAO,4BAA4B,EAAE,aAAa;gCAClD,OAAO,sBAAsB,EAAE,iBAAiB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('@lion/ui/types/overlays.js').OverlayConfig} OverlayConfig
|
|
3
|
+
* @typedef {import('@lion/ui/overlays.js').OverlayController} OverlayController
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Use for tooltips and [flyout menus](https://www.w3.org/WAI/tutorials/menus/flyout/).
|
|
7
|
+
* Note that it handles both mouse hover and focus interaction.
|
|
8
|
+
* Provide delayIn and delayOut when the content needs a small delay before being showed
|
|
9
|
+
* @param {{ delayIn?: number, delayOut?: number }} options
|
|
10
|
+
* @returns {Partial<OverlayConfig>}
|
|
11
|
+
*/
|
|
12
|
+
export function withHoverInteraction({ delayIn, delayOut }: {
|
|
13
|
+
delayIn?: number;
|
|
14
|
+
delayOut?: number;
|
|
15
|
+
}): Partial<OverlayConfig>;
|
|
16
|
+
export type OverlayConfig = import('@lion/ui/types/overlays.js').OverlayConfig;
|
|
17
|
+
export type OverlayController = import('@lion/ui/overlays.js').OverlayController;
|
|
18
|
+
//# sourceMappingURL=withHoverInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withHoverInteraction.d.ts","sourceRoot":"","sources":["../../../../../../components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,4DAHW;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAG,GACtC,QAAQ,aAAa,CAAC,CA+DlC;4BA1EY,OAAO,4BAA4B,EAAE,aAAa;gCAClD,OAAO,sBAAsB,EAAE,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBottomSheetConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withBottomSheetConfig.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withBottomSheetConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withBottomSheetConfig.js"],"names":[],"mappings":"AAMO,8FAYH;4BAfS,OAAO,8BAA8B,EAAE,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withDropdownConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withDropdownConfig.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withDropdownConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withDropdownConfig.js"],"names":[],"mappings":"AAMO,2FAkBH;4BArBS,OAAO,8BAA8B,EAAE,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withModalDialogConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withModalDialogConfig.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withModalDialogConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withModalDialogConfig.js"],"names":[],"mappings":"AAMO,8FAYH;4BAfS,OAAO,8BAA8B,EAAE,aAAa"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function withTooltipConfig({ invokerRelation, delayIn, delayOut, }?: {
|
|
2
|
+
invokerRelation?: 'description' | 'label';
|
|
3
|
+
delayIn?: number;
|
|
4
|
+
delayOut?: number;
|
|
5
|
+
}): import("@lion/ui/types/overlays.js").OverlayConfig;
|
|
6
|
+
export type OverlayConfig = import('@lion/ui/types/overlays.js').OverlayConfig;
|
|
7
|
+
export type OverlayController = import('@lion/ui/overlays.js').OverlayController;
|
|
8
|
+
//# sourceMappingURL=withTooltipConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTooltipConfig.d.ts","sourceRoot":"","sources":["../../../../../components/overlays/src/configurations/withTooltipConfig.js"],"names":[],"mappings":"AAWO,4EAFI;IAAC,eAAe,CAAC,EAAE,aAAa,GAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAG,sDAmBxF;4BAzBS,OAAO,4BAA4B,EAAE,aAAa;gCAClD,OAAO,sBAAsB,EAAE,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlayDocumentStyle.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/overlayDocumentStyle.js"],"names":[],"mappings":"AAEA,2DAqBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlayShadowDomStyle.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/overlayShadowDomStyle.js"],"names":[],"mappings":"AAEA,4DAuIE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/singleton.js"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../../../components/overlays/src/singleton.js"],"names":[],"mappings":"AAGA,uCAE6E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayMixin.suite.d.ts","sourceRoot":"","sources":["../../../../components/overlays/test-suites/OverlayMixin.suite.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverlayMixin.suite.d.ts","sourceRoot":"","sources":["../../../../components/overlays/test-suites/OverlayMixin.suite.js"],"names":[],"mappings":"AAyBA;;GAEG;AACH,iEAFW;IAAC,SAAS,EAAC,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAC,MAAM,CAAA;CAAC,QAqZzD;4BAtaY,OAAO,2BAA2B,EAAE,aAAa;kCACjD,OAAO,+BAA+B,EAAE,mBAAmB;0BAC3D,OAAO,+BAA+B,EAAE,WAAW;2BACnD,OAAO,+BAA+B,EAAE,YAAY;yBACpD,OAAO,KAAK,EAAE,UAAU;wBACxB,UAAU,GAAG,WAAW,GAAG;IAAC,YAAY,EAAC,iBAAiB,CAAA;CAAC"}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { Options } from '@popperjs/core';
|
|
2
2
|
export interface OverlayConfig {
|
|
3
|
-
/** Determines the
|
|
3
|
+
/** Determines the positioning anchore (viewport vs invokerNode/referenceNode). */
|
|
4
4
|
placementMode?: 'global' | 'local' | undefined;
|
|
5
|
+
/** Popper configuration. Will be used when placementMode is 'local' */
|
|
6
|
+
popperConfig?: Partial<Options>;
|
|
7
|
+
/** Viewport positioning configuration. Will be used when placementMode is 'global' */
|
|
8
|
+
viewportConfig?: ViewportConfig;
|
|
9
|
+
/** Hides other overlays when multiple are opened (currently exclusive to globalOverlayController) */
|
|
10
|
+
isBlocking?: boolean;
|
|
11
|
+
/** Will align contentNode with referenceNode (invokerNode by default) for local overlays. Usually needed for dropdowns. 'max' will prevent contentNode from exceeding width of referenceNode, 'min' guarantees that contentNode will be at least as wide as referenceNode. 'full' will make sure that the invoker width always is the same. */
|
|
12
|
+
inheritsReferenceWidth?: 'max' | 'full' | 'min' | 'none';
|
|
13
|
+
/** Change the default of 9999 */
|
|
14
|
+
zIndex?: number;
|
|
5
15
|
/** The interactive element (usually a button) invoking the dialog or tooltip */
|
|
6
16
|
invokerNode?: HTMLElement;
|
|
7
17
|
/** The element that is used to position the overlay content relative to. Usually, this is the same element as invokerNode. Should only be provided when invokerNode should not be positioned against */
|
|
@@ -16,8 +26,6 @@ export interface OverlayConfig {
|
|
|
16
26
|
elementToFocusAfterHide?: HTMLElement;
|
|
17
27
|
/** Whether it should have a backdrop (currently exclusive to globalOverlayController) */
|
|
18
28
|
hasBackdrop?: boolean;
|
|
19
|
-
/** Hides other overlays when mutiple are opened (currently exclusive to globalOverlayController) */
|
|
20
|
-
isBlocking?: boolean;
|
|
21
29
|
/** Prevents scrolling body content when overlay opened (currently exclusive to globalOverlayController) */
|
|
22
30
|
preventsScroll?: boolean;
|
|
23
31
|
/** Rotates tab, implicitly set when 'isModal' */
|
|
@@ -28,8 +36,6 @@ export interface OverlayConfig {
|
|
|
28
36
|
hidesOnOutsideClick?: boolean;
|
|
29
37
|
/** Hides the overlay when pressing esc, even when contentNode has no focus */
|
|
30
38
|
hidesOnOutsideEsc?: boolean;
|
|
31
|
-
/** Will align contentNode with referenceNode (invokerNode by default) for local overlays. Usually needed for dropdowns. 'max' will prevent contentNode from exceeding width of referenceNode, 'min' guarantees that contentNode will be at least as wide as referenceNode. 'full' will make sure that the invoker width always is the same. */
|
|
32
|
-
inheritsReferenceWidth?: 'max' | 'full' | 'min' | 'none';
|
|
33
39
|
/**
|
|
34
40
|
* For non `isTooltip`:
|
|
35
41
|
* - sets aria-expanded="true/false" and aria-haspopup="true" on invokerNode
|
|
@@ -45,12 +51,15 @@ export interface OverlayConfig {
|
|
|
45
51
|
isTooltip?: boolean;
|
|
46
52
|
/** By default, the tooltip content is a 'description' for the invoker (uses aria-describedby) Setting this property to 'label' makes the content function as a label (via aria-labelledby) */
|
|
47
53
|
invokerRelation?: 'label' | 'description';
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
|
|
54
|
+
/** render a div instead of dialog */
|
|
55
|
+
_noDialogEl?: Boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Determines the conditions hiding/showing should be based on. It gets the OverlayController as input and returns an object with
|
|
58
|
+
* functions with Overlay phases as keys
|
|
59
|
+
*/
|
|
60
|
+
visibilityTriggerFunction?: Function;
|
|
52
61
|
}
|
|
53
|
-
export declare type ViewportPlacement = 'center' | 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left'
|
|
62
|
+
export declare type ViewportPlacement = 'center' | 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left';
|
|
54
63
|
export interface ViewportConfig {
|
|
55
64
|
placement: ViewportPlacement;
|
|
56
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayConfig.d.ts","sourceRoot":"","sources":["../../../../components/overlays/types/OverlayConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"OverlayConfig.d.ts","sourceRoot":"","sources":["../../../../components/overlays/types/OverlayConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,WAAW,aAAa;IAG5B,kFAAkF;IAClF,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,uEAAuE;IACvE,YAAY,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,sFAAsF;IACtF,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,qGAAqG;IACrG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+UAA+U;IAC/U,sBAAsB,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACzD,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAIhB,gFAAgF;IAChF,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,wMAAwM;IACxM,aAAa,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,qDAAqD;IACrD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,oXAAoX;IACpX,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,kJAAkJ;IAClJ,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,0EAA0E;IAC1E,uBAAuB,CAAC,EAAE,WAAW,CAAC;IAItC,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,2GAA2G;IAC3G,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAI5B;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAI/B,uKAAuK;IACvK,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8LAA8L;IAC9L,eAAe,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IAE1C,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,QAAQ,CAAC;CACtC;AAED,oBAAY,iBAAiB,GACzB,QAAQ,GACR,UAAU,GACV,KAAK,GACL,WAAW,GACX,OAAO,GACP,cAAc,GACd,QAAQ,GACR,aAAa,GACb,MAAM,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,iBAAiB,CAAC;CAC9B"}
|
|
@@ -16,8 +16,8 @@ export interface DefineOverlayConfig {
|
|
|
16
16
|
}
|
|
17
17
|
export declare class OverlayHost {
|
|
18
18
|
opened: Boolean;
|
|
19
|
-
get config(): OverlayConfig
|
|
20
|
-
set config(value: OverlayConfig);
|
|
19
|
+
get config(): Partial<OverlayConfig>;
|
|
20
|
+
set config(value: Partial<OverlayConfig>);
|
|
21
21
|
open(): Promise<void>;
|
|
22
22
|
close(): Promise<void>;
|
|
23
23
|
toggle(): Promise<void>;
|