@crystallize/design-system 1.24.0 → 1.24.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @crystallize/design-system
2
2
 
3
+ ## 1.24.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bbf1dba: Fix select item classname passing
8
+
3
9
  ## 1.24.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -39957,12 +39957,13 @@ var Radio = {
39957
39957
 
39958
39958
  // src/select/select-item.tsx
39959
39959
  var import_react113 = require("react");
39960
+ var import_class_variance_authority18 = require("class-variance-authority");
39960
39961
  var SelectPrimitives = __toESM(require("@radix-ui/react-select"));
39961
39962
  var import_jsx_runtime128 = require("react/jsx-runtime");
39962
39963
  var SelectItem = (0, import_react113.forwardRef)((props, ref) => {
39963
- const { children, ...delegated } = props;
39964
+ const { children, className, ...delegated } = props;
39964
39965
  return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(SelectPrimitives.Item, {
39965
- className: "c-select-item",
39966
+ className: (0, import_class_variance_authority18.cx)("c-select-item", className),
39966
39967
  ref,
39967
39968
  ...delegated,
39968
39969
  children: [
@@ -39977,11 +39978,11 @@ SelectItem.displayName = "SelectItem";
39977
39978
 
39978
39979
  // src/select/select-root.tsx
39979
39980
  var import_react114 = require("react");
39980
- var import_class_variance_authority18 = require("class-variance-authority");
39981
+ var import_class_variance_authority19 = require("class-variance-authority");
39981
39982
  var SelectPrimitives2 = __toESM(require("@radix-ui/react-select"));
39982
39983
  init_iconography();
39983
39984
  var import_jsx_runtime129 = require("react/jsx-runtime");
39984
- var selectTriggerStyles = (0, import_class_variance_authority18.cva)("c-select-trigger", {
39985
+ var selectTriggerStyles = (0, import_class_variance_authority19.cva)("c-select-trigger", {
39985
39986
  variants: {
39986
39987
  size: {
39987
39988
  xs: "c-select-trigger-xs",
@@ -40041,12 +40042,12 @@ var Select = {
40041
40042
 
40042
40043
  // src/slider/slider.tsx
40043
40044
  var import_react115 = require("react");
40044
- var import_class_variance_authority19 = require("class-variance-authority");
40045
+ var import_class_variance_authority20 = require("class-variance-authority");
40045
40046
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
40046
40047
  var import_jsx_runtime130 = require("react/jsx-runtime");
40047
40048
  var Slider = (0, import_react115.forwardRef)(({ className, transparentRange, ...delegated }, ref) => {
40048
40049
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(SliderPrimitive.Root, {
40049
- className: (0, import_class_variance_authority19.cx)("c-slider-root", className),
40050
+ className: (0, import_class_variance_authority20.cx)("c-slider-root", className),
40050
40051
  ref,
40051
40052
  ...delegated,
40052
40053
  children: [
@@ -40087,10 +40088,10 @@ function StackIcon({ type, children, size = 18 }) {
40087
40088
  }
40088
40089
 
40089
40090
  // src/tag/tag.tsx
40090
- var import_class_variance_authority20 = require("class-variance-authority");
40091
+ var import_class_variance_authority21 = require("class-variance-authority");
40091
40092
  init_iconography();
40092
40093
  var import_jsx_runtime132 = require("react/jsx-runtime");
40093
- var tagStyles = (0, import_class_variance_authority20.cva)("c-tag", {
40094
+ var tagStyles = (0, import_class_variance_authority21.cva)("c-tag", {
40094
40095
  variants: {
40095
40096
  variant: {
40096
40097
  default: "c-tag-default",
@@ -40130,7 +40131,7 @@ function Tag({
40130
40131
  children,
40131
40132
  onRemove && /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("button", {
40132
40133
  type: "button",
40133
- className: (0, import_class_variance_authority20.cx)("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
40134
+ className: (0, import_class_variance_authority21.cx)("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
40134
40135
  onClick: (e) => {
40135
40136
  e.stopPropagation();
40136
40137
  onRemove();
@@ -40167,12 +40168,12 @@ var RichTextEditor2 = (props) => {
40167
40168
  var import_sonner2 = require("sonner");
40168
40169
 
40169
40170
  // src/toast/toast.tsx
40170
- var import_class_variance_authority21 = require("class-variance-authority");
40171
+ var import_class_variance_authority22 = require("class-variance-authority");
40171
40172
  var import_sonner = require("sonner");
40172
40173
  init_icon_button2();
40173
40174
  init_iconography();
40174
40175
  var import_jsx_runtime149 = require("react/jsx-runtime");
40175
- var toastStyles = (0, import_class_variance_authority21.cva)("c-toast", {
40176
+ var toastStyles = (0, import_class_variance_authority22.cva)("c-toast", {
40176
40177
  variants: {
40177
40178
  type: {
40178
40179
  info: "c-toast-info",
@@ -40198,7 +40199,7 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
40198
40199
  import_sonner.toast.custom(
40199
40200
  (id) => /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
40200
40201
  "data-testid": `toast-${type}`,
40201
- className: (0, import_class_variance_authority21.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
40202
+ className: (0, import_class_variance_authority22.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
40202
40203
  children: [
40203
40204
  /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
40204
40205
  children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(ToastIcon, {
@@ -40245,10 +40246,10 @@ toast.dismiss = import_sonner.toast.dismiss;
40245
40246
  init_tooltip2();
40246
40247
 
40247
40248
  // src/switch/switch.tsx
40248
- var import_class_variance_authority22 = require("class-variance-authority");
40249
+ var import_class_variance_authority23 = require("class-variance-authority");
40249
40250
  var RadixSwitch = __toESM(require("@radix-ui/react-switch"));
40250
40251
  var import_jsx_runtime150 = require("react/jsx-runtime");
40251
- var switchStyles = (0, import_class_variance_authority22.cva)(["c-switch-root"], {
40252
+ var switchStyles = (0, import_class_variance_authority23.cva)(["c-switch-root"], {
40252
40253
  variants: {
40253
40254
  size: {
40254
40255
  xs: "c-switch-root-xs",
package/dist/index.mjs CHANGED
@@ -226,12 +226,13 @@ var Radio = {
226
226
 
227
227
  // src/select/select-item.tsx
228
228
  import { forwardRef as forwardRef3 } from "react";
229
+ import { cx as cx4 } from "class-variance-authority";
229
230
  import * as SelectPrimitives from "@radix-ui/react-select";
230
231
  import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
231
232
  var SelectItem = forwardRef3((props, ref) => {
232
- const { children, ...delegated } = props;
233
+ const { children, className, ...delegated } = props;
233
234
  return /* @__PURE__ */ jsxs3(SelectPrimitives.Item, {
234
- className: "c-select-item",
235
+ className: cx4("c-select-item", className),
235
236
  ref,
236
237
  ...delegated,
237
238
  children: [
@@ -309,12 +310,12 @@ var Select = {
309
310
 
310
311
  // src/slider/slider.tsx
311
312
  import { forwardRef as forwardRef5 } from "react";
312
- import { cx as cx4 } from "class-variance-authority";
313
+ import { cx as cx5 } from "class-variance-authority";
313
314
  import * as SliderPrimitive from "@radix-ui/react-slider";
314
315
  import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
315
316
  var Slider = forwardRef5(({ className, transparentRange, ...delegated }, ref) => {
316
317
  return /* @__PURE__ */ jsxs5(SliderPrimitive.Root, {
317
- className: cx4("c-slider-root", className),
318
+ className: cx5("c-slider-root", className),
318
319
  ref,
319
320
  ...delegated,
320
321
  children: [
@@ -351,7 +352,7 @@ function StackIcon({ type, children, size = 18 }) {
351
352
  }
352
353
 
353
354
  // src/tag/tag.tsx
354
- import { cva as cva5, cx as cx5 } from "class-variance-authority";
355
+ import { cva as cva5, cx as cx6 } from "class-variance-authority";
355
356
  import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
356
357
  var tagStyles = cva5("c-tag", {
357
358
  variants: {
@@ -393,7 +394,7 @@ function Tag({
393
394
  children,
394
395
  onRemove && /* @__PURE__ */ jsxs7("button", {
395
396
  type: "button",
396
- className: cx5("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
397
+ className: cx6("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
397
398
  onClick: (e) => {
398
399
  e.stopPropagation();
399
400
  onRemove();
@@ -430,7 +431,7 @@ var RichTextEditor = (props) => {
430
431
  import { Toaster } from "sonner";
431
432
 
432
433
  // src/toast/toast.tsx
433
- import { cva as cva6, cx as cx6 } from "class-variance-authority";
434
+ import { cva as cva6, cx as cx7 } from "class-variance-authority";
434
435
  import { toast as sonnerToast } from "sonner";
435
436
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
436
437
  var toastStyles = cva6("c-toast", {
@@ -459,7 +460,7 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
459
460
  sonnerToast.custom(
460
461
  (id) => /* @__PURE__ */ jsxs8("div", {
461
462
  "data-testid": `toast-${type}`,
462
- className: cx6(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
463
+ className: cx7(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
463
464
  children: [
464
465
  /* @__PURE__ */ jsx14("div", {
465
466
  children: /* @__PURE__ */ jsx14(ToastIcon, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystallize/design-system",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "types": "./dist/index.d.ts",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -4,7 +4,6 @@ import * as CollapsiblePrimitives from '@radix-ui/react-collapsible';
4
4
  import type { CollapsibleTriggerProps } from '@radix-ui/react-collapsible';
5
5
 
6
6
  import './collapsible.css';
7
-
8
7
  import { Icon } from '../iconography';
9
8
 
10
9
  type CollapsibleContentProps = ComponentProps<typeof CollapsiblePrimitives.Content>;
@@ -1,14 +1,15 @@
1
1
  import { ComponentProps, forwardRef } from 'react';
2
+ import { cx } from 'class-variance-authority';
2
3
  import * as SelectPrimitives from '@radix-ui/react-select';
3
4
 
4
5
  export type SelectItemRef = HTMLDivElement;
5
6
  export type SelectItemProps = ComponentProps<typeof SelectPrimitives.Item>;
6
7
 
7
8
  export const SelectItem = forwardRef<SelectItemRef, SelectItemProps>((props, ref) => {
8
- const { children, ...delegated } = props;
9
+ const { children, className, ...delegated } = props;
9
10
 
10
11
  return (
11
- <SelectPrimitives.Item className="c-select-item" ref={ref} {...delegated}>
12
+ <SelectPrimitives.Item className={cx('c-select-item', className)} ref={ref} {...delegated}>
12
13
  <SelectPrimitives.ItemText>{children}</SelectPrimitives.ItemText>
13
14
  <SelectPrimitives.ItemIndicator />
14
15
  </SelectPrimitives.Item>