@mirai/ui 2.0.42 → 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/default.theme.css +4 -4
- 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
|
@@ -1,115 +1,94 @@
|
|
|
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.Tooltip = void 0;
|
|
8
7
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _helpers = require("
|
|
11
|
-
var _primitives = require("../../primitives");
|
|
12
|
-
var _helpers2 = require("./helpers");
|
|
9
|
+
var _helpers = require("./helpers");
|
|
13
10
|
var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
18
|
-
function _interopRequireDefault(
|
|
19
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
-
visible = _useState2[0],
|
|
51
|
-
setVisible = _useState2[1];
|
|
52
|
-
var _useState3 = (0, _react.useState)({}),
|
|
53
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
54
|
-
position = _useState4[0],
|
|
55
|
-
setPosition = _useState4[1];
|
|
56
|
-
var contentRef = (0, _react.useRef)();
|
|
57
|
-
var ref = (0, _react.useRef)();
|
|
58
|
-
var fixed = inherit.fixed,
|
|
59
|
-
testId = inherit.testId,
|
|
60
|
-
others = _objectWithoutProperties(inherit, _excluded2);
|
|
61
|
-
var left = position.left,
|
|
62
|
-
right = position.right,
|
|
63
|
-
_position$top = position.top,
|
|
64
|
-
top = _position$top === void 0 ? propTop : _position$top;
|
|
65
|
-
(0, _react.useEffect)(function () {
|
|
11
|
+
var _helpers2 = require("../../helpers");
|
|
12
|
+
var _primitives = require("../../primitives");
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
17
|
+
const Tooltip = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
children,
|
|
20
|
+
left: propLeft,
|
|
21
|
+
pressable = false,
|
|
22
|
+
right: propRight,
|
|
23
|
+
Template,
|
|
24
|
+
text,
|
|
25
|
+
timestamp,
|
|
26
|
+
top: propTop,
|
|
27
|
+
visible: propVisible = false,
|
|
28
|
+
onPress = () => {},
|
|
29
|
+
...inherit
|
|
30
|
+
} = _ref;
|
|
31
|
+
const [visible, setVisible] = (0, _react.useState)(propVisible);
|
|
32
|
+
const [position, setPosition] = (0, _react.useState)({});
|
|
33
|
+
const contentRef = (0, _react.useRef)();
|
|
34
|
+
const ref = (0, _react.useRef)();
|
|
35
|
+
const {
|
|
36
|
+
fixed,
|
|
37
|
+
testId,
|
|
38
|
+
...others
|
|
39
|
+
} = inherit;
|
|
40
|
+
const {
|
|
41
|
+
left,
|
|
42
|
+
right,
|
|
43
|
+
top = propTop
|
|
44
|
+
} = position;
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
66
46
|
if (!pressable || !visible) return;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return !
|
|
47
|
+
const handleClickOutside = function () {
|
|
48
|
+
let {
|
|
49
|
+
target
|
|
50
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
51
|
+
return !contentRef.current?.contains(target) && !ref.current?.contains(target) && setVisible(false);
|
|
72
52
|
};
|
|
73
53
|
document.addEventListener('click', handleClickOutside, true);
|
|
74
|
-
return
|
|
75
|
-
return document.removeEventListener('click', handleClickOutside, true);
|
|
76
|
-
};
|
|
54
|
+
return () => document.removeEventListener('click', handleClickOutside, true);
|
|
77
55
|
|
|
78
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
79
57
|
}, [visible]);
|
|
80
58
|
return text || Template ? /*#__PURE__*/_react.default.createElement(_primitives.Layer, {
|
|
81
|
-
fixed
|
|
82
|
-
testId
|
|
83
|
-
timestamp
|
|
84
|
-
top
|
|
85
|
-
visible
|
|
59
|
+
fixed,
|
|
60
|
+
testId,
|
|
61
|
+
timestamp,
|
|
62
|
+
top,
|
|
63
|
+
visible,
|
|
86
64
|
centered: true,
|
|
87
65
|
forceRender: false,
|
|
88
66
|
left: propLeft,
|
|
89
67
|
right: propRight,
|
|
90
68
|
tag: "tooltip",
|
|
91
69
|
onPosition: setPosition
|
|
92
|
-
}, /*#__PURE__*/_react.default.createElement(pressable ? _primitives.View : _react.default.Fragment,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
70
|
+
}, /*#__PURE__*/_react.default.createElement(pressable ? _primitives.View : _react.default.Fragment, {
|
|
71
|
+
...(pressable ? {
|
|
72
|
+
ref
|
|
73
|
+
} : undefined)
|
|
74
|
+
}, _react.default.Children.map(children, (child, index) => {
|
|
75
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
76
|
+
key: index,
|
|
77
|
+
...child.props,
|
|
78
|
+
onClick: pressable ? event => {
|
|
100
79
|
event.stopPropagation();
|
|
101
80
|
setVisible(!visible);
|
|
102
81
|
onPress(event, !visible);
|
|
103
|
-
} : undefined
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
82
|
+
} : undefined,
|
|
83
|
+
[(0, _helpers.isPressableInstance)(child) ? 'onEnter' : 'onMouseEnter']: !pressable ? () => setVisible(true) : undefined,
|
|
84
|
+
[(0, _helpers.isPressableInstance)(child) ? 'onLeave' : 'onMouseLeave']: !pressable ? () => setVisible(false) : undefined,
|
|
85
|
+
className: (0, _helpers2.styles)(_TooltipModule.default.dispatcher, child.props.className),
|
|
86
|
+
testId: testId ? `${testId}-dispatcher` : undefined
|
|
87
|
+
});
|
|
109
88
|
})), /*#__PURE__*/_react.default.createElement(_primitives.LayerContent, null, /*#__PURE__*/_react.default.createElement(_primitives.View, _extends({}, others, pressable ? {
|
|
110
89
|
ref: contentRef
|
|
111
90
|
} : undefined, {
|
|
112
|
-
className: (0,
|
|
91
|
+
className: (0, _helpers2.styles)(_TooltipModule.default.tooltip, (propLeft || propRight) && _TooltipModule.default.align, left && _TooltipModule.default.left, right && _TooltipModule.default.right, top ? _TooltipModule.default.top : _TooltipModule.default.bottom, others.className)
|
|
113
92
|
}), Template ? /*#__PURE__*/_react.default.createElement(Template, null) : /*#__PURE__*/_react.default.createElement(_primitives.Text, {
|
|
114
93
|
bold: true,
|
|
115
94
|
small: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["Tooltip","children","propLeft","left","pressable","propRight","right","Template","text","timestamp","propTop","top","visible","propVisible","onPress","inherit","useState","setVisible","position","setPosition","contentRef","useRef","ref","fixed","testId","others","useEffect","handleClickOutside","target","current","contains","document","addEventListener","removeEventListener","React","createElement","View","Fragment","undefined","Children","map","child","index","cloneElement","key","props","onClick","event","stopPropagation","isPressableInstance","styles","style","dispatcher","className","tooltip","align","bottom","displayName","propTypes","PropTypes","node","isRequired","bool","oneOfType","func","string","number"],"sources":["../../../src/components/Tooltip/Tooltip.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useState, useRef } from 'react';\n\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent, Text, View } from '../../primitives';\nimport { isPressableInstance } from './helpers';\nimport style from './Tooltip.module.css';\n\nconst Tooltip = ({\n children,\n left: propLeft,\n pressable = false,\n right: propRight,\n Template,\n text,\n timestamp,\n top: propTop,\n visible: propVisible = false,\n onPress = () => {},\n ...inherit\n}) => {\n const [visible, setVisible] = useState(propVisible);\n const [position, setPosition] = useState({});\n const contentRef = useRef();\n const ref = useRef();\n\n const { fixed, testId, ...others } = inherit;\n const { left, right, top = propTop } = position;\n\n useEffect(() => {\n if (!pressable || !visible) return;\n\n const handleClickOutside = ({ target } = {}) =>\n !contentRef.current?.contains(target) && !ref.current?.contains(target) && setVisible(false);\n\n document.addEventListener('click', handleClickOutside, true);\n\n return () => document.removeEventListener('click', handleClickOutside, true);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [visible]);\n\n return text || Template ? (\n <Layer\n {...{ fixed, testId, timestamp, top, visible }}\n centered\n forceRender={false}\n left={propLeft}\n right={propRight}\n tag=\"tooltip\"\n onPosition={setPosition}\n >\n {React.createElement(\n pressable ? View : React.Fragment,\n { ...(pressable ? { ref } : undefined) },\n React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n key: index,\n ...child.props,\n onClick: pressable\n ? (event) => {\n event.stopPropagation();\n setVisible(!visible);\n onPress(event, !visible);\n }\n : undefined,\n [isPressableInstance(child) ? 'onEnter' : 'onMouseEnter']: !pressable ? () => setVisible(true) : undefined,\n [isPressableInstance(child) ? 'onLeave' : 'onMouseLeave']: !pressable ? () => setVisible(false) : undefined,\n className: styles(style.dispatcher, child.props.className),\n testId: testId ? `${testId}-dispatcher` : undefined,\n });\n }),\n )}\n\n <LayerContent>\n <View\n {...others}\n {...(pressable ? { ref: contentRef } : undefined)}\n className={styles(\n style.tooltip,\n (propLeft || propRight) && style.align,\n left && style.left,\n right && style.right,\n top ? style.top : style.bottom,\n others.className,\n )}\n >\n {Template ? (\n <Template />\n ) : (\n <Text bold small className={style.text}>\n {text}\n </Text>\n )}\n </View>\n </LayerContent>\n </Layer>\n ) : (\n <>{children}</>\n );\n};\n\nTooltip.displayName = 'Component:Tooltip';\n\nTooltip.propTypes = {\n children: PropTypes.node.isRequired,\n left: PropTypes.bool,\n pressable: PropTypes.bool,\n right: PropTypes.bool,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n timestamp: PropTypes.number,\n top: PropTypes.bool,\n visible: PropTypes.bool,\n onPress: PropTypes.func,\n};\n\nexport { Tooltip };\n"],"mappings":";;;;;;;AAAA;AACA;AAEA;AACA;AACA;AAC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EAClBzD,QAAQ,EAAE0D,kBAAS,CAACC,IAAI,CAACC,UAAU;EACnC1D,IAAI,EAAEwD,kBAAS,CAACG,IAAI;EACpB1D,SAAS,EAAEuD,kBAAS,CAACG,IAAI;EACzBxD,KAAK,EAAEqD,kBAAS,CAACG,IAAI;EACrBvD,QAAQ,EAAEoD,kBAAS,CAACI,SAAS,CAAC,CAACJ,kBAAS,CAACC,IAAI,EAAED,kBAAS,CAACK,IAAI,CAAC,CAAC;EAC/DxD,IAAI,EAAEmD,kBAAS,CAACM,MAAM;EACtBxD,SAAS,EAAEkD,kBAAS,CAACO,MAAM;EAC3BvD,GAAG,EAAEgD,kBAAS,CAACG,IAAI;EACnBlD,OAAO,EAAE+C,kBAAS,CAACG,IAAI;EACvBhD,OAAO,EAAE6C,kBAAS,CAACK;AACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["_propTypes","_interopRequireDefault","require","_react","_interopRequireWildcard","_helpers","_TooltipModule","_helpers2","_primitives","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","Tooltip","_ref","children","left","propLeft","pressable","right","propRight","Template","text","timestamp","top","propTop","visible","propVisible","onPress","inherit","setVisible","useState","position","setPosition","contentRef","useRef","ref","fixed","testId","others","useEffect","handleClickOutside","target","undefined","current","contains","document","addEventListener","removeEventListener","createElement","Layer","centered","forceRender","tag","onPosition","React","View","Fragment","Children","map","child","index","cloneElement","key","props","onClick","event","stopPropagation","isPressableInstance","className","styles","style","dispatcher","LayerContent","tooltip","align","bottom","Text","bold","small","exports","displayName","propTypes","PropTypes","node","isRequired","bool","oneOfType","func","string","number"],"sources":["../../../src/components/Tooltip/Tooltip.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React, { useEffect, useState, useRef } from 'react';\n\nimport { isPressableInstance } from './helpers';\nimport style from './Tooltip.module.css';\nimport { styles } from '../../helpers';\nimport { Layer, LayerContent, Text, View } from '../../primitives';\n\nconst Tooltip = ({\n children,\n left: propLeft,\n pressable = false,\n right: propRight,\n Template,\n text,\n timestamp,\n top: propTop,\n visible: propVisible = false,\n onPress = () => {},\n ...inherit\n}) => {\n const [visible, setVisible] = useState(propVisible);\n const [position, setPosition] = useState({});\n const contentRef = useRef();\n const ref = useRef();\n\n const { fixed, testId, ...others } = inherit;\n const { left, right, top = propTop } = position;\n\n useEffect(() => {\n if (!pressable || !visible) return;\n\n const handleClickOutside = ({ target } = {}) =>\n !contentRef.current?.contains(target) && !ref.current?.contains(target) && setVisible(false);\n\n document.addEventListener('click', handleClickOutside, true);\n\n return () => document.removeEventListener('click', handleClickOutside, true);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [visible]);\n\n return text || Template ? (\n <Layer\n {...{ fixed, testId, timestamp, top, visible }}\n centered\n forceRender={false}\n left={propLeft}\n right={propRight}\n tag=\"tooltip\"\n onPosition={setPosition}\n >\n {React.createElement(\n pressable ? View : React.Fragment,\n { ...(pressable ? { ref } : undefined) },\n React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n key: index,\n ...child.props,\n onClick: pressable\n ? (event) => {\n event.stopPropagation();\n setVisible(!visible);\n onPress(event, !visible);\n }\n : undefined,\n [isPressableInstance(child) ? 'onEnter' : 'onMouseEnter']: !pressable ? () => setVisible(true) : undefined,\n [isPressableInstance(child) ? 'onLeave' : 'onMouseLeave']: !pressable ? () => setVisible(false) : undefined,\n className: styles(style.dispatcher, child.props.className),\n testId: testId ? `${testId}-dispatcher` : undefined,\n });\n }),\n )}\n\n <LayerContent>\n <View\n {...others}\n {...(pressable ? { ref: contentRef } : undefined)}\n className={styles(\n style.tooltip,\n (propLeft || propRight) && style.align,\n left && style.left,\n right && style.right,\n top ? style.top : style.bottom,\n others.className,\n )}\n >\n {Template ? (\n <Template />\n ) : (\n <Text bold small className={style.text}>\n {text}\n </Text>\n )}\n </View>\n </LayerContent>\n </Layer>\n ) : (\n <>{children}</>\n );\n};\n\nTooltip.displayName = 'Component:Tooltip';\n\nTooltip.propTypes = {\n children: PropTypes.node.isRequired,\n left: PropTypes.bool,\n pressable: PropTypes.bool,\n right: PropTypes.bool,\n Template: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n text: PropTypes.string,\n timestamp: PropTypes.number,\n top: PropTypes.bool,\n visible: PropTypes.bool,\n onPress: PropTypes.func,\n};\n\nexport { Tooltip };\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAmE,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA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AACI,SAAS,CAAC,CAACJ,kBAAS,CAACC,IAAI,EAAED,kBAAS,CAACK,IAAI,CAAC,CAAC;EAC/DlE,IAAI,EAAE6D,kBAAS,CAACM,MAAM;EACtBlE,SAAS,EAAE4D,kBAAS,CAACO,MAAM;EAC3BlE,GAAG,EAAE2D,kBAAS,CAACG,IAAI;EACnB5D,OAAO,EAAEyD,kBAAS,CAACG,IAAI;EACvB1D,OAAO,EAAEuD,kBAAS,CAACK;AACrB,CAAC","ignoreList":[]}
|
|
@@ -7,108 +7,95 @@ exports.default = exports.Story = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _ = require("../../");
|
|
9
9
|
var _Tooltip = require("./Tooltip");
|
|
10
|
-
function _interopRequireDefault(
|
|
11
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
-
var _default = {
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
|
+
var _default = exports.default = {
|
|
13
13
|
title: 'Components'
|
|
14
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, INSTANCES.map(function (number) {
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, _extends({}, props, {
|
|
101
|
-
bottom: true,
|
|
102
|
-
key: number,
|
|
103
|
-
Template: Template
|
|
104
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
105
|
-
className: "children",
|
|
106
|
-
style: {
|
|
107
|
-
margin: 'var(--mirai-ui-space-XS)'
|
|
108
|
-
}
|
|
109
|
-
}, "hover:node"));
|
|
110
|
-
})));
|
|
111
|
-
};
|
|
15
|
+
const INSTANCES = Array.from(Array(3).keys());
|
|
16
|
+
const Template = () => /*#__PURE__*/_react.default.createElement(_.View, {
|
|
17
|
+
row: true,
|
|
18
|
+
style: {
|
|
19
|
+
padding: 4
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
22
|
+
style: {
|
|
23
|
+
marginRight: 12,
|
|
24
|
+
height: 32,
|
|
25
|
+
width: 32,
|
|
26
|
+
borderRadius: '50%',
|
|
27
|
+
backgroundColor: 'grey',
|
|
28
|
+
backgroundImage: 'url(https://raw.githubusercontent.com/soyjavi/site/master/public/soyjavi.jpg)',
|
|
29
|
+
backgroundSize: 'cover',
|
|
30
|
+
border: 'none'
|
|
31
|
+
}
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement(_.View, null, /*#__PURE__*/_react.default.createElement(_.Text, {
|
|
33
|
+
bold: true,
|
|
34
|
+
action: true,
|
|
35
|
+
style: {
|
|
36
|
+
color: 'white'
|
|
37
|
+
}
|
|
38
|
+
}, "Javi Jimenez Villar"), /*#__PURE__*/_react.default.createElement(_.Text, {
|
|
39
|
+
small: true,
|
|
40
|
+
style: {
|
|
41
|
+
color: 'white'
|
|
42
|
+
}
|
|
43
|
+
}, "@soyjavi")));
|
|
44
|
+
const Story = props => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_.View, {
|
|
45
|
+
row: true,
|
|
46
|
+
style: {
|
|
47
|
+
justifyContent: 'space-between'
|
|
48
|
+
}
|
|
49
|
+
}, INSTANCES.map(number => /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, _extends({}, props, {
|
|
50
|
+
key: number,
|
|
51
|
+
top: true
|
|
52
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
53
|
+
className: "children",
|
|
54
|
+
style: {
|
|
55
|
+
margin: 'var(--mirai-ui-space-XS)'
|
|
56
|
+
}
|
|
57
|
+
}, "hover:text")))), /*#__PURE__*/_react.default.createElement(_.View, {
|
|
58
|
+
row: true,
|
|
59
|
+
style: {
|
|
60
|
+
justifyContent: 'space-between'
|
|
61
|
+
}
|
|
62
|
+
}, INSTANCES.map(number => /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, _extends({}, props, {
|
|
63
|
+
key: number,
|
|
64
|
+
right: true
|
|
65
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
66
|
+
className: "children",
|
|
67
|
+
style: {
|
|
68
|
+
margin: 'var(--mirai-ui-space-XS)'
|
|
69
|
+
}
|
|
70
|
+
}, "hover:text:right")))), /*#__PURE__*/_react.default.createElement(_.View, {
|
|
71
|
+
row: true,
|
|
72
|
+
style: {
|
|
73
|
+
justifyContent: 'space-between'
|
|
74
|
+
}
|
|
75
|
+
}, INSTANCES.map(number => /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, _extends({}, props, {
|
|
76
|
+
key: number,
|
|
77
|
+
left: true,
|
|
78
|
+
text: "Lorem ipsum dolor sit"
|
|
79
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
80
|
+
className: "children",
|
|
81
|
+
style: {
|
|
82
|
+
margin: 'var(--mirai-ui-space-XS)'
|
|
83
|
+
}
|
|
84
|
+
}, "hover:text:left")))), /*#__PURE__*/_react.default.createElement(_.View, {
|
|
85
|
+
row: true,
|
|
86
|
+
style: {
|
|
87
|
+
justifyContent: 'space-between'
|
|
88
|
+
}
|
|
89
|
+
}, INSTANCES.map(number => /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, _extends({}, props, {
|
|
90
|
+
bottom: true,
|
|
91
|
+
key: number,
|
|
92
|
+
Template: Template
|
|
93
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
94
|
+
className: "children",
|
|
95
|
+
style: {
|
|
96
|
+
margin: 'var(--mirai-ui-space-XS)'
|
|
97
|
+
}
|
|
98
|
+
}, "hover:node")))));
|
|
112
99
|
exports.Story = Story;
|
|
113
100
|
Story.storyName = 'Tooltip';
|
|
114
101
|
Story.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.stories.js","names":["title","INSTANCES","Array","from","keys","Template","padding","marginRight","height","width","borderRadius","backgroundColor","backgroundImage","backgroundSize","border","color","Story","props","justifyContent","map","number","
|
|
1
|
+
{"version":3,"file":"Tooltip.stories.js","names":["_react","_interopRequireDefault","require","_","_Tooltip","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_default","exports","title","INSTANCES","Array","from","keys","Template","createElement","View","row","style","padding","marginRight","height","width","borderRadius","backgroundColor","backgroundImage","backgroundSize","border","Text","bold","action","color","small","Story","props","Fragment","justifyContent","map","number","Tooltip","key","top","className","margin","right","left","text","bottom","storyName","args","pressable","visible","testId","argTypes","onClose"],"sources":["../../../src/components/Tooltip/Tooltip.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { Text, View } from '../../';\nimport { Tooltip } from './Tooltip';\n\nexport default { title: 'Components' };\n\nconst INSTANCES = Array.from(Array(3).keys());\n\nconst Template = () => (\n <View row style={{ padding: 4 }}>\n <img\n style={{\n marginRight: 12,\n height: 32,\n width: 32,\n borderRadius: '50%',\n backgroundColor: 'grey',\n backgroundImage: 'url(https://raw.githubusercontent.com/soyjavi/site/master/public/soyjavi.jpg)',\n backgroundSize: 'cover',\n border: 'none',\n }}\n />\n <View>\n <Text bold action style={{ color: 'white' }}>\n Javi Jimenez Villar\n </Text>\n <Text small style={{ color: 'white' }}>\n @soyjavi\n </Text>\n </View>\n </View>\n);\n\nexport const Story = (props) => (\n <>\n <View row style={{ justifyContent: 'space-between' }}>\n {INSTANCES.map((number) => (\n <Tooltip {...props} key={number} top>\n <span className=\"children\" style={{ margin: 'var(--mirai-ui-space-XS)' }}>\n hover:text\n </span>\n </Tooltip>\n ))}\n </View>\n\n <View row style={{ justifyContent: 'space-between' }}>\n {INSTANCES.map((number) => (\n <Tooltip {...props} key={number} right>\n <span className=\"children\" style={{ margin: 'var(--mirai-ui-space-XS)' }}>\n hover:text:right\n </span>\n </Tooltip>\n ))}\n </View>\n <View row style={{ justifyContent: 'space-between' }}>\n {INSTANCES.map((number) => (\n <Tooltip {...props} key={number} left text=\"Lorem ipsum dolor sit\">\n <span className=\"children\" style={{ margin: 'var(--mirai-ui-space-XS)' }}>\n hover:text:left\n </span>\n </Tooltip>\n ))}\n </View>\n\n <View row style={{ justifyContent: 'space-between' }}>\n {INSTANCES.map((number) => (\n <Tooltip {...props} bottom key={number} Template={Template}>\n <span className=\"children\" style={{ margin: 'var(--mirai-ui-space-XS)' }}>\n hover:node\n </span>\n </Tooltip>\n ))}\n </View>\n </>\n);\n\nStory.storyName = 'Tooltip';\n\nStory.args = {\n pressable: false,\n text: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi nemo adipisci consequatur et tenetur natus',\n visible: false,\n // inherited properties\n testId: 'test-story',\n style: {},\n};\n\nStory.argTypes = {\n onClose: { action: 'onClose' },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,CAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAAoC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAAA,IAAAO,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAErB;EAAEe,KAAK,EAAE;AAAa,CAAC;AAEtC,MAAMC,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACD,KAAK,CAAC,CAAC,CAAC,CAACE,IAAI,CAAC,CAAC,CAAC;AAE7C,MAAMC,QAAQ,GAAGA,CAAA,kBACf3B,MAAA,CAAAO,OAAA,CAAAqB,aAAA,CAACzB,CA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,CAAC2B,GAAG,CAAEC,MAAM,iBACpBnD,MAAA,CAAAO,OAAA,CAAAqB,aAAA,CAACxB,QAAA,CAAAgD,OAAO,EAAA5C,QAAA,KAAKuC,KAAK;EAAEa,MAAM;EAACP,GAAG,EAAEF,MAAO;EAACxB,QAAQ,EAAEA;AAAS,iBACzD3B,MAAA,CAAAO,OAAA,CAAAqB,aAAA;EAAM2B,SAAS,EAAC,UAAU;EAACxB,KAAK,EAAE;IAAEyB,MAAM,EAAE;EAA2B;AAAE,GAAC,YAEpE,CACC,CACV,CACG,CACN,CACH;AAACnC,OAAA,CAAAyB,KAAA,GAAAA,KAAA;AAEFA,KAAK,CAACe,SAAS,GAAG,SAAS;AAE3Bf,KAAK,CAACgB,IAAI,GAAG;EACXC,SAAS,EAAE,KAAK;EAChBJ,IAAI,EAAE,2GAA2G;EACjHK,OAAO,EAAE,KAAK;EACd;EACAC,MAAM,EAAE,YAAY;EACpBlC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDe,KAAK,CAACoB,QAAQ,GAAG;EACfC,OAAO,EAAE;IAAExB,MAAM,EAAE;EAAU;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ Object.keys(_isPressableInstance).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _isPressableInstance[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _isPressableInstance[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Tooltip/helpers/index.js"],"sourcesContent":["export * from './isPressableInstance';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_isPressableInstance","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/Tooltip/helpers/index.js"],"sourcesContent":["export * from './isPressableInstance';\n"],"mappings":";;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,oBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,oBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,oBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isPressableInstance = void 0;
|
|
7
7
|
var _primitives = require("../../../primitives");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const isPressableInstance = function () {
|
|
9
|
+
let {
|
|
10
|
+
type: {
|
|
11
|
+
displayName
|
|
12
|
+
} = {}
|
|
13
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13
14
|
return displayName === _primitives.Pressable.displayName;
|
|
14
15
|
};
|
|
15
16
|
exports.isPressableInstance = isPressableInstance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPressableInstance.js","names":["isPressableInstance","type","displayName","Pressable"],"sources":["../../../../src/components/Tooltip/helpers/isPressableInstance.js"],"sourcesContent":["import { Pressable } from '../../../primitives';\n\nexport const isPressableInstance = ({ type: { displayName } = {} } = {}) => displayName === Pressable.displayName;\n"],"mappings":";;;;;;AAAA;AAEO,
|
|
1
|
+
{"version":3,"file":"isPressableInstance.js","names":["_primitives","require","isPressableInstance","type","displayName","arguments","length","undefined","Pressable","exports"],"sources":["../../../../src/components/Tooltip/helpers/isPressableInstance.js"],"sourcesContent":["import { Pressable } from '../../../primitives';\n\nexport const isPressableInstance = ({ type: { displayName } = {} } = {}) => displayName === Pressable.displayName;\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEO,MAAMC,mBAAmB,GAAG,SAAAA,CAAA;EAAA,IAAC;IAAEC,IAAI,EAAE;MAAEC;IAAY,CAAC,GAAG,CAAC;EAAE,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAAKD,WAAW,KAAKI,qBAAS,CAACJ,WAAW;AAAA;AAACK,OAAA,CAAAP,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Tooltip/index.js"],"sourcesContent":["export * from './Tooltip';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Tooltip","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/components/Tooltip/index.js"],"sourcesContent":["export * from './Tooltip';\n"],"mappings":";;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,QAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,QAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,QAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.customElements.js","names":["CustomElement","HTMLButtonElement","HTMLLabelElement"],"sources":["../../src/components/components.customElements.js"],"sourcesContent":["import { CustomElement } from '../helpers';\n\nCustomElement('ui-button', HTMLButtonElement, 'button');\nCustomElement('ui-label', HTMLLabelElement, 'label');\n"],"mappings":";;AAAA;AAEA,
|
|
1
|
+
{"version":3,"file":"components.customElements.js","names":["_helpers","require","CustomElement","HTMLButtonElement","HTMLLabelElement"],"sources":["../../src/components/components.customElements.js"],"sourcesContent":["import { CustomElement } from '../helpers';\n\nCustomElement('ui-button', HTMLButtonElement, 'button');\nCustomElement('ui-label', HTMLLabelElement, 'label');\n"],"mappings":";;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAa,EAAC,WAAW,EAAEC,iBAAiB,EAAE,QAAQ,CAAC;AACvD,IAAAD,sBAAa,EAAC,UAAU,EAAEE,gBAAgB,EAAE,OAAO,CAAC","ignoreList":[]}
|