@pimolu/web-styles 0.1.0-beta.1 → 0.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.fr.md CHANGED
@@ -1,30 +1,40 @@
1
1
  # @pimolu/web-styles
2
2
 
3
- Feuilles de style CSS pour les composants Pimolu UI.
3
+ La couche CSS de Pimolu UI. Elle réunit les tokens, les thèmes de couleurs, les presets visuels et les styles des familles de composants React. Aucun runtime Tailwind ou CSS-in-JS n'est nécessaire.
4
4
 
5
- > **0.1.0-beta.1** — version de prévisualisation.
5
+ > **0.1.0-beta.3** est une version de prévisualisation.
6
+
7
+ ## Installation
6
8
 
7
9
  ```bash
8
- pnpm add @pimolu/web-styles
10
+ pnpm add @pimolu/web-styles@beta
9
11
  ```
10
12
 
11
- Importez le bundle complet une seule fois :
13
+ ## Charger la feuille complète
14
+
15
+ Importez-la une fois dans le CSS global de votre application :
12
16
 
13
- ```ts
14
- import "@pimolu/web-styles/styles.css";
17
+ ```css
18
+ @import "@pimolu/web-styles/styles.css";
15
19
  ```
16
20
 
17
- Ou importez uniquement le CSS des composants utilisés :
21
+ Cette entrée inclut les tokens communs, les thèmes, les presets et toutes les feuilles des composants. C'est l'option la plus simple avec `@pimolu/react`. Une version minifiée est exportée sous `@pimolu/web-styles/pimolu.min.css`.
22
+
23
+ ## Charger les styles par composant
18
24
 
19
- ```ts
20
- import "@pimolu/web-styles/button.css";
21
- import "@pimolu/web-styles/input.css";
25
+ Pour composer manuellement une feuille plus légère, installez aussi `@pimolu/themes@beta` et importez les fondations avant les composants utilisés :
26
+
27
+ ```css
28
+ @import "@pimolu/themes/styles.css";
29
+ @import "@pimolu/themes/presets.css";
30
+ @import "@pimolu/web-styles/button.css";
31
+ @import "@pimolu/web-styles/input.css";
22
32
  ```
23
33
 
