@dreamcommerce/aurora 3.0.0-97 → 3.0.0-99
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/build/cjs/packages/aurora/src/components/color_picker/color_picker.js +4 -2
- package/build/cjs/packages/aurora/src/components/color_picker/color_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_label_input.js +3 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/color_label_input.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/color_picker/components/pure_color_picker.js +6 -3
- package/build/cjs/packages/aurora/src/components/color_picker/components/pure_color_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js +3 -1
- package/build/cjs/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/color_picker_control/color_picker_control.js +4 -2
- package/build/cjs/packages/aurora/src/components/controls/color_picker_control/color_picker_control.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/multiselect_control/multiselect_control.js +1 -3
- package/build/cjs/packages/aurora/src/components/controls/multiselect_control/multiselect_control.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/controls/radio_group_control/radio_group_control.js +0 -1
- package/build/cjs/packages/aurora/src/components/controls/radio_group_control/radio_group_control.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/label/label.js +1 -1
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_content.js +14 -30
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_item.js +6 -3
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_item.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_trigger.js +1 -1
- package/build/cjs/packages/aurora/src/components/multiselect/multiselect.js +1 -4
- package/build/cjs/packages/aurora/src/components/multiselect/multiselect.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/radio_group/components/radio_group_item.js +3 -2
- package/build/cjs/packages/aurora/src/components/radio_group/components/radio_group_item.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/select/components/select_content.js +10 -5
- package/build/cjs/packages/aurora/src/components/select/components/select_content.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/select/components/select_group_label.js +40 -0
- package/build/cjs/packages/aurora/src/components/select/components/select_item.js +5 -2
- package/build/cjs/packages/aurora/src/components/select/components/select_item.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/select/select.js +7 -4
- package/build/cjs/packages/aurora/src/components/select/select.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/tree/components/tree_node.js +7 -8
- package/build/cjs/packages/aurora/src/components/tree/components/tree_node.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/color_picker.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/color_picker.js +4 -2
- package/build/esm/packages/aurora/src/components/color_picker/color_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/color_picker_types.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/color_picker/components/color_label_input.d.ts +1 -0
- package/build/esm/packages/aurora/src/components/color_picker/components/color_label_input.js +3 -1
- package/build/esm/packages/aurora/src/components/color_picker/components/color_label_input.js.map +1 -1
- package/build/esm/packages/aurora/src/components/color_picker/components/pure_color_picker.js +6 -3
- package/build/esm/packages/aurora/src/components/color_picker/components/pure_color_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js +3 -1
- package/build/esm/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/color_picker_control/color_picker_control.js +4 -2
- package/build/esm/packages/aurora/src/components/controls/color_picker_control/color_picker_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/multiselect_control/multiselect_control.js +1 -3
- package/build/esm/packages/aurora/src/components/controls/multiselect_control/multiselect_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/radio_group_control/radio_group_control.js +0 -1
- package/build/esm/packages/aurora/src/components/controls/radio_group_control/radio_group_control.js.map +1 -1
- package/build/esm/packages/aurora/src/components/controls/select_control/select_control_types.d.ts +2 -8
- package/build/esm/packages/aurora/src/components/controls/select_control/select_control_types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/label/label.js +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_content.js +14 -30
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_item.js +6 -3
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_item.js.map +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_trigger.js +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/multiselect.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/multiselect.js +1 -4
- package/build/esm/packages/aurora/src/components/multiselect/multiselect.js.map +1 -1
- package/build/esm/packages/aurora/src/components/multiselect/multiselect_types.d.ts +9 -14
- package/build/esm/packages/aurora/src/components/radio_group/components/radio_group_item.js +3 -2
- package/build/esm/packages/aurora/src/components/radio_group/components/radio_group_item.js.map +1 -1
- package/build/esm/packages/aurora/src/components/select/components/select_content.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/select/components/select_content.js +10 -5
- package/build/esm/packages/aurora/src/components/select/components/select_content.js.map +1 -1
- package/build/esm/packages/aurora/src/components/select/components/select_group_label.d.ts +6 -0
- package/build/esm/packages/aurora/src/components/select/components/select_group_label.js +32 -0
- package/build/esm/packages/aurora/src/components/select/components/select_item.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/select/components/select_item.js +5 -2
- package/build/esm/packages/aurora/src/components/select/components/select_item.js.map +1 -1
- package/build/esm/packages/aurora/src/components/select/select.d.ts +1 -1
- package/build/esm/packages/aurora/src/components/select/select.js +7 -4
- package/build/esm/packages/aurora/src/components/select/select.js.map +1 -1
- package/build/esm/packages/aurora/src/components/select/select_types.d.ts +14 -6
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.d.ts +2 -2
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.js +7 -8
- package/build/esm/packages/aurora/src/components/tree/components/tree_node.js.map +1 -1
- package/package.json +1 -1
- package/build/cjs/packages/aurora/src/components/multiselect/components/multiselect_group.js +0 -40
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_group.d.ts +0 -3
- package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_group.js +0 -32
- /package/build/cjs/packages/aurora/src/components/{multiselect/components/multiselect_group.js.map → select/components/select_group_label.js.map} +0 -0
- /package/build/esm/packages/aurora/src/components/{multiselect/components/multiselect_group.js.map → select/components/select_group_label.js.map} +0 -0
|
@@ -12,7 +12,8 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
12
12
|
onChange = _ref.onChange,
|
|
13
13
|
onCancel = _ref.onCancel,
|
|
14
14
|
onSave = _ref.onSave,
|
|
15
|
-
isWithGradient = _ref.withGradient
|
|
15
|
+
isWithGradient = _ref.withGradient,
|
|
16
|
+
disabled = _ref.disabled;
|
|
16
17
|
var _useSetupColorPicker = useSetupColorPicker({
|
|
17
18
|
colorVariables: colorVariables,
|
|
18
19
|
initialColor: initialColor,
|
|
@@ -76,7 +77,8 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
76
77
|
id: id,
|
|
77
78
|
name: name,
|
|
78
79
|
colorVariables: colorVariables,
|
|
79
|
-
errors: errors
|
|
80
|
+
errors: errors,
|
|
81
|
+
disabled: disabled
|
|
80
82
|
}));
|
|
81
83
|
};
|
|
82
84
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,6 +6,7 @@ export interface IColorPickerPureProps {
|
|
|
6
6
|
name?: string;
|
|
7
7
|
colorVariables?: IColorPickerColorVariables;
|
|
8
8
|
errors?: string | string[];
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface IColorPickerColorVariables {
|
|
11
12
|
isVisible: boolean;
|
|
@@ -28,6 +29,7 @@ export interface IColorPickerProps {
|
|
|
28
29
|
onChange?: (color: IColorPickerColor) => void;
|
|
29
30
|
onCancel?: () => void;
|
|
30
31
|
onSave?: (color: IColorPickerColor) => void;
|
|
32
|
+
disabled?: boolean;
|
|
31
33
|
}
|
|
32
34
|
export interface IColorPickerContext {
|
|
33
35
|
color: ColorPickerVariable;
|
package/build/esm/packages/aurora/src/components/color_picker/components/color_label_input.js
CHANGED
|
@@ -8,7 +8,8 @@ import { useColorPicker } from '../hooks/use_color_picker.js';
|
|
|
8
8
|
var ColorPickerInput = function ColorPickerInput(_ref) {
|
|
9
9
|
var id = _ref.id,
|
|
10
10
|
name = _ref.name,
|
|
11
|
-
errors = _ref.errors
|
|
11
|
+
errors = _ref.errors,
|
|
12
|
+
disabled = _ref.disabled;
|
|
12
13
|
var _useColorPicker = useColorPicker(),
|
|
13
14
|
hex = _useColorPicker.hex,
|
|
14
15
|
color = _useColorPicker.color,
|
|
@@ -25,6 +26,7 @@ var ColorPickerInput = function ColorPickerInput(_ref) {
|
|
|
25
26
|
name: name,
|
|
26
27
|
value: colorName,
|
|
27
28
|
errors: errors,
|
|
29
|
+
disabled: disabled,
|
|
28
30
|
readOnly: true
|
|
29
31
|
});
|
|
30
32
|
};
|
package/build/esm/packages/aurora/src/components/color_picker/components/color_label_input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,+BAA+B,oEAAwE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/color_picker/components/pure_color_picker.js
CHANGED
|
@@ -11,7 +11,8 @@ import { PopoverContent } from '../../popover/components/popover_content.js';
|
|
|
11
11
|
var ColorPickerPure = function ColorPickerPure(_ref) {
|
|
12
12
|
var id = _ref.id,
|
|
13
13
|
name = _ref.name,
|
|
14
|
-
errors = _ref.errors
|
|
14
|
+
errors = _ref.errors,
|
|
15
|
+
disabled = _ref.disabled;
|
|
15
16
|
var _useColorPicker = useColorPicker(),
|
|
16
17
|
color = _useColorPicker.color,
|
|
17
18
|
handleCancel = _useColorPicker.handleCancel,
|
|
@@ -31,7 +32,8 @@ var ColorPickerPure = function ColorPickerPure(_ref) {
|
|
|
31
32
|
}, /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
32
33
|
onClick: function onClick() {
|
|
33
34
|
return setIsColorPickerOpened(true);
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
disabled: disabled
|
|
35
37
|
}, /*#__PURE__*/React.createElement("div", {
|
|
36
38
|
className: "color-picker__input-container aurora-relative"
|
|
37
39
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -43,7 +45,8 @@ var ColorPickerPure = function ColorPickerPure(_ref) {
|
|
|
43
45
|
})), /*#__PURE__*/React.createElement(ColorPickerInput, {
|
|
44
46
|
id: id,
|
|
45
47
|
name: name,
|
|
46
|
-
errors: errors
|
|
48
|
+
errors: errors,
|
|
49
|
+
disabled: disabled
|
|
47
50
|
}))), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
48
51
|
className: "aurora-mt-2 aurora-rounded-16 aurora-overflow-hidden"
|
|
49
52
|
}, /*#__PURE__*/React.createElement(ColorPickerContent, null))));
|
package/build/esm/packages/aurora/src/components/color_picker/components/pure_color_picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js
CHANGED
|
@@ -23,7 +23,9 @@ var CheckboxControl = function CheckboxControl(_ref) {
|
|
|
23
23
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
24
24
|
onCheckedChange = _ref.onCheckedChange,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
return /*#__PURE__*/React.createElement(Control,
|
|
26
|
+
return /*#__PURE__*/React.createElement(Control, {
|
|
27
|
+
classname: "aurora-items-center"
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Checkbox, _objectSpread2({
|
|
27
29
|
id: id,
|
|
28
30
|
name: name,
|
|
29
31
|
value: value,
|
package/build/esm/packages/aurora/src/components/controls/checkbox_control/checkbox_control.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,7 +6,7 @@ import { ErrorList } from '../../error_list/error_list.js';
|
|
|
6
6
|
import { Control } from '../../control/control.js';
|
|
7
7
|
import { ColorPicker } from '../../color_picker/color_picker.js';
|
|
8
8
|
|
|
9
|
-
var _excluded = ["label", "tooltip", "required", "id", "name", "errors", "initialColor", "colorVariables", "onChange", "onCancel", "onSave", "withGradient", "helperText"];
|
|
9
|
+
var _excluded = ["label", "tooltip", "required", "id", "name", "errors", "initialColor", "colorVariables", "onChange", "onCancel", "onSave", "withGradient", "helperText", "disabled"];
|
|
10
10
|
var ColorPickerControl = function ColorPickerControl(_ref) {
|
|
11
11
|
var label = _ref.label,
|
|
12
12
|
tooltip = _ref.tooltip,
|
|
@@ -22,6 +22,7 @@ var ColorPickerControl = function ColorPickerControl(_ref) {
|
|
|
22
22
|
onSave = _ref.onSave,
|
|
23
23
|
withGradient = _ref.withGradient,
|
|
24
24
|
helperText = _ref.helperText,
|
|
25
|
+
disabled = _ref.disabled,
|
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
return /*#__PURE__*/React.createElement(Control, {
|
|
27
28
|
classname: "aurora-flex-col"
|
|
@@ -39,7 +40,8 @@ var ColorPickerControl = function ColorPickerControl(_ref) {
|
|
|
39
40
|
onChange: onChange,
|
|
40
41
|
onCancel: onCancel,
|
|
41
42
|
onSave: onSave,
|
|
42
|
-
withGradient: withGradient
|
|
43
|
+
withGradient: withGradient,
|
|
44
|
+
disabled: disabled
|
|
43
45
|
}, rest)), helperText && /*#__PURE__*/React.createElement(HelperText, null, helperText), errors && /*#__PURE__*/React.createElement(ErrorList, {
|
|
44
46
|
errors: errors
|
|
45
47
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/controls/multiselect_control/multiselect_control.js
CHANGED
|
@@ -6,11 +6,10 @@ import { ErrorList } from '../../error_list/error_list.js';
|
|
|
6
6
|
import { Control } from '../../control/control.js';
|
|
7
7
|
import { MultiSelect } from '../../multiselect/multiselect.js';
|
|
8
8
|
|
|
9
|
-
var _excluded = ["id", "options", "
|
|
9
|
+
var _excluded = ["id", "options", "placeholder", "disabled", "label", "helperText", "tooltip", "errors", "onValueChange", "required"];
|
|
10
10
|
var MultiSelectControl = function MultiSelectControl(_ref) {
|
|
11
11
|
var id = _ref.id,
|
|
12
12
|
options = _ref.options,
|
|
13
|
-
isGrouped = _ref.isGrouped,
|
|
14
13
|
placeholder = _ref.placeholder,
|
|
15
14
|
disabled = _ref.disabled,
|
|
16
15
|
label = _ref.label,
|
|
@@ -30,7 +29,6 @@ var MultiSelectControl = function MultiSelectControl(_ref) {
|
|
|
30
29
|
}, label)), /*#__PURE__*/React.createElement(MultiSelect, _objectSpread2({
|
|
31
30
|
id: id,
|
|
32
31
|
options: options,
|
|
33
|
-
isGrouped: isGrouped,
|
|
34
32
|
placeholder: placeholder,
|
|
35
33
|
disabled: disabled,
|
|
36
34
|
onValueChange: onValueChange
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/controls/select_control/select_control_types.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TSelectProps } from "../../select/select_types";
|
|
3
3
|
export declare type TSelectControlProps = TSelectProps & {
|
|
4
|
-
options: TSelectOptions;
|
|
5
4
|
label?: string | React.ReactNode;
|
|
6
5
|
helperText?: string | React.ReactNode;
|
|
7
6
|
tooltip?: string | React.ReactNode;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
searchPlaceholder?: string;
|
|
10
|
-
hasSearch?: boolean;
|
|
11
|
-
hasClearValueButton?: boolean;
|
|
12
7
|
errors?: string | string[];
|
|
13
|
-
innerAdditionalContent?: ReactNode;
|
|
14
8
|
required?: boolean;
|
|
15
9
|
};
|
package/build/esm/packages/aurora/src/components/controls/select_control/select_control_types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/select_control/select_control_types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"select_control_types.js","sourceRoot":"","sources":["../../../../../../../../src/components/controls/select_control/select_control_types.ts"],"names":[],"mappings":"AAAA,OAAkB,OAAO,CAAC;AAC1B,OAA6B,uCAAuC,CAAC"}
|
|
@@ -19,7 +19,7 @@ var Label = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
19
19
|
children = _ref.children,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
var content = /*#__PURE__*/createElement(Stack, {
|
|
22
|
-
align: "
|
|
22
|
+
align: "baseline",
|
|
23
23
|
spacing: "0.5",
|
|
24
24
|
inline: true,
|
|
25
25
|
className: cn(labelVariants(), "".concat(disabled ? 'aurora-cursor-not-allowed aurora-text-subtle-light' : '', " ").concat(className))
|
package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_content.js
CHANGED
|
@@ -4,13 +4,12 @@ import { cn } from '../../../utilities/cn.js';
|
|
|
4
4
|
import { Content } from '@radix-ui/react-dropdown-menu';
|
|
5
5
|
import { Input } from '../../input/input.js';
|
|
6
6
|
import { SearchLineIcon } from '../../../assets/icons/search_icon.js';
|
|
7
|
+
import { MultiSelectGroupLabel } from './multiselect_group_label.js';
|
|
7
8
|
import { MultiSelectItem } from './multiselect_item.js';
|
|
8
|
-
import { MultiSelectGroup } from './multiselect_group.js';
|
|
9
9
|
|
|
10
|
-
var _excluded = ["options", "
|
|
10
|
+
var _excluded = ["options", "selectedOptions", "toggleOption", "triggerWidth", "hasSearch", "searchPlaceholder", "className"];
|
|
11
11
|
var MultiSelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
12
|
var options = _ref.options,
|
|
13
|
-
isGrouped = _ref.isGrouped,
|
|
14
13
|
selectedOptions = _ref.selectedOptions,
|
|
15
14
|
toggleOption = _ref.toggleOption,
|
|
16
15
|
triggerWidth = _ref.triggerWidth,
|
|
@@ -22,22 +21,10 @@ var MultiSelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
22
21
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
23
22
|
searchTerm = _React$useState2[0],
|
|
24
23
|
setSearchTerm = _React$useState2[1];
|
|
25
|
-
var filteredOptions =
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return _objectSpread2(_objectSpread2({}, group), {}, {
|
|
30
|
-
options: group.options.filter(function (option) {
|
|
31
|
-
return option.label.toLowerCase().includes(lowercasedSearchTerm);
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
} else {
|
|
36
|
-
return options.filter(function (option) {
|
|
37
|
-
return option.label.toLowerCase().includes(lowercasedSearchTerm);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}, [options, searchTerm, isGrouped]);
|
|
24
|
+
var filteredOptions = options.filter(function (option) {
|
|
25
|
+
var _searchTerm$toLowerCa;
|
|
26
|
+
return option.text.toLowerCase().includes((_searchTerm$toLowerCa = searchTerm === null || searchTerm === void 0 ? void 0 : searchTerm.toLowerCase()) !== null && _searchTerm$toLowerCa !== void 0 ? _searchTerm$toLowerCa : '');
|
|
27
|
+
});
|
|
41
28
|
return /*#__PURE__*/React.createElement(Content, _objectSpread2(_objectSpread2({
|
|
42
29
|
className: cn("aurora-z-50 aurora-bg aurora-flex aurora-flex-col aurora-gap-1 aurora-mt-1 aurora-overflow-hidden aurora-rounded-8 aurora-border aurora-p-3 aurora-shadow-m data-[state=open]:aurora-animate-in data-[state=closed]:aurora-animate-out data-[state=closed]:aurora-fade-out-0 data-[state=open]:aurora-fade-in-0 data-[state=closed]:aurora-zoom-out-95 data-[state=open]:aurora-zoom-in-95 data-[side=bottom]:aurora-slide-in-from-top-2 data-[side=left]:aurora-slide-in-from-right-2 data-[side=right]:aurora-slide-in-from-left-2 data-[side=top]:aurora-slide-in-from-bottom-2", className)
|
|
43
30
|
}, props), {}, {
|
|
@@ -62,22 +49,19 @@ var MultiSelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
62
49
|
e.stopPropagation();
|
|
63
50
|
},
|
|
64
51
|
placeholder: searchPlaceholder
|
|
65
|
-
}))),
|
|
66
|
-
return /*#__PURE__*/React.createElement(
|
|
67
|
-
key:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
toggleOption: toggleOption
|
|
71
|
-
});
|
|
72
|
-
}) : filteredOptions.map(function (option) {
|
|
73
|
-
return /*#__PURE__*/React.createElement(MultiSelectItem, {
|
|
74
|
-
key: option.value,
|
|
52
|
+
}))), filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.map(function (option) {
|
|
53
|
+
return option.isHeader ? (/*#__PURE__*/React.createElement(MultiSelectGroupLabel, {
|
|
54
|
+
key: option.text
|
|
55
|
+
}, option.text)) : (/*#__PURE__*/React.createElement(MultiSelectItem, {
|
|
56
|
+
key: "select-item-".concat(option.value),
|
|
75
57
|
option: option,
|
|
58
|
+
isDisabled: option.isDisabled,
|
|
59
|
+
isReadonly: option.isReadonly,
|
|
76
60
|
isSelected: selectedOptions.some(function (selected) {
|
|
77
61
|
return selected.value === option.value;
|
|
78
62
|
}),
|
|
79
63
|
toggleOption: toggleOption
|
|
80
|
-
});
|
|
64
|
+
}, option.text));
|
|
81
65
|
}));
|
|
82
66
|
});
|
|
83
67
|
MultiSelectContent.displayName = 'MultiSelectContent';
|
package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,10 +6,12 @@ import { Box } from '../../box/box.js';
|
|
|
6
6
|
import { Typography } from '../../typography/typography.js';
|
|
7
7
|
import { Checkbox } from '../../checkbox/checkbox.js';
|
|
8
8
|
|
|
9
|
-
var _excluded = ["option", "isSelected", "toggleOption", "className"];
|
|
9
|
+
var _excluded = ["option", "isSelected", "isDisabled", "isReadonly", "toggleOption", "className"];
|
|
10
10
|
var MultiSelectItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
11
11
|
var option = _ref.option,
|
|
12
12
|
isSelected = _ref.isSelected,
|
|
13
|
+
isDisabled = _ref.isDisabled,
|
|
14
|
+
isReadonly = _ref.isReadonly,
|
|
13
15
|
toggleOption = _ref.toggleOption,
|
|
14
16
|
className = _ref.className,
|
|
15
17
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -21,7 +23,8 @@ var MultiSelectItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
21
23
|
onSelect: handleSelect,
|
|
22
24
|
className: cn('aurora-relative aurora-flex aurora-w-full aurora-select-none aurora-rounded-sm aurora-p-2 aurora-outline-none focus:aurora-bg-accent data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 data-[state=checked]:aurora-font-semibold data-[highlighted]:aurora-font-semibold data-[highlighted]:aurora-bg-hover aurora-cursor-pointer aurora-rounded-6', {
|
|
23
25
|
'aurora-bg-hover': isSelected
|
|
24
|
-
}, className)
|
|
26
|
+
}, className),
|
|
27
|
+
disabled: isDisabled || isReadonly
|
|
25
28
|
}, props), {}, {
|
|
26
29
|
ref: ref
|
|
27
30
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
@@ -33,7 +36,7 @@ var MultiSelectItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
33
36
|
}), /*#__PURE__*/React.createElement(Typography, {
|
|
34
37
|
size: "s",
|
|
35
38
|
weight: "medium"
|
|
36
|
-
}, option.
|
|
39
|
+
}, option.text)));
|
|
37
40
|
});
|
|
38
41
|
MultiSelectItem.displayName = 'MultiSelectItem';
|
|
39
42
|
|
package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/build/esm/packages/aurora/src/components/multiselect/components/multiselect_trigger.js
CHANGED
|
@@ -19,7 +19,7 @@ var MultiSelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
19
19
|
'!aurora-border-danger aurora-border-2': hasErrors
|
|
20
20
|
}, className)
|
|
21
21
|
}, selectedOptions.length > 0 ? selectedOptions.map(function (option) {
|
|
22
|
-
return option.
|
|
22
|
+
return option.text;
|
|
23
23
|
}).join(', ') : placeholder !== null && placeholder !== void 0 ? placeholder : ''));
|
|
24
24
|
});
|
|
25
25
|
MultiSelectTrigger.displayName = 'MultiSelectTrigger';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TMultiSelectProps } from './multiselect_types';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
3
|
export declare const MultiSelect: {
|
|
4
|
-
({ id, options,
|
|
4
|
+
({ id, options, placeholder, disabled, hasSearch, searchPlaceholder, hasErrors, onValueChange, ...props }: PropsWithChildren<TMultiSelectProps>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -4,12 +4,10 @@ import { Root, Portal } from '@radix-ui/react-dropdown-menu';
|
|
|
4
4
|
import { MultiSelectContent } from './components/multiselect_content.js';
|
|
5
5
|
import { MultiSelectTrigger } from './components/multiselect_trigger.js';
|
|
6
6
|
|
|
7
|
-
var _excluded = ["id", "options", "
|
|
7
|
+
var _excluded = ["id", "options", "placeholder", "disabled", "hasSearch", "searchPlaceholder", "hasErrors", "onValueChange"];
|
|
8
8
|
var MultiSelect = function MultiSelect(_ref) {
|
|
9
9
|
var id = _ref.id,
|
|
10
10
|
options = _ref.options,
|
|
11
|
-
_ref$isGrouped = _ref.isGrouped,
|
|
12
|
-
isGrouped = _ref$isGrouped === void 0 ? false : _ref$isGrouped,
|
|
13
11
|
placeholder = _ref.placeholder,
|
|
14
12
|
disabled = _ref.disabled,
|
|
15
13
|
hasSearch = _ref.hasSearch,
|
|
@@ -59,7 +57,6 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
59
57
|
hasErrors: hasErrors
|
|
60
58
|
}), /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(MultiSelectContent, {
|
|
61
59
|
options: options,
|
|
62
|
-
isGrouped: isGrouped,
|
|
63
60
|
selectedOptions: selectedOptions,
|
|
64
61
|
toggleOption: toggleOption,
|
|
65
62
|
triggerWidth: triggerWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare type Option = {
|
|
4
|
+
text: string;
|
|
4
5
|
value: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
options: Option[];
|
|
6
|
+
additionalInfo?: string;
|
|
7
|
+
isHeader?: boolean;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isReadonly?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export interface TMultiSelectProps extends React.ComponentPropsWithoutRef<typeof DropdownMenu.Root> {
|
|
12
12
|
id?: string;
|
|
13
|
-
options: Option[]
|
|
14
|
-
isGrouped?: boolean;
|
|
13
|
+
options: Option[];
|
|
15
14
|
placeholder?: string;
|
|
16
15
|
disabled?: boolean;
|
|
17
16
|
hasSearch?: boolean;
|
|
@@ -25,21 +24,17 @@ export interface TMultiSelectTriggerProps extends React.ComponentPropsWithoutRef
|
|
|
25
24
|
hasErrors?: boolean;
|
|
26
25
|
}
|
|
27
26
|
export interface TMultiSelectContentProps extends React.ComponentPropsWithoutRef<typeof DropdownMenu.Content> {
|
|
28
|
-
options: Option[]
|
|
29
|
-
isGrouped?: boolean;
|
|
27
|
+
options: Option[];
|
|
30
28
|
selectedOptions: Option[];
|
|
31
29
|
toggleOption: (option: Option) => void;
|
|
32
30
|
triggerWidth?: number;
|
|
33
31
|
hasSearch?: boolean;
|
|
34
32
|
searchPlaceholder?: string;
|
|
35
33
|
}
|
|
36
|
-
export interface TMultiSelectGroupProps extends React.ComponentPropsWithoutRef<typeof DropdownMenu.Group> {
|
|
37
|
-
group: OptionGroup;
|
|
38
|
-
selectedOptions: Option[];
|
|
39
|
-
toggleOption: (option: Option) => void;
|
|
40
|
-
}
|
|
41
34
|
export interface TMultiSelectItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenu.Item> {
|
|
42
35
|
option: Option;
|
|
43
36
|
isSelected: boolean;
|
|
44
37
|
toggleOption: (option: Option) => void;
|
|
38
|
+
isDisabled?: boolean;
|
|
39
|
+
isReadonly?: boolean;
|
|
45
40
|
}
|
|
@@ -19,14 +19,14 @@ var RadioGroupItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
19
19
|
className = _ref.className,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
return /*#__PURE__*/createElement("div", {
|
|
22
|
-
className: "aurora-flex aurora-gap-2"
|
|
22
|
+
className: "aurora-flex aurora-items-center aurora-gap-2"
|
|
23
23
|
}, /*#__PURE__*/createElement(Item, _objectSpread2({
|
|
24
24
|
id: id,
|
|
25
25
|
ref: ref,
|
|
26
26
|
value: value,
|
|
27
27
|
disabled: disabled,
|
|
28
28
|
required: required,
|
|
29
|
-
className: cn('aurora-h-5 aurora-w-5 aurora-rounded-full aurora-border focus data-[state=checked]:aurora-bg-primary', {
|
|
29
|
+
className: cn('aurora-shrink-0 aurora-h-5 aurora-w-5 aurora-rounded-full aurora-border focus data-[state=checked]:aurora-bg-primary', {
|
|
30
30
|
'!aurora-bg-active aurora-cursor-not-allowed': disabled,
|
|
31
31
|
'!aurora-bg-neutral-0 aurora-border-danger aurora-border-2': errors
|
|
32
32
|
}, className)
|
|
@@ -40,6 +40,7 @@ var RadioGroupItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
40
40
|
htmlFor: id,
|
|
41
41
|
disabled: disabled,
|
|
42
42
|
tooltip: tooltip,
|
|
43
|
+
required: required,
|
|
43
44
|
className: "aurora-text"
|
|
44
45
|
}, label)), helperText && /*#__PURE__*/createElement(HelperText, null, helperText)));
|
|
45
46
|
});
|
package/build/esm/packages/aurora/src/components/radio_group/components/radio_group_item.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,6 +4,7 @@ import { cn } from '../../../utilities/cn.js';
|
|
|
4
4
|
import { Input } from '../../input/input.js';
|
|
5
5
|
import { Portal, Content, Viewport } from '@radix-ui/react-select';
|
|
6
6
|
import { SearchLineIcon } from '../../../assets/icons/search_icon.js';
|
|
7
|
+
import { SelectGroupLabel } from './select_group_label.js';
|
|
7
8
|
import { SelectItem } from './select_item.js';
|
|
8
9
|
|
|
9
10
|
var _excluded = ["className", "options", "position", "hasSearch", "searchPlaceholder", "innerAdditionalContent", "filterTerm", "setFilterTerm"];
|
|
@@ -21,7 +22,7 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
21
22
|
var inputRef = useRef(null);
|
|
22
23
|
var filteredOptions = options.filter(function (option) {
|
|
23
24
|
var _filterTerm$toLowerCa;
|
|
24
|
-
return option.
|
|
25
|
+
return option.text.toLowerCase().includes((_filterTerm$toLowerCa = filterTerm === null || filterTerm === void 0 ? void 0 : filterTerm.toLowerCase()) !== null && _filterTerm$toLowerCa !== void 0 ? _filterTerm$toLowerCa : '');
|
|
25
26
|
});
|
|
26
27
|
useEffect(function () {
|
|
27
28
|
requestAnimationFrame(function () {
|
|
@@ -55,11 +56,15 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
55
56
|
},
|
|
56
57
|
placeholder: searchPlaceholder,
|
|
57
58
|
ref: inputRef
|
|
58
|
-
}))), filteredOptions.map(function (option) {
|
|
59
|
-
return /*#__PURE__*/React.createElement(
|
|
59
|
+
}))), filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.map(function (option, index) {
|
|
60
|
+
return option.isHeader ? (/*#__PURE__*/React.createElement(SelectGroupLabel, {
|
|
61
|
+
key: option.text
|
|
62
|
+
}, option.text)) : (/*#__PURE__*/React.createElement(SelectItem, {
|
|
60
63
|
key: "select-item-".concat(option.value),
|
|
61
|
-
value: option.value
|
|
62
|
-
|
|
64
|
+
value: option.value,
|
|
65
|
+
isDisabled: option.isDisabled,
|
|
66
|
+
isReadonly: option.isReadonly
|
|
67
|
+
}, option.text));
|
|
63
68
|
}))));
|
|
64
69
|
});
|
|
65
70
|
SelectContent.displayName = Content.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { Stack } from '../../stack/stack.js';
|
|
4
|
+
import { Box } from '../../box/box.js';
|
|
5
|
+
import { Typography } from '../../typography/typography.js';
|
|
6
|
+
import { Divider } from '../../divider/divider.js';
|
|
7
|
+
|
|
8
|
+
var _excluded = ["children"];
|
|
9
|
+
var SelectGroupLabel = function SelectGroupLabel(_ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
13
|
+
paddings: {
|
|
14
|
+
pl: '2',
|
|
15
|
+
pt: '2',
|
|
16
|
+
pb: '2',
|
|
17
|
+
pr: '0'
|
|
18
|
+
}
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
20
|
+
align: "center",
|
|
21
|
+
spacing: "2.5"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
23
|
+
className: "aurora-whitespace-nowrap",
|
|
24
|
+
size: "s",
|
|
25
|
+
color: "subtle",
|
|
26
|
+
weight: "bold"
|
|
27
|
+
}, children), /*#__PURE__*/React.createElement(Divider, _objectSpread2({}, props))));
|
|
28
|
+
};
|
|
29
|
+
SelectGroupLabel.displayName = 'SelectGroupLabel';
|
|
30
|
+
|
|
31
|
+
export { SelectGroupLabel };
|
|
32
|
+
//# sourceMappingURL=select_group_label.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
|
|
2
|
+
import { TSelectItemProps } from '../select_types';
|
|
3
|
+
export declare const SelectItem: React.ForwardRefExoticComponent<TSelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,13 +4,16 @@ import { cn } from '../../../utilities/cn.js';
|
|
|
4
4
|
import { CheckLineIcon } from '../../../assets/icons/check_icon.js';
|
|
5
5
|
import { Item, ItemIndicator, ItemText } from '@radix-ui/react-select';
|
|
6
6
|
|
|
7
|
-
var _excluded = ["children", "className"];
|
|
7
|
+
var _excluded = ["children", "className", "isDisabled", "isReadonly"];
|
|
8
8
|
var SelectItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
9
|
var children = _ref.children,
|
|
10
10
|
className = _ref.className,
|
|
11
|
+
isDisabled = _ref.isDisabled,
|
|
12
|
+
isReadonly = _ref.isReadonly,
|
|
11
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
14
|
return /*#__PURE__*/React.createElement(Item, _objectSpread2(_objectSpread2({
|
|
13
|
-
className: cn('aurora-relative aurora-flex aurora-w-full aurora-rounded-6 aurora-cursor-default aurora-select-none aurora-items-center aurora-rounded-sm aurora-py-1.5 aurora-pl-9 aurora-pr-8 aurora-text-sm aurora-outline-none focus:aurora-bg-accent focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 data-[state=checked]:aurora-font-semibold data-[highlighted]:aurora-font-semibold data-[highlighted]:aurora-bg-hover', className)
|
|
15
|
+
className: cn('aurora-relative aurora-flex aurora-w-full aurora-rounded-6 aurora-cursor-default aurora-select-none aurora-items-center aurora-rounded-sm aurora-py-1.5 aurora-pl-9 aurora-pr-8 aurora-text-sm aurora-outline-none focus:aurora-bg-accent focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 data-[state=checked]:aurora-font-semibold data-[highlighted]:aurora-font-semibold data-[highlighted]:aurora-bg-hover', className),
|
|
16
|
+
disabled: isDisabled || isReadonly
|
|
14
17
|
}, props), {}, {
|
|
15
18
|
ref: ref
|
|
16
19
|
}), /*#__PURE__*/React.createElement(ItemIndicator, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
1
|
import { TSelectProps } from './select_types';
|
|
2
|
+
import React, { PropsWithChildren } from 'react';
|
|
3
3
|
export declare const Select: {
|
|
4
4
|
({ children, id, defaultValue, options, disabled, placeholder, hasSearch, searchPlaceholder, hasClearValueButton, innerAdditionalContent, hasError, onValueChange, ...props }: PropsWithChildren<TSelectProps>): React.JSX.Element;
|
|
5
5
|
displayName: string | undefined;
|