@simple-base/css 0.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/LICENSE +21 -0
- package/README.md +172 -0
- package/package.json +127 -0
- package/styles/alert-dialog.css +112 -0
- package/styles/badge.css +100 -0
- package/styles/breadcrumb.css +23 -0
- package/styles/button.css +159 -0
- package/styles/card.css +28 -0
- package/styles/checkbox.css +42 -0
- package/styles/combobox.css +235 -0
- package/styles/dialog.css +84 -0
- package/styles/disclosure.css +44 -0
- package/styles/empty-state.css +29 -0
- package/styles/field.css +64 -0
- package/styles/input.css +108 -0
- package/styles/keyboard-shortcut.css +16 -0
- package/styles/menu.css +45 -0
- package/styles/pagination.css +36 -0
- package/styles/progress.css +17 -0
- package/styles/radio.css +41 -0
- package/styles/range.css +21 -0
- package/styles/segmented-control.css +45 -0
- package/styles/select.css +272 -0
- package/styles/status.css +117 -0
- package/styles/switch.css +54 -0
- package/styles/table.css +48 -0
- package/styles/tabs.css +37 -0
- package/styles/textarea.css +69 -0
- package/styles/typography.css +166 -0
- package/styles.css +29 -0
- package/styles.d.ts +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Reda Salmi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# @simple-base/css
|
|
2
|
+
|
|
3
|
+
Simple Base component styles and typography.
|
|
4
|
+
|
|
5
|
+
Styles cover components and their internal parts, including functional wrappers
|
|
6
|
+
such as select arrows and scrollable tables. Page layouts, component galleries,
|
|
7
|
+
and external grouping or showcase helpers belong in the consuming application.
|
|
8
|
+
|
|
9
|
+
## Visual defaults
|
|
10
|
+
|
|
11
|
+
- Use `.sb-heading-1` through `.sb-heading-6` for utility headings: sans serif,
|
|
12
|
+
sized 32, 24, 20, 18, 16, and 14px. Reserve `.sb-display` for an intentional
|
|
13
|
+
expressive serif heading, not routine page sections or dialogs.
|
|
14
|
+
- Write captions, table headings, and optional dialog kickers in sentence case.
|
|
15
|
+
Monospace is for code, identifiers, shortcuts, and alignment-dependent values;
|
|
16
|
+
omit eyebrows that repeat the heading or add no context.
|
|
17
|
+
- Cards group content through surfaces and borders, without default elevation.
|
|
18
|
+
Menus and dialogs use restrained shadows, lighter in light themes. Modal
|
|
19
|
+
backdrops separate context with a scrim, not blur.
|
|
20
|
+
- Generic dialog kickers are neutral. Danger styling belongs to destructive
|
|
21
|
+
confirmations, not ordinary settings or editing dialogs.
|
|
22
|
+
- Buttons stay in place on hover and press. Color and border changes provide
|
|
23
|
+
feedback; focus rings remain visible.
|
|
24
|
+
|
|
25
|
+
## All styles
|
|
26
|
+
|
|
27
|
+
Import the stylesheet for its side effects through a CSS-aware bundler:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import "@simple-base/css";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or import it from CSS:
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
@import "@simple-base/css";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The package root includes the token stylesheet. Stylesheet imports do not export
|
|
40
|
+
a JavaScript value or CSS string.
|
|
41
|
+
|
|
42
|
+
## Individual stylesheets
|
|
43
|
+
|
|
44
|
+
Load tokens once, then select the component styles you need:
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
@import "@simple-base/tokens/css";
|
|
48
|
+
@import "@simple-base/css/button";
|
|
49
|
+
@import "@simple-base/css/badge";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Individual stylesheets use explicit, extensionless exports such as `/button`,
|
|
53
|
+
`/badge`, `/alert-dialog`, and `/typography`. The internal `styles/` directory and
|
|
54
|
+
`.css` filenames are not public import paths. These exports also support
|
|
55
|
+
side-effect imports in TypeScript:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import "@simple-base/css/button";
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Selector API
|
|
62
|
+
|
|
63
|
+
The selectors are the public API of this package. Component roots and parts are
|
|
64
|
+
classes; configuration and state are attributes, never modifier classes.
|
|
65
|
+
|
|
66
|
+
### Cascade layer
|
|
67
|
+
|
|
68
|
+
Every rule is wrapped in the `sb` cascade layer and declared before the imports:
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
@layer sb;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Because the library is layered, any unlayered CSS in the consuming app wins over
|
|
75
|
+
it regardless of specificity, so overrides do not need `!important`:
|
|
76
|
+
|
|
77
|
+
```css
|
|
78
|
+
/* app styles, unlayered */
|
|
79
|
+
.sb-button {
|
|
80
|
+
border-radius: 0;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Note on order: if a layered framework such as Tailwind CSS is imported _before_
|
|
85
|
+
this package, the `sb` layer is declared after the framework layers and wins on
|
|
86
|
+
ties. Import this package first if framework utilities need the higher priority.
|
|
87
|
+
|
|
88
|
+
### Conventions
|
|
89
|
+
|
|
90
|
+
- `.sb-<component>` is the required root class.
|
|
91
|
+
- `.sb-<component>-<part>` is a part of that component.
|
|
92
|
+
- Configuration uses `data-*` attributes; state uses `data-*`, `aria-*`, or
|
|
93
|
+
native pseudo-classes (`:checked`, `:disabled`, `:hover`, `:focus-visible`,
|
|
94
|
+
`[open]`).
|
|
95
|
+
- Element selectors are only used as descendants of a root class, to style the
|
|
96
|
+
structure a component renders. They are not standalone hooks and imply the
|
|
97
|
+
markup contract listed below.
|
|
98
|
+
|
|
99
|
+
### Variants and options
|
|
100
|
+
|
|
101
|
+
| Attribute | Component | Values |
|
|
102
|
+
| -------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
103
|
+
| `data-variant` | `.sb-badge` | `default`, `success`, `danger`, `warning`, `info`, `accent`, `command`, `outline`, `muted` |
|
|
104
|
+
| `data-variant` | `.sb-button` | `primary`, `secondary`, `tertiary`, `ghost`, `danger`, `danger-subtle` |
|
|
105
|
+
| `data-variant` | `.sb-card` | `flat`, `rule` |
|
|
106
|
+
| `data-variant` | `.sb-table` cell | `code`, `number` |
|
|
107
|
+
| `data-size` | `.sb-badge` | `small`, `medium` |
|
|
108
|
+
| `data-size` | `.sb-button` | `small`, `medium`, `large` |
|
|
109
|
+
| `data-status` | `.sb-status-line`, `.sb-alert`, `.sb-toast` | `success`, `danger`, `info` |
|
|
110
|
+
| `data-padding` | `.sb-card` | `true` |
|
|
111
|
+
|
|
112
|
+
### State attributes
|
|
113
|
+
|
|
114
|
+
- `[aria-invalid="true"]` — `.sb-input`, `.sb-textarea`.
|
|
115
|
+
- `[data-invalid]` — `.sb-select-control`, `.sb-combobox-control`, `.sb-field-help`.
|
|
116
|
+
- `[aria-selected="true"]` — `.sb-tab`, and `.sb-table tbody tr`.
|
|
117
|
+
- `[aria-pressed="true"]` — `.sb-segment`.
|
|
118
|
+
- `[aria-current="page"]` — `.sb-page-button`.
|
|
119
|
+
- `[aria-disabled="true"]`, `:disabled` — `.sb-button`, `.sb-select`, form controls.
|
|
120
|
+
- `[data-state="open"]` — `.sb-select-trigger`, `.sb-combobox-trigger`.
|
|
121
|
+
- `[data-highlighted]` — `.sb-select-item`, `.sb-combobox-item`.
|
|
122
|
+
- `[data-placeholder-shown]`, `[data-required]` — `.sb-select`, `.sb-combobox`.
|
|
123
|
+
- `[open]` — `.sb-dialog`, `.sb-alert-dialog`, `.sb-disclosure`, `.sb-menu`.
|
|
124
|
+
|
|
125
|
+
### Component reference
|
|
126
|
+
|
|
127
|
+
| Component | Root | Parts |
|
|
128
|
+
| ----------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
129
|
+
| Alert dialog | `.sb-alert-dialog` | `-icon`, `-content`, `-kicker`, `-title`, `-description`, `-actions`, `-close` |
|
|
130
|
+
| Badge | `.sb-badge` | — |
|
|
131
|
+
| Breadcrumb | `.sb-breadcrumb` | `-separator` |
|
|
132
|
+
| Button | `.sb-button` | — |
|
|
133
|
+
| Card | `.sb-card` | — |
|
|
134
|
+
| Checkbox | `.sb-checkbox` | — |
|
|
135
|
+
| Combobox | `.sb-combobox` | `-label`, `-control`, `-input`, `-trigger`, `-content`, `-list`, `-item`, `-empty` |
|
|
136
|
+
| Dialog | `.sb-dialog` | `-head`, `-title`, `-kicker`, `-copy`, `-actions`, `-close` |
|
|
137
|
+
| Disclosure | `.sb-disclosure` | `-copy` |
|
|
138
|
+
| Empty state | `.sb-empty-state` | `-mark` (alias `.sb-empty-mark`) |
|
|
139
|
+
| Field | `.sb-field`, `.sb-fieldset` | `-title`, `-help`, `.sb-choice-list`, `.sb-choice` |
|
|
140
|
+
| Input | `.sb-input` | — |
|
|
141
|
+
| Keyboard shortcut | `.sb-shortcut` | — |
|
|
142
|
+
| Menu | `.sb-menu` | `-panel`, `-item` |
|
|
143
|
+
| Pagination | `.sb-pagination` | `.sb-page-button` |
|
|
144
|
+
| Progress | `.sb-progress` | — |
|
|
145
|
+
| Radio | `.sb-radio` | — |
|
|
146
|
+
| Range | `.sb-range` | `.sb-range-readout` |
|
|
147
|
+
| Segmented control | `.sb-segmented-control` (alias `.sb-segmented`) | `.sb-segment` |
|
|
148
|
+
| Select | `.sb-select-root` (compound) | `-label`, `-control`, `-trigger`, `-value-text`, `-indicator`, `-content`, `-list`, `-item`, `-empty` |
|
|
149
|
+
| Select (native) | `.sb-select-wrap` | `.sb-select` |
|
|
150
|
+
| Status | `.sb-status-line`, `.sb-alert`, `.sb-toast` | `-dot`, `-icon`, `.sb-alert-mark`, `.sb-live-region` |
|
|
151
|
+
| Switch | `.sb-switch` | — |
|
|
152
|
+
| Table | `.sb-table-wrap`, `.sb-table` | — |
|
|
153
|
+
| Tabs | `.sb-tabs` | `.sb-tab`, `.sb-tab-panel` |
|
|
154
|
+
| Textarea | `.sb-textarea` | — |
|
|
155
|
+
| Typography | `.sb-display`, `.sb-heading-1` … `.sb-heading-6`, `.sb-text-*`, `.sb-code-*` | — |
|
|
156
|
+
|
|
157
|
+
### Element selectors
|
|
158
|
+
|
|
159
|
+
These rules style the markup a component renders. Use the listed elements, or
|
|
160
|
+
add a part class where one is available.
|
|
161
|
+
|
|
162
|
+
| Parent | Elements |
|
|
163
|
+
| ----------------------------------------------------------------------------------------- | ---------------------------- |
|
|
164
|
+
| `.sb-alert-dialog-icon`, `.sb-alert-mark`, `.sb-select-indicator`, `.sb-combobox-trigger` | `svg` |
|
|
165
|
+
| `.sb-breadcrumb` | `a` |
|
|
166
|
+
| `.sb-disclosure`, `.sb-menu` | `summary` |
|
|
167
|
+
| `.sb-empty-state` | `p` |
|
|
168
|
+
| `.sb-status-line`, `.sb-alert`, `.sb-toast` | `strong`, `p` |
|
|
169
|
+
| `.sb-field` | `label`, `legend`, `small` |
|
|
170
|
+
| `.sb-choice` | `span`, `input` (via `:has`) |
|
|
171
|
+
| `.sb-progress` | `span` |
|
|
172
|
+
| `.sb-table` | `th`, `td`, `tbody`, `tr` |
|
package/package.json
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@simple-base/css",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"files": [
|
|
6
|
+
"styles.css",
|
|
7
|
+
"styles",
|
|
8
|
+
"styles.d.ts"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./styles.d.ts",
|
|
13
|
+
"default": "./styles.css"
|
|
14
|
+
},
|
|
15
|
+
"./alert-dialog": {
|
|
16
|
+
"types": "./styles.d.ts",
|
|
17
|
+
"default": "./styles/alert-dialog.css"
|
|
18
|
+
},
|
|
19
|
+
"./badge": {
|
|
20
|
+
"types": "./styles.d.ts",
|
|
21
|
+
"default": "./styles/badge.css"
|
|
22
|
+
},
|
|
23
|
+
"./breadcrumb": {
|
|
24
|
+
"types": "./styles.d.ts",
|
|
25
|
+
"default": "./styles/breadcrumb.css"
|
|
26
|
+
},
|
|
27
|
+
"./button": {
|
|
28
|
+
"types": "./styles.d.ts",
|
|
29
|
+
"default": "./styles/button.css"
|
|
30
|
+
},
|
|
31
|
+
"./card": {
|
|
32
|
+
"types": "./styles.d.ts",
|
|
33
|
+
"default": "./styles/card.css"
|
|
34
|
+
},
|
|
35
|
+
"./checkbox": {
|
|
36
|
+
"types": "./styles.d.ts",
|
|
37
|
+
"default": "./styles/checkbox.css"
|
|
38
|
+
},
|
|
39
|
+
"./combobox": {
|
|
40
|
+
"types": "./styles.d.ts",
|
|
41
|
+
"default": "./styles/combobox.css"
|
|
42
|
+
},
|
|
43
|
+
"./dialog": {
|
|
44
|
+
"types": "./styles.d.ts",
|
|
45
|
+
"default": "./styles/dialog.css"
|
|
46
|
+
},
|
|
47
|
+
"./disclosure": {
|
|
48
|
+
"types": "./styles.d.ts",
|
|
49
|
+
"default": "./styles/disclosure.css"
|
|
50
|
+
},
|
|
51
|
+
"./empty-state": {
|
|
52
|
+
"types": "./styles.d.ts",
|
|
53
|
+
"default": "./styles/empty-state.css"
|
|
54
|
+
},
|
|
55
|
+
"./field": {
|
|
56
|
+
"types": "./styles.d.ts",
|
|
57
|
+
"default": "./styles/field.css"
|
|
58
|
+
},
|
|
59
|
+
"./input": {
|
|
60
|
+
"types": "./styles.d.ts",
|
|
61
|
+
"default": "./styles/input.css"
|
|
62
|
+
},
|
|
63
|
+
"./keyboard-shortcut": {
|
|
64
|
+
"types": "./styles.d.ts",
|
|
65
|
+
"default": "./styles/keyboard-shortcut.css"
|
|
66
|
+
},
|
|
67
|
+
"./menu": {
|
|
68
|
+
"types": "./styles.d.ts",
|
|
69
|
+
"default": "./styles/menu.css"
|
|
70
|
+
},
|
|
71
|
+
"./pagination": {
|
|
72
|
+
"types": "./styles.d.ts",
|
|
73
|
+
"default": "./styles/pagination.css"
|
|
74
|
+
},
|
|
75
|
+
"./progress": {
|
|
76
|
+
"types": "./styles.d.ts",
|
|
77
|
+
"default": "./styles/progress.css"
|
|
78
|
+
},
|
|
79
|
+
"./radio": {
|
|
80
|
+
"types": "./styles.d.ts",
|
|
81
|
+
"default": "./styles/radio.css"
|
|
82
|
+
},
|
|
83
|
+
"./range": {
|
|
84
|
+
"types": "./styles.d.ts",
|
|
85
|
+
"default": "./styles/range.css"
|
|
86
|
+
},
|
|
87
|
+
"./segmented-control": {
|
|
88
|
+
"types": "./styles.d.ts",
|
|
89
|
+
"default": "./styles/segmented-control.css"
|
|
90
|
+
},
|
|
91
|
+
"./select": {
|
|
92
|
+
"types": "./styles.d.ts",
|
|
93
|
+
"default": "./styles/select.css"
|
|
94
|
+
},
|
|
95
|
+
"./status": {
|
|
96
|
+
"types": "./styles.d.ts",
|
|
97
|
+
"default": "./styles/status.css"
|
|
98
|
+
},
|
|
99
|
+
"./switch": {
|
|
100
|
+
"types": "./styles.d.ts",
|
|
101
|
+
"default": "./styles/switch.css"
|
|
102
|
+
},
|
|
103
|
+
"./table": {
|
|
104
|
+
"types": "./styles.d.ts",
|
|
105
|
+
"default": "./styles/table.css"
|
|
106
|
+
},
|
|
107
|
+
"./tabs": {
|
|
108
|
+
"types": "./styles.d.ts",
|
|
109
|
+
"default": "./styles/tabs.css"
|
|
110
|
+
},
|
|
111
|
+
"./textarea": {
|
|
112
|
+
"types": "./styles.d.ts",
|
|
113
|
+
"default": "./styles/textarea.css"
|
|
114
|
+
},
|
|
115
|
+
"./typography": {
|
|
116
|
+
"types": "./styles.d.ts",
|
|
117
|
+
"default": "./styles/typography.css"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"publishConfig": {
|
|
121
|
+
"access": "public",
|
|
122
|
+
"registry": "https://registry.npmjs.org/"
|
|
123
|
+
},
|
|
124
|
+
"dependencies": {
|
|
125
|
+
"@simple-base/tokens": "^0.1.0"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@layer sb {
|
|
2
|
+
.sb-alert-dialog {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: min(560px, calc(100vw - 40px));
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
margin: auto;
|
|
7
|
+
padding: var(--sb-semantic-space-6);
|
|
8
|
+
border: var(--sb-semantic-border-width-hairline) solid var(--sb-semantic-color-border-strong);
|
|
9
|
+
border-radius: var(--sb-semantic-radius-lg);
|
|
10
|
+
color: var(--sb-semantic-color-foreground-primary);
|
|
11
|
+
background: var(--sb-semantic-color-background-raised);
|
|
12
|
+
box-shadow: var(--sb-semantic-shadow-overlay);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.sb-alert-dialog[open] {
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
18
|
+
gap: var(--sb-semantic-space-4);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sb-alert-dialog::backdrop {
|
|
22
|
+
background: var(--sb-semantic-color-overlay-scrim);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sb-alert-dialog-icon {
|
|
26
|
+
display: grid;
|
|
27
|
+
place-items: center;
|
|
28
|
+
width: var(--sb-semantic-space-6);
|
|
29
|
+
height: var(--sb-semantic-space-6);
|
|
30
|
+
flex: 0 0 auto;
|
|
31
|
+
color: var(--sb-semantic-color-status-danger-text);
|
|
32
|
+
background: var(--sb-semantic-color-status-danger-soft);
|
|
33
|
+
border-radius: var(--sb-semantic-radius-full);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.sb-alert-dialog-icon svg {
|
|
37
|
+
width: var(--sb-semantic-typography-size-md);
|
|
38
|
+
height: var(--sb-semantic-typography-size-md);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sb-alert-dialog-content {
|
|
42
|
+
min-width: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sb-alert-dialog-kicker {
|
|
46
|
+
margin: 0;
|
|
47
|
+
color: var(--sb-semantic-color-status-danger-text);
|
|
48
|
+
font-family: var(--sb-semantic-typography-family-body);
|
|
49
|
+
font-size: var(--sb-semantic-typography-size-sm);
|
|
50
|
+
line-height: var(--sb-semantic-typography-line-height-normal);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.sb-alert-dialog-title {
|
|
54
|
+
margin: var(--sb-semantic-space-2) 0 0;
|
|
55
|
+
color: var(--sb-semantic-color-foreground-primary);
|
|
56
|
+
font-family: var(--sb-semantic-typography-family-body);
|
|
57
|
+
font-size: var(--sb-semantic-typography-size-2xl);
|
|
58
|
+
font-weight: var(--sb-semantic-typography-weight-semibold);
|
|
59
|
+
line-height: var(--sb-semantic-typography-line-height-snug);
|
|
60
|
+
letter-spacing: var(--sb-semantic-typography-letter-spacing-normal);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sb-alert-dialog-description {
|
|
64
|
+
margin: var(--sb-semantic-space-3) 0 0;
|
|
65
|
+
color: var(--sb-semantic-color-foreground-secondary);
|
|
66
|
+
font-size: var(--sb-semantic-typography-size-md);
|
|
67
|
+
line-height: var(--sb-semantic-typography-line-height-relaxed);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.sb-alert-dialog-actions {
|
|
71
|
+
grid-column: 2;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
gap: var(--sb-semantic-space-3);
|
|
75
|
+
margin-top: var(--sb-semantic-space-2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.sb-alert-dialog-close {
|
|
79
|
+
display: inline-grid;
|
|
80
|
+
place-items: center;
|
|
81
|
+
width: var(--sb-semantic-size-target-minimum);
|
|
82
|
+
height: var(--sb-semantic-size-target-minimum);
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: 0;
|
|
85
|
+
border-radius: var(--sb-semantic-radius-sm);
|
|
86
|
+
color: var(--sb-semantic-color-foreground-muted);
|
|
87
|
+
background: transparent;
|
|
88
|
+
font-size: var(--sb-semantic-typography-size-2xl);
|
|
89
|
+
line-height: var(--sb-semantic-typography-line-height-none);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.sb-alert-dialog-close:hover {
|
|
93
|
+
color: var(--sb-semantic-color-foreground-primary);
|
|
94
|
+
background: var(--sb-semantic-color-background-subtle);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 480px) {
|
|
98
|
+
.sb-alert-dialog[open] {
|
|
99
|
+
grid-template-columns: 1fr;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sb-alert-dialog-actions {
|
|
103
|
+
grid-column: 1;
|
|
104
|
+
align-items: stretch;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sb-alert-dialog-actions > * {
|
|
109
|
+
width: 100%;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/styles/badge.css
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@layer sb {
|
|
2
|
+
.sb-badge {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
min-height: var(--sb-semantic-space-6);
|
|
7
|
+
gap: var(--sb-semantic-space-2);
|
|
8
|
+
padding: 0 var(--sb-semantic-space-3);
|
|
9
|
+
border-radius: var(--sb-semantic-radius-full);
|
|
10
|
+
font-size: var(--sb-semantic-typography-size-xs);
|
|
11
|
+
font-weight: var(--sb-semantic-typography-weight-semibold);
|
|
12
|
+
line-height: var(--sb-semantic-typography-line-height-none);
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.sb-badge,
|
|
18
|
+
.sb-badge[data-variant="default"] {
|
|
19
|
+
color: var(--sb-semantic-color-foreground-secondary);
|
|
20
|
+
background: var(--sb-semantic-color-background-overlay);
|
|
21
|
+
border: var(--sb-semantic-border-width-hairline) solid var(--sb-semantic-color-border-strong);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sb-badge[data-variant="success"] {
|
|
25
|
+
color: var(--sb-semantic-color-status-success-text);
|
|
26
|
+
background: var(--sb-semantic-color-status-success-soft);
|
|
27
|
+
border-color: color-mix(
|
|
28
|
+
in oklch,
|
|
29
|
+
var(--sb-semantic-color-status-success-base) 48%,
|
|
30
|
+
var(--sb-semantic-color-border-default)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sb-badge[data-variant="danger"] {
|
|
35
|
+
color: var(--sb-semantic-color-status-danger-text);
|
|
36
|
+
background: var(--sb-semantic-color-status-danger-soft);
|
|
37
|
+
border-color: color-mix(
|
|
38
|
+
in oklch,
|
|
39
|
+
var(--sb-semantic-color-status-danger-base) 48%,
|
|
40
|
+
var(--sb-semantic-color-border-default)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sb-badge[data-variant="warning"] {
|
|
45
|
+
color: var(--sb-semantic-color-status-warning-text);
|
|
46
|
+
background: var(--sb-semantic-color-status-warning-soft);
|
|
47
|
+
border-color: color-mix(
|
|
48
|
+
in oklch,
|
|
49
|
+
var(--sb-semantic-color-status-warning-base) 48%,
|
|
50
|
+
var(--sb-semantic-color-border-default)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.sb-badge[data-variant="info"] {
|
|
55
|
+
color: var(--sb-semantic-color-status-info-text);
|
|
56
|
+
background: var(--sb-semantic-color-status-info-soft);
|
|
57
|
+
border-color: color-mix(
|
|
58
|
+
in oklch,
|
|
59
|
+
var(--sb-semantic-color-status-info-base) 48%,
|
|
60
|
+
var(--sb-semantic-color-border-default)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.sb-badge[data-variant="accent"] {
|
|
65
|
+
color: var(--sb-semantic-color-accent-text);
|
|
66
|
+
background: var(--sb-semantic-color-accent-soft);
|
|
67
|
+
border-color: color-mix(
|
|
68
|
+
in oklch,
|
|
69
|
+
var(--sb-semantic-color-accent-surface) 48%,
|
|
70
|
+
var(--sb-semantic-color-border-default)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.sb-badge[data-variant="command"] {
|
|
75
|
+
color: var(--sb-semantic-color-foreground-primary);
|
|
76
|
+
background: var(--sb-semantic-color-background-overlay);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.sb-badge[data-variant="outline"] {
|
|
80
|
+
color: var(--sb-semantic-color-foreground-secondary);
|
|
81
|
+
background: transparent;
|
|
82
|
+
border-color: var(--sb-semantic-color-border-default);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.sb-badge[data-variant="muted"] {
|
|
86
|
+
color: var(--sb-semantic-color-foreground-muted);
|
|
87
|
+
background: var(--sb-semantic-color-background-subtle);
|
|
88
|
+
border-color: var(--sb-semantic-color-border-subtle);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sb-badge[data-size="small"] {
|
|
92
|
+
min-height: var(--sb-semantic-space-5);
|
|
93
|
+
padding-inline: var(--sb-semantic-space-2);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sb-badge[data-size="medium"] {
|
|
97
|
+
min-height: var(--sb-semantic-space-6);
|
|
98
|
+
padding-inline: var(--sb-semantic-space-3);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@layer sb {
|
|
2
|
+
.sb-breadcrumb {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--sb-semantic-space-2);
|
|
7
|
+
color: var(--sb-semantic-color-foreground-muted);
|
|
8
|
+
font-size: 13px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.sb-breadcrumb a {
|
|
12
|
+
color: inherit;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sb-breadcrumb a:hover {
|
|
17
|
+
color: var(--sb-semantic-color-foreground-primary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sb-breadcrumb-separator {
|
|
21
|
+
color: var(--sb-semantic-color-border-strong);
|
|
22
|
+
}
|
|
23
|
+
}
|