aristid-ds 19.0.0 → 19.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/CHANGELOG.md +14 -0
- package/dist/Kit/DataDisplay/Carousel/CarouselArrow.d.ts +1 -1
- package/dist/Kit/DataDisplay/Carousel/index.js +1 -1
- package/dist/Kit/DataDisplay/Carousel/types.d.ts +25 -6
- package/dist/Kit/index.js +1 -1
- package/dist/assets/Carousel.css +1 -1
- package/dist/chunks/{Carousel.BXjTC7TI.js → Carousel.DhHzMOVA.js} +52 -38
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/src/Kit/DataDisplay/Carousel/CarouselArrow.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [19.1.0](https://www.npmjs.com/package/aristid-ds/v/19.1.0) (2026-10-30)
|
|
4
|
+
|
|
5
|
+
### ✨ Features
|
|
6
|
+
|
|
7
|
+
- **Carousel:**
|
|
8
|
+
- Add the `unifiedSlidesHeight` prop to make all the slides as tall as the tallest one (@frykten)
|
|
9
|
+
- Add the `disableActiveSlideZoom` prop to turn off the zoom on the centered slide and display all the slides at the same size (@frykten)
|
|
10
|
+
|
|
11
|
+
### 🐛 Bug Fixes
|
|
12
|
+
|
|
13
|
+
- **Carousel:**
|
|
14
|
+
- Fix the arrows getting stuck before the last slides when `infinite` is `false`; they are now disabled on the first and last slide (@frykten)
|
|
15
|
+
- Fix `arrows` and `bullets` being on by default, which forced consumers to turn them off: they become `hideArrows` and `hideBullets` (@frykten)
|
|
16
|
+
|
|
3
17
|
## [19.0.0](https://www.npmjs.com/package/aristid-ds/v/19.0.0) (2026-09-11)
|
|
4
18
|
|
|
5
19
|
### ✨ Features
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KitCarouselArrowProps } from './types';
|
|
2
2
|
export declare const CarouselArrow: {
|
|
3
|
-
({ direction, label, onClick }: KitCarouselArrowProps): import("node_modules/@types/react").JSX.Element;
|
|
3
|
+
({ direction, label, disabled, onClick }: KitCarouselArrowProps): import("node_modules/@types/react").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../chunks/Carousel.
|
|
1
|
+
import { t as e } from "../../../chunks/Carousel.DhHzMOVA.js";
|
|
2
2
|
export { e as KitCarousel };
|
|
@@ -4,7 +4,7 @@ import { CarouselProps } from 'antd/es/carousel';
|
|
|
4
4
|
/**
|
|
5
5
|
* Props driven by the design system, they can't be overridden by the consumer:
|
|
6
6
|
* - the dots are replaced by the design system bullet navigation
|
|
7
|
-
* - the arrows are replaced by the design system floating buttons
|
|
7
|
+
* - the arrows are replaced by the design system floating buttons, see `hideArrows`
|
|
8
8
|
* - the carousel is always horizontal and always centers the current slide
|
|
9
9
|
*/
|
|
10
10
|
type AntdCarouselTypesToOmit =
|
|
@@ -14,6 +14,7 @@ type AntdCarouselTypesToOmit =
|
|
|
14
14
|
| 'dotPosition'
|
|
15
15
|
| 'dots'
|
|
16
16
|
| 'dotsClass'
|
|
17
|
+
| 'arrows'
|
|
17
18
|
| 'nextArrow'
|
|
18
19
|
| 'prefixCls'
|
|
19
20
|
| 'prevArrow'
|
|
@@ -29,16 +30,33 @@ export interface KitCarouselProps extends Omit<CarouselProps, AntdCarouselTypesT
|
|
|
29
30
|
* @default 3
|
|
30
31
|
*/
|
|
31
32
|
slidesToShow?: number;
|
|
33
|
+
'data-testid'?: string;
|
|
32
34
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @default
|
|
35
|
+
* Hide the floating previous/next navigation buttons.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
hideArrows?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Hide the bullet navigation below the slides.
|
|
41
|
+
* @default false
|
|
35
42
|
*/
|
|
36
|
-
|
|
43
|
+
hideBullets?: boolean;
|
|
37
44
|
/**
|
|
38
|
-
*
|
|
45
|
+
* Loop back to the first slide after the last one, and the other way round.
|
|
39
46
|
* @default true
|
|
40
47
|
*/
|
|
41
|
-
|
|
48
|
+
infinite?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Make all the slides as tall as the tallest one, so the slides stay still when one grows taller.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
unifiedSlidesHeight?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Turn off the zoom on the centered slide, so all the slides are displayed at the same size.
|
|
56
|
+
* By default the slides around the centered one are displayed smaller.
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
59
|
+
disableActiveSlideZoom?: boolean;
|
|
42
60
|
}
|
|
43
61
|
|
|
44
62
|
export type KitCarouselRef = GetRef<typeof AntdCarousel>;
|
|
@@ -51,6 +69,7 @@ export type KitCarouselArrowDirection = 'previous' | 'next';
|
|
|
51
69
|
export interface KitCarouselArrowProps {
|
|
52
70
|
direction: KitCarouselArrowDirection;
|
|
53
71
|
label?: string;
|
|
72
|
+
disabled?: boolean;
|
|
54
73
|
onClick: MouseEventHandler<HTMLElement>;
|
|
55
74
|
}
|
|
56
75
|
|
package/dist/Kit/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { t as o } from "../chunks/Typography.khBUDIFU.js";
|
|
|
8
8
|
import { KitSpace as s } from "./General/Space/index.js";
|
|
9
9
|
import { t as c } from "../chunks/Avatar.BR-GppEl.js";
|
|
10
10
|
import { t as l } from "../chunks/Card.FsA9GEEd.js";
|
|
11
|
-
import { t as u } from "../chunks/Carousel.
|
|
11
|
+
import { t as u } from "../chunks/Carousel.DhHzMOVA.js";
|
|
12
12
|
import { n as d, t as f } from "../chunks/Comment.DUV5n3h0.js";
|
|
13
13
|
import { t as p } from "../chunks/IdCard.BJMOxGIV.js";
|
|
14
14
|
import { t as m } from "../chunks/InputWrapper.C1FqFlJW.js";
|
package/dist/assets/Carousel.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._kit-
|
|
1
|
+
._kit-carousel_175y3_1{--kit-carousel-inactive-slide-scale:var(--components-Carousel-slide-inactiveScale,.9);--kit-carousel-transition:.3s ease;--kit-carousel-arrow-offset:calc(var(--components-Carousel-arrow-offset,calc(var(--general-spacing-xl) / 2)) * -1px);--kit-carousel-slide-inset:0px;--kit-carousel-clip-bleed:4px;--kit-carousel-bullet-color:var(--components-Carousel-bulletNav-bullet-colors-default,var(--general-utilities-border));--kit-carousel-bullet-color-hover:var(--components-Carousel-bulletNav-bullet-colors-hover,var(--general-utilities-main-medium));--kit-carousel-bullet-color-active:var(--components-Carousel-bulletNav-bullet-colors-active,var(--general-utilities-main-default));align-items:center;row-gap:calc(var(--components-Carousel-bulletNav-marginTop,var(--general-spacing-s)) * 1px);flex-direction:column;width:100%;display:flex}._kit-carousel_175y3_1.kit-carousel-peek.kit-carousel-scaled{--kit-carousel-slide-inset:calc(100% / var(--kit-carousel-slides-to-show) * (1 - var(--kit-carousel-inactive-slide-scale)) / 2)}._kit-carousel_175y3_1 .kit-carousel-slides{width:100%;position:relative}._kit-carousel_175y3_1 .kit-carousel-slides .kit-carousel-slider{margin-inline:calc(var(--kit-carousel-clip-bleed) * -1);padding-inline:var(--kit-carousel-clip-bleed);overflow:clip visible}._kit-carousel_175y3_1 .kit-carousel-slides .slick-list{overflow:visible}._kit-carousel_175y3_1 .slick-track{align-items:center;display:flex}._kit-carousel_175y3_1 .slick-track:before,._kit-carousel_175y3_1 .slick-track:after{display:none}._kit-carousel_175y3_1 .slick-slide{float:none;box-sizing:border-box;flex:none;height:auto}._kit-carousel_175y3_1 .kit-carousel-slide{display:block}._kit-carousel_175y3_1.kit-carousel-unified-slides-height .slick-track{align-items:stretch}._kit-carousel_175y3_1.kit-carousel-unified-slides-height .slick-slide{display:flex}._kit-carousel_175y3_1.kit-carousel-unified-slides-height .slick-slide>div{flex:1;min-width:0;display:flex}._kit-carousel_175y3_1.kit-carousel-unified-slides-height .slick-slide>div>.kit-carousel-slide>*{box-sizing:border-box;height:100%}._kit-carousel_175y3_1.kit-carousel-scaled .slick-slide{transform:scale(var(--kit-carousel-inactive-slide-scale));transition:transform var(--kit-carousel-transition)}._kit-carousel_175y3_1.kit-carousel-scaled .slick-slide.slick-center{transform:scale(1)}._kit-carousel_175y3_1:not(.kit-carousel-scaled) .slick-slide{padding-inline:calc(var(--general-spacing-s) / 2 * 1px)}._kit-carousel_175y3_1 .kit-carousel-arrow{z-index:2;position:absolute;top:50%;transform:translateY(-50%)}._kit-carousel_175y3_1 .kit-carousel-arrow.kit-carousel-arrow-previous{inset-inline-start:calc(var(--kit-carousel-slide-inset) + var(--kit-carousel-arrow-offset))}._kit-carousel_175y3_1 .kit-carousel-arrow.kit-carousel-arrow-next{inset-inline-end:calc(var(--kit-carousel-slide-inset) + var(--kit-carousel-arrow-offset))}._kit-carousel_175y3_1 .kit-carousel-bullet-nav{align-items:center;column-gap:calc(var(--components-Carousel-bulletNav-gap,var(--general-spacing-xs)) * 1px);display:flex}._kit-carousel_175y3_1 .kit-carousel-bullet{width:calc(var(--components-Carousel-bulletNav-bullet-width,var(--general-spacing-s)) * 1px);height:calc(var(--components-Carousel-bulletNav-bullet-height,var(--general-spacing-xxs)) * 1px);padding:calc(var(--general-spacing-none) * 1px);border-radius:calc(var(--general-border-radius-pills) * 1px);background-color:var(--kit-carousel-bullet-color);transition:background-color var(--kit-carousel-transition);cursor:pointer;border:none;position:relative}._kit-carousel_175y3_1 .kit-carousel-bullet:after{content:"";inset:calc(var(--general-spacing-xs) * -1px) calc(var(--general-spacing-none) * 1px);position:absolute}._kit-carousel_175y3_1 .kit-carousel-bullet:hover{background-color:var(--kit-carousel-bullet-color-hover)}._kit-carousel_175y3_1 .kit-carousel-bullet:focus-visible{outline:3px solid var(--general-utilities-focus);outline-offset:calc(var(--general-spacing-xxs) * 1px)}._kit-carousel_175y3_1 .kit-carousel-bullet.kit-carousel-bullet-active{background-color:var(--kit-carousel-bullet-color-active);cursor:default}
|
|
@@ -8,8 +8,9 @@ import h from "classnames";
|
|
|
8
8
|
import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
|
|
9
9
|
import { faChevronLeft as _, faChevronRight as v } from "@fortawesome/free-solid-svg-icons";
|
|
10
10
|
import '../assets/Carousel.css';//#region src/Kit/DataDisplay/Carousel/CarouselArrow.tsx
|
|
11
|
-
var y = ({ direction: e, label: t,
|
|
12
|
-
onClick:
|
|
11
|
+
var y = ({ direction: e, label: t, disabled: r, onClick: a }) => i(n, {
|
|
12
|
+
onClick: a,
|
|
13
|
+
disabled: r,
|
|
13
14
|
type: "segmented",
|
|
14
15
|
size: "l",
|
|
15
16
|
iconSize: "l",
|
|
@@ -35,12 +36,12 @@ var b = ({ count: e, currentSlide: t, label: n, getSlideLabel: r, onSelect: a })
|
|
|
35
36
|
b.displayName = "CarouselBulletNav";
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/Kit/DataDisplay/Carousel/styles.module.scss
|
|
38
|
-
var x = { "kit-carousel": "_kit-
|
|
39
|
-
let { appId:
|
|
40
|
-
u(
|
|
41
|
-
let
|
|
39
|
+
var x = { "kit-carousel": "_kit-carousel_175y3_1" }, S = 3, C = "0px", w = (e, t) => t > 0 ? (e % t + t) % t : 0, T = s(({ className: n, style: s, children: g, hideArrows: _ = !1, hideBullets: v = !1, infinite: T = !0, unifiedSlidesHeight: E = !1, disableActiveSlideZoom: D = !1, initialSlide: O = 0, slidesToShow: k = S, beforeChange: A, afterChange: j, "data-testid": M, ...N }, P) => {
|
|
40
|
+
let { appId: F } = e(), { locale: I } = t(), L = f(null), R = f(null), [z, B] = p(O);
|
|
41
|
+
u(P, () => L.current);
|
|
42
|
+
let V = d(() => o.toArray(g), [g]), H = V.length;
|
|
42
43
|
l(() => {
|
|
43
|
-
let e =
|
|
44
|
+
let e = R.current;
|
|
44
45
|
if (!e) return;
|
|
45
46
|
let t = () => e.querySelectorAll(".slick-slide").forEach((e) => {
|
|
46
47
|
e.toggleAttribute("inert", e.getAttribute("aria-hidden") === "true");
|
|
@@ -53,53 +54,66 @@ var x = { "kit-carousel": "_kit-carousel_1rlnf_1" }, S = 3, C = "0px", w = (e, t
|
|
|
53
54
|
childList: !0,
|
|
54
55
|
subtree: !0
|
|
55
56
|
}), () => n.disconnect();
|
|
56
|
-
}, [
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
}, [H]);
|
|
58
|
+
let U = Math.max(1, Math.min(k, H || 1)), W = H > U, G = H - 1, K = !T && W ? U - 1 : 0, q = I.Carousel, J = !_ && W, Y = !v && W, X = (e, t) => {
|
|
59
|
+
B(T ? w(t, H) : Math.min(t, G)), A?.(e, t);
|
|
60
|
+
}, Z = (e) => {
|
|
61
|
+
var t;
|
|
62
|
+
if (e > G) {
|
|
63
|
+
(t = L.current) == null || t.goTo(G);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
j?.(e);
|
|
67
|
+
}, Q = (e) => L.current?.goTo(e), $ = () => T ? L.current?.prev() : L.current?.goTo(Math.max(z - 1, 0)), ee = () => T ? L.current?.next() : L.current?.goTo(Math.min(z + 1, G)), te = h(F, x["kit-carousel"], n, {
|
|
68
|
+
"kit-carousel-navigable": W,
|
|
69
|
+
"kit-carousel-peek": U > 1,
|
|
70
|
+
"kit-carousel-scaled": W && !D,
|
|
71
|
+
"kit-carousel-unified-slides-height": E
|
|
72
|
+
}), ne = {
|
|
63
73
|
...s,
|
|
64
|
-
"--kit-carousel-slides-to-show":
|
|
74
|
+
"--kit-carousel-slides-to-show": U
|
|
65
75
|
};
|
|
66
76
|
return a("div", {
|
|
67
|
-
className:
|
|
68
|
-
style:
|
|
77
|
+
className: te,
|
|
78
|
+
style: ne,
|
|
79
|
+
"data-testid": M,
|
|
69
80
|
children: [a("div", {
|
|
70
81
|
className: "kit-carousel-slides",
|
|
71
|
-
ref:
|
|
72
|
-
children: [
|
|
73
|
-
...
|
|
74
|
-
ref:
|
|
82
|
+
ref: R,
|
|
83
|
+
children: [a(m, {
|
|
84
|
+
...N,
|
|
85
|
+
ref: L,
|
|
75
86
|
className: "kit-carousel-slider",
|
|
76
87
|
infinite: T,
|
|
77
|
-
initialSlide:
|
|
78
|
-
slidesToShow:
|
|
79
|
-
centerMode:
|
|
88
|
+
initialSlide: O,
|
|
89
|
+
slidesToShow: U,
|
|
90
|
+
centerMode: W,
|
|
80
91
|
centerPadding: C,
|
|
81
92
|
dots: !1,
|
|
82
93
|
arrows: !1,
|
|
83
|
-
beforeChange:
|
|
84
|
-
|
|
94
|
+
beforeChange: X,
|
|
95
|
+
afterChange: Z,
|
|
96
|
+
children: [V.map((e, t) => i("div", {
|
|
85
97
|
className: "kit-carousel-slide",
|
|
86
98
|
children: e
|
|
87
|
-
}, c(e) && e.key !== null ? e.key : t))
|
|
88
|
-
}),
|
|
99
|
+
}, c(e) && e.key !== null ? e.key : t)), Array.from({ length: K }, (e, t) => i("div", { "aria-hidden": !0 }, `kit-carousel-spacer-${t}`))]
|
|
100
|
+
}), J && a(r, { children: [i(y, {
|
|
89
101
|
direction: "previous",
|
|
90
|
-
label:
|
|
91
|
-
|
|
102
|
+
label: q?.previousSlide,
|
|
103
|
+
disabled: !T && z === 0,
|
|
104
|
+
onClick: $
|
|
92
105
|
}), i(y, {
|
|
93
106
|
direction: "next",
|
|
94
|
-
label:
|
|
95
|
-
|
|
107
|
+
label: q?.nextSlide,
|
|
108
|
+
disabled: !T && z === G,
|
|
109
|
+
onClick: ee
|
|
96
110
|
})] })]
|
|
97
|
-
}),
|
|
98
|
-
count:
|
|
99
|
-
currentSlide:
|
|
100
|
-
label:
|
|
101
|
-
getSlideLabel: (e) => `${
|
|
102
|
-
onSelect:
|
|
111
|
+
}), Y && i(b, {
|
|
112
|
+
count: H,
|
|
113
|
+
currentSlide: z,
|
|
114
|
+
label: q?.bulletNav,
|
|
115
|
+
getSlideLabel: (e) => `${q?.goToSlide ?? ""} ${e}`.trim(),
|
|
116
|
+
onSelect: Q
|
|
103
117
|
})]
|
|
104
118
|
});
|
|
105
119
|
});
|
package/dist/index.es.js
CHANGED
|
@@ -12,7 +12,7 @@ import { KitSpace as u } from "./Kit/General/Space/index.js";
|
|
|
12
12
|
import { n as d } from "./chunks/useKitSpellCheckConfig.C5xhCJ-X.js";
|
|
13
13
|
import { t as f } from "./chunks/Avatar.BR-GppEl.js";
|
|
14
14
|
import { t as p } from "./chunks/Card.FsA9GEEd.js";
|
|
15
|
-
import { t as m } from "./chunks/Carousel.
|
|
15
|
+
import { t as m } from "./chunks/Carousel.DhHzMOVA.js";
|
|
16
16
|
import { n as h, t as g } from "./chunks/Comment.DUV5n3h0.js";
|
|
17
17
|
import { t as _ } from "./chunks/IdCard.BJMOxGIV.js";
|
|
18
18
|
import { t as v } from "./chunks/InputWrapper.C1FqFlJW.js";
|