@aquera/nile-elements 0.0.75 → 0.0.76

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.
@@ -1 +1 @@
1
- {"version":3,"file":"nile-drawer.css.cjs.js","sources":["../../../src/nile-drawer/nile-drawer.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --size: 25rem;\n --header-spacing: 1.25rem;\n --body-spacing: 1.25rem;\n --footer-spacing: 1.25rem;\n\n display: contents;\n }\n\n .drawer {\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n }\n\n .drawer--contained {\n position: absolute;\n z-index: initial;\n }\n\n .drawer--fixed {\n position: fixed;\n z-index: 700;\n }\n\n .drawer__panel {\n position: absolute;\n display: flex;\n flex-direction: column;\n z-index: 2;\n max-width: 100%;\n max-height: 100%;\n background-color: hsl(0, 0%, 100%);\n box-shadow: 0 4px 16px hsl(240 3.8% 46.1% / 12%);\n overflow: auto;\n pointer-events: all;\n }\n\n .drawer__panel:focus {\n outline: none;\n }\n\n .drawer--top .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--end .drawer__panel {\n top: 0;\n inset-inline-end: 0;\n bottom: auto;\n inset-inline-start: auto;\n width: var(--size);\n height: 100%;\n }\n\n .drawer--bottom .drawer__panel {\n top: auto;\n inset-inline-end: auto;\n bottom: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--start .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: var(--size);\n height: 100%;\n }\n\n .drawer__header {\n display: flex;\n }\n\n .drawer__title {\n flex: 1 1 auto;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1.4;\n padding: var(--header-spacing);\n margin: 0;\n }\n\n .drawer__header-actions {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n gap: 0.25rem;\n padding: 0 var(--header-spacing);\n }\n\n .drawer__header-actions nile-icon-button,\n .drawer__header-actions ::slotted(nile-icon-button) {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1rem;\n }\n\n .drawer__body {\n flex: 1 1 auto;\n display: block;\n padding: var(--body-spacing);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .drawer__footer {\n text-align: right;\n padding: var(--footer-spacing);\n }\n\n .drawer__footer ::slotted(nile-button:not(:last-of-type)) {\n margin-inline-end: 0.5rem;\n }\n\n .drawer:not(.drawer--has-footer) .drawer__footer {\n display: none;\n }\n\n .drawer__overlay {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: hsl(240 3.8% 46.1% / 33%);\n pointer-events: all;\n }\n\n .drawer--contained .drawer__overlay {\n display: none;\n }\n\n @media (forced-colors: active) {\n .drawer__panel {\n border: solid 1px hsl(0, 0%, 100%);\n }\n }\n`;\n\nexport default [styles];\n"],"names":["styles$1","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAqLeA,CAAA,CAAA,CAzKOC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-drawer.css.cjs.js","sources":["../../../src/nile-drawer/nile-drawer.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n --nile-drawer-remove-icon-color:#000;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --size: 25rem;\n --header-spacing: 1.25rem;\n --body-spacing: 1.25rem;\n --footer-spacing: 1.25rem;\n\n display: contents;\n }\n\n .drawer {\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n }\n\n .drawer--contained {\n position: absolute;\n z-index: initial;\n }\n\n .drawer--fixed {\n position: fixed;\n z-index: 700;\n }\n\n .drawer__panel {\n position: absolute;\n display: flex;\n flex-direction: column;\n z-index: 2;\n max-width: 100%;\n max-height: 100%;\n background-color: hsl(0, 0%, 100%);\n box-shadow: 0 4px 16px hsl(240 3.8% 46.1% / 12%);\n overflow: auto;\n pointer-events: all;\n }\n\n .drawer__panel:focus {\n outline: none;\n }\n\n .drawer--top .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--end .drawer__panel {\n top: 0;\n inset-inline-end: 0;\n bottom: auto;\n inset-inline-start: auto;\n width: var(--size);\n height: 100%;\n }\n\n .drawer--bottom .drawer__panel {\n top: auto;\n inset-inline-end: auto;\n bottom: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--start .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: var(--size);\n height: 100%;\n }\n\n .drawer__header {\n display: flex;\n }\n\n .drawer__title {\n flex: 1 1 auto;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1.4;\n padding: var(--header-spacing);\n margin: 0;\n }\n\n .drawer__header-actions {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n gap: 0.25rem;\n padding: 0 var(--header-spacing);\n }\n\n .drawer__header-actions nile-icon-button,\n .drawer__header-actions ::slotted(nile-icon-button) {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1rem;\n }\n\n .drawer__body {\n flex: 1 1 auto;\n display: block;\n padding: var(--body-spacing);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .drawer__footer {\n text-align: right;\n padding: var(--footer-spacing);\n }\n\n .drawer__footer ::slotted(nile-button:not(:last-of-type)) {\n margin-inline-end: 0.5rem;\n }\n\n .drawer:not(.drawer--has-footer) .drawer__footer {\n display: none;\n }\n\n .drawer__overlay {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: hsl(240 3.8% 46.1% / 33%);\n pointer-events: all;\n }\n\n .drawer--contained .drawer__overlay {\n display: none;\n }\n\n .drawer__close:hover {\n cursor:pointer;\n }\n\n @media (forced-colors: active) {\n .drawer__panel {\n border: solid 1px hsl(0, 0%, 100%);\n }\n }\n`;\n\nexport default [styles];\n"],"names":["styles$1","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXA0LeA,CAAA,CAAA,CA9KOC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,6 +1,7 @@
1
- import{i as e}from"../index-0a3007c5.esm.js";var t=[e`
1
+ import{i as e}from"../index-0a3007c5.esm.js";var r=[e`
2
2
  :host {
3
3
  box-sizing: border-box;
4
+ --nile-drawer-remove-icon-color:#000;
4
5
  }
5
6
 
6
7
  :host *,
@@ -160,9 +161,13 @@ import{i as e}from"../index-0a3007c5.esm.js";var t=[e`
160
161
  display: none;
161
162
  }
162
163
 
164
+ .drawer__close:hover {
165
+ cursor:pointer;
166
+ }
167
+
163
168
  @media (forced-colors: active) {
164
169
  .drawer__panel {
165
170
  border: solid 1px hsl(0, 0%, 100%);
166
171
  }
167
172
  }
168
- `];export{t as s};
173
+ `];export{r as s};
@@ -3,7 +3,12 @@ import{__decorate as i}from"tslib";import"../nile-icon-button/nile-icon-button.e
3
3
  part="base"
4
4
  class=${n({drawer:!0,"drawer--open":this.open,"drawer--top":"top"===this.placement,"drawer--end":"end"===this.placement,"drawer--bottom":"bottom"===this.placement,"drawer--start":"start"===this.placement,"drawer--contained":this.contained,"drawer--fixed":!this.contained,"drawer--rtl":"rtl","drawer--has-footer":this.hasSlotController.test("footer")})}
5
5
  >
6
- <div part="overlay" class="drawer__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
6
+ <div
7
+ part="overlay"
8
+ class="drawer__overlay"
9
+ @click=${()=>this.requestClose("overlay")}
10
+ tabindex="-1"
11
+ ></div>
7
12
 
8
13
  <div
9
14
  part="panel"
@@ -19,19 +24,21 @@ import{__decorate as i}from"tslib";import"../nile-icon-button/nile-icon-button.e
19
24
  <header part="header" class="drawer__header">
20
25
  <h2 part="title" class="drawer__title" id="title">
21
26
  <!-- If there's no label, use an invisible character to prevent the header from collapsing -->
22
- <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot>
27
+ <slot name="label">
28
+ ${this.label.length>0?this.label:String.fromCharCode(65279)}
29
+ </slot>
23
30
  </h2>
24
31
  <div part="header-actions" class="drawer__header-actions">
25
32
  <slot name="header-actions"></slot>
26
- <nile-icon-button
27
- part="close-button"
28
- exportparts="base:close-button__base"
33
+ <nile-icon
29
34
  class="drawer__close"
30
35
  name="close"
31
- label='close'
32
- library="system"
36
+ label="close"
37
+ part="close-button"
38
+ exportparts="base:close-button__base"
39
+ color="var(--nile-drawer-remove-icon-color)"
33
40
  @click=${()=>this.requestClose("close-button")}
34
- ></nile-icon-button>
41
+ ></nile-icon>
35
42
  </div>
36
43
  </header>
37
44
  `}
@@ -65,13 +65,18 @@ export const styles = css `
65
65
  align-items: center;
66
66
  gap: 4px 7px;
67
67
  }
68
-
69
- @media not all and (min-resolution: .001dpcm) {
70
- @supports (-webkit-appearance:none)
68
+
69
+ .day-names {
70
+ flex-wrap: nowrap;
71
+ }
72
+
73
+
74
+ @media not all and (min-resolution: .001dpcm) {
75
+ @supports (-webkit-appearance:none)
71
76
  { .day-names, .days {
72
- column-gap: 6px;
73
- }
74
- }
77
+ column-gap: 6px;
78
+ }
79
+ }
75
80
  }
76
81
 
77
82
  .days {
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.css.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiWxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n \n @media not all and (min-resolution: .001dpcm) { \n @supports (-webkit-appearance:none) \n { .day-names, .days {\n column-gap: 6px; \n } \n } \n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-calendar.css.js","sourceRoot":"","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsWxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n\n .day-names {\n flex-wrap: nowrap;\n }\n\n\n @media not all and (min-resolution: .001dpcm) {\n @supports (-webkit-appearance:none)\n { .day-names, .days {\n column-gap: 6px;\n }\n }\n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n`;\n\nexport default [styles];\n"]}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
7
  /**
8
8
  * Drawer CSS
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
2
+ * Copyright Aquera Inc 2023
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
7
  import { css } from 'lit-element';
8
8
  /**
9
9
  * Drawer CSS
@@ -11,6 +11,7 @@ import { css } from 'lit-element';
11
11
  export const styles = css `
12
12
  :host {
13
13
  box-sizing: border-box;
14
+ --nile-drawer-remove-icon-color:#000;
14
15
  }
15
16
 
16
17
  :host *,
@@ -170,6 +171,10 @@ export const styles = css `
170
171
  display: none;
171
172
  }
172
173
 
174
+ .drawer__close:hover {
175
+ cursor:pointer;
176
+ }
177
+
173
178
  @media (forced-colors: active) {
174
179
  .drawer__panel {
175
180
  border: solid 1px hsl(0, 0%, 100%);
@@ -1 +1 @@
1
- {"version":3,"file":"nile-drawer.css.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuKxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --size: 25rem;\n --header-spacing: 1.25rem;\n --body-spacing: 1.25rem;\n --footer-spacing: 1.25rem;\n\n display: contents;\n }\n\n .drawer {\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n }\n\n .drawer--contained {\n position: absolute;\n z-index: initial;\n }\n\n .drawer--fixed {\n position: fixed;\n z-index: 700;\n }\n\n .drawer__panel {\n position: absolute;\n display: flex;\n flex-direction: column;\n z-index: 2;\n max-width: 100%;\n max-height: 100%;\n background-color: hsl(0, 0%, 100%);\n box-shadow: 0 4px 16px hsl(240 3.8% 46.1% / 12%);\n overflow: auto;\n pointer-events: all;\n }\n\n .drawer__panel:focus {\n outline: none;\n }\n\n .drawer--top .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--end .drawer__panel {\n top: 0;\n inset-inline-end: 0;\n bottom: auto;\n inset-inline-start: auto;\n width: var(--size);\n height: 100%;\n }\n\n .drawer--bottom .drawer__panel {\n top: auto;\n inset-inline-end: auto;\n bottom: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--start .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: var(--size);\n height: 100%;\n }\n\n .drawer__header {\n display: flex;\n }\n\n .drawer__title {\n flex: 1 1 auto;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1.4;\n padding: var(--header-spacing);\n margin: 0;\n }\n\n .drawer__header-actions {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n gap: 0.25rem;\n padding: 0 var(--header-spacing);\n }\n\n .drawer__header-actions nile-icon-button,\n .drawer__header-actions ::slotted(nile-icon-button) {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1rem;\n }\n\n .drawer__body {\n flex: 1 1 auto;\n display: block;\n padding: var(--body-spacing);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .drawer__footer {\n text-align: right;\n padding: var(--footer-spacing);\n }\n\n .drawer__footer ::slotted(nile-button:not(:last-of-type)) {\n margin-inline-end: 0.5rem;\n }\n\n .drawer:not(.drawer--has-footer) .drawer__footer {\n display: none;\n }\n\n .drawer__overlay {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: hsl(240 3.8% 46.1% / 33%);\n pointer-events: all;\n }\n\n .drawer--contained .drawer__overlay {\n display: none;\n }\n\n @media (forced-colors: active) {\n .drawer__panel {\n border: solid 1px hsl(0, 0%, 100%);\n }\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-drawer.css.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4KxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n --nile-drawer-remove-icon-color:#000;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --size: 25rem;\n --header-spacing: 1.25rem;\n --body-spacing: 1.25rem;\n --footer-spacing: 1.25rem;\n\n display: contents;\n }\n\n .drawer {\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n overflow: hidden;\n }\n\n .drawer--contained {\n position: absolute;\n z-index: initial;\n }\n\n .drawer--fixed {\n position: fixed;\n z-index: 700;\n }\n\n .drawer__panel {\n position: absolute;\n display: flex;\n flex-direction: column;\n z-index: 2;\n max-width: 100%;\n max-height: 100%;\n background-color: hsl(0, 0%, 100%);\n box-shadow: 0 4px 16px hsl(240 3.8% 46.1% / 12%);\n overflow: auto;\n pointer-events: all;\n }\n\n .drawer__panel:focus {\n outline: none;\n }\n\n .drawer--top .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--end .drawer__panel {\n top: 0;\n inset-inline-end: 0;\n bottom: auto;\n inset-inline-start: auto;\n width: var(--size);\n height: 100%;\n }\n\n .drawer--bottom .drawer__panel {\n top: auto;\n inset-inline-end: auto;\n bottom: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--size);\n }\n\n .drawer--start .drawer__panel {\n top: 0;\n inset-inline-end: auto;\n bottom: auto;\n inset-inline-start: 0;\n width: var(--size);\n height: 100%;\n }\n\n .drawer__header {\n display: flex;\n }\n\n .drawer__title {\n flex: 1 1 auto;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1.4;\n padding: var(--header-spacing);\n margin: 0;\n }\n\n .drawer__header-actions {\n flex-shrink: 0;\n display: flex;\n flex-wrap: wrap;\n justify-content: end;\n gap: 0.25rem;\n padding: 0 var(--header-spacing);\n }\n\n .drawer__header-actions nile-icon-button,\n .drawer__header-actions ::slotted(nile-icon-button) {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1rem;\n }\n\n .drawer__body {\n flex: 1 1 auto;\n display: block;\n padding: var(--body-spacing);\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n .drawer__footer {\n text-align: right;\n padding: var(--footer-spacing);\n }\n\n .drawer__footer ::slotted(nile-button:not(:last-of-type)) {\n margin-inline-end: 0.5rem;\n }\n\n .drawer:not(.drawer--has-footer) .drawer__footer {\n display: none;\n }\n\n .drawer__overlay {\n display: block;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: hsl(240 3.8% 46.1% / 33%);\n pointer-events: all;\n }\n\n .drawer--contained .drawer__overlay {\n display: none;\n }\n\n .drawer__close:hover {\n cursor:pointer;\n }\n\n @media (forced-colors: active) {\n .drawer__panel {\n border: solid 1px hsl(0, 0%, 100%);\n }\n }\n`;\n\nexport default [styles];\n"]}
@@ -269,10 +269,15 @@ let NileDrawer = class NileDrawer extends NileElement {
269
269
  'drawer--contained': this.contained,
270
270
  'drawer--fixed': !this.contained,
271
271
  'drawer--rtl': 'rtl',
272
- 'drawer--has-footer': this.hasSlotController.test('footer')
272
+ 'drawer--has-footer': this.hasSlotController.test('footer'),
273
273
  })}
274
274
  >
275
- <div part="overlay" class="drawer__overlay" @click=${() => this.requestClose('overlay')} tabindex="-1"></div>
275
+ <div
276
+ part="overlay"
277
+ class="drawer__overlay"
278
+ @click=${() => this.requestClose('overlay')}
279
+ tabindex="-1"
280
+ ></div>
276
281
 
277
282
  <div
278
283
  part="panel"
@@ -289,19 +294,23 @@ let NileDrawer = class NileDrawer extends NileElement {
289
294
  <header part="header" class="drawer__header">
290
295
  <h2 part="title" class="drawer__title" id="title">
291
296
  <!-- If there's no label, use an invisible character to prevent the header from collapsing -->
292
- <slot name="label"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>
297
+ <slot name="label">
298
+ ${this.label.length > 0
299
+ ? this.label
300
+ : String.fromCharCode(65279)}
301
+ </slot>
293
302
  </h2>
294
303
  <div part="header-actions" class="drawer__header-actions">
295
304
  <slot name="header-actions"></slot>
296
- <nile-icon-button
297
- part="close-button"
298
- exportparts="base:close-button__base"
305
+ <nile-icon
299
306
  class="drawer__close"
300
307
  name="close"
301
- label='close'
302
- library="system"
308
+ label="close"
309
+ part="close-button"
310
+ exportparts="base:close-button__base"
311
+ color="var(--nile-drawer-remove-icon-color)"
303
312
  @click=${() => this.requestClose('close-button')}
304
- ></nile-icon-button>
313
+ ></nile-icon>
305
314
  </div>
306
315
  </header>
307
316
  `
@@ -1 +1 @@
1
- {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAIY,sBAAiB,GAAG,IAAI,iB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AE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACxD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,UAAU;AACV,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer')\n })}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" @click=${() => this.requestClose('overlay')} tabindex=\"-1\"></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"drawer__close\"\n name=\"close\"\n label='close'\n library=\"system\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon-button>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAIY,sBAAiB,GAAG,IAAI,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QAQ3E;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OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,UAAU;AACV,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}