@aquera/nile-elements 1.7.8 → 1.7.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.
Files changed (34) hide show
  1. package/README.md +3 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +466 -319
  5. package/dist/nile-status-light/index.cjs.js +2 -0
  6. package/dist/nile-status-light/index.cjs.js.map +1 -0
  7. package/dist/nile-status-light/index.esm.js +1 -0
  8. package/dist/nile-status-light/nile-status-light.cjs.js +2 -0
  9. package/dist/nile-status-light/nile-status-light.cjs.js.map +1 -0
  10. package/dist/nile-status-light/nile-status-light.css.cjs.js +2 -0
  11. package/dist/nile-status-light/nile-status-light.css.cjs.js.map +1 -0
  12. package/dist/nile-status-light/nile-status-light.css.esm.js +136 -0
  13. package/dist/nile-status-light/nile-status-light.esm.js +13 -0
  14. package/dist/src/index.d.ts +1 -0
  15. package/dist/src/index.js +1 -0
  16. package/dist/src/index.js.map +1 -1
  17. package/dist/src/nile-status-light/index.d.ts +1 -0
  18. package/dist/src/nile-status-light/index.js +2 -0
  19. package/dist/src/nile-status-light/index.js.map +1 -0
  20. package/dist/src/nile-status-light/nile-status-light.css.d.ts +9 -0
  21. package/dist/src/nile-status-light/nile-status-light.css.js +145 -0
  22. package/dist/src/nile-status-light/nile-status-light.css.js.map +1 -0
  23. package/dist/src/nile-status-light/nile-status-light.d.ts +53 -0
  24. package/dist/src/nile-status-light/nile-status-light.js +108 -0
  25. package/dist/src/nile-status-light/nile-status-light.js.map +1 -0
  26. package/dist/src/version.js +1 -1
  27. package/dist/src/version.js.map +1 -1
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +2 -1
  30. package/src/index.ts +1 -0
  31. package/src/nile-status-light/index.ts +1 -0
  32. package/src/nile-status-light/nile-status-light.css.ts +146 -0
  33. package/src/nile-status-light/nile-status-light.ts +111 -0
  34. package/vscode-html-custom-data.json +58 -0
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.7.8",
6
+ "version": "1.7.9",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -17,6 +17,7 @@
17
17
  "./nile-sidebar": "./dist/src/nile-sidebar/index.js",
18
18
  "./nile-menu": "./dist/src/nile-menu/index.js",
19
19
  "./nile-badge": "./dist/src/nile-badge/index.js",
20
+ "./nile-status-light": "./dist/src/nile-status-light/index.js",
20
21
  "./nile-drawer": "./dist/src/nile-drawer/index.js",
21
22
  "./nile-checkbox": "./dist/src/nile-checkbox/index.js",
22
23
  "./nile-checkbox-group": "./dist/src/nile-checkbox-group/index.js",
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ export { NileInput } from './nile-input';
5
5
  export { NileOtpInput } from './nile-otp-input';
6
6
  export { NileMenu } from './nile-menu';
7
7
  export { NileBadge } from './nile-badge';
8
+ export { NileStatusLight } from './nile-status-light';
8
9
  export { NileDrawer } from './nile-drawer';
9
10
  export { NileCheckbox } from './nile-checkbox';
10
11
  export { NileCheckboxGroup } from './nile-checkbox-group';
