@dreamcommerce/aurora 3.1.56 → 3.1.57-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/components/accordion/components/accordion_item.js +1 -1
- package/build/cjs/packages/aurora/src/components/accordion/components/accordion_trigger.js +5 -5
- package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker.js +3 -8
- package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js +56 -49
- package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/input/input.js +9 -5
- package/build/cjs/packages/aurora/src/components/input/input.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/input/input_variants.js +12 -0
- package/build/cjs/packages/aurora/src/components/input/input_variants.js.map +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_item.js +1 -1
- package/build/esm/packages/aurora/src/components/accordion/components/accordion_trigger.js +5 -5
- package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker.js +3 -8
- package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker.js.map +1 -1
- package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.d.ts +4 -0
- package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js +57 -50
- package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js.map +1 -1
- package/build/esm/packages/aurora/src/components/input/input.js +10 -6
- package/build/esm/packages/aurora/src/components/input/input.js.map +1 -1
- package/build/esm/packages/aurora/src/components/input/input_types.d.ts +2 -3
- package/build/esm/packages/aurora/src/components/input/input_types.js +1 -2
- package/build/esm/packages/aurora/src/components/input/input_types.js.map +1 -1
- package/build/esm/packages/aurora/src/components/input/input_variants.d.ts +3 -0
- package/build/esm/packages/aurora/src/components/input/input_variants.js +12 -1
- package/build/esm/packages/aurora/src/components/input/input_variants.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ var AccordionItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
14
14
|
props = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return /*#__PURE__*/React.createElement(index.Item, _rollupPluginBabelHelpers.objectSpread2({
|
|
16
16
|
ref: ref,
|
|
17
|
-
className: cn.cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0', _rollupPluginBabelHelpers.defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
17
|
+
className: cn.cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0 aurora-border-subtle', _rollupPluginBabelHelpers.defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
18
18
|
}, props));
|
|
19
19
|
});
|
|
20
20
|
AccordionItem.displayName = 'AccordionItem';
|
|
@@ -24,12 +24,12 @@ var AccordionTrigger = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
24
|
className: cn.cn('aurora-text-s aurora-font-semibold aurora-tracking', _rollupPluginBabelHelpers.defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
|
|
25
25
|
}, /*#__PURE__*/React.createElement(index.Trigger, _rollupPluginBabelHelpers.objectSpread2({
|
|
26
26
|
ref: ref,
|
|
27
|
-
className: cn.cn('aurora-flex aurora-items-center aurora-w-full aurora-gap-2 aurora-py-2 aurora-
|
|
28
|
-
}, props), icon ? icon : (/*#__PURE__*/React.createElement(arrow_right.ArrowRightIcon, {
|
|
29
|
-
color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.
|
|
27
|
+
className: cn.cn('aurora-flex aurora-items-center aurora-justify-between aurora-w-full aurora-gap-2 aurora-py-2 aurora-px-3 aurora-text-base aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _rollupPluginBabelHelpers.defineProperty({}, 'aurora-bg', !backgroundColor), className)
|
|
28
|
+
}, props), children, icon ? icon : (/*#__PURE__*/React.createElement(arrow_right.ArrowRightIcon, {
|
|
29
|
+
color: css_icon_color_tokens.CSS_ICON_COLOR_TOKENS_VALUES.inverseDisabled,
|
|
30
30
|
size: accordionContext.size === accordion_constants.ACCORDION_SIZES.default ? 24 : 20,
|
|
31
|
-
className: cn.cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
|
|
32
|
-
}))
|
|
31
|
+
className: cn.cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200 aurora-cursor-pointer')
|
|
32
|
+
}))));
|
|
33
33
|
});
|
|
34
34
|
AccordionTrigger.displayName = index.Trigger.displayName;
|
|
35
35
|
|
|
@@ -48,14 +48,9 @@ var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
48
48
|
isInternalChangeRef.current = false;
|
|
49
49
|
}, [parsedValue.date, parsedValue.time]);
|
|
50
50
|
var emitChange = React.useCallback(function (date, time) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(formattedValue);
|
|
55
|
-
} else {
|
|
56
|
-
isInternalChangeRef.current = true;
|
|
57
|
-
onChange === null || onChange === void 0 ? void 0 : onChange('');
|
|
58
|
-
}
|
|
51
|
+
var selectedDate = date instanceof Date ? date : undefined;
|
|
52
|
+
isInternalChangeRef.current = true;
|
|
53
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(date_time_picker_utils.DateTimePickerUtils.formatDateTimeToString(selectedDate, time));
|
|
59
54
|
}, [onChange]);
|
|
60
55
|
var handleDateChange = React.useCallback(function (date) {
|
|
61
56
|
setInternalDate(date);
|
package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
|
package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js
CHANGED
|
@@ -4,74 +4,81 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
6
|
|
|
7
|
+
var _DateTimePickerUtils;
|
|
7
8
|
var DateTimePickerUtils = /*#__PURE__*/_rollupPluginBabelHelpers.createClass(function DateTimePickerUtils() {
|
|
8
9
|
_rollupPluginBabelHelpers.classCallCheck(this, DateTimePickerUtils);
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
var parts = value.split(' ');
|
|
16
|
-
if (parts.length !== 2) return {
|
|
17
|
-
date: undefined,
|
|
18
|
-
time: undefined
|
|
19
|
-
};
|
|
20
|
-
var _parts = _rollupPluginBabelHelpers.slicedToArray(parts, 2),
|
|
21
|
-
datePart = _parts[0],
|
|
22
|
-
timePart = _parts[1];
|
|
23
|
-
var dateMatch = datePart.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
24
|
-
if (!dateMatch) return {
|
|
25
|
-
date: undefined,
|
|
26
|
-
time: undefined
|
|
27
|
-
};
|
|
11
|
+
_DateTimePickerUtils = DateTimePickerUtils;
|
|
12
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "parseDatePart", function (value) {
|
|
13
|
+
var dateMatch = value.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
14
|
+
if (!dateMatch) return undefined;
|
|
28
15
|
var year = parseInt(dateMatch[1], 10);
|
|
29
16
|
var month = parseInt(dateMatch[2], 10) - 1;
|
|
30
17
|
var day = parseInt(dateMatch[3], 10);
|
|
31
|
-
if (isNaN(year) || isNaN(month) || isNaN(day)) return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
if (isNaN(year) || isNaN(month) || isNaN(day)) return undefined;
|
|
19
|
+
var date = new Date(year, month, day);
|
|
20
|
+
if (isNaN(date.getTime())) return undefined;
|
|
21
|
+
if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) return undefined;
|
|
22
|
+
return date;
|
|
23
|
+
});
|
|
24
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "parseTimePart", function (value) {
|
|
25
|
+
var timeMatch = value.match(/^(\d{2}):(\d{2}):(\d{2})$/);
|
|
26
|
+
if (!timeMatch) return undefined;
|
|
40
27
|
var hour = parseInt(timeMatch[1], 10);
|
|
41
28
|
var minute = parseInt(timeMatch[2], 10);
|
|
42
29
|
var second = parseInt(timeMatch[3], 10);
|
|
43
|
-
if (isNaN(hour) || isNaN(minute) || isNaN(second)) return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (minute < 0 || minute > 59) return {
|
|
52
|
-
date: undefined,
|
|
53
|
-
time: undefined
|
|
54
|
-
};
|
|
55
|
-
if (second < 0 || second > 59) return {
|
|
56
|
-
date: undefined,
|
|
57
|
-
time: undefined
|
|
58
|
-
};
|
|
59
|
-
var date = new Date(year, month, day, hour, minute, second);
|
|
60
|
-
if (isNaN(date.getTime())) return {
|
|
30
|
+
if (isNaN(hour) || isNaN(minute) || isNaN(second)) return undefined;
|
|
31
|
+
if (hour < 0 || hour > 23) return undefined;
|
|
32
|
+
if (minute < 0 || minute > 59) return undefined;
|
|
33
|
+
if (second < 0 || second > 59) return undefined;
|
|
34
|
+
return "".concat(String(hour).padStart(2, '0'), ":").concat(String(minute).padStart(2, '0'), ":").concat(String(second).padStart(2, '0'));
|
|
35
|
+
});
|
|
36
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "parseDateTimeString", function (value) {
|
|
37
|
+
if (!value) return {
|
|
61
38
|
date: undefined,
|
|
62
39
|
time: undefined
|
|
63
40
|
};
|
|
41
|
+
var parts = value.trim().split(/\s+/);
|
|
42
|
+
var date;
|
|
43
|
+
var time;
|
|
44
|
+
var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(parts),
|
|
45
|
+
_step;
|
|
46
|
+
try {
|
|
47
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
48
|
+
var part = _step.value;
|
|
49
|
+
if (!date) date = _DateTimePickerUtils.parseDatePart(part);
|
|
50
|
+
if (!time) time = _DateTimePickerUtils.parseTimePart(part);
|
|
51
|
+
}
|
|
52
|
+
} catch (err) {
|
|
53
|
+
_iterator.e(err);
|
|
54
|
+
} finally {
|
|
55
|
+
_iterator.f();
|
|
56
|
+
}
|
|
64
57
|
return {
|
|
65
58
|
date: date,
|
|
66
|
-
time:
|
|
59
|
+
time: time
|
|
67
60
|
};
|
|
68
61
|
});
|
|
69
|
-
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "
|
|
70
|
-
if (!date
|
|
62
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "formatDateToString", function (date) {
|
|
63
|
+
if (!date) return '';
|
|
71
64
|
var year = date.getFullYear();
|
|
72
65
|
var month = String(date.getMonth() + 1).padStart(2, '0');
|
|
73
66
|
var day = String(date.getDate()).padStart(2, '0');
|
|
74
|
-
return "".concat(year, "-").concat(month, "-").concat(day
|
|
67
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
68
|
+
});
|
|
69
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "formatTimeToString", function (time) {
|
|
70
|
+
var _DateTimePickerUtils$;
|
|
71
|
+
if (!time) return '';
|
|
72
|
+
return (_DateTimePickerUtils$ = _DateTimePickerUtils.parseTimePart(time)) !== null && _DateTimePickerUtils$ !== void 0 ? _DateTimePickerUtils$ : '';
|
|
73
|
+
});
|
|
74
|
+
_rollupPluginBabelHelpers.defineProperty(DateTimePickerUtils, "formatDateTimeToString", function (date, time) {
|
|
75
|
+
var _DateTimePickerUtils$2;
|
|
76
|
+
var formattedDate = _DateTimePickerUtils.formatDateToString(date);
|
|
77
|
+
var formattedTime = (_DateTimePickerUtils$2 = _DateTimePickerUtils.parseTimePart(time !== null && time !== void 0 ? time : '')) !== null && _DateTimePickerUtils$2 !== void 0 ? _DateTimePickerUtils$2 : '';
|
|
78
|
+
if (formattedDate && formattedTime) return "".concat(formattedDate, " ").concat(formattedTime);
|
|
79
|
+
if (formattedDate) return formattedDate;
|
|
80
|
+
if (formattedTime) return formattedTime;
|
|
81
|
+
return '';
|
|
75
82
|
});
|
|
76
83
|
|
|
77
84
|
exports.DateTimePickerUtils = DateTimePickerUtils;
|
package/build/cjs/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.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;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;"}
|
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
|
-
var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "onChange", "onKeyDown", "onKeyUp"];
|
|
14
|
+
var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "inputSize", "onChange", "onKeyDown", "onKeyUp"];
|
|
15
15
|
var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, ref) {
|
|
16
16
|
var preElement = _ref.preElement,
|
|
17
17
|
postElement = _ref.postElement,
|
|
@@ -27,6 +27,8 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
27
27
|
readOnly = _ref.readOnly,
|
|
28
28
|
type = _ref.type,
|
|
29
29
|
hasCursorPointer = _ref.hasCursorPointer,
|
|
30
|
+
_ref$inputSize = _ref.inputSize,
|
|
31
|
+
inputSize = _ref$inputSize === void 0 ? 'md' : _ref$inputSize,
|
|
30
32
|
onChange = _ref.onChange,
|
|
31
33
|
onKeyDown = _ref.onKeyDown,
|
|
32
34
|
onKeyUp = _ref.onKeyUp,
|
|
@@ -37,9 +39,9 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
37
39
|
'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
|
|
38
40
|
'aurora-appearance-none': type === 'number'
|
|
39
41
|
}, className)
|
|
40
|
-
}, preElement &&
|
|
41
|
-
className:
|
|
42
|
-
}, preElement)
|
|
42
|
+
}, preElement && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
43
|
+
className: "aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2"
|
|
44
|
+
}, preElement), /*#__PURE__*/React__default['default'].createElement("input", _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, props), {}, {
|
|
43
45
|
ref: ref,
|
|
44
46
|
id: id,
|
|
45
47
|
name: name,
|
|
@@ -52,7 +54,9 @@ var Input = /*#__PURE__*/React__default['default'].forwardRef(function (_ref, re
|
|
|
52
54
|
onKeyDown: onKeyDown,
|
|
53
55
|
onKeyUp: onKeyUp,
|
|
54
56
|
type: type,
|
|
55
|
-
className: cn.cn(
|
|
57
|
+
className: cn.cn(input_variants.inputElementVariants({
|
|
58
|
+
inputSize: inputSize
|
|
59
|
+
}), {
|
|
56
60
|
'aurora-cursor-pointer': hasCursorPointer
|
|
57
61
|
})
|
|
58
62
|
})), postElement && /*#__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;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;"}
|
|
@@ -5,6 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var index = require('../../../../../external/class-variance-authority/dist/index.mjs.js');
|
|
6
6
|
|
|
7
7
|
var inputVariants = index.cva('aurora-relative aurora-flex aurora-items-center aurora-rounded-6 focus aurora-border aurora-bg aurora-text-s aurora-placeholder-neutral-500 aurora-text aurora-border-strong hover:aurora-border-extraStrong active:aurora-border-active disabled:aurora-opacity-50 aurora-w-full');
|
|
8
|
+
var inputElementVariants = index.cva('aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
|
|
9
|
+
variants: {
|
|
10
|
+
inputSize: {
|
|
11
|
+
sm: 'aurora-h-6',
|
|
12
|
+
md: 'aurora-h-10'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
inputSize: 'md'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
8
19
|
|
|
20
|
+
exports.inputElementVariants = inputElementVariants;
|
|
9
21
|
exports.inputVariants = inputVariants;
|
|
10
22
|
//# sourceMappingURL=input_variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -10,7 +10,7 @@ var AccordionItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
10
10
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/createElement(Item, _objectSpread2({
|
|
12
12
|
ref: ref,
|
|
13
|
-
className: cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0', _defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
13
|
+
className: cn('aurora-border-t last:aurora-border-b data-[state=open]:aurora-border-b-0 aurora-border-subtle', _defineProperty({}, "aurora-border-".concat(borderStyle), !!borderStyle), className)
|
|
14
14
|
}, props));
|
|
15
15
|
});
|
|
16
16
|
AccordionItem.displayName = 'AccordionItem';
|
|
@@ -20,12 +20,12 @@ var AccordionTrigger = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
20
20
|
className: cn('aurora-text-s aurora-font-semibold aurora-tracking', _defineProperty({}, "aurora-bg-".concat(backgroundColor), !!backgroundColor))
|
|
21
21
|
}, /*#__PURE__*/createElement(Trigger2, _objectSpread2({
|
|
22
22
|
ref: ref,
|
|
23
|
-
className: cn('aurora-flex aurora-items-center aurora-w-full aurora-gap-2 aurora-py-2 aurora-
|
|
24
|
-
}, props), icon ? icon : (/*#__PURE__*/createElement(ArrowRightIcon, {
|
|
25
|
-
color: CSS_ICON_COLOR_TOKENS_VALUES.
|
|
23
|
+
className: cn('aurora-flex aurora-items-center aurora-justify-between aurora-w-full aurora-gap-2 aurora-py-2 aurora-px-3 aurora-text-base aurora-font-semibold aurora-transition-all [&[data-state=open]>svg]:aurora-rotate-90', _defineProperty({}, 'aurora-bg', !backgroundColor), className)
|
|
24
|
+
}, props), children, icon ? icon : (/*#__PURE__*/createElement(ArrowRightIcon, {
|
|
25
|
+
color: CSS_ICON_COLOR_TOKENS_VALUES.inverseDisabled,
|
|
26
26
|
size: accordionContext.size === ACCORDION_SIZES.default ? 24 : 20,
|
|
27
|
-
className: cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200')
|
|
28
|
-
}))
|
|
27
|
+
className: cn('aurora-shrink-0 aurora-text-muted-foreground aurora-transition-transform aurora-duration-200 aurora-cursor-pointer')
|
|
28
|
+
}))));
|
|
29
29
|
});
|
|
30
30
|
AccordionTrigger.displayName = Trigger2.displayName;
|
|
31
31
|
|
|
@@ -40,14 +40,9 @@ var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
40
40
|
isInternalChangeRef.current = false;
|
|
41
41
|
}, [parsedValue.date, parsedValue.time]);
|
|
42
42
|
var emitChange = useCallback(function (date, time) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(formattedValue);
|
|
47
|
-
} else {
|
|
48
|
-
isInternalChangeRef.current = true;
|
|
49
|
-
onChange === null || onChange === void 0 ? void 0 : onChange('');
|
|
50
|
-
}
|
|
43
|
+
var selectedDate = date instanceof Date ? date : undefined;
|
|
44
|
+
isInternalChangeRef.current = true;
|
|
45
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(DateTimePickerUtils.formatDateTimeToString(selectedDate, time));
|
|
51
46
|
}, [onChange]);
|
|
52
47
|
var handleDateChange = useCallback(function (date) {
|
|
53
48
|
setInternalDate(date);
|
package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;"}
|
package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare class DateTimePickerUtils {
|
|
2
|
+
private static parseDatePart;
|
|
3
|
+
private static parseTimePart;
|
|
2
4
|
static parseDateTimeString: (value: string) => {
|
|
3
5
|
date: Date | undefined;
|
|
4
6
|
time: string | undefined;
|
|
5
7
|
};
|
|
8
|
+
static formatDateToString: (date: Date | undefined) => string;
|
|
9
|
+
static formatTimeToString: (time: string | undefined) => string;
|
|
6
10
|
static formatDateTimeToString: (date: Date | undefined, time: string | undefined) => string;
|
|
7
11
|
}
|
package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.js
CHANGED
|
@@ -1,73 +1,80 @@
|
|
|
1
|
-
import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty,
|
|
1
|
+
import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, createForOfIteratorHelper as _createForOfIteratorHelper } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
|
|
3
|
+
var _DateTimePickerUtils;
|
|
3
4
|
var DateTimePickerUtils = /*#__PURE__*/_createClass(function DateTimePickerUtils() {
|
|
4
5
|
_classCallCheck(this, DateTimePickerUtils);
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
var parts = value.split(' ');
|
|
12
|
-
if (parts.length !== 2) return {
|
|
13
|
-
date: undefined,
|
|
14
|
-
time: undefined
|
|
15
|
-
};
|
|
16
|
-
var _parts = _slicedToArray(parts, 2),
|
|
17
|
-
datePart = _parts[0],
|
|
18
|
-
timePart = _parts[1];
|
|
19
|
-
var dateMatch = datePart.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
20
|
-
if (!dateMatch) return {
|
|
21
|
-
date: undefined,
|
|
22
|
-
time: undefined
|
|
23
|
-
};
|
|
7
|
+
_DateTimePickerUtils = DateTimePickerUtils;
|
|
8
|
+
_defineProperty(DateTimePickerUtils, "parseDatePart", function (value) {
|
|
9
|
+
var dateMatch = value.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
10
|
+
if (!dateMatch) return undefined;
|
|
24
11
|
var year = parseInt(dateMatch[1], 10);
|
|
25
12
|
var month = parseInt(dateMatch[2], 10) - 1;
|
|
26
13
|
var day = parseInt(dateMatch[3], 10);
|
|
27
|
-
if (isNaN(year) || isNaN(month) || isNaN(day)) return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
if (isNaN(year) || isNaN(month) || isNaN(day)) return undefined;
|
|
15
|
+
var date = new Date(year, month, day);
|
|
16
|
+
if (isNaN(date.getTime())) return undefined;
|
|
17
|
+
if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) return undefined;
|
|
18
|
+
return date;
|
|
19
|
+
});
|
|
20
|
+
_defineProperty(DateTimePickerUtils, "parseTimePart", function (value) {
|
|
21
|
+
var timeMatch = value.match(/^(\d{2}):(\d{2}):(\d{2})$/);
|
|
22
|
+
if (!timeMatch) return undefined;
|
|
36
23
|
var hour = parseInt(timeMatch[1], 10);
|
|
37
24
|
var minute = parseInt(timeMatch[2], 10);
|
|
38
25
|
var second = parseInt(timeMatch[3], 10);
|
|
39
|
-
if (isNaN(hour) || isNaN(minute) || isNaN(second)) return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (minute < 0 || minute > 59) return {
|
|
48
|
-
date: undefined,
|
|
49
|
-
time: undefined
|
|
50
|
-
};
|
|
51
|
-
if (second < 0 || second > 59) return {
|
|
52
|
-
date: undefined,
|
|
53
|
-
time: undefined
|
|
54
|
-
};
|
|
55
|
-
var date = new Date(year, month, day, hour, minute, second);
|
|
56
|
-
if (isNaN(date.getTime())) return {
|
|
26
|
+
if (isNaN(hour) || isNaN(minute) || isNaN(second)) return undefined;
|
|
27
|
+
if (hour < 0 || hour > 23) return undefined;
|
|
28
|
+
if (minute < 0 || minute > 59) return undefined;
|
|
29
|
+
if (second < 0 || second > 59) return undefined;
|
|
30
|
+
return "".concat(String(hour).padStart(2, '0'), ":").concat(String(minute).padStart(2, '0'), ":").concat(String(second).padStart(2, '0'));
|
|
31
|
+
});
|
|
32
|
+
_defineProperty(DateTimePickerUtils, "parseDateTimeString", function (value) {
|
|
33
|
+
if (!value) return {
|
|
57
34
|
date: undefined,
|
|
58
35
|
time: undefined
|
|
59
36
|
};
|
|
37
|
+
var parts = value.trim().split(/\s+/);
|
|
38
|
+
var date;
|
|
39
|
+
var time;
|
|
40
|
+
var _iterator = _createForOfIteratorHelper(parts),
|
|
41
|
+
_step;
|
|
42
|
+
try {
|
|
43
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
44
|
+
var part = _step.value;
|
|
45
|
+
if (!date) date = _DateTimePickerUtils.parseDatePart(part);
|
|
46
|
+
if (!time) time = _DateTimePickerUtils.parseTimePart(part);
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_iterator.e(err);
|
|
50
|
+
} finally {
|
|
51
|
+
_iterator.f();
|
|
52
|
+
}
|
|
60
53
|
return {
|
|
61
54
|
date: date,
|
|
62
|
-
time:
|
|
55
|
+
time: time
|
|
63
56
|
};
|
|
64
57
|
});
|
|
65
|
-
_defineProperty(DateTimePickerUtils, "
|
|
66
|
-
if (!date
|
|
58
|
+
_defineProperty(DateTimePickerUtils, "formatDateToString", function (date) {
|
|
59
|
+
if (!date) return '';
|
|
67
60
|
var year = date.getFullYear();
|
|
68
61
|
var month = String(date.getMonth() + 1).padStart(2, '0');
|
|
69
62
|
var day = String(date.getDate()).padStart(2, '0');
|
|
70
|
-
return "".concat(year, "-").concat(month, "-").concat(day
|
|
63
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
64
|
+
});
|
|
65
|
+
_defineProperty(DateTimePickerUtils, "formatTimeToString", function (time) {
|
|
66
|
+
var _DateTimePickerUtils$;
|
|
67
|
+
if (!time) return '';
|
|
68
|
+
return (_DateTimePickerUtils$ = _DateTimePickerUtils.parseTimePart(time)) !== null && _DateTimePickerUtils$ !== void 0 ? _DateTimePickerUtils$ : '';
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(DateTimePickerUtils, "formatDateTimeToString", function (date, time) {
|
|
71
|
+
var _DateTimePickerUtils$2;
|
|
72
|
+
var formattedDate = _DateTimePickerUtils.formatDateToString(date);
|
|
73
|
+
var formattedTime = (_DateTimePickerUtils$2 = _DateTimePickerUtils.parseTimePart(time !== null && time !== void 0 ? time : '')) !== null && _DateTimePickerUtils$2 !== void 0 ? _DateTimePickerUtils$2 : '';
|
|
74
|
+
if (formattedDate && formattedTime) return "".concat(formattedDate, " ").concat(formattedTime);
|
|
75
|
+
if (formattedDate) return formattedDate;
|
|
76
|
+
if (formattedTime) return formattedTime;
|
|
77
|
+
return '';
|
|
71
78
|
});
|
|
72
79
|
|
|
73
80
|
export { DateTimePickerUtils };
|
package/build/esm/packages/aurora/src/components/date_and_time_picker/date_time_picker_utils.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;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;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import { cn } from '../../utilities/cn.js';
|
|
4
|
-
import { inputVariants } from './input_variants.js';
|
|
4
|
+
import { inputVariants, inputElementVariants } from './input_variants.js';
|
|
5
5
|
|
|
6
|
-
var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "onChange", "onKeyDown", "onKeyUp"];
|
|
6
|
+
var _excluded = ["preElement", "postElement", "errors", "className", "id", "name", "value", "defaultValue", "placeholder", "disabled", "readOnly", "type", "hasCursorPointer", "inputSize", "onChange", "onKeyDown", "onKeyUp"];
|
|
7
7
|
var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
8
8
|
var preElement = _ref.preElement,
|
|
9
9
|
postElement = _ref.postElement,
|
|
@@ -19,6 +19,8 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
19
19
|
readOnly = _ref.readOnly,
|
|
20
20
|
type = _ref.type,
|
|
21
21
|
hasCursorPointer = _ref.hasCursorPointer,
|
|
22
|
+
_ref$inputSize = _ref.inputSize,
|
|
23
|
+
inputSize = _ref$inputSize === void 0 ? 'md' : _ref$inputSize,
|
|
22
24
|
onChange = _ref.onChange,
|
|
23
25
|
onKeyDown = _ref.onKeyDown,
|
|
24
26
|
onKeyUp = _ref.onKeyUp,
|
|
@@ -29,9 +31,9 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
29
31
|
'aurora-bg-subtle aurora-text-subtle-light aurora-pointer-events-none aurora-cursor-not-allowed': disabled,
|
|
30
32
|
'aurora-appearance-none': type === 'number'
|
|
31
33
|
}, className)
|
|
32
|
-
}, preElement &&
|
|
33
|
-
className:
|
|
34
|
-
}, preElement)
|
|
34
|
+
}, preElement && /*#__PURE__*/React__default.createElement("div", {
|
|
35
|
+
className: "aurora-flex aurora-h-full aurora-items-center aurora-pointer-events-none aurora-pl-2"
|
|
36
|
+
}, preElement), /*#__PURE__*/React__default.createElement("input", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
35
37
|
ref: ref,
|
|
36
38
|
id: id,
|
|
37
39
|
name: name,
|
|
@@ -44,7 +46,9 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
44
46
|
onKeyDown: onKeyDown,
|
|
45
47
|
onKeyUp: onKeyUp,
|
|
46
48
|
type: type,
|
|
47
|
-
className: cn(
|
|
49
|
+
className: cn(inputElementVariants({
|
|
50
|
+
inputSize: inputSize
|
|
51
|
+
}), {
|
|
48
52
|
'aurora-cursor-pointer': hasCursorPointer
|
|
49
53
|
})
|
|
50
54
|
})), postElement && /*#__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;AACA;AACA;AACA;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;"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import { inputVariants } from './input_variants';
|
|
4
|
-
export interface TInputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
2
|
+
export interface TInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
3
|
preElement?: React.ReactNode;
|
|
6
4
|
postElement?: React.ReactNode;
|
|
7
5
|
errors?: string | string[];
|
|
8
6
|
hasCursorPointer?: boolean;
|
|
9
7
|
colorName?: string;
|
|
10
8
|
primary?: boolean;
|
|
9
|
+
inputSize?: 'sm' | 'md';
|
|
11
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input_types.js","sourceRoot":"","sources":["../../../../../../../src/components/input/input_types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input_types.js","sourceRoot":"","sources":["../../../../../../../src/components/input/input_types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1,4 @@
|
|
|
1
1
|
export declare const inputVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const inputElementVariants: (props?: ({
|
|
3
|
+
inputSize?: "sm" | "md" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { cva } from '../../../../../external/class-variance-authority/dist/index.mjs.js';
|
|
2
2
|
|
|
3
3
|
var inputVariants = cva('aurora-relative aurora-flex aurora-items-center aurora-rounded-6 focus aurora-border aurora-bg aurora-text-s aurora-placeholder-neutral-500 aurora-text aurora-border-strong hover:aurora-border-extraStrong active:aurora-border-active disabled:aurora-opacity-50 aurora-w-full');
|
|
4
|
+
var inputElementVariants = cva('aurora-w-full focus:aurora-outline-none focus:aurora-shadow-none aurora-px-2 aurora-rounded-6', {
|
|
5
|
+
variants: {
|
|
6
|
+
inputSize: {
|
|
7
|
+
sm: 'aurora-h-6',
|
|
8
|
+
md: 'aurora-h-10'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
inputSize: 'md'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
4
15
|
|
|
5
|
-
export { inputVariants };
|
|
16
|
+
export { inputElementVariants, inputVariants };
|
|
6
17
|
//# sourceMappingURL=input_variants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,oBAAoB,oEAAwE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|