@muten/shadcn 0.2.3 → 0.2.5

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/kit.css CHANGED
@@ -1471,7 +1471,7 @@ p.cx-text { margin: 0; }
1471
1471
  .cx-car-slide { scroll-snap-align: start; min-width: 0; }
1472
1472
  /* a scrolling track clips both axes: 6 px of room above and below keeps a card's ring and shadow whole (it was cut at
1473
1473
  the top), taken back with a negative margin so the carousel does not grow */
1474
- .cx-car-track { padding-block: 6px; margin-block: -6px; }
1474
+ .cx-car-track { padding-block: var(--car-room, 6px); margin-block: calc(-1 * var(--car-room, 6px)); }
1475
1475
  /* while the mouse drags the track it follows the hand; on release kit core settles it on the nearest page */
1476
1476
  .cx-car-track.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
1477
1477
  /* centred like Embla's containScroll: the first slide sits at the start and the last at the end (no empty strip
@@ -1496,6 +1496,18 @@ p.cx-text { margin: 0; }
1496
1496
  .cx-thumb[aria-pressed="true"] { background: transparent; box-shadow: 0 0 0 2px var(--selected); }
1497
1497
  .cx-car-card .cn-card-header { padding: 12px 12px 4px; }
1498
1498
  @media (max-width: 640px) { .cx-car { --per: var(--per-sm) !important; } }
1499
+ /* only: "phone": swiped on a phone; on anything wider the same slides stand still in a grid of the wide perView, with
1500
+ no dots and no arrows (data-only is on the root from the first paint, so a wide screen never sees a track) */
1501
+ /* bleed: "on": a scrolling track clips at its own edges, so on a phone the slide that peeks was cut at the text's margin.
1502
+ The track reaches out to the screen's edges by --car-bleed (the page's side gutter) and pads it back: the first slide
1503
+ still lines up with the text, the next one runs off the screen as it should */
1504
+ @media (max-width: 640px) {
1505
+ .cx-car[data-bleed="on"] .cx-car-track { margin-inline: calc(-1 * var(--car-bleed, 16px)); padding-inline: var(--car-bleed, 16px); scroll-padding-inline: var(--car-bleed, 16px); }
1506
+ }
1507
+ @media (min-width: 641px) {
1508
+ .cx-car[data-only="phone"] .cx-car-track { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(var(--per, 3), minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; padding-block: 0; margin-block: 0; }
1509
+ .cx-car[data-only="phone"] .cx-car-bar, .cx-car[data-only="phone"] .cx-car-arrow { display: none; }
1510
+ }
1499
1511
 
1500
1512
  /* filters on the phone: search fills the row, «Filtros» beside it; chips scroll sideways */
1501
1513
  .cx-dt-host:has(.cx-fbtn-m) .cx-dt-tools { width: 100%; flex-wrap: nowrap; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muten/shadcn",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "shadcn-style component registry for muten - own-the-source parts you add with `muten add`.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +1,14 @@
1
1
  # Carousel - one component, options instead of copies. The slides are your muten content (CarouselSlide).
2
2
  # perView "4" or "2,4" (phone, wider) · center "on" (the active one centred, neighbours peeking) · loop "on" ·
3
3
  # autoplay ms (pauses on hover, focus, touch, hidden tab; off with reduced motion; its own pause button) ·
4
- # indicator dots | progress | count | thumbs · arrows bar | overlay
4
+ # indicator dots | progress | count | thumbs · arrows bar | overlay | none ·
5
+ # only "phone" (a carousel on a phone; on a wider screen the same slides sit still in a grid of perView's wide count) ·
6
+ # bleed "on" (on a phone the track reaches the screen's edges instead of stopping at the text's margin; the margin is
7
+ # --car-bleed, 16px by default) · --car-room on the carousel: the room above and below for shadows (6px)
5
8
  # Carousel(label: "Products", perView: "2,4") { each products as p { CarouselSlide { … } } }
6
9
  # shadcn-for-muten · part + Custom (CarouselBehavior, kit collections) · kit.css (.cx-car).
7
- part Carousel(label: text, perView: text = "1", center: text = "", loop: text = "", autoplay: number = 0, indicator: text = "dots", arrows: text = "bar") {
8
- Section class("cx-car") aria(label: $label, roledescription: "carrusel") {
10
+ part Carousel(label: text, perView: text = "1", center: text = "", loop: text = "", autoplay: number = 0, indicator: text = "dots", arrows: text = "bar", only: text = "", bleed: text = "") {
11
+ Section class("cx-car") data(only: $only, bleed: $bleed) aria(label: $label, roledescription: "carrusel") {
9
12
  Stack class("cx-car-view") { Stack class("cx-car-track") { slot } }
10
13
  Custom Carousel inputs(perView: $perView, center: $center, loop: $loop, autoplay: $autoplay, indicator: $indicator, arrows: $arrows) class("cx-car-behavior")
11
14
  }