@obosbbl/grunnmuren-tailwind 2.4.9 → 2.4.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-tailwind",
3
- "version": "2.4.9",
3
+ "version": "2.4.11",
4
4
  "description": "Grunnmuren Tailwind preset",
5
5
  "license": "MIT",
6
6
  "repository": {
package/tailwind-base.css CHANGED
@@ -174,54 +174,50 @@
174
174
  }
175
175
  }
176
176
 
177
- @utility layout-subgrid-* {
178
- @apply layout-grid-gap-x grid;
179
- }
180
-
181
177
  @utility layout-subgrid-1 {
182
- @apply grid-cols-1;
178
+ @apply layout-grid-gap-x grid grid-cols-1;
183
179
  }
184
180
  @utility layout-subgrid-2 {
185
- @apply grid-cols-2;
181
+ @apply layout-grid-gap-x grid grid-cols-2;
186
182
  }
187
183
  @utility layout-subgrid-3 {
188
- @apply grid-cols-3;
184
+ @apply layout-grid-gap-x grid grid-cols-3;
189
185
  }
190
186
  @utility layout-subgrid-4 {
191
- @apply grid-cols-4;
187
+ @apply layout-grid-gap-x grid grid-cols-4;
192
188
  }
193
189
  @utility layout-subgrid-5 {
194
- @apply grid-cols-5;
190
+ @apply layout-grid-gap-x grid grid-cols-5;
195
191
  }
196
192
  @utility layout-subgrid-6 {
197
- @apply grid-cols-6;
193
+ @apply layout-grid-gap-x grid grid-cols-6;
198
194
  }
199
195
  @utility layout-subgrid-7 {
200
- @apply grid-cols-7;
196
+ @apply layout-grid-gap-x grid grid-cols-7;
201
197
  }
202
198
  @utility layout-subgrid-8 {
203
- @apply grid-cols-8;
199
+ @apply layout-grid-gap-x grid grid-cols-8;
204
200
  }
205
201
  @utility layout-subgrid-9 {
206
- @apply grid-cols-9;
202
+ @apply layout-grid-gap-x grid grid-cols-9;
207
203
  }
208
204
  @utility layout-subgrid-10 {
209
- @apply grid-cols-10;
205
+ @apply layout-grid-gap-x grid grid-cols-10;
210
206
  }
211
207
  @utility layout-subgrid-11 {
212
- @apply grid-cols-11;
208
+ @apply layout-grid-gap-x grid grid-cols-11;
213
209
  }
214
210
  @utility layout-subgrid-12 {
215
- @apply grid-cols-12;
211
+ @apply layout-grid-gap-x grid grid-cols-12;
216
212
  }
217
213
  @utility layout-subgrid-13 {
218
- @apply grid-cols-13;
214
+ @apply layout-grid-gap-x grid grid-cols-13;
219
215
  }
220
216
  @utility layout-subgrid-14 {
221
- @apply grid-cols-14;
217
+ @apply layout-grid-gap-x grid grid-cols-14;
222
218
  }
223
219
  @utility layout-subgrid-full {
224
- @apply layout-subgrid-14;
220
+ @apply layout-grid-gap-x layout-subgrid-14 grid;
225
221
  }
226
222
 
227
223
  @utility layout-gap-x {
@@ -304,6 +300,73 @@
304
300
  @apply ring-focus ring-offset-2;
305
301
  }
306
302
 
303
+ /*** Pagination component styles
304
+ *
305
+ * These have to sit in the utilities layer (not `@layer components`) because
306
+ * they override Button's cva-generated utility classes — `.transition-colors`
307
+ * and `.outline-white`. Rules in the components layer are emitted before
308
+ * utilities and always lose the cascade regardless of selector specificity. */
309
+ @utility gm-pagination {
310
+ @apply flex items-center justify-center gap-2;
311
+ /* The list is the container that drives the responsive hide of the
312
+ outermost page slots — see `[data-outer]` below. */
313
+ container-type: inline-size;
314
+
315
+ /* Every <li> slot is fixed 44px wide and doesn't shrink — keeps the layout
316
+ stable when an ellipsis is swapped in for a page number. */
317
+ & > li {
318
+ @apply w-11 shrink-0;
319
+ }
320
+
321
+ /* Ellipsis slot — flex-centered "…" with an sr-only label describing the
322
+ skipped range. */
323
+ & > li[data-slot='ellipsis'] {
324
+ @apply flex size-11 items-center justify-center;
325
+
326
+ /* The label span is the one without `aria-hidden` (the visible "…" has
327
+ it). Selecting via the attribute absence avoids adding another marker. */
328
+ & > span:not([aria-hidden]) {
329
+ @apply sr-only;
330
+ }
331
+ }
332
+
333
+ /* Page-number buttons hold text, not an icon — force a square 44×44
334
+ (the Button `isIconOnly` variant is for icons). `transition-none`
335
+ prevents the hover-colour transition from flickering when rapid clicks
336
+ change which button is active. `:not(:has(svg))` distinguishes them
337
+ from prev/next which contain a chevron icon. */
338
+ & [data-slot='button']:not(:has(svg)) {
339
+ @apply size-11 transition-none;
340
+ }
341
+
342
+ /* color="white" sets outline-white for focus — invisible on white page
343
+ backgrounds. Force black via this higher-specificity selector so we
344
+ don't fight cva ordering inside Button. */
345
+ & [data-slot='button']:focus-visible {
346
+ @apply outline-black;
347
+ }
348
+
349
+ /* At a boundary, prev/next is rendered as a `<button>` (no href in JSX),
350
+ and our manual aria-disabled passes through (RACButton's useButton
351
+ forwards it, unlike RACLink which strips it). */
352
+ & [data-slot='button'][aria-disabled='true'] {
353
+ @apply cursor-default opacity-30;
354
+
355
+ &:hover {
356
+ @apply bg-white;
357
+ }
358
+ }
359
+
360
+ /* When the list is narrower than its full 8-slot width (~408px), hide the
361
+ two outermost page items — `data-outer` is set in JS on the visiblePages
362
+ entries farthest from the current page. */
363
+ @container (max-width: 27rem) {
364
+ & [data-outer] {
365
+ display: none;
366
+ }
367
+ }
368
+ }
369
+
307
370
  /** Hides the scrollbar visually */
308
371
  @utility scrollbar-hidden {
309
372
  /* For IE, Edge and Firefox */
@@ -195,7 +195,7 @@
195
195
  }
196
196
 
197
197
  &:where(blockquote) {
198
- @apply before:font-display grid grid-cols-[2.25rem_1fr] pt-4 text-[1rem]/[1.625rem] font-medium italic before:text-[3rem]/[1.375rem] before:not-italic before:content-["“"] lg:text-[1rem]/[1.6875rem];
198
+ @apply blockquote;
199
199
  margin-top: 1.6em;
200
200
  margin-bottom: 1.6em;
201
201
  }