gd-design-library 1.0.0 → 1.0.2
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/components/core/Breadcrumbs/BreadcrumbsStyled.js +11 -11
- package/components/core/Button/Button.js +15 -14
- package/components/core/Input/Input.d.ts +1 -1
- package/components/domainSpecific/Carousel/Carousel.js +22 -25
- package/components/domainSpecific/ContentCarousel/ContentCarousel.js +25 -28
- package/package.json +1 -1
- package/tokens/accordion.d.ts +62 -1
- package/tokens/avatar.d.ts +119 -1
- package/tokens/box.d.ts +42 -1
- package/tokens/breadcrumbs.d.ts +27 -1
- package/tokens/breadcrumbs.js +11 -14
- package/tokens/button.d.ts +136 -1
- package/tokens/button.js +25 -27
- package/tokens/card.d.ts +133 -1
- package/tokens/carousel.d.ts +196 -1
- package/tokens/chat.d.ts +135 -1
- package/tokens/chatbubble.d.ts +64 -1
- package/tokens/colors.d.ts +9 -23
- package/tokens/colors.js +13 -27
- package/tokens/counter.d.ts +38 -1
- package/tokens/defaultTheme.d.ts +3672 -540
- package/tokens/draganddrop.d.ts +60 -1
- package/tokens/draganddrop.js +30 -30
- package/tokens/header.d.ts +107 -1
- package/tokens/image.d.ts +31 -1
- package/tokens/index.d.ts +3289 -477
- package/tokens/index.js +1 -1
- package/tokens/inlineNotification.d.ts +62 -1
- package/tokens/input.d.ts +212 -1
- package/tokens/link.d.ts +80 -1
- package/tokens/list.d.ts +89 -1
- package/tokens/loader.d.ts +135 -1
- package/tokens/menu.d.ts +12 -1
- package/tokens/modal.d.ts +89 -1
- package/tokens/price.d.ts +23 -1
- package/tokens/progressbar.d.ts +51 -1
- package/tokens/radiogroup.d.ts +80 -1
- package/tokens/rating.d.ts +67 -1
- package/tokens/scroll.d.ts +91 -1
- package/tokens/search.d.ts +39 -1
- package/tokens/search.js +9 -9
- package/tokens/searchModal.d.ts +153 -1
- package/tokens/select.d.ts +92 -1
- package/tokens/skeleton.d.ts +68 -1
- package/tokens/slider.d.ts +58 -1
- package/tokens/snackbar.d.ts +156 -1
- package/tokens/stepper.d.ts +122 -1
- package/tokens/stepper.js +24 -24
- package/tokens/switch.d.ts +67 -1
- package/tokens/tabs.d.ts +88 -1
- package/tokens/tabs.js +20 -20
- package/tokens/toggle.d.ts +9 -1
- package/tokens/tooltip.d.ts +61 -1
- package/tokens/typography.d.ts +144 -1
- package/tokens/values.js +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getBoxStyles as S, tokensHandler as
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
|
+
import { getBoxStyles as S, tokensHandler as a } from "../../../tokens/utils.js";
|
|
5
5
|
import { get as m } from "../../../utils/helpers.js";
|
|
6
|
-
const x =
|
|
6
|
+
const x = p((e, t) => {
|
|
7
7
|
const {
|
|
8
8
|
theme: {
|
|
9
9
|
breadcrumbs: s,
|
|
@@ -13,10 +13,10 @@ const x = u((e, t) => {
|
|
|
13
13
|
styles: n = {},
|
|
14
14
|
...c
|
|
15
15
|
} = e, {
|
|
16
|
-
boxStyles:
|
|
17
|
-
restProps:
|
|
18
|
-
} = S(c),
|
|
19
|
-
return /* @__PURE__ */ d("div", { css:
|
|
16
|
+
boxStyles: y,
|
|
17
|
+
restProps: u
|
|
18
|
+
} = S(c), l = new Proxy(s || {}, a(r)), b = [m(l, "default", {}), o ? m(l, "bordered", {}) : {}, y, n];
|
|
19
|
+
return /* @__PURE__ */ d("div", { css: b, ...u, ref: t });
|
|
20
20
|
}), B = (e) => {
|
|
21
21
|
const {
|
|
22
22
|
theme: {
|
|
@@ -25,7 +25,7 @@ const x = u((e, t) => {
|
|
|
25
25
|
} = {},
|
|
26
26
|
styles: r = {},
|
|
27
27
|
...o
|
|
28
|
-
} = e, n = new Proxy(t || {},
|
|
28
|
+
} = e, n = new Proxy(t || {}, a(s)), c = [m(n, "item.default", {}), r];
|
|
29
29
|
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
30
30
|
}, w = (e) => {
|
|
31
31
|
const {
|
|
@@ -35,7 +35,7 @@ const x = u((e, t) => {
|
|
|
35
35
|
} = {},
|
|
36
36
|
styles: r = {},
|
|
37
37
|
...o
|
|
38
|
-
} = e, n = new Proxy(t || {},
|
|
38
|
+
} = e, n = new Proxy(t || {}, a(s)), c = [m(n, "separator.default", {}), r];
|
|
39
39
|
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
40
40
|
}, v = (e) => {
|
|
41
41
|
const {
|
|
@@ -45,7 +45,7 @@ const x = u((e, t) => {
|
|
|
45
45
|
} = {},
|
|
46
46
|
styles: r = {},
|
|
47
47
|
...o
|
|
48
|
-
} = e, n = new Proxy(t || {},
|
|
48
|
+
} = e, n = new Proxy(t || {}, a(s)), c = [m(n, "item.itemStart", {}), r];
|
|
49
49
|
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
50
50
|
}, I = (e) => {
|
|
51
51
|
const {
|
|
@@ -55,7 +55,7 @@ const x = u((e, t) => {
|
|
|
55
55
|
} = {},
|
|
56
56
|
styles: r = {},
|
|
57
57
|
...o
|
|
58
|
-
} = e, n = new Proxy(t || {},
|
|
58
|
+
} = e, n = new Proxy(t || {}, a(s)), c = [m(n, "item.itemEnd", {}), r];
|
|
59
59
|
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
60
60
|
};
|
|
61
61
|
export {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as $, jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { convertToInlineBoxStyles as
|
|
5
|
-
import { COMPONENT_NAME as
|
|
3
|
+
import { forwardRef as b } from "react";
|
|
4
|
+
import { convertToInlineBoxStyles as x } from "../../../tokens/utils.js";
|
|
5
|
+
import { COMPONENT_NAME as e } from "./constants.js";
|
|
6
6
|
import { ButtonStyled as T, StartIconStyled as E, ContentStyled as N, EndIconStyled as v } from "./ButtonStyled.js";
|
|
7
7
|
import { ButtonVariant as C, ButtonTypes as P, ButtonRole as j } from "../../../types/button.js";
|
|
8
8
|
import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { get as O } from "../../../utils/helpers.js";
|
|
10
|
+
import { TabIndex as R } from "../../../types/accesability.js";
|
|
11
|
+
const W = b((s, m) => {
|
|
11
12
|
const {
|
|
12
|
-
theme:
|
|
13
|
+
theme: t
|
|
13
14
|
} = M(), {
|
|
14
15
|
variant: u = C.Primary,
|
|
15
|
-
rounded: c = "none",
|
|
16
|
+
rounded: c = O(t, "button.attrs.rounded", "none"),
|
|
16
17
|
children: o,
|
|
17
18
|
iconStart: r = null,
|
|
18
19
|
iconEnd: a = null,
|
|
@@ -23,21 +24,21 @@ const R = x((s, m) => {
|
|
|
23
24
|
ariaPressed: l,
|
|
24
25
|
role: h = j.Button,
|
|
25
26
|
fullWidth: B = !1,
|
|
26
|
-
tabIndex: I =
|
|
27
|
+
tabIndex: I = R.Default,
|
|
27
28
|
onClick: S,
|
|
28
29
|
...d
|
|
29
30
|
} = s;
|
|
30
|
-
return /* @__PURE__ */ $(T, { ref: m, $variant: u, $isIcon: y, $fullWidth: B, $rounded: c, disabled: p, onClick: S, type: f, role: h, theme:
|
|
31
|
+
return /* @__PURE__ */ $(T, { ref: m, $variant: u, $isIcon: y, $fullWidth: B, $rounded: c, disabled: p, onClick: S, type: f, role: h, theme: t, tabIndex: I, "data-testid": e, ...x(d), ...i ? {
|
|
31
32
|
"aria-label": i
|
|
32
33
|
} : {}, ...l ? {
|
|
33
34
|
"aria-pressed": l
|
|
34
35
|
} : {}, ...d, children: [
|
|
35
|
-
r ? /* @__PURE__ */ n(E, { theme:
|
|
36
|
-
o ? /* @__PURE__ */ n(N, { theme:
|
|
37
|
-
a ? /* @__PURE__ */ n(v, { theme:
|
|
36
|
+
r ? /* @__PURE__ */ n(E, { theme: t, "data-testid": `${e}-icon-start`, children: r }) : null,
|
|
37
|
+
o ? /* @__PURE__ */ n(N, { theme: t, "data-testid": `${e}-content`, children: o }) : null,
|
|
38
|
+
a ? /* @__PURE__ */ n(v, { theme: t, "data-testid": `${e}-icon-end`, children: a }) : null
|
|
38
39
|
] });
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
W.displayName = e;
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
W as Button
|
|
43
44
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputFieldProps } from './Input.types';
|
|
2
|
-
export declare const Input: import('react').ForwardRefExoticComponent<(InputFieldProps & Partial<Omit<HTMLInputElement, "color" | "prefix" | "disabled" | "tabIndex" | "type" | "hidden" | "width" | "children" | "className" | "role" | "content" | "translate" | "name" | "label" | "
|
|
2
|
+
export declare const Input: import('react').ForwardRefExoticComponent<(InputFieldProps & Partial<Omit<HTMLInputElement, "color" | "prefix" | "disabled" | "tabIndex" | "type" | "hidden" | "width" | "children" | "className" | "role" | "content" | "translate" | "name" | "label" | "styles" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "title" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "placeholder" | "adornmentStart" | "adornmentEnd" | "debounceCallbackTime" | "readOnly" | "required" | "ariaRequired" | "ariaDescribedBy" | "wrapperAs" | "helperText">>) & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import { jsx as t, jsxs as S } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { Fragment as F, forwardRef as q, Children as G, isValidElement as J, cloneElement as K, useRef as Q, useImperativeHandle as U } from "react";
|
|
4
4
|
import { COMPONENT_NAME as o } from "./constants.js";
|
|
5
|
-
import { CarouselSlideStyled as B, CarouselContainerStyled as X, CarouselControlsWrapperStyled as Y, CarouselControlsStyled as Z, CarouselControlsButtonStyled as T, ContentContainerStyled as tt, CarouselViewportStyled as et, CarouselViewportSlideWrapperStyled as rt, CarouselDotsStyled as ot, CarouselDotStyled as at, CarouselThumbsStyled as nt, CarouselThumbsViewportStyled as
|
|
5
|
+
import { CarouselSlideStyled as B, CarouselContainerStyled as X, CarouselControlsWrapperStyled as Y, CarouselControlsStyled as Z, CarouselControlsButtonStyled as T, ContentContainerStyled as tt, CarouselViewportStyled as et, CarouselViewportSlideWrapperStyled as rt, CarouselDotsStyled as ot, CarouselDotStyled as at, CarouselThumbsStyled as nt, CarouselThumbsViewportStyled as lt, CarouselThumbsWrapperStyled as it, CarouselThumbStyled as st } from "./CarouselStyled.js";
|
|
6
6
|
import { useCarousel as dt } from "../../../hooks/useCarousel/useCarousel.js";
|
|
7
|
-
import { LayoutType as ct, ThumbsPosition as
|
|
7
|
+
import { LayoutType as ct, ThumbsPosition as E, CarouselVariantTypes as ut } from "../../../types/carousel.js";
|
|
8
8
|
import { Typography as R } from "../../core/Typography/Typography.js";
|
|
9
|
-
import { TypographyVariant as
|
|
9
|
+
import { TypographyVariant as j } from "../../../types/typography.js";
|
|
10
10
|
import { Image as mt } from "../../core/Image/Image.js";
|
|
11
11
|
import { useTheme as pt } from "../../../hooks/useTheme/useTheme.js";
|
|
12
|
-
import { get as
|
|
12
|
+
import { get as V } from "../../../utils/helpers.js";
|
|
13
13
|
import { TabIndex as A } from "../../../types/accesability.js";
|
|
14
14
|
import { ButtonVariant as g } from "../../../types/button.js";
|
|
15
15
|
import { Icon as I } from "../../core/Icon/Icon.js";
|
|
16
16
|
function ft(r) {
|
|
17
|
-
const
|
|
17
|
+
const i = [];
|
|
18
18
|
function s(x) {
|
|
19
19
|
return G.toArray(x).flatMap((n) => {
|
|
20
20
|
if (!J(n))
|
|
21
21
|
return [n];
|
|
22
22
|
if (n.type === ht.Image)
|
|
23
|
-
return
|
|
23
|
+
return i.push(n), [];
|
|
24
24
|
const {
|
|
25
25
|
children: d,
|
|
26
26
|
...N
|
|
@@ -34,36 +34,33 @@ function ft(r) {
|
|
|
34
34
|
}
|
|
35
35
|
const w = s(r);
|
|
36
36
|
return {
|
|
37
|
-
images:
|
|
37
|
+
images: i,
|
|
38
38
|
content: /* @__PURE__ */ t(F, { children: w })
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
const L = q(({
|
|
42
42
|
layout: r = ct.Horizontal,
|
|
43
|
-
variant:
|
|
43
|
+
variant: i = ut.Cards,
|
|
44
44
|
showArrows: s = !0,
|
|
45
45
|
isFocusable: w = !0,
|
|
46
46
|
showDots: x = !1,
|
|
47
|
-
thumbs: n =
|
|
47
|
+
thumbs: n = E.End,
|
|
48
48
|
styles: d,
|
|
49
49
|
children: N
|
|
50
50
|
}, c) => {
|
|
51
|
-
var
|
|
51
|
+
var D;
|
|
52
52
|
const {
|
|
53
53
|
theme: e
|
|
54
54
|
} = pt(), {
|
|
55
|
-
images:
|
|
55
|
+
images: l,
|
|
56
56
|
content: P
|
|
57
|
-
} = ft(N), {
|
|
58
|
-
active: u,
|
|
59
|
-
disabled: m
|
|
60
|
-
} = j(e, "colors.icon.primary"), {
|
|
57
|
+
} = ft(N), u = V(e, "colors.icon.default"), m = V(e, "colors.icon.disabled"), {
|
|
61
58
|
icons: {
|
|
62
59
|
base: p,
|
|
63
60
|
controlLeft: H,
|
|
64
61
|
controlRight: M
|
|
65
62
|
}
|
|
66
|
-
} =
|
|
63
|
+
} = V(e, "carousel"), k = Q(null), {
|
|
67
64
|
carouselRef: O,
|
|
68
65
|
carouselApi: W,
|
|
69
66
|
thumbsRef: z,
|
|
@@ -78,7 +75,7 @@ const L = q(({
|
|
|
78
75
|
options: {
|
|
79
76
|
axis: r === "vertical" ? "y" : "x"
|
|
80
77
|
},
|
|
81
|
-
targetRef:
|
|
78
|
+
targetRef: k
|
|
82
79
|
});
|
|
83
80
|
return U(c, () => ({
|
|
84
81
|
scrollPrev: C,
|
|
@@ -86,9 +83,9 @@ const L = q(({
|
|
|
86
83
|
scrollTo: h,
|
|
87
84
|
carouselApi: W,
|
|
88
85
|
selectedIndex: f
|
|
89
|
-
}), [C, y, h, f]), /* @__PURE__ */ S(X, { ref:
|
|
86
|
+
}), [C, y, h, f]), /* @__PURE__ */ S(X, { ref: k, theme: e, $layout: r, styles: d, $variant: i, tabIndex: w ? A.Default : A.Disabled, "data-testid": o, children: [
|
|
90
87
|
/* @__PURE__ */ S(Y, { "data-testid": `${o}-controls-wrapper`, theme: e, styles: {
|
|
91
|
-
order: n ===
|
|
88
|
+
order: n === E.Start ? 1 : "inherit"
|
|
92
89
|
}, children: [
|
|
93
90
|
s && /* @__PURE__ */ S(Z, { theme: e, "data-testid": `${o}-controls`, children: [
|
|
94
91
|
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: g.Text, onClick: C, disabled: !$, "data-testid": `${o}-control-previous`, children: /* @__PURE__ */ t(I, { ...p, name: "arrowLeft", fill: $ ? u : m }) }),
|
|
@@ -97,16 +94,16 @@ const L = q(({
|
|
|
97
94
|
}, onClick: y, disabled: !b, "data-testid": `${o}-control-next`, children: /* @__PURE__ */ t(I, { ...p, name: "arrowLeft", fill: b ? u : m }) })
|
|
98
95
|
] }),
|
|
99
96
|
/* @__PURE__ */ t(tt, { theme: e, "data-testid": `${o}-content-container`, children: P }),
|
|
100
|
-
/* @__PURE__ */ t(et, { theme: e, ref: O, "data-testid": `${o}-viewport`, children: /* @__PURE__ */ t(rt, { theme: e, "data-testid": `${o}-slider-wrapper`, children:
|
|
101
|
-
x && /* @__PURE__ */ t(ot, { theme: e, "data-testid": `${o}-dots`, children: (
|
|
97
|
+
/* @__PURE__ */ t(et, { theme: e, ref: O, "data-testid": `${o}-viewport`, children: /* @__PURE__ */ t(rt, { theme: e, "data-testid": `${o}-slider-wrapper`, children: l == null ? void 0 : l.map((v, a) => /* @__PURE__ */ t(B, { theme: e, "data-testid": `${o}-slide-${a}`, children: v }, `viewport-slide-${a}`)) }) }),
|
|
98
|
+
x && /* @__PURE__ */ t(ot, { theme: e, "data-testid": `${o}-dots`, children: (D = Array.from({
|
|
102
99
|
length: _
|
|
103
|
-
})) == null ? void 0 :
|
|
100
|
+
})) == null ? void 0 : D.map((v, a) => /* @__PURE__ */ t(at, { theme: e, $active: a === f, onClick: () => h(a) }, `dot-${a}`)) })
|
|
104
101
|
] }),
|
|
105
102
|
n && /* @__PURE__ */ S(nt, { theme: e, $layout: r, "data-testid": `${o}-thumbnails`, children: [
|
|
106
103
|
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: g.Text, styles: {
|
|
107
104
|
transform: `rotate(${r === "vertical" ? "90" : "0"}deg)`
|
|
108
105
|
}, onClick: C, disabled: !$, "data-testid": `${o}-thumbnail-control-previous`, children: /* @__PURE__ */ t(I, { ...p, ...H, fill: $ ? u : m }) }),
|
|
109
|
-
/* @__PURE__ */ t(
|
|
106
|
+
/* @__PURE__ */ t(lt, { theme: e, $layout: r, "data-testid": `${o}-thumbs-viewport`, ref: z, children: /* @__PURE__ */ t(it, { theme: e, $layout: r, "data-testid": `${o}-thumbs-wrapper`, children: l == null ? void 0 : l.map((v, a) => /* @__PURE__ */ t(st, { theme: e, $layout: r, $active: a === f, onClick: () => h(a), "data-testid": `${o}-thumbnail-${a}`, children: v }, `thumb-${a}`)) }) }),
|
|
110
107
|
/* @__PURE__ */ t(T, { isIcon: !0, theme: e, variant: g.Text, onClick: y, styles: {
|
|
111
108
|
transform: `rotate(${r === "vertical" ? "90" : "0"}deg)`
|
|
112
109
|
}, disabled: !b, "data-testid": `${o}-thumbnail-control-next`, children: /* @__PURE__ */ t(I, { ...p, ...M, fill: b ? u : m }) })
|
|
@@ -120,8 +117,8 @@ const ht = Object.assign(L, {
|
|
|
120
117
|
height: "100%",
|
|
121
118
|
width: "100%"
|
|
122
119
|
}, ...r }),
|
|
123
|
-
Title: (r) => /* @__PURE__ */ t(R, { variant:
|
|
124
|
-
Description: (r) => /* @__PURE__ */ t(R, { variant:
|
|
120
|
+
Title: (r) => /* @__PURE__ */ t(R, { variant: j.H1, ...r }),
|
|
121
|
+
Description: (r) => /* @__PURE__ */ t(R, { variant: j.Body1, ...r }),
|
|
125
122
|
Content: (r) => /* @__PURE__ */ t(R, { styles: {
|
|
126
123
|
flexDirection: "column",
|
|
127
124
|
height: "100%",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as n, jsx as
|
|
2
|
+
import { jsxs as n, jsx as t } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { forwardRef as P, useRef as V, useImperativeHandle as j } from "react";
|
|
4
|
-
import { CarouselContainerStyled as B, CarouselControlsWrapperStyled as E, CarouselViewportStyled as H, CarouselViewportSlideWrapperStyled as L, CarouselDotsStyled as M, CarouselDotStyled as O, CarouselControlsButtonStyled as
|
|
5
|
-
import { COMPONENT_NAME as
|
|
4
|
+
import { CarouselContainerStyled as B, CarouselControlsWrapperStyled as E, CarouselViewportStyled as H, CarouselViewportSlideWrapperStyled as L, CarouselDotsStyled as M, CarouselDotStyled as O, CarouselControlsButtonStyled as $ } from "../Carousel/CarouselStyled.js";
|
|
5
|
+
import { COMPONENT_NAME as o } from "./constants.js";
|
|
6
6
|
import { ContentSlideStyled as W, CarouselFooterStyled as _, CarouselFooterControlsStyled as z } from "./ContentCarouselStyled.js";
|
|
7
7
|
import { useTheme as q } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
-
import { get as
|
|
8
|
+
import { get as c } from "../../../utils/helpers.js";
|
|
9
9
|
import { useCarousel as G } from "../../../hooks/useCarousel/useCarousel.js";
|
|
10
|
-
import { TabIndex as
|
|
10
|
+
import { TabIndex as b } from "../../../types/accesability.js";
|
|
11
11
|
import { CarouselVariantTypes as J, LayoutType as K } from "../../../types/carousel.js";
|
|
12
|
-
import { Icon as
|
|
12
|
+
import { Icon as v } from "../../core/Icon/Icon.js";
|
|
13
13
|
const Q = P((w, I) => {
|
|
14
|
-
var
|
|
14
|
+
var h;
|
|
15
15
|
const {
|
|
16
16
|
theme: e
|
|
17
17
|
} = q(), {
|
|
@@ -21,47 +21,44 @@ const Q = P((w, I) => {
|
|
|
21
21
|
isFocusable: R = !0,
|
|
22
22
|
showDots: T = !0,
|
|
23
23
|
styles: D
|
|
24
|
-
} = w, {
|
|
25
|
-
|
|
26
|
-
disabled: p
|
|
27
|
-
} = $(e, "colors.icon.primary", {}), {
|
|
28
|
-
base: u,
|
|
24
|
+
} = w, u = c(e, "colors.icon.default"), p = c(e, "colors.icon.disabled"), {
|
|
25
|
+
base: m,
|
|
29
26
|
controlLeft: g,
|
|
30
27
|
controlRight: k
|
|
31
|
-
} =
|
|
28
|
+
} = c(e, "carousel.icons", {}), f = V(null), {
|
|
32
29
|
carouselRef: A,
|
|
33
|
-
activeIndex:
|
|
34
|
-
scrollTo:
|
|
30
|
+
activeIndex: s,
|
|
31
|
+
scrollTo: a,
|
|
35
32
|
scrollPrev: i,
|
|
36
33
|
scrollNext: d,
|
|
37
34
|
canScrollPrev: C,
|
|
38
|
-
canScrollNext:
|
|
35
|
+
canScrollNext: y,
|
|
39
36
|
slidesCount: F
|
|
40
37
|
} = G({
|
|
41
38
|
options: {
|
|
42
39
|
axis: "x"
|
|
43
40
|
},
|
|
44
|
-
targetRef:
|
|
41
|
+
targetRef: f
|
|
45
42
|
});
|
|
46
43
|
return j(I, () => ({
|
|
47
44
|
scrollPrev: i,
|
|
48
45
|
scrollNext: d,
|
|
49
|
-
scrollTo:
|
|
50
|
-
selectedIndex:
|
|
51
|
-
}), [i, d,
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ n(_, { theme: e, "data-testid": `${
|
|
54
|
-
T && /* @__PURE__ */
|
|
46
|
+
scrollTo: a,
|
|
47
|
+
selectedIndex: s
|
|
48
|
+
}), [i, d, a, s]), /* @__PURE__ */ n(B, { ref: f, theme: e, styles: D, $layout: K.Horizontal, $variant: J.Cards, tabIndex: R ? b.Default : b.Disabled, "data-testid": o, children: [
|
|
49
|
+
/* @__PURE__ */ t(E, { "data-testid": `${o}-controls-wrapper`, theme: e, children: /* @__PURE__ */ t(H, { theme: e, ref: A, "data-testid": `${o}-viewport`, children: /* @__PURE__ */ t(L, { theme: e, "data-testid": `${o}-slider-wrapper`, children: l == null ? void 0 : l.map((S, r) => /* @__PURE__ */ t(W, { theme: e, "data-testid": `${o}-content-slide-${r}`, children: x(S, r) }, r)) }) }) }),
|
|
50
|
+
/* @__PURE__ */ n(_, { theme: e, "data-testid": `${o}-footer`, children: [
|
|
51
|
+
T && /* @__PURE__ */ t(M, { theme: e, "data-testid": `${o}-dots`, children: (h = Array.from({
|
|
55
52
|
length: F
|
|
56
|
-
})) == null ? void 0 :
|
|
57
|
-
N && /* @__PURE__ */ n(z, { theme: e, "data-testid": `${
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
53
|
+
})) == null ? void 0 : h.map((S, r) => /* @__PURE__ */ t(O, { theme: e, $active: r === s, onClick: () => a(r) }, r)) }),
|
|
54
|
+
N && /* @__PURE__ */ n(z, { theme: e, "data-testid": `${o}-controls`, children: [
|
|
55
|
+
/* @__PURE__ */ t($, { theme: e, onClick: i, disabled: !C, "data-testid": `${o}-control-previous`, children: /* @__PURE__ */ t(v, { ...m, ...g, fill: C ? u : p }) }),
|
|
56
|
+
/* @__PURE__ */ t($, { theme: e, onClick: d, disabled: !y, "data-testid": `${o}-control-next`, children: /* @__PURE__ */ t(v, { ...m, ...k, fill: y ? u : p }) })
|
|
60
57
|
] })
|
|
61
58
|
] })
|
|
62
59
|
] });
|
|
63
60
|
});
|
|
64
|
-
Q.displayName =
|
|
61
|
+
Q.displayName = o;
|
|
65
62
|
export {
|
|
66
63
|
Q as ContentCarousel
|
|
67
64
|
};
|
package/package.json
CHANGED
package/tokens/accordion.d.ts
CHANGED
|
@@ -1 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
import { TextAlign } from '../types';
|
|
2
|
+
export declare const accordion: {
|
|
3
|
+
header: {
|
|
4
|
+
default: {
|
|
5
|
+
width: string;
|
|
6
|
+
textAlign: TextAlign;
|
|
7
|
+
cursor: string;
|
|
8
|
+
border: number;
|
|
9
|
+
backgroundColor: (theme: Record<symbol, unknown>) => string;
|
|
10
|
+
paddingTop: (theme: Record<symbol, unknown>) => string;
|
|
11
|
+
paddingBottom: (theme: Record<symbol, unknown>) => string;
|
|
12
|
+
display: string;
|
|
13
|
+
alignItems: string;
|
|
14
|
+
':first-of-type': {
|
|
15
|
+
flex: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
content: {
|
|
20
|
+
default: {
|
|
21
|
+
overflow: string;
|
|
22
|
+
transition: (theme: Record<symbol, unknown>) => string;
|
|
23
|
+
height: string;
|
|
24
|
+
};
|
|
25
|
+
opened: {
|
|
26
|
+
paddingTop: (theme: Record<symbol, unknown>) => string;
|
|
27
|
+
paddingBottom: (theme: Record<symbol, unknown>) => string;
|
|
28
|
+
};
|
|
29
|
+
closed: {
|
|
30
|
+
maxHeight: (theme: Record<symbol, unknown>) => string;
|
|
31
|
+
paddingTop: (theme: Record<symbol, unknown>) => string;
|
|
32
|
+
paddingBottom: (theme: Record<symbol, unknown>) => string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
item: {
|
|
36
|
+
default: {
|
|
37
|
+
position: string;
|
|
38
|
+
padding: (theme: Record<symbol, unknown>) => string;
|
|
39
|
+
'&::after': {
|
|
40
|
+
content: string;
|
|
41
|
+
position: string;
|
|
42
|
+
bottom: (theme: Record<symbol, unknown>) => string;
|
|
43
|
+
left: (theme: Record<symbol, unknown>) => string;
|
|
44
|
+
right: (theme: Record<symbol, unknown>) => string;
|
|
45
|
+
height: string;
|
|
46
|
+
width: string;
|
|
47
|
+
backgroundColor: (theme: Record<symbol, unknown>) => string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
icon: {
|
|
52
|
+
default: {
|
|
53
|
+
transition: (theme: Record<symbol, unknown>) => string;
|
|
54
|
+
};
|
|
55
|
+
opened: {
|
|
56
|
+
transform: (theme: Record<symbol, unknown>) => string;
|
|
57
|
+
};
|
|
58
|
+
closed: {
|
|
59
|
+
transform: (theme: Record<symbol, unknown>) => string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
package/tokens/avatar.d.ts
CHANGED
|
@@ -1 +1,119 @@
|
|
|
1
|
-
|
|
1
|
+
import { TextAlign, TypographyVariant } from '../types';
|
|
2
|
+
export declare const avatar: {
|
|
3
|
+
default: {
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
position: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
imageWrapper: {
|
|
10
|
+
default: {
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
overflow: string;
|
|
13
|
+
height: string;
|
|
14
|
+
width: string;
|
|
15
|
+
alignContent: string;
|
|
16
|
+
backgroundColor: (theme: Record<symbol, unknown>) => string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
badge: {
|
|
20
|
+
default: {
|
|
21
|
+
position: string;
|
|
22
|
+
borderRadius: string;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
border: string;
|
|
26
|
+
top: number;
|
|
27
|
+
right: number;
|
|
28
|
+
};
|
|
29
|
+
size: {
|
|
30
|
+
xs: {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
border: string;
|
|
34
|
+
top: number;
|
|
35
|
+
right: number;
|
|
36
|
+
};
|
|
37
|
+
sm: {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
border: string;
|
|
41
|
+
top: number;
|
|
42
|
+
right: number;
|
|
43
|
+
};
|
|
44
|
+
md: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
border: string;
|
|
48
|
+
top: number;
|
|
49
|
+
right: number;
|
|
50
|
+
};
|
|
51
|
+
lg: {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
border: string;
|
|
55
|
+
top: number;
|
|
56
|
+
right: number;
|
|
57
|
+
};
|
|
58
|
+
xl: {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
border: string;
|
|
62
|
+
top: number;
|
|
63
|
+
right: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
fallbackText: {
|
|
68
|
+
default: {
|
|
69
|
+
overflow: string;
|
|
70
|
+
textOverflow: string;
|
|
71
|
+
whiteSpace: string;
|
|
72
|
+
};
|
|
73
|
+
attrs: {
|
|
74
|
+
default: {
|
|
75
|
+
variant: TypographyVariant;
|
|
76
|
+
align: TextAlign;
|
|
77
|
+
};
|
|
78
|
+
size: {
|
|
79
|
+
xs: {
|
|
80
|
+
variant: TypographyVariant;
|
|
81
|
+
};
|
|
82
|
+
sm: {
|
|
83
|
+
variant: TypographyVariant;
|
|
84
|
+
};
|
|
85
|
+
md: {
|
|
86
|
+
variant: TypographyVariant;
|
|
87
|
+
};
|
|
88
|
+
lg: {
|
|
89
|
+
variant: TypographyVariant;
|
|
90
|
+
};
|
|
91
|
+
xl: {
|
|
92
|
+
variant: TypographyVariant;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
size: {
|
|
98
|
+
xs: {
|
|
99
|
+
width: number;
|
|
100
|
+
height: number;
|
|
101
|
+
};
|
|
102
|
+
sm: {
|
|
103
|
+
width: number;
|
|
104
|
+
height: number;
|
|
105
|
+
};
|
|
106
|
+
md: {
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
};
|
|
110
|
+
lg: {
|
|
111
|
+
width: number;
|
|
112
|
+
height: number;
|
|
113
|
+
};
|
|
114
|
+
xl: {
|
|
115
|
+
width: number;
|
|
116
|
+
height: number;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
package/tokens/box.d.ts
CHANGED
|
@@ -2,4 +2,45 @@
|
|
|
2
2
|
* Box component tokens - Base container styles
|
|
3
3
|
* These styles were extracted from Card component to create a reusable base container
|
|
4
4
|
*/
|
|
5
|
-
export declare const box:
|
|
5
|
+
export declare const box: {
|
|
6
|
+
default: {
|
|
7
|
+
display: string;
|
|
8
|
+
'&:focus-visible': (theme: Record<symbol, unknown>) => {
|
|
9
|
+
outline: string;
|
|
10
|
+
'&:hover': {
|
|
11
|
+
boxShadow: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
shadowHover: {
|
|
16
|
+
'&:hover': {
|
|
17
|
+
boxShadow: (theme: Record<symbol, unknown>) => string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
vertical: {
|
|
21
|
+
default: {
|
|
22
|
+
flexDirection: string;
|
|
23
|
+
};
|
|
24
|
+
bordered: (theme: Record<symbol, unknown>) => {
|
|
25
|
+
border: string;
|
|
26
|
+
};
|
|
27
|
+
highlighted: (theme: Record<symbol, unknown>) => {
|
|
28
|
+
'&:not(:focus-visible):hover': {
|
|
29
|
+
outline: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
horizontal: {
|
|
34
|
+
default: {
|
|
35
|
+
flexDirection: string;
|
|
36
|
+
};
|
|
37
|
+
bordered: (theme: Record<symbol, unknown>) => {
|
|
38
|
+
border: string;
|
|
39
|
+
};
|
|
40
|
+
highlighted: (theme: Record<symbol, unknown>) => {
|
|
41
|
+
'&:not(:focus-visible):hover': {
|
|
42
|
+
outline: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
package/tokens/breadcrumbs.d.ts
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
export declare const breadcrumbs:
|
|
1
|
+
export declare const breadcrumbs: {
|
|
2
|
+
default: {
|
|
3
|
+
display: string;
|
|
4
|
+
alignItems: string;
|
|
5
|
+
gap: (theme: Record<symbol, unknown>) => string;
|
|
6
|
+
};
|
|
7
|
+
bordered: {
|
|
8
|
+
padding: (theme: Record<symbol, unknown>) => string;
|
|
9
|
+
border: (theme: Record<symbol, unknown>) => string;
|
|
10
|
+
};
|
|
11
|
+
item: {
|
|
12
|
+
default: {};
|
|
13
|
+
itemStart: {
|
|
14
|
+
color: (theme: Record<symbol, unknown>) => string;
|
|
15
|
+
};
|
|
16
|
+
itemEnd: {
|
|
17
|
+
color: (theme: Record<symbol, unknown>) => string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
separator: {
|
|
21
|
+
default: {
|
|
22
|
+
display: string;
|
|
23
|
+
alignItems: string;
|
|
24
|
+
color: (theme: Record<symbol, unknown>) => string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|