@sondor-technology/sondor-components 1.0.7 → 1.0.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/dist/components/calendar/calendar.d.ts +36 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/calendar.js +449 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/cron-builder/cron-builder.d.ts +37 -0
- package/dist/components/cron-builder/cron-builder.d.ts.map +1 -0
- package/dist/components/cron-builder/cron-builder.js +522 -0
- package/dist/components/cron-builder/cron-builder.js.map +1 -0
- package/dist/components/input/input.d.ts +1 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +35 -12
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/pin-input/pin-input.d.ts +33 -0
- package/dist/components/pin-input/pin-input.d.ts.map +1 -0
- package/dist/components/pin-input/pin-input.js +253 -0
- package/dist/components/pin-input/pin-input.js.map +1 -0
- package/dist/components/popover/popover.d.ts +26 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +196 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/select/select.d.ts +4 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +26 -4
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/time-picker/time-picker.d.ts +38 -0
- package/dist/components/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/time-picker.js +290 -0
- package/dist/components/time-picker/time-picker.js.map +1 -0
- package/dist/components/toggle-group/toggle-button.d.ts +23 -0
- package/dist/components/toggle-group/toggle-button.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-button.js +114 -0
- package/dist/components/toggle-group/toggle-button.js.map +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +38 -0
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-group.js +270 -0
- package/dist/components/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +33 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +293 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/styles/index.css +2 -0
- package/package.json +33 -1
- package/src/components/calendar/calendar.ts +458 -0
- package/src/components/cron-builder/cron-builder.ts +529 -0
- package/src/components/input/input.ts +38 -14
- package/src/components/pin-input/pin-input.ts +249 -0
- package/src/components/popover/popover.ts +192 -0
- package/src/components/select/select.ts +25 -63
- package/src/components/time-picker/time-picker.ts +286 -0
- package/src/components/toggle-group/toggle-button.ts +103 -0
- package/src/components/toggle-group/toggle-group.ts +264 -0
- package/src/components/tooltip/tooltip.ts +286 -0
- package/src/styles/theme.css +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAK3C,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC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,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CAAkB;AACjB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;qCAA0B;AACf;IAAnC,QAAQ,CAAC,EAAC,SAAS,EAAE,WAAW,EAAC,CAAC;yCAAe;AACxB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;sCAAY;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAuB;AAER;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAkB;AACjC;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;0CAAoB;AACnB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;0CAAoB;AACnB;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;wCAAkB;AAED;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAkB;AACjB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;wCAAiB;AAChB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAAkB;AAtBhD,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CA6PnB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
export declare class StPinInput extends LitElement {
|
|
3
|
+
static formAssociated: boolean;
|
|
4
|
+
private _internals;
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
length: number;
|
|
8
|
+
value: string;
|
|
9
|
+
mask: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
required: boolean;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
error: string;
|
|
14
|
+
private _inputs;
|
|
15
|
+
private _touched;
|
|
16
|
+
constructor();
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
updated(changedProperties: PropertyValues): void;
|
|
19
|
+
private _syncValidity;
|
|
20
|
+
checkValidity(): boolean;
|
|
21
|
+
reportValidity(): boolean;
|
|
22
|
+
private _updateValue;
|
|
23
|
+
private _handleInput;
|
|
24
|
+
private _handleKeyDown;
|
|
25
|
+
private _handlePaste;
|
|
26
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
"st-pin-input": StPinInput;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=pin-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-input.d.ts","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAa,cAAc,EAAC,MAAM,KAAK,CAAC;AAK1D,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,cAAc,UAAQ;IAC7B,OAAO,CAAC,UAAU,CAAmB;IAEI,IAAI,SAAM;IACzB,KAAK,SAAM;IACX,MAAM,SAAK;IACX,KAAK,SAAM;IAGV,IAAI,UAAS;IAEE,QAAQ,UAAS;IACjB,QAAQ,UAAS;IACjB,OAAO,UAAS;IAChC,KAAK,SAAM;IAEf,OAAO,CAAC,OAAO,CAAgC;IAE5D,OAAO,CAAC,QAAQ,CAAS;IAElC,cAGC;IAED,MAAM,CAAC,MAAM,4BA+DX;IAEO,OAAO,CAAC,iBAAiB,EAAE,cAAc,QAUjD;IAED,OAAO,CAAC,aAAa;IAkBd,aAAa,YAEnB;IACM,cAAc,YAIpB;IAED,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,YAAY;IAyBpB,MAAM,yCAiCL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from "lit";
|
|
8
|
+
import { customElement, property, queryAll, state } from "lit/decorators.js";
|
|
9
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
+
import { resetStyles } from "../../styles/reset.js";
|
|
11
|
+
let StPinInput = class StPinInput extends LitElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.name = "";
|
|
15
|
+
this.label = "";
|
|
16
|
+
this.length = 6;
|
|
17
|
+
this.value = "";
|
|
18
|
+
// Obscures the input for secure PINs
|
|
19
|
+
this.mask = false;
|
|
20
|
+
this.disabled = false;
|
|
21
|
+
this.required = false;
|
|
22
|
+
this.invalid = false;
|
|
23
|
+
this.error = "";
|
|
24
|
+
this._touched = false;
|
|
25
|
+
this._internals = this.attachInternals();
|
|
26
|
+
}
|
|
27
|
+
updated(changedProperties) {
|
|
28
|
+
super.updated(changedProperties);
|
|
29
|
+
if (changedProperties.has("value") ||
|
|
30
|
+
changedProperties.has("required") ||
|
|
31
|
+
changedProperties.has("error")) {
|
|
32
|
+
this._internals.setFormValue(this.value || null);
|
|
33
|
+
this._syncValidity();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
_syncValidity() {
|
|
37
|
+
this.invalid = false;
|
|
38
|
+
if (this.error) {
|
|
39
|
+
this._internals.setValidity({ customError: true }, this.error);
|
|
40
|
+
this.invalid = true;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (this.required && (this.value.length < this.length || this.value.includes(" "))) {
|
|
44
|
+
this._internals.setValidity({ valueMissing: true }, `Please enter all ${this.length} digits.`);
|
|
45
|
+
if (this._touched)
|
|
46
|
+
this.invalid = true;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this._internals.setValidity({});
|
|
50
|
+
}
|
|
51
|
+
checkValidity() {
|
|
52
|
+
return this._internals.checkValidity();
|
|
53
|
+
}
|
|
54
|
+
reportValidity() {
|
|
55
|
+
this._touched = true;
|
|
56
|
+
this._syncValidity();
|
|
57
|
+
return this._internals.reportValidity();
|
|
58
|
+
}
|
|
59
|
+
_updateValue() {
|
|
60
|
+
const chars = Array.from(this._inputs).map((input) => input.value || " ");
|
|
61
|
+
this.value = chars.join("");
|
|
62
|
+
this.dispatchEvent(new Event("input", { bubbles: true, composed: true }));
|
|
63
|
+
// Only fire 'change' if the pin is completely filled
|
|
64
|
+
if (!this.value.includes(" ")) {
|
|
65
|
+
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Handle typing and auto-advancing
|
|
69
|
+
_handleInput(e, index) {
|
|
70
|
+
this._touched = true;
|
|
71
|
+
const input = e.target;
|
|
72
|
+
// If the user typed a character, move to the next input
|
|
73
|
+
if (input.value && index < this.length - 1) {
|
|
74
|
+
this._inputs[index + 1].focus();
|
|
75
|
+
}
|
|
76
|
+
this._updateValue();
|
|
77
|
+
}
|
|
78
|
+
// Handle backspace rewinding and arrow keys
|
|
79
|
+
_handleKeyDown(e, index) {
|
|
80
|
+
const input = e.target;
|
|
81
|
+
if (e.key === "Backspace") {
|
|
82
|
+
// If current box is empty, jump to previous box and clear it
|
|
83
|
+
if (!input.value && index > 0) {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
this._inputs[index - 1].value = "";
|
|
86
|
+
this._inputs[index - 1].focus();
|
|
87
|
+
this._updateValue();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else if (e.key === "ArrowLeft" && index > 0) {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
this._inputs[index - 1].focus();
|
|
93
|
+
}
|
|
94
|
+
else if (e.key === "ArrowRight" && index < this.length - 1) {
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
this._inputs[index + 1].focus();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Handle cross-field pasting (e.g. pasting "123456" into the first box)
|
|
100
|
+
_handlePaste(e, startIndex) {
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
this._touched = true;
|
|
103
|
+
const pasteData = e.clipboardData?.getData("text") || "";
|
|
104
|
+
// Clean the string (optional: restrict to numbers if you want strict numeric PINs)
|
|
105
|
+
const chars = pasteData.replace(/\s/g, "").split("");
|
|
106
|
+
if (!chars.length)
|
|
107
|
+
return;
|
|
108
|
+
let currentIndex = startIndex;
|
|
109
|
+
for (const char of chars) {
|
|
110
|
+
if (currentIndex < this.length) {
|
|
111
|
+
this._inputs[currentIndex].value = char;
|
|
112
|
+
currentIndex++;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Focus the last filled input (or the very last input if we filled them all)
|
|
116
|
+
const focusIndex = Math.min(currentIndex, this.length - 1);
|
|
117
|
+
this._inputs[focusIndex].focus();
|
|
118
|
+
this._updateValue();
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
// Break the current value into an array of characters for rendering
|
|
122
|
+
const values = this.value.padEnd(this.length, " ").split("");
|
|
123
|
+
const isInvalid = this.invalid || !!this.error;
|
|
124
|
+
return html `
|
|
125
|
+
${this.label ? html `<label>${this.label}</label>` : ""}
|
|
126
|
+
|
|
127
|
+
<div class=${classMap({ "pin-container": true, "is-invalid": isInvalid })}>
|
|
128
|
+
${values
|
|
129
|
+
.slice(0, this.length)
|
|
130
|
+
.map((char, index) => html `
|
|
131
|
+
<input
|
|
132
|
+
class="pin-box"
|
|
133
|
+
aria-label="Digit ${index + 1}"
|
|
134
|
+
type=${this.mask ? "password" : "text"}
|
|
135
|
+
inputmode="numeric"
|
|
136
|
+
autocomplete="${"one-time-code"}"
|
|
137
|
+
maxlength="1"
|
|
138
|
+
.value=${char.trim()}
|
|
139
|
+
?disabled=${this.disabled}
|
|
140
|
+
@input=${(e) => this._handleInput(e, index)}
|
|
141
|
+
@keydown=${(e) => this._handleKeyDown(e, index)}
|
|
142
|
+
@paste=${(e) => this._handlePaste(e, index)}
|
|
143
|
+
/>
|
|
144
|
+
`)}
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
${isInvalid && this.error ? html `<span class="error-msg">${this.error}</span>` : ""}
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
StPinInput.formAssociated = true;
|
|
152
|
+
StPinInput.styles = [
|
|
153
|
+
resetStyles,
|
|
154
|
+
css `
|
|
155
|
+
:host {
|
|
156
|
+
display: block;
|
|
157
|
+
font-family: inherit;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
label {
|
|
161
|
+
display: block;
|
|
162
|
+
font-size: var(--st-font-size-sm);
|
|
163
|
+
font-weight: 500;
|
|
164
|
+
color: var(--st-color-text-muted);
|
|
165
|
+
margin-bottom: var(--st-spacing-xs);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.pin-container {
|
|
169
|
+
display: flex;
|
|
170
|
+
gap: var(--st-spacing-sm);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.pin-box {
|
|
174
|
+
width: 48px;
|
|
175
|
+
height: 56px;
|
|
176
|
+
text-align: center;
|
|
177
|
+
font-size: var(--st-font-size-xl);
|
|
178
|
+
font-weight: var(--st-font-weight-semibold);
|
|
179
|
+
color: var(--st-color-text);
|
|
180
|
+
background: var(--st-color-surface);
|
|
181
|
+
border: 1px solid var(--st-color-border);
|
|
182
|
+
border-radius: var(--st-radius-md);
|
|
183
|
+
box-sizing: border-box;
|
|
184
|
+
transition:
|
|
185
|
+
border-color 0.2s,
|
|
186
|
+
box-shadow 0.2s,
|
|
187
|
+
background-color 0.2s;
|
|
188
|
+
/* iOS optimization for numeric pads */
|
|
189
|
+
caret-color: var(--st-color-primary);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.pin-box:focus {
|
|
193
|
+
outline: none;
|
|
194
|
+
border-color: var(--st-color-primary);
|
|
195
|
+
box-shadow: 0 0 0 2px var(--st-color-primary-muted, rgba(59, 130, 246, 0.25));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.pin-box:disabled {
|
|
199
|
+
background: var(--st-color-surface-muted, #f1f5f9);
|
|
200
|
+
color: var(--st-color-text-muted);
|
|
201
|
+
cursor: not-allowed;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.is-invalid .pin-box {
|
|
205
|
+
border-color: var(--st-color-danger, #dc2626);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.error-msg {
|
|
209
|
+
display: block;
|
|
210
|
+
margin-top: var(--st-spacing-xs);
|
|
211
|
+
font-size: var(--st-font-size-xs);
|
|
212
|
+
color: var(--st-color-danger, #dc2626);
|
|
213
|
+
}
|
|
214
|
+
`,
|
|
215
|
+
];
|
|
216
|
+
__decorate([
|
|
217
|
+
property({ type: String, reflect: true })
|
|
218
|
+
], StPinInput.prototype, "name", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: String })
|
|
221
|
+
], StPinInput.prototype, "label", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
property({ type: Number })
|
|
224
|
+
], StPinInput.prototype, "length", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: String })
|
|
227
|
+
], StPinInput.prototype, "value", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
property({ type: Boolean })
|
|
230
|
+
], StPinInput.prototype, "mask", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: Boolean, reflect: true })
|
|
233
|
+
], StPinInput.prototype, "disabled", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
property({ type: Boolean, reflect: true })
|
|
236
|
+
], StPinInput.prototype, "required", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ type: Boolean, reflect: true })
|
|
239
|
+
], StPinInput.prototype, "invalid", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
property({ type: String })
|
|
242
|
+
], StPinInput.prototype, "error", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
queryAll(".pin-box")
|
|
245
|
+
], StPinInput.prototype, "_inputs", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
state()
|
|
248
|
+
], StPinInput.prototype, "_touched", void 0);
|
|
249
|
+
StPinInput = __decorate([
|
|
250
|
+
customElement("st-pin-input")
|
|
251
|
+
], StPinInput);
|
|
252
|
+
export { StPinInput };
|
|
253
|
+
//# sourceMappingURL=pin-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pin-input.js","sourceRoot":"","sources":["../../../src/components/pin-input/pin-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAG3C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAqBxC;QACE,KAAK,EAAE,C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AAY;AACX;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;0CAAY;AACX;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;yCAAY;AAGV;IAA1B,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;wCAAc;AAEE;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAAkB;AACjB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;4CAAkB;AACjB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;2CAAiB;AAChC;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;yCAAY;AAEP;IAA7B,QAAQ,CAAC,UAAU,CAAC;2CAAgD;AAEpD;IAAhB,KAAK,EAAE;4CAA0B;AAnBvB,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CA4OtB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from "lit";
|
|
2
|
+
export type PopoverPosition = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export declare class StPopover extends LitElement {
|
|
4
|
+
position: PopoverPosition;
|
|
5
|
+
offset: number;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
private _isOpen;
|
|
8
|
+
private _triggerWrapper;
|
|
9
|
+
private _popoverEl;
|
|
10
|
+
private _triggerElements;
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
|
+
updated(changedProperties: PropertyValues): void;
|
|
13
|
+
private _handleTriggerSlotChange;
|
|
14
|
+
private _togglePopover;
|
|
15
|
+
show(): void;
|
|
16
|
+
hide(): void;
|
|
17
|
+
private _handleNativeToggle;
|
|
18
|
+
private _reposition;
|
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
"st-popover": StPopover;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAa,cAAc,EAAC,MAAM,KAAK,CAAC;AAI1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAElE,qBACa,SAAU,SAAQ,UAAU;IACb,QAAQ,EAAE,eAAe,CAAY;IACrC,MAAM,SAAK;IACK,QAAQ,UAAS;IAElD,OAAO,CAAC,OAAO,CAAS;IAEN,OAAO,CAAC,eAAe,CAAe;IACtC,OAAO,CAAC,UAAU,CAAe;IAElB,OAAO,CAAC,gBAAgB,CAAiB;IAEnF,MAAM,CAAC,MAAM,4BAkDX;IAEO,OAAO,CAAC,iBAAiB,EAAE,cAAc,QAOjD;IAED,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,cAAc;IAKf,IAAI,SAWV;IAEM,IAAI,SAOV;IAED,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,WAAW,CAwCjB;IAEF,MAAM,yCAiBL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from "lit";
|
|
8
|
+
import { customElement, property, query, state, queryAssignedElements } from "lit/decorators.js";
|
|
9
|
+
import { resetStyles } from "../../styles/reset.js";
|
|
10
|
+
let StPopover = class StPopover extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.position = "bottom";
|
|
14
|
+
this.offset = 8;
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this._isOpen = false;
|
|
17
|
+
this._reposition = () => {
|
|
18
|
+
if (!this._isOpen || !this._popoverEl || !this._triggerWrapper)
|
|
19
|
+
return;
|
|
20
|
+
const triggerRect = this._triggerWrapper.getBoundingClientRect();
|
|
21
|
+
const popoverRect = this._popoverEl.getBoundingClientRect();
|
|
22
|
+
let top = 0;
|
|
23
|
+
let left = 0;
|
|
24
|
+
switch (this.position) {
|
|
25
|
+
case "bottom":
|
|
26
|
+
top = triggerRect.bottom + this.offset;
|
|
27
|
+
left = triggerRect.left + triggerRect.width / 2 - popoverRect.width / 2;
|
|
28
|
+
break;
|
|
29
|
+
case "top":
|
|
30
|
+
top = triggerRect.top - popoverRect.height - this.offset;
|
|
31
|
+
left = triggerRect.left + triggerRect.width / 2 - popoverRect.width / 2;
|
|
32
|
+
break;
|
|
33
|
+
case "right":
|
|
34
|
+
top = triggerRect.top + triggerRect.height / 2 - popoverRect.height / 2;
|
|
35
|
+
left = triggerRect.right + this.offset;
|
|
36
|
+
break;
|
|
37
|
+
case "left":
|
|
38
|
+
top = triggerRect.top + triggerRect.height / 2 - popoverRect.height / 2;
|
|
39
|
+
left = triggerRect.left - popoverRect.width - this.offset;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
const padding = 8;
|
|
43
|
+
if (left < padding)
|
|
44
|
+
left = padding;
|
|
45
|
+
if (left + popoverRect.width > window.innerWidth - padding) {
|
|
46
|
+
left = window.innerWidth - popoverRect.width - padding;
|
|
47
|
+
}
|
|
48
|
+
if (top < padding)
|
|
49
|
+
top = padding;
|
|
50
|
+
if (top + popoverRect.height > window.innerHeight - padding) {
|
|
51
|
+
top = window.innerHeight - popoverRect.height - padding;
|
|
52
|
+
}
|
|
53
|
+
this._popoverEl.style.top = `${top}px`;
|
|
54
|
+
this._popoverEl.style.left = `${left}px`;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
updated(changedProperties) {
|
|
58
|
+
super.updated(changedProperties);
|
|
59
|
+
if (changedProperties.has("_isOpen")) {
|
|
60
|
+
this._triggerElements?.forEach((el) => {
|
|
61
|
+
el.setAttribute("aria-expanded", String(this._isOpen));
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
_handleTriggerSlotChange() {
|
|
66
|
+
this._triggerElements?.forEach((el) => {
|
|
67
|
+
el.setAttribute("aria-haspopup", "dialog");
|
|
68
|
+
el.setAttribute("aria-expanded", String(this._isOpen));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
_togglePopover() {
|
|
72
|
+
if (this.disabled)
|
|
73
|
+
return;
|
|
74
|
+
this._isOpen ? this.hide() : this.show();
|
|
75
|
+
}
|
|
76
|
+
show() {
|
|
77
|
+
if (this.disabled || this._isOpen)
|
|
78
|
+
return;
|
|
79
|
+
// 🚀 FIX: Update state synchronously so the _reposition check passes instantly
|
|
80
|
+
this._isOpen = true;
|
|
81
|
+
this._popoverEl.showPopover();
|
|
82
|
+
this._reposition();
|
|
83
|
+
window.addEventListener("resize", this._reposition);
|
|
84
|
+
window.addEventListener("scroll", this._reposition, true);
|
|
85
|
+
}
|
|
86
|
+
hide() {
|
|
87
|
+
if (!this._isOpen)
|
|
88
|
+
return;
|
|
89
|
+
// 🚀 FIX: Update state synchronously
|
|
90
|
+
this._isOpen = false;
|
|
91
|
+
this._popoverEl.hidePopover();
|
|
92
|
+
}
|
|
93
|
+
_handleNativeToggle(e) {
|
|
94
|
+
const isOpening = e.newState === "open";
|
|
95
|
+
this._isOpen = isOpening;
|
|
96
|
+
// This handles the cleanup when the user clicks outside or hits ESC
|
|
97
|
+
if (!isOpening) {
|
|
98
|
+
window.removeEventListener("resize", this._reposition);
|
|
99
|
+
window.removeEventListener("scroll", this._reposition, true);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
render() {
|
|
103
|
+
return html `
|
|
104
|
+
<div
|
|
105
|
+
class="trigger-wrapper"
|
|
106
|
+
@click=${this._togglePopover}
|
|
107
|
+
@keydown=${(e) => e.key === "Enter" || e.key === " " ? this._togglePopover() : null}
|
|
108
|
+
>
|
|
109
|
+
<slot name="trigger" @slotchange=${this._handleTriggerSlotChange}></slot>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div id="popover-content" popover="auto" @toggle=${this._handleNativeToggle}>
|
|
113
|
+
<div class="popover-surface">
|
|
114
|
+
<slot name="content"></slot>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
`;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
StPopover.styles = [
|
|
121
|
+
resetStyles,
|
|
122
|
+
css `
|
|
123
|
+
:host {
|
|
124
|
+
display: inline-block;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.trigger-wrapper {
|
|
128
|
+
display: inline-block;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Native popover styles */
|
|
133
|
+
[popover] {
|
|
134
|
+
position: fixed;
|
|
135
|
+
margin: 0;
|
|
136
|
+
padding: 0;
|
|
137
|
+
border: none;
|
|
138
|
+
background: transparent;
|
|
139
|
+
overflow: visible;
|
|
140
|
+
/* 🚀 FIX: Erase the browser's native centering inset so our JS coordinates work */
|
|
141
|
+
inset: auto;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.popover-surface {
|
|
145
|
+
background: var(--st-color-surface);
|
|
146
|
+
border: 1px solid var(--st-color-border);
|
|
147
|
+
border-radius: var(--st-radius-md);
|
|
148
|
+
box-shadow:
|
|
149
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
150
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
151
|
+
padding: var(--st-spacing-md);
|
|
152
|
+
color: var(--st-color-text);
|
|
153
|
+
|
|
154
|
+
opacity: 0;
|
|
155
|
+
transform: scale(0.95);
|
|
156
|
+
transition:
|
|
157
|
+
opacity 0.15s ease,
|
|
158
|
+
transform 0.15s ease;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[popover]:popover-open .popover-surface {
|
|
162
|
+
opacity: 1;
|
|
163
|
+
transform: scale(1);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[popover]::backdrop {
|
|
167
|
+
background: transparent;
|
|
168
|
+
}
|
|
169
|
+
`,
|
|
170
|
+
];
|
|
171
|
+
__decorate([
|
|
172
|
+
property({ type: String })
|
|
173
|
+
], StPopover.prototype, "position", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
property({ type: Number })
|
|
176
|
+
], StPopover.prototype, "offset", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property({ type: Boolean, reflect: true })
|
|
179
|
+
], StPopover.prototype, "disabled", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
state()
|
|
182
|
+
], StPopover.prototype, "_isOpen", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
query(".trigger-wrapper")
|
|
185
|
+
], StPopover.prototype, "_triggerWrapper", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
query("#popover-content")
|
|
188
|
+
], StPopover.prototype, "_popoverEl", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
queryAssignedElements({ slot: "trigger" })
|
|
191
|
+
], StPopover.prototype, "_triggerElements", void 0);
|
|
192
|
+
StPopover = __decorate([
|
|
193
|
+
customElement("st-popover")
|
|
194
|
+
], StPopover);
|
|
195
|
+
export { StPopover };
|
|
196
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/components/popover/popover.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAiB,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,qBAAqB,EAAC,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAK3C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QACqB,aAAQ,GAAoB,QAAQ,CAAC;QACrC,WAAM,GAAG,CAAC,CAAC;QACK,aAAQ,GAAG,KAAK,CAAC;QAE1C,YAAO,GAAG,KAAK,CAAC;QAiHzB,gBAAW,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,eAAe;gBAAE,OAAO;YAEvE,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,EAAE,CAAC;YACjE,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC;YAE5D,IAAI,GAAG,GAAG,CAAC,CAAC;YACZ,IAAI,IAAI,GAAG,CAAC,CAAC;YAEb,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACtB,KAAK,QAAQ;oBACX,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;oBACvC,IAAI,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC;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,EAAC,CAAC;2CAAsC;AACrC;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;yCAAY;AACK;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;2CAAkB;AAE1C;IAAhB,KAAK,EAAE;0CAAyB;AAEE;IAAlC,KAAK,CAAC,kBAAkB,CAAC;kDAAuC;AAC9B;IAAlC,KAAK,CAAC,kBAAkB,CAAC;6CAAkC;AAEV;IAAjD,qBAAqB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAC;mDAA0C;AAVxE,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAkLrB"}
|
|
@@ -3,12 +3,13 @@ export interface SelectOption {
|
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}
|
|
6
|
-
export type SelectAutocomplete = "on" | "off" | "name" | "
|
|
6
|
+
export type SelectAutocomplete = "on" | "off" | "name" | "email" | (string & {});
|
|
7
7
|
export declare class StSelect extends LitElement {
|
|
8
8
|
static formAssociated: boolean;
|
|
9
9
|
private internals;
|
|
10
10
|
name: string;
|
|
11
11
|
label: string;
|
|
12
|
+
hideLabel: boolean;
|
|
12
13
|
value: string;
|
|
13
14
|
required: boolean;
|
|
14
15
|
multiple: boolean;
|
|
@@ -24,6 +25,8 @@ export declare class StSelect extends LitElement {
|
|
|
24
25
|
private touched;
|
|
25
26
|
private buttonElement;
|
|
26
27
|
private searchInputEl?;
|
|
28
|
+
private _labelId;
|
|
29
|
+
private _listboxId;
|
|
27
30
|
static styles: import("lit").CSSResult;
|
|
28
31
|
constructor();
|
|
29
32
|
checkValidity(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAa,cAAc,EAAC,MAAM,KAAK,CAAC;
|
|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