@crystallize/design-system 1.13.0 → 1.14.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": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -20,23 +20,23 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@lexical/clipboard": "0.9.0",
24
- "@lexical/code": "0.9.0",
25
- "@lexical/file": "0.9.0",
26
- "@lexical/hashtag": "0.9.0",
27
- "@lexical/html": "0.9.0",
28
- "@lexical/link": "0.9.0",
29
- "@lexical/list": "0.9.0",
30
- "@lexical/mark": "0.9.0",
31
- "@lexical/markdown": "0.9.0",
32
- "@lexical/overflow": "0.9.0",
33
- "@lexical/react": "0.9.0",
34
- "@lexical/rich-text": "0.9.0",
35
- "@lexical/selection": "0.9.0",
36
- "@lexical/table": "0.9.0",
37
- "@lexical/text": "0.9.0",
38
- "@lexical/utils": "0.9.0",
39
- "@lexical/yjs": "0.9.0",
23
+ "@lexical/clipboard": "0.10.0",
24
+ "@lexical/code": "0.10.0",
25
+ "@lexical/file": "0.10.0",
26
+ "@lexical/hashtag": "0.10.0",
27
+ "@lexical/html": "0.10.0",
28
+ "@lexical/link": "0.10.0",
29
+ "@lexical/list": "0.10.0",
30
+ "@lexical/mark": "0.10.0",
31
+ "@lexical/markdown": "0.10.0",
32
+ "@lexical/overflow": "0.10.0",
33
+ "@lexical/react": "0.10.0",
34
+ "@lexical/rich-text": "0.10.0",
35
+ "@lexical/selection": "0.10.0",
36
+ "@lexical/table": "0.10.0",
37
+ "@lexical/text": "0.10.0",
38
+ "@lexical/utils": "0.10.0",
39
+ "@lexical/yjs": "0.10.0",
40
40
  "@radix-ui/react-checkbox": "1.0.1",
41
41
  "@radix-ui/react-dialog": "1.0.2",
42
42
  "@radix-ui/react-dropdown-menu": "2.0.1",
@@ -46,7 +46,7 @@
46
46
  "@radix-ui/react-select": "1.1.2",
47
47
  "@radix-ui/react-slider": "^1.1.0",
48
48
  "class-variance-authority": "^0.4.0",
49
- "lexical": "0.9.0",
49
+ "lexical": "0.10.0",
50
50
  "prettier": "2.8.4",
51
51
  "use-debounce": "8.0.4"
52
52
  },
@@ -26,8 +26,8 @@ const translations: I18N = {
26
26
  actionFormatCode: 'Format code with Prettier',
27
27
  actionTableInsertRowsAbove: 'Insert row above',
28
28
  actionTableInsertRowsAbove_plural: 'Insert {{rows}} rows above',
29
- actionTableInsertRowsBelow: 'Insert row above',
30
- actionTableInsertRowsBelow_plural: 'Insert {{rows}} rows above',
29
+ actionTableInsertRowsBelow: 'Insert row below',
30
+ actionTableInsertRowsBelow_plural: 'Insert {{rows}} rows below',
31
31
  actionTableInsertColumnsBefore: 'Insert column left',
32
32
  actionTableInsertColumnsBefore_plural: 'Insert {{columns}} columns left',
33
33
  actionTableInsertColumnsAfter: 'Insert column right',
@@ -1,12 +1,12 @@
1
1
  .c-rte-code-action-menu-container {
2
- height: 35.8px;
3
- font-size: 10px;
4
- color: rgba(0, 0, 0, 0.5);
2
+ height: 37px;
5
3
  position: absolute;
6
4
  display: flex;
7
5
  align-items: center;
8
6
  flex-direction: row;
9
7
  user-select: none;
8
+
9
+ @apply rounded-md bg-gray-100-800/75 px-3 text-xs text-gray-700-200;
10
10
  }
11
11
 
12
12
  .c-rte-code-highlight-language {
@@ -14,25 +14,21 @@
14
14
  }
15
15
 
16
16
  .c-rte-code-button {
17
+ @apply rounded-sm p-1;
17
18
  border: 1px solid transparent;
18
- border-radius: 4px;
19
- padding: 4px;
20
19
  background: none;
21
20
  cursor: pointer;
22
21
  flex-shrink: 0;
23
22
  display: flex;
24
23
  align-items: center;
25
- color: rgba(0, 0, 0, 0.5);
26
24
  text-transform: uppercase;
27
25
 
28
26
  &:hover {
29
- border: 1px solid rgba(0, 0, 0, 0.3);
30
- opacity: 0.9;
27
+ @apply border-gray-900-50/30 opacity-90;
31
28
  }
32
29
 
33
30
  &:active {
34
- background-color: rgba(223, 232, 250);
35
- border: 1px solid rgba(0, 0, 0, 0.45);
31
+ @apply border-gray-900-50/50 bg-gray-50-900;
36
32
  }
37
33
 
38
34
  &__icon {
@@ -40,8 +36,8 @@
40
36
  width: 16px;
41
37
  opacity: 0.6;
42
38
  display: flex;
43
- color: rgba(0, 0, 0, 0.5);
44
39
  background-size: contain;
40
+ @apply text-gray;
45
41
  }
46
42
  }
47
43
 
@@ -50,12 +46,5 @@
50
46
  }
