@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
|
@@ -4,112 +4,109 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getLayerPosition = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
_contentLayout$height = contentLayout.height,
|
|
41
|
-
contentHeight = _contentLayout$height === void 0 ? 0 : _contentLayout$height;
|
|
42
|
-
var _ref2 = modal || device,
|
|
43
|
-
_ref2$height = _ref2.height,
|
|
44
|
-
height = _ref2$height === void 0 ? 0 : _ref2$height,
|
|
45
|
-
_ref2$width = _ref2.width,
|
|
46
|
-
width = _ref2$width === void 0 ? 0 : _ref2$width;
|
|
47
|
-
var aline = centered && (forceLeft || forceRight);
|
|
48
|
-
var offsetLeft = modal ? componentLeft : screenLeft;
|
|
49
|
-
var offsetTop = modal ? componentTop : screenTop;
|
|
50
|
-
var orientation = {
|
|
7
|
+
const getLayerPosition = function () {
|
|
8
|
+
let componentLayout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9
|
+
let contentLayout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
10
|
+
let device = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
11
|
+
let modal = arguments.length > 3 ? arguments[3] : undefined;
|
|
12
|
+
let {
|
|
13
|
+
centered,
|
|
14
|
+
forceBottom,
|
|
15
|
+
forceLeft,
|
|
16
|
+
forceRight,
|
|
17
|
+
forceTop
|
|
18
|
+
} = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
19
|
+
const {
|
|
20
|
+
left: componentLeft = 0,
|
|
21
|
+
scrollTop = 0,
|
|
22
|
+
top: componentTop = 0,
|
|
23
|
+
width: componentWidth = 0,
|
|
24
|
+
height: componentHeight = 0,
|
|
25
|
+
screenLeft = componentLeft || 0,
|
|
26
|
+
screenTop = componentTop || 0
|
|
27
|
+
} = componentLayout;
|
|
28
|
+
const {
|
|
29
|
+
width: contentWidth = 0,
|
|
30
|
+
height: contentHeight = 0
|
|
31
|
+
} = contentLayout;
|
|
32
|
+
const {
|
|
33
|
+
height = 0,
|
|
34
|
+
width = 0
|
|
35
|
+
} = modal || device;
|
|
36
|
+
const aline = centered && (forceLeft || forceRight);
|
|
37
|
+
const offsetLeft = modal ? componentLeft : screenLeft;
|
|
38
|
+
const offsetTop = modal ? componentTop : screenTop;
|
|
39
|
+
let orientation = {
|
|
51
40
|
left: true
|
|
52
41
|
};
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
let top = componentTop + componentHeight - scrollTop;
|
|
43
|
+
const gapBottom = height - (offsetTop + componentHeight);
|
|
55
44
|
if (contentHeight > gapBottom && offsetTop > gapBottom && !forceBottom || forceTop) {
|
|
56
45
|
top = componentTop - contentHeight - scrollTop;
|
|
57
|
-
orientation =
|
|
46
|
+
orientation = {
|
|
47
|
+
...orientation,
|
|
58
48
|
top: true
|
|
59
|
-
}
|
|
49
|
+
};
|
|
60
50
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
51
|
+
let left = componentLeft;
|
|
52
|
+
const gapLeft = screenLeft + componentWidth;
|
|
53
|
+
const gapRight = width - offsetLeft;
|
|
64
54
|
if (contentWidth > gapRight && gapLeft > gapRight && !forceLeft || forceRight) {
|
|
65
55
|
left = componentLeft - contentWidth + componentWidth;
|
|
66
|
-
orientation =
|
|
56
|
+
orientation = {
|
|
57
|
+
...orientation,
|
|
67
58
|
left: undefined,
|
|
68
59
|
right: true
|
|
69
|
-
}
|
|
60
|
+
};
|
|
70
61
|
}
|
|
71
62
|
if (aline) {
|
|
72
|
-
orientation =
|
|
63
|
+
orientation = {
|
|
64
|
+
...orientation,
|
|
73
65
|
left: forceLeft,
|
|
74
66
|
right: forceRight,
|
|
75
67
|
top: undefined
|
|
76
|
-
}
|
|
77
|
-
if (forceLeft && contentWidth > gapLeft && gapRight > gapLeft) orientation =
|
|
68
|
+
};
|
|
69
|
+
if (forceLeft && contentWidth > gapLeft && gapRight > gapLeft) orientation = {
|
|
70
|
+
...orientation,
|
|
78
71
|
left: undefined,
|
|
79
72
|
right: true
|
|
80
|
-
}
|
|
73
|
+
};else if (forceRight && contentWidth > gapRight && gapLeft > gapRight) orientation = {
|
|
74
|
+
...orientation,
|
|
81
75
|
left: true,
|
|
82
76
|
right: undefined
|
|
83
|
-
}
|
|
77
|
+
};
|
|
84
78
|
left = orientation.left ? componentLeft - contentWidth : componentLeft + componentWidth;
|
|
85
79
|
top = componentTop - (contentHeight - componentHeight) / 2 - scrollTop;
|
|
86
80
|
} else if (centered) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
orientation =
|
|
81
|
+
const gapCenter = (componentWidth + contentWidth) / 2;
|
|
82
|
+
const space = (contentWidth - componentWidth) / 2;
|
|
83
|
+
orientation = {
|
|
84
|
+
...orientation,
|
|
90
85
|
left: true,
|
|
91
86
|
right: undefined
|
|
92
|
-
}
|
|
87
|
+
};
|
|
93
88
|
if (gapLeft > gapRight) {
|
|
94
89
|
left = componentLeft - contentWidth + componentWidth;
|
|
95
|
-
orientation =
|
|
90
|
+
orientation = {
|
|
91
|
+
...orientation,
|
|
96
92
|
left: undefined,
|
|
97
93
|
right: true
|
|
98
|
-
}
|
|
94
|
+
};
|
|
99
95
|
}
|
|
100
96
|
if (gapLeft > gapCenter && gapRight > gapCenter) {
|
|
101
97
|
left += space * (gapLeft > gapRight ? 1 : -1);
|
|
102
|
-
orientation =
|
|
98
|
+
orientation = {
|
|
99
|
+
...orientation,
|
|
103
100
|
left: undefined,
|
|
104
101
|
right: undefined,
|
|
105
102
|
center: true
|
|
106
|
-
}
|
|
103
|
+
};
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
106
|
return {
|
|
110
|
-
left
|
|
111
|
-
top
|
|
112
|
-
orientation
|
|
107
|
+
left,
|
|
108
|
+
top,
|
|
109
|
+
orientation
|
|
113
110
|
};
|
|
114
111
|
};
|
|
115
112
|
exports.getLayerPosition = getLayerPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLayerPosition.js","names":["getLayerPosition","componentLayout","contentLayout","device","modal","centered","forceBottom","forceLeft","forceRight","forceTop","left","componentLeft","scrollTop","top","componentTop","width","componentWidth","height","componentHeight","screenLeft","screenTop","contentWidth","contentHeight","aline","offsetLeft","offsetTop","orientation","gapBottom","gapLeft","gapRight","
|
|
1
|
+
{"version":3,"file":"getLayerPosition.js","names":["getLayerPosition","componentLayout","arguments","length","undefined","contentLayout","device","modal","centered","forceBottom","forceLeft","forceRight","forceTop","left","componentLeft","scrollTop","top","componentTop","width","componentWidth","height","componentHeight","screenLeft","screenTop","contentWidth","contentHeight","aline","offsetLeft","offsetTop","orientation","gapBottom","gapLeft","gapRight","right","gapCenter","space","center","exports"],"sources":["../../../../src/primitives/Layer/helpers/getLayerPosition.js"],"sourcesContent":["export const getLayerPosition = (\n componentLayout = {},\n contentLayout = {},\n device = {},\n modal,\n { centered, forceBottom, forceLeft, forceRight, forceTop } = {},\n) => {\n const {\n left: componentLeft = 0,\n scrollTop = 0,\n top: componentTop = 0,\n width: componentWidth = 0,\n height: componentHeight = 0,\n screenLeft = componentLeft || 0,\n screenTop = componentTop || 0,\n } = componentLayout;\n const { width: contentWidth = 0, height: contentHeight = 0 } = contentLayout;\n const { height = 0, width = 0 } = modal || device;\n const aline = centered && (forceLeft || forceRight);\n const offsetLeft = modal ? componentLeft : screenLeft;\n const offsetTop = modal ? componentTop : screenTop;\n let orientation = { left: true };\n\n let top = componentTop + componentHeight - scrollTop;\n const gapBottom = height - (offsetTop + componentHeight);\n if ((contentHeight > gapBottom && offsetTop > gapBottom && !forceBottom) || forceTop) {\n top = componentTop - contentHeight - scrollTop;\n orientation = { ...orientation, top: true };\n }\n\n let left = componentLeft;\n const gapLeft = screenLeft + componentWidth;\n const gapRight = width - offsetLeft;\n if ((contentWidth > gapRight && gapLeft > gapRight && !forceLeft) || forceRight) {\n left = componentLeft - contentWidth + componentWidth;\n orientation = { ...orientation, left: undefined, right: true };\n }\n\n if (aline) {\n orientation = { ...orientation, left: forceLeft, right: forceRight, top: undefined };\n if (forceLeft && contentWidth > gapLeft && gapRight > gapLeft)\n orientation = { ...orientation, left: undefined, right: true };\n else if (forceRight && contentWidth > gapRight && gapLeft > gapRight)\n orientation = { ...orientation, left: true, right: undefined };\n\n left = orientation.left ? componentLeft - contentWidth : componentLeft + componentWidth;\n top = componentTop - (contentHeight - componentHeight) / 2 - scrollTop;\n } else if (centered) {\n const gapCenter = (componentWidth + contentWidth) / 2;\n const space = (contentWidth - componentWidth) / 2;\n orientation = { ...orientation, left: true, right: undefined };\n\n if (gapLeft > gapRight) {\n left = componentLeft - contentWidth + componentWidth;\n orientation = { ...orientation, left: undefined, right: true };\n }\n if (gapLeft > gapCenter && gapRight > gapCenter) {\n left += space * (gapLeft > gapRight ? 1 : -1);\n orientation = { ...orientation, left: undefined, right: undefined, center: true };\n }\n }\n\n return { left, top, orientation };\n};\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAG,SAAAA,CAAA,EAM3B;EAAA,IALHC,eAAe,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,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
7
|
+
const getModalParent = node => {
|
|
9
8
|
if (!node || node.tagName === 'HTML') return;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
const {
|
|
10
|
+
attributes,
|
|
11
|
+
offsetHeight: height,
|
|
12
|
+
offsetWidth: width,
|
|
13
|
+
parentNode
|
|
14
|
+
} = node;
|
|
15
|
+
return attributes['data-role']?.value === 'modal-content' ? {
|
|
16
|
+
height,
|
|
17
|
+
width
|
|
17
18
|
} : getModalParent(parentNode);
|
|
18
19
|
};
|
|
19
20
|
exports.getModalParent = getModalParent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getModalParent.js","names":["getModalParent","node","tagName","attributes","
|
|
1
|
+
{"version":3,"file":"getModalParent.js","names":["getModalParent","node","tagName","attributes","offsetHeight","height","offsetWidth","width","parentNode","value","exports"],"sources":["../../../../src/primitives/Layer/helpers/getModalParent.js"],"sourcesContent":["export const getModalParent = (node) => {\n if (!node || node.tagName === 'HTML') return;\n\n const { attributes, offsetHeight: height, offsetWidth: width, parentNode } = node;\n\n return attributes['data-role']?.value === 'modal-content' ? { height, width } : getModalParent(parentNode);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAIC,IAAI,IAAK;EACtC,IAAI,CAACA,IAAI,IAAIA,IAAI,CAACC,OAAO,KAAK,MAAM,EAAE;EAEtC,MAAM;IAAEC,UAAU;IAAEC,YAAY,EAAEC,MAAM;IAAEC,WAAW,EAAEC,KAAK;IAAEC;EAAW,CAAC,GAAGP,IAAI;EAEjF,OAAOE,UAAU,CAAC,WAAW,CAAC,EAAEM,KAAK,KAAK,eAAe,GAAG;IAAEJ,MAAM;IAAEE;EAAM,CAAC,GAAGP,cAAc,CAACQ,UAAU,CAAC;AAC5G,CAAC;AAACE,OAAA,CAAAV,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -4,9 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getScrollParent = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
position
|
|
7
|
+
const getScrollParent = node => {
|
|
8
|
+
const {
|
|
9
|
+
position
|
|
10
|
+
} = node && (getComputedStyle(node) || {});
|
|
10
11
|
if (!node || node.tagName === 'HTML' || ['fixed', 'sticky'].includes(position)) return;
|
|
11
12
|
return node.scrollTop > 0 ? node : getScrollParent(node.parentNode);
|
|
12
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getScrollParent.js","names":["getScrollParent","node","
|
|
1
|
+
{"version":3,"file":"getScrollParent.js","names":["getScrollParent","node","position","getComputedStyle","tagName","includes","scrollTop","parentNode","exports"],"sources":["../../../../src/primitives/Layer/helpers/getScrollParent.js"],"sourcesContent":["export const getScrollParent = (node) => {\n const { position } = node && (getComputedStyle(node) || {});\n if (!node || node.tagName === 'HTML' || ['fixed', 'sticky'].includes(position)) return;\n\n return node.scrollTop > 0 ? node : getScrollParent(node.parentNode);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,eAAe,GAAIC,IAAI,IAAK;EACvC,MAAM;IAAEC;EAAS,CAAC,GAAGD,IAAI,KAAKE,gBAAgB,CAACF,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;EAC3D,IAAI,CAACA,IAAI,IAAIA,IAAI,CAACG,OAAO,KAAK,MAAM,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACH,QAAQ,CAAC,EAAE;EAEhF,OAAOD,IAAI,CAACK,SAAS,GAAG,CAAC,GAAGL,IAAI,GAAGD,eAAe,CAACC,IAAI,CAACM,UAAU,CAAC;AACrE,CAAC;AAACC,OAAA,CAAAR,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ Object.keys(_getElementLayout).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _getElementLayout[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _getElementLayout[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_getLayerPosition).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _getLayerPosition[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _getLayerPosition[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -31,7 +31,7 @@ Object.keys(_getModalParent).forEach(function (key) {
|
|
|
31
31
|
if (key in exports && exports[key] === _getModalParent[key]) return;
|
|
32
32
|
Object.defineProperty(exports, key, {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function
|
|
34
|
+
get: function () {
|
|
35
35
|
return _getModalParent[key];
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ Object.keys(_getScrollParent).forEach(function (key) {
|
|
|
42
42
|
if (key in exports && exports[key] === _getScrollParent[key]) return;
|
|
43
43
|
Object.defineProperty(exports, key, {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function
|
|
45
|
+
get: function () {
|
|
46
46
|
return _getScrollParent[key];
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -53,7 +53,7 @@ Object.keys(_isComponentFixed).forEach(function (key) {
|
|
|
53
53
|
if (key in exports && exports[key] === _isComponentFixed[key]) return;
|
|
54
54
|
Object.defineProperty(exports, key, {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _isComponentFixed[key];
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/primitives/Layer/helpers/index.js"],"sourcesContent":["export * from './getElementLayout';\nexport * from './getLayerPosition';\nexport * from './getModalParent';\nexport * from './getScrollParent';\nexport * from './isComponentFixed';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_getElementLayout","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getLayerPosition","_getModalParent","_getScrollParent","_isComponentFixed"],"sources":["../../../../src/primitives/Layer/helpers/index.js"],"sourcesContent":["export * from './getElementLayout';\nexport * from './getLayerPosition';\nexport * from './getModalParent';\nexport * from './getScrollParent';\nexport * from './isComponentFixed';\n"],"mappings":";;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,iBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,iBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,iBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,eAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,eAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,eAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,eAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,gBAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,gBAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,gBAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,gBAAA,CAAAP,GAAA;IAAA;EAAA;AAAA;AACA,IAAAQ,iBAAA,GAAAZ,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAU,iBAAA,EAAAT,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAQ,iBAAA,CAAAR,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,iBAAA,CAAAR,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -4,26 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isComponentFixed = void 0;
|
|
7
|
-
|
|
8
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
|
-
var isComponentFixed = function isComponentFixed(node) {
|
|
7
|
+
const isComponentFixed = node => {
|
|
11
8
|
if (!node) return;
|
|
12
|
-
|
|
13
|
-
if (!
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var _getComputedStyle = getComputedStyle(_node),
|
|
20
|
-
position = _getComputedStyle.position;
|
|
21
|
-
if (position === 'fixed' || getValue(_node.children)) return true;
|
|
22
|
-
}
|
|
23
|
-
} catch (err) {
|
|
24
|
-
_iterator.e(err);
|
|
25
|
-
} finally {
|
|
26
|
-
_iterator.f();
|
|
9
|
+
const getValue = nodes => {
|
|
10
|
+
if (!nodes?.length) return;
|
|
11
|
+
for (const node of nodes) {
|
|
12
|
+
const {
|
|
13
|
+
position
|
|
14
|
+
} = getComputedStyle(node);
|
|
15
|
+
if (position === 'fixed' || getValue(node.children)) return true;
|
|
27
16
|
}
|
|
28
17
|
};
|
|
29
18
|
return getValue([node]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isComponentFixed.js","names":["isComponentFixed","node","getValue","nodes","length","
|
|
1
|
+
{"version":3,"file":"isComponentFixed.js","names":["isComponentFixed","node","getValue","nodes","length","position","getComputedStyle","children","exports"],"sources":["../../../../src/primitives/Layer/helpers/isComponentFixed.js"],"sourcesContent":["export const isComponentFixed = (node) => {\n if (!node) return;\n\n const getValue = (nodes) => {\n if (!nodes?.length) return;\n\n for (const node of nodes) {\n const { position } = getComputedStyle(node);\n\n if (position === 'fixed' || getValue(node.children)) return true;\n }\n };\n\n return getValue([node]);\n};\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAIC,IAAI,IAAK;EACxC,IAAI,CAACA,IAAI,EAAE;EAEX,MAAMC,QAAQ,GAAIC,KAAK,IAAK;IAC1B,IAAI,CAACA,KAAK,EAAEC,MAAM,EAAE;IAEpB,KAAK,MAAMH,IAAI,IAAIE,KAAK,EAAE;MACxB,MAAM;QAAEE;MAAS,CAAC,GAAGC,gBAAgB,CAACL,IAAI,CAAC;MAE3C,IAAII,QAAQ,KAAK,OAAO,IAAIH,QAAQ,CAACD,IAAI,CAACM,QAAQ,CAAC,EAAE,OAAO,IAAI;IAClE;EACF,CAAC;EAED,OAAOL,QAAQ,CAAC,CAACD,IAAI,CAAC,CAAC;AACzB,CAAC;AAACO,OAAA,CAAAR,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ Object.keys(_Layer).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _Layer[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _Layer[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_LayerContent).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _LayerContent[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _LayerContent[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Layer/index.js"],"sourcesContent":["export * from './Layer';\nexport * from './LayerContent';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Layer","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_LayerContent"],"sources":["../../../src/primitives/Layer/index.js"],"sourcesContent":["export * from './Layer';\nexport * from './LayerContent';\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,aAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,aAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,aAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.constants.js","names":["KEY_ENTER"],"sources":["../../../src/primitives/Pressable/Pressable.constants.js"],"sourcesContent":["const KEY_ENTER = 'Enter';\n\nexport { KEY_ENTER };\n"],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Pressable.constants.js","names":["KEY_ENTER","exports"],"sources":["../../../src/primitives/Pressable/Pressable.constants.js"],"sourcesContent":["const KEY_ENTER = 'Enter';\n\nexport { KEY_ENTER };\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,OAAO","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
|
});
|
|
@@ -11,55 +10,46 @@ var _helpers = require("../../helpers");
|
|
|
11
10
|
var _Primitive = require("../Primitive");
|
|
12
11
|
var _Pressable = require("./Pressable.constants");
|
|
13
12
|
var _PressableModule = _interopRequireDefault(require("./Pressable.module.css"));
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
_ref$onPress = _ref.onPress,
|
|
35
|
-
onPress = _ref$onPress === void 0 ? function () {} : _ref$onPress,
|
|
36
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, _objectSpread(_objectSpread(_objectSpread({}, others), {}, {
|
|
38
|
-
disabled: disabled,
|
|
39
|
-
tag: tag
|
|
40
|
-
}, !disabled ? {
|
|
41
|
-
tabIndex: tabIndex,
|
|
42
|
-
onClick: function onClick(event) {
|
|
43
|
-
if (preventDefault) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
event.stopPropagation();
|
|
46
|
-
}
|
|
47
|
-
onPress(event);
|
|
48
|
-
},
|
|
49
|
-
onKeyPress: function onKeyPress(event) {
|
|
50
|
-
if (event.key === _Pressable.KEY_ENTER) {
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
const Pressable = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
disabled,
|
|
18
|
+
preventDefault = true,
|
|
19
|
+
tabIndex = 0,
|
|
20
|
+
tag = 'pressable',
|
|
21
|
+
onEnter,
|
|
22
|
+
onLeave,
|
|
23
|
+
onPress = () => {},
|
|
24
|
+
...others
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, {
|
|
27
|
+
...others,
|
|
28
|
+
disabled,
|
|
29
|
+
tag,
|
|
30
|
+
...(!disabled ? {
|
|
31
|
+
tabIndex,
|
|
32
|
+
onClick: event => {
|
|
51
33
|
if (preventDefault) {
|
|
52
34
|
event.preventDefault();
|
|
53
35
|
event.stopPropagation();
|
|
54
36
|
}
|
|
55
37
|
onPress(event);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
38
|
+
},
|
|
39
|
+
onKeyPress: event => {
|
|
40
|
+
if (event.key === _Pressable.KEY_ENTER) {
|
|
41
|
+
if (preventDefault) {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
event.stopPropagation();
|
|
44
|
+
}
|
|
45
|
+
onPress(event);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
onMouseEnter: onEnter,
|
|
49
|
+
onMouseLeave: onLeave
|
|
50
|
+
} : {}),
|
|
61
51
|
className: (0, _helpers.styles)(_PressableModule.default.pressable, disabled && _PressableModule.default.disabled, others.className)
|
|
62
|
-
}
|
|
52
|
+
}, children);
|
|
63
53
|
};
|
|
64
54
|
exports.Pressable = Pressable;
|
|
65
55
|
Pressable.displayName = 'Primitive:Pressable';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.js","names":["Pressable","children","disabled","preventDefault","tabIndex","tag","onEnter","onLeave","onPress","others","React","createElement","Primitive","onClick","event","stopPropagation","onKeyPress","key","KEY_ENTER","onMouseEnter","onMouseLeave","className","styles","style","pressable","displayName","propTypes","PropTypes","any","bool","oneOfType","number","string","func"],"sources":["../../../src/primitives/Pressable/Pressable.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport { KEY_ENTER } from './Pressable.constants';\nimport style from './Pressable.module.css';\n\nconst Pressable = ({\n children,\n disabled,\n preventDefault = true,\n tabIndex = 0,\n tag = 'pressable',\n onEnter,\n onLeave,\n onPress = () => {},\n ...others\n}) =>\n React.createElement(\n Primitive,\n {\n ...others,\n disabled,\n tag,\n ...(!disabled\n ? {\n tabIndex,\n onClick: (event) => {\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n onPress(event);\n },\n onKeyPress: (event) => {\n if (event.key === KEY_ENTER) {\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n onPress(event);\n }\n },\n onMouseEnter: onEnter,\n onMouseLeave: onLeave,\n }\n : {}),\n className: styles(style.pressable, disabled && style.disabled, others.className),\n },\n children,\n );\n\nPressable.displayName = 'Primitive:Pressable';\n\nPressable.propTypes = {\n children: PropTypes.any,\n disabled: PropTypes.bool,\n preventDefault: PropTypes.bool,\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n tag: PropTypes.string,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Pressable };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pressable.js","names":["_propTypes","_interopRequireDefault","require","_react","_helpers","_Primitive","_Pressable","_PressableModule","e","__esModule","default","Pressable","_ref","children","disabled","preventDefault","tabIndex","tag","onEnter","onLeave","onPress","others","React","createElement","Primitive","onClick","event","stopPropagation","onKeyPress","key","KEY_ENTER","onMouseEnter","onMouseLeave","className","styles","style","pressable","exports","displayName","propTypes","PropTypes","any","bool","oneOfType","number","string","func"],"sources":["../../../src/primitives/Pressable/Pressable.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport { KEY_ENTER } from './Pressable.constants';\nimport style from './Pressable.module.css';\n\nconst Pressable = ({\n children,\n disabled,\n preventDefault = true,\n tabIndex = 0,\n tag = 'pressable',\n onEnter,\n onLeave,\n onPress = () => {},\n ...others\n}) =>\n React.createElement(\n Primitive,\n {\n ...others,\n disabled,\n tag,\n ...(!disabled\n ? {\n tabIndex,\n onClick: (event) => {\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n onPress(event);\n },\n onKeyPress: (event) => {\n if (event.key === KEY_ENTER) {\n if (preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n onPress(event);\n }\n },\n onMouseEnter: onEnter,\n onMouseLeave: onLeave,\n }\n : {}),\n className: styles(style.pressable, disabled && style.disabled, others.className),\n },\n children,\n );\n\nPressable.displayName = 'Primitive:Pressable';\n\nPressable.propTypes = {\n children: PropTypes.any,\n disabled: PropTypes.bool,\n preventDefault: PropTypes.bool,\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n tag: PropTypes.string,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPress: PropTypes.func,\n};\n\nexport { Pressable };\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3C,MAAMG,SAAS,GAAGC,IAAA;EAAA,IAAC;I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kBAAS,CAACE,IAAI;EAC9B1B,QAAQ,EAAEwB,kBAAS,CAACG,SAAS,CAAC,CAACH,kBAAS,CAACI,MAAM,EAAEJ,kBAAS,CAACK,MAAM,CAAC,CAAC;EACnE5B,GAAG,EAAEuB,kBAAS,CAACK,MAAM;EACrB3B,OAAO,EAAEsB,kBAAS,CAACM,IAAI;EACvB3B,OAAO,EAAEqB,kBAAS,CAACM,IAAI;EACvB1B,OAAO,EAAEoB,kBAAS,CAACM;AACrB,CAAC","ignoreList":[]}
|
|
@@ -6,16 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.Story = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _Pressable = require("./Pressable");
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
var _default = {
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
var _default = exports.default = {
|
|
11
11
|
title: 'Primitives'
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
className: "children"
|
|
17
|
-
}, "children"));
|
|
18
|
-
};
|
|
13
|
+
const Story = props => /*#__PURE__*/_react.default.createElement(_Pressable.Pressable, props, /*#__PURE__*/_react.default.createElement("span", {
|
|
14
|
+
className: "children"
|
|
15
|
+
}, "children"));
|
|
19
16
|
exports.Story = Story;
|
|
20
17
|
Story.storyName = 'Pressable';
|
|
21
18
|
Story.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.stories.js","names":["title","Story","props","storyName","args","disabled","preventDefault","tag","testId","style","argTypes","onEnter","action","onLeave","onPress"],"sources":["../../../src/primitives/Pressable/Pressable.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from './Pressable';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => (\n <Pressable {...props}>\n <span className=\"children\">children</span>\n </Pressable>\n);\n\nStory.storyName = 'Pressable';\n\nStory.args = {\n disabled: false,\n preventDefault: true,\n tag: 'button',\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {\n onEnter: { action: 'onEnter' },\n onLeave: { action: 'onLeave' },\n onPress: { action: 'onPress' },\n};\n"],"mappings":";;;;;;AAAA;AAEA;AAAwC;AAAA,
|
|
1
|
+
{"version":3,"file":"Pressable.stories.js","names":["_react","_interopRequireDefault","require","_Pressable","e","__esModule","default","_default","exports","title","Story","props","createElement","Pressable","className","storyName","args","disabled","preventDefault","tag","testId","style","argTypes","onEnter","action","onLeave","onPress"],"sources":["../../../src/primitives/Pressable/Pressable.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from './Pressable';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => (\n <Pressable {...props}>\n <span className=\"children\">children</span>\n </Pressable>\n);\n\nStory.storyName = 'Pressable';\n\nStory.args = {\n disabled: false,\n preventDefault: true,\n tag: 'button',\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {\n onEnter: { action: 'onEnter' },\n onLeave: { action: 'onLeave' },\n onPress: { action: 'onPress' },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAAwC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEzB;EAAEG,KAAK,EAAE;AAAa,CAAC;AAE/B,MAAMC,KAAK,GAAIC,KAAK,iBACzBX,MAAA,CAAAM,OAAA,CAAAM,aAAA,CAACT,UAAA,CAAAU,SAAS,EAAKF,KAAK,eAClBX,MAAA,CAAAM,OAAA,CAAAM,aAAA;EAAME,SAAS,EAAC;AAAU,GAAC,UAAc,CAChC,CACZ;AAACN,OAAA,CAAAE,KAAA,GAAAA,KAAA;AAEFA,KAAK,CAACK,SAAS,GAAG,WAAW;AAE7BL,KAAK,CAACM,IAAI,GAAG;EACXC,QAAQ,EAAE,KAAK;EACfC,cAAc,EAAE,IAAI;EACpBC,GAAG,EAAE,QAAQ;EACb;EACAC,MAAM,EAAE,YAAY;EACpBC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDX,KAAK,CAACY,QAAQ,GAAG;EACfC,OAAO,EAAE;IAAEC,MAAM,EAAE;EAAU,CAAC;EAC9BC,OAAO,EAAE;IAAED,MAAM,EAAE;EAAU,CAAC;EAC9BE,OAAO,EAAE;IAAEF,MAAM,EAAE;EAAU;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Pressable/index.js"],"sourcesContent":["export * from './Pressable';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Pressable","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/primitives/Pressable/index.js"],"sourcesContent":["export * from './Pressable';\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|