@crystallize/design-system 1.24.27 → 1.24.29
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-TMB3VHAI.mjs → chunk-OD4GHCZ2.mjs} +1191 -1166
- package/dist/index.d.ts +11 -13
- package/dist/index.js +1889 -1857
- package/dist/index.mjs +2 -2
- package/dist/{rich-text-editor-XIO7AL7L.mjs → rich-text-editor-FMYEV5BL.mjs} +1 -1
- package/package.json +25 -22
- package/src/colors/Colors.stories.tsx +2 -2
- package/src/dropdown-menu/dropdown-menu-item.tsx +17 -11
- package/src/iconography/chevron.tsx +16 -0
- package/src/iconography/index.ts +2 -0
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,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystallize/design-system",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.29",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
12
13
|
"require": "./dist/index.js",
|
|
13
|
-
"import": "./dist/index.mjs"
|
|
14
|
-
"types": "./dist/index.d.ts"
|
|
14
|
+
"import": "./dist/index.mjs"
|
|
15
15
|
},
|
|
16
16
|
"./tailwind-config": "./tailwind.config.cjs",
|
|
17
17
|
"./styles.css": {
|
|
@@ -62,19 +62,23 @@
|
|
|
62
62
|
"@faker-js/faker": "7.6.0",
|
|
63
63
|
"@ianvs/prettier-plugin-sort-imports": "^3.7.1",
|
|
64
64
|
"@mdx-js/react": "^2.2.1",
|
|
65
|
-
"@storybook/addon-actions": "
|
|
66
|
-
"@storybook/addon-backgrounds": "
|
|
67
|
-
"@storybook/addon-
|
|
68
|
-
"@storybook/addon-
|
|
69
|
-
"@storybook/addon-
|
|
70
|
-
"@storybook/addon-
|
|
71
|
-
"@storybook/addon-
|
|
72
|
-
"@storybook/addon-
|
|
73
|
-
"@storybook/addon-
|
|
74
|
-
"@storybook/
|
|
75
|
-
"@storybook/
|
|
76
|
-
"@storybook/
|
|
77
|
-
"@storybook/
|
|
65
|
+
"@storybook/addon-actions": "8.6.11",
|
|
66
|
+
"@storybook/addon-backgrounds": "8.6.11",
|
|
67
|
+
"@storybook/addon-designs": "8.2.1",
|
|
68
|
+
"@storybook/addon-docs": "8.6.11",
|
|
69
|
+
"@storybook/addon-essentials": "8.6.11",
|
|
70
|
+
"@storybook/addon-highlight": "8.6.11",
|
|
71
|
+
"@storybook/addon-interactions": "8.6.11",
|
|
72
|
+
"@storybook/addon-links": "8.6.11",
|
|
73
|
+
"@storybook/addon-measure": "8.6.11",
|
|
74
|
+
"@storybook/addon-outline": "8.6.11",
|
|
75
|
+
"@storybook/client-logger": "8.6.11",
|
|
76
|
+
"@storybook/manager-api": "8.6.11",
|
|
77
|
+
"@storybook/preview-api": "8.6.11",
|
|
78
|
+
"@storybook/react": "8.6.11",
|
|
79
|
+
"@storybook/react-vite": "8.6.11",
|
|
80
|
+
"@storybook/theming": "8.6.11",
|
|
81
|
+
"@testing-library/dom": "10.4.0",
|
|
78
82
|
"@testing-library/jest-dom": "6.6.3",
|
|
79
83
|
"@testing-library/react": "16.1.0",
|
|
80
84
|
"@testing-library/user-event": "14.5.2",
|
|
@@ -87,13 +91,12 @@
|
|
|
87
91
|
"postcss": "^8.4.21",
|
|
88
92
|
"postcss-import": "^15.1.0",
|
|
89
93
|
"prettier": "2.8.4",
|
|
90
|
-
"storybook": "
|
|
91
|
-
"storybook-
|
|
92
|
-
"storybook-dark-mode": "^2.0.5",
|
|
94
|
+
"storybook": "8.6.11",
|
|
95
|
+
"storybook-dark-mode": "4.0.2",
|
|
93
96
|
"tailwindcss": "^3.3.5",
|
|
94
97
|
"tsup": "^6.5.0",
|
|
95
98
|
"typescript": "4.9.4",
|
|
96
|
-
"vite": "
|
|
99
|
+
"vite": "6.2.4",
|
|
97
100
|
"vitest": "2.1.8",
|
|
98
101
|
"tsconfig": "0.0.0"
|
|
99
102
|
},
|
|
@@ -117,13 +120,13 @@
|
|
|
117
120
|
"tailwind.config.cjs"
|
|
118
121
|
],
|
|
119
122
|
"scripts": {
|
|
120
|
-
"build:storybook": "storybook build
|
|
123
|
+
"build:storybook": "storybook build public",
|
|
121
124
|
"build:tw": "tailwindcss -c ./tailwind.config.cjs -i src/index.css -o dist/index.css",
|
|
122
125
|
"build:tsup": "tsup src/index.ts --format esm,cjs --dts",
|
|
123
126
|
"build": "pnpm build:tw && pnpm build:tsup",
|
|
124
127
|
"dev:tw": "tailwindcss --content ./src/**/*.tsx,!./src/**/*.stories.tsx -c ./tailwind.config.cjs -i src/index.css -o dist/index.css --watch & tsup src/index.ts --format esm --dts --watch",
|
|
125
128
|
"dev:tsup": "tsup src/index.ts --format esm --dts --watch",
|
|
126
|
-
"dev:storybook": "storybook dev -p 6006 --no-open
|
|
129
|
+
"dev:storybook": "storybook dev -p 6006 --no-open public",
|
|
127
130
|
"dev": "concurrently \"npm:dev:*\"",
|
|
128
131
|
"test": "vitest run src/",
|
|
129
132
|
"test:watch": "vitest src/"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDarkMode } from 'storybook-dark-mode';
|
|
2
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
2
|
|
|
3
|
+
import { useDarkMode } from '../../.storybook/use-dark-mode';
|
|
4
4
|
import colorDefaults from './color-defaults.json';
|
|
5
5
|
import colorPairing from './color-pairing.json';
|
|
6
6
|
import rawColors from './colors.json';
|
|
@@ -65,7 +65,7 @@ export default meta;
|
|
|
65
65
|
function ColorItem({ colorName, color }: { colorName: ColorName; color: Color }) {
|
|
66
66
|
const shades = Object.keys(color);
|
|
67
67
|
|
|
68
|
-
const isDark = useDarkMode();
|
|
68
|
+
const [isDark] = useDarkMode();
|
|
69
69
|
|
|
70
70
|
// @ts-expect-error
|
|
71
71
|
const applicationsForMode = !isDark ? applications : applications.map(a => ({ ...a, shade: colorPairing[a.shade] }));
|
|
@@ -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';
|
|
@@ -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
|
@@ -13,6 +13,7 @@ import { Cart } from './cart';
|
|
|
13
13
|
import { Catalogue } from './catalogue';
|
|
14
14
|
import { Check } from './check';
|
|
15
15
|
import { CheckWithCircle } from './check-with-circle';
|
|
16
|
+
import { Chevron } from './chevron';
|
|
16
17
|
import { Choice } from './choice';
|
|
17
18
|
import { Chunk } from './chunk';
|
|
18
19
|
import { Clock } from './clock';
|
|
@@ -125,6 +126,7 @@ export const Icon = {
|
|
|
125
126
|
Catalogue,
|
|
126
127
|
Check,
|
|
127
128
|
CheckWithCircle,
|
|
129
|
+
Chevron,
|
|
128
130
|
Cloud,
|
|
129
131
|
Clock,
|
|
130
132
|
CloudWithKeyHole,
|