@aquera/nile-elements 0.0.97 → 0.0.99
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/README.md +13 -0
- package/demo/variables.css +4 -1
- package/demo/variables_v2.css +4 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +4 -4
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +3 -2
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +2 -2
- package/dist/nile-icon/icons/svg/every.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/every.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/every.esm.js +1 -1
- package/dist/nile-icon/icons/svg/logout.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/logout.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/logout.esm.js +1 -1
- package/dist/nile-icon/icons/svg/notscheduled.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/notscheduled.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/notscheduled.esm.js +1 -1
- package/dist/nile-icon/icons/svg/schedule.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/schedule.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/schedule.esm.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +16 -19
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +2 -2
- package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.test.esm.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +8 -2
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +11 -8
- package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.css.esm.js +3 -1
- package/dist/nile-toolbar/nile-toolbar.css.cjs.js +1 -1
- package/dist/nile-toolbar/nile-toolbar.css.cjs.js.map +1 -1
- package/dist/nile-toolbar/nile-toolbar.css.esm.js +5 -5
- package/dist/src/nile-auto-complete/nile-auto-complete.js +2 -2
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.js +1 -0
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-drawer/nile-drawer.d.ts +4 -0
- package/dist/src/nile-drawer/nile-drawer.js +9 -0
- package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/every.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/every.js +1 -1
- package/dist/src/nile-icon/icons/svg/every.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/logout.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/logout.js +1 -1
- package/dist/src/nile-icon/icons/svg/logout.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/notscheduled.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/notscheduled.js +1 -1
- package/dist/src/nile-icon/icons/svg/notscheduled.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/schedule.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/schedule.js +1 -1
- package/dist/src/nile-icon/icons/svg/schedule.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +16 -19
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.d.ts +5 -3
- package/dist/src/nile-popover/nile-popover.js +18 -5
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +1 -1
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js +6 -0
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.js +5 -2
- package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
- package/dist/src/nile-toast/nile-toast.css.js +3 -1
- package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
- package/dist/src/nile-toolbar/nile-toolbar.css.js +5 -5
- package/dist/src/nile-toolbar/nile-toolbar.css.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-auto-complete/nile-auto-complete.ts +2 -2
- package/src/nile-chip/nile-chip.ts +1 -0
- package/src/nile-drawer/nile-drawer.ts +6 -0
- package/src/nile-icon/icons/svg/every.ts +1 -1
- package/src/nile-icon/icons/svg/logout.ts +1 -1
- package/src/nile-icon/icons/svg/notscheduled.ts +1 -1
- package/src/nile-icon/icons/svg/schedule.ts +1 -1
- package/src/nile-input/nile-input.css.ts +16 -19
- package/src/nile-popover/nile-popover.ts +14 -6
- package/src/nile-select/nile-select.css.ts +1 -1
- package/src/nile-table-header-item/nile-table-header-item.css.ts +6 -0
- package/src/nile-table-header-item/nile-table-header-item.ts +5 -2
- package/src/nile-toast/nile-toast.css.ts +3 -1
- package/src/nile-toolbar/nile-toolbar.css.ts +5 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-toast.css.cjs.js","sources":["../../../src/nile-toast/nile-toast.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 * Toast CSS\n */\nexport const styles = css`\n :host {\n display: contents;\n\n /* For better DX, we'll reset the margin here so the base part can inherit it */\n margin: 0;\n }\n\n .alert {\n position: relative;\n display: flex;\n align-items: flex-start;\n border: solid 2px 2px;\n border-radius: 8px;\n margin: inherit;\n padding: 16px;\n gap: 16px;\n width: max-content;\n min-width: 400px;\n }\n\n .alert:not(.alert--has-icon) .alert__icon,\n .alert:not(.alert--closable) .alert__close-button {\n display: none;\n }\n\n .alert__prefix-icon-container {\n background-color: red;\n border-radius: 4px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 10px;\n }\n\n .alert--success {\n border: 1px solid var(--nile-toast-color-border-success);\n background: var(--nile-toast-color-background-success);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--success .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-success);\n }\n\n .alert--info {\n border: 1px solid var(--nile-toast-color-border-info);\n background: var(--nile-toast-color-background-info);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--info .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-info);\n }\n\n .alert--warning {\n border: 1px solid var(--nile-toast-color-border-warning);\n background: var(--nile-toast-color-background-warning);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--warning .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-warning);\n }\n\n .alert--error {\n border: 1px solid var(--nile-toast-color-border-error);\n background: var(--nile-toast-color-background-error);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--error .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-error);\n }\n\n .alert--gray {\n border: 1px solid var(--nile-toast-color-border-gray);\n background: var(--nile-toast-color-background-gray);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--gray .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-gray);\n }\n\n .alert--black {\n border: 1px solid var(--nile-toast-color-border-black);\n background: var(--nile-toast-color-background-black);\n box-shadow: var(--nile-toast-color-box-black);\n }\n\n .alert--black .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-black);\n }\n\n .alert__message {\n flex: 1 1 auto;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-direction: column;\n align-items: flex-start;\n font-family: var(--nile-font-family-serif);\n font-size: 14px;\n line-height: 20px;\n color: black;\n gap:3px;\n }\n\n .alert__message--title {\n font-weight: 600;\n color:#344054;\n }\n\n .alert__message--content {\n font-weight:400;\n color:#475467;\n }\n\n .alert__message--content-only {\n margin-top: 3px;\n }\n\n .alert__close-button {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .alert__tags {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 4px;\n }\n\n .alert__tag {\n height: 24px;\n display: flex;\n border-radius: 4px;\n border: 1px solid #e5e9eb;\n background: var(--nile-colors-white-base);\n }\n\n .alert__tag-content {\n border-left: 1px solid #e5e9eb;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n\n color: var(--nile-colors-dark-900);\n font-family:
|
1
|
+
{"version":3,"file":"nile-toast.css.cjs.js","sources":["../../../src/nile-toast/nile-toast.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 * Toast CSS\n */\nexport const styles = css`\n :host {\n display: contents;\n\n /* For better DX, we'll reset the margin here so the base part can inherit it */\n margin: 0;\n }\n\n .alert {\n max-width: 100%;\n box-sizing: border-box;\n position: relative;\n display: flex;\n align-items: flex-start;\n border: solid 2px 2px;\n border-radius: 8px;\n margin: inherit;\n padding: 16px;\n gap: 16px;\n width: max-content;\n min-width: 400px;\n }\n\n .alert:not(.alert--has-icon) .alert__icon,\n .alert:not(.alert--closable) .alert__close-button {\n display: none;\n }\n\n .alert__prefix-icon-container {\n background-color: red;\n border-radius: 4px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 10px;\n }\n\n .alert--success {\n border: 1px solid var(--nile-toast-color-border-success);\n background: var(--nile-toast-color-background-success);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--success .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-success);\n }\n\n .alert--info {\n border: 1px solid var(--nile-toast-color-border-info);\n background: var(--nile-toast-color-background-info);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--info .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-info);\n }\n\n .alert--warning {\n border: 1px solid var(--nile-toast-color-border-warning);\n background: var(--nile-toast-color-background-warning);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--warning .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-warning);\n }\n\n .alert--error {\n border: 1px solid var(--nile-toast-color-border-error);\n background: var(--nile-toast-color-background-error);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--error .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-error);\n }\n\n .alert--gray {\n border: 1px solid var(--nile-toast-color-border-gray);\n background: var(--nile-toast-color-background-gray);\n box-shadow: var(--nile-toast-color-box-shadow);\n }\n\n .alert--gray .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-gray);\n }\n\n .alert--black {\n border: 1px solid var(--nile-toast-color-border-black);\n background: var(--nile-toast-color-background-black);\n box-shadow: var(--nile-toast-color-box-black);\n }\n\n .alert--black .alert__prefix-icon-container {\n background: var(--nile-toast-color-icon-background-color-black);\n }\n\n .alert__message {\n flex: 1 1 auto;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-direction: column;\n align-items: flex-start;\n font-family: var(--nile-font-family-serif);\n font-size: 14px;\n line-height: 20px;\n color: black;\n gap:3px;\n }\n\n .alert__message--title {\n font-weight: 600;\n color:#344054;\n }\n\n .alert__message--content {\n font-weight:400;\n color:#475467;\n }\n\n .alert__message--content-only {\n margin-top: 3px;\n }\n\n .alert__close-button {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n\n .alert__tags {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n margin-top: 4px;\n }\n\n .alert__tag {\n height: 24px;\n display: flex;\n border-radius: 4px;\n border: 1px solid #e5e9eb;\n background: var(--nile-colors-white-base);\n }\n\n .alert__tag-content {\n border-left: 1px solid #e5e9eb;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n\n color: var(--nile-colors-dark-900);\n font-family: var(--nile-font-family-serif);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n }\n\n .alert__tag-image {\n height: 24px;\n width: 24px;\n border-radius: 4px 0 0 4px;\n }\n\n .alert__prefix-img {\n height: 24px;\n border-radius: 4px;\n }\n\n .alert--no-content{\n align-items:center ;\n }\n\n [hidden] {\n display: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -7,6 +7,8 @@ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
|
|
7
7
|
}
|
8
8
|
|
9
9
|
.alert {
|
10
|
+
max-width: 100%;
|
11
|
+
box-sizing: border-box;
|
10
12
|
position: relative;
|
11
13
|
display: flex;
|
12
14
|
align-items: flex-start;
|
@@ -157,7 +159,7 @@ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
|
|
157
159
|
padding: 0 6px;
|
158
160
|
|
159
161
|
color: var(--nile-colors-dark-900);
|
160
|
-
font-family:
|
162
|
+
font-family: var(--nile-font-family-serif);
|
161
163
|
font-size: 14px;
|
162
164
|
font-style: normal;
|
163
165
|
font-weight: 400;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,i;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function execute(){_export("s",i=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n width: 100%;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0
|
1
|
+
System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,i;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function execute(){_export("s",i=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: block;\n width: 100%;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 48px;\n box-sizing: border-box;\n min-height: 64px;\n line-height: var(--nile-toolbar-line-height);\n font-weight: var(--nile-toolbar-font-weight);\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-toolbar-font-size);\n background-color: var(--nile-toolbar-background-color, #FFFFFF);\n color: var(--nile-toolbar-text-color, rgba(0, 0, 0, 0.87));\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-toolbar.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-toolbar.css.cjs.js","sources":["../../../src/nile-toolbar/nile-toolbar.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 * Toolbar CSS\n */\nexport const styles = css`\n :host {\n display: block;\n width: 100%;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0
|
1
|
+
{"version":3,"file":"nile-toolbar.css.cjs.js","sources":["../../../src/nile-toolbar/nile-toolbar.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 * Toolbar CSS\n */\nexport const styles = css`\n :host {\n display: block;\n width: 100%;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 48px;\n box-sizing: border-box;\n min-height: 64px;\n line-height: var(--nile-toolbar-line-height);\n font-weight: var(--nile-toolbar-font-weight);\n font-family: var(--nile-font-family-sans-serif);\n font-size: var(--nile-toolbar-font-size);\n background-color: var(--nile-toolbar-background-color, #FFFFFF);\n color: var(--nile-toolbar-text-color, rgba(0, 0, 0, 0.87));\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -8,14 +8,14 @@ import{i as o}from"../index-0a3007c5.esm.js";const e=o`
|
|
8
8
|
display: flex;
|
9
9
|
align-items: center;
|
10
10
|
justify-content: space-between;
|
11
|
-
padding: 0
|
11
|
+
padding: 0 48px;
|
12
12
|
box-sizing: border-box;
|
13
13
|
min-height: 64px;
|
14
|
-
|
15
|
-
|
14
|
+
line-height: var(--nile-toolbar-line-height);
|
15
|
+
font-weight: var(--nile-toolbar-font-weight);
|
16
16
|
font-family: var(--nile-font-family-sans-serif);
|
17
|
-
|
18
|
-
background-color: var(--nile-toolbar-background-color, #
|
17
|
+
font-size: var(--nile-toolbar-font-size);
|
18
|
+
background-color: var(--nile-toolbar-background-color, #FFFFFF);
|
19
19
|
color: var(--nile-toolbar-text-color, rgba(0, 0, 0, 0.87));
|
20
20
|
}
|
21
21
|
`;export{e as s};
|
@@ -62,7 +62,7 @@ let NileAutoComplete = class NileAutoComplete extends NileElement {
|
|
62
62
|
}
|
63
63
|
render() {
|
64
64
|
return html `
|
65
|
-
<nile-dropdown class="nile-dropdown--input"
|
65
|
+
<nile-dropdown class="nile-dropdown--input" ?open=${this.isDropdownOpen} noOpenOnCLick>
|
66
66
|
<nile-input class="nile-auto-complete--input"
|
67
67
|
?no-border=${this.noBorder}
|
68
68
|
.value=${this.value}
|
@@ -74,7 +74,7 @@ let NileAutoComplete = class NileAutoComplete extends NileElement {
|
|
74
74
|
></nile-input>
|
75
75
|
${this.menuItems.length > 0
|
76
76
|
? html `
|
77
|
-
<nile-menu @nile-select=${this.handleSelect}>
|
77
|
+
<nile-menu @nile-select=${this.handleSelect} exportparts="menu__items-wrapper:options__wrapper">
|
78
78
|
${this.menuItems.map((item) => html `
|
79
79
|
<nile-menu-item value=${item}>${item}</nile-menu-item>
|
80
80
|
`)}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-auto-complete.js","sourceRoot":"","sources":["../../../src/nile-auto-complete/nile-auto-complete.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AA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,CAAC,YAAY;kBACvC,IAAI,CAAC,SAAS,CAAC,GAAG,CAClB,CAAC,IAAa,EAAG,EAAE,CAAC,IAAI,CAAA;4CACE,IAAI,IAAI,IAAI;mBACrC,CACF;;aAEJ;YACH,CAAC,CAAC,EAAE;;KAET,CAAC;IACJ,CAAC;;AAxGM,uBAAM,GAAmB,MAAM,CAAC;AAGV;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDAAiC;AAEhC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;qDAA8B;AAE9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAoB;AAEnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAsC;AAEpC;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDAA2B;AAE9C;IAAR,KAAK,EAAE;mDAAqB;AAEF;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sDAAwB;AAE1B;IAAvB,KAAK,CAAC,eAAe,CAAC;yDAAsB;AAS7C;IADC,KAAK,CAAC,cAAc,CAAC;gEAGrB;AAMK;IAHL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAE9C,KAAK,CAAC,gBAAgB,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;yDAOvD;AA1CU,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CA2G5B;SA3GY,gBAAgB;AA6G7B,eAAe,gBAAgB,CAAC","sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-auto-complete.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../watch';\nimport type { CSSResultGroup } from 'lit';\n\n// Define the custom element 'nile-auto-complete'\n@customElement('nile-auto-complete')\nexport class NileAutoComplete extends NileElement {\n\n static styles: CSSResultGroup = styles;\n\n // Define component properties\n @property({ type: Boolean }) isDropdownOpen: boolean = false;\n\n @property({ type: Boolean }) openOnFocus: boolean = false;\n\n @property({ type: String }) value: string = '';\n\n @property({ type: String }) placeholder: string = 'Type here ..';\n\n @property({ type: Boolean }) noBorder: boolean = false;\n\n @state() menuItems: any = [];\n\n @property({ type: Array }) allMenuItems: any = [];\n\n @query('nile-dropdown') dropdownElement: any;\n\n connectedCallback() {\n super.connectedCallback();\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'allMenuItems' property\n @watch('allMenuItems')\n handleAllMenuItemsChange() {\n this.menuItems = [...this.allMenuItems];\n }\n\n // Watch for changes in 'value' and 'isDropdownOpen' properties\n @watch('value', { waitUntilFirstUpdate: true })\n\n @watch('isDropdownOpen', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item.toLowerCase().includes(this.value?.toLowerCase())\n );\n }\n\n private handleSelect(event: CustomEvent) {\n this.value = event.detail.value;\n this.emit('nile-complete', { value: event.detail.value });\n this.isDropdownOpen = false;\n this.dropdownElement?.hide();\n }\n\n private handleSearch(event: CustomEvent) {\n const searchValue = event.detail.value.toLowerCase();\n this.value = searchValue;\n\n // Filter menu items based on the search value\n this.menuItems = this.allMenuItems.filter((item: string) =>\n item?.toLowerCase().includes(searchValue)\n );\n\n this.isDropdownOpen = this.menuItems.length > 0;\n if (this.isDropdownOpen) this.dropdownElement?.show();\n }\n\n public handleFocus() {\n if (!this.openOnFocus) {\n return;\n }\n\n // Delay opening the dropdown to allow focus to take effect\n setTimeout(() => {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }, 300);\n }\n\n private handleClick() {\n this.isDropdownOpen = true;\n this.dropdownElement?.show();\n }\n\n public render(): TemplateResult {\n return html`\n <nile-dropdown class=\"nile-dropdown--input\" ?open=${this.isDropdownOpen} noOpenOnCLick>\n <nile-input class=\"nile-auto-complete--input\"\n ?no-border=${this.noBorder}\n .value=${this.value}\n @nile-input=${this.handleSearch}\n @focus=${this.handleFocus}\n @click=${this.handleClick}\n slot=\"trigger\"\n placeholder=${this.placeholder}\n ></nile-input>\n ${this.menuItems.length > 0\n ? html`\n <nile-menu @nile-select=${this.handleSelect} exportparts=\"menu__items-wrapper:options__wrapper\">\n ${this.menuItems.map(\n (item: unknown) => html`\n <nile-menu-item value=${item}>${item}</nile-menu-item>\n `\n )}\n </nile-menu>\n `\n : ''}\n </nile-dropdown>\n `;\n }\n}\n\nexport default NileAutoComplete;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-auto-complete': NileAutoComplete;\n }\n}\n"]}
|
@@ -187,6 +187,7 @@ let NileChip = class NileChip extends NileElement {
|
|
187
187
|
?isDropdownOpen=${this.isDropdownOpen}
|
188
188
|
.noBorder=${true}
|
189
189
|
openOnFocus
|
190
|
+
exportparts="options__wrapper"
|
190
191
|
.placeholder=${this.placeholder}
|
191
192
|
@nile-input=${this.handleInputChange}
|
192
193
|
@keydown=${this.handleInputKeydown}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-chip.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,O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CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAA6B;AAEF;IAApD,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAe;AAEV;IAAxD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAmB;AAI3E;IADC,KAAK,CAAC,qBAAqB,CAAC;4DAU5B;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;8CAId;AAGD;IADC,KAAK,CAAC,MAAM,CAAC;6CAQb;AA3FU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA8QpB;SA9QY,QAAQ;AAgRrB,eAAe,QAAQ,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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if (\n (event.key === 'Enter' || event.key === 'Tab' ) &&\n this.inputValue &&\n (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if((event.key === 'Enter'|| event.key === 'Tab' ) &&\n this.inputValue &&\n (this.noDuplicates || this.tags.includes(this.inputValue))){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"nile-chip.js","sourceRoot":"","sources":["../../../src/nile-chip/nile-chip.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,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IAAI,EAAE,KAAK,EAAE,CAAC;6DAAyC;AAExC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;uCAAmB;AAEhB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCAAyB;AAE1B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAA6B;AAEF;IAApD,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAe;AAEV;IAAxD,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAmB;AAI3E;IADC,KAAK,CAAC,qBAAqB,CAAC;4DAU5B;AAGD;IADC,KAAK,CAAC,OAAO,CAAC;8CAId;AAGD;IADC,KAAK,CAAC,MAAM,CAAC;6CAQb;AA3FU,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA+QpB;SA/QY,QAAQ;AAiRrB,eAAe,QAAQ,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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if (\n (event.key === 'Enter' || event.key === 'Tab' ) &&\n this.inputValue &&\n (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if((event.key === 'Enter'|| event.key === 'Tab' ) &&\n this.inputValue &&\n (this.noDuplicates || this.tags.includes(this.inputValue))){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"]}
|
@@ -86,6 +86,10 @@ export declare class NileDrawer extends NileElement {
|
|
86
86
|
* its parent element, set this attribute and add `position: relative` to the parent.
|
87
87
|
*/
|
88
88
|
contained: boolean;
|
89
|
+
/**
|
90
|
+
* Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property
|
91
|
+
*/
|
92
|
+
preventOverlayClose: boolean;
|
89
93
|
/**
|
90
94
|
* Removes the header. This will also remove the default close button, so please ensure you provide an easy,
|
91
95
|
* accessible way for users to dismiss the drawer.
|
@@ -95,6 +95,10 @@ let NileDrawer = class NileDrawer extends NileElement {
|
|
95
95
|
* its parent element, set this attribute and add `position: relative` to the parent.
|
96
96
|
*/
|
97
97
|
this.contained = false;
|
98
|
+
/**
|
99
|
+
* Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property
|
100
|
+
*/
|
101
|
+
this.preventOverlayClose = false;
|
98
102
|
/**
|
99
103
|
* Removes the header. This will also remove the default close button, so please ensure you provide an easy,
|
100
104
|
* accessible way for users to dismiss the drawer.
|
@@ -121,6 +125,8 @@ let NileDrawer = class NileDrawer extends NileElement {
|
|
121
125
|
unlockBodyScrolling(this);
|
122
126
|
}
|
123
127
|
requestClose(source) {
|
128
|
+
if ((source == 'overlay' || source == 'keyboard') && this.preventOverlayClose)
|
129
|
+
return;
|
124
130
|
const slRequestClose = this.emit('nile-request-close', {
|
125
131
|
cancelable: true,
|
126
132
|
detail: { source }
|
@@ -348,6 +354,9 @@ __decorate([
|
|
348
354
|
__decorate([
|
349
355
|
property({ type: Boolean, reflect: true })
|
350
356
|
], NileDrawer.prototype, "contained", void 0);
|
357
|
+
__decorate([
|
358
|
+
property({ type: Boolean, reflect: true })
|
359
|
+
], NileDrawer.prototype, "preventOverlayClose", void 0);
|
351
360
|
__decorate([
|
352
361
|
property({ attribute: 'no-header', type: Boolean, reflect: true })
|
353
362
|
], NileDrawer.prototype, "noHeader", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-dr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AC;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"]}
|
1
|
+
{"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-dr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EAAE,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 * Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n */\n @property({ type: Boolean, reflect:true }) preventOverlayClose = 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 if((source=='overlay' || source=='keyboard') && this.preventOverlayClose) return;\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"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
|
-
declare const _default: "
|
4
|
+
declare const _default: "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMTExMDEgMi4xNzk3MUM1LjI2MjE1IDEuNDEwNTQgNi42MTU1MyAxIDggMUM5Ljg1NTc2IDEuMDAyNDcgMTEuNjM0OCAxLjc0MDc2IDEyLjk0NyAzLjA1Mjk4QzE0LjI1OTIgNC4zNjUyIDE0Ljk5NzUgNi4xNDQyNCAxNSA4QzE1IDkuMzg0NDcgMTQuNTg5NSAxMC43Mzc4IDEzLjgyMDMgMTEuODg5QzEzLjA1MTEgMTMuMDQwMSAxMS45NTc5IDEzLjkzNzMgMTAuNjc4OCAxNC40NjcyQzkuMzk5NyAxNC45OTcgNy45OTIyNCAxNS4xMzU2IDYuNjM0MzcgMTQuODY1NUM1LjI3NjUgMTQuNTk1NCA0LjAyOTIyIDEzLjkyODcgMy4wNTAyNiAxMi45NDk3QzIuMDcxMjkgMTEuOTcwOCAxLjQwNDYgMTAuNzIzNSAxLjEzNDUxIDkuMzY1NjNDMC44NjQ0MSA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5MzI3IDEuODE1ODIgNi44MTY0NSAyLjA0OTlDNS42Mzk2NCAyLjI4Mzk5IDQuNTU4NjYgMi44NjE3OCAzLjcxMDIyIDMuNzEwMjJDMi44NjE3OCA0LjU1ODY2IDIuMjgzOTkgNS42Mzk2MyAyLjA0OTkxIDYuODE2NDVDMS44MTU4MiA3Ljk5MzI3IDEuOTM1OTYgOS4yMTMwNyAyLjM5NTEzIDEwLjMyMTZDMi44NTQzMSAxMS40MzAxIDMuNjMxODggMTIuMzc3NiA0LjYyOTU0IDEzLjA0NDJaTTcgNC41SDhWOC4yOUwxMC44NSAxMS4xNUwxMC4xNSAxMS44NUw3IDguNzFWNC41WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=";
|
5
5
|
//# sourceMappingURL=every.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/every.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,
|
1
|
+
{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/every.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,kgDAAkgD,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQuMTExMDEgMi4xNzk3MUM1LjI2MjE1IDEuNDEwNTQgNi42MTU1MyAxIDggMUM5Ljg1NTc2IDEuMDAyNDcgMTEuNjM0OCAxLjc0MDc2IDEyLjk0NyAzLjA1Mjk4QzE0LjI1OTIgNC4zNjUyIDE0Ljk5NzUgNi4xNDQyNCAxNSA4QzE1IDkuMzg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DEzLjA0NDJaTTcgNC41SDhWOC4yOUwxMC44NSAxMS4xNUwxMC4xNSAxMS44NUw3IDguNzFWNC41WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=\";"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
|
-
declare const _default: "
|
4
|
+
declare const _default: "PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc4Ml8xMDUyKSI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik0xMC41IDEySDE4TTE4IDEyTDE0IDhNMTggMTJMMTQgMTZNMTEgNy41SDcuNVYxNi41SDExTTIyLjUgMTJDMjIuNSAxNy43OTkgMTcuNzk5IDIyLjUgMTIgMjIuNUM2LjIwMTAxIDIyLjUgMS41IDE3Ljc5OSAxLjUgMTJDMS41IDYuMjAxMDEgNi4yMDEwMSAxLjUgMTIgMS41QzE3Ljc5OSAxLjUgMjIuNSA2LjIwMTAxIDIyLjUgMTJaIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzM3ODJfMTA1MiI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==";
|
5
5
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
|
-
export default "
|
4
|
+
export default "PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMzc4Ml8xMDUyKSI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPjxwYXRoIGQ9Ik0xMC41IDEySDE4TTE4IDEyTDE0IDhNMTggMTJMMTQgMTZNMTEgNy41SDcuNVYxNi41SDExTTIyLjUgMTJDMjIuNSAxNy43OTkgMTcuNzk5IDIyLjUgMTIgMjIuNUM2LjIwMTAxIDIyLjUgMS41IDE3Ljc5OSAxLjUgMTJDMS41IDYuMjAxMDEgNi4yMDEwMSAxLjUgMTIgMS41QzE3Ljc5OSAxLjUgMjIuNSA2LjIwMTAxIDIyLjUgMTJaIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuNSIvPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImNsaXAwXzM3ODJfMTA1MiI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==";
|
5
5
|
//# sourceMappingURL=logout.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/logout.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/logout.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,srBAAsrB,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA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TQgOS41OTEzIDEzLjM2NzkgMTEuMTE3NCAxMi4yNDI2IDEyLjI0MjZDMTEuMTE3NCAxMy4zNjc5IDkuNTkxMyAxNCA4IDE0Wk04IDcuMjlMMTAuNDcgNC44MkwxMS4xOCA1LjUzTDguNzEgOEwxMS4xOCAxMC40N0wxMC40NyAxMS4xOEw4IDguNzFMNS41MyAxMS4xOEw0LjgyIDEwLjQ3TDcuMjkgOEw0LjgyIDUuNTNMNS41MyA0LjgyTDggNy4yOVoiIGZpbGw9ImJsYWNrIi8+PC9zdmc+";
|
5
5
|
//# sourceMappingURL=notscheduled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"notscheduled.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/notscheduled.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,
|
1
|
+
{"version":3,"file":"notscheduled.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/notscheduled.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,0xBAA0xB,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTggMUM0LjEzNDAxIDEgMSA0LjEzNDAxIDEgOEMxIDExLjg2NiA0LjEzNDAxIDE1IDggMTVDMTEuODY2IDE1IDE1IDExLjg2NiAxNSA4QzE1IDYuMTQzNDggMTQuMjYyNSA0LjM2MzAxIDEyLjk0OTcgMy4wNTAyNUMxMS42MzcgMS43Mzc1IDkuODU2NTIgMSA4IDFaTTggMTRDNC42ODYyOSAxNCAyIDExLjMxMzcgMiA4QzIgNC42ODYyOSA0LjY4NjI5IDI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NSA1LjhWOS4xTDkuNzk5OTUgMTEuNkwxMC42IDExTDguNDk5OTUgOC43VjUuOEg3LjQ5OTk1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=";
|
5
5
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
|
-
export default "
|
4
|
+
export default "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjEgMC41SDQuODk5OTVWMS41SDExLjFWMC41Wk0xLjE5OTk1IDguOUMxLjE5OTk1IDUuMSA0LjI5OTk1IDIuMSA3Ljk5OTk1IDIuMUMxMS44IDIuMSAxNC44IDUuMSAxNC44IDguOUMxNC44IDEyLjcgMTEuOCAxNS43IDcuOTk5OTUgMTUuN0M0LjE5OTk1IDE1LjcgMS4xOTk5NSAxMi42IDEuMTk5OTUgOC45Wk0yLjE5OTk1IDguOEMyLjE5OTk1IDEyIDQuNzk5OTUgMTQuNiA3Ljk5OTk1IDE0LjZDMTEuMiAxNC42IDEzLjggMTIuMSAxMy44IDguOEMxMy44IDUuNiAxMS4yIDMgNy45OTk5NSAzQzQuNzk5OTUgMyAyLjE5OTk1IDUuNiAyLjE5OTk1IDguOFpNNy40OTk5NSA1LjhWOS4xTDkuNzk5OTUgMTEuNkwxMC42IDExTDguNDk5OTUgOC43VjUuOEg3LjQ5OTk1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=";
|
5
5
|
//# sourceMappingURL=schedule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/schedule.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../../../src/nile-icon/icons/svg/schedule.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAe,0tBAA0tB,CAAC","sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTExLjEgMC41SDQuODk5OTVWMS41SDExLjFWMC41Wk0xLjE5OTk1IDguOUMxLjE5OTk1IDUuMSA0LjI5OTk1IDIuMSA3Ljk5OTk1IDIuMUMxMS44IDIuMSAxNC44IDUuMSAxNC44IDguOUMxNC44IDEyLjcgMTEuOCAxNS43IDcuOTk5OTUgMTUuN0M0LjE5OTk1IDE1LjcgMS4xOTk5NSAxMi42IDEuMTk5OTUgOC45Wk0yLjE5OTk1IDguOEMyLjE5OTk1IDEyIDQuNzk5OTUgMTQuNiA3Ljk5OTk1IDE0LjZDMTEuMiAxNC42IDEzLjggMTIuMSAxMy44IDguOEMxMy44IDUuNiAxMS4yIDMgNy45OTk5NSAzQzQuNzk5OTUgMyAyLjE5OTk1IDUuNiAyLjE5OTk1IDguOFpNNy40OTk5NSA1LjhWOS4xTDkuNzk5OTUgMTEuNkwxMC42IDExTDguNDk5OTUgOC43VjUuOEg3LjQ5OTk1WiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=\";"]}
|