@neptune.fintech/web-ui 2.0.0 → 2.2.0
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 +24 -2
- package/dist/components/actions.d.ts +43 -0
- package/dist/components/actions.d.ts.map +1 -0
- package/dist/components/actions.js +279 -0
- package/dist/components/actions.js.map +1 -0
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +9 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/cards.d.ts +64 -0
- package/dist/components/cards.d.ts.map +1 -0
- package/dist/components/cards.js +498 -0
- package/dist/components/cards.js.map +1 -0
- package/dist/components/containers.d.ts +54 -0
- package/dist/components/containers.d.ts.map +1 -0
- package/dist/components/containers.js +298 -0
- package/dist/components/containers.js.map +1 -0
- package/dist/components/corporate.d.ts +84 -0
- package/dist/components/corporate.d.ts.map +1 -0
- package/dist/components/corporate.js +782 -0
- package/dist/components/corporate.js.map +1 -0
- package/dist/components/data-viz.d.ts +69 -0
- package/dist/components/data-viz.d.ts.map +1 -0
- package/dist/components/data-viz.js +526 -0
- package/dist/components/data-viz.js.map +1 -0
- package/dist/components/feedback-status.d.ts +80 -0
- package/dist/components/feedback-status.d.ts.map +1 -0
- package/dist/components/feedback-status.js +537 -0
- package/dist/components/feedback-status.js.map +1 -0
- package/dist/components/feedback.d.ts +42 -0
- package/dist/components/feedback.d.ts.map +1 -0
- package/dist/components/feedback.js +241 -0
- package/dist/components/feedback.js.map +1 -0
- package/dist/components/inputs.d.ts +8 -1
- package/dist/components/inputs.d.ts.map +1 -1
- package/dist/components/inputs.js +57 -3
- package/dist/components/inputs.js.map +1 -1
- package/dist/components/layout.d.ts +68 -0
- package/dist/components/layout.d.ts.map +1 -0
- package/dist/components/layout.js +359 -0
- package/dist/components/layout.js.map +1 -0
- package/dist/components/money-inputs.d.ts +105 -0
- package/dist/components/money-inputs.d.ts.map +1 -0
- package/dist/components/money-inputs.js +766 -0
- package/dist/components/money-inputs.js.map +1 -0
- package/dist/components/money-movement.d.ts +79 -0
- package/dist/components/money-movement.d.ts.map +1 -0
- package/dist/components/money-movement.js +740 -0
- package/dist/components/money-movement.js.map +1 -0
- package/dist/components/nav-rail.d.ts +22 -0
- package/dist/components/nav-rail.d.ts.map +1 -0
- package/dist/components/nav-rail.js +120 -0
- package/dist/components/nav-rail.js.map +1 -0
- package/dist/components/selection.d.ts +51 -0
- package/dist/components/selection.d.ts.map +1 -0
- package/dist/components/selection.js +377 -0
- package/dist/components/selection.js.map +1 -0
- package/dist/components/shell-layout.d.ts +103 -0
- package/dist/components/shell-layout.d.ts.map +1 -0
- package/dist/components/shell-layout.js +582 -0
- package/dist/components/shell-layout.js.map +1 -0
- package/dist/components/wallet-pay.d.ts +85 -0
- package/dist/components/wallet-pay.d.ts.map +1 -0
- package/dist/components/wallet-pay.js +633 -0
- package/dist/components/wallet-pay.js.map +1 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/register.d.ts.map +1 -1
- package/dist/register.js +103 -0
- package/dist/register.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,8 +51,30 @@ a brand is zero JavaScript. Custom configs and brandprints resolve through
|
|
|
51
51
|
|
|
52
52
|
## Components
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
A standards-based **Material 3** kit. Every element is themed only by CSS variables.
|
|
55
|
+
|
|
56
|
+
**Core & financial:** `npt-button` (filled / elevated / tonal / outlined / text) ·
|
|
57
|
+
`npt-card` (incl. `glass`) · `npt-balance-card` · `npt-transaction-row` · `npt-text-field` ·
|
|
58
|
+
`npt-badge`.
|
|
59
|
+
|
|
60
|
+
**Buttons & actions:** `npt-icon-button` (standard / filled / tonal / outlined, `[selected]`) ·
|
|
61
|
+
`npt-fab` (`sm`/`md`/`lg`, `[extended]`) · `npt-segmented-button` + `npt-segmented-option`.
|
|
62
|
+
|
|
63
|
+
**Selection controls:** `npt-checkbox` (`[indeterminate]`) · `npt-radio` (name/value group) ·
|
|
64
|
+
`npt-switch` · `npt-slider` (output bubble).
|
|
65
|
+
|
|
66
|
+
**Chips:** `npt-chip` with `variant="assist|filter|input|suggestion"` (filter check, input ✕).
|
|
67
|
+
|
|
68
|
+
**Communication & feedback:** `npt-progress` (linear / circular, `[indeterminate]`) ·
|
|
69
|
+
`npt-snackbar` · `npt-tooltip` · `npt-banner`.
|
|
70
|
+
|
|
71
|
+
**Containers & layout:** `npt-dialog` (scrim, ESC / backdrop close, focus-trap) ·
|
|
72
|
+
`npt-bottom-sheet` · `npt-list` + `npt-list-item` · `npt-divider` (`[inset]`) ·
|
|
73
|
+
`npt-tabs` + `npt-tab` · `npt-accordion` + `npt-accordion-item` · `npt-avatar` ·
|
|
74
|
+
`npt-menu` + `npt-menu-item`.
|
|
75
|
+
|
|
76
|
+
**Navigation:** `npt-app-bar` · `npt-top-app-bar` (`small`/`center`/`medium`/`large`) ·
|
|
77
|
+
`npt-nav-bar` · `npt-nav-rail` · `npt-nav-item`.
|
|
56
78
|
|
|
57
79
|
Every component reads **only** `var(--md-sys-color-*)` / `var(--npt-*)` — no literal color,
|
|
58
80
|
radius, or font anywhere (principle P2). Layout is logical (`*-inline-*`) so it mirrors in
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { NptElement } from "./base.js";
|
|
2
|
+
/**
|
|
3
|
+
* <npt-icon-button variant="standard|filled|tonal|outlined" [selected] [disabled]
|
|
4
|
+
* label="Favourite">★</npt-icon-button>
|
|
5
|
+
* 48dp circular target. `selected` toggles the active treatment.
|
|
6
|
+
*/
|
|
7
|
+
export declare class NptIconButton extends NptElement {
|
|
8
|
+
static observedAttributes: string[];
|
|
9
|
+
attributeChangedCallback(): void;
|
|
10
|
+
protected styles(): string;
|
|
11
|
+
protected render(): string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* <npt-fab size="sm|md|lg" [extended] label="Compose" [disabled]>+</npt-fab>
|
|
15
|
+
* Primary-container floating action. `extended` reveals the text label.
|
|
16
|
+
*/
|
|
17
|
+
export declare class NptFab extends NptElement {
|
|
18
|
+
static observedAttributes: string[];
|
|
19
|
+
attributeChangedCallback(): void;
|
|
20
|
+
protected styles(): string;
|
|
21
|
+
protected render(): string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* <npt-segmented-button [multi]> with <npt-segmented-option> children.
|
|
25
|
+
* Connected single- or multi-select group. Single-select is the default.
|
|
26
|
+
*/
|
|
27
|
+
export declare class NptSegmentedButton extends NptElement {
|
|
28
|
+
static observedAttributes: string[];
|
|
29
|
+
attributeChangedCallback(): void;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
private onClick;
|
|
33
|
+
protected styles(): string;
|
|
34
|
+
protected render(): string;
|
|
35
|
+
}
|
|
36
|
+
/** <npt-segmented-option value="day" [selected] [disabled]>Day</npt-segmented-option> */
|
|
37
|
+
export declare class NptSegmentedOption extends NptElement {
|
|
38
|
+
static observedAttributes: string[];
|
|
39
|
+
attributeChangedCallback(): void;
|
|
40
|
+
protected styles(): string;
|
|
41
|
+
protected render(): string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/components/actions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AAKxD;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,MAAM,CAAC,kBAAkB,WAAgD;IAEzE,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;IA0D1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAW3B;AAED;;;GAGG;AACH,qBAAa,MAAO,SAAQ,UAAU;IACpC,MAAM,CAAC,kBAAkB,WAA6C;IAEtE,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;IAwD1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAQ3B;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,MAAM,CAAC,kBAAkB,WAAa;IAEtC,wBAAwB,IAAI,IAAI;IAIvB,iBAAiB,IAAI,IAAI;IAKlC,oBAAoB,IAAI,IAAI;IAI5B,OAAO,CAAC,OAAO,CAWb;IAEF,SAAS,CAAC,MAAM,IAAI,MAAM;IAe1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAM3B;AAED,yFAAyF;AACzF,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,MAAM,CAAC,kBAAkB,WAAqC;IAE9D,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;IA0C1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAc3B"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// © 2026 Neptune.Fintech (neptune.ly) · Neptune Odyssey Community License v1.0
|
|
2
|
+
// Neptune Odyssey — action components
|
|
3
|
+
// <npt-icon-button>, <npt-fab>, <npt-segmented-button> + <npt-segmented-option>.
|
|
4
|
+
// Logical layout → mirrors in RTL. Custom-property driven only.
|
|
5
|
+
import { NptElement, css, html, A11Y } from "./base.js";
|
|
6
|
+
const esc = (v) => (v ?? "").replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);
|
|
7
|
+
/**
|
|
8
|
+
* <npt-icon-button variant="standard|filled|tonal|outlined" [selected] [disabled]
|
|
9
|
+
* label="Favourite">★</npt-icon-button>
|
|
10
|
+
* 48dp circular target. `selected` toggles the active treatment.
|
|
11
|
+
*/
|
|
12
|
+
export class NptIconButton extends NptElement {
|
|
13
|
+
attributeChangedCallback() {
|
|
14
|
+
if (this.isConnected)
|
|
15
|
+
this.update();
|
|
16
|
+
}
|
|
17
|
+
styles() {
|
|
18
|
+
return css `
|
|
19
|
+
${A11Y}
|
|
20
|
+
:host {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
}
|
|
23
|
+
button {
|
|
24
|
+
inline-size: 48px;
|
|
25
|
+
block-size: 48px;
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
border: none;
|
|
30
|
+
border-radius: var(--npt-corner-full, 999px);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background: transparent;
|
|
33
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
34
|
+
font-family: var(--npt-font-text);
|
|
35
|
+
font-size: var(--npt-text-title, 18px);
|
|
36
|
+
transition: background-color var(--npt-dur-fast, 200ms) var(--npt-ease-standard, ease),
|
|
37
|
+
color var(--npt-dur-fast, 200ms) var(--npt-ease-standard, ease);
|
|
38
|
+
}
|
|
39
|
+
button:disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
opacity: 0.38;
|
|
42
|
+
}
|
|
43
|
+
:host([variant="filled"]) button {
|
|
44
|
+
background: var(--md-sys-color-surface-container-highest);
|
|
45
|
+
color: var(--md-sys-color-primary);
|
|
46
|
+
}
|
|
47
|
+
:host([variant="filled"][selected]) button {
|
|
48
|
+
background: var(--md-sys-color-primary);
|
|
49
|
+
color: var(--md-sys-color-on-primary);
|
|
50
|
+
}
|
|
51
|
+
:host([variant="tonal"]) button {
|
|
52
|
+
background: var(--md-sys-color-secondary-container);
|
|
53
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
54
|
+
}
|
|
55
|
+
:host([variant="tonal"][selected]) button {
|
|
56
|
+
background: var(--md-sys-color-secondary);
|
|
57
|
+
color: var(--md-sys-color-on-secondary);
|
|
58
|
+
}
|
|
59
|
+
:host([variant="outlined"]) button {
|
|
60
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
61
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
62
|
+
}
|
|
63
|
+
:host([variant="outlined"][selected]) button {
|
|
64
|
+
background: var(--md-sys-color-inverse-surface);
|
|
65
|
+
color: var(--md-sys-color-inverse-on-surface);
|
|
66
|
+
border-color: transparent;
|
|
67
|
+
}
|
|
68
|
+
:host(:not([variant])[selected]) button,
|
|
69
|
+
:host([variant="standard"][selected]) button {
|
|
70
|
+
color: var(--md-sys-color-primary);
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const disabled = this.hasAttribute("disabled") ? "disabled" : "";
|
|
76
|
+
const pressed = this.hasAttribute("selected") ? "true" : "false";
|
|
77
|
+
const label = esc(this.getAttribute("label"));
|
|
78
|
+
return html `<button
|
|
79
|
+
part="button"
|
|
80
|
+
${disabled}
|
|
81
|
+
aria-pressed="${pressed}"
|
|
82
|
+
aria-label="${label}"
|
|
83
|
+
><slot></slot></button>`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
NptIconButton.observedAttributes = ["variant", "selected", "disabled", "label"];
|
|
87
|
+
/**
|
|
88
|
+
* <npt-fab size="sm|md|lg" [extended] label="Compose" [disabled]>+</npt-fab>
|
|
89
|
+
* Primary-container floating action. `extended` reveals the text label.
|
|
90
|
+
*/
|
|
91
|
+
export class NptFab extends NptElement {
|
|
92
|
+
attributeChangedCallback() {
|
|
93
|
+
if (this.isConnected)
|
|
94
|
+
this.update();
|
|
95
|
+
}
|
|
96
|
+
styles() {
|
|
97
|
+
return css `
|
|
98
|
+
${A11Y}
|
|
99
|
+
:host {
|
|
100
|
+
display: inline-block;
|
|
101
|
+
}
|
|
102
|
+
button {
|
|
103
|
+
min-inline-size: 56px;
|
|
104
|
+
min-block-size: 56px;
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
gap: var(--npt-space-3, 12px);
|
|
109
|
+
border: none;
|
|
110
|
+
border-radius: var(--npt-corner-lg, 24px);
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
padding-inline: var(--npt-space-4, 16px);
|
|
113
|
+
background: var(--md-sys-color-primary-container);
|
|
114
|
+
color: var(--md-sys-color-on-primary-container);
|
|
115
|
+
font-family: var(--npt-font-text);
|
|
116
|
+
font-size: var(--npt-text-label, 14px);
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
box-shadow: var(--npt-elevation-3, 0 8px 20px rgba(0, 0, 0, 0.2));
|
|
119
|
+
transition: box-shadow var(--npt-dur-fast, 200ms) var(--npt-ease-standard, ease);
|
|
120
|
+
}
|
|
121
|
+
button:disabled {
|
|
122
|
+
cursor: not-allowed;
|
|
123
|
+
opacity: 0.38;
|
|
124
|
+
}
|
|
125
|
+
:host([size="sm"]) button {
|
|
126
|
+
min-inline-size: 40px;
|
|
127
|
+
min-block-size: 40px;
|
|
128
|
+
border-radius: var(--npt-corner-md, 16px);
|
|
129
|
+
}
|
|
130
|
+
:host([size="lg"]) button {
|
|
131
|
+
min-inline-size: 96px;
|
|
132
|
+
min-block-size: 96px;
|
|
133
|
+
border-radius: var(--npt-corner-xl, 32px);
|
|
134
|
+
font-size: var(--npt-text-title, 18px);
|
|
135
|
+
}
|
|
136
|
+
.icon {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
font-size: var(--npt-text-title, 18px);
|
|
139
|
+
}
|
|
140
|
+
.label {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
:host([extended]) .label {
|
|
144
|
+
display: inline;
|
|
145
|
+
}
|
|
146
|
+
:host([extended]) button {
|
|
147
|
+
padding-inline: var(--npt-space-5, 20px);
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
render() {
|
|
152
|
+
const disabled = this.hasAttribute("disabled") ? "disabled" : "";
|
|
153
|
+
const label = esc(this.getAttribute("label"));
|
|
154
|
+
return html `<button part="button" ${disabled} aria-label="${label}">
|
|
155
|
+
<span class="icon"><slot></slot></span>
|
|
156
|
+
${label ? html `<span class="label">${label}</span>` : ""}
|
|
157
|
+
</button>`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
NptFab.observedAttributes = ["size", "extended", "label", "disabled"];
|
|
161
|
+
/**
|
|
162
|
+
* <npt-segmented-button [multi]> with <npt-segmented-option> children.
|
|
163
|
+
* Connected single- or multi-select group. Single-select is the default.
|
|
164
|
+
*/
|
|
165
|
+
export class NptSegmentedButton extends NptElement {
|
|
166
|
+
constructor() {
|
|
167
|
+
super(...arguments);
|
|
168
|
+
this.onClick = (e) => {
|
|
169
|
+
const target = e.target?.closest("npt-segmented-option");
|
|
170
|
+
if (!target || target.hasAttribute("disabled"))
|
|
171
|
+
return;
|
|
172
|
+
if (this.hasAttribute("multi")) {
|
|
173
|
+
target.toggleAttribute("selected");
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
for (const opt of this.querySelectorAll("npt-segmented-option")) {
|
|
177
|
+
opt.toggleAttribute("selected", opt === target);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
this.dispatchEvent(new CustomEvent("change", { bubbles: true }));
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
attributeChangedCallback() {
|
|
184
|
+
if (this.isConnected)
|
|
185
|
+
this.update();
|
|
186
|
+
}
|
|
187
|
+
connectedCallback() {
|
|
188
|
+
super.connectedCallback();
|
|
189
|
+
this.addEventListener("click", this.onClick);
|
|
190
|
+
}
|
|
191
|
+
disconnectedCallback() {
|
|
192
|
+
this.removeEventListener("click", this.onClick);
|
|
193
|
+
}
|
|
194
|
+
styles() {
|
|
195
|
+
return css `
|
|
196
|
+
${A11Y}
|
|
197
|
+
:host {
|
|
198
|
+
display: inline-flex;
|
|
199
|
+
}
|
|
200
|
+
.group {
|
|
201
|
+
display: inline-flex;
|
|
202
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
203
|
+
border-radius: var(--npt-corner-full, 999px);
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
render() {
|
|
209
|
+
const multi = this.hasAttribute("multi");
|
|
210
|
+
return html `<div class="group" part="group" role="group" aria-multiselectable="${multi}">
|
|
211
|
+
<slot></slot>
|
|
212
|
+
</div>`;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
NptSegmentedButton.observedAttributes = ["multi"];
|
|
216
|
+
/** <npt-segmented-option value="day" [selected] [disabled]>Day</npt-segmented-option> */
|
|
217
|
+
export class NptSegmentedOption extends NptElement {
|
|
218
|
+
attributeChangedCallback() {
|
|
219
|
+
if (this.isConnected)
|
|
220
|
+
this.update();
|
|
221
|
+
}
|
|
222
|
+
styles() {
|
|
223
|
+
return css `
|
|
224
|
+
${A11Y}
|
|
225
|
+
:host {
|
|
226
|
+
display: inline-flex;
|
|
227
|
+
}
|
|
228
|
+
.opt {
|
|
229
|
+
min-height: 48px;
|
|
230
|
+
display: inline-flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
gap: var(--npt-space-2, 8px);
|
|
234
|
+
padding-inline: var(--npt-space-4, 16px);
|
|
235
|
+
border: none;
|
|
236
|
+
border-inline-start: 1px solid var(--md-sys-color-outline);
|
|
237
|
+
background: transparent;
|
|
238
|
+
color: var(--md-sys-color-on-surface);
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
font-family: var(--npt-font-text);
|
|
241
|
+
font-size: var(--npt-text-label, 14px);
|
|
242
|
+
transition: background-color var(--npt-dur-fast, 200ms) var(--npt-ease-standard, ease);
|
|
243
|
+
}
|
|
244
|
+
:host(:first-of-type) .opt {
|
|
245
|
+
border-inline-start: none;
|
|
246
|
+
}
|
|
247
|
+
:host([selected]) .opt {
|
|
248
|
+
background: var(--md-sys-color-secondary-container);
|
|
249
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
250
|
+
}
|
|
251
|
+
.opt:disabled {
|
|
252
|
+
cursor: not-allowed;
|
|
253
|
+
opacity: 0.38;
|
|
254
|
+
}
|
|
255
|
+
.check {
|
|
256
|
+
display: none;
|
|
257
|
+
}
|
|
258
|
+
:host([selected]) .check {
|
|
259
|
+
display: inline;
|
|
260
|
+
}
|
|
261
|
+
`;
|
|
262
|
+
}
|
|
263
|
+
render() {
|
|
264
|
+
const selected = this.hasAttribute("selected");
|
|
265
|
+
const disabled = this.hasAttribute("disabled") ? "disabled" : "";
|
|
266
|
+
return html `<button
|
|
267
|
+
class="opt"
|
|
268
|
+
part="option"
|
|
269
|
+
role="button"
|
|
270
|
+
aria-pressed="${selected}"
|
|
271
|
+
${disabled}
|
|
272
|
+
>
|
|
273
|
+
<span class="check" aria-hidden="true">✓</span>
|
|
274
|
+
<slot></slot>
|
|
275
|
+
</button>`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
NptSegmentedOption.observedAttributes = ["selected", "disabled", "value"];
|
|
279
|
+
//# sourceMappingURL=actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/components/actions.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sCAAsC;AACtC,iFAAiF;AACjF,gEAAgE;AAChE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,GAAG,GAAG,CAAC,CAAgB,EAAU,EAAE,CACvC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;AAEvG;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAG3C,wBAAwB;QACtB,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IAES,MAAM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;;;;;;;;;KAUP,CAAC;IACJ,CAAC;IAES,MAAM;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,IAAI,CAAA,sEAAsE,KAAK;;WAE/E,CAAC;IACV,CAAC;;AAhDM,qCAAkB,GAAG,CAAC,OAAO,CAAC,AAAZ,CAAa;AAmDxC,yFAAyF;AACzF,MAAM,OAAO,kBAAmB,SAAQ,UAAU;IAGhD,wBAAwB;QACtB,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IAES,MAAM;QACd,OAAO,GAAG,CAAA;QACN,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCP,CAAC;IACJ,CAAC;IAES,MAAM;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,IAAI,CAAA;;;;sBAIO,QAAQ;QACtB,QAAQ;;;;cAIF,CAAC;IACb,CAAC;;AA7DM,qCAAkB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NptElement } from "./base.js";
|
|
2
2
|
/**
|
|
3
|
-
* <npt-button variant="filled|tonal|outlined|text" [disabled]>Label</npt-button>
|
|
3
|
+
* <npt-button variant="filled|elevated|tonal|outlined|text" [disabled]>Label</npt-button>
|
|
4
4
|
* M3 Expressive button. Pill shape, brand-tinted, 48dp min target.
|
|
5
5
|
*/
|
|
6
6
|
export declare class NptButton extends NptElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AAExD;;;GAGG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,kBAAkB,WAA2B;IAEpD,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAmB,MAAM,WAAW,CAAC;AAExD;;;GAGG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,kBAAkB,WAA2B;IAEpD,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;IA6D1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAI3B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Neptune Odyssey — <npt-button> · © 2026 Neptune.Fintech (neptune.ly)
|
|
2
2
|
import { NptElement, css, html, A11Y } from "./base.js";
|
|
3
3
|
/**
|
|
4
|
-
* <npt-button variant="filled|tonal|outlined|text" [disabled]>Label</npt-button>
|
|
4
|
+
* <npt-button variant="filled|elevated|tonal|outlined|text" [disabled]>Label</npt-button>
|
|
5
5
|
* M3 Expressive button. Pill shape, brand-tinted, 48dp min target.
|
|
6
6
|
*/
|
|
7
7
|
export class NptButton extends NptElement {
|
|
@@ -45,6 +45,14 @@ export class NptButton extends NptElement {
|
|
|
45
45
|
:host(:not([variant])) button:hover:not(:disabled) {
|
|
46
46
|
box-shadow: var(--npt-elevation-1, 0 1px 3px rgba(0, 0, 0, 0.2));
|
|
47
47
|
}
|
|
48
|
+
:host([variant="elevated"]) button {
|
|
49
|
+
background: var(--md-sys-color-surface-container-low);
|
|
50
|
+
color: var(--md-sys-color-primary);
|
|
51
|
+
box-shadow: var(--npt-elevation-1, 0 1px 3px rgba(0, 0, 0, 0.2));
|
|
52
|
+
}
|
|
53
|
+
:host([variant="elevated"]) button:hover:not(:disabled) {
|
|
54
|
+
box-shadow: var(--npt-elevation-2, 0 2px 6px rgba(0, 0, 0, 0.18));
|
|
55
|
+
}
|
|
48
56
|
:host([variant="tonal"]) button {
|
|
49
57
|
background: var(--md-sys-color-secondary-container);
|
|
50
58
|
color: var(--md-sys-color-on-secondary-container);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAExD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAGvC,wBAAwB;QACtB,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IAES,MAAM;QACd,OAAO,GAAG,CAAA;QACN,IAAI
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAExD;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAGvC,wBAAwB;QACtB,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACtC,CAAC;IAES,MAAM;QACd,OAAO,GAAG,CAAA;QACN,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwDP,CAAC;IACJ,CAAC;IAES,MAAM;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,IAAI,CAAA,yBAAyB,QAAQ,yBAAyB,CAAC;IACxE,CAAC;;AAtEM,4BAAkB,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { NptElement } from "./base.js";
|
|
2
|
+
/**
|
|
3
|
+
* <npt-card-art holder="A. KELLER" last4="4821" expiry="08/29" scheme="VISA"
|
|
4
|
+
* variant="virtual|physical|frozen"><span slot="brand">◈</span></npt-card-art>
|
|
5
|
+
* Payment-card visual on the brand gradient. `scheme` is a plain label; provide a
|
|
6
|
+
* brand mark via the `brand` slot (top-trailing). [frozen] dims and shows a frozen
|
|
7
|
+
* affordance. Card number digits use tabular figures.
|
|
8
|
+
*/
|
|
9
|
+
export declare class NptCardArt extends NptElement {
|
|
10
|
+
static observedAttributes: string[];
|
|
11
|
+
attributeChangedCallback(): void;
|
|
12
|
+
protected styles(): string;
|
|
13
|
+
protected render(): string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* <npt-card-row label="Salary card" last4="4821" scheme="VISA" [interactive]>
|
|
17
|
+
* <span slot="brand">◈</span></npt-card-row>
|
|
18
|
+
* Saved-card list item. Leading `brand` slot, trailing chevron. [interactive] makes
|
|
19
|
+
* the whole row a button (role/tabindex/hover) that emits a bubbling `select` event.
|
|
20
|
+
*/
|
|
21
|
+
export declare class NptCardRow extends NptElement {
|
|
22
|
+
static observedAttributes: string[];
|
|
23
|
+
attributeChangedCallback(): void;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
disconnectedCallback(): void;
|
|
26
|
+
private activate;
|
|
27
|
+
private onClick;
|
|
28
|
+
private onKey;
|
|
29
|
+
protected styles(): string;
|
|
30
|
+
protected render(): string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* <npt-add-card>Add a new card</npt-add-card>
|
|
34
|
+
* Dashed call-to-action tile with a leading +. Behaves as a button (role/tabindex)
|
|
35
|
+
* and emits a bubbling `add` event on click / Enter / Space.
|
|
36
|
+
*/
|
|
37
|
+
export declare class NptAddCard extends NptElement {
|
|
38
|
+
static observedAttributes: string[];
|
|
39
|
+
attributeChangedCallback(): void;
|
|
40
|
+
connectedCallback(): void;
|
|
41
|
+
disconnectedCallback(): void;
|
|
42
|
+
private activate;
|
|
43
|
+
private onClick;
|
|
44
|
+
private onKey;
|
|
45
|
+
protected styles(): string;
|
|
46
|
+
protected render(): string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* <npt-card-controls [frozen]></npt-card-controls>
|
|
50
|
+
* Row of toggle actions (Freeze, Limits, Details, PIN). Each press dispatches a
|
|
51
|
+
* bubbling `control` event whose detail is { action }. [frozen] flips the first
|
|
52
|
+
* action's label/affordance to Unfreeze.
|
|
53
|
+
*/
|
|
54
|
+
export declare class NptCardControls extends NptElement {
|
|
55
|
+
static observedAttributes: string[];
|
|
56
|
+
private static readonly ACTIONS;
|
|
57
|
+
attributeChangedCallback(): void;
|
|
58
|
+
connectedCallback(): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
private onClick;
|
|
61
|
+
protected styles(): string;
|
|
62
|
+
protected render(): string;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=cards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/components/cards.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAA2B,MAAM,WAAW,CAAC;AAKhE;;;;;;GAMG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,kBAAkB,WAAsD;IAE/E,wBAAwB,IAAI,IAAI;IAIhC,SAAS,CAAC,MAAM,IAAI,MAAM;IAkH1B,SAAS,CAAC,MAAM,IAAI,MAAM;CAyB3B;AAED;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,kBAAkB,WAA+C;IAExE,wBAAwB,IAAI,IAAI;IAIvB,iBAAiB,IAAI,IAAI;IAMlC,oBAAoB,IAAI,IAAI;IAK5B,OAAO,CAAC,Q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