@mirai/ui 2.0.6 → 2.0.7
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 +1 -2
- package/build/components/Action/Action.js.map +1 -1
- package/build/components/Action/__tests__/__snapshots__/Action.test.js.snap +21 -32
- package/build/components/Button/Button.js +1 -2
- package/build/components/Button/Button.js.map +1 -1
- package/build/components/Button/__tests__/__snapshots__/Button.test.js.snap +17 -28
- package/build/components/Calendar/Calendar.Month.js +1 -0
- package/build/components/Calendar/Calendar.Month.js.map +1 -1
- package/build/components/Calendar/Calendar.Weekdays.js +1 -0
- package/build/components/Calendar/Calendar.Weekdays.js.map +1 -1
- package/build/components/Calendar/Calendar.js +3 -0
- package/build/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +18284 -18162
- package/build/components/Form/Form.js +1 -2
- package/build/components/Form/Form.js.map +1 -1
- package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +9 -15
- package/build/components/InputDate/InputDate.js +1 -2
- package/build/components/InputDate/InputDate.js.map +1 -1
- package/build/components/InputDate/__tests__/__snapshots__/InputDate.test.js.snap +42 -67
- package/build/components/InputNumber/InputNumber.js +1 -2
- package/build/components/InputNumber/InputNumber.js.map +1 -1
- package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +114 -183
- package/build/components/InputOption/InputOption.js +3 -3
- package/build/components/InputOption/InputOption.js.map +1 -1
- package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +80 -100
- package/build/components/InputPhone/InputPhone.js +10 -5
- package/build/components/InputPhone/InputPhone.js.map +1 -1
- package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +339 -421
- package/build/components/InputSelect/InputSelect.js +4 -2
- package/build/components/InputSelect/InputSelect.js.map +1 -1
- package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +115 -115
- package/build/components/InputText/InputText.js +4 -3
- package/build/components/InputText/InputText.js.map +1 -1
- package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +133 -156
- package/build/components/Menu/Menu.js +1 -2
- package/build/components/Menu/Menu.js.map +1 -1
- package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +55 -63
- package/build/components/Modal/Modal.js +10 -7
- package/build/components/Modal/Modal.js.map +1 -1
- package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +72 -86
- package/build/components/Notification/Notification.js +1 -2
- package/build/components/Notification/Notification.js.map +1 -1
- package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +288 -327
- package/build/components/Progress/Progress.js +2 -3
- package/build/components/Progress/Progress.js.map +1 -1
- package/build/components/Progress/__tests__/__snapshots__/Progress.test.jsx.snap +18 -31
- package/build/components/Slider/Slider.js +8 -5
- package/build/components/Slider/Slider.js.map +1 -1
- package/build/components/Slider/Slider.module.css +3 -3
- package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +349 -464
- package/build/components/Table/Table.Filter.js +1 -0
- package/build/components/Table/Table.Filter.js.map +1 -1
- package/build/components/Table/Table.Row.js +0 -1
- package/build/components/Table/Table.Row.js.map +1 -1
- package/build/components/Table/Table.js +1 -2
- package/build/components/Table/Table.js.map +1 -1
- package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +192 -192
- package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +1092 -1516
- package/build/components/Tooltip/Tooltip.js +1 -2
- package/build/components/Tooltip/Tooltip.js.map +1 -1
- package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +28 -28
- package/build/primitives/Checkbox/Checkbox.js +4 -3
- package/build/primitives/Checkbox/Checkbox.js.map +1 -1
- package/build/primitives/Checkbox/__tests__/__snapshots__/Checkbox.test.js.snap +20 -35
- package/build/primitives/Icon/Icon.js +1 -2
- package/build/primitives/Icon/Icon.js.map +1 -1
- package/build/primitives/Icon/__tests__/__snapshots__/Icon.test.js.snap +82 -108
- package/build/primitives/Input/Input.js +0 -1
- package/build/primitives/Input/Input.js.map +1 -1
- package/build/primitives/Layer/Layer.js +8 -5
- package/build/primitives/Layer/Layer.js.map +1 -1
- package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +44 -44
- package/build/primitives/Pressable/Pressable.js +7 -5
- package/build/primitives/Pressable/Pressable.js.map +1 -1
- package/build/primitives/Pressable/__tests__/__snapshots__/Pressable.test.js.snap +11 -11
- package/build/primitives/Primitive/Primitive.constants.js +20 -2
- package/build/primitives/Primitive/Primitive.constants.js.map +1 -1
- package/build/primitives/Primitive/Primitive.js +13 -3
- package/build/primitives/Primitive/Primitive.js.map +1 -1
- package/build/primitives/Primitive/__tests__/__snapshots__/Primitive.test.js.snap +18 -12
- package/build/primitives/Primitive/helpers/getTag.js +3 -24
- package/build/primitives/Primitive/helpers/getTag.js.map +1 -1
- package/build/primitives/Radio/Radio.js +4 -3
- package/build/primitives/Radio/Radio.js.map +1 -1
- package/build/primitives/Radio/__tests__/__snapshots__/Radio.test.js.snap +21 -39
- package/build/primitives/ScrollView/ScrollView.js +8 -4
- package/build/primitives/ScrollView/ScrollView.js.map +1 -1
- package/build/primitives/ScrollView/ScrollView.module.css +1 -1
- package/build/primitives/ScrollView/__tests__/__snapshots__/ScrollView.test.js.snap +20 -20
- package/build/primitives/Select/Select.js +1 -2
- package/build/primitives/Select/Select.js.map +1 -1
- package/build/primitives/Select/__tests__/__snapshots__/Select.test.js.snap +0 -35
- package/build/primitives/Switch/Switch.js +1 -2
- package/build/primitives/Switch/Switch.js.map +1 -1
- package/build/primitives/Switch/__tests__/__snapshots__/Switch.test.js.snap +40 -60
- package/build/primitives/Text/Text.js +0 -1
- package/build/primitives/Text/Text.js.map +1 -1
- package/build/primitives/Text/Text.module.css +0 -4
- package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +62 -62
- package/build/primitives/View/View.js +5 -3
- package/build/primitives/View/View.js.map +1 -1
- package/build/primitives/View/__tests__/__snapshots__/View.test.js.snap +10 -10
- package/build/primitives/index.js +64 -0
- package/build/primitives/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
10
10
|
var _helpers = require("../../helpers");
|
|
11
11
|
var _Primitive = require("../Primitive");
|
|
12
12
|
var _ViewModule = _interopRequireDefault(require("./View.module.css"));
|
|
13
|
-
var _excluded = ["children", "fit", "forceRow", "row", "wide"];
|
|
13
|
+
var _excluded = ["children", "fit", "forceRow", "row", "tag", "wide"];
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
16
|
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; }
|
|
@@ -25,12 +25,13 @@ var View = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
25
25
|
_ref$forceRow = _ref.forceRow,
|
|
26
26
|
forceRow = _ref$forceRow === void 0 ? false : _ref$forceRow,
|
|
27
27
|
row = _ref.row,
|
|
28
|
+
_ref$tag = _ref.tag,
|
|
29
|
+
tag = _ref$tag === void 0 ? 'view' : _ref$tag,
|
|
28
30
|
wide = _ref.wide,
|
|
29
31
|
others = _objectWithoutProperties(_ref, _excluded);
|
|
30
32
|
return /*#__PURE__*/_react.default.createElement(_Primitive.Primitive, _objectSpread(_objectSpread({}, others), {}, {
|
|
31
33
|
ref: ref,
|
|
32
|
-
|
|
33
|
-
tag: others.tag || 'view',
|
|
34
|
+
tag: tag,
|
|
34
35
|
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)
|
|
35
36
|
}), children);
|
|
36
37
|
});
|
|
@@ -41,6 +42,7 @@ View.propTypes = {
|
|
|
41
42
|
fit: _propTypes.default.bool,
|
|
42
43
|
forceRow: _propTypes.default.bool,
|
|
43
44
|
row: _propTypes.default.bool,
|
|
45
|
+
tag: _propTypes.default.string,
|
|
44
46
|
wide: _propTypes.default.bool
|
|
45
47
|
};
|
|
46
48
|
//# sourceMappingURL=View.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","names":["View","React","forwardRef","ref","children","fit","forceRow","row","wide","others","createElement","Primitive","
|
|
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 };\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ment>
|
|
5
|
-
<
|
|
5
|
+
<ui-view
|
|
6
6
|
class="view mirai"
|
|
7
7
|
/>
|
|
8
8
|
</DocumentFragment>
|
|
@@ -10,19 +10,19 @@ exports[`primitive:<View> inherit:className 1`] = `
|
|
|
10
10
|
|
|
11
11
|
exports[`primitive:<View> prop:children 1`] = `
|
|
12
12
|
<DocumentFragment>
|
|
13
|
-
<
|
|
13
|
+
<ui-view
|
|
14
14
|
class="view"
|
|
15
15
|
>
|
|
16
16
|
<span>
|
|
17
17
|
mirai
|
|
18
18
|
</span>
|
|
19
|
-
</
|
|
19
|
+
</ui-view>
|
|
20
20
|
</DocumentFragment>
|
|
21
21
|
`;
|
|
22
22
|
|
|
23
23
|
exports[`primitive:<View> prop:fit 1`] = `
|
|
24
24
|
<DocumentFragment>
|
|
25
|
-
<
|
|
25
|
+
<ui-view
|
|
26
26
|
class="view fit"
|
|
27
27
|
/>
|
|
28
28
|
</DocumentFragment>
|
|
@@ -30,7 +30,7 @@ exports[`primitive:<View> prop:fit 1`] = `
|
|
|
30
30
|
|
|
31
31
|
exports[`primitive:<View> prop:forceRow 1`] = `
|
|
32
32
|
<DocumentFragment>
|
|
33
|
-
<
|
|
33
|
+
<ui-view
|
|
34
34
|
class="view forceRow"
|
|
35
35
|
/>
|
|
36
36
|
</DocumentFragment>
|
|
@@ -38,7 +38,7 @@ exports[`primitive:<View> prop:forceRow 1`] = `
|
|
|
38
38
|
|
|
39
39
|
exports[`primitive:<View> prop:row 1`] = `
|
|
40
40
|
<DocumentFragment>
|
|
41
|
-
<
|
|
41
|
+
<ui-view
|
|
42
42
|
class="view row"
|
|
43
43
|
/>
|
|
44
44
|
</DocumentFragment>
|
|
@@ -46,7 +46,7 @@ exports[`primitive:<View> prop:row 1`] = `
|
|
|
46
46
|
|
|
47
47
|
exports[`primitive:<View> prop:wide 1`] = `
|
|
48
48
|
<DocumentFragment>
|
|
49
|
-
<
|
|
49
|
+
<ui-view
|
|
50
50
|
class="view wide"
|
|
51
51
|
/>
|
|
52
52
|
</DocumentFragment>
|
|
@@ -54,7 +54,7 @@ exports[`primitive:<View> prop:wide 1`] = `
|
|
|
54
54
|
|
|
55
55
|
exports[`primitive:<View> renders 1`] = `
|
|
56
56
|
<DocumentFragment>
|
|
57
|
-
<
|
|
57
|
+
<ui-view
|
|
58
58
|
class="view"
|
|
59
59
|
/>
|
|
60
60
|
</DocumentFragment>
|
|
@@ -62,7 +62,7 @@ exports[`primitive:<View> renders 1`] = `
|
|
|
62
62
|
|
|
63
63
|
exports[`primitive:<View> tag 1`] = `
|
|
64
64
|
<DocumentFragment>
|
|
65
|
-
<
|
|
65
|
+
<ui-tag
|
|
66
66
|
class="view"
|
|
67
67
|
/>
|
|
68
68
|
</DocumentFragment>
|
|
@@ -70,7 +70,7 @@ exports[`primitive:<View> tag 1`] = `
|
|
|
70
70
|
|
|
71
71
|
exports[`primitive:<View> testId 1`] = `
|
|
72
72
|
<DocumentFragment>
|
|
73
|
-
<
|
|
73
|
+
<ui-view
|
|
74
74
|
class="view"
|
|
75
75
|
data-testid="mirai"
|
|
76
76
|
/>
|
|
@@ -1,5 +1,6 @@
|
|
|
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -135,4 +136,67 @@ Object.keys(_View).forEach(function (key) {
|
|
|
135
136
|
}
|
|
136
137
|
});
|
|
137
138
|
});
|
|
139
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
140
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
141
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
142
|
+
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); }
|
|
143
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
144
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
145
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
146
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
147
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
148
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
149
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
150
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
151
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
152
|
+
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."); }
|
|
153
|
+
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); }
|
|
154
|
+
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; }
|
|
155
|
+
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; } }
|
|
156
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
157
|
+
var CUSTOM_ELEMENTS = {
|
|
158
|
+
'ui-label': {
|
|
159
|
+
HtmlElement: HTMLLabelElement,
|
|
160
|
+
tag: 'label'
|
|
161
|
+
},
|
|
162
|
+
'ui-text': {
|
|
163
|
+
HtmlElement: HTMLSpanElement,
|
|
164
|
+
tag: 'span'
|
|
165
|
+
},
|
|
166
|
+
'ui-view': {
|
|
167
|
+
HtmlElement: HTMLDivElement,
|
|
168
|
+
tag: 'div'
|
|
169
|
+
},
|
|
170
|
+
'ui-h1': {
|
|
171
|
+
HtmlElement: HTMLHeadingElement,
|
|
172
|
+
tag: 'h1'
|
|
173
|
+
},
|
|
174
|
+
'ui-h2': {
|
|
175
|
+
HtmlElement: HTMLHeadingElement,
|
|
176
|
+
tag: 'h2'
|
|
177
|
+
},
|
|
178
|
+
'ui-h3': {
|
|
179
|
+
HtmlElement: HTMLHeadingElement,
|
|
180
|
+
tag: 'h3'
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
Object.entries(CUSTOM_ELEMENTS).forEach(function (_ref) {
|
|
184
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
185
|
+
customElement = _ref2[0],
|
|
186
|
+
_ref2$ = _ref2[1];
|
|
187
|
+
_ref2$ = _ref2$ === void 0 ? {} : _ref2$;
|
|
188
|
+
var HtmlElement = _ref2$.HtmlElement,
|
|
189
|
+
tag = _ref2$.tag;
|
|
190
|
+
return customElements.define(customElement, /*#__PURE__*/function (_HtmlElement) {
|
|
191
|
+
_inherits(_class, _HtmlElement);
|
|
192
|
+
var _super = _createSuper(_class);
|
|
193
|
+
function _class() {
|
|
194
|
+
_classCallCheck(this, _class);
|
|
195
|
+
return _super.apply(this, arguments);
|
|
196
|
+
}
|
|
197
|
+
return _createClass(_class);
|
|
198
|
+
}(HtmlElement), {
|
|
199
|
+
extends: tag
|
|
200
|
+
});
|
|
201
|
+
});
|
|
138
202
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/primitives/index.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["CUSTOM_ELEMENTS","HtmlElement","HTMLLabelElement","tag","HTMLSpanElement","HTMLDivElement","HTMLHeadingElement","Object","entries","forEach","customElement","customElements","define","extends"],"sources":["../../src/primitives/index.js"],"sourcesContent":["const CUSTOM_ELEMENTS = {\n 'ui-label': { HtmlElement: HTMLLabelElement, tag: 'label' },\n 'ui-text': { HtmlElement: HTMLSpanElement, tag: 'span' },\n 'ui-view': { HtmlElement: HTMLDivElement, tag: 'div' },\n 'ui-h1': { HtmlElement: HTMLHeadingElement, tag: 'h1' },\n 'ui-h2': { HtmlElement: HTMLHeadingElement, tag: 'h2' },\n 'ui-h3': { HtmlElement: HTMLHeadingElement, tag: 'h3' },\n};\n\nObject.entries(CUSTOM_ELEMENTS).forEach(([customElement, { HtmlElement, tag } = {}]) =>\n customElements.define(customElement, class extends HtmlElement {}, { extends: tag }),\n);\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":";;;;;;AAaA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;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