24
- Le bundle complet inclut les tokens Pimolu, les thèmes, les presets, les tokens
25
- visuels et tous les styles de composants. Aucun runtime Tailwind ou CSS-in-JS
26
- n'est nécessaire. Chaque feuille de composant est aussi exportée séparément.
34
+ Chaque feuille de composant est un sous-chemin exporté du package ; consultez les [exports du package](https://github.com/pimoludev/ui/blob/main/packages/web-styles/package.json) pour la liste complète. Conservez la même version pour le CSS et `@pimolu/react`.
35
+
36
+ ## Liens
27
37
 
28
- Documentation : <https://github.com/pimoludev/ui>
38
+ [Démarrage rapide](https://pimolu.com/docs/quick-start) · [Tous les packages npm](https://www.npmjs.com/org/pimolu) · [Code source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
29
39
 
30
40
  MIT © Pimolu
package/README.md CHANGED
@@ -1,30 +1,40 @@
1
1
  # @pimolu/web-styles
2
2
 
3
- Plain CSS stylesheets for Pimolu UI components.
3
+ The plain CSS layer for Pimolu UI. It combines design tokens, colour themes, visual presets and styles for the React component families. No Tailwind or CSS-in-JS runtime is required.
4
4
 
5
- > **0.1.0-beta.1** — preview release.
5
+ > **0.1.0-beta.3** is a preview release.
6
+
7
+ ## Install
6
8
 
7
9
  ```bash
8
- pnpm add @pimolu/web-styles
10
+ pnpm add @pimolu/web-styles@beta
9
11
  ```
10
12
 
11
- Import the complete bundle once:
13
+ ## Load the complete stylesheet
14
+
15
+ Import it once in your application's global CSS:
12
16
 
13
- ```ts
14
- import "@pimolu/web-styles/styles.css";
17
+ ```css
18
+ @import "@pimolu/web-styles/styles.css";
15
19
  ```
16
20
 
17
- Or import only the component CSS you use:
21
+ This entry includes the shared tokens, themes, presets and every component stylesheet. It is the simplest option with `@pimolu/react`. A minified alternative is exported as `@pimolu/web-styles/pimolu.min.css`.
22
+
23
+ ## Load individual component styles
18
24
 
19
- ```ts
20
- import "@pimolu/web-styles/button.css";
21
- import "@pimolu/web-styles/input.css";
25
+ For a smaller, manually assembled stylesheet, install `@pimolu/themes@beta` too and import the foundations before the components you use:
26
+
27
+ ```css
28
+ @import "@pimolu/themes/styles.css";
29
+ @import "@pimolu/themes/presets.css";
30
+ @import "@pimolu/web-styles/button.css";
31
+ @import "@pimolu/web-styles/input.css";
22
32
  ```
23
33
 
24
- The full bundle includes Pimolu tokens, themes, presets, visual tokens and all
25
- component styles. No Tailwind or CSS-in-JS runtime is required. Every component
26
- stylesheet is also exported as a separate entry point.
34
+ Each component CSS file is an exported package subpath; check the [package exports](https://github.com/pimoludev/ui/blob/main/packages/web-styles/package.json) for the complete list. Keep the CSS and `@pimolu/react` versions aligned.
35
+
36
+ ## Links
27
37
 
28
- Documentation: <https://github.com/pimoludev/ui>
38
+ [Quick start](https://pimolu.com/docs/quick-start) · [All npm packages](https://www.npmjs.com/org/pimolu) · [Source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
29
39
 
30
40
  MIT © Pimolu
@@ -1,18 +1,20 @@
1
1
  /* src/app-shell.css */
2
2
  .pimolu-app-shell {
3
3
  --pimolu-app-shell-sidebar-width: 16rem;
4
+ --pimolu-app-shell-sidebar-track: var(--pimolu-app-shell-sidebar-width);
4
5
  --pimolu-app-shell-aside-width: 18rem;
5
6
  display: grid;
6
- grid-template-columns: var(--pimolu-app-shell-sidebar-width) minmax(0, 1fr);
7
+ grid-template-columns: var(--pimolu-app-shell-sidebar-track) minmax(0, 1fr);
7
8
  grid-template-areas: "header header" "sidebar main" "footer footer";
8
9
  box-sizing: border-box;
10
+ min-width: 0;
9
11
  min-height: 100dvh;
10
12
  background: var(--pimolu-background);
11
13
  color: var(--pimolu-foreground);
12
14
  font-family: var(--pimolu-font-body, inherit);
13
15
  }
14
16
  .pimolu-app-shell[data-aside=true] {
15
- grid-template-columns: var(--pimolu-app-shell-sidebar-width) minmax(0, 1fr) var(--pimolu-app-shell-aside-width);
17
+ grid-template-columns: var(--pimolu-app-shell-sidebar-track) minmax(0, 1fr) var(--pimolu-app-shell-aside-width);
16
18
  grid-template-areas: "header header header" "sidebar main aside" "footer footer footer";
17
19
  }
18
20
  .pimolu-app-shell[data-sidebar=false] {
@@ -23,21 +25,14 @@
23
25
  grid-template-columns: minmax(0, 1fr) var(--pimolu-app-shell-aside-width);
24
26
  grid-template-areas: "header header" "main aside" "footer footer";
25
27
  }
26
- .pimolu-app-shell:has(.pimolu-sidebar[data-collapsed=true]) {
27
- --pimolu-app-shell-sidebar-width: 3.75rem;
28
- grid-template-columns: 3.75rem minmax(0, 1fr);
29
- }
30
- .pimolu-app-shell[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
31
- grid-template-columns: 3.75rem minmax(0, 1fr) var(--pimolu-app-shell-aside-width);
28
+ .pimolu-app-shell:has(> .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true]) {
29
+ --pimolu-app-shell-sidebar-track: 3.75rem;
32
30
  }
33
- @container (max-width: 1100px) {
31
+ @container (max-width: 900px) {
34
32
  .pimolu-app-shell[data-aside=true] {
35
- grid-template-columns: var(--pimolu-app-shell-sidebar-width) minmax(0, 1fr);
33
+ grid-template-columns: var(--pimolu-app-shell-sidebar-track) minmax(0, 1fr);
36
34
  grid-template-areas: "header header" "sidebar main" "aside aside" "footer footer";
37
35
  }
38
- .pimolu-app-shell[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
39
- grid-template-columns: 3.75rem minmax(0, 1fr);
40
- }
41
36
  .pimolu-app-shell[data-sidebar=false][data-aside=true] {
42
37
  grid-template-columns: minmax(0, 1fr);
43
38
  grid-template-areas: "header" "main" "aside" "footer";
@@ -48,6 +43,27 @@
48
43
  }
49
44
  }
50
45
  @container (max-width: 720px) {
46
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header {
47
+ display: flex;
48
+ min-height: 40px;
49
+ padding-block: 0;
50
+ }
51
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__toggle {
52
+ position: absolute;
53
+ }
54
+ .pimolu-app-shell > .pimolu-app-shell__sidebar > .pimolu-sidebar {
55
+ width: 100%;
56
+ min-height: auto;
57
+ border-inline-end: 0;
58
+ }
59
+ .pimolu-app-shell__sidebar {
60
+ border-inline-end: 0;
61
+ border-block-end: 1px solid var(--pimolu-border);
62
+ }
63
+ .pimolu-app-shell__main,
64
+ .pimolu-app-shell__aside {
65
+ padding: var(--pimolu-spacing-4, 16px);
66
+ }
51
67
  .pimolu-app-shell,
52
68
  .pimolu-app-shell[data-aside=true],
53
69
  .pimolu-app-shell[data-sidebar=false],
@@ -104,7 +120,34 @@
104
120
  color: var(--pimolu-muted-foreground);
105
121
  font-size: 0.8125rem;
106
122
  }
107
- @media (max-width: 960px) {
123
+ @media (min-width: 721px) and (max-width: 900px) {
124
+ .pimolu-app-shell[data-aside=true] {
125
+ grid-template-columns: var(--pimolu-app-shell-sidebar-track) minmax(0, 1fr);
126
+ grid-template-areas: "header header" "sidebar main" "aside aside" "footer footer";
127
+ }
128
+ .pimolu-app-shell[data-sidebar=false][data-aside=true] {
129
+ grid-template-columns: minmax(0, 1fr);
130
+ grid-template-areas: "header" "main" "aside" "footer";
131
+ }
132
+ .pimolu-app-shell__aside {
133
+ border-inline-start: 0;
134
+ border-block-start: 1px solid var(--pimolu-border);
135
+ }
136
+ }
137
+ @media (max-width: 720px) {
138
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header {
139
+ display: flex;
140
+ min-height: 40px;
141
+ padding-block: 0;
142
+ }
143
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__toggle {
144
+ position: absolute;
145
+ }
146
+ .pimolu-app-shell > .pimolu-app-shell__sidebar > .pimolu-sidebar {
147
+ width: 100%;
148
+ min-height: auto;
149
+ border-inline-end: 0;
150
+ }
108
151
  .pimolu-app-shell,
109
152
  .pimolu-app-shell[data-aside=true],
110
153
  .pimolu-app-shell[data-sidebar=false],
@@ -112,15 +155,15 @@
112
155
  grid-template-columns: minmax(0, 1fr);
113
156
  grid-template-areas: "header" "sidebar" "main" "aside" "footer";
114
157
  }
115
- .pimolu-app-shell:has(.pimolu-sidebar[data-collapsed=true]),
116
- .pimolu-app-shell[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
158
+ .pimolu-app-shell:has(> .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true]),
159
+ .pimolu-app-shell[data-aside=true]:has(> .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true]) {
117
160
  grid-template-columns: minmax(0, 1fr);
118
161
  }
119
- .pimolu-app-shell .pimolu-sidebar[data-collapsed=true] {
162
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] {
120
163
  width: 100%;
121
164
  min-height: 60px;
122
165
  }
123
- .pimolu-app-shell .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
166
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
124
167
  display: none;
125
168
  }
126
169
  .pimolu-app-shell[data-sidebar=false] {
@@ -158,15 +201,37 @@
158
201
  }
159
202
  }
160
203
  @container (max-width: 720px) {
161
- .pimolu-app-shell:has(.pimolu-sidebar[data-collapsed=true]),
162
- .pimolu-app-shell[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
204
+ .pimolu-app-shell:has(> .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true]),
205
+ .pimolu-app-shell[data-aside=true]:has(> .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true]) {
163
206
  grid-template-columns: minmax(0, 1fr);
164
207
  }
165
- .pimolu-app-shell .pimolu-sidebar[data-collapsed=true] {
208
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] {
166
209
  width: 100%;
167
210
  min-height: 60px;
168
211
  }
169
- .pimolu-app-shell .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
212
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
170
213
  display: none;
171
214
  }
172
215
  }
216
+ @container (max-width: 720px) {
217
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header .pimolu-sidebar__expanded {
218
+ display: contents;
219
+ }
220
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header .pimolu-sidebar__compact {
221
+ display: none;
222
+ }
223
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header[data-has-collapsed-content] {
224
+ justify-content: flex-start;
225
+ padding-inline: 8px 100px;
226
+ }
227
+ .pimolu-app-shell > .pimolu-app-shell__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__footer[data-has-collapsed-content] {
228
+ position: absolute;
229
+ inset-inline-end: 64px;
230
+ inset-block-start: 12px;
231
+ margin: 0;
232
+ padding: 0;
233
+ border: 0;
234
+ height: 40px;
235
+ align-items: center;
236
+ }
237
+ }
package/dist/carousel.css CHANGED
@@ -88,6 +88,15 @@
88
88
  width: 1.25rem;
89
89
  height: 1.25rem;
90
90
  }
