pixel-react 1.15.85 → 1.15.87

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.
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import './RadioButton.scss';
3
3
  import Tooltip from '../Tooltip';
4
4
  import Typography from '../Typography';
5
- const RadioButton = ({ label, name, checked, onChange, value, disabled = false, showTooltip = false, tooltipChildren = 'Custom JSX', tooltipTitle = 'Custom JSX', tooltipPosition = 'right', onBlur = () => { }, }) => {
6
- return (_jsxs("div", { className: "ff-radio-wrapper", onClick: (event) => event.stopPropagation(), children: [_jsxs("label", { className: `ff-radio ${disabled ? 'ff-radio--disabled' : ''}`, children: [_jsx("input", { disabled: disabled, type: "radio", name: name, value: value, checked: checked, onChange: onChange, onBlur: onBlur, className: "ff-radio-input" }), _jsx("div", { className: "ff-radio-custom", children: _jsx("div", { className: "ff-radio-custom-fill" }) }), _jsx(Typography, { color: "var(--text-color)", children: label })] }), showTooltip && (_jsx(Tooltip, { title: tooltipTitle, placement: tooltipPosition, children: tooltipChildren }))] }));
5
+ const RadioButton = ({ label, name, checked, onChange, value, disabled = false, showTooltip = false, tooltipChildren = 'Custom JSX', tooltipTitle = 'Custom JSX', tooltipPosition = 'right', onBlur = () => { }, alignIconCenter = true, }) => {
6
+ return (_jsxs("div", { className: "ff-radio-wrapper", onClick: (event) => event.stopPropagation(), children: [_jsxs("label", { className: `ff-radio ${alignIconCenter ? 'ff-radio-align-icon' : ''} ${disabled ? 'ff-radio--disabled' : ''}`, children: [_jsx("input", { disabled: disabled, type: "radio", name: name, value: value, checked: checked, onChange: onChange, onBlur: onBlur, className: "ff-radio-input" }), _jsx("div", { className: "ff-radio-custom", children: _jsx("div", { className: "ff-radio-custom-fill" }) }), _jsx(Typography, { color: "var(--text-color)", children: label })] }), showTooltip && (_jsx(Tooltip, { title: tooltipTitle, placement: tooltipPosition, children: tooltipChildren }))] }));
7
7
  };
8
8
  export default RadioButton;
9
9
  //# sourceMappingURL=RadioButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";AACA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC,MAAM,WAAW,GAA+B,CAAC,EAC/C,KAAK,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,eAAe,GAAG,YAAY,EAC9B,YAAY,GAAG,YAAY,EAC3B,eAAe,GAAG,OAAO,EACzB,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,GAClB,EAAE,EAAE;IACH,OAAO,CACL,eACE,SAAS,EAAC,kBAAkB,EAC5B,OAAO,EAAE,CAAC,KAAuC,EAAE,EAAE,CACnD,KAAK,CAAC,eAAe,EAAE,aAGzB,iBAAO,SAAS,EAAE,YAAY,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,EAAE,aAClE,gBACE,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAC,gBAAgB,GAC1B,EACF,cAAK,SAAS,EAAC,iBAAiB,YAC9B,cAAK,SAAS,EAAC,sBAAsB,GAAO,GACxC,EACN,KAAC,UAAU,IAAC,KAAK,EAAC,mBAAmB,EAAC,QAAQ,EAAE,KAAK,GAAI,IACnD,EACP,WAAW,IAAI,CACd,KAAC,OAAO,IAAC,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,YACrD,eAAe,GACR,CACX,IACG,CACP,CAAC;AACJ,C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AE,eAAe,YACrD,eAAe,GACR,CACX,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -53,6 +53,13 @@ interface RadioButtonProps {
53
53
  * Optional.
54
54
  */
55
55
  tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
56
+ /**
57
+ * Aligns the radio icon vertically centered with the label.
58
+ * When true, applies `ff-radio-align-icon`.
59
+ * Default is false.
60
+ * Optional.
61
+ */
62
+ alignIconCenter?: boolean;
56
63
  onBlur?: () => void;
57
64
  }
58
65
  export default RadioButtonProps;
@@ -3,8 +3,8 @@ import './RadioGroup.scss';
3
3
  import classNames from 'classnames';
4
4
  import Typography from '../Typography';
5
5
  import RadioButton from '../RadioButton';
