@crystallize/design-system 2.0.3 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -20,6 +20,14 @@
20
20
  "./styles.css": {
21
21
  "import": "./dist/index.css",
22
22
  "require": "./dist/index.css"
23
+ },
24
+ "./styles-light-core.css": {
25
+ "import": "./dist/styles-light-core.css",
26
+ "require": "./dist/styles-light-core.css"
27
+ },
28
+ "./styles-rich-text-editor.css": {
29
+ "import": "./dist/styles-rich-text-editor.css",
30
+ "require": "./dist/styles-rich-text-editor.css"
23
31
  }
24
32
  },
25
33
  "dependencies": {
@@ -126,9 +134,10 @@
126
134
  "build:storybook": "storybook build public",
127
135
  "build:tw": "tailwindcss -c ./tailwind.config.cjs -i src/index.css -o dist/index.css",
128
136
  "build:tsup": "tsup src/index.ts --format esm,cjs --dts",
129
- "build": "pnpm build:tw && pnpm build:tsup",
130
- "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",
131
- "dev:tsup": "tsup src/index.ts --format esm --dts --watch",
137
+ "build:split-styles": "node ./scripts/split-styles.mjs",
138
+ "build": "pnpm build:tw && pnpm build:tsup && pnpm build:split-styles",
139
+ "dev:tw": "tailwindcss --content ./src/**/*.tsx,!./src/**/*.stories.tsx -c ./tailwind.config.cjs -i src/index.css -o dist/index.css --watch",
140
+ "dev:tsup": "tsup src/index.ts --format esm --dts --watch --onSuccess \"node ./scripts/split-styles.mjs\"",
132
141
  "dev:storybook": "storybook dev -p 6006 --no-open public",
133
142
  "dev": "concurrently \"npm:dev:*\"",
134
143
  "test": "vitest run src/",
@@ -0,0 +1,69 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ import { fill, stroke } from './variables';
4
+
5
+ export const CustomerShortcut = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((delegated, ref) => {
6
+ return (
7
+ <svg ref={ref} width="22" height="22" viewBox="0 0 22 22" fill="none" {...delegated}>
8
+ <g clipPath="url(#a)">
9
+ <path
10
+ fill={stroke}
11
+ fillRule="evenodd"
12
+ d="M10.28 11.897v-.002zl-.007.012-.025.065a3 3 0 0 0-.088.285c-.065.26-.132.66-.132 1.2a.3.3 0 1 1-.6 0c0-.591.074-1.04.15-1.345a3 3 0 0 1 .158-.472l.004-.009.001-.003h.001s0-.002.266.13l-.266-.132a.3.3 0 0 1 .537.268M7.557 14.675a.3.3 0 0 1 .22.362c-.073.3-.2.535-.38.694a.8.8 0 0 1-.624.205c-.415-.043-.765-.386-.87-.803a.3.3 0 0 1 .583-.146c.052.21.221.339.348.352A.2.2 0 0 0 7 15.28c.062-.054.14-.167.194-.387a.3.3 0 0 1 .363-.22"
13
+ clipRule="evenodd"
14
+ />
15
+ <path
16
+ fill={stroke}
17
+ fillRule="evenodd"
18
+ d="M7.495 14.666a.3.3 0 0 0-.3.3c0 .36.114.655.307.873.19.214.441.335.689.382.246.046.504.022.724-.072s.424-.273.492-.545a.3.3 0 1 0-.582-.145c-.01.042-.048.096-.147.139a.67.67 0 0 1-.376.033.62.62 0 0 1-.352-.19c-.086-.098-.155-.246-.155-.475a.3.3 0 0 0-.3-.3"
19
+ clipRule="evenodd"
20
+ />
21
+ <path
22
+ fill={fill}
23
+ d="M18.688 17.889c0 .503-3.6 1.508-8.042 1.508s-8.043-1.005-8.043-1.508c0-3.054 3.6-5.53 8.043-5.53 4.441 0 8.042 2.476 8.042 5.53"
24
+ />
25
+ <path
26
+ fill={stroke}
27
+ fillRule="evenodd"
28
+ d="M16.46 19.42c-1.498.324-3.551.58-5.815.58-2.263 0-4.316-.256-5.814-.58-.746-.16-1.371-.342-1.822-.525a3 3 0 0 1-.59-.304 1.2 1.2 0 0 1-.249-.23.77.77 0 0 1-.17-.472c0-1.783 1.052-3.33 2.617-4.407 1.568-1.078 3.701-1.725 6.029-1.725s4.46.647 6.028 1.725c1.566 1.076 2.617 2.624 2.617 4.407a.77.77 0 0 1-.17.472 1.2 1.2 0 0 1-.249.23 3 3 0 0 1-.59.304c-.45.183-1.076.365-1.823.526m-5.815-.023c4.442 0 8.043-1.006 8.043-1.508 0-3.054-3.6-5.53-8.042-5.53s-8.043 2.476-8.043 5.53c0 .502 3.6 1.508 8.043 1.508"
29
+ clipRule="evenodd"
30
+ />
31
+ <path
32
+ fill="#fff"
33
+ d="M12.656 11.857c0 1.388-.9 2.513-2.01 2.513s-2.011-1.125-2.011-2.513.9-2.513 2.01-2.513 2.011 1.125 2.011 2.513"
34
+ />
35
+ <path
36
+ fill={stroke}
37
+ fillRule="evenodd"
38
+ d="M13.26 11.857c0 1.589-1.052 3.117-2.614 3.117-1.563 0-2.614-1.528-2.614-3.117s1.051-3.116 2.614-3.116 2.613 1.527 2.613 3.116m-2.614 2.513c1.11 0 2.01-1.125 2.01-2.513s-.9-2.513-2.01-2.513-2.011 1.125-2.011 2.513.9 2.513 2.01 2.513"
39
+ clipRule="evenodd"
40
+ />
41
+ <path
42
+ fill="#fff"
43
+ d="M14.767 7.333c0 3.332-3.155 4.826-4.121 4.826s-4.122-1.495-4.122-4.826 1.005-5.73 4.122-5.73 4.121 2.4 4.121 5.73"
44
+ />
45
+ <path
46
+ fill={stroke}
47
+ fillRule="evenodd"
48
+ d="M11.943 12.424c-.468.208-.935.338-1.297.338-.363 0-.83-.13-1.298-.338a6.2 6.2 0 0 1-1.521-.973c-1.01-.878-1.906-2.24-1.906-4.118 0-1.705.253-3.276.985-4.436C7.669 1.687 8.903 1 10.646 1c1.742 0 2.976.687 3.74 1.897.73 1.16.984 2.73.984 4.436 0 1.878-.895 3.24-1.906 4.118a6.2 6.2 0 0 1-1.521.973m-1.297-.265c.966 0 4.121-1.494 4.121-4.826 0-3.33-1.005-5.73-4.121-5.73s-4.122 2.4-4.122 5.73c0 3.332 3.155 4.826 4.122 4.826"
49
+ clipRule="evenodd"
50
+ />
51
+ <path
52
+ fill="#ffde99"
53
+ d="M19.769 1.927a.558.558 0 0 1 .616.614l-.511 6.188c-.045.545-.716.835-1.083.469l-.67-.67-.668-.669L6.098 19.214S4.738 20.87 3.5 20.5c-1.215-.363-2.096-1.111-2-2.5.072-1.04 1-1.5 1-1.5L2 18 14.59 4.997l-.805-.805-.65-.651c-.367-.366-.078-1.036.466-1.083z"
54
+ />
55
+ <path
56
+ fill={stroke}
57
+ d="M19.717 1.33a1.156 1.156 0 0 1 1.27 1.124l-.004.136-.511 6.188c-.043.52-.385.906-.78 1.077-.398.172-.933.159-1.325-.233l-.914-.914L6.539 19.622l-.053.061q-.069.078-.192.204a6 6 0 0 1-.673.59c-.518.386-1.38.87-2.293.598-.67-.2-1.308-.524-1.769-1.043-.475-.535-.716-1.23-.658-2.073.05-.703.39-1.206.698-1.52A2.7 2.7 0 0 1 2.162 16l.046-.024.016-.01.006-.001.001-.002h.002l.267.537-.266-.538 1.29-.639-.12.365L13.748 5.004 12.71 3.965c-.39-.39-.406-.926-.235-1.323s.556-.737 1.075-.782zm.668 1.211a.558.558 0 0 0-.616-.614l-6.168.531-.099.016c-.446.106-.679.644-.43.995l.062.072 1.457 1.457L2 18l.5-1.5s-.928.459-1 1.5c-.09 1.301.679 2.04 1.776 2.427l.225.073c1.23.368 2.58-1.265 2.597-1.286L17.453 7.86l1.338 1.338.072.06c.376.27.969-.018 1.01-.53z"
58
+ />
59
+ </g>
60
+ <defs>
61
+ <clipPath id="a">
62
+ <path fill="#fff" d="M0 0h22v22H0z" />
63
+ </clipPath>
64
+ </defs>
65
+ </svg>
66
+ );
67
+ });
68
+
69
+ CustomerShortcut.displayName = 'CustomerShortcutIcon';
@@ -0,0 +1,22 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ import { fill, stroke } from './variables';
4
+
5
+ export const Desktop = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((delegated, ref) => {
6
+ return (
7
+ <svg ref={ref} width="22" height="22" viewBox="0 0 22 22" fill="none" {...delegated}>
8
+ <path fill="#fff" d="M3 6.6a.6.6 0 0 1 .6-.6h14.8a.6.6 0 0 1 .6.6v8.8a.6.6 0 0 1-.6.6H3.6a.6.6 0 0 1-.6-.6z" />
9
+ <path
10
+ fill={stroke}
11
+ d="M2.4 15.4V6.6a1.2 1.2 0 0 1 1.2-1.2V6a.6.6 0 0 0-.6.6v8.8l.012.12A.6.6 0 0 0 3.6 16h14.8l.12-.012a.6.6 0 0 0 .468-.467L19 15.4V6.6a.6.6 0 0 0-.48-.588L18.4 6v-.6a1.2 1.2 0 0 1 1.2 1.2v8.8a1.2 1.2 0 0 1-1.2 1.2H3.6a1.2 1.2 0 0 1-1.2-1.2m16-10V6H3.6v-.6z"
12
+ />
13
+ <path fill={fill} d="M3 14h16v1.4a.6.6 0 0 1-.6.6H3.6a.6.6 0 0 1-.6-.6z" />
14
+ <path
15
+ fill={stroke}
16
+ d="M3 14v1.4l.012.12A.6.6 0 0 0 3.6 16h14.8l.12-.012a.6.6 0 0 0 .468-.467L19 15.4V14zm16.6 1.4a1.2 1.2 0 0 1-1.2 1.2H3.6a1.2 1.2 0 0 1-1.2-1.2V14a.6.6 0 0 1 .6-.6h16a.6.6 0 0 1 .6.6z"
17
+ />
18
+ </svg>
19
+ );
20
+ });
21
+
22
+ Desktop.displayName = 'DesktopIcon';
@@ -28,10 +28,12 @@ import { Copy } from './copy';
28
28
  import { CopyWithCloud } from './copy-with-cloud';
29
29
  import { Coupon } from './coupon';
30
30
  import { Crystal } from './crystal';
31
+ import { CustomerShortcut } from './customer-shortcut';
31
32
  import { Customers } from './customers';
32
33
  import { Dashboard } from './dashboard';
33
34
  import { Date } from './date';
34
35
  import { DateInfinity } from './date-infinity';
36
+ import { Desktop } from './desktop';
35
37
  import { Discovery } from './discovery';
36
38
  import { Document } from './document';
37
39
  import { DocumentShortcut } from './document-shortcut';
@@ -88,6 +90,7 @@ import { Particle } from './particle';
88
90
  import { Paths } from './paths';
89
91
  import { People } from './people';
90
92
  import { Percentage } from './percentage';
93
+ import { Phone } from './phone';
91
94
  import { Piece } from './piece';
92
95
  import { Pin } from './pin';
93
96
  import { PipelineDashed } from './pipeline-dashed';
@@ -119,6 +122,7 @@ import { Subscription } from './subscription';
119
122
  import { SubscriptionContracts } from './subscription-contracts';
120
123
  import { SubscriptionPlans } from './subscription-plans';
121
124
  import { Switch } from './switch';
125
+ import { Tablet } from './tablet';
122
126
  import { Target } from './target';
123
127
  import { Topics } from './topics';
124
128
  import { TopicsBranch } from './topics-branch';
@@ -167,6 +171,10 @@ export const Icon: Record<
167
171
  Copy,
168
172
  Coupon,
169
173
  CopyWithCloud,
174
+ CustomerShortcut,
175
+ Desktop,
176
+ Phone,
177
+ Tablet,
170
178
  Customers,
171
179
  Dashboard,
172
180
  Document,
@@ -0,0 +1,22 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ import { fill, stroke } from './variables';
4
+
5
+ export const Phone = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((delegated, ref) => {
6
+ return (
7
+ <svg ref={ref} width="22" height="22" viewBox="0 0 22 22" fill="none" {...delegated}>
8
+ <path fill="#fff" d="M7.5 5.1a.6.6 0 0 1 .6-.6h5.8a.6.6 0 0 1 .6.6v11.8a.6.6 0 0 1-.6.6H8.1a.6.6 0 0 1-.6-.6z" />
9
+ <path
10
+ fill={stroke}
11
+ d="M6.9 16.9V5.1a1.2 1.2 0 0 1 1.2-1.2v.6a.6.6 0 0 0-.6.6v11.8l.012.12a.6.6 0 0 0 .588.48h5.8l.12-.012a.6.6 0 0 0 .468-.468l.012-.12V5.1a.6.6 0 0 0-.48-.588L13.9 4.5v-.6a1.2 1.2 0 0 1 1.2 1.2v11.8a1.2 1.2 0 0 1-1.2 1.2H8.1a1.2 1.2 0 0 1-1.2-1.2m7-13v.6H8.1v-.6z"
12
+ />
13
+ <path fill={fill} d="M11.65 15.15a.65.65 0 1 1-1.3 0 .65.65 0 0 1 1.3 0" />
14
+ <path
15
+ fill={stroke}
16
+ d="M9.75 15.15c0-.69.56-1.25 1.25-1.25v.6a.65.65 0 0 0-.65.65l.014.131a.65.65 0 0 0 .504.506L11 15.8a.65.65 0 0 0 .637-.519l.013-.13a.65.65 0 0 0-.519-.637l-.13-.014v-.6a1.25 1.25 0 1 1-1.25 1.25"
17
+ />
18
+ </svg>
19
+ );
20
+ });
21
+
22
+ Phone.displayName = 'PhoneIcon';
@@ -0,0 +1,22 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ import { fill, stroke } from './variables';
4
+
5
+ export const Tablet = forwardRef<SVGSVGElement, SVGProps<SVGSVGElement>>((delegated, ref) => {
6
+ return (
7
+ <svg ref={ref} width="22" height="22" viewBox="0 0 22 22" fill="none" {...delegated}>
8
+ <path fill="#fff" d="M5.5 4.6a.6.6 0 0 1 .6-.6h9.8a.6.6 0 0 1 .6.6v12.8a.6.6 0 0 1-.6.6H6.1a.6.6 0 0 1-.6-.6z" />
9
+ <path
10
+ fill={stroke}
11
+ d="M4.9 17.4V4.6a1.2 1.2 0 0 1 1.2-1.2V4a.6.6 0 0 0-.6.6v12.8l.012.12A.6.6 0 0 0 6.1 18h9.8l.12-.012a.6.6 0 0 0 .468-.468l.012-.12V4.6a.6.6 0 0 0-.48-.588L15.9 4v-.6a1.2 1.2 0 0 1 1.2 1.2v12.8a1.2 1.2 0 0 1-1.2 1.2H6.1a1.2 1.2 0 0 1-1.2-1.2m11-14V4H6.1v-.6z"
12
+ />
13
+ <path fill={fill} d="M11.65 16.15a.65.65 0 1 1-1.3 0 .65.65 0 0 1 1.3 0" />
14
+ <path
15
+ fill={stroke}
16
+ d="M9.75 16.15c0-.69.56-1.25 1.25-1.25v.6a.65.65 0 0 0-.65.65l.014.131a.65.65 0 0 0 .504.506L11 16.8a.65.65 0 0 0 .637-.519l.013-.13a.65.65 0 0 0-.519-.637l-.13-.014v-.6a1.25 1.25 0 1 1-1.25 1.25"
17
+ />
18
+ </svg>
19
+ );
20
+ });
21
+
22
+ Tablet.displayName = 'TabletIcon';