@crystallize/design-system 1.22.0 → 1.23.1

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/dist/index.mjs CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  showError,
18
18
  showInfo,
19
19
  showWarning
20
- } from "./chunk-PB47BT3T.mjs";
20
+ } from "./chunk-VYFBR7S4.mjs";
21
21
  import "./chunk-NIH5ZMPE.mjs";
22
22
 
23
23
  // src/card/card.tsx
@@ -224,13 +224,13 @@ var selectTriggerStyles = cva4("c-select-trigger", {
224
224
  }
225
225
  });
226
226
  var SelectContainer = forwardRef4(
227
- ({ children, id, placeholder, disabled, size, ...delegated }, ref) => {
227
+ ({ children, id, placeholder, disabled, size, triggerClassName, ...delegated }, ref) => {
228
228
  return /* @__PURE__ */ jsxs3(SelectPrimitives2.Root, {
229
229
  ...delegated,
230
230
  children: [
231
231
  /* @__PURE__ */ jsxs3(SelectPrimitives2.Trigger, {
232
232
  ref,
233
- className: selectTriggerStyles({ size }),
233
+ className: selectTriggerStyles({ size, className: triggerClassName }),
234
234
  disabled,
235
235
  id,
236
236
  children: [
@@ -368,7 +368,7 @@ function Tag({ children, className, variant, size, prepend, onRemove, ...delegat
368
368
  // src/rich-text-editor/index.tsx
369
369
  import { lazy, Suspense } from "react";
370
370
  import { jsx as jsx12 } from "react/jsx-runtime";
371
- var LazyRichTextEditor = lazy(() => import("./rich-text-editor-UNPP4LX5.mjs"));
371
+ var LazyRichTextEditor = lazy(() => import("./rich-text-editor-PXZQZRPK.mjs"));
372
372
  var RichTextEditor = (props) => {
373
373
  return /* @__PURE__ */ jsx12(Suspense, {
374
374
  fallback: null,
@@ -1582,11 +1582,14 @@
1582
1582
  }
1583
1583
 
1584
1584
  /* src/dialog/dialog.css */
1585
+ :root {
1586
+ --dialog-z-index: 100;
1587
+ }
1585
1588
  .c-dialog {
1586
1589
  position: fixed;
1587
1590
  left: 50%;
1588
1591
  top: 50%;
1589
- z-index: 100;
1592
+ z-index: var(--dialog-z-index);
1590
1593
  width: auto;
1591
1594
  min-width: 25%;
1592
1595
  max-width: 800px;
@@ -1608,7 +1611,7 @@
1608
1611
  .c-dialog-overlay {
1609
1612
  position: fixed;
1610
1613
  inset: 0px;
1611
- z-index: 100;
1614
+ z-index: var(--dialog-z-index);
1612
1615
  background-color: rgb(var(--c-color-overlay) / 0.3);
1613
1616
  }
1614
1617
  .c-dialog-icon-wrapper {
@@ -6,7 +6,7 @@ import {
6
6
  Icon,
7
7
  IconButton,
8
8
  InputWithLabel
9
- } from "./chunk-PB47BT3T.mjs";
9
+ } from "./chunk-VYFBR7S4.mjs";
10
10
  import "./chunk-NIH5ZMPE.mjs";
11
11
 
12
12
  // src/rich-text-editor/rich-text-editor.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "1.22.0",
3
+ "version": "1.23.1",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -1,9 +1,18 @@
1
+ :root {
2
+ --dialog-z-index: 100;
3
+ }
4
+
1
5
  .c-dialog {
2
- @apply fixed left-1/2 top-1/2 z-[100] w-auto min-w-[25%] max-w-[800px] rounded-lg bg-elevate p-14 leading-6 text-gray-500-400 shadow;
6
+ @apply fixed
7
+ left-1/2 top-1/2
8
+ z-[--dialog-z-index]
9
+ w-auto min-w-[25%] max-w-[800px] rounded-lg bg-elevate p-14 leading-6 text-gray-500-400 shadow;
3
10
  transform: translate(-50%, -50%);
4
11
 
5
12
  &-overlay {
6
- @apply fixed inset-0 z-[100] bg-overlay;
13
+ @apply fixed
14
+ inset-0 z-[--dialog-z-index]
15
+ bg-overlay;
7
16
  }
8
17
 
9
18
  &-icon-wrapper {
@@ -0,0 +1,58 @@
1
+ import { forwardRef, SVGProps } from 'react';
2
+
3
+ type FlowProps = SVGProps<SVGSVGElement>;
4
+
5
+ type FlowRef = SVGSVGElement;
6
+
7
+ export const Flow = forwardRef<FlowRef, FlowProps>((delegated, ref) => {
8
+ return (
9
+ <svg
10
+ ref={ref}
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ width="23"
13
+ height="22"
14
+ fill="none"
15
+ viewBox="0 0 23 22"
16
+ {...delegated}
17
+ >
18
+ <path
19
+ fill="#fff"
20
+ d="M9.892 13.114a1.04 1.04 0 01-1.041-1.04v-2.29c0-.576.466-1.042 1.04-1.042h2.29c.576 0 1.042.466 1.042 1.041v2.29a1.04 1.04 0 01-1.041 1.04h-2.29z"
21
+ ></path>
22
+ <path
23
+ fill="#528693"
24
+ fillRule="evenodd"
25
+ d="M8.226 12.073v-2.29c0-.92.746-1.665 1.666-1.665h2.29c.92 0 1.665.745 1.665 1.665v2.29c0 .92-.746 1.665-1.665 1.665h-2.29c-.92 0-1.666-.745-1.666-1.665zm.625 0c0 .575.466 1.04 1.04 1.04h2.29a1.04 1.04 0 001.042-1.04v-2.29a1.04 1.04 0 00-1.041-1.04h-2.29a1.04 1.04 0 00-1.041 1.04v2.29z"
26
+ clipRule="evenodd"
27
+ ></path>
28
+ <path
29
+ fill="#BFF6F8"
30
+ d="M15.79 13.114a1.04 1.04 0 01-1.041-1.04v-2.29c0-.576.465-1.042 1.04-1.042h2.29c.575 0 1.041.466 1.041 1.041v2.29a1.04 1.04 0 01-1.04 1.04h-2.29z"
31
+ ></path>
32
+ <path
33
+ fill="#528693"
34
+ fillRule="evenodd"
35
+ d="M14.124 12.073v-2.29c0-.92.746-1.665 1.665-1.665h2.29c.92 0 1.665.745 1.665 1.665v2.29c0 .92-.745 1.665-1.665 1.665h-2.29c-.92 0-1.665-.745-1.665-1.665zm.624 0c0 .575.466 1.04 1.041 1.04h2.29a1.04 1.04 0 001.041-1.04v-2.29a1.04 1.04 0 00-1.04-1.04h-2.29a1.04 1.04 0 00-1.041 1.04v2.29z"
36
+ clipRule="evenodd"
37
+ ></path>
38
+ <path
39
+ fill="#BFF6F8"
40
+ d="M3.994 13.114a1.04 1.04 0 01-1.04-1.04v-2.29c0-.576.465-1.042 1.04-1.042h2.29c.575 0 1.041.466 1.041 1.041v2.29a1.04 1.04 0 01-1.04 1.04h-2.29z"
41
+ ></path>
42
+ <path
43
+ fill="#528693"
44
+ fillRule="evenodd"
45
+ d="M2.329 12.073v-2.29c0-.92.746-1.665 1.665-1.665h2.29c.92 0 1.665.745 1.665 1.665v2.29c0 .92-.745 1.665-1.665 1.665h-2.29c-.92 0-1.665-.745-1.665-1.665zm.624 0c0 .575.466 1.04 1.041 1.04h2.29a1.04 1.04 0 001.041-1.04v-2.29a1.04 1.04 0 00-1.04-1.04h-2.29a1.04 1.04 0 00-1.042 1.04v2.29zM5.14 17.778a.312.312 0 01-.313-.313v-2.558a.312.312 0 11.624 0v2.558c0 .173-.14.313-.312.313zM14.617 5.526l1.987-1.987a.312.312 0 01.442 0l1.987 1.987a.312.312 0 01-.441.441l-1.454-1.454V8.34a.312.312 0 01-.625 0V4.513l-1.454 1.454a.312.312 0 11-.442-.441z"
46
+ clipRule="evenodd"
47
+ ></path>
48
+ <path
49
+ fill="#528693"
50
+ fillRule="evenodd"
51
+ d="M11.037 8.651c.172 0 .312-.14.312-.312V4.59c0-.747-.606-1.353-1.353-1.353h-3.97c-.748 0-1.354.606-1.354 1.353v3.75a.312.312 0 00.625 0V4.59c0-.402.326-.728.728-.728h3.97c.403 0 .73.326.73.728v3.75c0 .173.14.312.312.312zM11.037 13.479a.312.312 0 00-.313.312v3.75c0 .747.606 1.353 1.354 1.353h3.97c.748 0 1.353-.606 1.353-1.353v-3.75a.312.312 0 00-.624 0v3.75a.729.729 0 01-.729.728h-3.97a.729.729 0 01-.729-.728v-3.75a.312.312 0 00-.312-.312zM5.14 20.29a.312.312 0 01-.313-.311v-.91a.312.312 0 11.624 0v.91c0 .172-.14.312-.312.312z"
52
+ clipRule="evenodd"
53
+ ></path>
54
+ </svg>
55
+ );
56
+ });
57
+
58
+ Flow.displayName = 'FlowIcon';
@@ -34,6 +34,7 @@ import { EyeOpen } from './eye-open';
34
34
  import { FileUpload } from './file-upload';
35
35
  import { Filename } from './filename';
36
36
  import { FixedPropertyTable } from './fixed-property-table';
37
+ import { Flow } from './flow';
37
38
  import { Folder } from './folder';
38
39
  import { FolderShortcut } from './folder-shortcut';
39
40
  import { Frontends } from './frontends';
@@ -124,6 +125,7 @@ export const Icon = {
124
125
  Edit,
125
126
  EyeClosed,
126
127
  EyeOpen,
128
+ Flow,
127
129
  Folder,
128
130
  FolderShortcut,
129
131
  Frontends,
@@ -21,16 +21,22 @@ const selectTriggerStyles = cva('c-select-trigger', {
21
21
  export type SelectRef = HTMLButtonElement;
22
22
  export type SelectProps = ComponentProps<typeof SelectPrimitives.Root> &
23
23
  VariantProps<typeof selectTriggerStyles> & {
24
+ triggerClassName?: string;
24
25
  disabled?: boolean;
25
26
  id?: string;
26
27
  placeholder?: string;
27
28
  };
28
29
 
29
30
  export const SelectContainer = forwardRef<SelectRef, SelectProps>(
30
- ({ children, id, placeholder, disabled, size, ...delegated }, ref) => {
31
+ ({ children, id, placeholder, disabled, size, triggerClassName, ...delegated }, ref) => {
31
32
  return (
32
33
  <SelectPrimitives.Root {...delegated}>
33
- <SelectPrimitives.Trigger ref={ref} className={selectTriggerStyles({ size })} disabled={disabled} id={id}>
34
+ <SelectPrimitives.Trigger
35
+ ref={ref}
36
+ className={selectTriggerStyles({ size, className: triggerClassName })}
37
+ disabled={disabled}
38
+ id={id}
39
+ >
34
40
  <SelectPrimitives.Value placeholder={<span className="c-select-value">{placeholder ?? 'Select...'}</span>} />
35
41
  <Icon.Arrow />
36
42
  </SelectPrimitives.Trigger>
@@ -43,3 +43,9 @@
43
43
  @apply bg-gray-50-900 outline-none;
44
44
  }
45
45
  }
46
+
47
+ /*This is a workaround to handle z-index on dialog component that is also rendered in portal on the same level*/
48
+ /*Styles added to .c-dialog are added to parent div as inline styles, therefore ~ div > .c-select-content*/
49
+ .c-dialog ~ div > .c-select-content {
50
+ z-index: calc(var(--dialog-z-index) + 1);
51
+ }