@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,31 +1,16 @@
|
|
|
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.parseMarkdown = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _helpers = require("../../Primitive/helpers");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
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); }
|
|
22
|
-
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; }
|
|
23
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
var LINK_REGEXP = /\[(.*?)\]\((.*?)\)/;
|
|
26
|
-
var MARKDOWN_REGEXP = /(\*\*|\*|_|~~|\[|\{)(.+?)(?:\1|\)|\})/g;
|
|
27
|
-
var SPACE_REGEXP = /\s/g;
|
|
28
|
-
var STYLE = {
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const LINK_REGEXP = /\[(.*?)\]\((.*?)\)/;
|
|
11
|
+
const MARKDOWN_REGEXP = /(\*\*|\*|_|~~|\[|\{)(.+?)(?:\1|\)|\})/g;
|
|
12
|
+
const SPACE_REGEXP = /\s/g;
|
|
13
|
+
const STYLE = {
|
|
29
14
|
BINDING: {
|
|
30
15
|
style: {
|
|
31
16
|
color: 'var(--mirai-ui-accent)',
|
|
@@ -59,42 +44,41 @@ var STYLE = {
|
|
|
59
44
|
}
|
|
60
45
|
}
|
|
61
46
|
};
|
|
62
|
-
|
|
63
|
-
|
|
47
|
+
const parseMarkdown = function (value) {
|
|
48
|
+
let tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'text';
|
|
64
49
|
if (!value || typeof value !== 'string' || value.match(SPACE_REGEXP) === null || value.match(MARKDOWN_REGEXP) === null) {
|
|
65
50
|
return value;
|
|
66
51
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
52
|
+
const tokens = [];
|
|
53
|
+
let lastIndex = 0;
|
|
54
|
+
let match;
|
|
70
55
|
while ((match = MARKDOWN_REGEXP.exec(value)) !== null) {
|
|
71
|
-
|
|
72
|
-
_match2 = _slicedToArray(_match, 3),
|
|
73
|
-
raw = _match2[0],
|
|
74
|
-
start = _match2[1],
|
|
75
|
-
text = _match2[2];
|
|
56
|
+
const [raw, start, text] = match;
|
|
76
57
|
if (value.slice(lastIndex, match.index)) tokens.push({
|
|
77
58
|
text: value.slice(lastIndex, match.index)
|
|
78
59
|
});
|
|
79
|
-
if (start === '**') tokens.push(
|
|
80
|
-
text
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
text
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
60
|
+
if (start === '**') tokens.push({
|
|
61
|
+
text,
|
|
62
|
+
...STYLE.BOLD
|
|
63
|
+
});else if (start === '*') tokens.push({
|
|
64
|
+
text,
|
|
65
|
+
...STYLE.ITALIC
|
|
66
|
+
});else if (start === '_') tokens.push({
|
|
67
|
+
text,
|
|
68
|
+
...STYLE.UNDERLINE
|
|
69
|
+
});else if (start === '~~') tokens.push({
|
|
70
|
+
text,
|
|
71
|
+
...STYLE.LINE_THROUGH
|
|
72
|
+
});else if (start === '{') tokens.push({
|
|
73
|
+
text: raw,
|
|
74
|
+
...STYLE.BINDING
|
|
75
|
+
});else if (start === '[') {
|
|
76
|
+
const [, title, href] = raw.match(LINK_REGEXP);
|
|
77
|
+
tokens.push({
|
|
95
78
|
text: title,
|
|
96
|
-
href
|
|
97
|
-
|
|
79
|
+
href,
|
|
80
|
+
...STYLE.LINK
|
|
81
|
+
});
|
|
98
82
|
} else {
|
|
99
83
|
tokens.push({
|
|
100
84
|
text: raw
|
|
@@ -105,12 +89,15 @@ var parseMarkdown = function parseMarkdown(value) {
|
|
|
105
89
|
if (value.slice(lastIndex)) tokens.push({
|
|
106
90
|
text: value.slice(lastIndex)
|
|
107
91
|
});
|
|
108
|
-
return tokens.map(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
92
|
+
return tokens.map((_ref, index) => {
|
|
93
|
+
let {
|
|
94
|
+
text,
|
|
95
|
+
...props
|
|
96
|
+
} = _ref;
|
|
97
|
+
return Object.keys(props).length ? /*#__PURE__*/_react.default.createElement(props.href ? 'a' : (0, _helpers.getTag)(tag), {
|
|
98
|
+
key: index,
|
|
99
|
+
...props
|
|
100
|
+
}, text) : text;
|
|
114
101
|
});
|
|
115
102
|
};
|
|
116
103
|
exports.parseMarkdown = parseMarkdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseMarkdown.js","names":["LINK_REGEXP","MARKDOWN_REGEXP","SPACE_REGEXP","STYLE","BINDING","style","color","fontWeight","BOLD","ITALIC","fontStyle","LINE_THROUGH","textDecoration","LINK","UNDERLINE","parseMarkdown","value","tag","match","tokens","lastIndex","exec","raw","start","text","slice","index","push","title","href","map","props","Object","keys","
|
|
1
|
+
{"version":3,"file":"parseMarkdown.js","names":["_react","_interopRequireDefault","require","_helpers","e","__esModule","default","LINK_REGEXP","MARKDOWN_REGEXP","SPACE_REGEXP","STYLE","BINDING","style","color","fontWeight","BOLD","ITALIC","fontStyle","LINE_THROUGH","textDecoration","LINK","UNDERLINE","parseMarkdown","value","tag","arguments","length","undefined","match","tokens","lastIndex","exec","raw","start","text","slice","index","push","title","href","map","_ref","props","Object","keys","React","createElement","getTag","key","exports"],"sources":["../../../../src/primitives/Text/helpers/parseMarkdown.js"],"sourcesContent":["import React from 'react';\n\nimport { getTag } from '../../Primitive/helpers';\n\nconst LINK_REGEXP = /\\[(.*?)\\]\\((.*?)\\)/;\nconst MARKDOWN_REGEXP = /(\\*\\*|\\*|_|~~|\\[|\\{)(.+?)(?:\\1|\\)|\\})/g;\nconst SPACE_REGEXP = /\\s/g;\n\nconst STYLE = {\n BINDING: { style: { color: 'var(--mirai-ui-accent)', fontWeight: 'bold' } },\n BOLD: { style: { fontWeight: 'bold' } },\n ITALIC: { style: { fontStyle: 'italic' } },\n LINE_THROUGH: { style: { textDecoration: 'line-through' } },\n LINK: { style: { textDecoration: 'underline', color: 'var(--mirai-ui-accent)' } },\n UNDERLINE: { style: { textDecoration: 'underline' } },\n};\n\nexport const parseMarkdown = (value, tag = 'text') => {\n if (\n !value ||\n typeof value !== 'string' ||\n value.match(SPACE_REGEXP) === null ||\n value.match(MARKDOWN_REGEXP) === null\n ) {\n return value;\n }\n\n const tokens = [];\n let lastIndex = 0;\n let match;\n\n while ((match = MARKDOWN_REGEXP.exec(value)) !== null) {\n const [raw, start, text] = match;\n\n if (value.slice(lastIndex, match.index)) tokens.push({ text: value.slice(lastIndex, match.index) });\n\n if (start === '**') tokens.push({ text, ...STYLE.BOLD });\n else if (start === '*') tokens.push({ text, ...STYLE.ITALIC });\n else if (start === '_') tokens.push({ text, ...STYLE.UNDERLINE });\n else if (start === '~~') tokens.push({ text, ...STYLE.LINE_THROUGH });\n else if (start === '{') tokens.push({ text: raw, ...STYLE.BINDING });\n else if (start === '[') {\n const [, title, href] = raw.match(LINK_REGEXP);\n tokens.push({ text: title, href, ...STYLE.LINK });\n } else {\n tokens.push({ text: raw });\n }\n\n lastIndex = MARKDOWN_REGEXP.lastIndex;\n }\n\n if (value.slice(lastIndex)) tokens.push({ text: value.slice(lastIndex) });\n\n return tokens.map(({ text, ...props }, index) =>\n Object.keys(props).length\n ? React.createElement(props.href ? 'a' : getTag(tag), { key: index, ...props }, text)\n : text,\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAAiD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjD,MAAMG,WAAW,GAAG,oBAAoB;AACxC,MAAMC,eAAe,GAAG,wCAAwC;AAChE,MAAMC,YAAY,GAAG,KAAK;AAE1B,MAAMC,KAAK,GAAG;EACZC,OAAO,EAAE;IAAEC,KAAK,EAAE;MAAEC,KAAK,EAAE,wBAAwB;MAAEC,UAAU,EAAE;IAAO;EAAE,CAAC;EAC3EC,IAAI,EAAE;IAAEH,KAAK,EAAE;MAAEE,UAAU,EAAE;IAAO;EAAE,CAAC;EACvCE,MAAM,EAAE;IAAEJ,KAAK,EAAE;MAAEK,SAAS,EAAE;IAAS;EAAE,CAAC;EAC1CC,YAAY,EAAE;IAAEN,KAAK,EAAE;MAAEO,cAAc,EAAE;IAAe;EAAE,CAAC;EAC3DC,IAAI,EAAE;IAAER,KAAK,EAAE;MAAEO,cAAc,EAAE,WAAW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IAAM,CAAC,EAAER,IAAI,CAAC,GACnFA,IAAI;EAAA,CACV,CAAC;AACH,CAAC;AAACe,OAAA,CAAA3B,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/Text/index.js"],"sourcesContent":["export * from './Text';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Text","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/primitives/Text/index.js"],"sourcesContent":["export * from './Text';\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,32 +9,24 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
9
|
var _helpers = require("../../helpers");
|
|
11
10
|
var _Primitive = require("../Primitive");
|
|
12
11
|
var _ViewModule = _interopRequireDefault(require("./View.module.css"));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
_ref$tag = _ref.tag,
|
|
29
|
-
tag = _ref$tag === void 0 ? 'view' : _ref$tag,
|
|
30
|
-
wide = _ref.wide,
|
|
31
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, _objectSpread(_objectSpread({}, others), {}, {
|
|
33
|
-
ref: ref,
|
|
34
|
-
tag: tag,
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const View = exports.View = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
14
|
+
let {
|
|
15
|
+
children,
|
|
16
|
+
fit,
|
|
17
|
+
forceRow = false,
|
|
18
|
+
row,
|
|
19
|
+
tag = 'view',
|
|
20
|
+
wide,
|
|
21
|
+
...others
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, {
|
|
24
|
+
...others,
|
|
25
|
+
ref,
|
|
26
|
+
tag,
|
|
35
27
|
className: (0, _helpers.styles)(_ViewModule.default.view, fit && _ViewModule.default.fit, row && !forceRow && _ViewModule.default.row, forceRow && _ViewModule.default.forceRow, wide && _ViewModule.default.wide, others.className)
|
|
36
|
-
}
|
|
28
|
+
}, children);
|
|
37
29
|
});
|
|
38
|
-
exports.View = View;
|
|
39
30
|
View.displayName = 'Primitive:View';
|
|
40
31
|
View.propTypes = {
|
|
41
32
|
children: _propTypes.default.node,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","names":["View","React","forwardRef","ref","children","fit","forceRow","row","tag","wide","others","createElement","Primitive","className","styles","style","view","displayName","propTypes","PropTypes","node","bool","string"],"sources":["../../../src/primitives/View/View.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport style from './View.module.css';\n\nconst View = React.forwardRef(({ children, fit, forceRow = false, row, tag = 'view', wide, ...others }, ref) =>\n React.createElement(\n Primitive,\n {\n ...others,\n ref,\n tag,\n className: styles(\n style.view,\n fit && style.fit,\n row && !forceRow && style.row,\n forceRow && style.forceRow,\n wide && style.wide,\n others.className,\n ),\n },\n children,\n ),\n);\n\nView.displayName = 'Primitive:View';\n\nView.propTypes = {\n children: PropTypes.node,\n fit: PropTypes.bool,\n forceRow: PropTypes.bool,\n row: PropTypes.bool,\n tag: PropTypes.string,\n wide: PropTypes.bool,\n};\n\nexport { View };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"View.js","names":["_propTypes","_interopRequireDefault","require","_react","_helpers","_Primitive","_ViewModule","e","__esModule","default","View","exports","React","forwardRef","_ref","ref","children","fit","forceRow","row","tag","wide","others","createElement","Primitive","className","styles","style","view","displayName","propTypes","PropTypes","node","bool","string"],"sources":["../../../src/primitives/View/View.jsx"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { styles } from '../../helpers';\nimport { Primitive } from '../Primitive';\nimport style from './View.module.css';\n\nconst View = React.forwardRef(({ children, fit, forceRow = false, row, tag = 'view', wide, ...others }, ref) =>\n React.createElement(\n Primitive,\n {\n ...others,\n ref,\n tag,\n className: styles(\n style.view,\n fit && style.fit,\n row && !forceRow && style.row,\n forceRow && style.forceRow,\n wide && style.wide,\n others.className,\n ),\n },\n children,\n ),\n);\n\nView.displayName = 'Primitive:View';\n\nView.propTypes = {\n children: PropTypes.node,\n fit: PropTypes.bool,\n forceRow: PropTypes.bool,\n row: PropTypes.bool,\n tag: PropTypes.string,\n wide: PropTypes.bool,\n};\n\nexport { View };\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,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BAAS,CAACE;AAClB,CAAC","ignoreList":[]}
|
|
@@ -6,18 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.Story = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _View = require("./View");
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
className: "children"
|
|
19
|
-
}, "child:2"));
|
|
20
|
-
};
|
|
13
|
+
const Story = props => /*#__PURE__*/_react.default.createElement(_View.View, props, /*#__PURE__*/_react.default.createElement("span", {
|
|
14
|
+
className: "children"
|
|
15
|
+
}, "child:1"), /*#__PURE__*/_react.default.createElement("span", {
|
|
16
|
+
className: "children"
|
|
17
|
+
}, "child:2"));
|
|
21
18
|
exports.Story = Story;
|
|
22
19
|
Story.storyName = 'View';
|
|
23
20
|
Story.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.stories.js","names":["title","Story","props","storyName","args","fit","forceRow","row","tag","testId","wide","style","argTypes"],"sources":["../../../src/primitives/View/View.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { View } from './View';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => (\n <View {...props}>\n <span className=\"children\">child:1</span>\n <span className=\"children\">child:2</span>\n </View>\n);\n\nStory.storyName = 'View';\n\nStory.args = {\n fit: false,\n forceRow: false,\n row: false,\n tag: 'div',\n testId: 'test-story',\n wide: false,\n // inherited properties\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA;AAEA;AAA8B;AAAA,
|
|
1
|
+
{"version":3,"file":"View.stories.js","names":["_react","_interopRequireDefault","require","_View","e","__esModule","default","_default","exports","title","Story","props","createElement","View","className","storyName","args","fit","forceRow","row","tag","testId","wide","style","argTypes"],"sources":["../../../src/primitives/View/View.stories.jsx"],"sourcesContent":["import React from 'react';\n\nimport { View } from './View';\n\nexport default { title: 'Primitives' };\n\nexport const Story = (props) => (\n <View {...props}>\n <span className=\"children\">child:1</span>\n <span className=\"children\">child:2</span>\n </View>\n);\n\nStory.storyName = 'View';\n\nStory.args = {\n fit: false,\n forceRow: false,\n row: false,\n tag: 'div',\n testId: 'test-story',\n wide: false,\n // inherited properties\n style: {},\n};\n\nStory.argTypes = {};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAA8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAEf;EAAEG,KAAK,EAAE;AAAa,CAAC;AAE/B,MAAMC,KAAK,GAAIC,KAAK,iBACzBX,MAAA,CAAAM,OAAA,CAAAM,aAAA,CAACT,KAAA,CAAAU,IAAI,EAAKF,KAAK,eACbX,MAAA,CAAAM,OAAA,CAAAM,aAAA;EAAME,SAAS,EAAC;AAAU,GAAC,SAAa,CAAC,eACzCd,MAAA,CAAAM,OAAA,CAAAM,aAAA;EAAME,SAAS,EAAC;AAAU,GAAC,SAAa,CACpC,CACP;AAACN,OAAA,CAAAE,KAAA,GAAAA,KAAA;AAEFA,KAAK,CAACK,SAAS,GAAG,MAAM;AAExBL,KAAK,CAACM,IAAI,GAAG;EACXC,GAAG,EAAE,KAAK;EACVC,QAAQ,EAAE,KAAK;EACfC,GAAG,EAAE,KAAK;EACVC,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,YAAY;EACpBC,IAAI,EAAE,KAAK;EACX;EACAC,KAAK,EAAE,CAAC;AACV,CAAC;AAEDb,KAAK,CAACc,QAAQ,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/primitives/View/index.js"],"sourcesContent":["export * from './View';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_View","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/primitives/View/index.js"],"sourcesContent":["export * from './View';\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ Object.keys(_Checkbox).forEach(function (key) {
|
|
|
10
10
|
if (key in exports && exports[key] === _Checkbox[key]) return;
|
|
11
11
|
Object.defineProperty(exports, key, {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function
|
|
13
|
+
get: function () {
|
|
14
14
|
return _Checkbox[key];
|
|
15
15
|
}
|
|
16
16
|
});
|
|
@@ -21,7 +21,7 @@ Object.keys(_Icon).forEach(function (key) {
|
|
|
21
21
|
if (key in exports && exports[key] === _Icon[key]) return;
|
|
22
22
|
Object.defineProperty(exports, key, {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function
|
|
24
|
+
get: function () {
|
|
25
25
|
return _Icon[key];
|
|
26
26
|
}
|
|
27
27
|
});
|
|
@@ -32,7 +32,7 @@ Object.keys(_Input).forEach(function (key) {
|
|
|
32
32
|
if (key in exports && exports[key] === _Input[key]) return;
|
|
33
33
|
Object.defineProperty(exports, key, {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function
|
|
35
|
+
get: function () {
|
|
36
36
|
return _Input[key];
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -43,7 +43,7 @@ Object.keys(_Layer).forEach(function (key) {
|
|
|
43
43
|
if (key in exports && exports[key] === _Layer[key]) return;
|
|
44
44
|
Object.defineProperty(exports, key, {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function
|
|
46
|
+
get: function () {
|
|
47
47
|
return _Layer[key];
|
|
48
48
|
}
|
|
49
49
|
});
|
|
@@ -54,7 +54,7 @@ Object.keys(_Pressable).forEach(function (key) {
|
|
|
54
54
|
if (key in exports && exports[key] === _Pressable[key]) return;
|
|
55
55
|
Object.defineProperty(exports, key, {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function
|
|
57
|
+
get: function () {
|
|
58
58
|
return _Pressable[key];
|
|
59
59
|
}
|
|
60
60
|
});
|
|
@@ -65,7 +65,7 @@ Object.keys(_Primitive).forEach(function (key) {
|
|
|
65
65
|
if (key in exports && exports[key] === _Primitive[key]) return;
|
|
66
66
|
Object.defineProperty(exports, key, {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _Primitive[key];
|
|
70
70
|
}
|
|
71
71
|
});
|
|
@@ -76,7 +76,7 @@ Object.keys(_Radio).forEach(function (key) {
|
|
|
76
76
|
if (key in exports && exports[key] === _Radio[key]) return;
|
|
77
77
|
Object.defineProperty(exports, key, {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function
|
|
79
|
+
get: function () {
|
|
80
80
|
return _Radio[key];
|
|
81
81
|
}
|
|
82
82
|
});
|
|
@@ -87,7 +87,7 @@ Object.keys(_ScrollView).forEach(function (key) {
|
|
|
87
87
|
if (key in exports && exports[key] === _ScrollView[key]) return;
|
|
88
88
|
Object.defineProperty(exports, key, {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function
|
|
90
|
+
get: function () {
|
|
91
91
|
return _ScrollView[key];
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -98,7 +98,7 @@ Object.keys(_Select).forEach(function (key) {
|
|
|
98
98
|
if (key in exports && exports[key] === _Select[key]) return;
|
|
99
99
|
Object.defineProperty(exports, key, {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function
|
|
101
|
+
get: function () {
|
|
102
102
|
return _Select[key];
|
|
103
103
|
}
|
|
104
104
|
});
|
|
@@ -109,7 +109,7 @@ Object.keys(_Switch).forEach(function (key) {
|
|
|
109
109
|
if (key in exports && exports[key] === _Switch[key]) return;
|
|
110
110
|
Object.defineProperty(exports, key, {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function
|
|
112
|
+
get: function () {
|
|
113
113
|
return _Switch[key];
|
|
114
114
|
}
|
|
115
115
|
});
|
|
@@ -120,7 +120,7 @@ Object.keys(_Text).forEach(function (key) {
|
|
|
120
120
|
if (key in exports && exports[key] === _Text[key]) return;
|
|
121
121
|
Object.defineProperty(exports, key, {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function
|
|
123
|
+
get: function () {
|
|
124
124
|
return _Text[key];
|
|
125
125
|
}
|
|
126
126
|
});
|
|
@@ -131,7 +131,7 @@ Object.keys(_View).forEach(function (key) {
|
|
|
131
131
|
if (key in exports && exports[key] === _View[key]) return;
|
|
132
132
|
Object.defineProperty(exports, key, {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function
|
|
134
|
+
get: function () {
|
|
135
135
|
return _View[key];
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/primitives/index.js"],"sourcesContent":["import './primitives.customElements';\n\nexport * from './Checkbox';\nexport * from './Icon';\nexport * from './Input';\nexport * from './Layer';\nexport * from './Pressable';\nexport * from './Primitive';\nexport * from './Radio';\nexport * from './ScrollView';\nexport * from './Select';\nexport * from './Switch';\nexport * from './Text';\nexport * from './View';\n"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.js","names":["require","_Checkbox","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Icon","_Input","_Layer","_Pressable","_Primitive","_Radio","_ScrollView","_Select","_Switch","_Text","_View"],"sources":["../../src/primitives/index.js"],"sourcesContent":["import './primitives.customElements';\n\nexport * from './Checkbox';\nexport * from './Icon';\nexport * from './Input';\nexport * from './Layer';\nexport * from './Pressable';\nexport * from './Primitive';\nexport * from './Radio';\nexport * from './ScrollView';\nexport * from './Select';\nexport * from './Switch';\nexport * from './Text';\nexport * from './View';\n"],"mappings":";;;;;AAAAA,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,SAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,SAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAR,SAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAV,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAX,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAQ,M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ACA,IAAAa,OAAA,GAAAlB,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAe,OAAA,EAAAd,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAa,OAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAS,OAAA,CAAAb,GAAA;IAAA;EAAA;AAAA;AACA,IAAAc,KAAA,GAAAnB,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAgB,KAAA,EAAAf,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAc,KAAA,CAAAd,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAU,KAAA,CAAAd,GAAA;IAAA;EAAA;AAAA;AACA,IAAAe,KAAA,GAAApB,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAiB,KAAA,EAAAhB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAe,KAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAW,KAAA,CAAAf,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.customElements.js","names":["CustomElement","HTMLDivElement","HTMLButtonElement","HTMLSpanElement"],"sources":["../../src/primitives/primitives.customElements.js"],"sourcesContent":["import { CustomElement } from '../helpers';\n\nCustomElement('ui-checkbox', HTMLDivElement, 'div');\nCustomElement('ui-icon', HTMLDivElement, 'span');\nCustomElement('ui-layer', HTMLDivElement, 'div');\nCustomElement('ui-layer-content', HTMLDivElement, 'div');\nCustomElement('ui-pressable', HTMLButtonElement, 'button');\nCustomElement('ui-primitive', HTMLDivElement, 'div');\nCustomElement('ui-radio', HTMLDivElement, 'div');\n// CustomElement('ui-select', HTMLSelectElement, 'select');\n// CustomElement('ui-option', HTMLOptionElement, 'option');\nCustomElement('ui-scrollview', HTMLDivElement, 'div');\nCustomElement('ui-switch', HTMLDivElement, 'div');\nCustomElement('ui-view', HTMLDivElement, 'div');\nCustomElement('ui-text', HTMLSpanElement, 'span');\nCustomElement('ui-h1', HTMLSpanElement, 'h1');\nCustomElement('ui-h2', HTMLSpanElement, 'h2');\nCustomElement('ui-h3', HTMLSpanElement, 'h3');\n"],"mappings":";;AAAA;AAEA,
|
|
1
|
+
{"version":3,"file":"primitives.customElements.js","names":["_helpers","require","CustomElement","HTMLDivElement","HTMLButtonElement","HTMLSpanElement"],"sources":["../../src/primitives/primitives.customElements.js"],"sourcesContent":["import { CustomElement } from '../helpers';\n\nCustomElement('ui-checkbox', HTMLDivElement, 'div');\nCustomElement('ui-icon', HTMLDivElement, 'span');\nCustomElement('ui-layer', HTMLDivElement, 'div');\nCustomElement('ui-layer-content', HTMLDivElement, 'div');\nCustomElement('ui-pressable', HTMLButtonElement, 'button');\nCustomElement('ui-primitive', HTMLDivElement, 'div');\nCustomElement('ui-radio', HTMLDivElement, 'div');\n// CustomElement('ui-select', HTMLSelectElement, 'select');\n// CustomElement('ui-option', HTMLOptionElement, 'option');\nCustomElement('ui-scrollview', HTMLDivElement, 'div');\nCustomElement('ui-switch', HTMLDivElement, 'div');\nCustomElement('ui-view', HTMLDivElement, 'div');\nCustomElement('ui-text', HTMLSpanElement, 'span');\nCustomElement('ui-h1', HTMLSpanElement, 'h1');\nCustomElement('ui-h2', HTMLSpanElement, 'h2');\nCustomElement('ui-h3', HTMLSpanElement, 'h3');\n"],"mappings":";;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAa,EAAC,aAAa,EAAEC,cAAc,EAAE,KAAK,CAAC;AACnD,IAAAD,sBAAa,EAAC,SAAS,EAAEC,cAAc,EAAE,MAAM,CAAC;AAChD,IAAAD,sBAAa,EAAC,UAAU,EAAEC,cAAc,EAAE,KAAK,CAAC;AAChD,IAAAD,sBAAa,EAAC,kBAAkB,EAAEC,cAAc,EAAE,KAAK,CAAC;AACxD,IAAAD,sBAAa,EAAC,cAAc,EAAEE,iBAAiB,EAAE,QAAQ,CAAC;AAC1D,IAAAF,sBAAa,EAAC,cAAc,EAAEC,cAAc,EAAE,KAAK,CAAC;AACpD,IAAAD,sBAAa,EAAC,UAAU,EAAEC,cAAc,EAAE,KAAK,CAAC;AAChD;AACA;AACA,IAAAD,sBAAa,EAAC,eAAe,EAAEC,cAAc,EAAE,KAAK,CAAC;AACrD,IAAAD,sBAAa,EAAC,WAAW,EAAEC,cAAc,EAAE,KAAK,CAAC;AACjD,IAAAD,sBAAa,EAAC,SAAS,EAAEC,cAAc,EAAE,KAAK,CAAC;AAC/C,IAAAD,sBAAa,EAAC,SAAS,EAAEG,eAAe,EAAE,MAAM,CAAC;AACjD,IAAAH,sBAAa,EAAC,OAAO,EAAEG,eAAe,EAAE,IAAI,CAAC;AAC7C,IAAAH,sBAAa,EAAC,OAAO,EAAEG,eAAe,EAAE,IAAI,CAAC;AAC7C,IAAAH,sBAAa,EAAC,OAAO,EAAEG,eAAe,EAAE,IAAI,CAAC","ignoreList":[]}
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
/* palette */
|
|
29
29
|
--mirai-ui-base: #ffffff;
|
|
30
30
|
|
|
31
|
-
--mirai-ui-content: #
|
|
31
|
+
--mirai-ui-content: #333333;
|
|
32
32
|
--mirai-ui-content-background: #f6f6f6;
|
|
33
|
-
--mirai-ui-content-border: #
|
|
34
|
-
--mirai-ui-content-light: #
|
|
35
|
-
--mirai-ui-content-dark: #
|
|
33
|
+
--mirai-ui-content-border: #dddddd;
|
|
34
|
+
--mirai-ui-content-light: #666666;
|
|
35
|
+
--mirai-ui-content-dark: #000000;
|
|
36
36
|
|
|
37
37
|
--mirai-ui-accent: #3978c5;
|
|
38
38
|
--mirai-ui-accent-background: #e9f1fc;
|
|
@@ -4,11 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.camelcase = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return typeof value === 'string' ? value.replace(/-/g, ' ').replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,
|
|
10
|
-
return +match === 0 ? '' : index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
11
|
-
}) : undefined;
|
|
7
|
+
const camelcase = function () {
|
|
8
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
9
|
+
return typeof value === 'string' ? value.replace(/-/g, ' ').replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match, index) => +match === 0 ? '' : index === 0 ? match.toLowerCase() : match.toUpperCase()) : undefined;
|
|
12
10
|
};
|
|
13
11
|
exports.camelcase = camelcase;
|
|
14
12
|
//# sourceMappingURL=camelcase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camelcase.js","names":["camelcase","value","replace","match","index","toLowerCase","toUpperCase","
|
|
1
|
+
{"version":3,"file":"camelcase.js","names":["camelcase","value","arguments","length","undefined","replace","match","index","toLowerCase","toUpperCase","exports"],"sources":["../../../src/theme/helpers/camelcase.js"],"sourcesContent":["export const camelcase = (value = '') =>\n typeof value === 'string'\n ? value\n .replace(/-/g, ' ')\n .replace(/(?:^\\w|[A-Z]|\\b\\w|\\s+)/g, (match, index) =>\n +match === 0 ? '' : index === 0 ? match.toLowerCase() : match.toUpperCase(),\n )\n : undefined;\n"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAG,SAAAA,CAAA;EAAA,IAACC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAClC,OAAOD,KAAK,KAAK,QAAQ,GACrBA,KAAK,CACFI,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAClBA,OAAO,CAAC,yBAAyB,EAAE,CAACC,KAAK,EAAEC,KAAK,KAC/C,CAACD,KAAK,KAAK,CAAC,GAAG,EAAE,GAAGC,KAAK,KAAK,CAAC,GAAGD,KAAK,CAACE,WAAW,CAAC,CAAC,GAAGF,KAAK,CAACG,WAAW,CAAC,CAC5E,CAAC,GACHL,SAAS;AAAA;AAACM,OAAA,CAAAV,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ Object.keys(_camelcase).forEach(function (key) {
|
|
|
9
9
|
if (key in exports && exports[key] === _camelcase[key]) return;
|
|
10
10
|
Object.defineProperty(exports, key, {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function
|
|
12
|
+
get: function () {
|
|
13
13
|
return _camelcase[key];
|
|
14
14
|
}
|
|
15
15
|
});
|
|
@@ -20,7 +20,7 @@ Object.keys(_palette).forEach(function (key) {
|
|
|
20
20
|
if (key in exports && exports[key] === _palette[key]) return;
|
|
21
21
|
Object.defineProperty(exports, key, {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function
|
|
23
|
+
get: function () {
|
|
24
24
|
return _palette[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/theme/helpers/index.js"],"sourcesContent":["export * from './camelcase';\nexport * from './palette';\n"],"mappings":";;;;;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_camelcase","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_palette"],"sources":["../../../src/theme/helpers/index.js"],"sourcesContent":["export * from './camelcase';\nexport * from './palette';\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;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,QAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,QAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,QAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -4,48 +4,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.palette = void 0;
|
|
7
|
-
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
var HEXCOLOR_REGEX = /^#([0-9A-F]{3}){1,2}$/i;
|
|
7
|
+
const HEXCOLOR_REGEX = /^#([0-9A-F]{3}){1,2}$/i;
|
|
14
8
|
|
|
15
9
|
// -- parsers
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const hexToRgb = hex => {
|
|
11
|
+
const bigint = parseInt(hex.replace(/^#/, ''), 16);
|
|
12
|
+
const r = bigint >> 16 & 255;
|
|
13
|
+
const g = bigint >> 8 & 255;
|
|
14
|
+
const b = bigint & 255;
|
|
21
15
|
return [r, g, b];
|
|
22
16
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
r = _ref2[0],
|
|
27
|
-
g = _ref2[1],
|
|
28
|
-
b = _ref2[2];
|
|
29
|
-
return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase();
|
|
17
|
+
const rgbToHex = function () {
|
|
18
|
+
let [r, g, b] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
19
|
+
return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).toUpperCase()}`;
|
|
30
20
|
};
|
|
31
21
|
|
|
32
22
|
// -- color modifiers
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return rgb.map(
|
|
36
|
-
return Math.max(0, Math.min(255, Math.round(color + factor * (255 - color))));
|
|
37
|
-
});
|
|
23
|
+
const lighten = function (rgb) {
|
|
24
|
+
let factor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
25
|
+
return rgb.map(color => Math.max(0, Math.min(255, Math.round(color + factor * (255 - color)))));
|
|
38
26
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return rgb.map(
|
|
42
|
-
return Math.max(0, Math.min(255, Math.round(color * (1 - factor))));
|
|
43
|
-
});
|
|
27
|
+
const darken = function (rgb) {
|
|
28
|
+
let factor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
29
|
+
return rgb.map(color => Math.max(0, Math.min(255, Math.round(color * (1 - factor)))));
|
|
44
30
|
};
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
const palette = function () {
|
|
32
|
+
let hexColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#3978c5';
|
|
47
33
|
if (!HEXCOLOR_REGEX.test(hexColor)) return;
|
|
48
|
-
|
|
34
|
+
const rgbColor = hexToRgb(hexColor);
|
|
49
35
|
return {
|
|
50
36
|
dark: rgbToHex(darken(rgbColor, 0.4)),
|
|
51
37
|
base: hexColor,
|