@dreamcommerce/aurora 3.0.0-255 → 3.0.0-256

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.
@@ -34,7 +34,7 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
34
34
  var localSearchVisibleItems = 0;
35
35
  return /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Portal, null, /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Content, _rollupPluginBabelHelpers.objectSpread2({
36
36
  ref: ref,
37
- className: cn.cn('aurora-w-[--radix-select-trigger-width] aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s 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 aurora-p-1 js__aurora-select-dropdown aurora-group', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
37
+ className: cn.cn('aurora-w-[--radix-select-trigger-width] aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s 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 aurora-p-1 js__aurora-select-dropdown aurora-group', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
38
38
  position: position
39
39
  }, props), /*#__PURE__*/React__default['default'].createElement(index.Root, {
40
40
  type: "auto",
@@ -65,10 +65,10 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
65
65
  visible = select_utils.SelectUtils.localSearchIsHeaderVisible(search, options, index);
66
66
  }
67
67
  return option.isHeader ? (/*#__PURE__*/React__default['default'].createElement(select_group_label.SelectGroupLabel, {
68
- key: "select-label-".concat(option.text, "-").concat(index),
68
+ key: "select-label-".concat(option.text),
69
69
  className: cn.cn(!visible && 'aurora-hidden')
70
70
  }, option.text)) : (/*#__PURE__*/React__default['default'].createElement(select_item.SelectItem, {
71
- key: "select-item-".concat(option.value, "-").concat(index),
71
+ key: "select-item-".concat(option.value),
72
72
  value: option.value,
73
73
  isDisabled: option.isDisabled,
74
74
  isReadonly: option.isReadonly,
@@ -20,8 +20,9 @@ var SelectItem = /*#__PURE__*/React__default['default'].forwardRef(function (_re
20
20
  isReadonly = _ref.isReadonly,
21
21
  additionalInfo = _ref.additionalInfo,
22
22
  props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
23
+ console.log(props.value);
23
24
  return /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Item, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
24
- className: cn.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 active:aurora-bg-active focus:aurora-bg-hover focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 hover:aurora-bg-hover data-[state=checked]:aurora-bg-hover data-[state=checked]:aurora-font-semibold', {
25
+ className: cn.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 aurora-break-all aurora-text-wrap active:aurora-bg-active focus:aurora-bg-hover focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 hover:aurora-bg-hover data-[state=checked]:aurora-bg-hover data-[state=checked]:aurora-font-semibold', {
25
26
  'aurora-cursor-pointer active:aurora-bg-active': !isDisabled && !isReadonly
26
27
  }, className),
27
28
  disabled: isDisabled || isReadonly
@@ -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;"}
@@ -12,22 +12,25 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
 
15
- var _excluded = ["className", "hasError", "children"];
15
+ var _excluded = ["className", "hasError", "children", "clearValueButton"];
16
16
  var SelectTrigger = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
17
17
  var className = _ref.className,
18
18
  hasError = _ref.hasError,
19
19
  children = _ref.children,
20
+ clearValueButton = _ref.clearValueButton,
20
21
  props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
21
22
  return /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Trigger, _rollupPluginBabelHelpers.objectSpread2({
22
23
  ref: ref,
23
- className: cn.cn('aurora-flex aurora-h-10 aurora-w-full aurora-items-center aurora-justify-between aurora-rounded-8 aurora-border aurora-border-input aurora-bg-neutral-0 aurora-px-3 aurora-py-2 aurora-text-s hover:aurora-border-strong focus-visible:focus disabled:aurora-cursor-not-allowed disabled:aurora-bg-subtle disabled:aurora-text-subtle-light disabled:aurora-border-subtle [&>span]:aurora-line-clamp-1 focus:aurora-border-active focus:aurora-border-2 active:aurora-border-active active:aurora-border-2', {
24
+ className: cn.cn('aurora-flex aurora-h-10 aurora-w-full aurora-items-center aurora-justify-between aurora-rounded-8 aurora-border aurora-border-input aurora-bg-neutral-0 aurora-px-3 aurora-py-2 aurora-text-s hover:aurora-border-strong focus-visible:focus disabled:aurora-cursor-not-allowed disabled:aurora-bg-subtle disabled:aurora-text-subtle-light disabled:aurora-border-subtle [&>span]:aurora-text-ellipsis [&>span]:aurora-whitespace-nowrap [&>span]:aurora-overflow-hidden focus-visible:aurora-border-active -visible:aurora-border-2 data-[state=open]:aurora-border-active data-[state=open]:aurora-border-2', {
24
25
  '!aurora-border-danger aurora-border-2': hasError
25
26
  }, className)
26
- }, props), children, /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Icon, {
27
+ }, props), children, /*#__PURE__*/React__default['default'].createElement("div", {
28
+ className: "aurora-flex aurora-flex-none aurora-items-center"
29
+ }, clearValueButton, /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Icon, {
27
30
  asChild: true
28
31
  }, /*#__PURE__*/React__default['default'].createElement(arrow_down_s_fill.ArrowDownSFillIcon, {
29
32
  className: "aurora-h-4 aurora-w-4 aurora-text-inverse-subtle-light"
30
- })));
33
+ }))));
31
34
  });