91
+ [dir=rtl] {
92
+ --pimolu-carousel-arrow-direction: -1;
93
+ }
94
+ [dir=ltr] {
95
+ --pimolu-carousel-arrow-direction: 1;
96
+ }
97
+ .pimolu-carousel__control svg {
98
+ transform: scaleX(var(--pimolu-carousel-arrow-direction, 1));
99
+ }
91
100
  .pimolu-carousel__footer {
92
101
  display: flex;
93
102
  align-items: center;
package/dist/chart.css CHANGED
@@ -1,9 +1,12 @@
1
1
  /* src/chart.css */
2
2
  .pimolu-chart {
3
+ position: relative;
3
4
  --pimolu-chart-axis: var(--pimolu-muted-foreground, #6b7280);
4
5
  --pimolu-chart-grid: var(--pimolu-border, rgba(0, 0, 0, 0.12));
5
6
  --pimolu-chart-surface: var(--pimolu-surface, #ffffff);
6
7
  --pimolu-chart-color: var(--pimolu-primary, #4f46e5);
8
+ --pimolu-chart-area-fill: var(--pimolu-chart-color);
9
+ --pimolu-chart-area-opacity: 0.16;
7
10
  --pimolu-chart-label-size: 13px;
8
11
  --pimolu-chart-axis-title-size: 13px;
9
12
  --pimolu-chart-value-size: 12px;
@@ -21,6 +24,56 @@
21
24
  position: relative;
22
25
  width: 100%;
23
26
  min-width: 0;
27
+ border-radius: var(--pimolu-radius-md, 8px);
28
+ touch-action: pan-y;
29
+ }
30
+ .pimolu-chart__canvas:focus-visible {
31
+ outline: 2px solid var(--pimolu-focus-ring, var(--pimolu-primary, #4f46e5));
32
+ outline-offset: 4px;
33
+ }
34
+ .pimolu-chart__cursor {
35
+ position: absolute;
36
+ inset-block: 5% 12%;
37
+ border-inline-start: 1px dashed var(--pimolu-chart-axis);
38
+ opacity: 0.65;
39
+ pointer-events: none;
40
+ }
41
+ .pimolu-chart__tooltip {
42
+ position: absolute;
43
+ z-index: 2;
44
+ inset-block-start: 8px;
45
+ inset-inline-end: 8px;
46
+ box-sizing: border-box;
47
+ width: max-content;
48
+ max-width: calc(100% - 16px);
49
+ padding: 12px;
50
+ border: 1px solid var(--pimolu-chart-grid);
51
+ border-radius: var(--pimolu-radius-md, 8px);
52
+ background: var(--pimolu-chart-surface);
53
+ color: var(--pimolu-surface-foreground, var(--pimolu-foreground, #111827));
54
+ box-shadow: var(--pimolu-shadow-raised, none);
55
+ font-size: var(--pimolu-chart-legend-size);
56
+ line-height: 1.5;
57
+ overflow-wrap: anywhere;
58
+ }
59
+ .pimolu-chart__tooltip > strong {
60
+ display: block;
61
+ margin-block-end: 6px;
62
+ }
63
+ .pimolu-chart__tooltip-row {
64
+ display: grid;
65
+ grid-template-columns: 8px minmax(0, 1fr) auto;
66
+ align-items: center;
67
+ gap: 8px;
68
+ }
69
+ .pimolu-chart__tooltip-row b {
70
+ font-variant-numeric: tabular-nums;
71
+ text-align: end;
72
+ }
73
+ .pimolu-chart__tooltip-row .pimolu-chart__legend-swatch {
74
+ width: 8px;
75
+ height: 8px;
76
+ border-radius: 50%;
24
77
  }
25
78
  .pimolu-chart__svg {
26
79
  display: block;
@@ -34,6 +87,8 @@
34
87
  stroke-width: 1;
35
88
  shape-rendering: crispEdges;
36
89
  vector-effect: non-scaling-stroke;
90
+ stroke-dasharray: 3 5;
91
+ opacity: 0.7;
37
92
  }
38
93
  .pimolu-chart__axis {
39
94
  stroke: var(--pimolu-chart-grid);
@@ -75,12 +130,13 @@
75
130
  stroke-width: 2.5;
76
131
  stroke-linecap: round;
77
132
  stroke-linejoin: round;
133
+ vector-effect: non-scaling-stroke;
78
134
  stroke-dasharray: 1;
79
135
  animation: pimolu-chart-draw 650ms ease-out both;
80
136
  }
81
137
  .pimolu-chart__area {
82
- fill: var( --pimolu-chart-color, var(--pimolu-primary, #4f46e5) );
83
- fill-opacity: 0.16;
138
+ fill: var(--pimolu-chart-area-fill, var(--pimolu-chart-color, var(--pimolu-primary, #4f46e5)));
139
+ fill-opacity: var(--pimolu-chart-area-opacity, 0.16);
84
140
  stroke: none;
85
141
  animation: pimolu-chart-fade 420ms ease-out both;
86
142
  }
@@ -103,6 +159,36 @@
103
159
  .pimolu-chart__donut-track {
104
160
  stroke: var( --pimolu-muted, rgba(0, 0, 0, 0.08) );
105
161
  }
162
+ .pimolu-chart--donut {
163
+ flex-flow: row wrap;
164
+ align-items: center;
165
+ gap: 20px;
166
+ }
167
+ .pimolu-chart--donut .pimolu-chart__canvas {
168
+ flex: 1 1 160px;
169
+ max-width: 260px;
170
+ margin-inline: auto;
171
+ }
172
+ .pimolu-chart--donut .pimolu-chart__legend {
173
+ flex: 1 1 120px;
174
+ flex-direction: column;
175
+ gap: 12px;
176
+ }
177
+ .pimolu-chart--donut .pimolu-chart__legend-item {
178
+ display: grid;
179
+ grid-template-columns: 10px minmax(0, 1fr);
180
+ }
181
+ .pimolu-chart--donut .pimolu-chart__legend-value {
182
+ grid-column: 2;
183
+ font-variant-numeric: tabular-nums;
184
+ }
185
+ .pimolu-chart--donut .pimolu-chart__tooltip-row {
186
+ grid-template-columns: 8px minmax(0, 1fr);
187
+ }
188
+ .pimolu-chart--donut .pimolu-chart__tooltip-row b {
189
+ grid-column: 2;
190
+ text-align: start;
191
+ }
106
192
  .pimolu-chart__segment {
107
193
  stroke: var( --pimolu-chart-color, var(--pimolu-primary, #4f46e5) );
108
194
  transition: opacity 160ms ease;
@@ -240,10 +326,21 @@
240
326
  }
241
327
  }
242
328
  @media (forced-colors: active) {
329
+ .pimolu-chart__tooltip {
330
+ background: Canvas;
331
+ color: CanvasText;
332
+ border-color: CanvasText;
333
+ }
334
+ .pimolu-chart__cursor {
335
+ border-color: CanvasText;
336
+ }
243
337
  .pimolu-chart__bar,
244
338
  .pimolu-chart__area {
245
339
  fill: CanvasText;
246
340
  }
341
+ .pimolu-chart__area {
342
+ fill-opacity: 0.1;
343
+ }
247
344
  .pimolu-chart__line,
248
345
  .pimolu-chart__segment {
249
346
  stroke: CanvasText;
@@ -49,10 +49,32 @@
49
49
  }
50
50
  .pimolu-circular-progress__value {
51
51
  position: absolute;
52
- font-size: max(0.625rem, calc(var(--pimolu-circular-progress-diameter) * 0.26));
52
+ font-size: max(0.625rem, calc(var(--pimolu-circular-progress-diameter) * 0.20));
53
53
  font-variant-numeric: tabular-nums;
54
54
  line-height: 1;
55
55
  color: var(--pimolu-muted-foreground, currentColor);
56
+ max-width: 68%;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ white-space: nowrap;
60
+ font-weight: 600;
61
+ }
62
+ .pimolu-circular-progress[data-empty=true] .pimolu-circular-progress__indicator {
63
+ opacity: 0;
64
+ }
65
+ .pimolu-circular-progress--sm:has(.pimolu-circular-progress__value) {
66
+ width: auto;
67
+ gap: 8px;
68
+ }
69
+ .pimolu-circular-progress--sm .pimolu-circular-progress__svg {
70
+ width: var(--pimolu-circular-progress-diameter);
71
+ height: var(--pimolu-circular-progress-diameter);
72
+ flex: none;
73
+ }
74
+ .pimolu-circular-progress--sm .pimolu-circular-progress__value {
75
+ position: static;
76
+ max-width: none;
77
+ font-size: 0.75rem;
56
78
  }
57
79
  .pimolu-circular-progress--indeterminate .pimolu-circular-progress__svg {
58
80
  animation: pimolu-circular-progress-rotate 1.4s linear infinite;
@@ -1,11 +1,13 @@
1
1
  /* src/dashboard-layout.css */
2
2
  .pimolu-dashboard-layout {
3
3
  --pimolu-dashboard-sidebar-width: 16rem;
4
+ --pimolu-dashboard-sidebar-track: var(--pimolu-dashboard-sidebar-width);
4
5
  --pimolu-dashboard-aside-width: 20rem;
5
6
  display: grid;
6
- grid-template-columns: var(--pimolu-dashboard-sidebar-width) minmax(0, 1fr);
7
+ grid-template-columns: var(--pimolu-dashboard-sidebar-track) minmax(0, 1fr);
7
8
  grid-template-areas: "sidebar main";
8
9
  box-sizing: border-box;
10
+ min-width: 0;
9
11
  min-height: 100dvh;
10
12
  background: var(--pimolu-background);
11
13
  color: var(--pimolu-foreground);
@@ -16,28 +18,21 @@
16
18
  grid-template-areas: "main";
17
19
  }
18
20
  .pimolu-dashboard-layout[data-aside=true] {
19
- grid-template-columns: var(--pimolu-dashboard-sidebar-width) minmax(0, 1fr) var(--pimolu-dashboard-aside-width);
21
+ grid-template-columns: var(--pimolu-dashboard-sidebar-track) minmax(0, 1fr) var(--pimolu-dashboard-aside-width);
20
22
  grid-template-areas: "sidebar main aside";
21
23
  }
22
24
  .pimolu-dashboard-layout[data-sidebar=false][data-aside=true] {
23
25
  grid-template-columns: minmax(0, 1fr) var(--pimolu-dashboard-aside-width);
24
26
  grid-template-areas: "main aside";
25
27
  }
26
- .pimolu-dashboard-layout:has(.pimolu-sidebar[data-collapsed=true]) {
27
- --pimolu-dashboard-sidebar-width: 3.75rem;
28
- grid-template-columns: 3.75rem minmax(0, 1fr);
29
- }
30
- .pimolu-dashboard-layout[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
31
- grid-template-columns: 3.75rem minmax(0, 1fr) var(--pimolu-dashboard-aside-width);
28
+ .pimolu-dashboard-layout:has(> .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true]) {
29
+ --pimolu-dashboard-sidebar-track: 3.75rem;
32
30
  }
33
- @container (max-width: 1100px) {
31
+ @container (max-width: 900px) {
34
32
  .pimolu-dashboard-layout[data-aside=true] {
35
- grid-template-columns: var(--pimolu-dashboard-sidebar-width) minmax(0, 1fr);
33
+ grid-template-columns: var(--pimolu-dashboard-sidebar-track) minmax(0, 1fr);
36
34
  grid-template-areas: "sidebar main" "aside aside";
37
35
  }
38
- .pimolu-dashboard-layout[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
39
- grid-template-columns: 3.75rem minmax(0, 1fr);
40
- }
41
36
  .pimolu-dashboard-layout[data-sidebar=false][data-aside=true] {
42
37
  grid-template-columns: minmax(0, 1fr);
43
38
  grid-template-areas: "main" "aside";
@@ -48,11 +43,38 @@
48
43
  }
49
44
  }
50
45
  @container (max-width: 720px) {
51
- .pimolu-dashboard-layout {
46
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header {
47
+ display: flex;
48
+ min-height: 40px;
49
+ padding-block: 0;
50
+ }
51
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__toggle {
52
+ position: absolute;
53
+ }
54
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar,
55
+ .pimolu-dashboard-layout[data-sticky-sidebar=true] > .pimolu-dashboard-layout__sidebar {
56
+ position: static;
57
+ max-height: none;
58
+ overflow: visible;
59
+ border-inline-end: 0;
60
+ border-block-end: 1px solid var(--pimolu-border);
61
+ }
62
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar > .pimolu-sidebar {
63
+ width: 100%;
64
+ min-height: auto;
65
+ border-inline-end: 0;
66
+ }
67
+ .pimolu-dashboard-layout__content,
68
+ .pimolu-dashboard-layout__aside {
69
+ padding: var(--pimolu-spacing-4, 16px);
70
+ }
71
+ .pimolu-dashboard-layout,
72
+ .pimolu-dashboard-layout[data-aside],
73
+ .pimolu-dashboard-layout[data-sidebar][data-aside] {
52
74
  grid-template-columns: minmax(0, 1fr);
53
75
  grid-template-areas: "sidebar" "main";
54
76
  }
55
- .pimolu-dashboard-layout[data-aside=true] {
77
+ .pimolu-dashboard-layout[data-sidebar][data-aside=true] {
56
78
  grid-template-areas: "sidebar" "main" "aside";
57
79
  }
58
80
  .pimolu-dashboard-layout[data-sidebar=false] {
@@ -106,9 +128,9 @@
106
128
  border-inline-start: var(--pimolu-control-border-width, 1px) solid var(--pimolu-border);
107
129
  background: var(--pimolu-surface);
108
130
  }
109
- @media (max-width: 1100px) {
131
+ @media (max-width: 900px) {
110
132
  .pimolu-dashboard-layout[data-aside=true] {
111
- grid-template-columns: var(--pimolu-dashboard-sidebar-width) minmax(0, 1fr);
133
+ grid-template-columns: var(--pimolu-dashboard-sidebar-track) minmax(0, 1fr);
112
134
  grid-template-areas: "sidebar main" "aside aside";
113
135
  }
114
136
  .pimolu-dashboard-layout[data-sidebar=false][data-aside=true] {
@@ -120,23 +142,43 @@
120
142
  border-block-start: 1px solid var(--pimolu-border);
121
143
  }
122
144
  }
123
- @media (max-width: 860px) {
124
- .pimolu-dashboard-layout {
145
+ @media (max-width: 720px) {
146
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header {
147
+ display: flex;
148
+ min-height: 40px;
149
+ padding-block: 0;
150
+ }
151
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__toggle {
152
+ position: absolute;
153
+ }
154
+ .pimolu-dashboard-layout[data-sticky-sidebar=true] > .pimolu-dashboard-layout__sidebar {
155
+ position: static;
156
+ max-height: none;
157
+ overflow: visible;
158
+ }
159
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar > .pimolu-sidebar {
160
+ width: 100%;
161
+ min-height: auto;
162
+ border-inline-end: 0;
163
+ }
164
+ .pimolu-dashboard-layout,
165
+ .pimolu-dashboard-layout[data-aside],
166
+ .pimolu-dashboard-layout[data-sidebar][data-aside] {
125
167
  grid-template-columns: minmax(0, 1fr);
126
168
  grid-template-areas: "sidebar" "main";
127
169
  }
128
- .pimolu-dashboard-layout[data-aside=true] {
170
+ .pimolu-dashboard-layout[data-sidebar][data-aside=true] {
129
171
  grid-template-areas: "sidebar" "main" "aside";
130
172
  }
131
- .pimolu-dashboard-layout:has(.pimolu-sidebar[data-collapsed=true]),
132
- .pimolu-dashboard-layout[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
173
+ .pimolu-dashboard-layout:has(> .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true]),
174
+ .pimolu-dashboard-layout[data-aside=true]:has(> .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true]) {
133
175
  grid-template-columns: minmax(0, 1fr);
134
176
  }
135
- .pimolu-dashboard-layout .pimolu-sidebar[data-collapsed=true] {
177
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] {
136
178
  width: 100%;
137
179
  min-height: 60px;
138
180
  }
139
- .pimolu-dashboard-layout .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
181
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
140
182
  display: none;
141
183
  }
142
184
  .pimolu-dashboard-layout[data-sidebar=false] {
@@ -166,15 +208,37 @@
166
208
  }
167
209
  }
168
210
  @container (max-width: 720px) {
169
- .pimolu-dashboard-layout:has(.pimolu-sidebar[data-collapsed=true]),
170
- .pimolu-dashboard-layout[data-aside=true]:has(.pimolu-sidebar[data-collapsed=true]) {
211
+ .pimolu-dashboard-layout:has(> .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true]),
212
+ .pimolu-dashboard-layout[data-aside=true]:has(> .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true]) {
171
213
  grid-template-columns: minmax(0, 1fr);
172
214
  }
173
- .pimolu-dashboard-layout .pimolu-sidebar[data-collapsed=true] {
215
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] {
174
216
  width: 100%;
175
217
  min-height: 60px;
176
218
  }
177
- .pimolu-dashboard-layout .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
219
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__content {
220
+ display: none;
221
+ }
222
+ }
223
+ @container (max-width: 720px) {
224
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header .pimolu-sidebar__expanded {
225
+ display: contents;
226
+ }
227
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header .pimolu-sidebar__compact {
178
228
  display: none;
179
229
  }
230
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__header[data-has-collapsed-content] {
231
+ justify-content: flex-start;
232
+ padding-inline: 8px 100px;
233
+ }
234
+ .pimolu-dashboard-layout > .pimolu-dashboard-layout__sidebar .pimolu-sidebar[data-collapsed=true] > .pimolu-sidebar__footer[data-has-collapsed-content] {
235
+ position: absolute;
236
+ inset-inline-end: 64px;
237
+ inset-block-start: 12px;
238
+ margin: 0;
239
+ padding: 0;
240
+ border: 0;
241
+ height: 40px;
242
+ align-items: center;
243
+ }
180
244
  }