@muten/shadcn 0.2.3 → 0.2.4
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 +6 -0
- package/package.json +1 -1
- package/registry/carousel.muten +4 -3
package/kit.css
CHANGED
|
@@ -1496,6 +1496,12 @@ 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
|
+
@media (min-width: 641px) {
|
|
1502
|
+
.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; }
|
|
1503
|
+
.cx-car[data-only="phone"] .cx-car-bar, .cx-car[data-only="phone"] .cx-car-arrow { display: none; }
|
|
1504
|
+
}
|
|
1499
1505
|
|
|
1500
1506
|
/* filters on the phone: search fills the row, «Filtros» beside it; chips scroll sideways */
|
|
1501
1507
|
.cx-dt-host:has(.cx-fbtn-m) .cx-dt-tools { width: 100%; flex-wrap: nowrap; }
|
package/package.json
CHANGED
package/registry/carousel.muten
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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)
|
|
5
6
|
# Carousel(label: "Products", perView: "2,4") { each products as p { CarouselSlide { … } } }
|
|
6
7
|
# 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") {
|
|
8
|
+
part Carousel(label: text, perView: text = "1", center: text = "", loop: text = "", autoplay: number = 0, indicator: text = "dots", arrows: text = "bar", only: text = "") {
|
|
9
|
+
Section class("cx-car") data(only: $only) aria(label: $label, roledescription: "carrusel") {
|
|
9
10
|
Stack class("cx-car-view") { Stack class("cx-car-track") { slot } }
|
|
10
11
|
Custom Carousel inputs(perView: $perView, center: $center, loop: $loop, autoplay: $autoplay, indicator: $indicator, arrows: $arrows) class("cx-car-behavior")
|
|
11
12
|
}
|