@mirai/ui 2.0.43 → 2.1.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/components/Action/Action.js +24 -30
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/Action.stories.js +3 -6
- package/build/components/Action/Action.stories.js.map +1 -1
- package/build/components/Action/index.js +1 -1
- package/build/components/Action/index.js.map +1 -1
- package/build/components/Button/Button.js +32 -39
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/Button.stories.js +25 -48
- package/build/components/Button/Button.stories.js.map +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Button/index.js.map +1 -1
- package/build/components/Calendar/Calendar.Month.js +45 -57
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Week.js +54 -83
- package/build/components/Calendar/Calendar.Week.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +15 -15
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.constants.js +2 -4
- package/build/components/Calendar/Calendar.constants.js.map +1 -1
- package/build/components/Calendar/Calendar.js +110 -162
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/Calendar.stories.js +75 -90
- package/build/components/Calendar/Calendar.stories.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js +2 -2
- package/build/components/Calendar/helpers/getFirstDateOfMonth.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js +6 -6
- package/build/components/Calendar/helpers/getFirstDateOfWeek.js.map +1 -1
- package/build/components/Calendar/helpers/getFirstDayOfWeek.js +5 -5
- package/build/components/Calendar/helpers/getFirstDayOfWeek.js.map +1 -1
- package/build/components/Calendar/helpers/getHeader.js +6 -6
- package/build/components/Calendar/helpers/getHeader.js.map +1 -1
- package/build/components/Calendar/helpers/getMonthRef.js +9 -8
- package/build/components/Calendar/helpers/getMonthRef.js.map +1 -1
- package/build/components/Calendar/helpers/getScrollTo.js +8 -15
- package/build/components/Calendar/helpers/getScrollTo.js.map +1 -1
- package/build/components/Calendar/helpers/getToday.js +1 -3
- package/build/components/Calendar/helpers/getToday.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekDays.js +8 -8
- package/build/components/Calendar/helpers/getWeekDays.js.map +1 -1
- package/build/components/Calendar/helpers/getWeekNumber.js +3 -3
- package/build/components/Calendar/helpers/getWeekNumber.js.map +1 -1
- package/build/components/Calendar/helpers/index.js +9 -9
- package/build/components/Calendar/helpers/index.js.map +1 -1
- package/build/components/Calendar/index.js +1 -1
- package/build/components/Calendar/index.js.map +1 -1
- package/build/components/Form/Form.constants.js +5 -10
- package/build/components/Form/Form.constants.js.map +1 -1
- package/build/components/Form/Form.js +86 -118
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/Form.stories.js +47 -83
- package/build/components/Form/Form.stories.js.map +1 -1
- package/build/components/Form/helpers/getChildrenErrors.js +18 -22
- package/build/components/Form/helpers/getChildrenErrors.js.map +1 -1
- package/build/components/Form/helpers/getChildrenValues.js +15 -22
- package/build/components/Form/helpers/getChildrenValues.js.map +1 -1
- package/build/components/Form/helpers/getField.js +5 -4
- package/build/components/Form/helpers/getField.js.map +1 -1
- package/build/components/Form/helpers/groupState.js +8 -10
- package/build/components/Form/helpers/groupState.js.map +1 -1
- package/build/components/Form/helpers/index.js +4 -4
- package/build/components/Form/helpers/index.js.map +1 -1
- package/build/components/Form/index.js +1 -1
- package/build/components/Form/index.js.map +1 -1
- package/build/components/InputDate/InputDate.js +23 -38
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/InputDate.stories.js +18 -34
- package/build/components/InputDate/InputDate.stories.js.map +1 -1
- package/build/components/InputDate/helpers/formatValue.js +11 -13
- package/build/components/InputDate/helpers/formatValue.js.map +1 -1
- package/build/components/InputDate/helpers/index.js +1 -1
- package/build/components/InputDate/helpers/index.js.map +1 -1
- package/build/components/InputDate/index.js +1 -1
- package/build/components/InputDate/index.js.map +1 -1
- package/build/components/InputNumber/InputNumber.js +31 -44
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/InputNumber.stories.js +8 -20
- package/build/components/InputNumber/InputNumber.stories.js.map +1 -1
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/InputNumber/index.js.map +1 -1
- package/build/components/InputOption/InputOption.constants.js +3 -6
- package/build/components/InputOption/InputOption.constants.js.map +1 -1
- package/build/components/InputOption/InputOption.js +34 -38
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/InputOption.stories.js +8 -20
- package/build/components/InputOption/InputOption.stories.js.map +1 -1
- package/build/components/InputOption/index.js +2 -2
- package/build/components/InputOption/index.js.map +1 -1
- package/build/components/InputPhone/InputPhone.js +99 -143
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/InputPhone.stories.js +22 -45
- package/build/components/InputPhone/InputPhone.stories.js.map +1 -1
- package/build/components/InputPhone/helpers/index.js +2 -2
- package/build/components/InputPhone/helpers/index.js.map +1 -1
- package/build/components/InputPhone/helpers/parseValue.js +8 -17
- package/build/components/InputPhone/helpers/parseValue.js.map +1 -1
- package/build/components/InputPhone/helpers/sanitizePrefixes.js +4 -12
- package/build/components/InputPhone/helpers/sanitizePrefixes.js.map +1 -1
- package/build/components/InputPhone/index.js +1 -1
- package/build/components/InputPhone/index.js.map +1 -1
- package/build/components/InputSelect/InputSelect.js +47 -70
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/InputSelect.stories.js +12 -26
- package/build/components/InputSelect/InputSelect.stories.js.map +1 -1
- package/build/components/InputSelect/index.js +1 -1
- package/build/components/InputSelect/index.js.map +1 -1
- package/build/components/InputSelect/partials/InputSelect.Expand.js +3 -3
- package/build/components/InputSelect/partials/InputSelect.Expand.js.map +1 -1
- package/build/components/InputSelect/partials/index.js +1 -1
- package/build/components/InputSelect/partials/index.js.map +1 -1
- package/build/components/InputText/InputText.js +54 -87
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/InputText.stories.js +17 -36
- package/build/components/InputText/InputText.stories.js.map +1 -1
- package/build/components/InputText/index.js +1 -1
- package/build/components/InputText/index.js.map +1 -1
- package/build/components/InputText/partials/InputText.Hint.js +8 -9
- package/build/components/InputText/partials/InputText.Hint.js.map +1 -1
- package/build/components/InputText/partials/InputText.IconState.js +10 -8
- package/build/components/InputText/partials/InputText.IconState.js.map +1 -1
- package/build/components/InputText/partials/InputText.Label.js +13 -15
- package/build/components/InputText/partials/InputText.Label.js.map +1 -1
- package/build/components/InputText/partials/index.js +3 -3
- package/build/components/InputText/partials/index.js.map +1 -1
- package/build/components/Menu/Menu.Option.js +14 -15
- package/build/components/Menu/Menu.Option.js.map +1 -1
- package/build/components/Menu/Menu.js +30 -41
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/Menu.stories.js +9 -23
- package/build/components/Menu/Menu.stories.js.map +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/Menu/index.js.map +1 -1
- package/build/components/Modal/Modal.constants.js +2 -4
- package/build/components/Modal/Modal.constants.js.map +1 -1
- package/build/components/Modal/Modal.js +70 -103
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/Modal.stories.js +15 -36
- package/build/components/Modal/Modal.stories.js.map +1 -1
- package/build/components/Modal/index.js +2 -2
- package/build/components/Modal/index.js.map +1 -1
- package/build/components/Notification/Notification.js +24 -26
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/Notification.stories.js +14 -17
- package/build/components/Notification/Notification.stories.js.map +1 -1
- package/build/components/Notification/index.js +1 -1
- package/build/components/Notification/index.js.map +1 -1
- package/build/components/Progress/Progress.js +11 -15
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/Progress.stories.js +4 -7
- package/build/components/Progress/Progress.stories.js.map +1 -1
- package/build/components/Progress/index.js +1 -1
- package/build/components/Progress/index.js.map +1 -1
- package/build/components/Slider/Slider.Item.js +17 -25
- package/build/components/Slider/Slider.Item.js.map +1 -1
- package/build/components/Slider/Slider.constants.js +2 -4
- package/build/components/Slider/Slider.constants.js.map +1 -1
- package/build/components/Slider/Slider.js +78 -130
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/Slider.stories.js +25 -30
- package/build/components/Slider/Slider.stories.js.map +1 -1
- package/build/components/Slider/index.js +1 -1
- package/build/components/Slider/index.js.map +1 -1
- package/build/components/Table/Table.ColumnFilter.js +77 -116
- package/build/components/Table/Table.ColumnFilter.js.map +1 -1
- package/build/components/Table/Table.Filter.js +31 -41
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +48 -65
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.constants.js +4 -7
- package/build/components/Table/Table.constants.js.map +1 -1
- package/build/components/Table/Table.js +96 -125
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/Table.stories.js +38 -70
- package/build/components/Table/Table.stories.js.map +1 -1
- package/build/components/Table/helpers/index.js +2 -2
- package/build/components/Table/helpers/index.js.map +1 -1
- package/build/components/Table/helpers/select.js +54 -68
- package/build/components/Table/helpers/select.js.map +1 -1
- package/build/components/Table/helpers/storage.js +5 -6
- package/build/components/Table/helpers/storage.js.map +1 -1
- package/build/components/Table/index.js +1 -1
- package/build/components/Table/index.js.map +1 -1
- package/build/components/Tooltip/Tooltip.js +63 -84
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/Tooltip.stories.js +87 -100
- package/build/components/Tooltip/Tooltip.stories.js.map +1 -1
- package/build/components/Tooltip/helpers/index.js +1 -1
- package/build/components/Tooltip/helpers/index.js.map +1 -1
- package/build/components/Tooltip/helpers/isPressableInstance.js +6 -5
- package/build/components/Tooltip/helpers/isPressableInstance.js.map +1 -1
- package/build/components/Tooltip/index.js +1 -1
- package/build/components/Tooltip/index.js.map +1 -1
- package/build/components/components.customElements.js.map +1 -1
- package/build/components/index.js +17 -17
- package/build/components/index.js.map +1 -1
- package/build/helpers/CustomElement.js +9 -29
- package/build/helpers/CustomElement.js.map +1 -1
- package/build/helpers/getIconState.js +6 -5
- package/build/helpers/getIconState.js.map +1 -1
- package/build/helpers/getInputDateErrors.js +10 -10
- package/build/helpers/getInputDateErrors.js.map +1 -1
- package/build/helpers/getInputErrors.js +25 -28
- package/build/helpers/getInputErrors.js.map +1 -1
- package/build/helpers/getInputPhoneErrors.js +11 -13
- package/build/helpers/getInputPhoneErrors.js.map +1 -1
- package/build/helpers/getNavigator.js +10 -10
- package/build/helpers/getNavigator.js.map +1 -1
- package/build/helpers/index.js +9 -9
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/isJest.js +4 -6
- package/build/helpers/isJest.js.map +1 -1
- package/build/helpers/isPlaywright.js +3 -4
- package/build/helpers/isPlaywright.js.map +1 -1
- package/build/helpers/isValidDate.js +21 -38
- package/build/helpers/isValidDate.js.map +1 -1
- package/build/helpers/isValidEmail.js +3 -3
- package/build/helpers/isValidEmail.js.map +1 -1
- package/build/helpers/isValidPhone.js +9 -8
- package/build/helpers/isValidPhone.js.map +1 -1
- package/build/helpers/styles.js +3 -7
- package/build/helpers/styles.js.map +1 -1
- package/build/hooks/helpers/getResolution.js +7 -8
- package/build/hooks/helpers/getResolution.js.map +1 -1
- package/build/hooks/helpers/index.js +2 -2
- package/build/hooks/helpers/index.js.map +1 -1
- package/build/hooks/helpers/sanitizePx.js +1 -3
- package/build/hooks/helpers/sanitizePx.js.map +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/useDevice.js +21 -39
- package/build/hooks/useDevice.js.map +1 -1
- package/build/hooks/useDevice.stories.js +7 -16
- package/build/hooks/useDevice.stories.js.map +1 -1
- package/build/index.js +5 -5
- package/build/index.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.js +18 -18
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/Checkbox.stories.js +8 -20
- package/build/primitives/Checkbox/Checkbox.stories.js.map +1 -1
- package/build/primitives/Checkbox/index.js +1 -1
- package/build/primitives/Checkbox/index.js.map +1 -1
- package/build/primitives/Icon/Icon.constants.js +1 -2
- package/build/primitives/Icon/Icon.constants.js.map +1 -1
- package/build/primitives/Icon/Icon.js +34 -41
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/Icon.stories.js +8 -10
- package/build/primitives/Icon/Icon.stories.js.map +1 -1
- package/build/primitives/Icon/index.js +2 -2
- package/build/primitives/Icon/index.js.map +1 -1
- package/build/primitives/Input/Input.js +49 -63
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Input/Input.stories.js +14 -29
- package/build/primitives/Input/Input.stories.js.map +1 -1
- package/build/primitives/Input/helpers/index.js +1 -1
- package/build/primitives/Input/helpers/index.js.map +1 -1
- package/build/primitives/Input/helpers/parseValue.js +5 -5
- package/build/primitives/Input/helpers/parseValue.js.map +1 -1
- package/build/primitives/Input/index.js +1 -1
- package/build/primitives/Input/index.js.map +1 -1
- package/build/primitives/Layer/Layer.js +79 -93
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/Layer.stories.js +10 -13
- package/build/primitives/Layer/Layer.stories.js.map +1 -1
- package/build/primitives/Layer/LayerContent.js +5 -3
- package/build/primitives/Layer/LayerContent.js.map +1 -1
- package/build/primitives/Layer/helpers/getElementLayout.js +18 -15
- package/build/primitives/Layer/helpers/getElementLayout.js.map +1 -1
- package/build/primitives/Layer/helpers/getLayerPosition.js +66 -69
- package/build/primitives/Layer/helpers/getLayerPosition.js.map +1 -1
- package/build/primitives/Layer/helpers/getModalParent.js +10 -9
- package/build/primitives/Layer/helpers/getModalParent.js.map +1 -1
- package/build/primitives/Layer/helpers/getScrollParent.js +4 -3
- package/build/primitives/Layer/helpers/getScrollParent.js.map +1 -1
- package/build/primitives/Layer/helpers/index.js +5 -5
- package/build/primitives/Layer/helpers/index.js.map +1 -1
- package/build/primitives/Layer/helpers/isComponentFixed.js +8 -19
- package/build/primitives/Layer/helpers/isComponentFixed.js.map +1 -1
- package/build/primitives/Layer/index.js +2 -2
- package/build/primitives/Layer/index.js.map +1 -1
- package/build/primitives/Pressable/Pressable.constants.js +1 -2
- package/build/primitives/Pressable/Pressable.constants.js.map +1 -1
- package/build/primitives/Pressable/Pressable.js +34 -44
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/Pressable.stories.js +5 -8
- package/build/primitives/Pressable/Pressable.stories.js.map +1 -1
- package/build/primitives/Pressable/index.js +1 -1
- package/build/primitives/Pressable/index.js.map +1 -1
- package/build/primitives/Primitive/Primitive.constants.js +4 -8
- package/build/primitives/Primitive/Primitive.constants.js.map +1 -1
- package/build/primitives/Primitive/Primitive.js +20 -28
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/Primitive.stories.js +7 -10
- package/build/primitives/Primitive/Primitive.stories.js.map +1 -1
- package/build/primitives/Primitive/helpers/getProps.js +8 -17
- package/build/primitives/Primitive/helpers/getProps.js.map +1 -1
- package/build/primitives/Primitive/helpers/getTag.js +4 -4
- package/build/primitives/Primitive/helpers/getTag.js.map +1 -1
- package/build/primitives/Primitive/helpers/index.js +2 -2
- package/build/primitives/Primitive/helpers/index.js.map +1 -1
- package/build/primitives/Primitive/index.js +1 -1
- package/build/primitives/Primitive/index.js.map +1 -1
- package/build/primitives/Radio/Radio.js +11 -15
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/Radio.stories.js +8 -20
- package/build/primitives/Radio/Radio.stories.js.map +1 -1
- package/build/primitives/Radio/index.js +1 -1
- package/build/primitives/Radio/index.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.js +73 -96
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.stories.js +12 -17
- package/build/primitives/ScrollView/ScrollView.stories.js.map +1 -1
- package/build/primitives/ScrollView/index.js +1 -1
- package/build/primitives/ScrollView/index.js.map +1 -1
- package/build/primitives/Select/Select.js +44 -54
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/Select.stories.js +14 -29
- package/build/primitives/Select/Select.stories.js.map +1 -1
- package/build/primitives/Select/index.js +1 -1
- package/build/primitives/Select/index.js.map +1 -1
- package/build/primitives/Switch/Switch.js +14 -16
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/Switch.stories.js +8 -20
- package/build/primitives/Switch/Switch.stories.js.map +1 -1
- package/build/primitives/Switch/index.js +1 -1
- package/build/primitives/Switch/index.js.map +1 -1
- package/build/primitives/Text/Text.js +43 -55
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.stories.js +8 -10
- package/build/primitives/Text/Text.stories.js.map +1 -1
- package/build/primitives/Text/helpers/color.js +13 -12
- package/build/primitives/Text/helpers/color.js.map +1 -1
- package/build/primitives/Text/helpers/index.js +2 -2
- package/build/primitives/Text/helpers/index.js.map +1 -1
- package/build/primitives/Text/helpers/parseMarkdown.js +41 -54
- package/build/primitives/Text/helpers/parseMarkdown.js.map +1 -1
- package/build/primitives/Text/index.js +1 -1
- package/build/primitives/Text/index.js.map +1 -1
- package/build/primitives/View/View.js +16 -25
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/View.stories.js +7 -10
- package/build/primitives/View/View.stories.js.map +1 -1
- package/build/primitives/View/index.js +1 -1
- package/build/primitives/View/index.js.map +1 -1
- package/build/primitives/index.js +12 -12
- package/build/primitives/index.js.map +1 -1
- package/build/primitives/primitives.customElements.js.map +1 -1
- package/build/theme/helpers/camelcase.js +3 -5
- package/build/theme/helpers/camelcase.js.map +1 -1
- package/build/theme/helpers/index.js +2 -2
- package/build/theme/helpers/index.js.map +1 -1
- package/build/theme/helpers/palette.js +18 -32
- package/build/theme/helpers/palette.js.map +1 -1
- package/build/theme/index.js +2 -2
- package/build/theme/index.js.map +1 -1
- package/build/theme/theme.constants.js +16 -23
- package/build/theme/theme.constants.js.map +1 -1
- package/build/theme/theme.js +61 -81
- package/build/theme/theme.js.map +1 -1
- package/build/theme/theme.stories.js +25 -38
- package/build/theme/theme.stories.js.map +1 -1
- package/package.json +18 -15
|
@@ -10,7 +10,7 @@ Object.keys(_Action).forEach(function (key) {
|
|
|
10
10
|
if (key in exports && exports[key] === _Action[key]) return;
|
|
11
11
|
Object.defineProperty(exports, key, {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function
|
|
13
|
+
get: function () {
|
|
14
14
|
return _Action[key];
|
|
15
15
|
}
|
|
16
16
|
});
|
|
@@ -21,7 +21,7 @@ Object.keys(_Button).forEach(function (key) {
|
|
|
21
21
|
if (key in exports && exports[key] === _Button[key]) return;
|
|
22
22
|
Object.defineProperty(exports, key, {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function
|
|
24
|
+
get: function () {
|
|
25
25
|
return _Button[key];
|
|
26
26
|
}
|
|
27
27
|
});
|
|
@@ -32,7 +32,7 @@ Object.keys(_Calendar).forEach(function (key) {
|
|
|
32
32
|
if (key in exports && exports[key] === _Calendar[key]) return;
|
|
33
33
|
Object.defineProperty(exports, key, {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function
|
|
35
|
+
get: function () {
|
|
36
36
|
return _Calendar[key];
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -43,7 +43,7 @@ Object.keys(_Form).forEach(function (key) {
|
|
|
43
43
|
if (key in exports && exports[key] === _Form[key]) return;
|
|
44
44
|
Object.defineProperty(exports, key, {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function
|
|
46
|
+
get: function () {
|
|
47
47
|
return _Form[key];
|
|
48
48
|
}
|
|
49
49
|
});
|
|
@@ -54,7 +54,7 @@ Object.keys(_InputDate).forEach(function (key) {
|
|
|
54
54
|
if (key in exports && exports[key] === _InputDate[key]) return;
|
|
55
55
|
Object.defineProperty(exports, key, {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function
|
|
57
|
+
get: function () {
|
|
58
58
|
return _InputDate[key];
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -65,7 +65,7 @@ Object.keys(_InputNumber).forEach(function (key) {
|
|
|
65
65
|
if (key in exports && exports[key] === _InputNumber[key]) return;
|
|
66
66
|
Object.defineProperty(exports, key, {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _InputNumber[key];
|
|
70
70
|
}
|
|
71
71
|
});
|
|
@@ -76,7 +76,7 @@ Object.keys(_InputOption).forEach(function (key) {
|
|
|
76
76
|
if (key in exports && exports[key] === _InputOption[key]) return;
|
|
77
77
|
Object.defineProperty(exports, key, {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function
|
|
79
|
+
get: function () {
|
|
80
80
|
return _InputOption[key];
|
|
81
81
|
}
|
|
82
82
|
});
|
|
@@ -87,7 +87,7 @@ Object.keys(_InputPhone).forEach(function (key) {
|
|
|
87
87
|
if (key in exports && exports[key] === _InputPhone[key]) return;
|
|
88
88
|
Object.defineProperty(exports, key, {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function
|
|
90
|
+
get: function () {
|
|
91
91
|
return _InputPhone[key];
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -98,7 +98,7 @@ Object.keys(_InputSelect).forEach(function (key) {
|
|
|
98
98
|
if (key in exports && exports[key] === _InputSelect[key]) return;
|
|
99
99
|
Object.defineProperty(exports, key, {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function
|
|
101
|
+
get: function () {
|
|
102
102
|
return _InputSelect[key];
|
|
103
103
|
}
|
|
104
104
|
});
|
|
@@ -109,7 +109,7 @@ Object.keys(_InputText).forEach(function (key) {
|
|
|
109
109
|
if (key in exports && exports[key] === _InputText[key]) return;
|
|
110
110
|
Object.defineProperty(exports, key, {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function
|
|
112
|
+
get: function () {
|
|
113
113
|
return _InputText[key];
|
|
114
114
|
}
|
|
115
115
|
});
|
|
@@ -120,7 +120,7 @@ Object.keys(_Menu).forEach(function (key) {
|
|
|
120
120
|
if (key in exports && exports[key] === _Menu[key]) return;
|
|
121
121
|
Object.defineProperty(exports, key, {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function
|
|
123
|
+
get: function () {
|
|
124
124
|
return _Menu[key];
|
|
125
125
|
}
|
|
126
126
|
});
|
|
@@ -131,7 +131,7 @@ Object.keys(_Modal).forEach(function (key) {
|
|
|
131
131
|
if (key in exports && exports[key] === _Modal[key]) return;
|
|
132
132
|
Object.defineProperty(exports, key, {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function
|
|
134
|
+
get: function () {
|
|
135
135
|
return _Modal[key];
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -142,7 +142,7 @@ Object.keys(_Notification).forEach(function (key) {
|
|
|
142
142
|
if (key in exports && exports[key] === _Notification[key]) return;
|
|
143
143
|
Object.defineProperty(exports, key, {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function
|
|
145
|
+
get: function () {
|
|
146
146
|
return _Notification[key];
|
|
147
147
|
}
|
|
148
148
|
});
|
|
@@ -153,7 +153,7 @@ Object.keys(_Progress).forEach(function (key) {
|
|
|
153
153
|
if (key in exports && exports[key] === _Progress[key]) return;
|
|
154
154
|
Object.defineProperty(exports, key, {
|
|
155
155
|
enumerable: true,
|
|
156
|
-
get: function
|
|
156
|
+
get: function () {
|
|
157
157
|
return _Progress[key];
|
|
158
158
|
}
|
|
159
159
|
});
|
|
@@ -164,7 +164,7 @@ Object.keys(_Slider).forEach(function (key) {
|
|
|
164
164
|
if (key in exports && exports[key] === _Slider[key]) return;
|
|
165
165
|
Object.defineProperty(exports, key, {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function
|
|
167
|
+
get: function () {
|
|
168
168
|
return _Slider[key];
|
|
169
169
|
}
|
|
170
170
|
});
|
|
@@ -175,7 +175,7 @@ Object.keys(_Table).forEach(function (key) {
|
|
|
175
175
|
if (key in exports && exports[key] === _Table[key]) return;
|
|
176
176
|
Object.defineProperty(exports, key, {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function
|
|
178
|
+
get: function () {
|
|
179
179
|
return _Table[key];
|
|
180
180
|
}
|
|
181
181
|
});
|
|
@@ -186,7 +186,7 @@ Object.keys(_Tooltip).forEach(function (key) {
|
|
|
186
186
|
if (key in exports && exports[key] === _Tooltip[key]) return;
|
|
187
187
|
Object.defineProperty(exports, key, {
|
|
188
188
|
enumerable: true,
|
|
189
|
-
get: function
|
|
189
|
+
get: function () {
|
|
190
190
|
return _Tooltip[key];
|
|
191
191
|
}
|
|
192
192
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/components/index.js"],"sourcesContent":["import './components.customElements';\n\nexport * from './Action';\nexport * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputDate';\nexport * from './InputNumber';\nexport * from './InputOption';\nexport * from './InputPhone';\nexport * from './InputSelect';\nexport * from './InputText';\nexport * from './Menu';\nexport * from './Modal';\nexport * from './Notification';\nexport * from './Progress';\nexport * from './Slider';\nexport * from './Table';\nexport * from './Tooltip';\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["require","_Action","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Button","_Calendar","_Form","_InputDate","_InputNumber","_InputOption","_InputPhone","_InputSelect","_InputText","_Menu","_Modal","_Notification","_Progress","_Slider","_Table","_Tooltip"],"sources":["../../src/components/index.js"],"sourcesContent":["import './components.customElements';\n\nexport * from './Action';\nexport * from './Button';\nexport * from './Calendar';\nexport * from './Form';\nexport * from './InputDate';\nexport * from './InputNumber';\nexport * from './InputOption';\nexport * from './InputPhone';\nexport * from './InputSelect';\nexport * from './InputText';\nexport * from './Menu';\nexport * from './Modal';\nexport * from './Notification';\nexport * from './Progress';\nexport * from './Slider';\nexport * from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AAAA,CAAA;MAAA,OAAAgB,QAAA,CAAApB,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.CustomElement = void 0;
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
16
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
18
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
19
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
21
|
-
var _getNavigator = (0, _getNavigator2.getNavigator)(),
|
|
22
|
-
safari = _getNavigator.safari;
|
|
23
|
-
var CustomElement = function CustomElement(component) {
|
|
24
|
-
var TagElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : HTMLElement;
|
|
25
|
-
var tag = arguments.length > 2 ? arguments[2] : undefined;
|
|
7
|
+
var _getNavigator = require("./getNavigator");
|
|
8
|
+
const {
|
|
9
|
+
safari
|
|
10
|
+
} = (0, _getNavigator.getNavigator)();
|
|
11
|
+
const CustomElement = function (component) {
|
|
12
|
+
let TagElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : HTMLElement;
|
|
13
|
+
let tag = arguments.length > 2 ? arguments[2] : undefined;
|
|
26
14
|
if (!component || !tag) return;
|
|
27
|
-
|
|
28
|
-
return customElements.define(component,
|
|
29
|
-
_inherits(_class, _ClassElement);
|
|
30
|
-
var _super = _createSuper(_class);
|
|
31
|
-
function _class() {
|
|
32
|
-
_classCallCheck(this, _class);
|
|
33
|
-
return _super.apply(this, arguments);
|
|
34
|
-
}
|
|
35
|
-
return _createClass(_class);
|
|
36
|
-
}(ClassElement), {
|
|
15
|
+
const ClassElement = safari ? HTMLElement : TagElement;
|
|
16
|
+
return customElements.define(component, class extends ClassElement {}, {
|
|
37
17
|
extends: tag
|
|
38
18
|
});
|
|
39
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomElement.js","names":["
|
|
1
|
+
{"version":3,"file":"CustomElement.js","names":["_getNavigator","require","safari","getNavigator","CustomElement","component","TagElement","arguments","length","undefined","HTMLElement","tag","ClassElement","customElements","define","extends","exports"],"sources":["../../src/helpers/CustomElement.js"],"sourcesContent":["import { getNavigator } from './getNavigator';\n\nconst { safari } = getNavigator();\n\nexport const CustomElement = (component, TagElement = HTMLElement, tag) => {\n if (!component || !tag) return;\n\n const ClassElement = safari ? HTMLElement : TagElement;\n\n return customElements.define(component, class extends ClassElement {}, { extends: tag });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAEA,MAAM;EAAEC;AAAO,CAAC,GAAG,IAAAC,0BAAY,EAAC,CAAC;AAE1B,MAAMC,aAAa,GAAG,SAAAA,CAACC,SAAS,EAAoC;EAAA,IAAlCC,UAAU,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,WAAW;EAAA,IAAEC,GAAG,GAAAJ,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EACpE,IAAI,CAACJ,SAAS,IAAI,CAACM,GAAG,EAAE;EAExB,MAAMC,YAAY,GAAGV,MAAM,GAAGQ,WAAW,GAAGJ,UAAU;EAEtD,OAAOO,cAAc,CAACC,MAAM,CAACT,SAAS,EAAE,cAAcO,YAAY,CAAC,EAAE,EAAE;IAAEG,OAAO,EAAEJ;EAAI,CAAC,CAAC;AAC1F,CAAC;AAACK,OAAA,CAAAZ,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getIconState = void 0;
|
|
7
7
|
var _primitives = require("../primitives");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
error
|
|
11
|
-
success
|
|
12
|
-
warning
|
|
8
|
+
const getIconState = function () {
|
|
9
|
+
let {
|
|
10
|
+
error,
|
|
11
|
+
success,
|
|
12
|
+
warning
|
|
13
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13
14
|
return error ? _primitives.ICON.ERROR : warning ? _primitives.ICON.WARNING : success ? _primitives.ICON.SUCCESS : _primitives.ICON.INFO;
|
|
14
15
|
};
|
|
15
16
|
exports.getIconState = getIconState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIconState.js","names":["getIconState","error","success","warning","ICON","ERROR","WARNING","SUCCESS","INFO"],"sources":["../../src/helpers/getIconState.js"],"sourcesContent":["import { ICON } from '../primitives';\n\nexport const getIconState = ({ error, success, warning } = {}) =>\n error ? ICON.ERROR : warning ? ICON.WARNING : success ? ICON.SUCCESS : ICON.INFO;\n"],"mappings":";;;;;;AAAA;AAEO,
|
|
1
|
+
{"version":3,"file":"getIconState.js","names":["_primitives","require","getIconState","error","success","warning","arguments","length","undefined","ICON","ERROR","WARNING","SUCCESS","INFO","exports"],"sources":["../../src/helpers/getIconState.js"],"sourcesContent":["import { ICON } from '../primitives';\n\nexport const getIconState = ({ error, success, warning } = {}) =>\n error ? ICON.ERROR : warning ? ICON.WARNING : success ? ICON.SUCCESS : ICON.INFO;\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAG,SAAAA,CAAA;EAAA,IAAC;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAC3DH,KAAK,GAAGM,gBAAI,CAACC,KAAK,GAAGL,OAAO,GAAGI,gBAAI,CAACE,OAAO,GAAGP,OAAO,GAAGK,gBAAI,CAACG,OAAO,GAAGH,gBAAI,CAACI,IAAI;AAAA;AAACC,OAAA,CAAAZ,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getInputDateErrors = void 0;
|
|
7
7
|
var _locale = require("@mirai/locale");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (!date && value
|
|
8
|
+
const getInputDateErrors = function () {
|
|
9
|
+
let {
|
|
10
|
+
format = _locale.DEFAULT_DATE_FORMAT,
|
|
11
|
+
max,
|
|
12
|
+
min,
|
|
13
|
+
value
|
|
14
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15
|
+
const errors = {};
|
|
16
|
+
const date = format.length === value?.length ? (0, _locale.parseDate)(value, format) : undefined;
|
|
17
|
+
if (!date && value?.length) errors.format = true;
|
|
18
18
|
if (date && max && (0, _locale.dateDiff)(date, (0, _locale.parseDate)(max, format)).days < 0) errors.max = true;
|
|
19
19
|
if (date && min && (0, _locale.dateDiff)(date, (0, _locale.parseDate)(min, format)).days > 0) errors.min = true;
|
|
20
20
|
return Object.keys(errors).length > 0 ? errors : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInputDateErrors.js","names":["getInputDateErrors","format","DEFAULT_DATE_FORMAT","max","min","value","
|
|
1
|
+
{"version":3,"file":"getInputDateErrors.js","names":["_locale","require","getInputDateErrors","format","DEFAULT_DATE_FORMAT","max","min","value","arguments","length","undefined","errors","date","parseDate","dateDiff","days","Object","keys","exports"],"sources":["../../src/helpers/getInputDateErrors.js"],"sourcesContent":["import { DEFAULT_DATE_FORMAT, dateDiff, parseDate } from '@mirai/locale';\n\nexport const getInputDateErrors = ({ format = DEFAULT_DATE_FORMAT, max, min, value } = {}) => {\n const errors = {};\n const date = format.length === value?.length ? parseDate(value, format) : undefined;\n\n if (!date && value?.length) errors.format = true;\n if (date && max && dateDiff(date, parseDate(max, format)).days < 0) errors.max = true;\n if (date && min && dateDiff(date, parseDate(min, format)).days > 0) errors.min = true;\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAG,SAAAA,CAAA,EAA4D;EAAA,IAA3D;IAAEC,MAAM,GAAGC,2BAAmB;IAAEC,GAAG;IAAEC,GAAG;IAAEC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACvF,MAAMG,MAAM,GAAG,CAAC,CAAC;EACjB,MAAMC,IAAI,GAAGT,MAAM,CAACM,MAAM,KAAKF,KAAK,EAAEE,MAAM,GAAG,IAAAI,iBAAS,EAACN,KAAK,EAAEJ,MAAM,CAAC,GAAGO,SAAS;EAEnF,IAAI,CAACE,IAAI,IAAIL,KAAK,EAAEE,MAAM,EAAEE,MAAM,CAACR,MAAM,GAAG,IAAI;EAChD,IAAIS,IAAI,IAAIP,GAAG,IAAI,IAAAS,gBAAQ,EAACF,IAAI,EAAE,IAAAC,iBAAS,EAACR,GAAG,EAAEF,MAAM,CAAC,CAAC,CAACY,IAAI,GAAG,CAAC,EAAEJ,MAAM,CAACN,GAAG,GAAG,IAAI;EACrF,IAAIO,IAAI,IAAIN,GAAG,IAAI,IAAAQ,gBAAQ,EAACF,IAAI,EAAE,IAAAC,iBAAS,EAACP,GAAG,EAAEH,MAAM,CAAC,CAAC,CAACY,IAAI,GAAG,CAAC,EAAEJ,MAAM,CAACL,GAAG,GAAG,IAAI;EAErF,OAAOU,MAAM,CAACC,IAAI,CAACN,MAAM,CAAC,CAACF,MAAM,GAAG,CAAC,GAAGE,MAAM,GAAGD,SAAS;AAC5D,CAAC;AAACQ,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,27 +9,17 @@ var _getInputPhoneErrors = require("./getInputPhoneErrors");
|
|
|
10
9
|
var _isValidDate = require("./isValidDate");
|
|
11
10
|
var _isValidEmail = require("./isValidEmail");
|
|
12
11
|
var _isValidPhone = require("./isValidPhone");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
minLength = _ref$minLength === void 0 ? 0 : _ref$minLength,
|
|
25
|
-
regexp = _ref.regexp,
|
|
26
|
-
required = _ref.required,
|
|
27
|
-
test = _ref.test,
|
|
28
|
-
_ref$type = _ref.type,
|
|
29
|
-
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
30
|
-
_ref$value = _ref.value,
|
|
31
|
-
value = _ref$value === void 0 ? '' : _ref$value,
|
|
32
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
var errors = {};
|
|
12
|
+
const getInputErrors = function () {
|
|
13
|
+
let {
|
|
14
|
+
minLength = 0,
|
|
15
|
+
regexp,
|
|
16
|
+
required,
|
|
17
|
+
test,
|
|
18
|
+
type = 'text',
|
|
19
|
+
value = '',
|
|
20
|
+
...others
|
|
21
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22
|
+
let errors = {};
|
|
34
23
|
|
|
35
24
|
// Common
|
|
36
25
|
if (required && (value === undefined || value === false || value.length === 0)) errors.required = true;
|
|
@@ -40,12 +29,20 @@ var getInputErrors = function getInputErrors() {
|
|
|
40
29
|
// Email, Phone & Date format
|
|
41
30
|
if (type === 'date' && !(0, _isValidDate.isValidDate)(value, others) || type === 'email' && !(0, _isValidEmail.isValidEmail)(value) || type === 'tel' && !(0, _isValidPhone.isValidPhone)(value)) errors.format = true;
|
|
42
31
|
// Custom Inputs
|
|
43
|
-
if (type === 'inputDate') errors =
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
if (type === 'inputDate') errors = {
|
|
33
|
+
...errors,
|
|
34
|
+
...(0, _getInputDateErrors.getInputDateErrors)({
|
|
35
|
+
...others,
|
|
36
|
+
value
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
if (type === 'inputPhone') errors = {
|
|
40
|
+
...errors,
|
|
41
|
+
...(0, _getInputPhoneErrors.getInputPhoneErrors)({
|
|
42
|
+
...others,
|
|
43
|
+
value
|
|
44
|
+
})
|
|
45
|
+
};
|
|
49
46
|
return Object.keys(errors).length > 0 ? errors : undefined;
|
|
50
47
|
};
|
|
51
48
|
exports.getInputErrors = getInputErrors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInputErrors.js","names":["getInputErrors","minLength","regexp","required","test","type","value","others","
|
|
1
|
+
{"version":3,"file":"getInputErrors.js","names":["_getInputDateErrors","require","_getInputPhoneErrors","_isValidDate","_isValidEmail","_isValidPhone","getInputErrors","minLength","regexp","required","test","type","value","others","arguments","length","undefined","errors","exec","isValidDate","isValidEmail","isValidPhone","format","getInputDateErrors","getInputPhoneErrors","Object","keys","exports"],"sources":["../../src/helpers/getInputErrors.js"],"sourcesContent":["import { getInputDateErrors } from './getInputDateErrors';\nimport { getInputPhoneErrors } from './getInputPhoneErrors';\nimport { isValidDate } from './isValidDate';\nimport { isValidEmail } from './isValidEmail';\nimport { isValidPhone } from './isValidPhone';\n\nexport const getInputErrors = ({\n minLength = 0,\n regexp,\n required,\n test,\n type = 'text',\n value = '',\n ...others\n} = {}) => {\n let errors = {};\n\n // Common\n if (required && (value === undefined || value === false || value.length === 0)) errors.required = true;\n if (minLength > 0 && value.length < minLength) errors.minLength = true;\n if (regexp && regexp.exec && regexp.exec(value) === null) errors.regexp = true;\n if (test && !test(value)) errors.test = true;\n // Email, Phone & Date format\n if (\n (type === 'date' && !isValidDate(value, others)) ||\n (type === 'email' && !isValidEmail(value)) ||\n (type === 'tel' && !isValidPhone(value))\n )\n errors.format = true;\n // Custom Inputs\n if (type === 'inputDate') errors = { ...errors, ...getInputDateErrors({ ...others, value }) };\n if (type === 'inputPhone') errors = { ...errors, ...getInputPhoneErrors({ ...others, value }) };\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAEO,MAAMK,cAAc,GAAG,SAAAA,CAAA,EAQnB;EAAA,IARoB;IAC7BC,SAAS,GAAG,CAAC;IACbC,MAAM;IACNC,QAAQ;IACRC,IAAI;IACJC,IAAI,GAAG,MAAM;IACbC,KAAK,GAAG,EAAE;IACV,GAAGC;EACL,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACJ,IAAIG,MAAM,GAAG,CAAC,CAAC;;EAEf;EACA,IAAIR,QAAQ,KAAKG,KAAK,KAAKI,SAAS,IAAIJ,KAAK,KAAK,KAAK,IAAIA,KAAK,CAACG,MAAM,KAAK,CAAC,CAAC,EAAEE,MAAM,CAACR,QAAQ,GAAG,IAAI;EACtG,IAAIF,SAAS,GAAG,CAAC,IAAIK,KAAK,CAACG,MAAM,GAAGR,SAAS,EAAEU,MAAM,CAACV,SAAS,GAAG,IAAI;EACtE,IAAIC,MAAM,IAAIA,MAAM,CAACU,IAAI,IAAIV,MAAM,CAACU,IAAI,CAACN,KAAK,CAAC,KAAK,IAAI,EAAEK,MAAM,CAACT,MAAM,GAAG,IAAI;EAC9E,IAAIE,IAAI,IAAI,CAACA,IAAI,CAACE,KAAK,CAAC,EAAEK,MAAM,CAACP,IAAI,GAAG,IAAI;EAC5C;EACA,IACGC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAAQ,wBAAW,EAACP,KAAK,EAAEC,MAAM,CAAC,IAC9CF,IAAI,KAAK,OAAO,IAAI,CAAC,IAAAS,0BAAY,EAACR,KAAK,CAAE,IACzCD,IAAI,KAAK,KAAK,IAAI,CAAC,IAAAU,0BAAY,EAACT,KAAK,CAAE,EAExCK,MAAM,CAACK,MAAM,GAAG,IAAI;EACtB;EACA,IAAIX,IAAI,KAAK,WAAW,EAAEM,MAAM,GAAG;IAAE,GAAGA,MAAM;IAAE,GAAG,IAAAM,sCAAkB,EAAC;MAAE,GAAGV,MAAM;MAAED;IAAM,CAAC;EAAE,CAAC;EAC7F,IAAID,IAAI,KAAK,YAAY,EAAEM,MAAM,GAAG;IAAE,GAAGA,MAAM;IAAE,GAAG,IAAAO,wCAAmB,EAAC;MAAE,GAAGX,MAAM;MAAED;IAAM,CAAC;EAAE,CAAC;EAE/F,OAAOa,MAAM,CAACC,IAAI,CAACT,MAAM,CAAC,CAACF,MAAM,GAAG,CAAC,GAAGE,MAAM,GAAGD,SAAS;AAC5D,CAAC;AAACW,OAAA,CAAArB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -5,21 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getInputPhoneErrors = void 0;
|
|
7
7
|
var _helpers = require("../components/InputPhone/helpers");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
value = _ref$value === void 0 ? '' : _ref$value;
|
|
8
|
+
const getInputPhoneErrors = function () {
|
|
9
|
+
let {
|
|
10
|
+
prefixes = [],
|
|
11
|
+
value = ''
|
|
12
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
13
|
if (value.trim().length === 0) return;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
length
|
|
18
|
-
|
|
14
|
+
const errors = {};
|
|
15
|
+
const {
|
|
16
|
+
length
|
|
17
|
+
} = value.replace(/\D/g, '');
|
|
18
|
+
const withPrefix = prefixes.length > 0;
|
|
19
19
|
if (length < (withPrefix ? 8 : 6)) errors.minLength = true;
|
|
20
|
-
if (withPrefix && !(0, _helpers.sanitizePrefixes)(prefixes).some(
|
|
21
|
-
return value.includes(item);
|
|
22
|
-
})) errors.format = true;
|
|
20
|
+
if (withPrefix && !(0, _helpers.sanitizePrefixes)(prefixes).some(item => value.includes(item))) errors.format = true;
|
|
23
21
|
return Object.keys(errors).length > 0 ? errors : undefined;
|
|
24
22
|
};
|
|
25
23
|
exports.getInputPhoneErrors = getInputPhoneErrors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInputPhoneErrors.js","names":["getInputPhoneErrors","prefixes","value","
|
|
1
|
+
{"version":3,"file":"getInputPhoneErrors.js","names":["_helpers","require","getInputPhoneErrors","prefixes","value","arguments","length","undefined","trim","errors","replace","withPrefix","minLength","sanitizePrefixes","some","item","includes","format","Object","keys","exports"],"sources":["../../src/helpers/getInputPhoneErrors.js"],"sourcesContent":["import { sanitizePrefixes } from '../components/InputPhone/helpers';\n\nexport const getInputPhoneErrors = ({ prefixes = [], value = '' } = {}) => {\n if (value.trim().length === 0) return;\n\n const errors = {};\n const { length } = value.replace(/\\D/g, '');\n const withPrefix = prefixes.length > 0;\n\n if (length < (withPrefix ? 8 : 6)) errors.minLength = true;\n if (withPrefix && !sanitizePrefixes(prefixes).some((item) => value.includes(item))) errors.format = true;\n\n return Object.keys(errors).length > 0 ? errors : undefined;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEO,MAAMC,mBAAmB,GAAG,SAAAA,CAAA,EAAwC;EAAA,IAAvC;IAAEC,QAAQ,GAAG,EAAE;IAAEC,KAAK,GAAG;EAAG,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACpE,IAAID,KAAK,CAACI,IAAI,CAAC,CAAC,CAACF,MAAM,KAAK,CAAC,EAAE;EAE/B,MAAMG,MAAM,GAAG,CAAC,CAAC;EACjB,MAAM;IAAEH;EAAO,CAAC,GAAGF,KAAK,CAACM,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EAC3C,MAAMC,UAAU,GAAGR,QAAQ,CAACG,MAAM,GAAG,CAAC;EAEtC,IAAIA,MAAM,IAAIK,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC,EAAEF,MAAM,CAACG,SAAS,GAAG,IAAI;EAC1D,IAAID,UAAU,IAAI,CAAC,IAAAE,yBAAgB,EAACV,QAAQ,CAAC,CAACW,IAAI,CAAEC,IAAI,IAAKX,KAAK,CAACY,QAAQ,CAACD,IAAI,CAAC,CAAC,EAAEN,MAAM,CAACQ,MAAM,GAAG,IAAI;EAExG,OAAOC,MAAM,CAACC,IAAI,CAACV,MAAM,CAAC,CAACH,MAAM,GAAG,CAAC,GAAGG,MAAM,GAAGF,SAAS;AAC5D,CAAC;AAACa,OAAA,CAAAlB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -4,21 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getNavigator = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
const MATCH_SAFARI = /^((?!chrome|android).)*safari/i;
|
|
8
|
+
const MATCH_MOBILE = /(Mobile|Tablet|iPad|iPod|iPhone|Android|BlackBerry|IEMobile|Silk|Kindle|KF[A-Z]{2,4}|Samsung|Nexus|Nook|webOS|PlayBook)/i;
|
|
9
|
+
const getNavigator = () => {
|
|
10
|
+
const {
|
|
11
|
+
userAgent = ''
|
|
12
|
+
} = typeof navigator !== 'undefined' ? navigator : {};
|
|
13
|
+
const ua = userAgent.toLowerCase();
|
|
14
|
+
const safari = Boolean(ua.match(MATCH_SAFARI));
|
|
15
15
|
return {
|
|
16
|
-
userAgent
|
|
16
|
+
userAgent,
|
|
17
17
|
// browsers
|
|
18
18
|
chrome: !safari && Boolean(ua.indexOf('chrome') !== -1),
|
|
19
19
|
firefox: Boolean(ua.indexOf('firefox') !== -1),
|
|
20
20
|
mobile: Boolean(ua.match(MATCH_MOBILE)),
|
|
21
|
-
safari
|
|
21
|
+
safari,
|
|
22
22
|
// touch
|
|
23
23
|
touch: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(userAgent)
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNavigator.js","names":["MATCH_SAFARI","MATCH_MOBILE","getNavigator","
|
|
1
|
+
{"version":3,"file":"getNavigator.js","names":["MATCH_SAFARI","MATCH_MOBILE","getNavigator","userAgent","navigator","ua","toLowerCase","safari","Boolean","match","chrome","indexOf","firefox","mobile","touch","test","exports"],"sources":["../../src/helpers/getNavigator.js"],"sourcesContent":["const MATCH_SAFARI = /^((?!chrome|android).)*safari/i;\nconst MATCH_MOBILE =\n /(Mobile|Tablet|iPad|iPod|iPhone|Android|BlackBerry|IEMobile|Silk|Kindle|KF[A-Z]{2,4}|Samsung|Nexus|Nook|webOS|PlayBook)/i;\n\nexport const getNavigator = () => {\n const { userAgent = '' } = typeof navigator !== 'undefined' ? navigator : {};\n\n const ua = userAgent.toLowerCase();\n const safari = Boolean(ua.match(MATCH_SAFARI));\n\n return {\n userAgent,\n // browsers\n chrome: !safari && Boolean(ua.indexOf('chrome') !== -1),\n firefox: Boolean(ua.indexOf('firefox') !== -1),\n mobile: Boolean(ua.match(MATCH_MOBILE)),\n safari,\n // touch\n touch: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(userAgent),\n };\n};\n"],"mappings":";;;;;;AAAA,MAAMA,YAAY,GAAG,gCAAgC;AACrD,MAAMC,YAAY,GAChB,0HAA0H;AAErH,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAM;IAAEC,SAAS,GAAG;EAAG,CAAC,GAAG,OAAOC,SAAS,KAAK,WAAW,GAAGA,SAAS,GAAG,CAAC,CAAC;EAE5E,MAAMC,EAAE,GAAGF,SAAS,CAACG,WAAW,CAAC,CAAC;EAClC,MAAMC,MAAM,GAAGC,OAAO,CAACH,EAAE,CAACI,KAAK,CAACT,YAAY,CAAC,CAAC;EAE9C,OAAO;IACLG,SAAS;IACT;IACAO,MAAM,EAAE,CAACH,MAAM,IAAIC,OAAO,CAACH,EAAE,CAACM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACvDC,OAAO,EAAEJ,OAAO,CAACH,EAAE,CAACM,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9CE,MAAM,EAAEL,OAAO,CAACH,EAAE,CAACI,KAAK,CAACR,YAAY,CAAC,CAAC;IACvCM,MAAM;IACN;IACAO,KAAK,EAAE,oFAAoF,CAACC,IAAI,CAACZ,SAAS;EAC5G,CAAC;AACH,CAAC;AAACa,OAAA,CAAAd,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/build/helpers/index.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.keys(_CustomElement).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _CustomElement[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _CustomElement[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_getIconState).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _getIconState[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _getIconState[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -31,7 +31,7 @@ Object.keys(_getInputDateErrors).forEach(function (key) {
|
|
|
31
31
|
if (key in exports && exports[key] === _getInputDateErrors[key]) return;
|
|
32
32
|
Object.defineProperty(exports, key, {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function
|
|
34
|
+
get: function () {
|
|
35
35
|
return _getInputDateErrors[key];
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ Object.keys(_getInputPhoneErrors).forEach(function (key) {
|
|
|
42
42
|
if (key in exports && exports[key] === _getInputPhoneErrors[key]) return;
|
|
43
43
|
Object.defineProperty(exports, key, {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function
|
|
45
|
+
get: function () {
|
|
46
46
|
return _getInputPhoneErrors[key];
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ Object.keys(_getInputErrors).forEach(function (key) {
|
|
|
53
53
|
if (key in exports && exports[key] === _getInputErrors[key]) return;
|
|
54
54
|
Object.defineProperty(exports, key, {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _getInputErrors[key];
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -64,7 +64,7 @@ Object.keys(_getNavigator).forEach(function (key) {
|
|
|
64
64
|
if (key in exports && exports[key] === _getNavigator[key]) return;
|
|
65
65
|
Object.defineProperty(exports, key, {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function
|
|
67
|
+
get: function () {
|
|
68
68
|
return _getNavigator[key];
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -75,7 +75,7 @@ Object.keys(_isJest).forEach(function (key) {
|
|
|
75
75
|
if (key in exports && exports[key] === _isJest[key]) return;
|
|
76
76
|
Object.defineProperty(exports, key, {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function
|
|
78
|
+
get: function () {
|
|
79
79
|
return _isJest[key];
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -86,7 +86,7 @@ Object.keys(_isPlaywright).forEach(function (key) {
|
|
|
86
86
|
if (key in exports && exports[key] === _isPlaywright[key]) return;
|
|
87
87
|
Object.defineProperty(exports, key, {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function
|
|
89
|
+
get: function () {
|
|
90
90
|
return _isPlaywright[key];
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -97,7 +97,7 @@ Object.keys(_styles).forEach(function (key) {
|
|
|
97
97
|
if (key in exports && exports[key] === _styles[key]) return;
|
|
98
98
|
Object.defineProperty(exports, key, {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function
|
|
100
|
+
get: function () {
|
|
101
101
|
return _styles[key];
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './CustomElement';\nexport * from './getIconState';\nexport * from './getInputDateErrors';\nexport * from './getInputPhoneErrors';\nexport * from './getInputErrors';\nexport * from './getNavigator';\nexport * from './isJest';\nexport * from './isPlaywright';\nexport * from './styles';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_CustomElement","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getIconState","_getInputDateErrors","_getInputPhoneErrors","_getInputErrors","_getNavigator","_isJest","_isPlaywright","_styles"],"sources":["../../src/helpers/index.js"],"sourcesContent":["export * from './CustomElement';\nexport * from './getIconState';\nexport * from './getInputDateErrors';\nexport * from './getInputPhoneErrors';\nexport * from './getInputErrors';\nexport * from './getNavigator';\nexport * from './isJest';\nexport * from './isPlaywright';\nexport * from './styles';\n"],"mappings":";;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,cAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EA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aAAA,EAAAZ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAW,aAAA,CAAAX,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,aAAA,CAAAX,GAAA;IAAA;EAAA;AAAA;AACA,IAAAY,OAAA,GAAAhB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAc,OAAA,EAAAb,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,OAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,OAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/build/helpers/isJest.js
CHANGED
|
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.IS_JEST = void 0;
|
|
7
|
-
|
|
7
|
+
const IS_JEST = exports.IS_JEST = (() => {
|
|
8
8
|
try {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} catch (_unused) {
|
|
9
|
+
return !!process?.env?.JEST_WORKER_ID;
|
|
10
|
+
} catch {
|
|
12
11
|
return false;
|
|
13
12
|
}
|
|
14
|
-
}();
|
|
15
|
-
exports.IS_JEST = IS_JEST;
|
|
13
|
+
})();
|
|
16
14
|
//# sourceMappingURL=isJest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isJest.js","names":["IS_JEST","process","env","JEST_WORKER_ID"],"sources":["../../src/helpers/isJest.js"],"sourcesContent":["export const IS_JEST = (() => {\n try {\n return !!process?.env?.JEST_WORKER_ID;\n } catch {\n return false;\n }\n})();\n"],"mappings":";;;;;;AAAO,
|
|
1
|
+
{"version":3,"file":"isJest.js","names":["IS_JEST","exports","process","env","JEST_WORKER_ID"],"sources":["../../src/helpers/isJest.js"],"sourcesContent":["export const IS_JEST = (() => {\n try {\n return !!process?.env?.JEST_WORKER_ID;\n } catch {\n return false;\n }\n})();\n"],"mappings":";;;;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,CAAC,MAAM;EAC5B,IAAI;IACF,OAAO,CAAC,CAACE,OAAO,EAAEC,GAAG,EAAEC,cAAc;EACvC,CAAC,CAAC,MAAM;IACN,OAAO,KAAK;EACd;AACF,CAAC,EAAE,CAAC","ignoreList":[]}
|