@dreamcommerce/aurora 3.1.34 → 3.1.35-1
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/assets/icons/arrow_left_s_line_icon.js +10 -0
- package/build/cjs/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/calendar.js +28 -0
- package/build/cjs/packages/aurora/src/components/calendar/calendar.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_months_dropdown.js +59 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_months_dropdown.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_next_month_button.js +25 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_next_month_button.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_prev_month_button.js +25 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_prev_month_button.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_years_dropdown.js +58 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/components/custom_years_dropdown.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js +67 -0
- package/build/cjs/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/select/components/select_content.js +6 -2
- 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_trigger.js +13 -2
- package/build/cjs/packages/aurora/src/components/select/components/select_trigger.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/select/components/select_variants.js +47 -0
- package/build/cjs/packages/aurora/src/components/select/components/select_variants.js.map +1 -0
- package/build/cjs/packages/aurora/src/components/select/select.js +23 -4
- package/build/cjs/packages/aurora/src/components/select/select.js.map +1 -1
- package/build/cjs/packages/aurora/src/index.js +2 -0
- package/build/cjs/packages/aurora/src/index.js.map +1 -1
- package/build/esm/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js +5 -2
- package/build/esm/packages/aurora/src/assets/icons/arrow_left_s_line_icon.js.map +1 -1
- package/build/esm/packages/aurora/src/components/calendar/calendar.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/calendar/calendar.js +20 -0
- package/build/esm/packages/aurora/src/components/calendar/calendar.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/calendar_types.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/calendar/calendar_types.js +2 -0
- package/build/esm/packages/aurora/src/components/calendar/calendar_types.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_months_dropdown.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_months_dropdown.js +51 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_months_dropdown.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_next_month_button.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_next_month_button.js +17 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_next_month_button.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_prev_month_button.d.ts +2 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_prev_month_button.js +17 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_prev_month_button.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_years_dropdown.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_years_dropdown.js +50 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/components/custom_years_dropdown.js.map +1 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js +59 -0
- package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js.map +1 -0
- package/build/esm/packages/aurora/src/components/select/components/select_content.js +6 -2
- 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_trigger.js +13 -2
- package/build/esm/packages/aurora/src/components/select/components/select_trigger.js.map +1 -1
- package/build/esm/packages/aurora/src/components/select/components/select_variants.d.ts +9 -0
- package/build/esm/packages/aurora/src/components/select/components/select_variants.js +42 -0
- package/build/esm/packages/aurora/src/components/select/components/select_variants.js.map +1 -0
- package/build/esm/packages/aurora/src/components/select/select.js +23 -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 +13 -0
- package/build/esm/packages/aurora/src/index.d.ts +1 -0
- package/build/esm/packages/aurora/src/index.js +1 -0
- package/build/esm/packages/aurora/src/index.js.map +1 -1
- package/build/index.css +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { cn } from '../../../../utilities/cn.js';
|
|
3
|
+
import { Select } from '../../../select/select.js';
|
|
4
|
+
import 'react-day-picker';
|
|
5
|
+
|
|
6
|
+
var CustomMonthsDropdown = function CustomMonthsDropdown(props) {
|
|
7
|
+
var _props$options = props.options,
|
|
8
|
+
options = _props$options === void 0 ? [] : _props$options,
|
|
9
|
+
value = props.value,
|
|
10
|
+
onChange = props.onChange,
|
|
11
|
+
disabled = props.disabled,
|
|
12
|
+
className = props.className;
|
|
13
|
+
// Convert DropdownOption[] to TSelectOption[]
|
|
14
|
+
var selectOptions = options.map(function (option) {
|
|
15
|
+
var label = String(option.label);
|
|
16
|
+
return {
|
|
17
|
+
text: label.charAt(0).toUpperCase() + label.slice(1),
|
|
18
|
+
value: String(option.value),
|
|
19
|
+
isDisabled: option.disabled
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
var handleValueChange = function handleValueChange(newValue) {
|
|
23
|
+
if (onChange) {
|
|
24
|
+
// Create a synthetic event that matches what react-day-picker expects
|
|
25
|
+
var syntheticEvent = {
|
|
26
|
+
target: {
|
|
27
|
+
value: newValue
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
onChange(syntheticEvent);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
34
|
+
className: cn(className)
|
|
35
|
+
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
36
|
+
id: "month-dropdown-".concat(Date.now()),
|
|
37
|
+
options: selectOptions,
|
|
38
|
+
value: value !== undefined ? String(value) : undefined,
|
|
39
|
+
onValueChange: handleValueChange,
|
|
40
|
+
disabled: disabled,
|
|
41
|
+
textSize: "small",
|
|
42
|
+
height: "small",
|
|
43
|
+
padding: "small",
|
|
44
|
+
hasBorder: false,
|
|
45
|
+
hasMinDropdownWidth: false,
|
|
46
|
+
className: "aurora-h-6 hover:aurora-bg-hover"
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { CustomMonthsDropdown };
|
|
51
|
+
//# sourceMappingURL=custom_months_dropdown.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { objectSpread2 as _objectSpread2 } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../../../utilities/cn.js';
|
|
4
|
+
import { ArrowRightSLineIcon } from '../../../../assets/icons/arrow_right_s_line_icon.js';
|
|
5
|
+
import 'react-day-picker';
|
|
6
|
+
|
|
7
|
+
var CustomNextMonthButton = function CustomNextMonthButton(props) {
|
|
8
|
+
return /*#__PURE__*/React__default.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9
|
+
type: "button",
|
|
10
|
+
className: cn('aurora-rounded-4 hover:aurora-bg-hover', props.className)
|
|
11
|
+
}), /*#__PURE__*/React__default.createElement(ArrowRightSLineIcon, {
|
|
12
|
+
size: 16
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { CustomNextMonthButton };
|
|
17
|
+
//# sourceMappingURL=custom_next_month_button.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { objectSpread2 as _objectSpread2 } from '../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../../../utilities/cn.js';
|
|
4
|
+
import 'react-day-picker';
|
|
5
|
+
import { ArrowLeftSLineIcon } from '../../../../assets/icons/arrow_left_s_line_icon.js';
|
|
6
|
+
|
|
7
|
+
var CustomPrevMonthButton = function CustomPrevMonthButton(props) {
|
|
8
|
+
return /*#__PURE__*/React__default.createElement("button", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
9
|
+
type: "button",
|
|
10
|
+
className: cn('aurora-rounded-4 hover:aurora-bg-hover', props.className)
|
|
11
|
+
}), /*#__PURE__*/React__default.createElement(ArrowLeftSLineIcon, {
|
|
12
|
+
size: 16
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { CustomPrevMonthButton };
|
|
17
|
+
//# sourceMappingURL=custom_prev_month_button.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { cn } from '../../../../utilities/cn.js';
|
|
3
|
+
import { Select } from '../../../select/select.js';
|
|
4
|
+
import 'react-day-picker';
|
|
5
|
+
|
|
6
|
+
var CustomYearsDropdown = function CustomYearsDropdown(props) {
|
|
7
|
+
var _props$options = props.options,
|
|
8
|
+
options = _props$options === void 0 ? [] : _props$options,
|
|
9
|
+
value = props.value,
|
|
10
|
+
onChange = props.onChange,
|
|
11
|
+
disabled = props.disabled,
|
|
12
|
+
className = props.className;
|
|
13
|
+
// Convert DropdownOption[] to TSelectOption[]
|
|
14
|
+
var selectOptions = options.map(function (option) {
|
|
15
|
+
return {
|
|
16
|
+
text: option.label,
|
|
17
|
+
value: String(option.value),
|
|
18
|
+
isDisabled: option.disabled
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
var handleValueChange = function handleValueChange(newValue) {
|
|
22
|
+
if (onChange) {
|
|
23
|
+
// Create a synthetic event that matches what react-day-picker expects
|
|
24
|
+
var syntheticEvent = {
|
|
25
|
+
target: {
|
|
26
|
+
value: newValue
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
onChange(syntheticEvent);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
33
|
+
className: cn(className)
|
|
34
|
+
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
35
|
+
id: "year-dropdown-".concat(Date.now()),
|
|
36
|
+
options: selectOptions,
|
|
37
|
+
value: value !== undefined ? String(value) : undefined,
|
|
38
|
+
onValueChange: handleValueChange,
|
|
39
|
+
disabled: disabled,
|
|
40
|
+
textSize: "small",
|
|
41
|
+
height: "small",
|
|
42
|
+
padding: "small",
|
|
43
|
+
hasBorder: false,
|
|
44
|
+
hasMinDropdownWidth: false,
|
|
45
|
+
className: "aurora-h-6 hover:aurora-bg-hover"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { CustomYearsDropdown };
|
|
50
|
+
//# sourceMappingURL=custom_years_dropdown.js.map
|
|
@@ -0,0 +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;"}
|
package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
|
+
import { cn } from '../../../utilities/cn.js';
|
|
4
|
+
import { DayPicker } from 'react-day-picker';
|
|
5
|
+
import { CustomPrevMonthButton } from './components/custom_prev_month_button.js';
|
|
6
|
+
import { CustomMonthsDropdown } from './components/custom_months_dropdown.js';
|
|
7
|
+
import { CustomYearsDropdown } from './components/custom_years_dropdown.js';
|
|
8
|
+
import { CustomNextMonthButton } from './components/custom_next_month_button.js';
|
|
9
|
+
|
|
10
|
+
var _excluded = ["className", "locale"];
|
|
11
|
+
var StyledDayPicker = function StyledDayPicker(_ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
locale = _ref.locale,
|
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/React__default.createElement(DayPicker, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
16
|
+
locale: locale,
|
|
17
|
+
components: {
|
|
18
|
+
PreviousMonthButton: CustomPrevMonthButton,
|
|
19
|
+
NextMonthButton: CustomNextMonthButton,
|
|
20
|
+
MonthsDropdown: CustomMonthsDropdown,
|
|
21
|
+
YearsDropdown: CustomYearsDropdown
|
|
22
|
+
},
|
|
23
|
+
captionLayout: "dropdown",
|
|
24
|
+
navLayout: "around",
|
|
25
|
+
showOutsideDays: true,
|
|
26
|
+
// Main container styling
|
|
27
|
+
className: cn('aurora-relative aurora-px-4 aurora-py-3 aurora-rounded-16 aurora-border aurora-border-strong aurora-shadow-l aurora-bg-neutral-0', className),
|
|
28
|
+
classNames: {
|
|
29
|
+
// Navigation buttons
|
|
30
|
+
button_previous: 'aurora-absolute aurora-top-6 aurora-left-5 aurora-cursor-pointer',
|
|
31
|
+
button_next: 'aurora-absolute aurora-top-6 aurora-right-5 aurora-cursor-pointer',
|
|
32
|
+
// Months
|
|
33
|
+
month_grid: 'aurora-border-separate aurora-border-spacing-y-2',
|
|
34
|
+
month_caption: 'aurora-flex aurora-justify-center aurora-mt-2 aurora-mb-3',
|
|
35
|
+
// Month and year dropdowns
|
|
36
|
+
dropdowns: 'aurora-flex aurora-items-center aurora-gap-1',
|
|
37
|
+
dropdown_root: 'aurora-flex',
|
|
38
|
+
months_dropdown: 'aurora-text-xs',
|
|
39
|
+
years_dropdown: 'aurora-text-xs',
|
|
40
|
+
// Caption (Month/Year display)
|
|
41
|
+
caption_label: 'aurora-hidden',
|
|
42
|
+
// Weekdays
|
|
43
|
+
weekdays: 'aurora-text-subtle-light aurora-text-xs aurora-font-normal aurora-capitalize',
|
|
44
|
+
weekday: 'aurora-font-normal',
|
|
45
|
+
// Day cells
|
|
46
|
+
day: 'aurora-h-8 aurora-w-8 aurora-rounded-4 focus-visible:aurora-outline-none focus-visible:aurora-ring-2 focus-visible:aurora-ring-primary aurora-cursor-pointer hover:aurora-bg-hover active:aurora-bg-active',
|
|
47
|
+
day_button: 'aurora-w-full aurora-h-full',
|
|
48
|
+
selected: 'aurora-bg-inverse aurora-text-inverse hover:aurora-bg-inverse aurora-day-selected',
|
|
49
|
+
today: 'aurora-bg-primary-subtle [&.aurora-day-selected:not(.aurora-day-range-middle)]:!aurora-bg-inverse [&.aurora-day-selected:not(.aurora-day-range-middle)]:!aurora-text-inverse',
|
|
50
|
+
range_middle: '!aurora-bg-hover !aurora-text !aurora-rounded-0 first:!aurora-rounded-l-4 last:!aurora-rounded-r-4 aurora-day-range-middle ',
|
|
51
|
+
outside: 'aurora-text-inverse-subtle [&.aurora-day-selected]:aurora-text-inverse',
|
|
52
|
+
disabled: 'aurora-text-inverse-subtle aurora-opacity-50 !aurora-cursor-not-allowed',
|
|
53
|
+
hidden: 'aurora-hidden'
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { StyledDayPicker };
|
|
59
|
+
//# sourceMappingURL=styled_day_picker.js.map
|
package/build/esm/packages/aurora/src/components/calendar/styled_day_picker/styled_day_picker.js.map
ADDED
|
@@ -0,0 +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;"}
|
|
@@ -7,8 +7,9 @@ import { SelectGroupLabel } from './select_group_label.js';
|
|
|
7
7
|
import { SelectItem } from './select_item.js';
|
|
8
8
|
import { SelectSearch } from './select_search.js';
|
|
9
9
|
import { SelectUtils } from '../select_utils.js';
|
|
10
|
+
import { selectContentVariants } from './select_variants.js';
|
|
10
11
|
|
|
11
|
-
var _excluded = ["className", "options", "hasSearch", "searchPlaceholder", "search", "onSearch", "innerAdditionalContent", "position", "onScroll", "enableLocalSearch", "localSearchNotFoundContent"];
|
|
12
|
+
var _excluded = ["className", "options", "hasSearch", "searchPlaceholder", "search", "onSearch", "innerAdditionalContent", "position", "onScroll", "enableLocalSearch", "localSearchNotFoundContent", "hasMinDropdownWidth"];
|
|
12
13
|
var SelectContent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
13
14
|
var className = _ref.className,
|
|
14
15
|
options = _ref.options,
|
|
@@ -22,11 +23,14 @@ var SelectContent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
|
22
23
|
onScroll = _ref.onScroll,
|
|
23
24
|
enableLocalSearch = _ref.enableLocalSearch,
|
|
24
25
|
localSearchNotFoundContent = _ref.localSearchNotFoundContent,
|
|
26
|
+
hasMinDropdownWidth = _ref.hasMinDropdownWidth,
|
|
25
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
28
|
var localSearchVisibleItems = 0;
|
|
27
29
|
return /*#__PURE__*/React__default.createElement(Portal, null, /*#__PURE__*/React__default.createElement(Content, _objectSpread2({
|
|
28
30
|
ref: ref,
|
|
29
|
-
className: cn(
|
|
31
|
+
className: cn(selectContentVariants({
|
|
32
|
+
hasMinDropdownWidth: hasMinDropdownWidth
|
|
33
|
+
}), 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
34
|
position: position
|
|
31
35
|
}, props), /*#__PURE__*/React__default.createElement(Root, {
|
|
32
36
|
type: "auto",
|
|
@@ -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;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;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,17 +3,28 @@ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _
|
|
|
3
3
|
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
|
+
import { selectTriggerVariants } from './select_variants.js';
|
|
6
7
|
|
|
7
|
-
var _excluded = ["className", "hasError", "children", "clearValueButton"];
|
|
8
|
+
var _excluded = ["className", "hasError", "children", "clearValueButton", "hasBorder", "textSize", "height", "padding"];
|
|
8
9
|
var SelectTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
9
10
|
var className = _ref.className,
|
|
10
11
|
hasError = _ref.hasError,
|
|
11
12
|
children = _ref.children,
|
|
12
13
|
clearValueButton = _ref.clearValueButton,
|
|
14
|
+
_ref$hasBorder = _ref.hasBorder,
|
|
15
|
+
hasBorder = _ref$hasBorder === void 0 ? true : _ref$hasBorder,
|
|
16
|
+
textSize = _ref.textSize,
|
|
17
|
+
height = _ref.height,
|
|
18
|
+
padding = _ref.padding,
|
|
13
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
20
|
return /*#__PURE__*/React__default.createElement(Trigger, _objectSpread2({
|
|
15
21
|
ref: ref,
|
|
16
|
-
className: cn(
|
|
22
|
+
className: cn(selectTriggerVariants({
|
|
23
|
+
textSize: textSize,
|
|
24
|
+
height: height,
|
|
25
|
+
padding: padding,
|
|
26
|
+
border: hasBorder
|
|
27
|
+
}), {
|
|
17
28
|
'!aurora-border-danger aurora-border-2': hasError
|
|
18
29
|
}, className)
|
|
19
30
|
}, props), children, /*#__PURE__*/React__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;"}
|
|
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;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const selectTriggerVariants: (props?: ({
|
|
2
|
+
textSize?: "default" | "small" | null | undefined;
|
|
3
|
+
height?: "default" | "small" | null | undefined;
|
|
4
|
+
padding?: "default" | "small" | null | undefined;
|
|
5
|
+
border?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export declare const selectContentVariants: (props?: ({
|
|
8
|
+
hasMinDropdownWidth?: boolean | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cva } from '../../../../../../external/class-variance-authority/dist/index.mjs.js';
|
|
2
|
+
|
|
3
|
+
var selectTriggerVariants = cva('aurora-flex aurora-w-full aurora-items-center aurora-justify-between aurora-rounded-8 aurora-bg-neutral-0 focus-visible:focus disabled:aurora-cursor-not-allowed disabled:aurora-bg-subtle disabled:aurora-text-subtle-light [&>span]:aurora-text-ellipsis [&>span]:aurora-whitespace-nowrap [&>span]:aurora-overflow-hidden', {
|
|
4
|
+
variants: {
|
|
5
|
+
textSize: {
|
|
6
|
+
default: 'aurora-text-s',
|
|
7
|
+
small: 'aurora-text-xs'
|
|
8
|
+
},
|
|
9
|
+
height: {
|
|
10
|
+
default: 'aurora-h-10',
|
|
11
|
+
small: 'aurora-h-8'
|
|
12
|
+
},
|
|
13
|
+
padding: {
|
|
14
|
+
default: 'aurora-px-3 aurora-py-2',
|
|
15
|
+
small: 'aurora-px-1'
|
|
16
|
+
},
|
|
17
|
+
border: {
|
|
18
|
+
true: 'aurora-border aurora-border-input aurora-border-strong hover:aurora-border-extraStrong disabled:aurora-border-subtle focus-visible:aurora-border-active focus-visible:aurora-border-2 data-[state=open]:aurora-border-active data-[state=open]:aurora-border-2',
|
|
19
|
+
false: null
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
textSize: 'default',
|
|
24
|
+
height: 'default',
|
|
25
|
+
padding: 'default',
|
|
26
|
+
border: true
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var selectContentVariants = cva('aurora-min-w-[--radix-select-trigger-width] aurora-relative aurora-z-[1000] aurora-max-h-96 aurora-overflow-y-hidden aurora-rounded-8 aurora-border aurora-text-s aurora-bg-neutral-0 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', {
|
|
30
|
+
variants: {
|
|
31
|
+
hasMinDropdownWidth: {
|
|
32
|
+
true: 'aurora-w-[--radix-select-trigger-width] aurora-min-w-[20rem]',
|
|
33
|
+
false: null
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
hasMinDropdownWidth: true
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { selectContentVariants, selectTriggerVariants };
|
|
42
|
+
//# sourceMappingURL=select_variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,uEAA2E;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,7 +7,7 @@ import { SelectContent } from './components/select_content.js';
|
|
|
7
7
|
import { SelectTrigger } from './components/select_trigger.js';
|
|
8
8
|
import { useSelectValue } from './hooks/use_select_value.js';
|
|
9
9
|
|
|
10
|
-
var _excluded = ["children", "id", "value", "options", "disabled", "placeholder", "hasSearch", "searchPlaceholder", "hasClearValueButton", "innerAdditionalContent", "enableLocalSearch", "localSearchNotFoundContent", "errors", "onValueChange", "onScroll", "onSearch", "onClose", "hasError"];
|
|
10
|
+
var _excluded = ["children", "id", "value", "options", "disabled", "placeholder", "hasSearch", "searchPlaceholder", "hasClearValueButton", "innerAdditionalContent", "enableLocalSearch", "localSearchNotFoundContent", "errors", "onValueChange", "onScroll", "onSearch", "onClose", "hasError", "hasBorder", "hasMinDropdownWidth", "textSize", "height", "padding", "contentClassName", "className"];
|
|
11
11
|
var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
12
12
|
var _selectedOption$value;
|
|
13
13
|
var children = _ref.children,
|
|
@@ -28,6 +28,18 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
28
28
|
onSearch = _ref.onSearch,
|
|
29
29
|
onClose = _ref.onClose,
|
|
30
30
|
hasError = _ref.hasError,
|
|
31
|
+
_ref$hasBorder = _ref.hasBorder,
|
|
32
|
+
hasBorder = _ref$hasBorder === void 0 ? true : _ref$hasBorder,
|
|
33
|
+
_ref$hasMinDropdownWi = _ref.hasMinDropdownWidth,
|
|
34
|
+
hasMinDropdownWidth = _ref$hasMinDropdownWi === void 0 ? true : _ref$hasMinDropdownWi,
|
|
35
|
+
_ref$textSize = _ref.textSize,
|
|
36
|
+
textSize = _ref$textSize === void 0 ? 'default' : _ref$textSize,
|
|
37
|
+
_ref$height = _ref.height,
|
|
38
|
+
height = _ref$height === void 0 ? 'default' : _ref$height,
|
|
39
|
+
_ref$padding = _ref.padding,
|
|
40
|
+
padding = _ref$padding === void 0 ? 'default' : _ref$padding,
|
|
41
|
+
contentClassName = _ref.contentClassName,
|
|
42
|
+
className = _ref.className,
|
|
31
43
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
44
|
var _useSelectValue = useSelectValue({
|
|
33
45
|
value: value,
|
|
@@ -62,10 +74,14 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
62
74
|
disabled: disabled,
|
|
63
75
|
onOpenChange: handleOpenChange
|
|
64
76
|
}, props), /*#__PURE__*/React__default.createElement("div", {
|
|
65
|
-
className: "aurora-relative aurora-flex aurora-items-center aurora-flex-col"
|
|
77
|
+
className: "aurora-relative aurora-flex aurora-items-center aurora-flex-col aurora-text-xs"
|
|
66
78
|
}, /*#__PURE__*/React__default.createElement(SelectTrigger, {
|
|
67
79
|
id: id,
|
|
68
80
|
hasError: hasError || !!(errors !== null && errors !== void 0 && errors.length),
|
|
81
|
+
hasBorder: hasBorder,
|
|
82
|
+
textSize: textSize,
|
|
83
|
+
height: height,
|
|
84
|
+
padding: padding,
|
|
69
85
|
ref: ref,
|
|
70
86
|
clearValueButton: value && hasClearValueButton && onValueChange && (/*#__PURE__*/React__default.createElement("div", {
|
|
71
87
|
onPointerDown: function onPointerDown(e) {
|
|
@@ -77,7 +93,8 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
77
93
|
className: "aurora-w-5 aurora-h-5 aurora-flex aurora-items-center aurora-justify-center"
|
|
78
94
|
}, /*#__PURE__*/React__default.createElement(CloseCircleFillIcon, {
|
|
79
95
|
className: "aurora-h-4 aurora-w-4 aurora-cursor-pointer"
|
|
80
|
-
})))
|
|
96
|
+
}))),
|
|
97
|
+
className: className
|
|
81
98
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
82
99
|
className: cn('aurora-pointer-events-none aurora-select-none', showPlaceholder && 'aurora-text-subtle')
|
|
83
100
|
}, !showPlaceholder ? selectedOption.text : placeholder))), /*#__PURE__*/React__default.createElement(SelectContent, {
|
|
@@ -89,7 +106,9 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
89
106
|
onSearch: handleSearch,
|
|
90
107
|
onScroll: onScroll,
|
|
91
108
|
enableLocalSearch: enableLocalSearch,
|
|
92
|
-
localSearchNotFoundContent: localSearchNotFoundContent
|
|
109
|
+
localSearchNotFoundContent: localSearchNotFoundContent,
|
|
110
|
+
hasMinDropdownWidth: hasMinDropdownWidth,
|
|
111
|
+
className: contentClassName
|
|
93
112
|
}));
|
|
94
113
|
});
|
|
95
114
|
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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,6 +4,11 @@ import { TInputProps } from "../input/input_types";
|
|
|
4
4
|
export interface TSelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
|
|
5
5
|
hasError?: boolean;
|
|
6
6
|
clearValueButton?: ReactNode;
|
|
7
|
+
hasBorder?: boolean;
|
|
8
|
+
hasMinDropdownWidth?: boolean;
|
|
9
|
+
textSize?: 'default' | 'small';
|
|
10
|
+
height?: 'default' | 'small';
|
|
11
|
+
padding?: 'default' | 'small';
|
|
7
12
|
}
|
|
8
13
|
export declare type TSelectOption = {
|
|
9
14
|
text: string;
|
|
@@ -25,6 +30,7 @@ export interface TSelectContentProps extends React.ComponentPropsWithoutRef<type
|
|
|
25
30
|
onSearch?: (str: string) => void;
|
|
26
31
|
enableLocalSearch?: boolean;
|
|
27
32
|
localSearchNotFoundContent?: ReactNode;
|
|
33
|
+
hasMinDropdownWidth?: boolean;
|
|
28
34
|
}
|
|
29
35
|
export interface TSelectItemProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> {
|
|
30
36
|
isDisabled?: boolean;
|
|
@@ -32,6 +38,7 @@ export interface TSelectItemProps extends React.ComponentPropsWithoutRef<typeof
|
|
|
32
38
|
additionalInfo?: string;
|
|
33
39
|
}
|
|
34
40
|
export interface TSelectProps extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, 'defaultValue'> {
|
|
41
|
+
className?: string;
|
|
35
42
|
id: string;
|
|
36
43
|
options: TSelectOption[];
|
|
37
44
|
placeholder?: string;
|
|
@@ -46,6 +53,12 @@ export interface TSelectProps extends Omit<React.ComponentPropsWithoutRef<typeof
|
|
|
46
53
|
onScroll?: (event: React.UIEvent<HTMLElement>) => void;
|
|
47
54
|
onSearch?: (str: string) => void;
|
|
48
55
|
onClose?: () => void;
|
|
56
|
+
hasBorder?: boolean;
|
|
57
|
+
hasMinDropdownWidth?: boolean;
|
|
58
|
+
textSize?: 'default' | 'small';
|
|
59
|
+
height?: 'default' | 'small';
|
|
60
|
+
padding?: 'default' | 'small';
|
|
61
|
+
contentClassName?: string;
|
|
49
62
|
}
|
|
50
63
|
export interface TUseSelectValueProps {
|
|
51
64
|
value: string | undefined;
|
|
@@ -136,3 +136,4 @@ export { AnchorPresetsControl } from "./components/controls/anchor_presets_contr
|
|
|
136
136
|
export { ANCHOR_PRESETS_VALUES } from "./components/anchor_presets/anchor_presets_constants";
|
|
137
137
|
export { Resizable } from "./components/resizable/resizable";
|
|
138
138
|
export { fuzzySearch } from "./utilities/fuzzy_search";
|
|
139
|
+
export { Calendar } from "./components/calendar/calendar";
|
|
@@ -128,4 +128,5 @@ export { ANCHOR_PRESETS_VALUES } from './components/anchor_presets/anchor_preset
|
|
|
128
128
|
export { AnchorPresets } from './components/anchor_presets/anchor_presets.js';
|
|
129
129
|
export { AnchorPresetsControl } from './components/controls/anchor_presets_control/anchor_presets_control.js';
|
|
130
130
|
export { Resizable } from './components/resizable/resizable.js';
|
|
131
|
+
export { Calendar } from './components/calendar/calendar.js';
|
|
131
132
|
//# sourceMappingURL=index.js.map
|
|
@@ -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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|