51
47
 
52
48
  .c-rte-code-error-tips {
53
- padding: 5px;
54
- border-radius: 4px;
55
- color: #fff;
56
- background: #222;
57
- margin-top: 4px;
58
- position: absolute;
59
- top: 26px;
60
- right: 0;
49
+ @apply absolute right-0 top-[26px] mt-2 rounded bg-gray-200-700 p-3 text-gray-900-50;
61
50
  }
@@ -16,7 +16,7 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
16
16
  import { CopyButton } from './components/CopyButton';
17
17
  import { canBePrettier, PrettierButton } from './components/PrettierButton';
18
18
 
19
- const CODE_PADDING = 8;
19
+ const CODE_PADDING = 0;
20
20
 
21
21
  interface Position {
22
22
  top: string;
@@ -60,23 +60,47 @@
60
60
  min-height: calc(var(--c-rte-min-height) - 8px);
61
61
  }
62
62
 
63
- pre {
64
- line-height: 1.1;
65
- color: #fff;
66
- margin: 0;
67
- padding: 10px;
68
- overflow: auto;
69
- max-height: 180px;
70
- @apply bg-purple-50-900 text-sm;
71
- }
72
-
73
- pre::-webkit-scrollbar {
74
- background: transparent;
75
- width: 10px;
76
- }
63
+ [contenteditable] {
64
+ pre {
65
+ line-height: 1.1;
66
+ color: #fff;
67
+ margin: 0;
68
+ padding: 10px;
69
+ overflow: auto;
70
+ max-height: 180px;
71
+ @apply bg-purple-50-900 text-sm;
72
+
73
+ &::-webkit-scrollbar {
74
+ background: transparent;
75
+ width: 10px;
76
+ }
77
+
78
+ &::-webkit-scrollbar-thumb {
79
+ background: #999;
80
+ }
81
+ }
77
82
 
78
- pre::-webkit-scrollbar-thumb {
79
- background: #999;
83
+ hr {
84
+ padding: 4px 0;
85
+ border: 1px solid red;
86
+ border: none;
87
+ margin: 1em 0;
88
+ cursor: pointer;
89
+
90
+ &:after {
91
+ content: '';
92
+ display: block;
93
+ height: 1px;
94
+ background-color: #ccc;
95
+ line-height: 1px;
96
+ @apply bg-purple-100-800;
97
+ }
98
+
99
+ &.selected {
100
+ outline: 2px solid rgb(60, 132, 244);
101
+ user-select: none;
102
+ }
103
+ }
80
104
  }
81
105
 
82
106
  [role='separator'] {
@@ -95,36 +119,6 @@
95
119
  opacity: 0.6;
96
120
  }
97
121
 
98
- button.item.dropdown-item-active {
99
- background-color: rgba(223, 232, 250, 0.3);
100
- }
101
-
102
- button.item.dropdown-item-active i {
103
- opacity: 1;
104
- }
105
-
106
- hr {
107
- padding: 4px 0;
108
- border: 1px solid red;
109
- border: none;
110
- margin: 1em 0;
111
- cursor: pointer;
112
- }
113
-
114
- hr:after {
115
- content: '';
116
- display: block;
117
- height: 1px;
118
- background-color: #ccc;
119
- line-height: 1px;
120
- @apply bg-purple-100-800;
121
- }
122
-
123
- hr.selected {
124
- outline: 2px solid rgb(60, 132, 244);
125
- user-select: none;
126
- }
127
-
128
122
  .TableNode__contentEditable {
129
123
  min-height: 20px;
130
124
  border: 0px;