@aquera/nile-elements 1.6.8 → 1.6.9
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 +8 -0
- package/dist/index.js +7 -10
- 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 +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +0 -3
- package/dist/nile-calendar/nile-calendar.esm.js +2 -2
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +13 -13
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +0 -3
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +2 -2
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.d.ts +2 -0
- package/dist/src/nile-dropdown/nile-dropdown.js +21 -5
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.js +1 -1
- package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +1 -1
- package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +0 -3
- package/src/nile-calendar/nile-calendar.ts +2 -2
- package/src/nile-dropdown/nile-dropdown.ts +23 -5
- package/src/nile-stepper-item/nile-stepper-item.ts +1 -1
- package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +1 -1
- package/vscode-html-custom-data.json +1 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "nile-elements",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.9",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "dist/src/index.js",
|
|
@@ -229,4 +229,4 @@
|
|
|
229
229
|
"prettier --write"
|
|
230
230
|
]
|
|
231
231
|
}
|
|
232
|
-
}
|
|
232
|
+
}
|
|
@@ -33,7 +33,7 @@ export class NileAutoComplete extends NileElement {
|
|
|
33
33
|
|
|
34
34
|
// Define component properties
|
|
35
35
|
|
|
36
|
-
@property({ type: Boolean }) disabled: boolean = false;
|
|
36
|
+
@property({ type: Boolean, reflect: true }) disabled: boolean = false;
|
|
37
37
|
|
|
38
38
|
@property({ type: Boolean }) isDropdownOpen: boolean = false;
|
|
39
39
|
|
|
@@ -640,9 +640,6 @@ export const styles = css`
|
|
|
640
640
|
}
|
|
641
641
|
:host([disabled]) .duration__value {
|
|
642
642
|
cursor: not-allowed;
|
|
643
|
-
background: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
644
|
-
color: var(--nile-colors-dark-500, var(--ng-colors-fg-disabled));
|
|
645
|
-
border-color: var(--nile-colors-neutral-400, var(--ng-colors-border-disabled));
|
|
646
643
|
}
|
|
647
644
|
`;
|
|
648
645
|
|
|
@@ -295,7 +295,7 @@ private handleEndDateInput(event: CustomEvent): void {
|
|
|
295
295
|
class="clear-button"
|
|
296
296
|
variant="secondary"
|
|
297
297
|
role="button"
|
|
298
|
-
?disabled="${ !this.startDate || !this.endDate }"
|
|
298
|
+
?disabled="${ !this.startDate || !this.endDate || this.disabled }"
|
|
299
299
|
@keydown="${(e: KeyboardEvent) => {if (e.key === 'Enter' || e.key === ' ') this.clearDate();}}"
|
|
300
300
|
@click="${this.clearDate}"
|
|
301
301
|
|
|
@@ -303,7 +303,7 @@ private handleEndDateInput(event: CustomEvent): void {
|
|
|
303
303
|
}
|
|
304
304
|
<nile-button
|
|
305
305
|
class="apply-button"
|
|
306
|
-
?disabled="${ !this.startDate || !this.endDate }"
|
|
306
|
+
?disabled="${ !this.startDate || !this.endDate || this.disabled }"
|
|
307
307
|
@click="${this.confimRange}"
|
|
308
308
|
@keydown="${(e: KeyboardEvent) => {if (e.key === 'Enter' || e.key === ' ') this.confimRange();}}"
|
|
309
309
|
> Apply</nile-button>
|
|
@@ -289,6 +289,9 @@ export class NileDropdown extends NileElement {
|
|
|
289
289
|
if(this.noOpenOnClick){
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
|
+
if (this.disabled || this.isTriggerDisabled()) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
292
295
|
if (this.open) {
|
|
293
296
|
this.hide();
|
|
294
297
|
} else {
|
|
@@ -353,6 +356,11 @@ export class NileDropdown extends NileElement {
|
|
|
353
356
|
this.updateAccessibleTrigger();
|
|
354
357
|
}
|
|
355
358
|
|
|
359
|
+
private isTriggerDisabled(): boolean {
|
|
360
|
+
const trigger = this.querySelector('[slot="trigger"]') as any;
|
|
361
|
+
return trigger?.hasAttribute?.('disabled');
|
|
362
|
+
}
|
|
363
|
+
|
|
356
364
|
//
|
|
357
365
|
// Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and
|
|
358
366
|
// `aria-expanded`. These must be applied to the "accessible trigger" (the tabbable portion of the trigger element
|
|
@@ -387,7 +395,7 @@ export class NileDropdown extends NileElement {
|
|
|
387
395
|
|
|
388
396
|
/** Shows the dropdown panel. */
|
|
389
397
|
async show() {
|
|
390
|
-
if (this.open) {
|
|
398
|
+
if (this.open || this.disabled || this.isTriggerDisabled()) {
|
|
391
399
|
return undefined;
|
|
392
400
|
}
|
|
393
401
|
|
|
@@ -429,6 +437,8 @@ export class NileDropdown extends NileElement {
|
|
|
429
437
|
document.removeEventListener('mousedown', this.handleDocumentMouseDown);
|
|
430
438
|
}
|
|
431
439
|
|
|
440
|
+
private _triggerDisabledByDropdown = false;
|
|
441
|
+
|
|
432
442
|
protected updated(changedProperties: PropertyValues): void {
|
|
433
443
|
super.updated(changedProperties);
|
|
434
444
|
|
|
@@ -444,6 +454,10 @@ export class NileDropdown extends NileElement {
|
|
|
444
454
|
}
|
|
445
455
|
}
|
|
446
456
|
if (changedProperties.has('disabled')) {
|
|
457
|
+
if (this.disabled && this.open) {
|
|
458
|
+
void this.hide();
|
|
459
|
+
}
|
|
460
|
+
|
|
447
461
|
this.updateTriggerDisabledState();
|
|
448
462
|
}
|
|
449
463
|
}
|
|
@@ -451,17 +465,21 @@ export class NileDropdown extends NileElement {
|
|
|
451
465
|
private updateTriggerDisabledState() {
|
|
452
466
|
const trigger = this.querySelector('[slot="trigger"]') as any;
|
|
453
467
|
if (!trigger) return;
|
|
454
|
-
|
|
455
|
-
|
|
468
|
+
if (this.disabled){
|
|
469
|
+
if (!trigger.disabled) {
|
|
470
|
+
this._triggerDisabledByDropdown = true;
|
|
471
|
+
}
|
|
456
472
|
trigger.disabled = true;
|
|
457
|
-
|
|
473
|
+
} else if (this._triggerDisabledByDropdown) {
|
|
474
|
+
trigger.disabled = false;
|
|
475
|
+
this._triggerDisabledByDropdown = false;
|
|
458
476
|
}
|
|
459
477
|
}
|
|
460
478
|
|
|
461
479
|
@watch('open', { waitUntilFirstUpdate: true })
|
|
462
480
|
async handleOpenChange() {
|
|
463
481
|
this.visibilityManager?.setup();
|
|
464
|
-
if (this.disabled) {
|
|
482
|
+
if ( this.open && (this.disabled || this.isTriggerDisabled()) ) {
|
|
465
483
|
this.open = false;
|
|
466
484
|
return;
|
|
467
485
|
}
|
|
@@ -148,7 +148,7 @@ export class NileStepperItem extends NileElement {
|
|
|
148
148
|
getSvg():TemplateResult{
|
|
149
149
|
let iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;
|
|
150
150
|
return html`
|
|
151
|
-
<svg width="${iconSize}" height="${iconSize}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
151
|
+
<svg part="bulletin-svg" width="${iconSize}" height="${iconSize}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
152
152
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
|
|
153
153
|
</svg>
|
|
154
154
|
`
|
|
@@ -110,7 +110,7 @@ export class NileVerticalStepperItem extends NileElement {
|
|
|
110
110
|
getSvg():TemplateResult{
|
|
111
111
|
let iconSize = this.size == 'sm' ? 20 : this.size == 'lg' ? 24 : 28;
|
|
112
112
|
return html`
|
|
113
|
-
<svg width="${iconSize}" height="${iconSize}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
113
|
+
<svg part="bulletin-svg" width="${iconSize}" height="${iconSize}" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
114
114
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.7953 9.85334L13.2487 19.0667L10.7153 16.36C10.2487 15.92 9.51534 15.8933 8.982 16.2667C8.462 16.6533 8.31534 17.3333 8.63534 17.88L11.6353 22.76C11.9287 23.2133 12.4353 23.4933 13.0087 23.4933C13.5553 23.4933 14.0753 23.2133 14.3687 22.76C14.8487 22.1333 24.0087 11.2133 24.0087 11.2133C25.2087 9.98668 23.7553 8.90668 22.7953 9.84001V9.85334Z" fill="white"/>
|
|
115
115
|
</svg>
|
|
116
116
|
`
|
|
@@ -1557,7 +1557,7 @@
|
|
|
1557
1557
|
},
|
|
1558
1558
|
{
|
|
1559
1559
|
"name": "nile-dropdown",
|
|
1560
|
-
"description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the dropdown opens.\n\n * `nile-after-show` {} - Emitted after the dropdown opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the dropdown closes.\n\n * `nile-after-hide` {} - Emitted after the dropdown closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The dropdown's main content.\n\n * `trigger` {} - The dropdown's trigger, usually a `<nile-button>` element.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the dropdown so the panel will not open.\n\n * `stay-open-on-select` {`boolean`} - By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\ndropdowns that allow for multiple interactions.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its trigger.\n\n * `noOpenOnClick` {`boolean`} - \n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its trigger.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `hoist` {`boolean`} - Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\nProperties:\n\n * `styles` - \n\n * `popup` - \n\n * `trigger` {`HTMLSlotElement`} - \n\n * `panel` {`HTMLSlotElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the dropdown so the panel will not open.\n\n * `stayOpenOnSelect` {`boolean`} - By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\ndropdowns that allow for multiple interactions.\n\n * `containingElement` {`HTMLElement | undefined`} - The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\ncomponents that use a dropdown internally.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its trigger.\n\n * `noOpenOnClick` {`boolean`} - \n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its trigger.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `hoist` {`boolean`} - Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `portalManager` - \n\n * `visibilityManager` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
1560
|
+
"description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the dropdown opens.\n\n * `nile-after-show` {} - Emitted after the dropdown opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the dropdown closes.\n\n * `nile-after-hide` {} - Emitted after the dropdown closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The dropdown's main content.\n\n * `trigger` {} - The dropdown's trigger, usually a `<nile-button>` element.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the dropdown so the panel will not open.\n\n * `stay-open-on-select` {`boolean`} - By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\ndropdowns that allow for multiple interactions.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its trigger.\n\n * `noOpenOnClick` {`boolean`} - \n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its trigger.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `hoist` {`boolean`} - Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\nProperties:\n\n * `styles` - \n\n * `popup` - \n\n * `trigger` {`HTMLSlotElement`} - \n\n * `panel` {`HTMLSlotElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n\n * `placement` {`TooltipPosition`} - The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\ninside of the viewport.\n\n * `disabled` {`boolean`} - Disables the dropdown so the panel will not open.\n\n * `stayOpenOnSelect` {`boolean`} - By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\ndropdowns that allow for multiple interactions.\n\n * `containingElement` {`HTMLElement | undefined`} - The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\ncomponents that use a dropdown internally.\n\n * `distance` {`number`} - The distance in pixels from which to offset the panel away from its trigger.\n\n * `noOpenOnClick` {`boolean`} - \n\n * `skidding` {`number`} - The distance in pixels from which to offset the panel along its trigger.\n\n * `sync` {`\"width\" | \"height\" | \"both\"`} - Syncs the popup's width or height to that of the anchor element.\n\n * `hoist` {`boolean`} - Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n\n * `portal` {`boolean`} - Enable portal mode to render the dropdown panel in a portal outside the component's DOM tree.\nThis provides better positioning control and prevents clipping issues in complex layouts.\n\n * `enableVisibilityEffect` {`boolean`} - \n\n * `enableTabClose` {`boolean`} - \n\n * `portalManager` - \n\n * `visibilityManager` - \n\n * `_triggerDisabledByDropdown` {`boolean`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
|
|
1561
1561
|
"attributes": [
|
|
1562
1562
|
{
|
|
1563
1563
|
"name": "open",
|