32
35
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
33
36
 
@@ -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;"}
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;"}
@@ -16,6 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
16
 
17
17
  var _excluded = ["children", "id", "value", "options", "disabled", "placeholder", "hasSearch", "searchPlaceholder", "hasClearValueButton", "innerAdditionalContent", "enableLocalSearch", "localSearchNotFoundContent", "errors", "onValueChange", "onScroll", "onSearch", "onClose"];
18
18
  var Select = function Select(_ref) {
19
+ var _selectedOption$value;
19
20
  var children = _ref.children,
20
21
  id = _ref.id,
21
22
  value = _ref.value,
@@ -63,7 +64,7 @@ var Select = function Select(_ref) {
63
64
  };
64
65
  var showPlaceholder = !selectedOption;
65
66
  return /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Root, _rollupPluginBabelHelpers.objectSpread2({
66
- value: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value,
67
+ value: (_selectedOption$value = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) !== null && _selectedOption$value !== void 0 ? _selectedOption$value : '',
67
68
  onValueChange: handleChange,
68
69
  disabled: disabled,
69
70
  onOpenChange: handleOpenChange
@@ -71,17 +72,21 @@ var Select = function Select(_ref) {
71
72
  className: "aurora-relative aurora-flex aurora-items-center aurora-flex-col"
72
73
  }, /*#__PURE__*/React__default['default'].createElement(select_trigger.SelectTrigger, {
73
74
  id: id,
74
- hasError: !!(errors !== null && errors !== void 0 && errors.length)
75
+ hasError: !!(errors !== null && errors !== void 0 && errors.length),
76
+ clearValueButton: value && hasClearValueButton && onValueChange && (/*#__PURE__*/React__default['default'].createElement("div", {
77
+ onPointerDown: function onPointerDown(e) {
78
+ return e.stopPropagation();
79
+ },
80
+ onClick: function onClick() {
81
+ handleChange('');
82
+ },
83
+ className: "aurora-w-5 aurora-h-5 aurora-flex aurora-items-center aurora-justify-center"
84
+ }, /*#__PURE__*/React__default['default'].createElement(close_circle_fill_icon.CloseCircleFillIcon, {
85
+ className: "aurora-h-4 aurora-w-4 aurora-cursor-pointer"
86
+ })))
75
87
  }, /*#__PURE__*/React__default['default'].createElement("span", {
76
- className: cn.cn('aurora-pointer-events-none', showPlaceholder && 'aurora-text-subtle')
77
- }, !showPlaceholder ? selectedOption.text : placeholder)), value && hasClearValueButton && onValueChange && (/*#__PURE__*/React__default['default'].createElement("div", {
78
- className: "aurora-absolute aurora-top-3 aurora-right-8 aurora-z-10",
79
- onClick: function onClick() {
80
- return handleChange('');
81
- }
82
- }, /*#__PURE__*/React__default['default'].createElement(close_circle_fill_icon.CloseCircleFillIcon, {
83
- className: "aurora-h-4 aurora-w-4 aurora-cursor-pointer"
84
- })))), /*#__PURE__*/React__default['default'].createElement(select_content.SelectContent, {
88
+ className: cn.cn('aurora-pointer-events-none aurora-select-none', showPlaceholder && 'aurora-text-subtle')
89
+ }, !showPlaceholder ? selectedOption.text : placeholder))), /*#__PURE__*/React__default['default'].createElement(select_content.SelectContent, {
85
90
  options: options,
86
91
  hasSearch: hasSearch,
87
92
  searchPlaceholder: searchPlaceholder,
@@ -90,7 +95,10 @@ var Select = function Select(_ref) {
90
95
  onSearch: handleSearch,
91
96
  onScroll: onScroll,
92
97
  enableLocalSearch: enableLocalSearch,
93
- localSearchNotFoundContent: localSearchNotFoundContent
98
+ localSearchNotFoundContent: localSearchNotFoundContent,
99
+ onCloseAutoFocus: function onCloseAutoFocus(e) {
100
+ return e.preventDefault();
101
+ }
94
102
  }));
