@crystallize/design-system 1.24.26 → 1.24.28
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 +13 -0
- package/dist/{chunk-DDFZZP2K.mjs → chunk-OD4GHCZ2.mjs} +1356 -1295
- package/dist/index.css +11 -12
- package/dist/index.d.ts +12 -13
- package/dist/index.js +1948 -1873
- package/dist/index.mjs +2 -2
- package/dist/{rich-text-editor-QPSSPPTF.mjs → rich-text-editor-FMYEV5BL.mjs} +1 -1
- package/dist/{rich-text-editor-XW66E4QG.css → rich-text-editor-RUYX7OQE.css} +11 -12
- package/package.json +1 -1
- package/src/button/button.css +4 -16
- package/src/dialog/confirm-dialog.tsx +2 -0
- package/src/dropdown-menu/dropdown-menu-item.tsx +17 -11
- package/src/dropdown-menu/dropdown-menu.css +5 -1
- package/src/iconography/cart.tsx +30 -0
- package/src/iconography/chevron.tsx +16 -0
- package/src/iconography/index.ts +4 -0
- package/src/tooltip/tooltip.css +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
showError,
|
|
18
18
|
showInfo,
|
|
19
19
|
showWarning
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OD4GHCZ2.mjs";
|
|
21
21
|
import "./chunk-NIH5ZMPE.mjs";
|
|
22
22
|
|
|
23
23
|
// src/card/card.tsx
|
|
@@ -486,7 +486,7 @@ function Tag({
|
|
|
486
486
|
// src/rich-text-editor/index.tsx
|
|
487
487
|
import { lazy, Suspense } from "react";
|
|
488
488
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
489
|
-
var LazyRichTextEditor = lazy(() => import("./rich-text-editor-
|
|
489
|
+
var LazyRichTextEditor = lazy(() => import("./rich-text-editor-FMYEV5BL.mjs"));
|
|
490
490
|
var RichTextEditor = (props) => {
|
|
491
491
|
return /* @__PURE__ */ jsx15(Suspense, {
|
|
492
492
|
fallback: null,
|
|
@@ -889,8 +889,7 @@
|
|
|
889
889
|
align-items: center;
|
|
890
890
|
justify-content: center;
|
|
891
891
|
}
|
|
892
|
-
.c-btn
|
|
893
|
-
.c-btn .c-btn__loading-spinner {
|
|
892
|
+
.c-btn {
|
|
894
893
|
--tw-bg-opacity: 1;
|
|
895
894
|
background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
|
|
896
895
|
}
|
|
@@ -906,14 +905,15 @@
|
|
|
906
905
|
.c-btn-loading {
|
|
907
906
|
position: relative;
|
|
908
907
|
}
|
|
909
|
-
.c-btn-loading .c-btn__prepend
|
|
910
|
-
.c-btn-loading .c-btn__append {
|
|
908
|
+
.c-btn-loading .c-btn__prepend {
|
|
911
909
|
opacity: 0;
|
|
912
910
|
transition-property: opacity;
|
|
913
911
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
914
912
|
transition-duration: 150ms;
|
|
915
913
|
}
|
|
916
914
|
.c-btn-elevate {
|
|
915
|
+
--tw-bg-opacity: 1;
|
|
916
|
+
background-color: rgb(var(--c-color-elevate) / var(--tw-bg-opacity));
|
|
917
917
|
--tw-shadow: 0 2px 4px rgba(130,138,144,0.15);
|
|
918
918
|
--tw-shadow-colored: 0 2px 4px var(--tw-shadow-color);
|
|
919
919
|
box-shadow:
|
|
@@ -921,11 +921,6 @@
|
|
|
921
921
|
var(--tw-ring-shadow, 0 0 #0000),
|
|
922
922
|
var(--tw-shadow);
|
|
923
923
|
}
|
|
924
|
-
.c-btn-elevate,
|
|
925
|
-
.c-btn-elevate .c-btn__loading-spinner {
|
|
926
|
-
--tw-bg-opacity: 1;
|
|
927
|
-
background-color: rgb(var(--c-color-elevate) / var(--tw-bg-opacity));
|
|
928
|
-
}
|
|
929
924
|
.c-btn-elevate:not(:disabled):hover {
|
|
930
925
|
outline-color: rgb(var(--c-color-gray-100-800) / 1);
|
|
931
926
|
}
|
|
@@ -933,8 +928,7 @@
|
|
|
933
928
|
--tw-bg-opacity: 1;
|
|
934
929
|
background-color: rgb(var(--c-color-purple-50-900) / var(--tw-bg-opacity));
|
|
935
930
|
}
|
|
936
|
-
.c-btn-action
|
|
937
|
-
.c-btn-action .c-btn__loading-spinner {
|
|
931
|
+
.c-btn-action {
|
|
938
932
|
--tw-bg-opacity: 1;
|
|
939
933
|
background-color: rgb(var(--c-color-cyan-100-800) / var(--tw-bg-opacity));
|
|
940
934
|
}
|
|
@@ -1278,7 +1272,7 @@
|
|
|
1278
1272
|
--tw-bg-opacity: 1;
|
|
1279
1273
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
1280
1274
|
--tw-text-opacity: 1;
|
|
1281
|
-
color: rgb(var(--c-color-
|
|
1275
|
+
color: rgb(var(--c-color-gray-500-400) / var(--tw-text-opacity));
|
|
1282
1276
|
}
|
|
1283
1277
|
.c-tooltip-info .c-tooltip-arrow {
|
|
1284
1278
|
fill: #fff;
|
|
@@ -1458,6 +1452,11 @@
|
|
|
1458
1452
|
--tw-scale-y: -1;
|
|
1459
1453
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
1460
1454
|
}
|
|
1455
|
+
.c-dropdown-menu-content [role=separator] {
|
|
1456
|
+
height: 1px;
|
|
1457
|
+
--tw-bg-opacity: 1;
|
|
1458
|
+
background-color: rgb(var(--c-color-purple-100-800) / var(--tw-bg-opacity));
|
|
1459
|
+
}
|
|
1461
1460
|
.c-dropdown-menu-label {
|
|
1462
1461
|
--tw-bg-opacity: 1;
|
|
1463
1462
|
background-color: rgb(var(--c-color-elevate) / var(--tw-bg-opacity));
|
package/package.json
CHANGED
package/src/button/button.css
CHANGED
|
@@ -28,10 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.c-btn {
|
|
31
|
-
|
|
32
|
-
.c-btn__loading-spinner {
|
|
33
|
-
@apply bg-purple-50-900;
|
|
34
|
-
}
|
|
31
|
+
@apply bg-purple-50-900;
|
|
35
32
|
|
|
36
33
|
&:not(:disabled):hover {
|
|
37
34
|
@apply outline outline-1 outline-purple-200-700;
|
|
@@ -45,19 +42,13 @@
|
|
|
45
42
|
.c-btn-loading {
|
|
46
43
|
@apply relative;
|
|
47
44
|
|
|
48
|
-
.c-btn__prepend
|
|
49
|
-
.c-btn__append {
|
|
45
|
+
.c-btn__prepend {
|
|
50
46
|
@apply opacity-0 transition-opacity;
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
.c-btn-elevate {
|
|
55
|
-
@apply shadow;
|
|
56
|
-
|
|
57
|
-
&,
|
|
58
|
-
.c-btn__loading-spinner {
|
|
59
|
-
@apply bg-elevate;
|
|
60
|
-
}
|
|
51
|
+
@apply bg-elevate shadow;
|
|
61
52
|
|
|
62
53
|
&:not(:disabled):hover {
|
|
63
54
|
@apply outline-gray-100-800;
|
|
@@ -69,10 +60,7 @@
|
|
|
69
60
|
}
|
|
70
61
|
|
|
71
62
|
.c-btn-action {
|
|
72
|
-
|
|
73
|
-
.c-btn__loading-spinner {
|
|
74
|
-
@apply bg-cyan-100-800;
|
|
75
|
-
}
|
|
63
|
+
@apply bg-cyan-100-800;
|
|
76
64
|
|
|
77
65
|
&:not(:disabled):hover {
|
|
78
66
|
@apply outline outline-1 outline-cyan-300-600;
|
|
@@ -22,6 +22,7 @@ export function ConfirmDialog({
|
|
|
22
22
|
onPointerDownOutside,
|
|
23
23
|
type,
|
|
24
24
|
closable,
|
|
25
|
+
className,
|
|
25
26
|
}: ConfirmDialogProps) {
|
|
26
27
|
const cancelButton = (okCancel || displayCancel) && (
|
|
27
28
|
<Button
|
|
@@ -54,6 +55,7 @@ export function ConfirmDialog({
|
|
|
54
55
|
onPointerDownOutside={onPointerDownOutside}
|
|
55
56
|
type={type}
|
|
56
57
|
closable={closable}
|
|
58
|
+
className={className}
|
|
57
59
|
>
|
|
58
60
|
{title && <Dialog.Title>{title}</Dialog.Title>}
|
|
59
61
|
{description && <Dialog.Description>{description}</Dialog.Description>}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
1
2
|
import { cx } from 'class-variance-authority';
|
|
2
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
4
|
|
|
4
|
-
type DropdownMenuItemProps = DropdownMenuPrimitive.
|
|
5
|
+
export type DropdownMenuItemProps = DropdownMenuPrimitive.DropdownMenuItemProps & {
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
isSelected?: boolean;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
export const DropdownMenuItem = forwardRef<React.ElementRef<typeof DropdownMenuPrimitive.Item>, DropdownMenuItemProps>(
|
|
11
|
+
({ children, className, isSelected, ...delegated }, ref) => {
|
|
12
|
+
return (
|
|
13
|
+
<DropdownMenuPrimitive.Item
|
|
14
|
+
ref={ref}
|
|
15
|
+
{...delegated}
|
|
16
|
+
className={cx('c-dropdown-menu-item', isSelected ? 'selected' : '', className)}
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</DropdownMenuPrimitive.Item>
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
DropdownMenuItem.displayName = 'DropdownMenuItem';
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.c-dropdown-menu-content [role='separator'] {
|
|
25
|
+
@apply h-px bg-purple-100-800;
|
|
26
|
+
}
|
|
27
|
+
|
|
24
28
|
.c-dropdown-menu-label {
|
|
25
29
|
@apply bg-elevate px-4 pb-1 pt-3 font-sans text-[11px] font-bold text-gray-500-400;
|
|
26
30
|
@apply first:rounded-tl first:rounded-tr;
|
|
@@ -84,4 +88,4 @@
|
|
|
84
88
|
|
|
85
89
|
.c-dialog ~ [data-radix-popper-content-wrapper] {
|
|
86
90
|
z-index: calc(var(--dialog-z-index) + 1) !important;
|
|
87
|
-
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { forwardRef, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type CartProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
|
|
5
|
+
type CartRef = SVGSVGElement;
|
|
6
|
+
|
|
7
|
+
export const Cart = forwardRef<CartRef, CartProps>((delegated, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<svg ref={ref} width="22" height="23" viewBox="0 0 22 23" fill="currentColor" {...delegated}>
|
|
10
|
+
<path
|
|
11
|
+
fill="#BFF6F8"
|
|
12
|
+
stroke="#528693"
|
|
13
|
+
strokeWidth=".568"
|
|
14
|
+
d="M15.808 5.962H6.304c-.898 0-1.646.686-1.725 1.58L3.681 17.79a1.731 1.731 0 0 0 1.725 1.882h11.188a1.73 1.73 0 0 0 1.726-1.863L17.534 7.56a1.731 1.731 0 0 0-1.726-1.599Z"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
fill="#fff"
|
|
18
|
+
stroke="#528693"
|
|
19
|
+
strokeWidth=".568"
|
|
20
|
+
d="M10.99 4.04c.668 0 1.218.55 1.218 1.217V7.36a.83.83 0 1 0 1.66 0V5.257A2.884 2.884 0 0 0 10.99 2.38a2.884 2.884 0 0 0-2.877 2.877V7.36a.83.83 0 1 0 1.66 0V5.257c0-.668.55-1.217 1.217-1.217Z"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
fill="#528693"
|
|
24
|
+
d="M12.103 14.841a.822.822 0 0 0-.258-.614c-.17-.167-.456-.318-.86-.452-.564-.172-.975-.396-1.234-.67-.256-.278-.385-.63-.385-1.056 0-.433.126-.789.377-1.066.254-.278.602-.443 1.043-.496v-.869h.591v.873c.444.06.79.247 1.035.559.249.312.373.739.373 1.281h-.73c0-.373-.088-.669-.265-.888a.874.874 0 0 0-.718-.33c-.315 0-.556.082-.722.246-.167.162-.25.388-.25.678 0 .27.087.486.262.647.177.159.466.304.868.436.405.13.72.274.944.433.228.155.394.338.5.547.108.209.162.453.162.733 0 .447-.134.807-.404 1.08-.267.271-.643.433-1.126.483v.758h-.587v-.758c-.492-.045-.878-.22-1.158-.524-.278-.306-.417-.721-.417-1.245h.734c0 .368.096.65.29.849.193.198.466.297.82.297.347 0 .62-.083.817-.25.199-.166.298-.393.298-.682Z"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
Cart.displayName = 'CartIcon';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { forwardRef, type SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
type ChevronIconProps = SVGProps<SVGSVGElement>;
|
|
4
|
+
|
|
5
|
+
export const Chevron = forwardRef<SVGSVGElement, ChevronIconProps>((delegated, ref) => (
|
|
6
|
+
<svg width="22" height="22" fill="none" viewBox="0 0 22 22" ref={ref} {...delegated}>
|
|
7
|
+
<path
|
|
8
|
+
fill={delegated.fill ?? '#528693'}
|
|
9
|
+
fillRule="evenodd"
|
|
10
|
+
d="m9.763 7.464 3.182 3.182a.5.5 0 0 1 0 .707l-3.182 3.183a.5.5 0 1 1-.708-.708l2.796-2.795v-.066L9.055 8.172a.5.5 0 0 1 .708-.708"
|
|
11
|
+
clipRule="evenodd"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
));
|
|
15
|
+
|
|
16
|
+
Chevron.displayName = 'Chevron';
|
package/src/iconography/index.ts
CHANGED
|
@@ -9,9 +9,11 @@ import { BillingPayments } from './billing-payments';
|
|
|
9
9
|
import { Bin } from './bin';
|
|
10
10
|
import { Cancel } from './cancel';
|
|
11
11
|
import { Caret } from './caret';
|
|
12
|
+
import { Cart } from './cart';
|
|
12
13
|
import { Catalogue } from './catalogue';
|
|
13
14
|
import { Check } from './check';
|
|
14
15
|
import { CheckWithCircle } from './check-with-circle';
|
|
16
|
+
import { Chevron } from './chevron';
|
|
15
17
|
import { Choice } from './choice';
|
|
16
18
|
import { Chunk } from './chunk';
|
|
17
19
|
import { Clock } from './clock';
|
|
@@ -120,9 +122,11 @@ export const Icon = {
|
|
|
120
122
|
Bin,
|
|
121
123
|
Bell,
|
|
122
124
|
Caret,
|
|
125
|
+
Cart,
|
|
123
126
|
Catalogue,
|
|
124
127
|
Check,
|
|
125
128
|
CheckWithCircle,
|
|
129
|
+
Chevron,
|
|
126
130
|
Cloud,
|
|
127
131
|
Clock,
|
|
128
132
|
CloudWithKeyHole,
|
package/src/tooltip/tooltip.css
CHANGED