@buffercreations/levelsui 0.0.0-stage → 0.1.1
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/01. Elements/.gitkeep +0 -0
- package/01. Elements/actions/controls/button/api.json +106 -0
- package/01. Elements/actions/controls/button/button.definition.json +38 -0
- package/01. Elements/actions/controls/button/button.scss +80 -0
- package/01. Elements/actions/controls/button/docs.md +41 -0
- package/01. Elements/actions/controls/button/examples/contexts/code.html +3 -0
- package/01. Elements/actions/controls/button/examples/contexts/preview.html +3 -0
- package/01. Elements/actions/controls/button/examples/icons/code.html +6 -0
- package/01. Elements/actions/controls/button/examples/icons/preview.html +5 -0
- package/01. Elements/actions/controls/button/examples/index.json +51 -0
- package/01. Elements/actions/controls/button/examples/links/code.html +1 -0
- package/01. Elements/actions/controls/button/examples/links/preview.html +3 -0
- package/01. Elements/actions/controls/button/examples/native-default/code.html +9 -0
- package/01. Elements/actions/controls/button/examples/native-default/preview.html +9 -0
- package/01. Elements/actions/controls/button/examples/sizes/code.html +1 -0
- package/01. Elements/actions/controls/button/examples/sizes/preview.html +7 -0
- package/01. Elements/actions/controls/button/examples/states/code.html +1 -0
- package/01. Elements/actions/controls/button/examples/states/preview.html +5 -0
- package/01. Elements/actions/controls/button/examples/treatments/code.html +1 -0
- package/01. Elements/actions/controls/button/examples/treatments/preview.html +5 -0
- package/01. Elements/media/identity/avatar/api.json +126 -0
- package/01. Elements/media/identity/avatar/avatar.definition.json +38 -0
- package/01. Elements/media/identity/avatar/avatar.scss +80 -0
- package/01. Elements/media/identity/avatar/docs.md +64 -0
- package/01. Elements/media/identity/avatar/examples/badges/code.html +10 -0
- package/01. Elements/media/identity/avatar/examples/badges/preview.html +29 -0
- package/01. Elements/media/identity/avatar/examples/fallbacks/code.html +5 -0
- package/01. Elements/media/identity/avatar/examples/fallbacks/preview.html +23 -0
- package/01. Elements/media/identity/avatar/examples/index.json +37 -0
- package/01. Elements/media/identity/avatar/examples/presence/code.html +6 -0
- package/01. Elements/media/identity/avatar/examples/presence/preview.html +26 -0
- package/01. Elements/media/identity/avatar/examples/shapes/code.html +5 -0
- package/01. Elements/media/identity/avatar/examples/shapes/preview.html +17 -0
- package/01. Elements/media/identity/avatar/examples/sizes/code.html +5 -0
- package/01. Elements/media/identity/avatar/examples/sizes/preview.html +32 -0
- package/02. Layouts/.gitkeep +0 -0
- package/02. Layouts/UTILITY-RECIPES.md +55 -0
- package/02. Layouts/application/app-shell/api.json +46 -0
- package/02. Layouts/application/app-shell/app-shell.definition.json +25 -0
- package/02. Layouts/application/app-shell/app-shell.scss +68 -0
- package/02. Layouts/application/app-shell/docs.md +31 -0
- package/02. Layouts/application/app-shell/examples/basic/code.html +17 -0
- package/02. Layouts/application/app-shell/examples/basic/preview.html +17 -0
- package/02. Layouts/application/app-shell/examples/collapsed/code.html +17 -0
- package/02. Layouts/application/app-shell/examples/collapsed/preview.html +17 -0
- package/02. Layouts/application/app-shell/examples/hidden/code.html +17 -0
- package/02. Layouts/application/app-shell/examples/hidden/preview.html +17 -0
- package/02. Layouts/application/app-shell/examples/index.json +23 -0
- package/02. Layouts/composition/stack/api.json +1 -0
- package/02. Layouts/composition/stack/docs.md +5 -0
- package/02. Layouts/composition/stack/examples/basic/code.html +4 -0
- package/02. Layouts/composition/stack/examples/basic/preview.html +4 -0
- package/02. Layouts/composition/stack/examples/index.json +1 -0
- package/02. Layouts/composition/stack/stack.definition.json +7 -0
- package/02. Layouts/composition/stack/stack.html +4 -0
- package/02. Layouts/content/grid/api.json +23 -0
- package/02. Layouts/content/grid/docs.md +19 -0
- package/02. Layouts/content/grid/examples/basic/code.html +5 -0
- package/02. Layouts/content/grid/examples/basic/preview.html +5 -0
- package/02. Layouts/content/grid/examples/index.json +9 -0
- package/02. Layouts/content/grid/grid.definition.json +25 -0
- package/02. Layouts/content/grid/grid.scss +5 -0
- package/02. Layouts/content/split/api.json +23 -0
- package/02. Layouts/content/split/docs.md +18 -0
- package/02. Layouts/content/split/examples/basic/code.html +4 -0
- package/02. Layouts/content/split/examples/basic/preview.html +4 -0
- package/02. Layouts/content/split/examples/index.json +9 -0
- package/02. Layouts/content/split/split.definition.json +25 -0
- package/02. Layouts/content/split/split.scss +7 -0
- package/02. Layouts/primitives/overlay/api.json +23 -0
- package/02. Layouts/primitives/overlay/docs.md +19 -0
- package/02. Layouts/primitives/overlay/examples/basic/code.html +5 -0
- package/02. Layouts/primitives/overlay/examples/basic/preview.html +5 -0
- package/02. Layouts/primitives/overlay/examples/index.json +9 -0
- package/02. Layouts/primitives/overlay/overlay.definition.json +25 -0
- package/02. Layouts/primitives/overlay/overlay.scss +4 -0
- package/02. Layouts/sections/section/api.json +23 -0
- package/02. Layouts/sections/section/docs.md +19 -0
- package/02. Layouts/sections/section/examples/basic/code.html +5 -0
- package/02. Layouts/sections/section/examples/basic/preview.html +5 -0
- package/02. Layouts/sections/section/examples/index.json +9 -0
- package/02. Layouts/sections/section/section.definition.json +25 -0
- package/02. Layouts/sections/section/section.scss +4 -0
- package/02. Layouts/sections/sidebar/api.json +23 -0
- package/02. Layouts/sections/sidebar/docs.md +18 -0
- package/02. Layouts/sections/sidebar/examples/basic/code.html +4 -0
- package/02. Layouts/sections/sidebar/examples/basic/preview.html +4 -0
- package/02. Layouts/sections/sidebar/examples/index.json +9 -0
- package/02. Layouts/sections/sidebar/sidebar.definition.json +25 -0
- package/02. Layouts/sections/sidebar/sidebar.scss +7 -0
- package/03. Components/.gitkeep +0 -0
- package/04. Templates/.gitkeep +0 -0
- package/05. Pages/.gitkeep +0 -0
- package/LICENSE +17 -0
- package/README.md +95 -2
- package/dist/components/app-shell.css +95 -0
- package/dist/components/avatar.css +232 -0
- package/dist/components/button.css +150 -0
- package/dist/components/grid.css +22 -0
- package/dist/components/overlay.css +17 -0
- package/dist/components/section.css +14 -0
- package/dist/components/sidebar.css +22 -0
- package/dist/components/split.css +22 -0
- package/package.json +48 -4
- package/schemas/reusable-ui.schema.json +351 -0
- package/tooling/cli/build.mjs +82 -0
- package/tooling/cli/cli.mjs +56 -0
- package/tooling/cli/migrate.mjs +57 -0
- package/tooling/cli/project.mjs +261 -0
- package/tooling/cli/registry-location.mjs +32 -0
- package/tooling/cli/registry.mjs +3 -0
- package/tooling/registry/definitions.mjs +69 -0
- package/tooling/registry/index.mjs +3 -0
- package/tooling/registry/paths.mjs +15 -0
- package/tools/build-css.mjs +75 -0
- package/tools/validate.mjs +6 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* BufferCore Level 03 — sidebar; custom layout rules only. */
|
|
2
|
+
.bcl-sidebar { display: grid; gap: var(--bc-fluid-lg); grid-template-columns: minmax(0,1fr); align-items: start; min-width: 0; }
|
|
3
|
+
.bcl-sidebar > * { min-width: 0; }
|
|
4
|
+
@media (min-width: 48rem) {
|
|
5
|
+
.bcl-sidebar { grid-template-columns: minmax(0,var(--bcl-sidebar-width,16rem)) minmax(0,1fr); }
|
|
6
|
+
.bcl-sidebar--end { grid-template-columns: minmax(0,1fr) minmax(0,var(--bcl-sidebar-width,16rem)); }
|
|
7
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# BufferCore Licence
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BufferCreations. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is granted, free of charge, to any individual or organisation to use, modify and integrate BufferCore into personal or commercial projects, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
1. **Permitted Use:** BufferCore may be used in websites, applications, themes, plugins and other projects, including commercial and client projects.
|
|
8
|
+
|
|
9
|
+
2. **Redistribution:** BufferCore may be included as part of a finished project, but may not be redistributed, republished or shared as a standalone library, framework or package without prior written permission.
|
|
10
|
+
|
|
11
|
+
3. **Resale:** BufferCore itself, whether modified or unmodified, may not be sold, sublicensed or offered as a competing product.
|
|
12
|
+
|
|
13
|
+
4. **Attribution:** This copyright notice and licence must be retained in copies of BufferCore's source code.
|
|
14
|
+
|
|
15
|
+
5. **Warranty:** BufferCore is provided "as is", without warranty of any kind. BufferCreations shall not be liable for any damages arising from its use.
|
|
16
|
+
|
|
17
|
+
All rights not expressly granted are reserved by BufferCreations.
|
package/README.md
CHANGED
|
@@ -1,3 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# LevelsUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**LevelsUI** is a modular UI Asset Library built on [BufferCore](https://www.npmjs.com/package/@buffercreations/buffercore), providing reusable interface elements, layouts, components, templates and pages.
|
|
4
|
+
|
|
5
|
+
Assets are designed to work with BufferCore's design tokens, utilities, Runtime and shared Behaviours, keeping custom CSS and JavaScript to a minimum.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Install BufferCore and LevelsUI:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @buffercreations/buffercore
|
|
13
|
+
npm install -D @buffercreations/levelsui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Initialise LevelsUI in your project:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx levelsui init
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Browse the available Assets:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx levelsui list
|
|
28
|
+
npx levelsui info button
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Add an Asset to your project:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx levelsui add button
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Activate it and build your Assets:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx levelsui activate button
|
|
41
|
+
npx levelsui build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Only active Assets and their required dependencies are included in the generated Asset output.
|
|
45
|
+
|
|
46
|
+
## Asset Library
|
|
47
|
+
|
|
48
|
+
LevelsUI organises Assets into five categories:
|
|
49
|
+
|
|
50
|
+
| Category | Purpose |
|
|
51
|
+
|---|---|
|
|
52
|
+
| Elements | Fundamental interface building blocks |
|
|
53
|
+
| Layouts | Structure, positioning and composition |
|
|
54
|
+
| Components | Reusable interface patterns |
|
|
55
|
+
| Templates | Compositions for common interface structures |
|
|
56
|
+
| Pages | Complete page-level compositions |
|
|
57
|
+
|
|
58
|
+
Assets can reference other Assets and shared BufferCore Behaviours.
|
|
59
|
+
|
|
60
|
+
## CLI
|
|
61
|
+
|
|
62
|
+
| Command | Description |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `init` | Initialise LevelsUI in a project |
|
|
65
|
+
| `list` | List available or installed Assets |
|
|
66
|
+
| `info` | View Asset information |
|
|
67
|
+
| `add` | Install an Asset |
|
|
68
|
+
| `activate` | Enable an installed Asset |
|
|
69
|
+
| `deactivate` | Disable an Asset |
|
|
70
|
+
| `update` | Update an installed Asset |
|
|
71
|
+
| `remove` | Remove an Asset |
|
|
72
|
+
| `prune` | Identify unused dependencies |
|
|
73
|
+
| `entries` | Generate Asset entry points |
|
|
74
|
+
| `build` | Build active Assets |
|
|
75
|
+
| `validate` | Validate Asset definitions |
|
|
76
|
+
| `doctor` | Check project configuration and installation health |
|
|
77
|
+
|
|
78
|
+
Run `npx levelsui help` for command details.
|
|
79
|
+
|
|
80
|
+
## Requirements
|
|
81
|
+
|
|
82
|
+
- Node.js 20 or later
|
|
83
|
+
- BufferCore installed in the project
|
|
84
|
+
|
|
85
|
+
## Packages
|
|
86
|
+
|
|
87
|
+
- [BufferCore](https://www.npmjs.com/package/@buffercreations/buffercore) — standalone design system
|
|
88
|
+
- [LevelsUI](https://www.npmjs.com/package/@buffercreations/levelsui) — optional UI Asset Library
|
|
89
|
+
|
|
90
|
+
## Licence
|
|
91
|
+
|
|
92
|
+
See the included `LICENSE` file for terms of use.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
Developed by **BufferCreations**.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore Level 03 — App Shell. Structural CSS only; colours and spacing use Foundation utilities. */
|
|
3
|
+
.bcl-app-shell {
|
|
4
|
+
--bcl-shell-sidebar-width: 16rem;
|
|
5
|
+
--bcl-shell-sidebar-collapsed-width: 4.5rem;
|
|
6
|
+
--bcl-shell-panel-width: 18rem;
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
9
|
+
grid-template-columns: minmax(0, 1fr);
|
|
10
|
+
width: 100%;
|
|
11
|
+
max-width: none;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
min-height: 100vh;
|
|
14
|
+
min-height: 100dvh;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bcl-app-shell__header {
|
|
19
|
+
grid-column: 1/-1;
|
|
20
|
+
grid-row: 1;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bcl-app-shell__body {
|
|
25
|
+
grid-column: 1/-1;
|
|
26
|
+
grid-row: 2;
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: minmax(0, 1fr);
|
|
29
|
+
grid-template-areas: "main";
|
|
30
|
+
width: 100%;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
min-height: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bcl-app-shell__main {
|
|
36
|
+
grid-area: main;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
min-height: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bcl-app-shell__sidebar {
|
|
42
|
+
grid-area: sidebar;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
min-height: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bcl-app-shell__panel {
|
|
48
|
+
grid-area: panel;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
min-height: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.bcl-app-shell[data-sidebar=hidden] .bcl-app-shell__sidebar {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.bcl-app-shell:not([data-sidebar=hidden]) .bcl-app-shell__body:has(> .bcl-app-shell__sidebar) {
|
|
58
|
+
grid-template-columns: minmax(0, var(--bcl-shell-sidebar-width)) minmax(0, 1fr);
|
|
59
|
+
grid-template-areas: "sidebar main";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bcl-app-shell[data-sidebar=collapsed] .bcl-app-shell__body:has(> .bcl-app-shell__sidebar) {
|
|
63
|
+
grid-template-columns: minmax(0, var(--bcl-shell-sidebar-collapsed-width)) minmax(0, 1fr);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bcl-app-shell .bcl-app-shell__body:has(> .bcl-app-shell__panel) {
|
|
67
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, var(--bcl-shell-panel-width));
|
|
68
|
+
grid-template-areas: "main panel";
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bcl-app-shell:not([data-sidebar=hidden]) .bcl-app-shell__body:has(> .bcl-app-shell__sidebar):has(> .bcl-app-shell__panel) {
|
|
72
|
+
grid-template-columns: minmax(0, var(--bcl-shell-sidebar-width)) minmax(0, 1fr) minmax(0, var(--bcl-shell-panel-width));
|
|
73
|
+
grid-template-areas: "sidebar main panel";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.bcl-app-shell[data-sidebar=collapsed] .bcl-app-shell__body:has(> .bcl-app-shell__sidebar):has(> .bcl-app-shell__panel) {
|
|
77
|
+
grid-template-columns: minmax(0, var(--bcl-shell-sidebar-collapsed-width)) minmax(0, 1fr) minmax(0, var(--bcl-shell-panel-width));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@media (max-width: 47.999rem) {
|
|
81
|
+
.bcl-app-shell__body,
|
|
82
|
+
.bcl-app-shell:not([data-sidebar=hidden]) .bcl-app-shell__body:has(> .bcl-app-shell__sidebar),
|
|
83
|
+
.bcl-app-shell[data-sidebar=collapsed] .bcl-app-shell__body:has(> .bcl-app-shell__sidebar),
|
|
84
|
+
.bcl-app-shell .bcl-app-shell__body:has(> .bcl-app-shell__panel),
|
|
85
|
+
.bcl-app-shell:not([data-sidebar=hidden]) .bcl-app-shell__body:has(> .bcl-app-shell__sidebar):has(> .bcl-app-shell__panel),
|
|
86
|
+
.bcl-app-shell[data-sidebar=collapsed] .bcl-app-shell__body:has(> .bcl-app-shell__sidebar):has(> .bcl-app-shell__panel) {
|
|
87
|
+
grid-template-columns: minmax(0, 1fr);
|
|
88
|
+
grid-template-areas: "sidebar" "main" "panel";
|
|
89
|
+
}
|
|
90
|
+
.bcl-app-shell[data-sidebar=hidden] .bcl-app-shell__body,
|
|
91
|
+
.bcl-app-shell[data-sidebar=hidden] .bcl-app-shell__body:has(> .bcl-app-shell__panel) {
|
|
92
|
+
grid-template-columns: minmax(0, 1fr);
|
|
93
|
+
grid-template-areas: "main" "panel";
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore — Level 02 / Avatar. Pure CSS; no JS dependency. */
|
|
3
|
+
.bce-avatar {
|
|
4
|
+
--bce-avatar-size: var(--bc-size-ui-40);
|
|
5
|
+
--bce-avatar-radius: var(--bc-radius-full);
|
|
6
|
+
--bce-avatar-badge-size: var(--bc-size-ui-16);
|
|
7
|
+
--bce-avatar-initials-size: var(--bc-type-label-3-font-size);
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
flex: none;
|
|
12
|
+
width: var(--bce-avatar-size);
|
|
13
|
+
height: var(--bce-avatar-size);
|
|
14
|
+
place-items: center;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
isolation: isolate;
|
|
17
|
+
color: var(--bc-color-text-context-strong);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.bce-avatar__face {
|
|
21
|
+
display: grid;
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
min-height: 0;
|
|
26
|
+
place-items: center;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
border-radius: var(--bce-avatar-radius);
|
|
29
|
+
background: var(--bc-color-fill-context-subtle);
|
|
30
|
+
color: var(--bc-color-text-context-strong);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bce-avatar__image {
|
|
34
|
+
display: block;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
object-fit: cover;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bce-avatar__fallback {
|
|
41
|
+
display: none;
|
|
42
|
+
width: 100%;
|
|
43
|
+
height: 100%;
|
|
44
|
+
place-items: center;
|
|
45
|
+
text-align: center;
|
|
46
|
+
font-family: var(--bc-type-label-3-font-family);
|
|
47
|
+
font-weight: var(--bc-type-weight-600);
|
|
48
|
+
font-size: var(--bce-avatar-initials-size);
|
|
49
|
+
line-height: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.bce-avatar__fallback svg {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 52%;
|
|
55
|
+
height: 52%;
|
|
56
|
+
fill: none;
|
|
57
|
+
stroke: currentColor;
|
|
58
|
+
stroke-width: 1.75;
|
|
59
|
+
stroke-linecap: round;
|
|
60
|
+
stroke-linejoin: round;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* The fallback is visible when markup has no image or the application marks a failed image. */
|
|
64
|
+
.bce-avatar:not(:has(.bce-avatar__image)) .bce-avatar__fallback,
|
|
65
|
+
.bce-avatar[data-image-error=true] .bce-avatar__fallback {
|
|
66
|
+
display: grid;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.bce-avatar[data-image-error=true] .bce-avatar__image {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Named size scale. Physical dimensions remain Foundation design tokens. */
|
|
74
|
+
.bce-avatar--xs {
|
|
75
|
+
--bce-avatar-size: var(--bc-size-ui-24);
|
|
76
|
+
--bce-avatar-badge-size: var(--bc-size-ui-8);
|
|
77
|
+
--bce-avatar-initials-size: var(--bc-type-label-4-font-size);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.bce-avatar--sm {
|
|
81
|
+
--bce-avatar-size: var(--bc-size-ui-32);
|
|
82
|
+
--bce-avatar-badge-size: var(--bc-size-ui-12);
|
|
83
|
+
--bce-avatar-initials-size: var(--bc-type-label-4-font-size);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* md is the default and needs no size modifier. */
|
|
87
|
+
.bce-avatar--md {
|
|
88
|
+
--bce-avatar-size: var(--bc-size-ui-40);
|
|
89
|
+
--bce-avatar-badge-size: var(--bc-size-ui-12);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.bce-avatar--lg {
|
|
93
|
+
--bce-avatar-size: var(--bc-size-ui-48);
|
|
94
|
+
--bce-avatar-badge-size: var(--bc-size-ui-16);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.bce-avatar--xl {
|
|
98
|
+
--bce-avatar-size: var(--bc-size-ui-64);
|
|
99
|
+
--bce-avatar-badge-size: var(--bc-size-ui-16);
|
|
100
|
+
--bce-avatar-initials-size: var(--bc-type-label-2-font-size);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.bce-avatar--2xl {
|
|
104
|
+
--bce-avatar-size: var(--bc-size-ui-96);
|
|
105
|
+
--bce-avatar-badge-size: var(--bc-size-ui-24);
|
|
106
|
+
--bce-avatar-initials-size: var(--bc-type-label-1-font-size);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.bce-avatar--bordered .bce-avatar__face {
|
|
110
|
+
outline: var(--bc-border-width-sm) solid var(--bc-color-border-context-subtle);
|
|
111
|
+
outline-offset: -1px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bce-avatar--rounded {
|
|
115
|
+
--bce-avatar-radius: var(--bc-radius-md);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Overlay nodes are optional. Presence and verified states must be explicit. */
|
|
119
|
+
.bce-avatar__status, .bce-avatar__verified, .bce-avatar__badge, .bce-avatar__notifications {
|
|
120
|
+
position: absolute;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
z-index: 1;
|
|
123
|
+
display: none;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
border: var(--bc-border-width-sm) solid var(--bc-color-surface-context);
|
|
127
|
+
background: var(--bc-color-surface-context);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.bce-avatar__status {
|
|
131
|
+
right: 0;
|
|
132
|
+
bottom: 0;
|
|
133
|
+
width: var(--bce-avatar-badge-size);
|
|
134
|
+
height: var(--bce-avatar-badge-size);
|
|
135
|
+
border-radius: var(--bc-radius-full);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.bce-avatar[data-status=online] .bce-avatar__status {
|
|
139
|
+
display: flex;
|
|
140
|
+
background: var(--bc-color-fill-success);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.bce-avatar[data-status=offline] .bce-avatar__status {
|
|
144
|
+
display: flex;
|
|
145
|
+
background: var(--bc-color-fill-neutral);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.bce-avatar[data-status=away] .bce-avatar__status {
|
|
149
|
+
display: flex;
|
|
150
|
+
background: var(--bc-color-fill-warning);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.bce-avatar[data-status=busy] .bce-avatar__status {
|
|
154
|
+
display: flex;
|
|
155
|
+
background: var(--bc-color-fill-error);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.bce-avatar__verified, .bce-avatar__badge {
|
|
159
|
+
top: 0;
|
|
160
|
+
right: 0;
|
|
161
|
+
width: var(--bce-avatar-badge-size);
|
|
162
|
+
height: var(--bce-avatar-badge-size);
|
|
163
|
+
border-radius: var(--bc-radius-full);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.bce-avatar[data-verified=true] .bce-avatar__verified {
|
|
167
|
+
display: flex;
|
|
168
|
+
color: var(--bc-color-text-primary-strong-inverse);
|
|
169
|
+
background: var(--bc-color-fill-primary);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.bce-avatar__verified svg {
|
|
173
|
+
display: block;
|
|
174
|
+
width: 80%;
|
|
175
|
+
height: 80%;
|
|
176
|
+
fill: none;
|
|
177
|
+
stroke: currentColor;
|
|
178
|
+
stroke-width: 2.5;
|
|
179
|
+
stroke-linecap: round;
|
|
180
|
+
stroke-linejoin: round;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.bce-avatar__badge {
|
|
184
|
+
display: flex;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.bce-avatar__badge img {
|
|
189
|
+
width: 100%;
|
|
190
|
+
height: 100%;
|
|
191
|
+
object-fit: cover;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.bce-avatar__notifications {
|
|
195
|
+
top: 0;
|
|
196
|
+
left: 100%;
|
|
197
|
+
transform: translate(-35%, -25%);
|
|
198
|
+
display: flex;
|
|
199
|
+
min-width: var(--bc-size-ui-16);
|
|
200
|
+
min-height: var(--bc-size-ui-16);
|
|
201
|
+
padding-inline: var(--bc-size-ui-4);
|
|
202
|
+
border-radius: var(--bc-radius-full);
|
|
203
|
+
color: var(--bc-color-text-error-strong-inverse);
|
|
204
|
+
background: var(--bc-color-fill-error);
|
|
205
|
+
font-family: var(--bc-type-label-4-font-family);
|
|
206
|
+
font-weight: var(--bc-type-weight-600);
|
|
207
|
+
font-size: var(--bc-type-label-4-font-size);
|
|
208
|
+
line-height: 1;
|
|
209
|
+
font-variant-numeric: tabular-nums;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Explicit no-count state, rather than silently interpreting text. */
|
|
213
|
+
.bce-avatar__notifications[hidden] {
|
|
214
|
+
display: none;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Logo/icon badge anatomy without inline SVG presentation attributes. */
|
|
218
|
+
.bce-avatar__badge svg {
|
|
219
|
+
display: block;
|
|
220
|
+
width: 100%;
|
|
221
|
+
height: 100%;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.bce-avatar__badge svg rect {
|
|
225
|
+
fill: var(--bc-color-fill-context);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.bce-avatar__badge svg path {
|
|
229
|
+
fill: none;
|
|
230
|
+
stroke: var(--bc-color-text-context-inverse);
|
|
231
|
+
stroke-width: 2;
|
|
232
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore — Level 02 / Button. CSS-compatible SCSS source.
|
|
3
|
+
Requires Foundations semantics + context utilities; no primitive tokens.
|
|
4
|
+
Native buttons are styled by default when this asset is loaded.
|
|
5
|
+
Primary is the demo/app root context, not a local Button override. */
|
|
6
|
+
:where(button, .bce-button) {
|
|
7
|
+
--bce-button-height: var(--bc-size-ui-40);
|
|
8
|
+
--bce-button-pad-y: 0;
|
|
9
|
+
--bce-button-pad-x: var(--bc-size-ui-12);
|
|
10
|
+
--bce-button-colour: var(--bc-color-text-context-inverse-strong);
|
|
11
|
+
--bce-button-background: var(--bc-color-fill-context);
|
|
12
|
+
--bce-button-outline: var(--bc-color-fill-context);
|
|
13
|
+
--bce-button-hover-background: var(--bc-color-fill-context-strong);
|
|
14
|
+
--bce-button-active-background: var(--bc-color-fill-context-bold);
|
|
15
|
+
--bce-button-hover-outline: var(--bc-color-fill-context-strong);
|
|
16
|
+
--bce-button-active-outline: var(--bc-color-fill-context-bold);
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
min-height: var(--bce-button-height);
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
padding: var(--bce-button-pad-y) var(--bce-button-pad-x);
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--bc-size-ui-6);
|
|
25
|
+
border-radius: var(--bc-radius-sm);
|
|
26
|
+
border: var(--bc-border-width-sm) solid var(--bce-button-outline);
|
|
27
|
+
background: var(--bce-button-background);
|
|
28
|
+
color: var(--bce-button-colour);
|
|
29
|
+
font-family: var(--bc-type-label-2-font-family);
|
|
30
|
+
font-size: var(--bc-type-label-2-font-size);
|
|
31
|
+
font-weight: var(--bc-type-label-2-font-weight);
|
|
32
|
+
line-height: var(--bc-type-label-2-line-height);
|
|
33
|
+
padding-block: max(0px, (var(--bce-button-height) - 1lh - 2 * var(--bc-border-width-sm)) / 2);
|
|
34
|
+
letter-spacing: var(--bc-type-label-2-letter-spacing);
|
|
35
|
+
text-align: center;
|
|
36
|
+
text-decoration: none;
|
|
37
|
+
vertical-align: middle;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
user-select: none;
|
|
40
|
+
touch-action: manipulation;
|
|
41
|
+
transition: background-color var(--bc-motion-interaction), border-color var(--bc-motion-interaction), color var(--bc-motion-interaction);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bce-button__icon {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
flex: none;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bce-button__icon svg {
|
|
52
|
+
display: block;
|
|
53
|
+
width: 1em;
|
|
54
|
+
height: 1em;
|
|
55
|
+
fill: none;
|
|
56
|
+
stroke: currentColor;
|
|
57
|
+
stroke-width: 2;
|
|
58
|
+
stroke-linecap: round;
|
|
59
|
+
stroke-linejoin: round;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.bce-button__label {
|
|
63
|
+
min-width: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bce-button--outline, .bce-button--ghost {
|
|
67
|
+
--bce-button-colour: var(--bc-color-text-context);
|
|
68
|
+
--bce-button-background: transparent;
|
|
69
|
+
--bce-button-hover-background: var(--bc-color-fill-context-subtle);
|
|
70
|
+
--bce-button-active-background: var(--bc-color-fill-context-soft);
|
|
71
|
+
--bce-button-hover-outline: var(--bc-color-border-context-strong);
|
|
72
|
+
--bce-button-active-outline: var(--bc-color-border-context-bold);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bce-button--outline {
|
|
76
|
+
--bce-button-outline: var(--bc-color-border-context);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.bce-button--ghost {
|
|
80
|
+
--bce-button-outline: transparent;
|
|
81
|
+
--bce-button-hover-outline: transparent;
|
|
82
|
+
--bce-button-active-outline: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.bce-button--56 {
|
|
86
|
+
--bce-button-height: var(--bc-size-ui-56);
|
|
87
|
+
--bce-button-pad-y: var(--bc-size-ui-8);
|
|
88
|
+
--bce-button-pad-x: var(--bc-size-ui-12);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.bce-button--48 {
|
|
92
|
+
--bce-button-height: var(--bc-size-ui-48);
|
|
93
|
+
--bce-button-pad-y: var(--bc-size-ui-6);
|
|
94
|
+
--bce-button-pad-x: var(--bc-size-ui-12);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.bce-button--40 {
|
|
98
|
+
--bce-button-height: var(--bc-size-ui-40);
|
|
99
|
+
--bce-button-pad-y: var(--bc-size-ui-6);
|
|
100
|
+
--bce-button-pad-x: var(--bc-size-ui-12);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.bce-button--32 {
|
|
104
|
+
font-size: var(--bc-type-label-3-font-size);
|
|
105
|
+
--bce-button-height: var(--bc-size-ui-32);
|
|
106
|
+
--bce-button-pad-y: var(--bc-size-ui-4);
|
|
107
|
+
--bce-button-pad-x: var(--bc-size-ui-8);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bce-button--24 {
|
|
111
|
+
font-size: var(--bc-type-label-4-font-size);
|
|
112
|
+
line-height: 1;
|
|
113
|
+
--bce-button-height: var(--bc-size-ui-24);
|
|
114
|
+
--bce-button-pad-y: var(--bc-size-ui-2);
|
|
115
|
+
--bce-button-pad-x: var(--bc-size-ui-6);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bce-button--icon-only {
|
|
119
|
+
aspect-ratio: 1;
|
|
120
|
+
min-inline-size: var(--bce-button-height);
|
|
121
|
+
padding-inline: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (hover: hover) {
|
|
125
|
+
:where(button, .bce-button):not(:disabled):not([aria-disabled=true]):hover {
|
|
126
|
+
background: var(--bce-button-hover-background);
|
|
127
|
+
border-color: var(--bce-button-hover-outline);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
:where(button, .bce-button):not(:disabled):not([aria-disabled=true]):active {
|
|
131
|
+
background: var(--bce-button-active-background);
|
|
132
|
+
border-color: var(--bce-button-active-outline);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:where(button, .bce-button):focus-visible {
|
|
136
|
+
outline: var(--bc-border-width-sm) solid var(--bc-color-border-context-strong);
|
|
137
|
+
outline-offset: var(--bc-size-ui-2);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:where(button, .bce-button):disabled, :where(button, .bce-button)[aria-disabled=true] {
|
|
141
|
+
opacity: var(--bc-interaction-disabled-opacity);
|
|
142
|
+
cursor: not-allowed;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@media (prefers-reduced-motion: reduce) {
|
|
146
|
+
:where(button, .bce-button) {
|
|
147
|
+
transition: none;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/* The Button is CSS-only; consumers own their interaction logic. */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore Level 03 — grid; custom layout rules only. */
|
|
3
|
+
.bcl-grid {
|
|
4
|
+
display: grid;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
gap: var(--bc-fluid-md);
|
|
7
|
+
grid-template-columns: repeat(var(--bcl-grid-columns, 1), minmax(0, 1fr));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.bcl-grid--auto {
|
|
11
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--bcl-grid-min, 16rem)), 1fr));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bcl-grid > * {
|
|
15
|
+
min-width: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (min-width: 48rem) {
|
|
19
|
+
.bcl-grid:not(.bcl-grid--auto) {
|
|
20
|
+
grid-template-columns: repeat(var(--bcl-grid-columns-md, var(--bcl-grid-columns, 1)), minmax(0, 1fr));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore Level 03 — overlay; custom layout rules only. */
|
|
3
|
+
.bcl-overlay {
|
|
4
|
+
position: relative;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.bcl-overlay__layer {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: 0;
|
|
11
|
+
z-index: 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bcl-overlay__content {
|
|
15
|
+
position: relative;
|
|
16
|
+
z-index: 2;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore Level 03 — section; custom layout rules only. */
|
|
3
|
+
.bcl-section {
|
|
4
|
+
padding-block: var(--bc-fluid-lg);
|
|
5
|
+
min-width: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.bcl-section--compact {
|
|
9
|
+
padding-block: var(--bc-fluid-md);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.bcl-section--spacious {
|
|
13
|
+
padding-block: var(--bc-fluid-xl);
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/* BufferCore Level 03 — sidebar; custom layout rules only. */
|
|
3
|
+
.bcl-sidebar {
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: var(--bc-fluid-lg);
|
|
6
|
+
grid-template-columns: minmax(0, 1fr);
|
|
7
|
+
align-items: start;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bcl-sidebar > * {
|
|
12
|
+
min-width: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@media (min-width: 48rem) {
|
|
16
|
+
.bcl-sidebar {
|
|
17
|
+
grid-template-columns: minmax(0, var(--bcl-sidebar-width, 16rem)) minmax(0, 1fr);
|
|
18
|
+
}
|
|
19
|
+
.bcl-sidebar--end {
|
|
20
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, var(--bcl-sidebar-width, 16rem));
|
|
21
|
+
}
|
|
22
|
+
}
|