6
- const RadioGroup = ({ options, name, selectedValue, onChange, label, isLabel = false, isAsteriskRequired = false, className, classNameForLabel, isError = false, errorMessage = '', onBlur = () => { }, disabled, }) => {
7
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames('ff-radio-group', className), onBlur: onBlur, children: [isLabel && (_jsxs(Typography, { fontWeight: "semi-bold", className: classNames(classNameForLabel), children: [' ', isAsteriskRequired && (_jsxs(Typography, { className: classNames('ff-required-asterisk'), children: ["*", ' '] })), label, ' '] })), options.map((option) => (_jsx(RadioButton, { label: option.label, showTooltip: option?.showTooltip, tooltipChildren: option?.tooltipChildren, tooltipTitle: option?.tooltipTitle, tooltipPosition: option?.tooltipPosition, name: name, value: option.value, checked: selectedValue?.toLowerCase() === option.value?.toLowerCase(), onChange: () => onChange?.(option), disabled: disabled || option.disabled }, option.value)))] }), isError && (_jsx(Typography, { as: "div", lineHeight: "15px", fontSize: 10, color: "var(--error_light)", className: "ff-radio-error-msg", children: errorMessage }))] }));
6
+ const RadioGroup = ({ options, name, selectedValue, onChange, label, isLabel = false, isAsteriskRequired = false, className, classNameForLabel, isError = false, errorMessage = '', onBlur = () => { }, disabled, radioIconCenter = true, }) => {
7
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames('ff-radio-group', className), onBlur: onBlur, children: [isLabel && (_jsxs(Typography, { fontWeight: "semi-bold", className: classNames(classNameForLabel), children: [' ', isAsteriskRequired && (_jsxs(Typography, { className: classNames('ff-required-asterisk'), children: ["*", ' '] })), label, ' '] })), options.map((option) => (_jsx(RadioButton, { label: option.label, showTooltip: option?.showTooltip, tooltipChildren: option?.tooltipChildren, tooltipTitle: option?.tooltipTitle, tooltipPosition: option?.tooltipPosition, name: name, value: option.value, checked: selectedValue?.toLowerCase() === option.value?.toLowerCase(), onChange: () => onChange?.(option), disabled: disabled || option.disabled, alignIconCenter: radioIconCenter }, option.value)))] }), isError && (_jsx(Typography, { as: "div", lineHeight: "15px", fontSize: 10, color: "var(--error_light)", className: "ff-radio-error-msg", children: errorMessage }))] }));
8
8
  };
9
9
  export default RadioGroup;
10
10
  //# sourceMappingURL=RadioGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,GAA8B,CAAC,EAC7C,OAAO,EACP,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,KAAK,EACL,OAAO,GAAG,KAAK,EACf,kBAAkB,GAAG,KAAK,EAC1B,SAAS,EACT,iBAAiB,EACjB,OAAO,GAAG,KAAK,EACf,YAAY,GAAG,EAAE,EACjB,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,EACjB,QAAQ,GACT,EAAE,EAAE;IACH,OAAO,CACL,8BACE,eACE,SAAS,EAAE,UAAU,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAClD,MAAM,EAAE,MAAM,aAEb,OAAO,IAAI,CACV,MAAC,UAAU,IACT,UAAU,EAAC,WAAW,EAC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cjB,CACH,CAAC,IACE,EACL,OAAO,IAAI,CACV,KAAC,UAAU,IACT,EAAE,EAAC,KAAK,EACR,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,EAAE,EACZ,KAAK,EAAC,oBAAoB,EAC1B,SAAS,EAAC,oBAAoB,YAE7B,YAAY,GACF,CACd,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -87,4 +87,11 @@ interface RadioGroupProps {
87
87
  errorMessage?: string;
88
88
  onBlur?: () => void;
89
89
  disabled?: boolean;
90
+ /**
91
+ * Aligns the radio icon vertically centered with the label.
92
+ * When true, applies `ff-radio-align-icon`.
93
+ * Default is false.
94
+ * Optional.
95
+ */
96
+ radioIconCenter?: boolean;
90
97
  }
package/lib/index.d.ts CHANGED
@@ -2006,6 +2006,13 @@ interface RadioButtonProps {
2006
2006
  * Optional.
2007
2007
  */
2008
2008
  tooltipPosition?: 'top' | 'bottom' | 'left' | 'right';
2009
+ /**
2010
+ * Aligns the radio icon vertically centered with the label.
2011
+ * When true, applies `ff-radio-align-icon`.
2012
+ * Default is false.
2013
+ * Optional.
2014
+ */
2015
+ alignIconCenter?: boolean;
2009
2016
  onBlur?: () => void;
2010
2017
  }
2011
2018