igniteui-webcomponents 7.1.2 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/components/banner/banner.d.ts +53 -17
- package/components/banner/banner.js +5 -0
- package/components/banner/banner.js.map +1 -1
- package/components/button/button-base.d.ts +80 -26
- package/components/button/button-base.js +64 -23
- package/components/button/button-base.js.map +1 -1
- package/components/button/button.d.ts +12 -3
- package/components/button/button.js +1 -1
- package/components/button/button.js.map +1 -1
- package/components/button/icon-button.d.ts +25 -9
- package/components/button/icon-button.js +2 -2
- package/components/button/icon-button.js.map +1 -1
- package/components/button-group/themes/shared/button/button.common.css.js +1 -1
- package/components/button-group/themes/shared/button/button.common.css.js.map +1 -1
- package/components/button-group/themes/shared/button/button.indigo.css.js +1 -1
- package/components/button-group/themes/shared/button/button.indigo.css.js.map +1 -1
- package/components/calendar/base.d.ts +5 -4
- package/components/calendar/base.js +3 -2
- package/components/calendar/base.js.map +1 -1
- package/components/calendar/calendar.js +17 -13
- package/components/calendar/calendar.js.map +1 -1
- package/components/calendar/days-view/days-view.d.ts +1 -0
- package/components/calendar/days-view/days-view.js +7 -4
- package/components/calendar/days-view/days-view.js.map +1 -1
- package/components/calendar/helpers.d.ts +1 -1
- package/components/calendar/helpers.js.map +1 -1
- package/components/chat/chat-message.js +8 -8
- package/components/chat/chat-message.js.map +1 -1
- package/components/chat/chat-state.d.ts +3 -1
- package/components/chat/chat-state.js +3 -2
- package/components/chat/chat-state.js.map +1 -1
- package/components/chat/chat.d.ts +5 -1
- package/components/chat/chat.js +14 -4
- package/components/chat/chat.js.map +1 -1
- package/components/checkbox/checkbox.js +1 -0
- package/components/checkbox/checkbox.js.map +1 -1
- package/components/checkbox/switch.js +1 -0
- package/components/checkbox/switch.js.map +1 -1
- package/components/combo/combo.d.ts +1 -0
- package/components/combo/combo.js +7 -0
- package/components/combo/combo.js.map +1 -1
- package/components/combo/controllers/navigation.js +3 -0
- package/components/combo/controllers/navigation.js.map +1 -1
- package/components/common/controllers/command.d.ts +62 -0
- package/components/common/controllers/command.js +25 -0
- package/components/common/controllers/command.js.map +1 -0
- package/components/common/controllers/id-resolver.d.ts +31 -0
- package/components/common/controllers/id-resolver.js +136 -0
- package/components/common/controllers/id-resolver.js.map +1 -0
- package/components/common/i18n/EN/calendar.resources.d.ts +16 -14
- package/components/common/i18n/EN/calendar.resources.js +1 -1
- package/components/common/i18n/EN/calendar.resources.js.map +1 -1
- package/components/common/i18n/EN/chat.resources.d.ts +10 -8
- package/components/common/i18n/EN/chat.resources.js.map +1 -1
- package/components/common/i18n/EN/date-picker.resources.d.ts +8 -0
- package/components/common/i18n/EN/date-picker.resources.js +8 -0
- package/components/common/i18n/EN/date-picker.resources.js.map +1 -0
- package/components/common/i18n/EN/date-range-picker.resources.d.ts +9 -7
- package/components/common/i18n/EN/date-range-picker.resources.js +1 -1
- package/components/common/i18n/EN/date-range-picker.resources.js.map +1 -1
- package/components/common/i18n/i18n-controller.d.ts +14 -11
- package/components/common/i18n/i18n-controller.js +33 -41
- package/components/common/i18n/i18n-controller.js.map +1 -1
- package/components/common/i18n/utils.d.ts +8 -2
- package/components/common/i18n/utils.js +52 -44
- package/components/common/i18n/utils.js.map +1 -1
- package/components/common/mixins/alert.d.ts +47 -9
- package/components/common/mixins/alert.js +55 -12
- package/components/common/mixins/alert.js.map +1 -1
- package/components/common/mixins/forms/associated.js +11 -0
- package/components/common/mixins/forms/associated.js.map +1 -1
- package/components/common/mixins/forms/form-transformers.d.ts +1 -1
- package/components/common/mixins/forms/form-transformers.js.map +1 -1
- package/components/common/mixins/forms/types.d.ts +5 -0
- package/components/common/mixins/forms/types.js.map +1 -1
- package/components/common/mixins/mask-behavior.d.ts +73 -0
- package/components/common/mixins/mask-behavior.js +159 -0
- package/components/common/mixins/mask-behavior.js.map +1 -0
- package/components/common/templates/input-shell.d.ts +24 -0
- package/components/common/templates/input-shell.js +43 -0
- package/components/common/templates/input-shell.js.map +1 -0
- package/components/common/templates/masked-input.d.ts +39 -0
- package/components/common/templates/masked-input.js +37 -0
- package/components/common/templates/masked-input.js.map +1 -0
- package/components/common/util.d.ts +11 -0
- package/components/common/util.js +20 -0
- package/components/common/util.js.map +1 -1
- package/components/date-picker/date-picker.d.ts +6 -4
- package/components/date-picker/date-picker.js +16 -5
- package/components/date-picker/date-picker.js.map +1 -1
- package/components/date-range-picker/date-range-input.d.ts +60 -0
- package/components/date-range-picker/date-range-input.js +251 -0
- package/components/date-range-picker/date-range-input.js.map +1 -0
- package/components/date-range-picker/date-range-mask-parser.d.ts +106 -0
- package/components/date-range-picker/date-range-mask-parser.js +121 -0
- package/components/date-range-picker/date-range-mask-parser.js.map +1 -0
- package/components/date-range-picker/date-range-picker.d.ts +17 -11
- package/components/date-range-picker/date-range-picker.js +89 -61
- package/components/date-range-picker/date-range-picker.js.map +1 -1
- package/components/date-range-picker/predefined-ranges-area.d.ts +4 -4
- package/components/date-range-picker/predefined-ranges-area.js +8 -4
- package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
- package/components/date-range-picker/validators.d.ts +5 -19
- package/components/date-range-picker/validators.js +20 -16
- package/components/date-range-picker/validators.js.map +1 -1
- package/components/date-time-input/date-time-input.base.d.ts +155 -0
- package/components/date-time-input/date-time-input.base.js +275 -0
- package/components/date-time-input/date-time-input.base.js.map +1 -0
- package/components/date-time-input/date-time-input.d.ts +33 -122
- package/components/date-time-input/date-time-input.js +45 -258
- package/components/date-time-input/date-time-input.js.map +1 -1
- package/components/date-time-input/datetime-mask-parser.d.ts +11 -1
- package/components/date-time-input/datetime-mask-parser.js +5 -5
- package/components/date-time-input/datetime-mask-parser.js.map +1 -1
- package/components/dialog/dialog.d.ts +88 -31
- package/components/dialog/dialog.js +29 -31
- package/components/dialog/dialog.js.map +1 -1
- package/components/file-input/file-input.d.ts +1 -1
- package/components/input/input-base.d.ts +2 -10
- package/components/input/input-base.js +11 -57
- package/components/input/input-base.js.map +1 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +1 -0
- package/components/input/input.js.map +1 -1
- package/components/input/themes/dark/input.shared.css.d.ts +1 -0
- package/components/input/themes/dark/input.shared.css.js +3 -0
- package/components/input/themes/dark/input.shared.css.js.map +1 -0
- package/components/input/themes/light/input.shared.css.js +1 -1
- package/components/input/themes/light/input.shared.css.js.map +1 -1
- package/components/input/themes/shared/input.common.css.js +1 -1
- package/components/input/themes/shared/input.common.css.js.map +1 -1
- package/components/input/themes/shared/input.material.css.js +1 -1
- package/components/input/themes/shared/input.material.css.js.map +1 -1
- package/components/input/themes/themes.js +4 -3
- package/components/input/themes/themes.js.map +1 -1
- package/components/mask-input/mask-input.d.ts +9 -4
- package/components/mask-input/mask-input.js +30 -36
- package/components/mask-input/mask-input.js.map +1 -1
- package/components/nav-drawer/nav-drawer.d.ts +93 -17
- package/components/nav-drawer/nav-drawer.js +148 -21
- package/components/nav-drawer/nav-drawer.js.map +1 -1
- package/components/nav-drawer/themes/container.base.css.js +1 -1
- package/components/nav-drawer/themes/container.base.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.js.map +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.js +1 -1
- package/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.js.map +1 -1
- package/components/radio/radio.js +1 -0
- package/components/radio/radio.js.map +1 -1
- package/components/snackbar/snackbar.d.ts +9 -5
- package/components/snackbar/snackbar.js +6 -8
- package/components/snackbar/snackbar.js.map +1 -1
- package/components/snackbar/themes/snackbar.base.css.js +1 -1
- package/components/snackbar/themes/snackbar.base.css.js.map +1 -1
- package/components/stepper/step.d.ts +1 -1
- package/components/stepper/step.js +4 -4
- package/components/stepper/step.js.map +1 -1
- package/components/stepper/stepper.js +5 -0
- package/components/stepper/stepper.js.map +1 -1
- package/components/stepper/themes/step/step.base.css.js +1 -1
- package/components/stepper/themes/step/step.base.css.js.map +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js +1 -1
- package/components/stepper/themes/stepper/stepper.base.css.js.map +1 -1
- package/components/toast/themes/toast.base.css.js +1 -1
- package/components/toast/themes/toast.base.css.js.map +1 -1
- package/components/toast/toast.d.ts +9 -2
- package/components/toast/toast.js +0 -2
- package/components/toast/toast.js.map +1 -1
- package/components/types.d.ts +4 -0
- package/components/types.js.map +1 -1
- package/custom-elements.json +34882 -28909
- package/igniteui-webcomponents.css-data.json +1 -1
- package/igniteui-webcomponents.html-data.json +1 -1
- package/index.d.ts +5 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/skills/igniteui-wc-choose-components/SKILL.md +23 -6
- package/skills/igniteui-wc-choose-components/reference/mcp-setup.md +82 -0
- package/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +4 -2
- package/web-types.json +2 -2
- package/components/mask-input/mask-input-base.d.ts +0 -51
- package/components/mask-input/mask-input-base.js +0 -146
- package/components/mask-input/mask-input-base.js.map +0 -1
|
@@ -1,41 +1,116 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
import type { Constructor } from '../common/mixins/constructor.js';
|
|
2
3
|
import type { NavDrawerPosition } from '../types.js';
|
|
4
|
+
export interface IgcNavDrawerComponentEventMap {
|
|
5
|
+
igcClosing: CustomEvent<void>;
|
|
6
|
+
igcClosed: CustomEvent<void>;
|
|
7
|
+
}
|
|
8
|
+
declare const IgcNavDrawerComponent_base: Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcNavDrawerComponentEventMap>> & Constructor<LitElement>;
|
|
3
9
|
/**
|
|
4
|
-
*
|
|
5
|
-
* quick access between views.
|
|
10
|
+
* A side navigation container that provides
|
|
11
|
+
* quick access between views within an application.
|
|
12
|
+
*
|
|
13
|
+
* For non-relative positions (`start`, `end`, `top`, `bottom`) the drawer is
|
|
14
|
+
* rendered as a native `<dialog>` element, providing modal semantics, automatic
|
|
15
|
+
* focus trapping, and a backdrop. For the `relative` position it is rendered
|
|
16
|
+
* inline as a `<nav>` landmark.
|
|
17
|
+
*
|
|
18
|
+
* When content is provided in the `mini` slot, a compact icon-only variant is
|
|
19
|
+
* always displayed alongside the main drawer (hidden only while the full drawer
|
|
20
|
+
* is open).
|
|
21
|
+
*
|
|
22
|
+
* The component integrates with the
|
|
23
|
+
* [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API):
|
|
24
|
+
* an Ignite button or a native `<button>` with `command="--show"` / `"--hide"` / `"--toggle"`
|
|
25
|
+
* and `commandfor` pointing to this element will call the corresponding method
|
|
26
|
+
* declaratively without any JavaScript.
|
|
6
27
|
*
|
|
7
28
|
* @element igc-nav-drawer
|
|
8
29
|
*
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
30
|
+
* @fires igcClosing - Emitted just before the drawer is closed by a user interaction. Cancelable —
|
|
31
|
+
* call `event.preventDefault()` to abort the closing sequence.
|
|
32
|
+
* @fires igcClosed - Emitted just after the drawer is closed by a user interaction.
|
|
33
|
+
*
|
|
34
|
+
* @slot - Renders the main navigation content of the drawer.
|
|
35
|
+
* @slot mini - Renders the compact mini variant of the drawer.
|
|
11
36
|
*
|
|
12
|
-
* @csspart base - The base wrapper of the
|
|
13
|
-
* @csspart main - The main container of the
|
|
14
|
-
* @csspart mini - The mini container of the
|
|
37
|
+
* @csspart base - The base wrapper of the drawer.
|
|
38
|
+
* @csspart main - The main content container of the drawer.
|
|
39
|
+
* @csspart mini - The mini variant container of the drawer.
|
|
15
40
|
*/
|
|
16
|
-
export default class IgcNavDrawerComponent extends
|
|
41
|
+
export default class IgcNavDrawerComponent extends IgcNavDrawerComponent_base {
|
|
17
42
|
static readonly tagName = "igc-nav-drawer";
|
|
18
43
|
static styles: import("lit").CSSResult[];
|
|
19
44
|
static register(): void;
|
|
45
|
+
private readonly _dialogRef;
|
|
46
|
+
private readonly _miniRef;
|
|
20
47
|
private readonly _slots;
|
|
48
|
+
private get _dialog();
|
|
49
|
+
private get _mini();
|
|
50
|
+
private get _hasMiniContent();
|
|
51
|
+
private get _isRelative();
|
|
21
52
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
53
|
+
* Sets the position of the drawer.
|
|
54
|
+
*
|
|
55
|
+
* - `start` — anchored to the inline-start edge (default).
|
|
56
|
+
* - `end` — anchored to the inline-end edge.
|
|
57
|
+
* - `top` — anchored to the block-start edge.
|
|
58
|
+
* - `bottom` — anchored to the block-end edge.
|
|
59
|
+
* - `relative` — rendered inline within the page flow; no modal backdrop.
|
|
60
|
+
*
|
|
61
|
+
* @attr position
|
|
62
|
+
* @default 'start'
|
|
24
63
|
*/
|
|
25
64
|
position: NavDrawerPosition;
|
|
26
65
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
66
|
+
* Whether the drawer is open.
|
|
67
|
+
*
|
|
68
|
+
* @attr open
|
|
69
|
+
* @default false
|
|
29
70
|
*/
|
|
30
71
|
open: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Determines whether the drawer should remain open when the Escape key is pressed.
|
|
74
|
+
*
|
|
75
|
+
* This attribute is only applicable when the drawer is in a non-relative position,
|
|
76
|
+
* as the Escape key does not trigger the closing of relative drawers.
|
|
77
|
+
*
|
|
78
|
+
* @attr keep-open-on-escape
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
keepOpenOnEscape: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Sets an accessible label for the drawer.
|
|
84
|
+
*
|
|
85
|
+
* In non-relative positions this label is applied to the modal `<dialog>` element.
|
|
86
|
+
* In `relative` position it labels the `<nav>` landmark.
|
|
87
|
+
*
|
|
88
|
+
* When multiple navigation landmarks exist on the page each should receive a
|
|
89
|
+
* distinct label so screen-reader users can differentiate between them.
|
|
90
|
+
*
|
|
91
|
+
* @attr label
|
|
92
|
+
*/
|
|
93
|
+
label?: string;
|
|
31
94
|
constructor();
|
|
32
|
-
|
|
33
|
-
|
|
95
|
+
protected update(properties: PropertyValues<this>): void;
|
|
96
|
+
protected updated(properties: PropertyValues<this>): void;
|
|
97
|
+
private _handleOpenState;
|
|
98
|
+
private _handleMiniState;
|
|
99
|
+
private _handleCancel;
|
|
100
|
+
private _handleClose;
|
|
101
|
+
private _handleClick;
|
|
102
|
+
private _emitClosing;
|
|
103
|
+
private _closeWithEvent;
|
|
104
|
+
/** Opens the drawer. Returns `true` if the operation was successful, `false` if the drawer was already open. */
|
|
34
105
|
show(): Promise<boolean>;
|
|
35
|
-
/** Closes the drawer. */
|
|
106
|
+
/** Closes the drawer. Returns `true` if the operation was successful, `false` if the drawer was already closed. */
|
|
36
107
|
hide(): Promise<boolean>;
|
|
37
|
-
/** Toggles the open state of the drawer. */
|
|
108
|
+
/** Toggles the open state of the drawer. Delegates to `show()` or `hide()` depending on the current state. */
|
|
38
109
|
toggle(): Promise<boolean>;
|
|
110
|
+
private _renderMiniVariant;
|
|
111
|
+
private _renderContent;
|
|
112
|
+
private _renderDialog;
|
|
113
|
+
private _renderRelative;
|
|
39
114
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
40
115
|
}
|
|
41
116
|
declare global {
|
|
@@ -43,3 +118,4 @@ declare global {
|
|
|
43
118
|
'igc-nav-drawer': IgcNavDrawerComponent;
|
|
44
119
|
}
|
|
45
120
|
}
|
|
121
|
+
export {};
|
|
@@ -6,43 +6,134 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { html, LitElement } from 'lit';
|
|
8
8
|
import { property } from 'lit/decorators.js';
|
|
9
|
+
import { cache } from 'lit/directives/cache.js';
|
|
10
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
9
12
|
import { addThemingController } from '../../theming/theming-controller.js';
|
|
13
|
+
import { addCommandController } from '../common/controllers/command.js';
|
|
10
14
|
import { addSlotController, setSlots } from '../common/controllers/slot.js';
|
|
11
15
|
import { registerComponent } from '../common/definitions/register.js';
|
|
16
|
+
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
|
|
12
17
|
import { partMap } from '../common/part-map.js';
|
|
18
|
+
import { bindIf, isPopoverOpen, numberInRangeInclusive, } from '../common/util.js';
|
|
13
19
|
import IgcNavDrawerHeaderItemComponent from './nav-drawer-header-item.js';
|
|
14
20
|
import IgcNavDrawerItemComponent from './nav-drawer-item.js';
|
|
15
21
|
import { styles } from './themes/container.base.css.js';
|
|
16
22
|
import { all } from './themes/container.js';
|
|
17
23
|
import { styles as shared } from './themes/shared/container/nav-drawer.common.css.js';
|
|
18
|
-
export default class IgcNavDrawerComponent extends LitElement {
|
|
24
|
+
export default class IgcNavDrawerComponent extends EventEmitterMixin(LitElement) {
|
|
19
25
|
static { this.tagName = 'igc-nav-drawer'; }
|
|
20
26
|
static { this.styles = [styles, shared]; }
|
|
21
27
|
static register() {
|
|
22
28
|
registerComponent(IgcNavDrawerComponent, IgcNavDrawerHeaderItemComponent, IgcNavDrawerItemComponent);
|
|
23
29
|
}
|
|
30
|
+
get _dialog() {
|
|
31
|
+
return this._dialogRef.value;
|
|
32
|
+
}
|
|
33
|
+
get _mini() {
|
|
34
|
+
return this._miniRef.value;
|
|
35
|
+
}
|
|
36
|
+
get _hasMiniContent() {
|
|
37
|
+
return this._slots.hasAssignedElements('mini');
|
|
38
|
+
}
|
|
39
|
+
get _isRelative() {
|
|
40
|
+
return this.position === 'relative';
|
|
41
|
+
}
|
|
24
42
|
constructor() {
|
|
25
43
|
super();
|
|
44
|
+
this._dialogRef = createRef();
|
|
45
|
+
this._miniRef = createRef();
|
|
26
46
|
this._slots = addSlotController(this, {
|
|
27
47
|
slots: setSlots('mini'),
|
|
48
|
+
onChange: this._handleMiniState,
|
|
28
49
|
});
|
|
29
50
|
this.position = 'start';
|
|
30
51
|
this.open = false;
|
|
52
|
+
this.keepOpenOnEscape = false;
|
|
31
53
|
addThemingController(this, all);
|
|
54
|
+
addCommandController(this)
|
|
55
|
+
.set('--show', this.show)
|
|
56
|
+
.set('--hide', this.hide)
|
|
57
|
+
.set('--toggle', this.toggle);
|
|
32
58
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
update(properties) {
|
|
60
|
+
if (properties.has('position') && this._isRelative) {
|
|
61
|
+
this._dialog?.close();
|
|
62
|
+
if (isPopoverOpen(this._mini)) {
|
|
63
|
+
this._mini?.hidePopover();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
super.update(properties);
|
|
67
|
+
}
|
|
68
|
+
updated(properties) {
|
|
69
|
+
if (properties.has('open') || properties.has('position')) {
|
|
70
|
+
this._handleOpenState();
|
|
71
|
+
this._handleMiniState();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
_handleOpenState() {
|
|
75
|
+
if (this._isRelative) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
this.open ? this._dialog?.showModal() : this._dialog?.close();
|
|
79
|
+
}
|
|
80
|
+
_handleMiniState() {
|
|
81
|
+
if (this._isRelative) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const mini = this._mini;
|
|
85
|
+
if (!mini) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const popOverOpen = isPopoverOpen(mini);
|
|
89
|
+
if (!this._hasMiniContent || this.open) {
|
|
90
|
+
if (popOverOpen) {
|
|
91
|
+
mini.hidePopover();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
else if (!popOverOpen) {
|
|
95
|
+
mini.showPopover();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
_handleCancel(event) {
|
|
99
|
+
event.preventDefault();
|
|
100
|
+
if (!this.keepOpenOnEscape) {
|
|
101
|
+
this._closeWithEvent();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
_handleClose() {
|
|
105
|
+
if (this.open) {
|
|
106
|
+
this._dialog?.showModal();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
_handleClick({ clientX, clientY, target }) {
|
|
110
|
+
if (this._dialog === target) {
|
|
111
|
+
const rect = this._dialog.getBoundingClientRect();
|
|
112
|
+
const inX = numberInRangeInclusive(clientX, rect.left, rect.right);
|
|
113
|
+
const inY = numberInRangeInclusive(clientY, rect.top, rect.bottom);
|
|
114
|
+
if (!(inX && inY)) {
|
|
115
|
+
this._closeWithEvent();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
_emitClosing() {
|
|
120
|
+
return this.emitEvent('igcClosing', { cancelable: true });
|
|
121
|
+
}
|
|
122
|
+
async _closeWithEvent() {
|
|
123
|
+
if (!(this.open && this._emitClosing())) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
this.open = false;
|
|
127
|
+
await this.updateComplete;
|
|
128
|
+
this.emitEvent('igcClosed');
|
|
129
|
+
return true;
|
|
39
130
|
}
|
|
40
131
|
async show() {
|
|
41
132
|
if (this.open) {
|
|
42
133
|
return false;
|
|
43
134
|
}
|
|
44
135
|
this.open = true;
|
|
45
|
-
await this.
|
|
136
|
+
await this.updateComplete;
|
|
46
137
|
return true;
|
|
47
138
|
}
|
|
48
139
|
async hide() {
|
|
@@ -50,32 +141,62 @@ export default class IgcNavDrawerComponent extends LitElement {
|
|
|
50
141
|
return false;
|
|
51
142
|
}
|
|
52
143
|
this.open = false;
|
|
53
|
-
await this.
|
|
144
|
+
await this.updateComplete;
|
|
54
145
|
return true;
|
|
55
146
|
}
|
|
56
|
-
|
|
147
|
+
toggle() {
|
|
57
148
|
return this.open ? this.hide() : this.show();
|
|
58
149
|
}
|
|
59
|
-
|
|
150
|
+
_renderMiniVariant() {
|
|
60
151
|
return html `
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<div part="main">
|
|
65
|
-
<slot></slot>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div
|
|
152
|
+
<nav
|
|
153
|
+
${ref(this._miniRef)}
|
|
154
|
+
aria-label=${ifDefined(this.label)}
|
|
70
155
|
part=${partMap({
|
|
71
156
|
mini: true,
|
|
72
|
-
hidden: !this.
|
|
157
|
+
hidden: !this._hasMiniContent,
|
|
73
158
|
})}
|
|
159
|
+
.inert=${this.open || !this._hasMiniContent}
|
|
160
|
+
.popover=${!this._isRelative ? 'manual' : null}
|
|
74
161
|
>
|
|
75
162
|
<slot name="mini"></slot>
|
|
163
|
+
</nav>
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
166
|
+
_renderContent() {
|
|
167
|
+
return html `
|
|
168
|
+
<div part="main">
|
|
169
|
+
<slot></slot>
|
|
76
170
|
</div>
|
|
77
171
|
`;
|
|
78
172
|
}
|
|
173
|
+
_renderDialog() {
|
|
174
|
+
return html `
|
|
175
|
+
<dialog
|
|
176
|
+
${ref(this._dialogRef)}
|
|
177
|
+
part="base"
|
|
178
|
+
aria-modal="true"
|
|
179
|
+
aria-label=${ifDefined(this.label)}
|
|
180
|
+
@click=${this._handleClick}
|
|
181
|
+
@cancel=${this._handleCancel}
|
|
182
|
+
@close=${bindIf(this.keepOpenOnEscape, this._handleClose)}
|
|
183
|
+
>
|
|
184
|
+
${this._renderContent()}
|
|
185
|
+
</dialog>
|
|
186
|
+
${this._renderMiniVariant()}
|
|
187
|
+
`;
|
|
188
|
+
}
|
|
189
|
+
_renderRelative() {
|
|
190
|
+
return html `
|
|
191
|
+
<nav part="base" aria-label=${ifDefined(this.label)} .inert=${!this.open}>
|
|
192
|
+
${this._renderContent()}
|
|
193
|
+
</nav>
|
|
194
|
+
${this._renderMiniVariant()}
|
|
195
|
+
`;
|
|
196
|
+
}
|
|
197
|
+
render() {
|
|
198
|
+
return html `${cache(this._isRelative ? this._renderRelative() : this._renderDialog())}`;
|
|
199
|
+
}
|
|
79
200
|
}
|
|
80
201
|
__decorate([
|
|
81
202
|
property({ reflect: true })
|
|
@@ -83,4 +204,10 @@ __decorate([
|
|
|
83
204
|
__decorate([
|
|
84
205
|
property({ type: Boolean, reflect: true })
|
|
85
206
|
], IgcNavDrawerComponent.prototype, "open", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
property({ type: Boolean, attribute: 'keep-open-on-escape' })
|
|
209
|
+
], IgcNavDrawerComponent.prototype, "keepOpenOnEscape", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
property()
|
|
212
|
+
], IgcNavDrawerComponent.prototype, "label", void 0);
|
|
86
213
|
//# sourceMappingURL=nav-drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-drawer.js","sourceRoot":"","sources":["../../../src/components/nav-drawer/nav-drawer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,+BAA+B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,yBAAyB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,oDAAoD,CAAC;AAetF,MAAM,CAAC,OAAO,OAAO,qBAA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I,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAA;mCACoB,IAAI,CAAC,IAAI;;gCAEZ,CAAC,IAAI,CAAC,IAAI;;;;;;;eAO3B,OAAO,CAAC;YACb,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC;SACjD,CAAC;;;;KAIL,CAAC;IACJ,CAAC;;AAtEM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACiB;AAOtC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACvB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport type { NavDrawerPosition } from '../types.js';\nimport IgcNavDrawerHeaderItemComponent from './nav-drawer-header-item.js';\nimport IgcNavDrawerItemComponent from './nav-drawer-item.js';\nimport { styles } from './themes/container.base.css.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/container/nav-drawer.common.css.js';\n\n/**\n * Represents a side navigation container that provides\n * quick access between views.\n *\n * @element igc-nav-drawer\n *\n * @slot - The default slot for the igc-navigation-drawer.\n * @slot mini - The slot for the mini variant of the igc-navigation-drawer.\n *\n * @csspart base - The base wrapper of the igc-navigation-drawer.\n * @csspart main - The main container of the igc-navigation-drawer.\n * @csspart mini - The mini container of the igc-navigation-drawer.\n */\nexport default class IgcNavDrawerComponent extends LitElement {\n public static readonly tagName = 'igc-nav-drawer';\n public static override styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcNavDrawerComponent,\n IgcNavDrawerHeaderItemComponent,\n IgcNavDrawerItemComponent\n );\n }\n\n private readonly _slots = addSlotController(this, {\n slots: setSlots('mini'),\n });\n\n /**\n * The position of the drawer.\n * @attr\n */\n @property({ reflect: true })\n public position: NavDrawerPosition = 'start';\n\n /**\n * Determines whether the drawer is opened.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n constructor() {\n super();\n addThemingController(this, all);\n }\n\n private _waitTransitions() {\n return new Promise<Event>((resolve) => {\n this.renderRoot.addEventListener('transitionend', resolve, {\n once: true,\n });\n });\n }\n\n /** Opens the drawer. */\n public async show(): Promise<boolean> {\n if (this.open) {\n return false;\n }\n\n this.open = true;\n await this._waitTransitions();\n\n return true;\n }\n\n /** Closes the drawer. */\n public async hide(): Promise<boolean> {\n if (!this.open) {\n return false;\n }\n\n this.open = false;\n await this._waitTransitions();\n\n return true;\n }\n\n /** Toggles the open state of the drawer. */\n public async toggle(): Promise<boolean> {\n return this.open ? this.hide() : this.show();\n }\n\n protected override render() {\n return html`\n <div part=\"overlay\" @click=${this.hide}></div>\n\n <div part=\"base\" .inert=${!this.open}>\n <div part=\"main\">\n <slot></slot>\n </div>\n </div>\n\n <div\n part=${partMap({\n mini: true,\n hidden: !this._slots.hasAssignedElements('mini'),\n })}\n >\n <slot name=\"mini\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-nav-drawer': IgcNavDrawerComponent;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nav-drawer.js","sourceRoot":"","sources":["../../../src/components/nav-drawer/nav-drawer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;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AC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CACjE,EAAE,CAAC;IACN,CAAC;;AA9OM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACiB;AAStC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDACvB;AAYb;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;+DAC9B;AAczB;IADN,QAAQ,EAAE;oDACW","sourcesContent":["import { html, LitElement, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { cache } from 'lit/directives/cache.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { addCommandController } from '../common/controllers/command.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { partMap } from '../common/part-map.js';\nimport {\n bindIf,\n isPopoverOpen,\n numberInRangeInclusive,\n} from '../common/util.js';\nimport type { NavDrawerPosition } from '../types.js';\nimport IgcNavDrawerHeaderItemComponent from './nav-drawer-header-item.js';\nimport IgcNavDrawerItemComponent from './nav-drawer-item.js';\nimport { styles } from './themes/container.base.css.js';\nimport { all } from './themes/container.js';\nimport { styles as shared } from './themes/shared/container/nav-drawer.common.css.js';\n\nexport interface IgcNavDrawerComponentEventMap {\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n}\n\n/**\n * A side navigation container that provides\n * quick access between views within an application.\n *\n * For non-relative positions (`start`, `end`, `top`, `bottom`) the drawer is\n * rendered as a native `<dialog>` element, providing modal semantics, automatic\n * focus trapping, and a backdrop. For the `relative` position it is rendered\n * inline as a `<nav>` landmark.\n *\n * When content is provided in the `mini` slot, a compact icon-only variant is\n * always displayed alongside the main drawer (hidden only while the full drawer\n * is open).\n *\n * The component integrates with the\n * [Invoker Commands API](https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API):\n * an Ignite button or a native `<button>` with `command=\"--show\"` / `\"--hide\"` / `\"--toggle\"`\n * and `commandfor` pointing to this element will call the corresponding method\n * declaratively without any JavaScript.\n *\n * @element igc-nav-drawer\n *\n * @fires igcClosing - Emitted just before the drawer is closed by a user interaction. Cancelable —\n * call `event.preventDefault()` to abort the closing sequence.\n * @fires igcClosed - Emitted just after the drawer is closed by a user interaction.\n *\n * @slot - Renders the main navigation content of the drawer.\n * @slot mini - Renders the compact mini variant of the drawer.\n *\n * @csspart base - The base wrapper of the drawer.\n * @csspart main - The main content container of the drawer.\n * @csspart mini - The mini variant container of the drawer.\n */\nexport default class IgcNavDrawerComponent extends EventEmitterMixin<\n IgcNavDrawerComponentEventMap,\n Constructor<LitElement>\n>(LitElement) {\n public static readonly tagName = 'igc-nav-drawer';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcNavDrawerComponent,\n IgcNavDrawerHeaderItemComponent,\n IgcNavDrawerItemComponent\n );\n }\n\n //#region Internal state\n\n private readonly _dialogRef = createRef<HTMLDialogElement>();\n private readonly _miniRef = createRef<HTMLElement>();\n\n private readonly _slots = addSlotController(this, {\n slots: setSlots('mini'),\n onChange: this._handleMiniState,\n });\n\n private get _dialog(): HTMLDialogElement | undefined {\n return this._dialogRef.value;\n }\n\n private get _mini(): HTMLElement | undefined {\n return this._miniRef.value;\n }\n\n private get _hasMiniContent(): boolean {\n return this._slots.hasAssignedElements('mini');\n }\n\n private get _isRelative(): boolean {\n return this.position === 'relative';\n }\n\n //#endregion\n\n //#region Public properties\n\n /**\n * Sets the position of the drawer.\n *\n * - `start` — anchored to the inline-start edge (default).\n * - `end` — anchored to the inline-end edge.\n * - `top` — anchored to the block-start edge.\n * - `bottom` — anchored to the block-end edge.\n * - `relative` — rendered inline within the page flow; no modal backdrop.\n *\n * @attr position\n * @default 'start'\n */\n @property({ reflect: true })\n public position: NavDrawerPosition = 'start';\n\n /**\n * Whether the drawer is open.\n *\n * @attr open\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public open = false;\n\n /**\n * Determines whether the drawer should remain open when the Escape key is pressed.\n *\n * This attribute is only applicable when the drawer is in a non-relative position,\n * as the Escape key does not trigger the closing of relative drawers.\n *\n * @attr keep-open-on-escape\n * @default false\n */\n @property({ type: Boolean, attribute: 'keep-open-on-escape' })\n public keepOpenOnEscape = false;\n\n /**\n * Sets an accessible label for the drawer.\n *\n * In non-relative positions this label is applied to the modal `<dialog>` element.\n * In `relative` position it labels the `<nav>` landmark.\n *\n * When multiple navigation landmarks exist on the page each should receive a\n * distinct label so screen-reader users can differentiate between them.\n *\n * @attr label\n */\n @property()\n public label?: string;\n\n //#endregion\n\n //#region Lit Lifecycle\n\n constructor() {\n super();\n\n addThemingController(this, all);\n addCommandController(this)\n .set('--show', this.show)\n .set('--hide', this.hide)\n .set('--toggle', this.toggle);\n }\n\n protected override update(properties: PropertyValues<this>): void {\n if (properties.has('position') && this._isRelative) {\n this._dialog?.close();\n if (isPopoverOpen(this._mini)) {\n this._mini?.hidePopover();\n }\n }\n\n super.update(properties);\n }\n\n protected override updated(properties: PropertyValues<this>): void {\n if (properties.has('open') || properties.has('position')) {\n this._handleOpenState();\n this._handleMiniState();\n }\n }\n\n //#endregion\n\n //#region Event handlers\n\n private _handleOpenState(): void {\n if (this._isRelative) {\n return;\n }\n\n this.open ? this._dialog?.showModal() : this._dialog?.close();\n }\n\n private _handleMiniState(): void {\n if (this._isRelative) {\n return;\n }\n\n const mini = this._mini;\n if (!mini) {\n return;\n }\n\n const popOverOpen = isPopoverOpen(mini);\n\n if (!this._hasMiniContent || this.open) {\n if (popOverOpen) {\n mini.hidePopover();\n }\n } else if (!popOverOpen) {\n mini.showPopover();\n }\n }\n\n private _handleCancel(event: Event): void {\n event.preventDefault();\n\n if (!this.keepOpenOnEscape) {\n this._closeWithEvent();\n }\n }\n\n private _handleClose(): void {\n if (this.open) {\n this._dialog?.showModal();\n }\n }\n\n private _handleClick({ clientX, clientY, target }: PointerEvent): void {\n if (this._dialog === target) {\n const rect = this._dialog.getBoundingClientRect();\n const inX = numberInRangeInclusive(clientX, rect.left, rect.right);\n const inY = numberInRangeInclusive(clientY, rect.top, rect.bottom);\n\n if (!(inX && inY)) {\n this._closeWithEvent();\n }\n }\n }\n\n //#endregion\n\n //#region Internal API\n\n private _emitClosing(): boolean {\n return this.emitEvent('igcClosing', { cancelable: true });\n }\n\n private async _closeWithEvent(): Promise<boolean> {\n if (!(this.open && this._emitClosing())) {\n return false;\n }\n\n this.open = false;\n await this.updateComplete;\n\n this.emitEvent('igcClosed');\n return true;\n }\n\n //#endregion\n\n //#region Public API\n\n /** Opens the drawer. Returns `true` if the operation was successful, `false` if the drawer was already open. */\n public async show(): Promise<boolean> {\n if (this.open) {\n return false;\n }\n\n this.open = true;\n await this.updateComplete;\n\n return true;\n }\n\n /** Closes the drawer. Returns `true` if the operation was successful, `false` if the drawer was already closed. */\n public async hide(): Promise<boolean> {\n if (!this.open) {\n return false;\n }\n\n this.open = false;\n await this.updateComplete;\n\n return true;\n }\n\n /** Toggles the open state of the drawer. Delegates to `show()` or `hide()` depending on the current state. */\n public toggle(): Promise<boolean> {\n return this.open ? this.hide() : this.show();\n }\n\n //#endregion\n\n private _renderMiniVariant() {\n return html`\n <nav\n ${ref(this._miniRef)}\n aria-label=${ifDefined(this.label)}\n part=${partMap({\n mini: true,\n hidden: !this._hasMiniContent,\n })}\n .inert=${this.open || !this._hasMiniContent}\n .popover=${!this._isRelative ? 'manual' : null}\n >\n <slot name=\"mini\"></slot>\n </nav>\n `;\n }\n\n private _renderContent() {\n return html`\n <div part=\"main\">\n <slot></slot>\n </div>\n `;\n }\n\n private _renderDialog() {\n return html`\n <dialog\n ${ref(this._dialogRef)}\n part=\"base\"\n aria-modal=\"true\"\n aria-label=${ifDefined(this.label)}\n @click=${this._handleClick}\n @cancel=${this._handleCancel}\n @close=${bindIf(this.keepOpenOnEscape, this._handleClose)}\n >\n ${this._renderContent()}\n </dialog>\n ${this._renderMiniVariant()}\n `;\n }\n\n private _renderRelative() {\n return html`\n <nav part=\"base\" aria-label=${ifDefined(this.label)} .inert=${!this.open}>\n ${this._renderContent()}\n </nav>\n ${this._renderMiniVariant()}\n `;\n }\n\n protected override render() {\n return html`${cache(\n this._isRelative ? this._renderRelative() : this._renderDialog()\n )}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-nav-drawer': IgcNavDrawerComponent;\n }\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--menu-full-width: 15rem;display:flex;flex-shrink:0;font-family:var(--ig-font-family)}:host [part=base],:host [part
|
|
2
|
+
export const styles = css `:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--menu-full-width: 15rem;--menu-height: 50vh;--transition-function: cubic-bezier(0.445, 0.05, 0.55, 0.95);--transition-duration: 0.35s;display:flex;flex-shrink:0;font-family:var(--ig-font-family)}:host [part=base],:host [part=mini]{--ig-scrollbar-size: rem(8px);margin:unset;border:unset;outline-style:none;height:100%;min-height:100%;overflow-x:hidden}:host [part=mini]{width:var(--menu-mini-width);transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:display,translate,overlay}:host [part=mini]::backdrop{display:none}:host [part=base]{box-sizing:border-box;width:var(--menu-full-width);padding:unset;transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:translate,opacity,overlay,display}:host [part=base]::backdrop{transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:opacity,display;opacity:0}:host [part=base]:open::backdrop{opacity:1}@starting-style{:host [part=base]:open::backdrop{opacity:0}}:host [part=main]{width:100%}:host([position=start]) [part=base],:host([position=start]) [part=mini]{border:none;border-inline-end-style:solid;border-inline-end-width:.0625rem;margin-inline-end:auto}:host([position=end]) [part=base],:host([position=end]) [part=mini]{border:none;border-inline-start-style:solid;border-inline-start-width:.0625rem;margin-inline-start:auto}:host([position=start]),:host([dir=rtl][position=end]){--dir: calc(var(--ig-dir, 1) * -1)}:host([position=end]),:host([dir=rtl][position=start]){--dir: calc(var(--ig-dir, 1) * 1)}:host([position=top]) [part=base],:host([position=bottom]) [part=base]{height:var(--menu-height);min-height:initial;min-width:100vw;margin:revert}:host([position=top]) [part=mini],:host([position=bottom]) [part=mini]{display:none;transition:none}:host([position=top]) [part=base]{top:0;bottom:auto;border:none;border-block-end-style:solid;border-block-end-width:.0625rem}:host([position=top]) [part=base]:not(:open){translate:0 calc(var(--menu-height)*-1)}:host([position=top]) [part=base]:open{translate:0}@starting-style{:host([position=top]) [part=base]:open{translate:0 calc(var(--menu-height)*-1)}}:host([position=bottom]) [part=base]{top:auto;bottom:0;border:none;border-block-start-style:solid;border-block-start-width:.0625rem}:host([position=bottom]) [part=base]:not(:open){translate:0 var(--menu-height)}:host([position=bottom]) [part=base]:open{translate:0}@starting-style{:host([position=bottom]) [part=base]:open{translate:0 var(--menu-height)}}:host(:where([position=start],[position=end])) [part=base]{border-inline-end-style:solid;border-inline-end-width:.0625rem}:host(:where([position=start],[position=end])) [part=base]:not(:open){translate:calc(200%*var(--dir)) 0}:host(:where([position=start],[position=end])) [part=base]:not(:open)+[part~=mini]{translate:0}@starting-style{:host(:where([position=start],[position=end])) [part=base]:not(:open)+[part~=mini]{translate:calc(200%*var(--dir)) 0}}:host(:where([position=start],[position=end])) [part=base]:open+[part~=mini]{translate:calc(200%*var(--dir)) 0}@starting-style{:host(:where([position=start],[position=end])) [part=base]:open{translate:calc(200%*var(--dir)) 0}}@supports not selector(:open){:host [part=base]{transition-property:translate,opacity}:host [part=base]::backdrop{transition-property:opacity}:host([open]) [part=base]::backdrop{opacity:1}@starting-style{:host([open]) [part=base]::backdrop{opacity:0}}:host([open][position=top]) [part=base]{translate:0}@starting-style{:host([open][position=top]) [part=base]{translate:0 calc(var(--menu-height)*-1)}}:host(:not([open])[position=top]) [part=base]{translate:0 calc(var(--menu-height)*-1)}:host([open][position=bottom]) [part=base]{translate:0}@starting-style{:host([open][position=bottom]) [part=base]{translate:0 var(--menu-height)}}:host(:not([open])[position=bottom]) [part=base]{translate:0 var(--menu-height)}@starting-style{:host([open]:where([position=start],[position=end])) [part=base]{translate:calc(200%*var(--dir)) 0}}:host(:not([open]):where([position=start],[position=end])) [part=base]{translate:calc(200%*var(--dir)) 0}}:host([position=relative]):has([part=mini]){--transition-duration: 0.2s}:host([position=relative]) [part=base]{position:relative;box-shadow:none;border-inline-end-style:solid;border-inline-end-width:.0625rem;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:margin,border}:host([position=relative]) [part=mini]{position:relative;border-inline-end-width:.0625rem;border-inline-end-style:solid;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:width,min-width,padding,border;order:-1;z-index:1}:host(:not([open])[position=relative]) [part=base]{margin-inline-start:calc(var(--menu-full-width)*-1);border-color:rgba(0,0,0,0);overflow:hidden}:host(:not([open])[position=relative]) [part=mini]{transition-delay:var(--transition-duration)}:host([open][position=relative]) [part=base]:has(+[part=mini]){transition-delay:var(--transition-duration)}:host([open][position=relative]) [part=mini]{width:0;min-width:0;padding-inline:0;border-color:rgba(0,0,0,0)}`;
|
|
3
3
|
//# sourceMappingURL=container.base.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.base.css.js","sourceRoot":"","sources":["../../../../src/components/nav-drawer/themes/container.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"container.base.css.js","sourceRoot":"","sources":["../../../../src/components/nav-drawer/themes/container.base.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,+vMAA+vM,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);--is-medium: min( clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1), clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1) );--is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);position:relative;box-sizing:border-box;scrollbar-width:var(--ig-scrollbar-size, var(--sb-size));scrollbar-color:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color)) var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar{width:var(--ig-scrollbar-size, var(--sb-size));height:var(--ig-scrollbar-size, var(--sb-size));background:var(--ig-scrollbar-track-background, var(--sb-track-bg-color))}:host ::-webkit-scrollbar-thumb{background:var(--ig-scrollbar-thumb-background, var(--sb-thumb-bg-color))}:host *,:host *::before,:host *::after{box-sizing:border-box}:host([hidden]),[hidden]{display:none !important}:host{--menu-full-width: 15rem;--menu-height: 50vh;--transition-function: cubic-bezier(0.445, 0.05, 0.55, 0.95);--transition-duration: 0.35s;display:flex;flex-shrink:0;font-family:var(--ig-font-family)}:host [part=base],:host [part=mini]{--ig-scrollbar-size: rem(8px);margin:unset;border:unset;outline-style:none;height:100%;min-height:100%;overflow-x:hidden}:host [part=mini]{width:var(--menu-mini-width);transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:display,translate,overlay}:host [part=mini]::backdrop{display:none}:host [part=base]{box-sizing:border-box;width:var(--menu-full-width);padding:unset;transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:translate,opacity,overlay,display}:host [part=base]::backdrop{transition-behavior:allow-discrete;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:opacity,display;opacity:0}:host [part=base]:open::backdrop{opacity:1}@starting-style{:host [part=base]:open::backdrop{opacity:0}}:host [part=main]{width:100%}:host([position=start]) [part=base],:host([position=start]) [part=mini]{border:none;border-inline-end-style:solid;border-inline-end-width:.0625rem;margin-inline-end:auto}:host([position=end]) [part=base],:host([position=end]) [part=mini]{border:none;border-inline-start-style:solid;border-inline-start-width:.0625rem;margin-inline-start:auto}:host([position=start]),:host([dir=rtl][position=end]){--dir: calc(var(--ig-dir, 1) * -1)}:host([position=end]),:host([dir=rtl][position=start]){--dir: calc(var(--ig-dir, 1) * 1)}:host([position=top]) [part=base],:host([position=bottom]) [part=base]{height:var(--menu-height);min-height:initial;min-width:100vw;margin:revert}:host([position=top]) [part=mini],:host([position=bottom]) [part=mini]{display:none;transition:none}:host([position=top]) [part=base]{top:0;bottom:auto;border:none;border-block-end-style:solid;border-block-end-width:.0625rem}:host([position=top]) [part=base]:not(:open){translate:0 calc(var(--menu-height)*-1)}:host([position=top]) [part=base]:open{translate:0}@starting-style{:host([position=top]) [part=base]:open{translate:0 calc(var(--menu-height)*-1)}}:host([position=bottom]) [part=base]{top:auto;bottom:0;border:none;border-block-start-style:solid;border-block-start-width:.0625rem}:host([position=bottom]) [part=base]:not(:open){translate:0 var(--menu-height)}:host([position=bottom]) [part=base]:open{translate:0}@starting-style{:host([position=bottom]) [part=base]:open{translate:0 var(--menu-height)}}:host(:where([position=start],[position=end])) [part=base]{border-inline-end-style:solid;border-inline-end-width:.0625rem}:host(:where([position=start],[position=end])) [part=base]:not(:open){translate:calc(200%*var(--dir)) 0}:host(:where([position=start],[position=end])) [part=base]:not(:open)+[part~=mini]{translate:0}@starting-style{:host(:where([position=start],[position=end])) [part=base]:not(:open)+[part~=mini]{translate:calc(200%*var(--dir)) 0}}:host(:where([position=start],[position=end])) [part=base]:open+[part~=mini]{translate:calc(200%*var(--dir)) 0}@starting-style{:host(:where([position=start],[position=end])) [part=base]:open{translate:calc(200%*var(--dir)) 0}}@supports not selector(:open){:host [part=base]{transition-property:translate,opacity}:host [part=base]::backdrop{transition-property:opacity}:host([open]) [part=base]::backdrop{opacity:1}@starting-style{:host([open]) [part=base]::backdrop{opacity:0}}:host([open][position=top]) [part=base]{translate:0}@starting-style{:host([open][position=top]) [part=base]{translate:0 calc(var(--menu-height)*-1)}}:host(:not([open])[position=top]) [part=base]{translate:0 calc(var(--menu-height)*-1)}:host([open][position=bottom]) [part=base]{translate:0}@starting-style{:host([open][position=bottom]) [part=base]{translate:0 var(--menu-height)}}:host(:not([open])[position=bottom]) [part=base]{translate:0 var(--menu-height)}@starting-style{:host([open]:where([position=start],[position=end])) [part=base]{translate:calc(200%*var(--dir)) 0}}:host(:not([open]):where([position=start],[position=end])) [part=base]{translate:calc(200%*var(--dir)) 0}}:host([position=relative]):has([part=mini]){--transition-duration: 0.2s}:host([position=relative]) [part=base]{position:relative;box-shadow:none;border-inline-end-style:solid;border-inline-end-width:.0625rem;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:margin,border}:host([position=relative]) [part=mini]{position:relative;border-inline-end-width:.0625rem;border-inline-end-style:solid;transition-duration:var(--transition-duration);transition-timing-function:var(--transition-function);transition-property:width,min-width,padding,border;order:-1;z-index:1}:host(:not([open])[position=relative]) [part=base]{margin-inline-start:calc(var(--menu-full-width)*-1);border-color:rgba(0,0,0,0);overflow:hidden}:host(:not([open])[position=relative]) [part=mini]{transition-delay:var(--transition-duration)}:host([open][position=relative]) [part=base]:has(+[part=mini]){transition-delay:var(--transition-duration)}:host([open][position=relative]) [part=mini]{width:0;min-width:0;padding-inline:0;border-color:rgba(0,0,0,0)}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css
|
|
2
|
+
export const styles = css `:host [part=base]{background:var(--background);border-color:var(--border-color)}:host [part=base]::backdrop{background:var(--background-color)}:host [part=mini]{background:var(--background);border-color:var(--border-color)}:host(:is([position=start],[position=end])) [part=base],:host(:is([position=start],[position=end])) [part=mini]{border-inline-color:var(--border-color)}:host(:is([position=start],[position=end])) [part=mini]{box-shadow:var(--elevation)}:host(:is([position=top],[position=bottom])) [part=base]{border-block-color:var(--border-color)}:host(:not([position=relative])) [part=base]:open{box-shadow:var(--elevation)}`;
|
|
3
3
|
//# sourceMappingURL=nav-drawer.common.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-drawer.common.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.common.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"nav-drawer.common.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.common.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,2nBAA2nB,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host [part=base]{background:var(--background);border-color:var(--border-color)}:host [part=base]::backdrop{background:var(--background-color)}:host [part=mini]{background:var(--background);border-color:var(--border-color)}:host(:is([position=start],[position=end])) [part=base],:host(:is([position=start],[position=end])) [part=mini]{border-inline-color:var(--border-color)}:host(:is([position=start],[position=end])) [part=mini]{box-shadow:var(--elevation)}:host(:is([position=top],[position=bottom])) [part=base]{border-block-color:var(--border-color)}:host(:not([position=relative])) [part=base]:open{box-shadow:var(--elevation)}`;\n "]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-drawer.fluent.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"nav-drawer.fluent.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.fluent.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,kCAAkC,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--menu-mini-width: 2.5rem}`;\n "]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const styles = css `:host{--menu-mini-width: 3rem}:host [part=
|
|
2
|
+
export const styles = css `:host{--menu-mini-width: 3rem}:host [part=base]::backdrop{background:var(--background-color)}:host [part=mini],:host [part=main]{padding:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-large, var(--ig-spacing, var(--ig-spacing))),var(--is-medium, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-medium, var(--ig-spacing, var(--ig-spacing))),var(--is-small, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-small, var(--ig-spacing, var(--ig-spacing))))}`;
|
|
3
3
|
//# sourceMappingURL=nav-drawer.indigo.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-drawer.indigo.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,
|
|
1
|
+
{"version":3,"file":"nav-drawer.indigo.css.js","sourceRoot":"","sources":["../../../../../../src/components/nav-drawer/themes/shared/container/nav-drawer.indigo.css.ts"],"names":[],"mappings":"AACE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA,gdAAgd,CAAC","sourcesContent":["\n import { css } from 'lit';\n export const styles = css`:host{--menu-mini-width: 3rem}:host [part=base]::backdrop{background:var(--background-color)}:host [part=mini],:host [part=main]{padding:max(var(--is-large, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-large, var(--ig-spacing, var(--ig-spacing))),var(--is-medium, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-medium, var(--ig-spacing, var(--ig-spacing))),var(--is-small, 1)*max(0.5rem, -1 * 0.5rem)*var(--ig-spacing-small, var(--ig-spacing, var(--ig-spacing))))}`;\n "]}
|
|
@@ -235,6 +235,7 @@ export default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMix
|
|
|
235
235
|
aria-labelledby=${labelledBy ? labelledBy : this._labelId}
|
|
236
236
|
aria-describedby=${describedBy}
|
|
237
237
|
@click=${this._handleClick}
|
|
238
|
+
@keydown=${this._handleEnterKeydown}
|
|
238
239
|
/>
|
|
239
240
|
<span part=${partMap({ control: true, checked })}>
|
|
240
241
|
<span
|