@sondor-technology/sondor-components 1.0.0 → 1.0.1-develop.3
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/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +105 -0
- package/dist/components/badge/badge.d.ts +13 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +101 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +19 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +99 -0
- package/dist/components/button/button.d.ts +23 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +304 -0
- package/dist/components/button-group/button-group.d.ts +6 -0
- package/dist/components/button-group/button-group.d.ts.map +1 -0
- package/dist/components/button-group/button-group.js +74 -0
- package/dist/components/card/card.d.ts +11 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +54 -0
- package/dist/components/checkbox/checkbox.d.ts +28 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +247 -0
- package/dist/components/code-block/code-block.d.ts +20 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +260 -0
- package/dist/components/content-card/content-card.d.ts +13 -0
- package/dist/components/content-card/content-card.d.ts.map +1 -0
- package/dist/components/content-card/content-card.js +140 -0
- package/dist/components/divider/divider.d.ts +16 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/divider.js +82 -0
- package/dist/components/drawer/drawer.d.ts +22 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +226 -0
- package/dist/components/field/field.d.ts +11 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.js +32 -0
- package/dist/components/footer/footer.d.ts +6 -0
- package/dist/components/footer/footer.d.ts.map +1 -0
- package/dist/components/footer/footer.js +65 -0
- package/dist/components/form/form-step.d.ts +13 -0
- package/dist/components/form/form-step.d.ts.map +1 -0
- package/dist/components/form/form-step.js +41 -0
- package/dist/components/form/form.d.ts +25 -0
- package/dist/components/form/form.d.ts.map +1 -0
- package/dist/components/form/form.js +358 -0
- package/dist/components/grid/grid-row.d.ts +17 -0
- package/dist/components/grid/grid-row.d.ts.map +1 -0
- package/dist/components/grid/grid-row.js +92 -0
- package/dist/components/grid/grid.d.ts +13 -0
- package/dist/components/grid/grid.d.ts.map +1 -0
- package/dist/components/grid/grid.js +42 -0
- package/dist/components/icon/icon-paths.d.ts +132 -0
- package/dist/components/icon/icon-paths.d.ts.map +1 -0
- package/dist/components/icon/icon-paths.js +137 -0
- package/dist/components/icon/icon.d.ts +16 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.js +95 -0
- package/dist/components/input/input.d.ts +31 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +268 -0
- package/dist/components/link/link.d.ts +16 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/link.js +116 -0
- package/dist/components/metadata/metadata.d.ts +18 -0
- package/dist/components/metadata/metadata.d.ts.map +1 -0
- package/dist/components/metadata/metadata.js +71 -0
- package/dist/components/modal/modal.d.ts +24 -0
- package/dist/components/modal/modal.d.ts.map +1 -0
- package/dist/components/modal/modal.js +163 -0
- package/dist/components/page-layout/page-layout.d.ts +46 -0
- package/dist/components/page-layout/page-layout.d.ts.map +1 -0
- package/dist/components/page-layout/page-layout.js +697 -0
- package/dist/components/radio/radio.d.ts +16 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.js +152 -0
- package/dist/components/radio-group/radio-group.d.ts +27 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +161 -0
- package/dist/components/router/router.d.ts +7 -0
- package/dist/components/router/router.d.ts.map +1 -0
- package/dist/components/router/router.js +37 -0
- package/dist/components/select/select.d.ts +16 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +172 -0
- package/dist/components/skeleton/skeleton.d.ts +17 -0
- package/dist/components/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.js +78 -0
- package/dist/components/switch/switch.d.ts +25 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +185 -0
- package/dist/components/table/data-table.d.ts +72 -0
- package/dist/components/table/data-table.d.ts.map +1 -0
- package/dist/components/table/data-table.js +551 -0
- package/dist/components/table/table.d.ts +22 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +167 -0
- package/dist/components/tabs/tab-panel.d.ts +8 -0
- package/dist/components/tabs/tab-panel.d.ts.map +1 -0
- package/dist/components/tabs/tab-panel.js +46 -0
- package/dist/components/tabs/tab.d.ts +9 -0
- package/dist/components/tabs/tab.d.ts.map +1 -0
- package/dist/components/tabs/tab.js +91 -0
- package/dist/components/tabs/tabs.d.ts +14 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +85 -0
- package/dist/components/textarea/textarea.d.ts +36 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.js +231 -0
- package/dist/components/theme-toggle/theme-toggle.d.ts +15 -0
- package/dist/components/theme-toggle/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle/theme-toggle.js +130 -0
- package/dist/components/vertical-nav/vertical-nav-group.d.ts +10 -0
- package/dist/components/vertical-nav/vertical-nav-group.d.ts.map +1 -0
- package/dist/components/vertical-nav/vertical-nav-group.js +127 -0
- package/dist/components/vertical-nav/vertical-nav-item.d.ts +9 -0
- package/dist/components/vertical-nav/vertical-nav-item.d.ts.map +1 -0
- package/dist/components/vertical-nav/vertical-nav-item.js +85 -0
- package/dist/styles/index.css +171 -0
- package/dist/styles/reset.d.ts +2 -0
- package/dist/styles/reset.d.ts.map +1 -0
- package/dist/styles/reset.js +50 -0
- package/package.json +7 -2
- package/src/components/alert/alert.ts +100 -100
- package/src/components/badge/badge.ts +96 -96
- package/src/components/breadcrumb/breadcrumb.ts +98 -98
- package/src/components/button/button.ts +281 -281
- package/src/components/button-group/button-group.ts +67 -67
- package/src/components/card/card.ts +52 -52
- package/src/components/checkbox/checkbox.ts +238 -238
- package/src/components/code-block/code-block.ts +256 -256
- package/src/components/content-card/content-card.ts +133 -133
- package/src/components/divider/divider.ts +68 -68
- package/src/components/drawer/drawer.ts +217 -217
- package/src/components/field/field.ts +30 -30
- package/src/components/footer/footer.ts +58 -58
- package/src/components/form/form-step.ts +32 -32
- package/src/components/form/form.ts +376 -376
- package/src/components/grid/grid-row.ts +75 -75
- package/src/components/grid/grid.ts +36 -36
- package/src/components/icon/icon-paths.ts +140 -124
- package/src/components/icon/icon.ts +82 -82
- package/src/components/input/input.ts +248 -248
- package/src/components/link/link.ts +97 -97
- package/src/components/metadata/metadata.ts +66 -66
- package/src/components/modal/modal.ts +158 -158
- package/src/components/page-layout/page-layout.ts +704 -704
- package/src/components/radio/radio.ts +142 -142
- package/src/components/radio-group/radio-group.ts +157 -157
- package/src/components/router/router.ts +46 -46
- package/src/components/select/select.ts +161 -161
- package/src/components/skeleton/skeleton.ts +67 -67
- package/src/components/switch/switch.ts +181 -181
- package/src/components/table/data-table.ts +556 -556
- package/src/components/table/table.ts +153 -153
- package/src/components/tabs/tab-panel.ts +30 -30
- package/src/components/tabs/tab.ts +76 -76
- package/src/components/tabs/tabs.ts +88 -88
- package/src/components/textarea/textarea.ts +215 -215
- package/src/components/theme-toggle/theme-toggle.ts +131 -131
- package/src/components/vertical-nav/vertical-nav-group.ts +109 -96
- package/src/components/vertical-nav/vertical-nav-item.ts +66 -49
- package/src/styles/globals.css +58 -58
- package/src/styles/index.css +80 -80
- package/src/styles/reset.ts +50 -50
- package/src/styles/theme.css +58 -58
- package/src/styles/typography.css +25 -25
- package/tsconfig.json +15 -15
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class StDivider extends LitElement {
|
|
3
|
+
direction: 'horizontal' | 'vertical';
|
|
4
|
+
thickness: string;
|
|
5
|
+
margin: string;
|
|
6
|
+
color: 'default' | 'primary' | 'border';
|
|
7
|
+
static styles: import("lit").CSSResult[];
|
|
8
|
+
updated(changedProperties: Map<string, any>): void;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'st-divider': StDivider;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../../src/components/divider/divider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,qBACa,SAAU,SAAQ,UAAU;IACI,SAAS,EAAE,YAAY,GAAG,UAAU,CAAgB;IACnE,SAAS,SAAS;IAClB,MAAM,SAAO;IACE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAY;IAE9F,MAAM,CAAC,MAAM,4BAgCX;IAEF,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,QAM1C;IAED,MAAM,yCAQL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 } from 'lit/decorators.js';
|
|
9
|
+
import { resetStyles } from '../../styles/reset.js';
|
|
10
|
+
let StDivider = class StDivider extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.direction = 'horizontal';
|
|
14
|
+
this.thickness = '1px';
|
|
15
|
+
this.margin = '0';
|
|
16
|
+
this.color = 'border';
|
|
17
|
+
}
|
|
18
|
+
updated(changedProperties) {
|
|
19
|
+
super.updated(changedProperties);
|
|
20
|
+
// Sync properties to CSS variables for dynamic adjustment
|
|
21
|
+
this.style.setProperty('--divider-thickness', this.thickness);
|
|
22
|
+
this.style.setProperty('--divider-margin', this.margin);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
// Accessibility: Set role and aria-orientation
|
|
26
|
+
return html `
|
|
27
|
+
<div
|
|
28
|
+
role="separator"
|
|
29
|
+
aria-orientation="${this.direction === 'horizontal' ? 'horizontal' : 'vertical'}"
|
|
30
|
+
></div>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
StDivider.styles = [
|
|
35
|
+
resetStyles,
|
|
36
|
+
css `
|
|
37
|
+
:host {
|
|
38
|
+
display: block;
|
|
39
|
+
background-color: var(--divider-color, var(--st-color-border));
|
|
40
|
+
margin: var(--divider-margin, 0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Horizontal Layout */
|
|
44
|
+
:host([direction="horizontal"]) {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: var(--divider-thickness, 1px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Vertical Layout */
|
|
50
|
+
:host([direction="vertical"]) {
|
|
51
|
+
width: var(--divider-thickness, 1px);
|
|
52
|
+
height: 100%;
|
|
53
|
+
display: inline-block;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Color Variants */
|
|
58
|
+
:host([color="primary"]) {
|
|
59
|
+
background-color: var(--st-color-primary);
|
|
60
|
+
}
|
|
61
|
+
:host([color="default"]) {
|
|
62
|
+
background-color: var(--st-color-text);
|
|
63
|
+
opacity: 0.2;
|
|
64
|
+
}
|
|
65
|
+
`
|
|
66
|
+
];
|
|
67
|
+
__decorate([
|
|
68
|
+
property({ type: String, reflect: true })
|
|
69
|
+
], StDivider.prototype, "direction", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({ type: String })
|
|
72
|
+
], StDivider.prototype, "thickness", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
property({ type: String })
|
|
75
|
+
], StDivider.prototype, "margin", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: String, reflect: true })
|
|
78
|
+
], StDivider.prototype, "color", void 0);
|
|
79
|
+
StDivider = __decorate([
|
|
80
|
+
customElement('st-divider')
|
|
81
|
+
], StDivider);
|
|
82
|
+
export { StDivider };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
export type DrawerPlacement = 'left' | 'right';
|
|
3
|
+
export declare class StDrawer extends LitElement {
|
|
4
|
+
open: boolean;
|
|
5
|
+
placement: DrawerPlacement;
|
|
6
|
+
mobileOnly: boolean;
|
|
7
|
+
private _touchStartX;
|
|
8
|
+
private _currentTranslateX;
|
|
9
|
+
private _isDragging;
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
private _close;
|
|
12
|
+
private _handleTouchStart;
|
|
13
|
+
private _handleTouchMove;
|
|
14
|
+
private _handleTouchEnd;
|
|
15
|
+
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
'st-drawer': StDrawer;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,OAAO,EAAE,MAAM,KAAK,CAAC;AAIrD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,qBACa,QAAS,SAAQ,UAAU;IACM,IAAI,UAAS;IACd,SAAS,EAAE,eAAe,CAAU;IACT,UAAU,UAAS;IAEzF,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,WAAW,CAAS;IAE5B,MAAM,CAAC,MAAM,4BAsHX;IAEF,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,eAAe;IAkBvB,MAAM,0DAyBL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|
|
@@ -0,0 +1,226 @@
|
|
|
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, nothing } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { resetStyles } from '../../styles/reset.js';
|
|
10
|
+
let StDrawer = class StDrawer extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.open = false;
|
|
14
|
+
this.placement = 'left';
|
|
15
|
+
this.mobileOnly = false;
|
|
16
|
+
this._touchStartX = 0;
|
|
17
|
+
this._currentTranslateX = 0;
|
|
18
|
+
this._isDragging = false;
|
|
19
|
+
}
|
|
20
|
+
_close() {
|
|
21
|
+
this.open = false;
|
|
22
|
+
const panel = this.shadowRoot?.querySelector('.panel');
|
|
23
|
+
if (panel)
|
|
24
|
+
panel.style.transform = '';
|
|
25
|
+
this.dispatchEvent(new CustomEvent('st-close', { bubbles: true, composed: true }));
|
|
26
|
+
}
|
|
27
|
+
_handleTouchStart(e) {
|
|
28
|
+
this._touchStartX = e.touches[0].clientX;
|
|
29
|
+
this._isDragging = true;
|
|
30
|
+
const panel = this.shadowRoot?.querySelector('.panel');
|
|
31
|
+
if (panel)
|
|
32
|
+
panel.style.transition = 'none';
|
|
33
|
+
}
|
|
34
|
+
_handleTouchMove(e) {
|
|
35
|
+
if (!this._isDragging)
|
|
36
|
+
return;
|
|
37
|
+
const currentX = e.touches[0].clientX;
|
|
38
|
+
const diff = currentX - this._touchStartX;
|
|
39
|
+
const panel = this.shadowRoot?.querySelector('.panel');
|
|
40
|
+
if (!panel)
|
|
41
|
+
return;
|
|
42
|
+
if (this.placement === 'left' && diff < 0) {
|
|
43
|
+
this._currentTranslateX = diff;
|
|
44
|
+
panel.style.transform = `translateX(${diff}px)`;
|
|
45
|
+
}
|
|
46
|
+
else if (this.placement === 'right' && diff > 0) {
|
|
47
|
+
this._currentTranslateX = diff;
|
|
48
|
+
panel.style.transform = `translateX(${diff}px)`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
_handleTouchEnd() {
|
|
52
|
+
if (!this._isDragging)
|
|
53
|
+
return;
|
|
54
|
+
this._isDragging = false;
|
|
55
|
+
const panel = this.shadowRoot?.querySelector('.panel');
|
|
56
|
+
if (panel)
|
|
57
|
+
panel.style.transition = '';
|
|
58
|
+
const threshold = 70;
|
|
59
|
+
if ((this.placement === 'left' && this._currentTranslateX < -threshold) ||
|
|
60
|
+
(this.placement === 'right' && this._currentTranslateX > threshold)) {
|
|
61
|
+
this._close();
|
|
62
|
+
}
|
|
63
|
+
else if (panel) {
|
|
64
|
+
panel.style.transform = '';
|
|
65
|
+
}
|
|
66
|
+
this._currentTranslateX = 0;
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
if (!this.open)
|
|
70
|
+
return nothing;
|
|
71
|
+
return html `
|
|
72
|
+
<div class="overlay" @click=${this._close}></div>
|
|
73
|
+
<div
|
|
74
|
+
class="panel"
|
|
75
|
+
role="dialog"
|
|
76
|
+
aria-modal="true"
|
|
77
|
+
@click=${(e) => e.stopPropagation()}
|
|
78
|
+
@touchstart=${this._handleTouchStart}
|
|
79
|
+
@touchmove=${this._handleTouchMove}
|
|
80
|
+
@touchend=${this._handleTouchEnd}
|
|
81
|
+
>
|
|
82
|
+
<div class="header">
|
|
83
|
+
<span class="title"><slot name="header">Menu</slot></span>
|
|
84
|
+
<button class="close-btn" @click=${this._close} aria-label="Close Drawer">
|
|
85
|
+
<svg viewBox="0 0 24 24"><path d="M18 6L6 18M6 6l12 12"></path></svg>
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="body">
|
|
89
|
+
<slot></slot>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
`;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
StDrawer.styles = [
|
|
96
|
+
resetStyles,
|
|
97
|
+
css `
|
|
98
|
+
:host {
|
|
99
|
+
display: contents;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host([mobile-only]) {
|
|
103
|
+
display: block;
|
|
104
|
+
}
|
|
105
|
+
@media (min-width: 768px) {
|
|
106
|
+
:host([mobile-only]) {
|
|
107
|
+
display: none !important;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.overlay {
|
|
112
|
+
position: fixed;
|
|
113
|
+
top: 0;
|
|
114
|
+
left: 0;
|
|
115
|
+
width: 100vw;
|
|
116
|
+
height: 100vh;
|
|
117
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
118
|
+
backdrop-filter: blur(2px);
|
|
119
|
+
z-index: 1000;
|
|
120
|
+
display: flex;
|
|
121
|
+
opacity: 0;
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
transition: opacity 0.25s ease-in-out;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host([open]) .overlay {
|
|
127
|
+
opacity: 1;
|
|
128
|
+
pointer-events: auto;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.panel {
|
|
132
|
+
position: fixed;
|
|
133
|
+
top: 0;
|
|
134
|
+
bottom: 0;
|
|
135
|
+
width: auto;
|
|
136
|
+
max-width: 90vw;
|
|
137
|
+
background-color: var(--st-color-surface, #ffffff);
|
|
138
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
z-index: 1001;
|
|
142
|
+
overflow-y: auto;
|
|
143
|
+
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
|
144
|
+
touch-action: pan-y;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Slide from Left */
|
|
148
|
+
:host([placement="left"]) .panel {
|
|
149
|
+
left: 0;
|
|
150
|
+
transform: translateX(-100%);
|
|
151
|
+
}
|
|
152
|
+
:host([placement="left"][open]) .panel {
|
|
153
|
+
transform: translateX(0);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Slide from Right */
|
|
157
|
+
:host([placement="right"]) .panel {
|
|
158
|
+
right: 0;
|
|
159
|
+
transform: translateX(100%);
|
|
160
|
+
}
|
|
161
|
+
:host([placement="right"][open]) .panel {
|
|
162
|
+
transform: translateX(0);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.header {
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: space-between;
|
|
169
|
+
padding: var(--st-spacing-md) var(--st-spacing-lg);
|
|
170
|
+
border-bottom: 1px solid var(--st-color-border, #e2e8f0);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.title {
|
|
174
|
+
font-weight: var(--st-font-weight-bold);
|
|
175
|
+
font-size: var(--st-font-size-sm);
|
|
176
|
+
color: var(--st-color-text);
|
|
177
|
+
text-transform: uppercase;
|
|
178
|
+
letter-spacing: 0.05em;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.close-btn {
|
|
182
|
+
background: transparent;
|
|
183
|
+
border: none;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
color: var(--st-color-text-muted);
|
|
186
|
+
padding: 0.25rem;
|
|
187
|
+
display: flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
justify-content: center;
|
|
190
|
+
border-radius: var(--st-radius-sm, 0.375rem);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.close-btn:hover {
|
|
194
|
+
color: var(--st-color-text);
|
|
195
|
+
background-color: var(--st-color-surface-muted, #f1f5f9);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.close-btn svg {
|
|
199
|
+
width: 1.25rem;
|
|
200
|
+
height: 1.25rem;
|
|
201
|
+
stroke: currentColor;
|
|
202
|
+
stroke-width: 2;
|
|
203
|
+
stroke-linecap: round;
|
|
204
|
+
stroke-linejoin: round;
|
|
205
|
+
fill: none;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.body {
|
|
209
|
+
padding: var(--st-spacing-lg);
|
|
210
|
+
flex: 1;
|
|
211
|
+
}
|
|
212
|
+
`
|
|
213
|
+
];
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: Boolean, reflect: true })
|
|
216
|
+
], StDrawer.prototype, "open", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property({ type: String, reflect: true })
|
|
219
|
+
], StDrawer.prototype, "placement", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
property({ type: Boolean, attribute: 'mobile-only', reflect: true })
|
|
222
|
+
], StDrawer.prototype, "mobileOnly", void 0);
|
|
223
|
+
StDrawer = __decorate([
|
|
224
|
+
customElement('st-drawer')
|
|
225
|
+
], StDrawer);
|
|
226
|
+
export { StDrawer };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class StField extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface HTMLElementTagNameMap {
|
|
8
|
+
'st-field': StField;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,qBACa,OAAQ,SAAQ,UAAU;IACrC,MAAM,CAAC,MAAM,4BAWX;IAEF,MAAM,yCAIL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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, } from 'lit/decorators.js';
|
|
9
|
+
import { resetStyles } from '../../styles/reset.js';
|
|
10
|
+
let StField = class StField extends LitElement {
|
|
11
|
+
render() {
|
|
12
|
+
return html `
|
|
13
|
+
<slot></slot>
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
StField.styles = [
|
|
18
|
+
resetStyles,
|
|
19
|
+
css `
|
|
20
|
+
:host {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: var(--st-spacing-xs, 0.25rem);
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin-bottom: var(--st-spacing-md, 0.25rem);
|
|
26
|
+
}
|
|
27
|
+
`
|
|
28
|
+
];
|
|
29
|
+
StField = __decorate([
|
|
30
|
+
customElement('st-field')
|
|
31
|
+
], StField);
|
|
32
|
+
export { StField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/footer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAI1C,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,4BAuCX;IAEF,MAAM,yCASL;CACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 } from "lit/decorators.js";
|
|
9
|
+
import { resetStyles } from "../../styles/reset";
|
|
10
|
+
let StFooter = class StFooter extends LitElement {
|
|
11
|
+
render() {
|
|
12
|
+
return html `
|
|
13
|
+
<footer>
|
|
14
|
+
<slot></slot>
|
|
15
|
+
<div class="links">
|
|
16
|
+
<span>© ${new Date().getFullYear()} Sondor.</span>
|
|
17
|
+
</div>
|
|
18
|
+
</footer>
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
StFooter.styles = [
|
|
23
|
+
resetStyles,
|
|
24
|
+
css `
|
|
25
|
+
:host {
|
|
26
|
+
display: block;
|
|
27
|
+
border-top: 1px solid var(--st-color-border);
|
|
28
|
+
background-color: var(--st-color-surface);
|
|
29
|
+
padding: var(--st-spacing-lg, 2rem) 0;
|
|
30
|
+
margin-top: auto; /* Pushes footer to the bottom of the page */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
footer {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--st-spacing-md, 1rem);
|
|
38
|
+
max-width: 1200px;
|
|
39
|
+
margin: 0 auto;
|
|
40
|
+
padding: 0 var(--st-spacing-md, 1rem);
|
|
41
|
+
color: var(--st-color-text-muted);
|
|
42
|
+
font-size: 0.875rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Wrapper for footer links */
|
|
46
|
+
.links {
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: var(--st-spacing-md, 1rem);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::slotted(a) {
|
|
52
|
+
color: var(--st-color-text-muted);
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
transition: color 0.2s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
::slotted(a:hover) {
|
|
58
|
+
color: var(--st-color-primary);
|
|
59
|
+
}
|
|
60
|
+
`,
|
|
61
|
+
];
|
|
62
|
+
StFooter = __decorate([
|
|
63
|
+
customElement("st-footer")
|
|
64
|
+
], StFooter);
|
|
65
|
+
export { StFooter };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare class StFormStep extends LitElement {
|
|
3
|
+
title: string;
|
|
4
|
+
active: boolean;
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
"st-form-step": StFormStep;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=form-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-step.d.ts","sourceRoot":"","sources":["../../../src/components/form/form-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAI1C,qBACa,UAAW,SAAQ,UAAU;IACd,KAAK,SAAM;IACK,MAAM,UAAS;IAEzD,MAAM,CAAC,MAAM,4BAWX;IAEF,MAAM,yCAEL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,UAAU,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 } from "lit/decorators.js";
|
|
9
|
+
import { resetStyles } from "../../styles/reset.js";
|
|
10
|
+
let StFormStep = class StFormStep extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.title = "";
|
|
14
|
+
this.active = false;
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return html `<slot></slot>`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
StFormStep.styles = [
|
|
21
|
+
resetStyles,
|
|
22
|
+
css `
|
|
23
|
+
:host {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
/* Hide inactive steps completely from the layout and accessibility tree */
|
|
27
|
+
:host(:not([active])) {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
`,
|
|
31
|
+
];
|
|
32
|
+
__decorate([
|
|
33
|
+
property({ type: String })
|
|
34
|
+
], StFormStep.prototype, "title", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
property({ type: Boolean, reflect: true })
|
|
37
|
+
], StFormStep.prototype, "active", void 0);
|
|
38
|
+
StFormStep = __decorate([
|
|
39
|
+
customElement("st-form-step")
|
|
40
|
+
], StFormStep);
|
|
41
|
+
export { StFormStep };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export type FormLayout = "vertical" | "horizontal" | "inline";
|
|
3
|
+
export declare class StForm extends LitElement {
|
|
4
|
+
layout: FormLayout;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
error: string;
|
|
7
|
+
private _currentStepIndex;
|
|
8
|
+
private _stepElements;
|
|
9
|
+
private _formEl;
|
|
10
|
+
static styles: import("lit").CSSResult[];
|
|
11
|
+
private _handleSlotChange;
|
|
12
|
+
private _updateStepVisibility;
|
|
13
|
+
private _validateCurrentContext;
|
|
14
|
+
private _triggerSubmission;
|
|
15
|
+
private _prevStep;
|
|
16
|
+
private _extractFormData;
|
|
17
|
+
private _handleSubmit;
|
|
18
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
"st-form": StForm;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/form/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAK1C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9D,qBACa,MAAO,SAAQ,UAAU;IACK,MAAM,EAAE,UAAU,CAAc;IAC/B,OAAO,UAAS;IAChC,KAAK,SAAM;IAE5B,OAAO,CAAC,iBAAiB,CAAK;IAGvC,OAAO,CAAC,aAAa,CAAgB;IAEtB,OAAO,CAAC,OAAO,CAAmB;IAEjD,MAAM,CAAC,MAAM,4BA8IX;IAEF,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,uBAAuB;IA8B/B,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,gBAAgB;IAuCxB,OAAO,CAAC,aAAa;IA4BrB,MAAM,yCAkFL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,SAAS,EAAE,MAAM,CAAC;KACnB;CACF"}
|