@dreamcommerce/aurora 3.0.0-256 → 3.0.0-258

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-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-min-w-[20rem] 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",
@@ -55,7 +55,9 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
55
55
  },
56
56
  placeholder: searchPlaceholder,
57
57
  options: options
58
- }))), /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Viewport, null, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
58
+ }))), /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Viewport, {
59
+ className: "aurora-flex aurora-flex-col aurora-gap-1"
60
+ }, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
59
61
  var visible = true;
60
62
  if (enableLocalSearch && hasSearch && search && !option.isHeader) {
61
63
  visible = select_utils.SelectUtils.localSearchIsOptionVisible(option, search);
@@ -65,10 +67,10 @@ var SelectContent = /*#__PURE__*/React__default['default'].forwardRef(function (
65
67
  visible = select_utils.SelectUtils.localSearchIsHeaderVisible(search, options, index);
66
68
  }
67
69
  return option.isHeader ? (/*#__PURE__*/React__default['default'].createElement(select_group_label.SelectGroupLabel, {
68
- key: "select-label-".concat(option.text),
70
+ key: "select-label-".concat(option.text, "-").concat(index),
69
71
  className: cn.cn(!visible && 'aurora-hidden')
70
72
  }, option.text)) : (/*#__PURE__*/React__default['default'].createElement(select_item.SelectItem, {
71
- key: "select-item-".concat(option.value),
73
+ key: "select-item-".concat(option.value, "-").concat(index),
72
74
  value: option.value,
73
75
  isDisabled: option.isDisabled,
74
76
  isReadonly: option.isReadonly,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0EAA8E;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,oBAAoB,0EAA8E;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -28,7 +28,7 @@ var SelectGroupLabel = function SelectGroupLabel(_ref) {
28
28
  align: "center",
29
29
  spacing: "2.5"
30
30
  }, /*#__PURE__*/React__default['default'].createElement(typography.Typography, {
31
- className: "aurora-whitespace-nowrap",
31
+ className: "aurora-whitespace-nowrap first-letter:aurora-uppercase",
32
32
  size: "s",
33
33
  color: "subtle",
34
34
  weight: "bold"
@@ -20,14 +20,19 @@ 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);
24
23
  return /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.Item, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({
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', {
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 aurora-break-words 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', {
26
25
  'aurora-cursor-pointer active:aurora-bg-active': !isDisabled && !isReadonly
27
26
  }, className),
27
+ style: {
28
+ wordBreak: 'break-word'
29
+ },
28
30
  disabled: isDisabled || isReadonly
29
31
  }, props), {}, {
30
- ref: ref
32
+ ref: ref,
33
+ onPointerMove: function onPointerMove(e) {
34
+ e.preventDefault();
35
+ }
31
36
  }), /*#__PURE__*/React__default['default'].createElement(SelectPrimitive.ItemIndicator, null, /*#__PURE__*/React__default['default'].createElement(check_icon.CheckLineIcon, {
32
37
  className: "aurora-h-5 aurora-w-5 -aurora-ml-7 aurora-mr-2"
33
38
  })), /*#__PURE__*/React__default['default'].createElement("div", {
@@ -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;AACA;AACA;AACA;AACA;AACA;"}
@@ -52,9 +52,9 @@ var Select = function Select(_ref) {
52
52
  };
53
53
  var handleChange = function handleChange(val) {
54
54
  var _option$value;
55
- var option = options.find(function (opt) {
55
+ var option = val ? options.find(function (opt) {
56
56
  return opt.value === val;
57
- });
57
+ }) : undefined;
58
58
  setSelectedOption(option);
59
59
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '');
60
60
  };
@@ -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-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-min-w-[20rem] 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",
@@ -47,7 +47,9 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47
47
  },
48
48
  placeholder: searchPlaceholder,
49
49
  options: options
50
- }))), /*#__PURE__*/React.createElement(Viewport$1, null, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
50
+ }))), /*#__PURE__*/React.createElement(Viewport$1, {
51
+ className: "aurora-flex aurora-flex-col aurora-gap-1"
52
+ }, options === null || options === void 0 ? void 0 : options.map(function (option, index) {
51
53
  var visible = true;
52
54
  if (enableLocalSearch && hasSearch && search && !option.isHeader) {
53
55
  visible = SelectUtils.localSearchIsOptionVisible(option, search);
@@ -57,10 +59,10 @@ var SelectContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
59
  visible = SelectUtils.localSearchIsHeaderVisible(search, options, index);
58
60
  }
59
61
  return option.isHeader ? (/*#__PURE__*/React.createElement(SelectGroupLabel, {
60
- key: "select-label-".concat(option.text),
62
+ key: "select-label-".concat(option.text, "-").concat(index),
61
63
  className: cn(!visible && 'aurora-hidden')
62
64
  }, option.text)) : (/*#__PURE__*/React.createElement(SelectItem, {
63
- key: "select-item-".concat(option.value),
65
+ key: "select-item-".concat(option.value, "-").concat(index),
64
66
  value: option.value,
65
67
  isDisabled: option.isDisabled,
66
68
  isReadonly: option.isReadonly,
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,iDAAiD,0EAA8E;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,iDAAiD,0EAA8E;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -20,7 +20,7 @@ var SelectGroupLabel = function SelectGroupLabel(_ref) {
20
20
  align: "center",
21
21
  spacing: "2.5"
22
22
  }, /*#__PURE__*/React.createElement(Typography, {
23
- className: "aurora-whitespace-nowrap",
23
+ className: "aurora-whitespace-nowrap first-letter:aurora-uppercase",
24
24
  size: "s",
25
25
  color: "subtle",
26
26
  weight: "bold"
@@ -12,14 +12,19 @@ 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);
16
15
  return /*#__PURE__*/React.createElement(Item, _objectSpread2(_objectSpread2({
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', {
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 aurora-break-words 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', {
18
17
  'aurora-cursor-pointer active:aurora-bg-active': !isDisabled && !isReadonly
19
18
  }, className),
19
+ style: {
20
+ wordBreak: 'break-word'
21
+ },
20
22
  disabled: isDisabled || isReadonly
21
23
  }, props), {}, {
22
- ref: ref
24
+ ref: ref,
25
+ onPointerMove: function onPointerMove(e) {
26
+ e.preventDefault();
27
+ }
23
28
  }), /*#__PURE__*/React.createElement(ItemIndicator, null, /*#__PURE__*/React.createElement(CheckLineIcon, {
24
29
  className: "aurora-h-5 aurora-w-5 -aurora-ml-7 aurora-mr-2"
25
30
  })), /*#__PURE__*/React.createElement("div", {
@@ -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;"}
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;"}
@@ -44,9 +44,9 @@ var Select = function Select(_ref) {
44
44
  };
45
45
  var handleChange = function handleChange(val) {
46
46
  var _option$value;
47
- var option = options.find(function (opt) {
47
+ var option = val ? options.find(function (opt) {
48
48
  return opt.value === val;
49
- });
49
+ }) : undefined;
50
50
  setSelectedOption(option);
51
51
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange((_option$value = option === null || option === void 0 ? void 0 : option.value) !== null && _option$value !== void 0 ? _option$value : '');
52
52
  };