@aquera/nile-elements 0.1.10 → 0.1.12
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 +7 -0
- 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-tour/nile-tour.css.cjs.js +1 -1
- package/dist/nile-tour/nile-tour.css.cjs.js.map +1 -1
- package/dist/nile-tour/nile-tour.css.esm.js +12 -11
- package/dist/src/nile-drawer/nile-drawer.d.ts +1 -0
- package/dist/src/nile-drawer/nile-drawer.js +8 -2
- package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
- package/dist/src/nile-tour/nile-tour.css.js +12 -11
- package/dist/src/nile-tour/nile-tour.css.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-drawer/nile-drawer.ts +4 -2
- package/src/nile-tour/nile-tour.css.ts +12 -11
- package/vscode-html-custom-data.json +6 -1
package/package.json
CHANGED
@@ -95,6 +95,8 @@ export class NileDrawer extends NileElement {
|
|
95
95
|
*/
|
96
96
|
@property({ type: Boolean, reflect: true }) open = false;
|
97
97
|
|
98
|
+
@property({ type: Boolean, reflect: true }) closeOnEscape = true;
|
99
|
+
|
98
100
|
/**
|
99
101
|
* The drawer's label as displayed in the header. You should always include a relevant label even when using
|
100
102
|
* `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
|
@@ -162,11 +164,11 @@ export class NileDrawer extends NileElement {
|
|
162
164
|
}
|
163
165
|
|
164
166
|
private addOpenListeners() {
|
165
|
-
document.addEventListener('keydown', this.handleDocumentKeyDown);
|
167
|
+
if(this.closeOnEscape) document.addEventListener('keydown', this.handleDocumentKeyDown);
|
166
168
|
}
|
167
169
|
|
168
170
|
private removeOpenListeners() {
|
169
|
-
document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
171
|
+
if(this.closeOnEscape) document.removeEventListener('keydown', this.handleDocumentKeyDown);
|
170
172
|
}
|
171
173
|
|
172
174
|
private handleDocumentKeyDown(event: KeyboardEvent) {
|
@@ -15,20 +15,20 @@ export const styles = css`
|
|
15
15
|
}
|
16
16
|
|
17
17
|
.introjs-tooltip {
|
18
|
-
background-color: var(--nile-tour-background-color, #
|
18
|
+
background-color: var(--nile-tour-background-color, #1978B8);
|
19
19
|
color: var(--nile-tour-text-color, #fff);
|
20
20
|
width: 300px;
|
21
21
|
max-width: 300px;
|
22
22
|
border-radius: 4px;
|
23
|
-
border: 1px solid var(--Neutral-30, #
|
24
|
-
background: var(--White-Normal, #
|
23
|
+
border: 1px solid var(--Neutral-30, #1978B8);
|
24
|
+
background: var(--White-Normal, #1978B8);
|
25
25
|
|
26
26
|
/* Elevation/Lifted */
|
27
27
|
box-shadow: 0px 4px 8px 0px rgba(119, 125, 130, 0.15);
|
28
28
|
}
|
29
29
|
|
30
30
|
.introjs-tooltip-title {
|
31
|
-
color: #
|
31
|
+
color: #ffffff;
|
32
32
|
font-size: 16px;
|
33
33
|
font-style: normal;
|
34
34
|
font-weight: 500;
|
@@ -43,7 +43,7 @@ export const styles = css`
|
|
43
43
|
}
|
44
44
|
|
45
45
|
.introjs-tooltiptext {
|
46
|
-
color: #
|
46
|
+
color: #ffffff;
|
47
47
|
font-size: 14px;
|
48
48
|
font-style: normal;
|
49
49
|
font-weight: 400;
|
@@ -55,7 +55,7 @@ export const styles = css`
|
|
55
55
|
.introjs-arrow {
|
56
56
|
width: 15px;
|
57
57
|
height: 20px;
|
58
|
-
background-image: url('data:image/svg+xml,%3Csvg
|
58
|
+
background-image: url('data:image/svg+xml,%3Csvg width="15" height="20" viewBox="0 0 15 20" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M1.13333 11.6C0.0666661 10.8 0.0666662 9.2 1.13333 8.4L11.8 0.400001C13.1185 -0.588854 15 0.351909 15 2L15 18C15 19.6481 13.1185 20.5889 11.8 19.6L1.13333 11.6Z" fill="%231978B8"/%3E%3C/svg%3E');
|
59
59
|
background-repeat: no-repeat;
|
60
60
|
background-size: contain;
|
61
61
|
background-position: center;
|
@@ -118,13 +118,14 @@ export const styles = css`
|
|
118
118
|
padding: 0;
|
119
119
|
cursor: pointer;
|
120
120
|
text-shadow: none;
|
121
|
-
background: var(--Primary-Normal, #
|
121
|
+
background: var(--Primary-Normal, #1978B8);
|
122
122
|
border-color: transparent;
|
123
123
|
display: flex;
|
124
124
|
padding: 12px;
|
125
125
|
align-items: center;
|
126
126
|
gap: 12px;
|
127
127
|
border-radius: 4px;
|
128
|
+
font-weight: 500;
|
128
129
|
}
|
129
130
|
|
130
131
|
.introjs-button:hover {
|
@@ -135,7 +136,7 @@ export const styles = css`
|
|
135
136
|
padding: 0;
|
136
137
|
cursor: pointer;
|
137
138
|
text-shadow: none;
|
138
|
-
background: var(--Primary-Normal, #
|
139
|
+
background: var(--Primary-Normal, #1978B8);
|
139
140
|
border-color: transparent;
|
140
141
|
display: flex;
|
141
142
|
padding: 12px;
|
@@ -152,7 +153,7 @@ export const styles = css`
|
|
152
153
|
cursor: pointer;
|
153
154
|
text-shadow: none;
|
154
155
|
box-shadow: none;
|
155
|
-
background: var(--Primary-Normal, #
|
156
|
+
background: var(--Primary-Normal, #1978B8);
|
156
157
|
border-color: transparent;
|
157
158
|
display: flex;
|
158
159
|
padding: 12px;
|
@@ -199,9 +200,9 @@ export const styles = css`
|
|
199
200
|
padding: 0 10px;
|
200
201
|
display: flex;
|
201
202
|
align-items: center;
|
202
|
-
color: var(--Color-Text-
|
203
|
+
color: var(--Color-Text-Inverted-Secondary, rgba(255, 255, 255, 0.50));
|
203
204
|
font-style: normal;
|
204
|
-
font-weight:
|
205
|
+
font-weight: 500;
|
205
206
|
line-height: 14px;
|
206
207
|
letter-spacing: 0.2px;
|
207
208
|
}
|
@@ -1067,13 +1067,18 @@
|
|
1067
1067
|
},
|
1068
1068
|
{
|
1069
1069
|
"name": "nile-drawer",
|
1070
|
-
"description": "Nile drawer component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the drawer opens.\n\n * `nile-after-show` {} - Emitted after the drawer opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the drawer closes.\n\n * `nile-after-hide` {} - Emitted after the drawer closes and all animations are complete.\n\n * `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\n * `nile-request-close` {`\"{ source: 'close-button' \" | \"keyboard\" | \" 'overlay' }\"`} - Emitted when the user attempts to\nclose 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\ndestructive behavior such as data loss.\n\nSlots:\n\n * ` ` {} - The drawer's main content.\n\n * `label` {} - The drawer's label. Alternatively, you can use the `label` attribute.\n\n * `header-actions` {} - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n\n * `footer` {} - The drawer's footer, usually one or more buttons representing various options.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n\n * `label` {`string`} - 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 * `placement` {`\"top\" | \"end\" | \"bottom\" | \"start\"`} - The direction from which the drawer will open.\n\n * `contained` {`boolean`} - By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\nits parent element, set this attribute and add `position: relative` to the parent.\n\n * `preventOverlayClose` {`boolean`} - Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n\n * `no-header` {`boolean`} - Removes the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the drawer.\n\nProperties:\n\n * `styles` - \n\n * `hasSlotController` - \n\n * `modal` - \n\n * `originalTrigger` {`HTMLElement | null`} - \n\n * `drawer` {`HTMLElement`} - \n\n * `panel` {`HTMLElement`} - \n\n * `overlay` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n\n * `label` {`string`} - 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 * `placement` {`\"top\" | \"end\" | \"bottom\" | \"start\"`} - The direction from which the drawer will open.\n\n * `contained` {`boolean`} - By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\nits parent element, set this attribute and add `position: relative` to the parent.\n\n * `preventOverlayClose` {`boolean`} - Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n\n * `noHeader` {`boolean`} - Removes the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the drawer.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
1070
|
+
"description": "Nile drawer component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the drawer opens.\n\n * `nile-after-show` {} - Emitted after the drawer opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the drawer closes.\n\n * `nile-after-hide` {} - Emitted after the drawer closes and all animations are complete.\n\n * `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\n * `nile-request-close` {`\"{ source: 'close-button' \" | \"keyboard\" | \" 'overlay' }\"`} - Emitted when the user attempts to\nclose 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\ndestructive behavior such as data loss.\n\nSlots:\n\n * ` ` {} - The drawer's main content.\n\n * `label` {} - The drawer's label. Alternatively, you can use the `label` attribute.\n\n * `header-actions` {} - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n\n * `footer` {} - The drawer's footer, usually one or more buttons representing various options.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n\n * `closeOnEscape` {`boolean`} - \n\n * `label` {`string`} - 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 * `placement` {`\"top\" | \"end\" | \"bottom\" | \"start\"`} - The direction from which the drawer will open.\n\n * `contained` {`boolean`} - By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\nits parent element, set this attribute and add `position: relative` to the parent.\n\n * `preventOverlayClose` {`boolean`} - Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n\n * `no-header` {`boolean`} - Removes the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the drawer.\n\nProperties:\n\n * `styles` - \n\n * `hasSlotController` - \n\n * `modal` - \n\n * `originalTrigger` {`HTMLElement | null`} - \n\n * `drawer` {`HTMLElement`} - \n\n * `panel` {`HTMLElement`} - \n\n * `overlay` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n\n * `closeOnEscape` {`boolean`} - \n\n * `label` {`string`} - 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 * `placement` {`\"top\" | \"end\" | \"bottom\" | \"start\"`} - The direction from which the drawer will open.\n\n * `contained` {`boolean`} - By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\nits parent element, set this attribute and add `position: relative` to the parent.\n\n * `preventOverlayClose` {`boolean`} - Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n\n * `noHeader` {`boolean`} - Removes the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the drawer.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
1071
1071
|
"attributes": [
|
1072
1072
|
{
|
1073
1073
|
"name": "open",
|
1074
1074
|
"description": "`open` {`boolean`} - Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n\nProperty: open\n\nDefault: false",
|
1075
1075
|
"valueSet": "v"
|
1076
1076
|
},
|
1077
|
+
{
|
1078
|
+
"name": "closeOnEscape",
|
1079
|
+
"description": "`closeOnEscape` {`boolean`} - \n\nProperty: closeOnEscape\n\nDefault: true",
|
1080
|
+
"valueSet": "v"
|
1081
|
+
},
|
1077
1082
|
{
|
1078
1083
|
"name": "label",
|
1079
1084
|
"description": "`label` {`string`} - 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\nProperty: label\n\nDefault: "
|