@open-condo/ui 1.20.2 → 1.20.3
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,18 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RadioProps } from '@open-condo/ui/src';
|
|
3
3
|
import type { RadioGroupProps as DefaultRadioGroupProps } from 'antd';
|
|
4
|
-
declare type
|
|
4
|
+
declare type ItemGroupOptionType = Pick<RadioProps, 'value' | 'label'> & {
|
|
5
5
|
radioProps?: Partial<Pick<RadioProps, 'labelProps' | 'disabled'>>;
|
|
6
6
|
};
|
|
7
|
-
declare type
|
|
7
|
+
declare type ItemGroupProps = {
|
|
8
8
|
name: string;
|
|
9
|
-
|
|
10
|
-
options: Array<RadioGroupOptionType>;
|
|
9
|
+
options: Array<ItemGroupOptionType>;
|
|
11
10
|
};
|
|
12
11
|
export declare type RadioGroupProps = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated should use "children" and "RadioGroup.ItemGroup" instead of "groups". "groups" will be removed in the next major release (v2).
|
|
14
|
+
*/
|
|
15
|
+
groups?: Array<ItemGroupProps>;
|
|
16
|
+
} & Pick<DefaultRadioGroupProps, 'value' | 'onChange' | 'disabled' | 'children'>;
|
|
17
|
+
declare type CompoundedComponent = React.FC<RadioGroupProps> & {
|
|
18
|
+
ItemGroup: React.FC<ItemGroupProps>;
|
|
19
|
+
};
|
|
20
|
+
declare const RadioGroup: CompoundedComponent;
|
|
17
21
|
export { RadioGroup, };
|
|
18
22
|
//# sourceMappingURL=radiogroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radiogroup.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/radiogroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"radiogroup.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/radiogroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAIpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,KAAK,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,MAAM,CAAA;AAIrE,aAAK,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC,CAAC,CAAA;CACpE,CAAA;AAED,aAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAA;CACtC,CAAA;AAGD,oBAAY,eAAe,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;CACjC,GAAG,IAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAEhF,aAAK,mBAAmB,GAAG,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,GAAG;IACnD,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,CAAA;CACtC,CAAA;AAiDD,QAAA,MAAM,UAAU,qBAAyC,CAAA;AAGzD,OAAO,EACH,UAAU,GACb,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -69566,7 +69566,7 @@ var Radio_radio_Radio = function Radio(props) {
|
|
|
69566
69566
|
|
|
69567
69567
|
|
|
69568
69568
|
;// CONCATENATED MODULE: ./src/components/Radio/radiogroup.tsx
|
|
69569
|
-
var radiogroup_excluded = ["groups", "
|
|
69569
|
+
var radiogroup_excluded = ["groups", "children"];
|
|
69570
69570
|
|
|
69571
69571
|
function radiogroup_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = radiogroup_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
69572
69572
|
|
|
@@ -69590,12 +69590,12 @@ function radiogroup_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
69590
69590
|
|
|
69591
69591
|
|
|
69592
69592
|
|
|
69593
|
+
|
|
69593
69594
|
var RADIO_GROUP_CLASS_PREFIX = 'condo-radio';
|
|
69594
69595
|
|
|
69595
|
-
var
|
|
69596
|
+
var ItemGroup = function ItemGroup(_ref) {
|
|
69596
69597
|
var name = _ref.name,
|
|
69597
|
-
options = _ref.options
|
|
69598
|
-
icon = _ref.icon;
|
|
69598
|
+
options = _ref.options;
|
|
69599
69599
|
|
|
69600
69600
|
var _useState = (0,external_react_.useState)(false),
|
|
69601
69601
|
_useState2 = radiogroup_slicedToArray(_useState, 2),
|
|
@@ -69616,7 +69616,9 @@ var GroupWithIcon = function GroupWithIcon(_ref) {
|
|
|
69616
69616
|
onClick: onGroupClick
|
|
69617
69617
|
}, /*#__PURE__*/external_react_default().createElement("span", {
|
|
69618
69618
|
className: "".concat(RADIO_GROUP_CLASS_PREFIX, "-group-icon")
|
|
69619
|
-
},
|
|
69619
|
+
}, /*#__PURE__*/external_react_default().createElement(dist.ChevronDown, {
|
|
69620
|
+
size: "small"
|
|
69621
|
+
})), /*#__PURE__*/external_react_default().createElement(Typography.Text, null, name)), /*#__PURE__*/external_react_default().createElement(space_Space, {
|
|
69620
69622
|
direction: "vertical",
|
|
69621
69623
|
size: 12
|
|
69622
69624
|
}, options.map(function (_ref2) {
|
|
@@ -69631,23 +69633,24 @@ var GroupWithIcon = function GroupWithIcon(_ref) {
|
|
|
69631
69633
|
})));
|
|
69632
69634
|
};
|
|
69633
69635
|
|
|
69634
|
-
var
|
|
69636
|
+
var CondoRadioGroup = function CondoRadioGroup(props) {
|
|
69635
69637
|
var groups = props.groups,
|
|
69636
|
-
|
|
69638
|
+
children = props.children,
|
|
69637
69639
|
rest = radiogroup_objectWithoutProperties(props, radiogroup_excluded);
|
|
69638
69640
|
|
|
69639
69641
|
return /*#__PURE__*/external_react_default().createElement(es_radio.Group, radiogroup_extends({}, rest, {
|
|
69640
69642
|
prefixCls: RADIO_GROUP_CLASS_PREFIX
|
|
69641
|
-
}), groups.map(function (group) {
|
|
69642
|
-
return /*#__PURE__*/external_react_default().createElement(
|
|
69643
|
+
}), groups ? groups.map(function (group) {
|
|
69644
|
+
return /*#__PURE__*/external_react_default().createElement(ItemGroup, {
|
|
69643
69645
|
name: group.name,
|
|
69644
69646
|
options: group.options,
|
|
69645
|
-
key: group.name
|
|
69646
|
-
icon: icon
|
|
69647
|
+
key: group.name
|
|
69647
69648
|
});
|
|
69648
|
-
}));
|
|
69649
|
+
}) : children);
|
|
69649
69650
|
};
|
|
69650
69651
|
|
|
69652
|
+
var radiogroup_RadioGroup = CondoRadioGroup;
|
|
69653
|
+
radiogroup_RadioGroup.ItemGroup = ItemGroup;
|
|
69651
69654
|
|
|
69652
69655
|
;// CONCATENATED MODULE: ./src/components/Radio/index.ts
|
|
69653
69656
|
|
package/dist/styles.css
CHANGED
|
@@ -7103,9 +7103,9 @@ span.condo-radio + * {
|
|
|
7103
7103
|
margin-top: initial;
|
|
7104
7104
|
margin-left: 0;
|
|
7105
7105
|
margin-left: initial;
|
|
7106
|
+
background: linear-gradient(90deg, #4cd174 0%, #6db8f2 100%);
|
|
7106
7107
|
border-radius: 100%;
|
|
7107
7108
|
transform: translate(-50%, -50%);
|
|
7108
|
-
background: linear-gradient(90deg, #4cd174 0%, #6db8f2 100%);
|
|
7109
7109
|
}
|
|
7110
7110
|
.condo-radio-wrapper .condo-radio-checked > .condo-radio-input:focus + .condo-radio-inner {
|
|
7111
7111
|
border: double 1px transparent;
|