@@ -0,0 +1 @@
1
+ export { NileStatusLight } from './nile-status-light';
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Copyright Aquera Inc 2026
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { css } from 'lit';
9
+ export const styles = css`
10
+ :host {
11
+ -webkit-font-smoothing: var(
12
+ --nile-webkit-font-smoothing,
13
+ var(--ng-webkit-font-smoothing)
14
+ );
15
+ -moz-osx-font-smoothing: var(
16
+ --nile-moz-osx-font-smoothing,
17
+ var(--ng-moz-osx-font-smoothing)
18
+ );
19
+ text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
20
+ display: inline-block;
21
+ }
22
+
23
+ .status-light {
24
+ display: inline-flex;
25
+ align-items: center;
26
+ gap: var(--nile-spacing-sm, var(--ng-spacing-2));
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .status-light__dot {
31
+ position: relative;
32
+ flex: none;
33
+ border-radius: var(--nile-radius-full, var(--ng-radius-full));
34
+ width: var(--nile-height-10px, var(--ng-height-10px));
35
+ height: var(--nile-height-10px, var(--ng-height-10px));
36
+ background: var(--nile-colors-gray-light-mode-500, var(--ng-componentcolors-utility-gray-500));
37
+ }
38
+
39
+ .status-light__label {
40
+ font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
41
+ font-size: var(--nile-type-scale-2, var(--ng-font-size-text-sm));
42
+ font-style: normal;
43
+ font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
44
+ line-height: var(--nile-type-scale-5, var(--ng-line-height-text-sm));
45
+ letter-spacing: 0.2px;
46
+ color: var(--nile-colors-dark-900, var(--ng-componentcolors-utility-gray-900));
47
+ }
48
+
49
+ /* #region Sizes */
50
+
51
+ .status-light--small .status-light__dot {
52
+ width: var(--nile-height-8px, var(--ng-height-8px));
53
+ height: var(--nile-height-8px, var(--ng-height-8px));
54
+ }
55
+
56
+ .status-light--medium .status-light__dot {
57
+ width: var(--nile-height-10px, var(--ng-height-10px));
58
+ height: var(--nile-height-10px, var(--ng-height-10px));
59
+ }
60
+
61
+ .status-light--large .status-light__dot {
62
+ width: var(--nile-height-12px, var(--ng-height-12px));
63
+ height: var(--nile-height-12px, var(--ng-height-12px));
64
+ }
65
+
66
+ .status-light--x-large .status-light__dot {
67
+ width: var(--nile-height-14px, var(--ng-height-14px));
68
+ height: var(--nile-height-14px, var(--ng-height-14px));
69
+ }
70
+
71
+ .status-light--large .status-light__label,
72
+ .status-light--x-large .status-light__label {
73
+ font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
74
+ line-height: var(--nile-type-scale-6, var(--ng-line-height-text-md));
75
+ }
76
+
77
+
78
+
79
+ .status-light--positive .status-light__dot {
80
+ background: var(--nile-colors-green-500, var(--ng-componentcolors-utility-success-500));
81
+ }
82
+
83
+ .status-light--negative .status-light__dot {
84
+ background: var(--nile-colors-red-500, var(--ng-componentcolors-utility-error-500));
85
+ }
86
+
87
+ .status-light--notice .status-light__dot {
88
+ background: var(--nile-colors-yellow-500, var(--ng-componentcolors-utility-warning-500));
89
+ }
90
+
91
+ .status-light--informative .status-light__dot {
92
+ background: var(--nile-colors-blue-500, var(--ng-componentcolors-utility-blue-light-500));
93
+ }
94
+
95
+ .status-light--neutral .status-light__dot {
96
+ background: var(--nile-colors-gray-light-mode-500, var(--ng-componentcolors-utility-gray-500));
97
+ }
98
+
99
+ .status-light--inactive .status-light__dot {
100
+ background: var(--nile-colors-gray-light-mode-300, var(--ng-componentcolors-utility-gray-300));
101
+ }
102
+
103
+ .status-light--inactive .status-light__label {
104
+ color: var(--nile-colors-text-tertiary, var(--ng-componentcolors-utility-gray-500));
105
+ }
106
+
107
+ .status-light--disabled .status-light__dot {
108
+ background: var(--nile-colors-text-disabled, var(--ng-componentcolors-utility-gray-300));
109
+ }
110
+
111
+ .status-light--disabled .status-light__label {
112
+ color: var(--nile-colors-text-disabled, var(--ng-colors-text-disabled));
113
+ }
114
+
115
+
116
+
117
+ .status-light--pulse .status-light__dot::after {
118
+ content: '';
119
+ position: absolute;
120
+ inset: 0;
121
+ border-radius: inherit;
122
+ background: inherit;
123
+ animation: status-light-pulse 1.5s ease-out infinite;
124
+ }
125
+
126
+ @keyframes status-light-pulse {
127
+ 0% {
128
+ transform: scale(1);
129
+ opacity: 0.6;
130
+ }
131
+ 100% {
132
+ transform: scale(2.5);
133
+ opacity: 0;
134
+ }
135
+ }
136
+
137
+ @media (prefers-reduced-motion: reduce) {
138
+ .status-light--pulse .status-light__dot::after {
139
+ animation: none;
140
+ }
141
+ }
142
+
143
+ /* #endregion */
144
+ `;
145
+
146
+ export default [styles];
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Copyright Aquera Inc 2026
3
+ *
4
+ * This source code is licensed under the BSD-3-Clause license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { html, TemplateResult } from 'lit';
9
+ import { styles } from './nile-status-light.css';
10
+ import { classMap } from 'lit/directives/class-map.js';
11
+ import { customElement, property } from 'lit/decorators.js';
12
+ import NileElement, { setupA11yMetadata } from '../internal/nile-element';
13
+ import type { CSSResultGroup } from 'lit';
14
+ import { A11yProperty } from '../internal/accessibility/a11y.property.enum';
15
+ import { A11yRole } from '../internal/accessibility/a11y.role.enum';
16
+ import { Role } from '../internal/accessibility/role.enum';
17
+
18
+ /**
19
+ * Nile status light component.
20
+ *
21
+ * @tag nile-status-light
22
+ *
23
+ * @summary Status lights describe the status of an object, using a colored dot
24
+ * alongside a text label (e.g. "Active", "Error", "Pending").
25
+ * @status experimental
26
+ *
27
+ * @slot - The status light's text label.
28
+ *
29
+ * @attr {boolean} pulse - Optional pulse animation for active statuses.
30
+ *
31
+ * @csspart base - The component's base wrapper.
32
+ * @csspart indicator - The colored status dot.
33
+ * @csspart label - The status light's text label.
34
+ *
35
+ * @example
36
+ * <!-- Pulse animation for an active status -->
37
+ * <nile-status-light variant="positive" pulse>Active</nile-status-light>
38
+ *
39
+ * @example
40
+ * <!-- Disabled status light with muted colors -->
41
+ * <nile-status-light variant="positive" disabled>Inactive</nile-status-light>
42
+ */
43
+ @customElement('nile-status-light')
44
+ export class NileStatusLight extends NileElement {
45
+ static styles: CSSResultGroup = styles;
46
+
47
+ connectedCallback(): void {
48
+ super.connectedCallback();
49
+ setupA11yMetadata(this, {
50
+ [Role.Role]: A11yRole.Text,
51
+ [A11yProperty.AriaLabel]: this.textContent?.trim() || '',
52
+ });
53
+ }
54
+
55
+ /** The status light's color variant. */
56
+ @property({ reflect: true }) variant:
57
+ | 'positive'
58
+ | 'negative'
59
+ | 'notice'
60
+ | 'informative'
61
+ | 'neutral'
62
+ | 'inactive' = 'neutral';
63
+
64
+ /** The status light's size. */
65
+ @property({ reflect: true, attribute: true }) size: 'small' | 'medium' | 'large' | 'x-large' =
66
+ 'medium';
67
+
68
+ /** Disables the status light, muting its colors. */
69
+ @property({ type: Boolean, reflect: true }) disabled = false;
70
+
71
+ /** Draws attention to an active status with a pulsing animation around the dot. */
72
+ @property({ type: Boolean, reflect: true }) pulse = false;
73
+
74
+ render(): TemplateResult {
75
+ return html`
76
+ <span
77
+ part="base"
78
+ class=${classMap({
79
+ 'status-light': true,
80
+ 'status-light--positive': this.variant === 'positive',
81
+ 'status-light--negative': this.variant === 'negative',
82
+ 'status-light--notice': this.variant === 'notice',
83
+ 'status-light--informative': this.variant === 'informative',
84
+ 'status-light--neutral': this.variant === 'neutral',
85
+ 'status-light--inactive': this.variant === 'inactive',
86
+ 'status-light--small': this.size === 'small',
87
+ 'status-light--medium': this.size === 'medium',
88
+ 'status-light--large': this.size === 'large',
89
+ 'status-light--x-large': this.size === 'x-large',
90
+ 'status-light--disabled': this.disabled,
91
+ 'status-light--pulse': this.pulse && !this.disabled,
92
+ })}
93
+ >
94
+ <span
95
+ part="indicator"
96
+ class="status-light__dot"
97
+ aria-hidden="true"
98
+ ></span>
99
+ <slot part="label" class="status-light__label"></slot>
100
+ </span>
101
+ `;
102
+ }
103
+ }
104
+
105
+ export default NileStatusLight;
106
+
107
+ declare global {
108
+ interface HTMLElementTagNameMap {
109
+ 'nile-status-light': NileStatusLight;
110
+ }
111
+ }
@@ -6412,6 +6412,64 @@
6412
6412
  }
