@crystallize/design-system 1.21.2 → 1.22.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.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 497d580: Change toast component data-testid to include the toast type so we can use that to assert on it.
8
+
3
9
  ## 1.21.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -39113,6 +39113,7 @@ function RichTextEditorWithoutContext({
39113
39113
  slotPreContent,
39114
39114
  /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", {
39115
39115
  className: `c-rte-editor-container ${disabled ? "disabled" : ""}`,
39116
+ "data-testid": "rich-text-editor",
39116
39117
  children: [
39117
39118
  maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(MaxLengthPlugin, {
39118
39119
  maxLength
@@ -39666,7 +39667,7 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
39666
39667
  const toastId = Date.now().toString();
39667
39668
  import_sonner.toast.custom(
39668
39669
  (id) => /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", {
39669
- "data-testid": "toast-content",
39670
+ "data-testid": `toast-${type}`,
39670
39671
  className: (0, import_class_variance_authority20.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
39671
39672
  children: [
39672
39673
  /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", {
package/dist/index.mjs CHANGED
@@ -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-BA5R66CS.mjs"));
371
+ var LazyRichTextEditor = lazy(() => import("./rich-text-editor-UNPP4LX5.mjs"));
372
372
  var RichTextEditor = (props) => {
373
373
  return /* @__PURE__ */ jsx12(Suspense, {
374
374
  fallback: null,
@@ -410,7 +410,7 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
410
410
  const toastId = Date.now().toString();
411
411
  sonnerToast.custom(
412
412
  (id) => /* @__PURE__ */ jsxs7("div", {
413
- "data-testid": "toast-content",
413
+ "data-testid": `toast-${type}`,
414
414
  className: cx4(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
415
415
  children: [
416
416
  /* @__PURE__ */ jsx13("div", {
@@ -3164,6 +3164,7 @@ function RichTextEditorWithoutContext({
3164
3164
  slotPreContent,
3165
3165
  /* @__PURE__ */ jsxs10("div", {
3166
3166
  className: `c-rte-editor-container ${disabled ? "disabled" : ""}`,
3167
+ "data-testid": "rich-text-editor",
3167
3168
  children: [
3168
3169
  maxLength != null ? /* @__PURE__ */ jsx15(MaxLengthPlugin, {
3169
3170
  maxLength
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "1.21.2",
3
+ "version": "1.22.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -142,7 +142,7 @@ function RichTextEditorWithoutContext({
142
142
  actionsMenuAppend={actionsMenuAppend}
143
143
  />
144
144
  {slotPreContent}
145
- <div className={`c-rte-editor-container ${disabled ? 'disabled' : ''}`}>
145
+ <div className={`c-rte-editor-container ${disabled ? 'disabled' : ''}`} data-testid="rich-text-editor">
146
146
  {maxLength != null ? <MaxLengthPlugin maxLength={maxLength} /> : null}
147
147
  {!autoFocus ? null : <AutoFocusPlugin />}
148
148
  <ClearEditorPlugin />
@@ -44,7 +44,7 @@ export const toast = ({ title, message, type = 'success', timeout = 6000 }: Toas
44
44
  sonnerToast.custom(
45
45
  id => (
46
46
  <div
47
- data-testid="toast-content"
47
+ data-testid={`toast-${type}`}
48
48
  className={cx(toastStyles({ type }), withMessage ? 'c-toast-with-message' : 'c-toast-title-only')}
49
49
  >
50
50
  <div>{<ToastIcon width={26} height={26} />}</div>