@crystallize/design-system 1.14.0 → 1.15.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @crystallize/design-system
2
2
 
3
+ ## 1.15.0
4
+
5
+ ### Minor Changes
6
+
7
+ - af5e94e1: Added custom variables for rich text editor padding. This will enable easy override from the consumer.
8
+
3
9
  ## 1.14.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.css CHANGED
@@ -2258,11 +2258,12 @@ button {
2258
2258
  overflow: auto;
2259
2259
  border-top-left-radius: 0.375rem;
2260
2260
  border-top-right-radius: 0.375rem;
2261
- padding-top: 0.25rem;
2262
- padding-bottom: 0.25rem;
2263
2261
  padding-left: 1rem;
2264
2262
  padding-right: 0.5rem;
2265
2263
  vertical-align: middle;
2264
+ padding-top: var(--c-rte-toolbar-pt, 0.25rem);
2265
+ padding-left: var(--c-rte-toolbar-pl, 0.5rem);
2266
+ padding-right: var(--c-rte-toolbar-pr, 0.5rem);
2266
2267
  }
2267
2268
  .c-rte-toolbar__inner {
2268
2269
  display: flex;
@@ -2519,22 +2520,6 @@ button {
2519
2520
  right: 2px;
2520
2521
  top: 2px;
2521
2522
  }
2522
- .c-rich-text-editor .c-rte-contenteditable-root {
2523
- position: relative;
2524
- display: block;
2525
- border-width: 0px;
2526
- padding-left: 1.5rem;
2527
- padding-right: 1.5rem;
2528
- padding-top: 0.5rem;
2529
- padding-bottom: 0.5rem;
2530
- padding-top: 0px !important;
2531
- font-size: 0.875rem;
2532
- line-height: 1.25rem;
2533
- outline-width: 0px;
2534
- tab-size: 1;
2535
- padding-bottom: 8px;
2536
- min-height: calc(var(--c-rte-min-height) - 8px);
2537
- }
2538
2523
  .c-rich-text-editor [contenteditable] pre {
2539
2524
  line-height: 1.1;
2540
2525
  color: #fff;
@@ -2645,6 +2630,26 @@ button {
2645
2630
  visibility: hidden;
2646
2631
  }
2647
2632
  }
2633
+ .c-rte-contenteditable-root {
2634
+ position: relative;
2635
+ display: block;
2636
+ border-width: 0px;
2637
+ padding-left: 1.5rem;
2638
+ padding-right: 1.5rem;
2639
+ padding-top: 0.5rem;
2640
+ padding-bottom: 0.5rem;
2641
+ padding-top: 0px !important;
2642
+ font-size: 0.875rem;
2643
+ line-height: 1.25rem;
2644
+ outline-width: 0px;
2645
+ tab-size: 1;
2646
+ padding-bottom: 8px;
2647
+ min-height: calc(var(--c-rte-min-height) - 8px);
2648
+ padding-top: var(--c-rte-content-pt, 0);
2649
+ padding-left: var(--c-rte-content-pl, 1.5rem);
2650
+ padding-right: var(--c-rte-content-pr, 1.5rem);
2651
+ padding-bottom: var(--c-rte-content-pb, 8px);
2652
+ }
2648
2653
 
2649
2654
  /* src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.css */
2650
2655
  .c-rte-link-editor {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -1,5 +1,10 @@
1
1
  .c-rte-toolbar {
2
- @apply flex h-12 w-full justify-between overflow-auto rounded-tl-md rounded-tr-md py-1 pl-4 pr-2 align-middle;
2
+ @apply flex h-12 w-full justify-between overflow-auto rounded-tl-md rounded-tr-md pl-4 pr-2 align-middle;
3
+
4
+ /* Allow for customization from the outside */
5
+ padding-top: var(--c-rte-toolbar-pt, 0.25rem);
6
+ padding-left: var(--c-rte-toolbar-pl, 0.5rem);
7
+ padding-right: var(--c-rte-toolbar-pr, 0.5rem);
3
8
 
4
9
  &__inner {
5
10
  @apply flex;
@@ -53,13 +53,6 @@
53
53
  top: 2px;
54
54
  }
55
55
 
56
- .c-rte-contenteditable-root {
57
- @apply relative block border-0 px-6 py-2 !pt-0 text-sm outline-0;
58
- tab-size: 1;
59
- padding-bottom: 8px;
60
- min-height: calc(var(--c-rte-min-height) - 8px);
61
- }
62
-
63
56
  [contenteditable] {
64
57
  pre {
65
58
  line-height: 1.1;
@@ -167,3 +160,16 @@
167
160
  }
168
161
  }
169
162
  }
163
+
164
+ .c-rte-contenteditable-root {
165
+ @apply relative block border-0 px-6 py-2 !pt-0 text-sm outline-0;
166
+ tab-size: 1;
167
+ padding-bottom: 8px;
168
+ min-height: calc(var(--c-rte-min-height) - 8px);
169
+
170
+ /* Allow for customization from the outside */
171
+ padding-top: var(--c-rte-content-pt, 0);
172
+ padding-left: var(--c-rte-content-pl, 1.5rem);
173
+ padding-right: var(--c-rte-content-pr, 1.5rem);
174
+ padding-bottom: var(--c-rte-content-pb, 8px);
175
+ }