6413
6413
  ]
6414
6414
  },
6415
+ {
6416
+ "name": "nile-status-light",
6417
+ "description": "Nile status light component.\n\nSlots:\n\n * ` ` {} - The status light's text label.\n\nAttributes:\n\n * `variant` {`\"positive\" | \"negative\" | \"notice\" | \"informative\" | \"neutral\" | \"inactive\"`} - The status light's color variant.\n\n * `size` {`\"small\" | \"medium\" | \"large\" | \"x-large\"`} - The status light's size.\n\n * `disabled` {`boolean`} - Disables the status light, muting its colors.\n\n * `pulse` {boolean} - Draws attention to an active status with a pulsing animation around the dot.\n\nProperties:\n\n * `styles` - \n\n * `variant` {`\"positive\" | \"negative\" | \"notice\" | \"informative\" | \"neutral\" | \"inactive\"`} - The status light's color variant.\n\n * `size` {`\"small\" | \"medium\" | \"large\" | \"x-large\"`} - The status light's size.\n\n * `disabled` {`boolean`} - Disables the status light, muting its colors.\n\n * `pulse` {boolean} - Draws attention to an active status with a pulsing animation around the dot.\n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
6418
+ "attributes": [
6419
+ {
6420
+ "name": "variant",
6421
+ "description": "`variant` {`\"positive\" | \"negative\" | \"notice\" | \"informative\" | \"neutral\" | \"inactive\"`} - The status light's color variant.\n\nProperty: variant\n\nDefault: neutral",
6422
+ "values": [
6423
+ {
6424
+ "name": "positive"
6425
+ },
6426
+ {
6427
+ "name": "negative"
6428
+ },
6429
+ {
6430
+ "name": "notice"
6431
+ },
6432
+ {
6433
+ "name": "informative"
6434
+ },
6435
+ {
6436
+ "name": "neutral"
6437
+ },
6438
+ {
6439
+ "name": "inactive"
6440
+ }
6441
+ ]
6442
+ },
6443
+ {
6444
+ "name": "size",
6445
+ "description": "`size` {`\"small\" | \"medium\" | \"large\" | \"x-large\"`} - The status light's size.\n\nProperty: size\n\nDefault: medium",
6446
+ "values": [
6447
+ {
6448
+ "name": "small"
6449
+ },
6450
+ {
6451
+ "name": "medium"
6452
+ },
6453
+ {
6454
+ "name": "large"
6455
+ },
6456
+ {
6457
+ "name": "x-large"
6458
+ }
6459
+ ]
6460
+ },
6461
+ {
6462
+ "name": "disabled",
6463
+ "description": "`disabled` {`boolean`} - Disables the status light, muting its colors.\n\nProperty: disabled\n\nDefault: false",
6464
+ "valueSet": "v"
6465
+ },
6466
+ {
6467
+ "name": "pulse",
6468
+ "description": "`pulse` {boolean} - Draws attention to an active status with a pulsing animation around the dot.\n\nProperty: pulse\n\nDefault: false",
6469
+ "valueSet": "v"
6470
+ }
6471
+ ]
6472
+ },
6415
6473
  {
6416
6474
  "name": "nile-stepper-item",
6417
6475
  "description": "Nile stepper-item component.\n\nAttributes:\n\n * `title` {`string`} - \n\n * `subtitle` {`string`} - \n\n * `completed` {`boolean`} - \n\n * `current` {`boolean`} - \n\nProperties:\n\n * `absoluteTitle` {`HTMLDivElement`} - \n\n * `absoluteSubtitle` {`HTMLDivElement`} - \n\n * `title` {`string`} - \n\n * `subtitle` {`string`} - \n\n * `completed` {`boolean`} - \n\n * `current` {`boolean`} - \n\n * `contentBelow` {`boolean`} - \n\n * `size` {`\"sm\" | \"lg\"`} - \n\n * `icon` {`string`} - \n\n * `isFirst` {`boolean`} - \n\n * `isLast` {`boolean`} - \n\n * `isComplete` {`boolean`} - \n\n * `isCurrent` {`boolean`} - \n\n * `isManualMode` {`boolean`} - \n\n * `currentStepValue` {`Number`} - \n\n * `completedStepValue` {`Number`} - \n\n * `calculatedCompletedStepValue` {`Number`} - \n\n * `value` {`Number`} - \n\n * `haveFlex` {`Boolean`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",