@sondor-technology/sondor-components 1.0.0 → 1.0.1-develop.2
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 +116 -0
- package/dist/components/icon/icon-paths.d.ts.map +1 -0
- package/dist/components/icon/icon-paths.js +121 -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 +9 -0
- package/dist/components/vertical-nav/vertical-nav-group.d.ts.map +1 -0
- package/dist/components/vertical-nav/vertical-nav-group.js +111 -0
- package/dist/components/vertical-nav/vertical-nav-item.d.ts +8 -0
- package/dist/components/vertical-nav/vertical-nav-item.d.ts.map +1 -0
- package/dist/components/vertical-nav/vertical-nav-item.js +65 -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 +3 -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 +124 -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 +96 -96
- package/src/components/vertical-nav/vertical-nav-item.ts +49 -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
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Sondor Components
|
|
2
|
+
The Sondor Copmonnents is a simple, light weight web-component library. All components follow industry standards, building on top of native
|
|
3
|
+
functionality while providing an out of the box professional modern look.
|
|
4
|
+
|
|
5
|
+
## Documentation
|
|
6
|
+
For detailed documentation on each component within the library, visit the docs site here:
|
|
7
|
+
|
|
8
|
+
[Sondor Components Documentation](https://docs.sondor-technology.dev)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type AlertColor = 'info' | 'success' | 'warning' | 'error';
|
|
3
|
+
export declare class StAlert extends LitElement {
|
|
4
|
+
color: AlertColor;
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'st-alert': StAlert;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAElE,qBACa,OAAQ,SAAQ,UAAU;IACM,KAAK,EAAE,UAAU,CAAU;IAEtE,MAAM,CAAC,MAAM,4BAwEX;IAEF,MAAM,yCASL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
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 StAlert = class StAlert extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.color = 'info';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return html `
|
|
17
|
+
<div class="icon-container">
|
|
18
|
+
<slot name="icon"></slot>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="content">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
StAlert.styles = [
|
|
27
|
+
resetStyles,
|
|
28
|
+
css `
|
|
29
|
+
:host {
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: var(--st-spacing-md);
|
|
32
|
+
padding: var(--st-spacing-md);
|
|
33
|
+
border-radius: 6px;
|
|
34
|
+
border: 1px solid transparent;
|
|
35
|
+
font-size: var(--st-font-size-base);
|
|
36
|
+
line-height: 1.5;
|
|
37
|
+
|
|
38
|
+
/* Default Palette */
|
|
39
|
+
--_alert-bg: var(--st-color-info-bg);
|
|
40
|
+
--_alert-border: var(--st-color-info);
|
|
41
|
+
--_alert-text: var(--st-color-text);
|
|
42
|
+
--_alert-icon: var(--st-color-info);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* State Modifiers */
|
|
46
|
+
:host([color="error"]) {
|
|
47
|
+
--_alert-bg: var(--st-color-error-bg);
|
|
48
|
+
--_alert-border: var(--st-color-error);
|
|
49
|
+
--_alert-icon: var(--st-color-error);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([color="success"]) {
|
|
53
|
+
--_alert-bg: var(--st-color-success-bg);
|
|
54
|
+
--_alert-border: var(--st-color-success);
|
|
55
|
+
--_alert-icon: var(--st-color-success);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([color="warning"]) {
|
|
59
|
+
--_alert-bg: var(--st-color-warning-bg);
|
|
60
|
+
--_alert-border: var(--st-color-warning);
|
|
61
|
+
--_alert-icon: var(--st-color-warning);
|
|
62
|
+
/* Amber backgrounds often need forced dark text in light mode, but your tokens handle this */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Apply the variables */
|
|
66
|
+
:host {
|
|
67
|
+
background-color: var(--_alert-bg);
|
|
68
|
+
border-color: var(--_alert-border);
|
|
69
|
+
color: var(--_alert-text);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Icon Slot */
|
|
73
|
+
.icon-container {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
color: var(--_alert-icon);
|
|
77
|
+
/* Align icon with the first line of text */
|
|
78
|
+
margin-top: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
::slotted([slot="icon"]) {
|
|
82
|
+
width: 1.25rem;
|
|
83
|
+
height: 1.25rem;
|
|
84
|
+
fill: none;
|
|
85
|
+
stroke: currentColor;
|
|
86
|
+
stroke-width: 2;
|
|
87
|
+
stroke-linecap: round;
|
|
88
|
+
stroke-linejoin: round;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.content {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
gap: var(--st-spacing-xs);
|
|
95
|
+
flex: 1;
|
|
96
|
+
}
|
|
97
|
+
`
|
|
98
|
+
];
|
|
99
|
+
__decorate([
|
|
100
|
+
property({ type: String, reflect: true })
|
|
101
|
+
], StAlert.prototype, "color", void 0);
|
|
102
|
+
StAlert = __decorate([
|
|
103
|
+
customElement('st-alert')
|
|
104
|
+
], StAlert);
|
|
105
|
+
export { StAlert };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type BadgeColor = 'primary' | 'neutral' | 'success' | 'warning' | 'error' | 'info';
|
|
3
|
+
export declare class StBadge extends LitElement {
|
|
4
|
+
color: BadgeColor;
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
7
|
+
}
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
'st-badge': StBadge;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAE1F,qBACa,OAAQ,SAAQ,UAAU;IACM,KAAK,EAAE,UAAU,CAAa;IAEzE,MAAM,CAAC,MAAM,4BAwEX;IAEF,MAAM,yCAKL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 StBadge = class StBadge extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.color = 'neutral';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return html `
|
|
17
|
+
<slot name="icon"></slot>
|
|
18
|
+
<slot></slot>
|
|
19
|
+
`;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
StBadge.styles = [
|
|
23
|
+
resetStyles,
|
|
24
|
+
css `
|
|
25
|
+
:host {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
padding: 0.125rem 0.5rem; /* 2px 8px */
|
|
30
|
+
font-size: var(--st-font-size-xs);
|
|
31
|
+
font-weight: var(--st-font-weight-medium);
|
|
32
|
+
border-radius: 999px; /* Pill shape */
|
|
33
|
+
line-height: 1.25;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
|
|
36
|
+
/* Base / Neutral Palette */
|
|
37
|
+
--_badge-bg: var(--st-color-surface);
|
|
38
|
+
--_badge-text: var(--st-color-text-muted);
|
|
39
|
+
--_badge-border: var(--st-color-border);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Base Application */
|
|
43
|
+
:host {
|
|
44
|
+
background-color: var(--_badge-bg);
|
|
45
|
+
color: var(--_badge-text);
|
|
46
|
+
border: 1px solid var(--_badge-border);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ==========================================================
|
|
50
|
+
Soft Semantic Variants
|
|
51
|
+
========================================================== */
|
|
52
|
+
:host([color="primary"]) {
|
|
53
|
+
--_badge-bg: var(--st-color-primary);
|
|
54
|
+
--_badge-text: var(--st-white);
|
|
55
|
+
--_badge-border: transparent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([color="success"]) {
|
|
59
|
+
--_badge-bg: var(--st-color-success-bg);
|
|
60
|
+
--_badge-text: var(--st-color-success);
|
|
61
|
+
--_badge-border: transparent;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([color="warning"]) {
|
|
65
|
+
--_badge-bg: var(--st-color-warning-bg);
|
|
66
|
+
--_badge-text: var(--st-color-warning);
|
|
67
|
+
--_badge-border: transparent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([color="error"]) {
|
|
71
|
+
--_badge-bg: var(--st-color-error-bg);
|
|
72
|
+
--_badge-text: var(--st-color-error);
|
|
73
|
+
--_badge-border: transparent;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([color="info"]) {
|
|
77
|
+
--_badge-bg: var(--st-color-info-bg);
|
|
78
|
+
--_badge-text: var(--st-color-info);
|
|
79
|
+
--_badge-border: transparent;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Optional icon support inside the badge */
|
|
83
|
+
::slotted(svg) {
|
|
84
|
+
width: 0.75rem;
|
|
85
|
+
height: 0.75rem;
|
|
86
|
+
margin-right: 0.25rem;
|
|
87
|
+
fill: none;
|
|
88
|
+
stroke: currentColor;
|
|
89
|
+
stroke-width: 2;
|
|
90
|
+
stroke-linecap: round;
|
|
91
|
+
stroke-linejoin: round;
|
|
92
|
+
}
|
|
93
|
+
`
|
|
94
|
+
];
|
|
95
|
+
__decorate([
|
|
96
|
+
property({ type: String, reflect: true })
|
|
97
|
+
], StBadge.prototype, "color", void 0);
|
|
98
|
+
StBadge = __decorate([
|
|
99
|
+
customElement('st-badge')
|
|
100
|
+
], StBadge);
|
|
101
|
+
export { StBadge };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class StBreadcrumb extends LitElement {
|
|
7
|
+
/**
|
|
8
|
+
* Array of breadcrumb items defining the navigation path.
|
|
9
|
+
*/
|
|
10
|
+
items: BreadcrumbItem[];
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'st-breadcrumb': StBreadcrumb;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAI5C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,qBACa,YAAa,SAAQ,UAAU;IAC1C;;OAEG;IACwB,KAAK,EAAE,cAAc,EAAE,CAAM;IAExD,MAAM,CAAC,MAAM,4BAoDX;IAEF,MAAM,yCAqBL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 StBreadcrumb = class StBreadcrumb extends LitElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* Array of breadcrumb items defining the navigation path.
|
|
15
|
+
*/
|
|
16
|
+
this.items = [];
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
if (!this.items || this.items.length === 0) {
|
|
20
|
+
return html ``;
|
|
21
|
+
}
|
|
22
|
+
return html `
|
|
23
|
+
<nav aria-label="Breadcrumb">
|
|
24
|
+
<ol>
|
|
25
|
+
${this.items.map((item, index) => {
|
|
26
|
+
const isLast = index === this.items.length - 1;
|
|
27
|
+
return html `
|
|
28
|
+
<li>
|
|
29
|
+
${!isLast && item.href
|
|
30
|
+
? html `<a href=${item.href}>${item.label}</a>`
|
|
31
|
+
: html `<span>${item.label}</span>`}
|
|
32
|
+
</li>
|
|
33
|
+
`;
|
|
34
|
+
})}
|
|
35
|
+
</ol>
|
|
36
|
+
</nav>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
StBreadcrumb.styles = [
|
|
41
|
+
resetStyles,
|
|
42
|
+
css `
|
|
43
|
+
:host {
|
|
44
|
+
display: block;
|
|
45
|
+
font-family: var(--st-font-family, inherit);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
nav {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
font-size: var(--st-font-size-sm, 0.875rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
ol {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
list-style: none;
|
|
60
|
+
margin: 0;
|
|
61
|
+
padding: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
li {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
color: var(--st-color-text-muted);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
li:not(:last-child)::after {
|
|
71
|
+
content: "/";
|
|
72
|
+
margin: 0 var(--st-spacing-sm, 0.5rem);
|
|
73
|
+
color: var(--st-color-border);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
a {
|
|
77
|
+
color: var(--st-color-text-muted);
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
transition: color 0.2s ease;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
a:hover {
|
|
83
|
+
color: var(--st-color-primary);
|
|
84
|
+
text-decoration: underline;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
li:last-child {
|
|
88
|
+
color: var(--st-color-text);
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
}
|
|
91
|
+
`
|
|
92
|
+
];
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: Array })
|
|
95
|
+
], StBreadcrumb.prototype, "items", void 0);
|
|
96
|
+
StBreadcrumb = __decorate([
|
|
97
|
+
customElement('st-breadcrumb')
|
|
98
|
+
], StBreadcrumb);
|
|
99
|
+
export { StBreadcrumb };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "outline";
|
|
3
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
|
+
export type ButtonColor = "primary" | "error" | "success" | "warning" | "info";
|
|
5
|
+
export declare class StButton extends LitElement {
|
|
6
|
+
href?: string;
|
|
7
|
+
target: "_blank" | "_self";
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
variant: ButtonVariant;
|
|
11
|
+
size: ButtonSize;
|
|
12
|
+
color: ButtonColor;
|
|
13
|
+
active: boolean;
|
|
14
|
+
ariaLabel: string | null;
|
|
15
|
+
static styles: import("lit").CSSResult[];
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
"st-button": StButton;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAqB,MAAM,KAAK,CAAC;AAInD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/E,qBACa,QAAS,SAAQ,UAAU;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAW;IACrB,QAAQ,UAAS;IACjB,OAAO,UAAS;IACjB,OAAO,EAAE,aAAa,CAAa;IACnC,IAAI,EAAE,UAAU,CAAQ;IACxB,KAAK,EAAE,WAAW,CAAa;IAC5B,MAAM,UAAS;IACN,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAErF,MAAM,CAAC,MAAM,4BA2NX;IAEF,MAAM,yCAgCL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|