@rubenpazch/radio-button 2.0.0 → 4.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../src/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAkDD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+E3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../src/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC3C,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAqDD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgG3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAoB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA+EzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAoB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGrE,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqFzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -426,46 +426,78 @@ function requireJsxRuntime () {
426
426
 
427
427
  var jsxRuntimeExports = requireJsxRuntime();
428
428
 
429
+ function styleInject(css, ref) {
430
+ if ( ref === void 0 ) ref = {};
431
+ var insertAt = ref.insertAt;
432
+
433
+ if (!css || typeof document === 'undefined') { return; }
434
+
435
+ var head = document.head || document.getElementsByTagName('head')[0];
436
+ var style = document.createElement('style');
437
+ style.type = 'text/css';
438
+
439
+ if (insertAt === 'top') {
440
+ if (head.firstChild) {
441
+ head.insertBefore(style, head.firstChild);
442
+ } else {
443
+ head.appendChild(style);
444
+ }
445
+ } else {
446
+ head.appendChild(style);
447
+ }
448
+
449
+ if (style.styleSheet) {
450
+ style.styleSheet.cssText = css;
451
+ } else {
452
+ style.appendChild(document.createTextNode(css));
453
+ }
454
+ }
455
+
456
+ var css_248z$1 = "/* Container */\n.RadioButton-module_container__djpgH {\n display: flex;\n}\n\n/* Radio wrapper */\n.RadioButton-module_radioWrapper__B--bk {\n display: flex;\n align-items: flex-start;\n}\n\n/* Radio input base styles */\n.RadioButton-module_radio__0qwuN {\n cursor: pointer;\n transition: all 150ms ease;\n border-width: 1px;\n border-style: solid;\n}\n\n.RadioButton-module_radio__0qwuN:focus {\n outline: none;\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);\n border-color: currentColor;\n}\n\n.RadioButton-module_radioDisabled__-Go-G {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.RadioButton-module_radioDisabled__-Go-G:focus {\n box-shadow: none;\n}\n\n/* Radio sizes */\n.RadioButton-module_radioSm__OFgkW {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n.RadioButton-module_radioMd__ODMND {\n width: 1rem;\n height: 1rem;\n}\n\n.RadioButton-module_radioLg__JNQ1i {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* Container heights for alignment */\n.RadioButton-module_containerSm__lRtj6 {\n height: 1rem;\n}\n\n.RadioButton-module_containerMd__0M3ye {\n height: 1.25rem;\n}\n\n.RadioButton-module_containerLg__6cNDS {\n height: 1.5rem;\n}\n\n/* Radio border colors */\n.RadioButton-module_radioBorderDefault__XKQUN {\n border-color: #d1d5db;\n}\n\n.RadioButton-module_radioBorderRequired__P4-sB {\n border-color: #ef4444;\n}\n\n/* Radio variants - checked state colors */\n.RadioButton-module_radioDefault__3eGat {\n color: #2563eb;\n}\n\n.RadioButton-module_radioPrimary__SdKsD {\n color: #4f46e5;\n}\n\n.RadioButton-module_radioSuccess__Kktb6 {\n color: #16a34a;\n}\n\n.RadioButton-module_radioWarning__nGt0i {\n color: #ca8a04;\n}\n\n.RadioButton-module_radioDanger__VVih- {\n color: #dc2626;\n}\n\n/* Radio focus ring colors */\n.RadioButton-module_radioFocusDefault__2vgX4:focus {\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);\n}\n\n.RadioButton-module_radioFocusPrimary__xowqj:focus {\n box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);\n}\n\n.RadioButton-module_radioFocusSuccess__Kjf-i:focus {\n box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);\n}\n\n.RadioButton-module_radioFocusWarning__70geb:focus {\n box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.2);\n}\n\n.RadioButton-module_radioFocusDanger__iEn6l:focus {\n box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);\n}\n\n/* Content wrapper */\n.RadioButton-module_contentWrapper__ZO1lz {\n margin-left: 0.75rem;\n flex: 1;\n}\n\n/* Label styles */\n.RadioButton-module_label__51-xH {\n display: block;\n font-weight: 500;\n cursor: pointer;\n}\n\n.RadioButton-module_labelSm__3EYBQ {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_labelMd__zaX9f {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.RadioButton-module_labelLg__GVVcz {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.RadioButton-module_labelDefault__JR0tu {\n color: #374151;\n}\n\n.RadioButton-module_labelDisabled__ZxGi4 {\n color: #9ca3af;\n cursor: not-allowed;\n}\n\n.RadioButton-module_labelRequired__zi0lY {\n color: #dc2626;\n cursor: pointer;\n}\n\n/* Description styles */\n.RadioButton-module_description__wQLxD {\n margin-top: 0.125rem;\n color: #6b7280;\n}\n\n.RadioButton-module_descriptionSm__HvSLH {\n font-size: 0.625rem;\n line-height: 0.875rem;\n}\n\n.RadioButton-module_descriptionMd__DPo-2 {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_descriptionLg__ARNPn {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n/* Error message styles */\n.RadioButton-module_error__WmXjN {\n margin-top: 0.125rem;\n color: #dc2626;\n}\n\n.RadioButton-module_errorSm__um4SY {\n font-size: 0.625rem;\n line-height: 0.875rem;\n}\n\n.RadioButton-module_errorMd__DgI7N {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_errorLg__u-854 {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n";
457
+ var styles$1 = {"container":"RadioButton-module_container__djpgH","radioWrapper":"RadioButton-module_radioWrapper__B--bk","radio":"RadioButton-module_radio__0qwuN","radioDisabled":"RadioButton-module_radioDisabled__-Go-G","radioSm":"RadioButton-module_radioSm__OFgkW","radioMd":"RadioButton-module_radioMd__ODMND","radioLg":"RadioButton-module_radioLg__JNQ1i","containerSm":"RadioButton-module_containerSm__lRtj6","containerMd":"RadioButton-module_containerMd__0M3ye","containerLg":"RadioButton-module_containerLg__6cNDS","radioBorderDefault":"RadioButton-module_radioBorderDefault__XKQUN","radioBorderRequired":"RadioButton-module_radioBorderRequired__P4-sB","radioDefault":"RadioButton-module_radioDefault__3eGat","radioPrimary":"RadioButton-module_radioPrimary__SdKsD","radioSuccess":"RadioButton-module_radioSuccess__Kktb6","radioWarning":"RadioButton-module_radioWarning__nGt0i","radioDanger":"RadioButton-module_radioDanger__VVih-","radioFocusDefault":"RadioButton-module_radioFocusDefault__2vgX4","radioFocusPrimary":"RadioButton-module_radioFocusPrimary__xowqj","radioFocusSuccess":"RadioButton-module_radioFocusSuccess__Kjf-i","radioFocusWarning":"RadioButton-module_radioFocusWarning__70geb","radioFocusDanger":"RadioButton-module_radioFocusDanger__iEn6l","contentWrapper":"RadioButton-module_contentWrapper__ZO1lz","label":"RadioButton-module_label__51-xH","labelSm":"RadioButton-module_labelSm__3EYBQ","labelMd":"RadioButton-module_labelMd__zaX9f","labelLg":"RadioButton-module_labelLg__GVVcz","labelDefault":"RadioButton-module_labelDefault__JR0tu","labelDisabled":"RadioButton-module_labelDisabled__ZxGi4","labelRequired":"RadioButton-module_labelRequired__zi0lY","description":"RadioButton-module_description__wQLxD","descriptionSm":"RadioButton-module_descriptionSm__HvSLH","descriptionMd":"RadioButton-module_descriptionMd__DPo-2","descriptionLg":"RadioButton-module_descriptionLg__ARNPn","error":"RadioButton-module_error__WmXjN","errorSm":"RadioButton-module_errorSm__um4SY","errorMd":"RadioButton-module_errorMd__DgI7N","errorLg":"RadioButton-module_errorLg__u-854"};
458
+ styleInject(css_248z$1);
459
+
460
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
429
461
  const sizeClasses = {
430
462
  sm: {
431
- radio: "w-3 h-3",
432
- label: "text-xs",
433
- description: "text-[10px]",
434
- container: "h-4",
463
+ radio: styles$1.radioSm,
464
+ label: styles$1.labelSm,
465
+ description: styles$1.descriptionSm,
466
+ container: styles$1.containerSm,
435
467
  },
436
468
  md: {
437
- radio: "w-4 h-4",
438
- label: "text-sm",
439
- description: "text-xs",
440
- container: "h-5",
469
+ radio: styles$1.radioMd,
470
+ label: styles$1.labelMd,
471
+ description: styles$1.descriptionMd,
472
+ container: styles$1.containerMd,
441
473
  },
442
474
  lg: {
443
- radio: "w-5 h-5",
444
- label: "text-base",
445
- description: "text-sm",
446
- container: "h-6",
475
+ radio: styles$1.radioLg,
476
+ label: styles$1.labelLg,
477
+ description: styles$1.descriptionLg,
478
+ container: styles$1.containerLg,
447
479
  },
448
480
  };
449
481
  const variantClasses = {
450
482
  default: {
451
- checked: "text-blue-600",
452
- focus: "focus:ring-blue-500",
483
+ checked: styles$1.radioDefault,
484
+ focus: styles$1.radioFocusDefault,
453
485
  },
454
486
  primary: {
455
- checked: "text-indigo-600",
456
- focus: "focus:ring-indigo-500",
487
+ checked: styles$1.radioPrimary,
488
+ focus: styles$1.radioFocusPrimary,
457
489
  },
458
490
  success: {
459
- checked: "text-green-600",
460
- focus: "focus:ring-green-500",
491
+ checked: styles$1.radioSuccess,
492
+ focus: styles$1.radioFocusSuccess,
461
493
  },
462
494
  warning: {
463
- checked: "text-yellow-600",
464
- focus: "focus:ring-yellow-500",
495
+ checked: styles$1.radioWarning,
496
+ focus: styles$1.radioFocusWarning,
465
497
  },
466
498
  danger: {
467
- checked: "text-red-600",
468
- focus: "focus:ring-red-500",
499
+ checked: styles$1.radioDanger,
500
+ focus: styles$1.radioFocusDanger,
469
501
  },
470
502
  };
471
503
  const RadioButton = ({ id, name, label, value, checked = false, onChange, disabled = false, description, error, className = "", required = false, size = "md", variant = "default", }) => {
@@ -477,33 +509,35 @@ const RadioButton = ({ id, name, label, value, checked = false, onChange, disabl
477
509
  onChange(event.target.value);
478
510
  }
479
511
  };
480
- return (jsxRuntimeExports.jsxs("div", { className: `flex ${className}`, children: [jsxRuntimeExports.jsx("div", { className: `flex items-start ${sizes.container}`, children: jsxRuntimeExports.jsx("input", { id: radioId, name: name, type: "radio", value: value, checked: checked, onChange: handleChange, disabled: disabled, required: required, className: `
481
- ${sizes.radio}
482
- ${required && !checked ? "border-red-500" : "border-gray-300"}
483
- ${variants.checked}
484
- ${variants.focus}
485
- focus:ring-2
486
- focus:ring-offset-0
487
- disabled:opacity-50
488
- disabled:cursor-not-allowed
489
- cursor-pointer
490
- transition-colors
491
- `, "aria-describedby": description ? `${radioId}-description` : undefined, "aria-invalid": !!error }) }), jsxRuntimeExports.jsxs("div", { className: "ml-3 flex-1", children: [jsxRuntimeExports.jsx("label", { htmlFor: radioId, className: `
492
- ${sizes.label}
493
- font-medium
494
- ${disabled ? "text-gray-400 cursor-not-allowed" : required && !checked ? "text-red-600 cursor-pointer" : "text-gray-700 cursor-pointer"}
495
- block
496
- `, children: label }), description && (jsxRuntimeExports.jsx("p", { id: `${radioId}-description`, className: `${sizes.description} text-gray-500 mt-0.5`, children: description })), error && (jsxRuntimeExports.jsx("p", { className: `${sizes.description} text-red-600 mt-0.5`, children: error }))] })] }));
512
+ const radioClasses = classNames(styles$1.radio, sizes.radio, sizes.container, variants.checked, variants.focus, required && !checked
513
+ ? styles$1.radioBorderRequired
514
+ : styles$1.radioBorderDefault, disabled && styles$1.radioDisabled);
515
+ const labelClasses = classNames(styles$1.label, sizes.label, disabled
516
+ ? styles$1.labelDisabled
517
+ : required && !checked
518
+ ? styles$1.labelRequired
519
+ : styles$1.labelDefault);
520
+ const descriptionClasses = classNames(styles$1.description, sizes.description);
521
+ const errorClasses = classNames(styles$1.error, size === "sm"
522
+ ? styles$1.errorSm
523
+ : size === "lg"
524
+ ? styles$1.errorLg
525
+ : styles$1.errorMd);
526
+ return (jsxRuntimeExports.jsxs("div", { className: classNames(styles$1.container, className), "data-testid": "radio-button-container", "data-size": size, "data-variant": variant, "data-checked": checked, "data-disabled": disabled, "data-error": !!error, children: [jsxRuntimeExports.jsx("div", { className: classNames(styles$1.radioWrapper, sizes.container), children: jsxRuntimeExports.jsx("input", { id: radioId, name: name, type: "radio", value: value, checked: checked, onChange: handleChange, disabled: disabled, required: required, className: radioClasses, "aria-describedby": description ? `${radioId}-description` : undefined, "aria-invalid": !!error }) }), jsxRuntimeExports.jsxs("div", { className: styles$1.contentWrapper, children: [jsxRuntimeExports.jsx("label", { htmlFor: radioId, className: labelClasses, children: label }), description && (jsxRuntimeExports.jsx("p", { id: `${radioId}-description`, className: descriptionClasses, children: description })), error && jsxRuntimeExports.jsx("p", { className: errorClasses, children: error })] })] }));
497
527
  };
498
528
 
529
+ var css_248z = "/* Radio group orientation */\n.RadioGroup-module_groupVertical__5DpXK {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-3);\n}\n\n.RadioGroup-module_groupHorizontal__SFlwH {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--lb-space-4);\n}\n\n/* Group label */\n.RadioGroup-module_groupLabel__b5sBv {\n font-weight: var(--lb-font-weight-semibold);\n margin-bottom: var(--lb-space-3);\n color: var(--lb-color-foreground);\n}\n\n.RadioGroup-module_groupLabelInvalid__YrZzU {\n color: var(--lb-color-danger);\n}\n\n/* Bordered fieldset */\n.RadioGroup-module_fieldset__cXVuK {\n border-radius: var(--lb-radius-lg);\n padding: var(--lb-space-4);\n border: 1px solid var(--lb-color-border);\n min-inline-size: auto;\n}\n\n.RadioGroup-module_fieldsetInvalid__2ih-T {\n border: 2px solid var(--lb-color-danger);\n}\n\n.RadioGroup-module_legend__dJZQq {\n padding: 0 var(--lb-space-2);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.RadioGroup-module_legendInvalid__llTj2 {\n color: var(--lb-color-danger);\n}\n\n/* Error message */\n.RadioGroup-module_error__YzQEP {\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n margin-top: var(--lb-space-2);\n}\n\n/* Selected label preview */\n.RadioGroup-module_selectedLabel__OG4Ln {\n margin-top: var(--lb-space-4);\n padding: var(--lb-space-3);\n background: var(--lb-color-neutral-100);\n border-radius: var(--lb-radius-sm);\n}\n";
530
+ var styles = {"groupVertical":"RadioGroup-module_groupVertical__5DpXK","groupHorizontal":"RadioGroup-module_groupHorizontal__SFlwH","groupLabel":"RadioGroup-module_groupLabel__b5sBv","groupLabelInvalid":"RadioGroup-module_groupLabelInvalid__YrZzU","fieldset":"RadioGroup-module_fieldset__cXVuK","fieldsetInvalid":"RadioGroup-module_fieldsetInvalid__2ih-T","legend":"RadioGroup-module_legend__dJZQq","legendInvalid":"RadioGroup-module_legendInvalid__llTj2","error":"RadioGroup-module_error__YzQEP","selectedLabel":"RadioGroup-module_selectedLabel__OG4Ln"};
531
+ styleInject(css_248z);
532
+
499
533
  const RadioGroup = ({ name, options, value, onChange, orientation = "vertical", size = "md", variant = "default", disabled = false, required = false, error, className = "", showSelectedLabel = false, selectedLabelText = "Selected:", groupLabel, bordered = false, borderLabel, }) => {
500
534
  const orientationClasses = {
501
- vertical: "flex flex-col space-y-3",
502
- horizontal: "flex flex-row flex-wrap gap-4",
535
+ vertical: styles.groupVertical,
536
+ horizontal: styles.groupHorizontal,
503
537
  };
504
538
  const selectedOption = options.find((option) => option.value === value);
505
539
  const radioGroupContent = (jsxRuntimeExports.jsx("div", { className: orientationClasses[orientation], role: "radiogroup", children: options.map((option) => (jsxRuntimeExports.jsx(RadioButton, { name: name, label: option.label, value: option.value, checked: value === option.value, onChange: onChange, description: option.description, disabled: disabled || option.disabled, required: required, size: size, variant: variant }, option.value))) }));
506
- return (jsxRuntimeExports.jsxs("div", { className: className, children: [groupLabel && (jsxRuntimeExports.jsx("div", { className: `font-semibold mb-3 ${required && !value ? "text-red-600" : "text-gray-900"}`, children: groupLabel })), bordered ? (jsxRuntimeExports.jsxs("fieldset", { className: `rounded-lg p-4 ${required && !value ? "border-2 border-red-500" : "border border-gray-300"}`, children: [borderLabel && (jsxRuntimeExports.jsx("legend", { className: `px-2 text-sm font-medium ${required && !value ? "text-red-600" : "text-gray-700"}`, children: borderLabel })), radioGroupContent] })) : (radioGroupContent), error && jsxRuntimeExports.jsx("p", { className: "text-sm text-red-600 mt-2", children: error }), showSelectedLabel && (jsxRuntimeExports.jsxs("div", { className: "mt-4 p-3 bg-gray-100 rounded", children: [jsxRuntimeExports.jsx("strong", { children: selectedLabelText }), " ", selectedOption?.label || value || "None"] }))] }));
540
+ return (jsxRuntimeExports.jsxs("div", { className: className, children: [groupLabel && (jsxRuntimeExports.jsx("div", { className: `${styles.groupLabel} ${required && !value ? styles.groupLabelInvalid : ""}`, children: groupLabel })), bordered ? (jsxRuntimeExports.jsxs("fieldset", { className: `${styles.fieldset} ${required && !value ? styles.fieldsetInvalid : ""}`, children: [borderLabel && (jsxRuntimeExports.jsx("legend", { className: `${styles.legend} ${required && !value ? styles.legendInvalid : ""}`, children: borderLabel })), radioGroupContent] })) : (radioGroupContent), error && jsxRuntimeExports.jsx("p", { className: styles.error, children: error }), showSelectedLabel && (jsxRuntimeExports.jsxs("div", { className: styles.selectedLabel, children: [jsxRuntimeExports.jsx("strong", { children: selectedLabelText }), " ", selectedOption?.label || value || "None"] }))] }));
507
541
  };
508
542
 
509
543
  exports.RadioGroup = RadioGroup;
package/dist/index.esm.js CHANGED
@@ -422,46 +422,78 @@ function requireJsxRuntime () {
422
422
 
423
423
  var jsxRuntimeExports = requireJsxRuntime();
424
424
 
425
+ function styleInject(css, ref) {
426
+ if ( ref === void 0 ) ref = {};
427
+ var insertAt = ref.insertAt;
428
+
429
+ if (!css || typeof document === 'undefined') { return; }
430
+
431
+ var head = document.head || document.getElementsByTagName('head')[0];
432
+ var style = document.createElement('style');
433
+ style.type = 'text/css';
434
+
435
+ if (insertAt === 'top') {
436
+ if (head.firstChild) {
437
+ head.insertBefore(style, head.firstChild);
438
+ } else {
439
+ head.appendChild(style);
440
+ }
441
+ } else {
442
+ head.appendChild(style);
443
+ }
444
+
445
+ if (style.styleSheet) {
446
+ style.styleSheet.cssText = css;
447
+ } else {
448
+ style.appendChild(document.createTextNode(css));
449
+ }
450
+ }
451
+
452
+ var css_248z$1 = "/* Container */\n.RadioButton-module_container__djpgH {\n display: flex;\n}\n\n/* Radio wrapper */\n.RadioButton-module_radioWrapper__B--bk {\n display: flex;\n align-items: flex-start;\n}\n\n/* Radio input base styles */\n.RadioButton-module_radio__0qwuN {\n cursor: pointer;\n transition: all 150ms ease;\n border-width: 1px;\n border-style: solid;\n}\n\n.RadioButton-module_radio__0qwuN:focus {\n outline: none;\n box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);\n border-color: currentColor;\n}\n\n.RadioButton-module_radioDisabled__-Go-G {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.RadioButton-module_radioDisabled__-Go-G:focus {\n box-shadow: none;\n}\n\n/* Radio sizes */\n.RadioButton-module_radioSm__OFgkW {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n.RadioButton-module_radioMd__ODMND {\n width: 1rem;\n height: 1rem;\n}\n\n.RadioButton-module_radioLg__JNQ1i {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* Container heights for alignment */\n.RadioButton-module_containerSm__lRtj6 {\n height: 1rem;\n}\n\n.RadioButton-module_containerMd__0M3ye {\n height: 1.25rem;\n}\n\n.RadioButton-module_containerLg__6cNDS {\n height: 1.5rem;\n}\n\n/* Radio border colors */\n.RadioButton-module_radioBorderDefault__XKQUN {\n border-color: #d1d5db;\n}\n\n.RadioButton-module_radioBorderRequired__P4-sB {\n border-color: #ef4444;\n}\n\n/* Radio variants - checked state colors */\n.RadioButton-module_radioDefault__3eGat {\n color: #2563eb;\n}\n\n.RadioButton-module_radioPrimary__SdKsD {\n color: #4f46e5;\n}\n\n.RadioButton-module_radioSuccess__Kktb6 {\n color: #16a34a;\n}\n\n.RadioButton-module_radioWarning__nGt0i {\n color: #ca8a04;\n}\n\n.RadioButton-module_radioDanger__VVih- {\n color: #dc2626;\n}\n\n/* Radio focus ring colors */\n.RadioButton-module_radioFocusDefault__2vgX4:focus {\n box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);\n}\n\n.RadioButton-module_radioFocusPrimary__xowqj:focus {\n box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);\n}\n\n.RadioButton-module_radioFocusSuccess__Kjf-i:focus {\n box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);\n}\n\n.RadioButton-module_radioFocusWarning__70geb:focus {\n box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.2);\n}\n\n.RadioButton-module_radioFocusDanger__iEn6l:focus {\n box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);\n}\n\n/* Content wrapper */\n.RadioButton-module_contentWrapper__ZO1lz {\n margin-left: 0.75rem;\n flex: 1;\n}\n\n/* Label styles */\n.RadioButton-module_label__51-xH {\n display: block;\n font-weight: 500;\n cursor: pointer;\n}\n\n.RadioButton-module_labelSm__3EYBQ {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_labelMd__zaX9f {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.RadioButton-module_labelLg__GVVcz {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.RadioButton-module_labelDefault__JR0tu {\n color: #374151;\n}\n\n.RadioButton-module_labelDisabled__ZxGi4 {\n color: #9ca3af;\n cursor: not-allowed;\n}\n\n.RadioButton-module_labelRequired__zi0lY {\n color: #dc2626;\n cursor: pointer;\n}\n\n/* Description styles */\n.RadioButton-module_description__wQLxD {\n margin-top: 0.125rem;\n color: #6b7280;\n}\n\n.RadioButton-module_descriptionSm__HvSLH {\n font-size: 0.625rem;\n line-height: 0.875rem;\n}\n\n.RadioButton-module_descriptionMd__DPo-2 {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_descriptionLg__ARNPn {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n/* Error message styles */\n.RadioButton-module_error__WmXjN {\n margin-top: 0.125rem;\n color: #dc2626;\n}\n\n.RadioButton-module_errorSm__um4SY {\n font-size: 0.625rem;\n line-height: 0.875rem;\n}\n\n.RadioButton-module_errorMd__DgI7N {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.RadioButton-module_errorLg__u-854 {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n";
453
+ var styles$1 = {"container":"RadioButton-module_container__djpgH","radioWrapper":"RadioButton-module_radioWrapper__B--bk","radio":"RadioButton-module_radio__0qwuN","radioDisabled":"RadioButton-module_radioDisabled__-Go-G","radioSm":"RadioButton-module_radioSm__OFgkW","radioMd":"RadioButton-module_radioMd__ODMND","radioLg":"RadioButton-module_radioLg__JNQ1i","containerSm":"RadioButton-module_containerSm__lRtj6","containerMd":"RadioButton-module_containerMd__0M3ye","containerLg":"RadioButton-module_containerLg__6cNDS","radioBorderDefault":"RadioButton-module_radioBorderDefault__XKQUN","radioBorderRequired":"RadioButton-module_radioBorderRequired__P4-sB","radioDefault":"RadioButton-module_radioDefault__3eGat","radioPrimary":"RadioButton-module_radioPrimary__SdKsD","radioSuccess":"RadioButton-module_radioSuccess__Kktb6","radioWarning":"RadioButton-module_radioWarning__nGt0i","radioDanger":"RadioButton-module_radioDanger__VVih-","radioFocusDefault":"RadioButton-module_radioFocusDefault__2vgX4","radioFocusPrimary":"RadioButton-module_radioFocusPrimary__xowqj","radioFocusSuccess":"RadioButton-module_radioFocusSuccess__Kjf-i","radioFocusWarning":"RadioButton-module_radioFocusWarning__70geb","radioFocusDanger":"RadioButton-module_radioFocusDanger__iEn6l","contentWrapper":"RadioButton-module_contentWrapper__ZO1lz","label":"RadioButton-module_label__51-xH","labelSm":"RadioButton-module_labelSm__3EYBQ","labelMd":"RadioButton-module_labelMd__zaX9f","labelLg":"RadioButton-module_labelLg__GVVcz","labelDefault":"RadioButton-module_labelDefault__JR0tu","labelDisabled":"RadioButton-module_labelDisabled__ZxGi4","labelRequired":"RadioButton-module_labelRequired__zi0lY","description":"RadioButton-module_description__wQLxD","descriptionSm":"RadioButton-module_descriptionSm__HvSLH","descriptionMd":"RadioButton-module_descriptionMd__DPo-2","descriptionLg":"RadioButton-module_descriptionLg__ARNPn","error":"RadioButton-module_error__WmXjN","errorSm":"RadioButton-module_errorSm__um4SY","errorMd":"RadioButton-module_errorMd__DgI7N","errorLg":"RadioButton-module_errorLg__u-854"};
454
+ styleInject(css_248z$1);
455
+
456
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
425
457
  const sizeClasses = {
426
458
  sm: {
427
- radio: "w-3 h-3",
428
- label: "text-xs",
429
- description: "text-[10px]",
430
- container: "h-4",
459
+ radio: styles$1.radioSm,
460
+ label: styles$1.labelSm,
461
+ description: styles$1.descriptionSm,
462
+ container: styles$1.containerSm,
431
463
  },
432
464
  md: {
433
- radio: "w-4 h-4",
434
- label: "text-sm",
435
- description: "text-xs",
436
- container: "h-5",
465
+ radio: styles$1.radioMd,
466
+ label: styles$1.labelMd,
467
+ description: styles$1.descriptionMd,
468
+ container: styles$1.containerMd,
437
469
  },
438
470
  lg: {
439
- radio: "w-5 h-5",
440
- label: "text-base",
441
- description: "text-sm",
442
- container: "h-6",
471
+ radio: styles$1.radioLg,
472
+ label: styles$1.labelLg,
473
+ description: styles$1.descriptionLg,
474
+ container: styles$1.containerLg,
443
475
  },
444
476
  };
445
477
  const variantClasses = {
446
478
  default: {
447
- checked: "text-blue-600",
448
- focus: "focus:ring-blue-500",
479
+ checked: styles$1.radioDefault,
480
+ focus: styles$1.radioFocusDefault,
449
481
  },
450
482
  primary: {
451
- checked: "text-indigo-600",
452
- focus: "focus:ring-indigo-500",
483
+ checked: styles$1.radioPrimary,
484
+ focus: styles$1.radioFocusPrimary,
453
485
  },
454
486
  success: {
455
- checked: "text-green-600",
456
- focus: "focus:ring-green-500",
487
+ checked: styles$1.radioSuccess,
488
+ focus: styles$1.radioFocusSuccess,
457
489
  },
458
490
  warning: {
459
- checked: "text-yellow-600",
460
- focus: "focus:ring-yellow-500",
491
+ checked: styles$1.radioWarning,
492
+ focus: styles$1.radioFocusWarning,
461
493
  },
462
494
  danger: {
463
- checked: "text-red-600",
464
- focus: "focus:ring-red-500",
495
+ checked: styles$1.radioDanger,
496
+ focus: styles$1.radioFocusDanger,
465
497
  },
466
498
  };
467
499
  const RadioButton = ({ id, name, label, value, checked = false, onChange, disabled = false, description, error, className = "", required = false, size = "md", variant = "default", }) => {
@@ -473,33 +505,35 @@ const RadioButton = ({ id, name, label, value, checked = false, onChange, disabl
473
505
  onChange(event.target.value);
474
506
  }
475
507
  };
476
- return (jsxRuntimeExports.jsxs("div", { className: `flex ${className}`, children: [jsxRuntimeExports.jsx("div", { className: `flex items-start ${sizes.container}`, children: jsxRuntimeExports.jsx("input", { id: radioId, name: name, type: "radio", value: value, checked: checked, onChange: handleChange, disabled: disabled, required: required, className: `
477
- ${sizes.radio}
478
- ${required && !checked ? "border-red-500" : "border-gray-300"}
479
- ${variants.checked}
480
- ${variants.focus}
481
- focus:ring-2
482
- focus:ring-offset-0
483
- disabled:opacity-50
484
- disabled:cursor-not-allowed
485
- cursor-pointer
486
- transition-colors
487
- `, "aria-describedby": description ? `${radioId}-description` : undefined, "aria-invalid": !!error }) }), jsxRuntimeExports.jsxs("div", { className: "ml-3 flex-1", children: [jsxRuntimeExports.jsx("label", { htmlFor: radioId, className: `
488
- ${sizes.label}
489
- font-medium
490
- ${disabled ? "text-gray-400 cursor-not-allowed" : required && !checked ? "text-red-600 cursor-pointer" : "text-gray-700 cursor-pointer"}
491
- block
492
- `, children: label }), description && (jsxRuntimeExports.jsx("p", { id: `${radioId}-description`, className: `${sizes.description} text-gray-500 mt-0.5`, children: description })), error && (jsxRuntimeExports.jsx("p", { className: `${sizes.description} text-red-600 mt-0.5`, children: error }))] })] }));
508
+ const radioClasses = classNames(styles$1.radio, sizes.radio, sizes.container, variants.checked, variants.focus, required && !checked
509
+ ? styles$1.radioBorderRequired
510
+ : styles$1.radioBorderDefault, disabled && styles$1.radioDisabled);
511
+ const labelClasses = classNames(styles$1.label, sizes.label, disabled
512
+ ? styles$1.labelDisabled
513
+ : required && !checked
514
+ ? styles$1.labelRequired
515
+ : styles$1.labelDefault);
516
+ const descriptionClasses = classNames(styles$1.description, sizes.description);
517
+ const errorClasses = classNames(styles$1.error, size === "sm"
518
+ ? styles$1.errorSm
519
+ : size === "lg"
520
+ ? styles$1.errorLg
521
+ : styles$1.errorMd);
522
+ return (jsxRuntimeExports.jsxs("div", { className: classNames(styles$1.container, className), "data-testid": "radio-button-container", "data-size": size, "data-variant": variant, "data-checked": checked, "data-disabled": disabled, "data-error": !!error, children: [jsxRuntimeExports.jsx("div", { className: classNames(styles$1.radioWrapper, sizes.container), children: jsxRuntimeExports.jsx("input", { id: radioId, name: name, type: "radio", value: value, checked: checked, onChange: handleChange, disabled: disabled, required: required, className: radioClasses, "aria-describedby": description ? `${radioId}-description` : undefined, "aria-invalid": !!error }) }), jsxRuntimeExports.jsxs("div", { className: styles$1.contentWrapper, children: [jsxRuntimeExports.jsx("label", { htmlFor: radioId, className: labelClasses, children: label }), description && (jsxRuntimeExports.jsx("p", { id: `${radioId}-description`, className: descriptionClasses, children: description })), error && jsxRuntimeExports.jsx("p", { className: errorClasses, children: error })] })] }));
493
523
  };
494
524
 
525
+ var css_248z = "/* Radio group orientation */\n.RadioGroup-module_groupVertical__5DpXK {\n display: flex;\n flex-direction: column;\n gap: var(--lb-space-3);\n}\n\n.RadioGroup-module_groupHorizontal__SFlwH {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--lb-space-4);\n}\n\n/* Group label */\n.RadioGroup-module_groupLabel__b5sBv {\n font-weight: var(--lb-font-weight-semibold);\n margin-bottom: var(--lb-space-3);\n color: var(--lb-color-foreground);\n}\n\n.RadioGroup-module_groupLabelInvalid__YrZzU {\n color: var(--lb-color-danger);\n}\n\n/* Bordered fieldset */\n.RadioGroup-module_fieldset__cXVuK {\n border-radius: var(--lb-radius-lg);\n padding: var(--lb-space-4);\n border: 1px solid var(--lb-color-border);\n min-inline-size: auto;\n}\n\n.RadioGroup-module_fieldsetInvalid__2ih-T {\n border: 2px solid var(--lb-color-danger);\n}\n\n.RadioGroup-module_legend__dJZQq {\n padding: 0 var(--lb-space-2);\n font-size: var(--lb-font-size-sm);\n font-weight: var(--lb-font-weight-medium);\n color: var(--lb-color-neutral-700);\n}\n\n.RadioGroup-module_legendInvalid__llTj2 {\n color: var(--lb-color-danger);\n}\n\n/* Error message */\n.RadioGroup-module_error__YzQEP {\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-danger);\n margin-top: var(--lb-space-2);\n}\n\n/* Selected label preview */\n.RadioGroup-module_selectedLabel__OG4Ln {\n margin-top: var(--lb-space-4);\n padding: var(--lb-space-3);\n background: var(--lb-color-neutral-100);\n border-radius: var(--lb-radius-sm);\n}\n";
526
+ var styles = {"groupVertical":"RadioGroup-module_groupVertical__5DpXK","groupHorizontal":"RadioGroup-module_groupHorizontal__SFlwH","groupLabel":"RadioGroup-module_groupLabel__b5sBv","groupLabelInvalid":"RadioGroup-module_groupLabelInvalid__YrZzU","fieldset":"RadioGroup-module_fieldset__cXVuK","fieldsetInvalid":"RadioGroup-module_fieldsetInvalid__2ih-T","legend":"RadioGroup-module_legend__dJZQq","legendInvalid":"RadioGroup-module_legendInvalid__llTj2","error":"RadioGroup-module_error__YzQEP","selectedLabel":"RadioGroup-module_selectedLabel__OG4Ln"};
527
+ styleInject(css_248z);
528
+
495
529
  const RadioGroup = ({ name, options, value, onChange, orientation = "vertical", size = "md", variant = "default", disabled = false, required = false, error, className = "", showSelectedLabel = false, selectedLabelText = "Selected:", groupLabel, bordered = false, borderLabel, }) => {
496
530
  const orientationClasses = {
497
- vertical: "flex flex-col space-y-3",
498
- horizontal: "flex flex-row flex-wrap gap-4",
531
+ vertical: styles.groupVertical,
532
+ horizontal: styles.groupHorizontal,
499
533
  };
500
534
  const selectedOption = options.find((option) => option.value === value);
501
535
  const radioGroupContent = (jsxRuntimeExports.jsx("div", { className: orientationClasses[orientation], role: "radiogroup", children: options.map((option) => (jsxRuntimeExports.jsx(RadioButton, { name: name, label: option.label, value: option.value, checked: value === option.value, onChange: onChange, description: option.description, disabled: disabled || option.disabled, required: required, size: size, variant: variant }, option.value))) }));
502
- return (jsxRuntimeExports.jsxs("div", { className: className, children: [groupLabel && (jsxRuntimeExports.jsx("div", { className: `font-semibold mb-3 ${required && !value ? "text-red-600" : "text-gray-900"}`, children: groupLabel })), bordered ? (jsxRuntimeExports.jsxs("fieldset", { className: `rounded-lg p-4 ${required && !value ? "border-2 border-red-500" : "border border-gray-300"}`, children: [borderLabel && (jsxRuntimeExports.jsx("legend", { className: `px-2 text-sm font-medium ${required && !value ? "text-red-600" : "text-gray-700"}`, children: borderLabel })), radioGroupContent] })) : (radioGroupContent), error && jsxRuntimeExports.jsx("p", { className: "text-sm text-red-600 mt-2", children: error }), showSelectedLabel && (jsxRuntimeExports.jsxs("div", { className: "mt-4 p-3 bg-gray-100 rounded", children: [jsxRuntimeExports.jsx("strong", { children: selectedLabelText }), " ", selectedOption?.label || value || "None"] }))] }));
536
+ return (jsxRuntimeExports.jsxs("div", { className: className, children: [groupLabel && (jsxRuntimeExports.jsx("div", { className: `${styles.groupLabel} ${required && !value ? styles.groupLabelInvalid : ""}`, children: groupLabel })), bordered ? (jsxRuntimeExports.jsxs("fieldset", { className: `${styles.fieldset} ${required && !value ? styles.fieldsetInvalid : ""}`, children: [borderLabel && (jsxRuntimeExports.jsx("legend", { className: `${styles.legend} ${required && !value ? styles.legendInvalid : ""}`, children: borderLabel })), radioGroupContent] })) : (radioGroupContent), error && jsxRuntimeExports.jsx("p", { className: styles.error, children: error }), showSelectedLabel && (jsxRuntimeExports.jsxs("div", { className: styles.selectedLabel, children: [jsxRuntimeExports.jsx("strong", { children: selectedLabelText }), " ", selectedOption?.label || value || "None"] }))] }));
503
537
  };
504
538
 
505
539
  export { RadioGroup, RadioButton as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenpazch/radio-button",
3
- "version": "2.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Accessible radio button and radio group components with variants and validation",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
@@ -16,7 +16,9 @@
16
16
  "files": [
17
17
  "dist"
18
18
  ],
19
- "sideEffects": false,
19
+ "sideEffects": [
20
+ "**/*.css"
21
+ ],
20
22
  "exports": {
21
23
  ".": {
22
24
  "import": "./dist/index.esm.js",
@@ -26,7 +28,8 @@
26
28
  },
27
29
  "peerDependencies": {
28
30
  "react": "^19.0.0",
29
- "react-dom": "^19.0.0"
31
+ "react-dom": "^19.0.0",
32
+ "@rubenpazch/tokens": "0.1.0"
30
33
  },
31
34
  "devDependencies": {
32
35
  "@rubenpazch/typescript-config": "3.0.0"