snice 1.14.3 → 2.1.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/bin/templates/base/tsconfig.json +5 -4
- package/components/accordion/demo.html +403 -0
- package/components/accordion/snice-accordion-item.css +85 -0
- package/components/accordion/snice-accordion-item.ts +226 -0
- package/components/accordion/snice-accordion.css +31 -0
- package/components/accordion/snice-accordion.ts +182 -0
- package/components/accordion/snice-accordion.types.ts +32 -0
- package/components/alert/demo.html +445 -0
- package/components/alert/snice-alert.css +195 -0
- package/components/alert/snice-alert.ts +141 -0
- package/components/alert/snice-alert.types.ts +12 -0
- package/components/avatar/demo.html +598 -0
- package/components/avatar/snice-avatar.css +131 -0
- package/components/avatar/snice-avatar.ts +136 -0
- package/components/avatar/snice-avatar.types.ts +13 -0
- package/components/badge/demo.html +523 -0
- package/components/badge/snice-badge.css +161 -0
- package/components/badge/snice-badge.ts +117 -0
- package/components/badge/snice-badge.types.ts +16 -0
- package/components/breadcrumbs/demo.html +404 -0
- package/components/breadcrumbs/snice-breadcrumbs.css +133 -0
- package/components/breadcrumbs/snice-breadcrumbs.ts +191 -0
- package/components/breadcrumbs/snice-breadcrumbs.types.ts +26 -0
- package/components/breadcrumbs/snice-crumb.ts +26 -0
- package/components/button/demo.html +42 -0
- package/components/button/snice-button.css +230 -0
- package/components/button/snice-button.ts +169 -0
- package/components/button/snice-button.types.ts +25 -0
- package/components/card/demo.html +525 -0
- package/components/card/snice-card.css +140 -0
- package/components/card/snice-card.ts +102 -0
- package/components/card/snice-card.types.ts +10 -0
- package/components/checkbox/demo.html +253 -0
- package/components/checkbox/snice-checkbox.css +164 -0
- package/components/checkbox/snice-checkbox.ts +223 -0
- package/components/checkbox/snice-checkbox.types.ts +22 -0
- package/components/chip/demo.html +383 -0
- package/components/chip/snice-chip.css +195 -0
- package/components/chip/snice-chip.ts +139 -0
- package/components/chip/snice-chip.types.ts +15 -0
- package/components/date-picker/README.md +233 -0
- package/components/date-picker/demo.html +191 -0
- package/components/date-picker/snice-date-picker.css +330 -0
- package/components/date-picker/snice-date-picker.ts +777 -0
- package/components/date-picker/snice-date-picker.types.ts +83 -0
- package/components/divider/demo.html +233 -0
- package/components/divider/snice-divider.css +155 -0
- package/components/divider/snice-divider.ts +69 -0
- package/components/divider/snice-divider.types.ts +15 -0
- package/components/drawer/demo.html +328 -0
- package/components/drawer/snice-drawer.css +476 -0
- package/components/drawer/snice-drawer.ts +287 -0
- package/components/drawer/snice-drawer.types.ts +17 -0
- package/components/global.d.ts +14 -0
- package/components/input/demo.html +303 -0
- package/components/input/snice-input.css +257 -0
- package/components/input/snice-input.ts +442 -0
- package/components/input/snice-input.types.ts +59 -0
- package/components/input/test.html +77 -0
- package/components/layout/README.md +260 -0
- package/components/layout/demo.html +538 -0
- package/components/layout/snice-layout-blog.css +129 -0
- package/components/layout/snice-layout-blog.ts +48 -0
- package/components/layout/snice-layout-card.css +104 -0
- package/components/layout/snice-layout-card.ts +35 -0
- package/components/layout/snice-layout-centered.css +51 -0
- package/components/layout/snice-layout-centered.ts +22 -0
- package/components/layout/snice-layout-dashboard.css +98 -0
- package/components/layout/snice-layout-dashboard.ts +45 -0
- package/components/layout/snice-layout-fullscreen.css +72 -0
- package/components/layout/snice-layout-fullscreen.ts +34 -0
- package/components/layout/snice-layout-landing.css +92 -0
- package/components/layout/snice-layout-landing.ts +47 -0
- package/components/layout/snice-layout-minimal.css +16 -0
- package/components/layout/snice-layout-minimal.ts +19 -0
- package/components/layout/snice-layout-sidebar.css +117 -0
- package/components/layout/snice-layout-sidebar.ts +48 -0
- package/components/layout/snice-layout-split.css +103 -0
- package/components/layout/snice-layout-split.ts +29 -0
- package/components/layout/snice-layout.css +72 -0
- package/components/layout/snice-layout.ts +35 -0
- package/components/layout/snice-layout.types.ts +5 -0
- package/components/login/demo-auth-controller.ts +185 -0
- package/components/login/demo.html +470 -0
- package/components/login/snice-login.css +204 -0
- package/components/login/snice-login.ts +337 -0
- package/components/login/snice-login.types.ts +34 -0
- package/components/modal/demo.html +291 -0
- package/components/modal/snice-modal.css +203 -0
- package/components/modal/snice-modal.ts +233 -0
- package/components/modal/snice-modal.types.ts +21 -0
- package/components/pagination/demo.html +395 -0
- package/components/pagination/snice-pagination.ts +333 -0
- package/components/pagination/snice-pagination.types.ts +21 -0
- package/components/progress/demo.html +510 -0
- package/components/progress/snice-progress.css +267 -0
- package/components/progress/snice-progress.ts +247 -0
- package/components/progress/snice-progress.types.ts +19 -0
- package/components/radio/demo.html +287 -0
- package/components/radio/snice-radio.css +171 -0
- package/components/radio/snice-radio.ts +218 -0
- package/components/radio/snice-radio.types.ts +21 -0
- package/components/select/demo.html +511 -0
- package/components/select/snice-option.ts +52 -0
- package/components/select/snice-option.types.ts +14 -0
- package/components/select/snice-select.css +392 -0
- package/components/select/snice-select.ts +796 -0
- package/components/select/snice-select.types.ts +55 -0
- package/components/skeleton/demo.html +514 -0
- package/components/skeleton/snice-skeleton.css +109 -0
- package/components/skeleton/snice-skeleton.ts +126 -0
- package/components/skeleton/snice-skeleton.types.ts +11 -0
- package/components/switch/demo.html +284 -0
- package/components/switch/snice-switch.css +221 -0
- package/components/switch/snice-switch.ts +229 -0
- package/components/switch/snice-switch.types.ts +23 -0
- package/components/symbols.ts +23 -0
- package/components/table/demo-table-controller.ts +100 -0
- package/components/table/demo.html +480 -0
- package/components/table/snice-cell-boolean.ts +112 -0
- package/components/table/snice-cell-date.ts +210 -0
- package/components/table/snice-cell-duration.ts +91 -0
- package/components/table/snice-cell-filesize.ts +90 -0
- package/components/table/snice-cell-number.ts +165 -0
- package/components/table/snice-cell-progress.ts +83 -0
- package/components/table/snice-cell-rating.ts +82 -0
- package/components/table/snice-cell-sparkline.ts +253 -0
- package/components/table/snice-cell-text.ts +125 -0
- package/components/table/snice-cell.css +296 -0
- package/components/table/snice-cell.ts +473 -0
- package/components/table/snice-column.ts +353 -0
- package/components/table/snice-header.css +243 -0
- package/components/table/snice-header.ts +261 -0
- package/components/table/snice-progress.ts +66 -0
- package/components/table/snice-rating.ts +45 -0
- package/components/table/snice-row.css +255 -0
- package/components/table/snice-row.ts +331 -0
- package/components/table/snice-table.css +241 -0
- package/components/table/snice-table.ts +737 -0
- package/components/table/snice-table.types.ts +158 -0
- package/components/tabs/demo.html +487 -0
- package/components/tabs/snice-tab-panel.css +264 -0
- package/components/tabs/snice-tab-panel.ts +47 -0
- package/components/tabs/snice-tab.css +96 -0
- package/components/tabs/snice-tab.ts +65 -0
- package/components/tabs/snice-tabs.css +189 -0
- package/components/tabs/snice-tabs.ts +332 -0
- package/components/tabs/snice-tabs.types.ts +28 -0
- package/components/theme/theme.css +234 -0
- package/components/toast/demo.html +329 -0
- package/components/toast/snice-toast-container.ts +256 -0
- package/components/toast/snice-toast.css +213 -0
- package/components/toast/snice-toast.ts +276 -0
- package/components/toast/snice-toast.types.ts +35 -0
- package/components/tooltip/demo.html +350 -0
- package/components/tooltip/snice-tooltip-portal.css +79 -0
- package/components/tooltip/snice-tooltip.css +117 -0
- package/components/tooltip/snice-tooltip.ts +612 -0
- package/components/tooltip/snice-tooltip.types.ts +32 -0
- package/components/transitions.ts +94 -0
- package/components/tsconfig.json +18 -0
- package/dist/index.cjs +441 -329
- package/dist/index.cjs.map +1 -1
- package/dist/index.cjs.min.map +1 -1
- package/dist/index.esm.js +441 -329
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +3 -3
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +441 -329
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +3 -3
- package/dist/index.iife.min.js.map +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.esm.js +1 -1
- package/dist/types/controller.d.ts +1 -1
- package/dist/types/element.d.ts +10 -10
- package/dist/types/events.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/request-response.d.ts +2 -3
- package/dist/types/router.d.ts +1 -1
- package/package.json +9 -3
- package/dist/index.cjs.min +0 -15
- package/dist/symbols.cjs +0 -103
- package/dist/transitions.cjs +0 -219
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { element } from 'snice';
|
|
2
|
+
import css from './snice-layout-blog.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-blog')
|
|
5
|
+
export class SniceLayoutBlog extends HTMLElement {
|
|
6
|
+
html() {
|
|
7
|
+
return /*html*/`
|
|
8
|
+
<div class="layout">
|
|
9
|
+
<header class="header">
|
|
10
|
+
<div class="container">
|
|
11
|
+
<div class="brand">
|
|
12
|
+
<slot name="brand">
|
|
13
|
+
<h1>Blog</h1>
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
<nav class="nav">
|
|
17
|
+
<slot name="nav"></slot>
|
|
18
|
+
</nav>
|
|
19
|
+
</div>
|
|
20
|
+
</header>
|
|
21
|
+
|
|
22
|
+
<main class="main">
|
|
23
|
+
<div class="container">
|
|
24
|
+
<div class="content-area">
|
|
25
|
+
<article class="article">
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</article>
|
|
28
|
+
|
|
29
|
+
<aside class="sidebar">
|
|
30
|
+
<slot name="sidebar"></slot>
|
|
31
|
+
</aside>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</main>
|
|
35
|
+
|
|
36
|
+
<footer class="footer">
|
|
37
|
+
<div class="container">
|
|
38
|
+
<slot name="footer"></slot>
|
|
39
|
+
</div>
|
|
40
|
+
</footer>
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
css() {
|
|
46
|
+
return css;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* Card Grid Layout */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-rows: auto 1fr auto;
|
|
11
|
+
background: var(--snice-color-background-secondary, #f8fafc);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.header {
|
|
15
|
+
background: var(--snice-color-background, white);
|
|
16
|
+
border-bottom: 1px solid var(--snice-color-border, #d1d5db);
|
|
17
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.main {
|
|
21
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.grid {
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-columns: repeat(3, 1fr);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Column variants */
|
|
30
|
+
:host([columns="1"]) .grid {
|
|
31
|
+
grid-template-columns: 1fr;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([columns="2"]) .grid {
|
|
35
|
+
grid-template-columns: repeat(2, 1fr);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([columns="3"]) .grid {
|
|
39
|
+
grid-template-columns: repeat(3, 1fr);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host([columns="4"]) .grid {
|
|
43
|
+
grid-template-columns: repeat(4, 1fr);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([columns="6"]) .grid {
|
|
47
|
+
grid-template-columns: repeat(6, 1fr);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Gap variants */
|
|
51
|
+
:host([gap="sm"]) .grid {
|
|
52
|
+
gap: var(--snice-spacing-sm, 0.75rem);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:host([gap="md"]) .grid,
|
|
56
|
+
:host(:not([gap])) .grid {
|
|
57
|
+
gap: var(--snice-spacing-md, 1rem);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([gap="lg"]) .grid {
|
|
61
|
+
gap: var(--snice-spacing-lg, 2rem);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([gap="xl"]) .grid {
|
|
65
|
+
gap: var(--snice-spacing-xl, 3rem);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.footer {
|
|
69
|
+
background: var(--snice-color-background, white);
|
|
70
|
+
border-top: 1px solid var(--snice-color-border, #d1d5db);
|
|
71
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Auto-responsive grid */
|
|
75
|
+
@media (max-width: 1200px) {
|
|
76
|
+
:host([columns="6"]) .grid {
|
|
77
|
+
grid-template-columns: repeat(4, 1fr);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (max-width: 992px) {
|
|
82
|
+
:host([columns="4"]) .grid,
|
|
83
|
+
:host([columns="6"]) .grid {
|
|
84
|
+
grid-template-columns: repeat(3, 1fr);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (max-width: 768px) {
|
|
89
|
+
:host([columns="3"]) .grid,
|
|
90
|
+
:host([columns="4"]) .grid,
|
|
91
|
+
:host([columns="6"]) .grid {
|
|
92
|
+
grid-template-columns: repeat(2, 1fr);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media (max-width: 480px) {
|
|
97
|
+
.grid {
|
|
98
|
+
grid-template-columns: 1fr !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.main {
|
|
102
|
+
padding: var(--snice-spacing-md, 1rem);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { element, property } from 'snice';
|
|
2
|
+
import css from './snice-layout-card.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-card')
|
|
5
|
+
export class SniceLayoutCard extends HTMLElement {
|
|
6
|
+
@property({ reflect: true })
|
|
7
|
+
columns: '1' | '2' | '3' | '4' | '6' = '3';
|
|
8
|
+
|
|
9
|
+
@property({ reflect: true })
|
|
10
|
+
gap: 'sm' | 'md' | 'lg' | 'xl' = 'md';
|
|
11
|
+
|
|
12
|
+
html() {
|
|
13
|
+
return /*html*/`
|
|
14
|
+
<div class="layout">
|
|
15
|
+
<header class="header">
|
|
16
|
+
<slot name="header"></slot>
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<main class="main">
|
|
20
|
+
<div class="grid">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
</main>
|
|
24
|
+
|
|
25
|
+
<footer class="footer">
|
|
26
|
+
<slot name="footer"></slot>
|
|
27
|
+
</footer>
|
|
28
|
+
</div>
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
css() {
|
|
33
|
+
return css;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* Centered Layout - For forms, auth pages, etc */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
13
|
+
background: var(--snice-color-background-secondary, #f8fafc);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.container {
|
|
17
|
+
width: 100%;
|
|
18
|
+
max-width: 400px;
|
|
19
|
+
background: var(--snice-color-background, white);
|
|
20
|
+
border-radius: var(--snice-border-radius-lg, 8px);
|
|
21
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
22
|
+
padding: var(--snice-spacing-xl, 3rem);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Width variants */
|
|
26
|
+
:host([width="sm"]) .container {
|
|
27
|
+
max-width: 320px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([width="md"]) .container {
|
|
31
|
+
max-width: 400px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host([width="lg"]) .container {
|
|
35
|
+
max-width: 500px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host([width="xl"]) .container {
|
|
39
|
+
max-width: 600px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Mobile responsive */
|
|
43
|
+
@media (max-width: 480px) {
|
|
44
|
+
.layout {
|
|
45
|
+
padding: var(--snice-spacing-md, 1rem);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.container {
|
|
49
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { element, property } from 'snice';
|
|
2
|
+
import css from './snice-layout-centered.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-centered')
|
|
5
|
+
export class SniceLayoutCentered extends HTMLElement {
|
|
6
|
+
@property({ reflect: true })
|
|
7
|
+
width: 'sm' | 'md' | 'lg' | 'xl' = 'md';
|
|
8
|
+
|
|
9
|
+
html() {
|
|
10
|
+
return /*html*/`
|
|
11
|
+
<div class="layout">
|
|
12
|
+
<div class="container">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
css() {
|
|
20
|
+
return css;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* Dashboard Layout - Complex grid with multiple areas */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-areas:
|
|
10
|
+
"header header header"
|
|
11
|
+
"nav nav nav"
|
|
12
|
+
"sidebar main right-sidebar";
|
|
13
|
+
grid-template-rows: auto auto 1fr;
|
|
14
|
+
grid-template-columns: 250px 1fr 250px;
|
|
15
|
+
min-height: 100vh;
|
|
16
|
+
gap: 1px;
|
|
17
|
+
background: var(--snice-color-border, #d1d5db);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.header {
|
|
21
|
+
grid-area: header;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
padding: var(--snice-spacing-md, 1rem) var(--snice-spacing-lg, 2rem);
|
|
26
|
+
background: var(--snice-color-background, white);
|
|
27
|
+
border-bottom: 1px solid var(--snice-color-border, #d1d5db);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.header-start h1 {
|
|
31
|
+
margin: 0;
|
|
32
|
+
font-size: var(--snice-font-size-xl, 1.5rem);
|
|
33
|
+
font-weight: var(--snice-font-weight-semibold, 600);
|
|
34
|
+
color: var(--snice-color-text, #374151);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.header-center {
|
|
38
|
+
flex: 1;
|
|
39
|
+
max-width: 400px;
|
|
40
|
+
margin: 0 var(--snice-spacing-lg, 2rem);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.nav {
|
|
44
|
+
grid-area: nav;
|
|
45
|
+
padding: var(--snice-spacing-md, 1rem) var(--snice-spacing-lg, 2rem);
|
|
46
|
+
background: var(--snice-color-background, white);
|
|
47
|
+
border-bottom: 1px solid var(--snice-color-border, #d1d5db);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.sidebar {
|
|
51
|
+
grid-area: sidebar;
|
|
52
|
+
background: var(--snice-color-background, white);
|
|
53
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.main {
|
|
58
|
+
grid-area: main;
|
|
59
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
60
|
+
background: var(--snice-color-background-secondary, #f8fafc);
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.right-sidebar {
|
|
65
|
+
grid-area: right-sidebar;
|
|
66
|
+
background: var(--snice-color-background, white);
|
|
67
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Responsive */
|
|
72
|
+
@media (max-width: 1024px) {
|
|
73
|
+
.layout {
|
|
74
|
+
grid-template-areas:
|
|
75
|
+
"header header"
|
|
76
|
+
"nav nav"
|
|
77
|
+
"main main";
|
|
78
|
+
grid-template-columns: 1fr;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.sidebar,
|
|
82
|
+
.right-sidebar {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media (max-width: 768px) {
|
|
88
|
+
.header {
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
gap: var(--snice-spacing-md, 1rem);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.header-center {
|
|
94
|
+
margin: 0;
|
|
95
|
+
max-width: none;
|
|
96
|
+
width: 100%;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { element } from 'snice';
|
|
2
|
+
import css from './snice-layout-dashboard.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-dashboard')
|
|
5
|
+
export class SniceLayoutDashboard extends HTMLElement {
|
|
6
|
+
html() {
|
|
7
|
+
return /*html*/`
|
|
8
|
+
<div class="layout">
|
|
9
|
+
<header class="header">
|
|
10
|
+
<div class="header-start">
|
|
11
|
+
<slot name="brand">
|
|
12
|
+
<h1>Dashboard</h1>
|
|
13
|
+
</slot>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="header-center">
|
|
16
|
+
<slot name="search"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="header-end">
|
|
19
|
+
<slot name="user"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
</header>
|
|
22
|
+
|
|
23
|
+
<nav class="nav">
|
|
24
|
+
<slot name="nav"></slot>
|
|
25
|
+
</nav>
|
|
26
|
+
|
|
27
|
+
<aside class="sidebar">
|
|
28
|
+
<slot name="sidebar"></slot>
|
|
29
|
+
</aside>
|
|
30
|
+
|
|
31
|
+
<main class="main">
|
|
32
|
+
<slot></slot>
|
|
33
|
+
</main>
|
|
34
|
+
|
|
35
|
+
<aside class="right-sidebar">
|
|
36
|
+
<slot name="right-sidebar"></slot>
|
|
37
|
+
</aside>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
css() {
|
|
43
|
+
return css;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* Fullscreen Layout - For presentations, media viewers, etc */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 100vw;
|
|
10
|
+
height: 100vh;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
background: var(--snice-color-background-dark, #111827);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.background {
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.overlay {
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
z-index: 2;
|
|
25
|
+
background: rgba(0, 0, 0, 0.5);
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transition: opacity var(--snice-transition-normal, 0.25s) ease;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host([overlay]) .overlay {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
pointer-events: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.content {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 0;
|
|
39
|
+
z-index: 3;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.controls {
|
|
47
|
+
position: absolute;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
right: 0;
|
|
51
|
+
z-index: 4;
|
|
52
|
+
padding: var(--snice-spacing-lg, 2rem);
|
|
53
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
transition: transform var(--snice-transition-normal, 0.25s) ease;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host(:hover) .controls {
|
|
59
|
+
transform: translateY(0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Media queries for mobile */
|
|
63
|
+
@media (max-width: 768px) {
|
|
64
|
+
.controls {
|
|
65
|
+
transform: translateY(0);
|
|
66
|
+
background: rgba(0, 0, 0, 0.8);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.content {
|
|
70
|
+
padding: var(--snice-spacing-md, 1rem);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { element, property } from 'snice';
|
|
2
|
+
import css from './snice-layout-fullscreen.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-fullscreen')
|
|
5
|
+
export class SniceLayoutFullscreen extends HTMLElement {
|
|
6
|
+
@property({ type: Boolean, reflect: true })
|
|
7
|
+
overlay = false;
|
|
8
|
+
|
|
9
|
+
html() {
|
|
10
|
+
return /*html*/`
|
|
11
|
+
<div class="layout">
|
|
12
|
+
<div class="background">
|
|
13
|
+
<slot name="background"></slot>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="overlay">
|
|
17
|
+
<slot name="overlay"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div class="content">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div class="controls">
|
|
25
|
+
<slot name="controls"></slot>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
css() {
|
|
32
|
+
return css;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* Landing Page Layout */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.container {
|
|
14
|
+
max-width: 1200px;
|
|
15
|
+
margin: 0 auto;
|
|
16
|
+
padding: 0 var(--snice-spacing-lg, 2rem);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.header {
|
|
20
|
+
background: var(--snice-color-background, white);
|
|
21
|
+
border-bottom: 1px solid var(--snice-color-border, #d1d5db);
|
|
22
|
+
position: sticky;
|
|
23
|
+
top: 0;
|
|
24
|
+
z-index: 100;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.header .container {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: space-between;
|
|
31
|
+
padding-top: var(--snice-spacing-md, 1rem);
|
|
32
|
+
padding-bottom: var(--snice-spacing-md, 1rem);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.brand h1 {
|
|
36
|
+
margin: 0;
|
|
37
|
+
font-size: var(--snice-font-size-xl, 1.5rem);
|
|
38
|
+
font-weight: var(--snice-font-weight-bold, 700);
|
|
39
|
+
color: var(--snice-color-text, #374151);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nav {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: var(--snice-spacing-lg, 2rem);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.nav ::slotted(a) {
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
color: var(--snice-color-text-secondary, #6b7280);
|
|
50
|
+
font-weight: var(--snice-font-weight-medium, 500);
|
|
51
|
+
transition: color var(--snice-transition-fast, 0.15s) ease;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.nav ::slotted(a:hover) {
|
|
55
|
+
color: var(--snice-color-primary, #3b82f6);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.main {
|
|
59
|
+
flex: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hero {
|
|
63
|
+
background: var(--snice-color-background-secondary, #f8fafc);
|
|
64
|
+
padding: var(--snice-spacing-2xl, 4rem) 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.content {
|
|
68
|
+
background: var(--snice-color-background, white);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.footer {
|
|
72
|
+
background: var(--snice-color-background-tertiary, #f1f5f9);
|
|
73
|
+
border-top: 1px solid var(--snice-color-border, #d1d5db);
|
|
74
|
+
padding: var(--snice-spacing-xl, 3rem) 0;
|
|
75
|
+
margin-top: auto;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Mobile responsive */
|
|
79
|
+
@media (max-width: 768px) {
|
|
80
|
+
.header .container {
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
gap: var(--snice-spacing-md, 1rem);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.nav {
|
|
86
|
+
gap: var(--snice-spacing-md, 1rem);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.hero {
|
|
90
|
+
padding: var(--snice-spacing-xl, 3rem) 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { element } from 'snice';
|
|
2
|
+
import css from './snice-layout-landing.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-landing')
|
|
5
|
+
export class SniceLayoutLanding extends HTMLElement {
|
|
6
|
+
html() {
|
|
7
|
+
return /*html*/`
|
|
8
|
+
<div class="layout">
|
|
9
|
+
<header class="header">
|
|
10
|
+
<div class="container">
|
|
11
|
+
<div class="brand">
|
|
12
|
+
<slot name="brand">
|
|
13
|
+
<h1>Brand</h1>
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
<nav class="nav">
|
|
17
|
+
<slot name="nav"></slot>
|
|
18
|
+
</nav>
|
|
19
|
+
<div class="cta">
|
|
20
|
+
<slot name="cta"></slot>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</header>
|
|
24
|
+
|
|
25
|
+
<main class="main">
|
|
26
|
+
<section class="hero">
|
|
27
|
+
<slot name="hero"></slot>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<div class="content">
|
|
31
|
+
<slot></slot>
|
|
32
|
+
</div>
|
|
33
|
+
</main>
|
|
34
|
+
|
|
35
|
+
<footer class="footer">
|
|
36
|
+
<div class="container">
|
|
37
|
+
<slot name="footer"></slot>
|
|
38
|
+
</div>
|
|
39
|
+
</footer>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
css() {
|
|
45
|
+
return css;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Minimal Layout - Just content */
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.layout {
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.main {
|
|
14
|
+
flex: 1;
|
|
15
|
+
background: var(--snice-color-background, white);
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { element } from 'snice';
|
|
2
|
+
import css from './snice-layout-minimal.css?inline';
|
|
3
|
+
|
|
4
|
+
@element('snice-layout-minimal')
|
|
5
|
+
export class SniceLayoutMinimal extends HTMLElement {
|
|
6
|
+
html() {
|
|
7
|
+
return /*html*/`
|
|
8
|
+
<div class="layout">
|
|
9
|
+
<main class="main">
|
|
10
|
+
<slot></slot>
|
|
11
|
+
</main>
|
|
12
|
+
</div>
|
|
13
|
+
`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
css() {
|
|
17
|
+
return css;
|
|
18
|
+
}
|
|
19
|
+
}
|