95
103
  };
96
104
  Select.displayName = SelectPrimitive.Root.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -26,7 +26,7 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
26
26
  var localSearchVisibleItems = 0;
27
27
  return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(Content, _objectSpread2({
28
28
  ref: ref,
29
- className: cn('aurora-w-[--radix-select-trigger-width] aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-min-w-[fit-content] aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s 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 aurora-p-1 js__aurora-select-dropdown aurora-group', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
29
+ className: cn('aurora-w-[--radix-select-trigger-width] aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-bg-neutral-0 aurora-text-s 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 aurora-p-1 js__aurora-select-dropdown aurora-group', position === 'popper' && 'data-[side=bottom]:aurora-translate-y-1 data-[side=left]:-aurora-translate-x-1 data-[side=right]:aurora-translate-x-1 data-[side=top]:-aurora-translate-y-1', className),
30
30
  position: position
31
31
  }, props), /*#__PURE__*/React.createElement(Root, {
32
32
  type: "auto",
@@ -57,10 +57,10 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
57
  visible = SelectUtils.localSearchIsHeaderVisible(search, options, index);
58
58
  }
59
59
  return option.isHeader ? (/*#__PURE__*/React.createElement(SelectGroupLabel, {
60
- key: "select-label-".concat(option.text, "-").concat(index),
60
+ key: "select-label-".concat(option.text),
61
61
  className: cn(!visible && 'aurora-hidden')
62
62
  }, option.text)) : (/*#__PURE__*/React.createElement(SelectItem, {
63
- key: "select-item-".concat(option.value, "-").concat(index),
63
+ key: "select-item-".concat(option.value),
64
64
  value: option.value,
65
65
  isDisabled: option.isDisabled,
66
66
  isReadonly: option.isReadonly,
@@ -12,8 +12,9 @@ var SelectItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
12
12
  isReadonly = _ref.isReadonly,
13
13
  additionalInfo = _ref.additionalInfo,
14
14
  props = _objectWithoutProperties(_ref, _excluded);
15
+ console.log(props.value);
15
16
  return /*#__PURE__*/React.createElement(Item, _objectSpread2(_objectSpread2({
16
- 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 active:aurora-bg-active focus:aurora-bg-hover focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 hover:aurora-bg-hover data-[state=checked]:aurora-bg-hover data-[state=checked]:aurora-font-semibold', {
17
+ 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 aurora-break-all aurora-text-wrap active:aurora-bg-active focus:aurora-bg-hover focus:aurora-text-accent-foreground data-[disabled]:aurora-pointer-events-none data-[disabled]:aurora-opacity-50 hover:aurora-bg-hover data-[state=checked]:aurora-bg-hover data-[state=checked]:aurora-font-semibold', {
17
18
  'aurora-cursor-pointer active:aurora-bg-active': !isDisabled && !isReadonly
18
19
  }, className),
19
20
  disabled: isDisabled || isReadonly
@@ -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;"}
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;"}
@@ -4,22 +4,25 @@ import { cn } from '../../../utilities/cn.js';
4
4
  import { ArrowDownSFillIcon } from '../../../assets/icons/arrow_down_s_fill.js';
5
5
  import { Trigger, Icon } from '@radix-ui/react-select';
6
6
 
7
- var _excluded = ["className", "hasError", "children"];
7
+ var _excluded = ["className", "hasError", "children", "clearValueButton"];
8
8
  var SelectTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
9
9
  var className = _ref.className,
10
10
  hasError = _ref.hasError,
11
11
  children = _ref.children,
12
+ clearValueButton = _ref.clearValueButton,
12
13
  props = _objectWithoutProperties(_ref, _excluded);
13
14
  return /*#__PURE__*/React.createElement(Trigger, _objectSpread2({
14
15
  ref: ref,
15
- className: cn('aurora-flex aurora-h-10 aurora-w-full aurora-items-center aurora-justify-between aurora-rounded-8 aurora-border aurora-border-input aurora-bg-neutral-0 aurora-px-3 aurora-py-2 aurora-text-s hover:aurora-border-strong focus-visible:focus disabled:aurora-cursor-not-allowed disabled:aurora-bg-subtle disabled:aurora-text-subtle-light disabled:aurora-border-subtle [&>span]:aurora-line-clamp-1 focus:aurora-border-active focus:aurora-border-2 active:aurora-border-active active:aurora-border-2', {
16
+ className: cn('aurora-flex aurora-h-10 aurora-w-full aurora-items-center aurora-justify-between aurora-rounded-8 aurora-border aurora-border-input aurora-bg-neutral-0 aurora-px-3 aurora-py-2 aurora-text-s hover:aurora-border-strong focus-visible:focus disabled:aurora-cursor-not-allowed disabled:aurora-bg-subtle disabled:aurora-text-subtle-light disabled:aurora-border-subtle [&>span]:aurora-text-ellipsis [&>span]:aurora-whitespace-nowrap [&>span]:aurora-overflow-hidden focus-visible:aurora-border-active -visible:aurora-border-2 data-[state=open]:aurora-border-active data-[state=open]:aurora-border-2', {
16
17
  '!aurora-border-danger aurora-border-2': hasError
17
18
  }, className)
18
- }, props), children, /*#__PURE__*/React.createElement(Icon, {
19
+ }, props), children, /*#__PURE__*/React.createElement("div", {
20
+ className: "aurora-flex aurora-flex-none aurora-items-center"
21
+ }, clearValueButton, /*#__PURE__*/React.createElement(Icon, {
19
22
  asChild: true
20
23
  }, /*#__PURE__*/React.createElement(ArrowDownSFillIcon, {
21
24
  className: "aurora-h-4 aurora-w-4 aurora-text-inverse-subtle-light"
22
- })));
25
+ }))));
23
26
  });
24
27
  SelectTrigger.displayName = Trigger.displayName;
25
28
 
@@ -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;"}
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;"}
@@ -8,6 +8,7 @@ import { SelectTrigger } from './components/select_trigger.js';
8
8
 
9
9
  var _excluded = ["children", "id", "value", "options", "disabled", "placeholder", "hasSearch", "searchPlaceholder", "hasClearValueButton", "innerAdditionalContent", "enableLocalSearch", "localSearchNotFoundContent", "errors", "onValueChange", "onScroll", "onSearch", "onClose"];
10
10
  var Select = function Select(_ref) {
11
+ var _selectedOption$value;
11
12
  var children = _ref.children,
12
13
  id = _ref.id,
13
14
  value = _ref.value,
@@ -55,7 +56,7 @@ var Select = function Select(_ref) {
55
56
  };
56
57
  var showPlaceholder = !selectedOption;
57
58
  return /*#__PURE__*/React.createElement(Root, _objectSpread2({
58
- value: selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value,
59
+ value: (_selectedOption$value = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) !== null && _selectedOption$value !== void 0 ? _selectedOption$value : '',
59
60
  onValueChange: handleChange,
60
61
  disabled: disabled,
61
62
  onOpenChange: handleOpenChange
@@ -63,17 +64,21 @@ var Select = function Select(_ref) {
63
64
  className: "aurora-relative aurora-flex aurora-items-center aurora-flex-col"
64
65
  }, /*#__PURE__*/React.createElement(SelectTrigger, {
65
66
  id: id,
66
- hasError: !!(errors !== null && errors !== void 0 && errors.length)
67
+ hasError: !!(errors !== null && errors !== void 0 && errors.length),
68
+ clearValueButton: value && hasClearValueButton && onValueChange && (/*#__PURE__*/React.createElement("div", {
69
+ onPointerDown: function onPointerDown(e) {
70
+ return e.stopPropagation();
71
+ },
72
+ onClick: function onClick() {
73
+ handleChange('');
74
+ },
75
+ className: "aurora-w-5 aurora-h-5 aurora-flex aurora-items-center aurora-justify-center"
76
+ }, /*#__PURE__*/React.createElement(CloseCircleFillIcon, {
77
+ className: "aurora-h-4 aurora-w-4 aurora-cursor-pointer"
78
+ })))
67
79
  }, /*#__PURE__*/React.createElement("span", {
68
- className: cn('aurora-pointer-events-none', showPlaceholder && 'aurora-text-subtle')
69
- }, !showPlaceholder ? selectedOption.text : placeholder)), value && hasClearValueButton && onValueChange && (/*#__PURE__*/React.createElement("div", {
70
- className: "aurora-absolute aurora-top-3 aurora-right-8 aurora-z-10",
71
- onClick: function onClick() {
72
- return handleChange('');
73
- }
74
- }, /*#__PURE__*/React.createElement(CloseCircleFillIcon, {
75
- className: "aurora-h-4 aurora-w-4 aurora-cursor-pointer"
76
- })))), /*#__PURE__*/React.createElement(SelectContent, {
80
+ className: cn('aurora-pointer-events-none aurora-select-none', showPlaceholder && 'aurora-text-subtle')
81
+ }, !showPlaceholder ? selectedOption.text : placeholder))), /*#__PURE__*/React.createElement(SelectContent, {
77
82
  options: options,
78
83
  hasSearch: hasSearch,
79
84
  searchPlaceholder: searchPlaceholder,
@@ -82,7 +87,10 @@ var Select = function Select(_ref) {
82
87
  onSearch: handleSearch,
83
88
  onScroll: onScroll,
84
89
  enableLocalSearch: enableLocalSearch,
85
- localSearchNotFoundContent: localSearchNotFoundContent
90
+ localSearchNotFoundContent: localSearchNotFoundContent,
91
+ onCloseAutoFocus: function onCloseAutoFocus(e) {
92
+ return e.preventDefault();
93
+ }
86
94
  }));
87
95
  };
88
96
  Select.displayName = Root.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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -3,6 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { TInputProps } from "../input/input_types";
4
4
  export interface TSelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
5
5
  hasError?: boolean;
6
+ clearValueButton?: ReactNode;
6
7
  }
7
8
  export declare type TSelectOption = {
8
9
  text: string;