From 0c54bde88f9b94dd8a503a71e61b5bb89eb65be0 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Fri, 1 May 2020 20:03:36 +0800 Subject: [PATCH] publish(@omiu/action-sheet) --- components/action-sheet/README.md | 2 +- components/action-sheet/package.json | 2 +- components/action-sheet/src/index.esm.js | 6 +++--- components/action-sheet/src/index.esm.js.map | 2 +- components/action-sheet/src/index.js | 4 ++-- components/action-sheet/src/index.js.map | 2 +- components/action-sheet/src/index.tsx | 4 ++-- components/docs-src/src/docs/en/action-sheet.md | 2 +- components/docs-src/src/docs/zh-cn/action-sheet.md | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/action-sheet/README.md b/components/action-sheet/README.md index 5b959a8e8..58fdf7fee 100644 --- a/components/action-sheet/README.md +++ b/components/action-sheet/README.md @@ -48,5 +48,5 @@ Or use script tag to ref it. ``` ### Events -* ItemClick +* item-click * close diff --git a/components/action-sheet/package.json b/components/action-sheet/package.json index 1e0b4107a..7f14d31af 100644 --- a/components/action-sheet/package.json +++ b/components/action-sheet/package.json @@ -1,6 +1,6 @@ { "name": "@omiu/action-sheet", - "version": "0.0.3", + "version": "0.0.4", "description": "Mobile pop-up options list", "docsExtend": { "cnName": "弹出式菜单", diff --git a/components/action-sheet/src/index.esm.js b/components/action-sheet/src/index.esm.js index 559ca5d35..c75a547f0 100644 --- a/components/action-sheet/src/index.esm.js +++ b/components/action-sheet/src/index.esm.js @@ -1,5 +1,5 @@ /** - * @omiu/action-sheet v0.0.3 http://omijs.org + * @omiu/action-sheet v0.0.4 http://omijs.org * Front End Cross-Frameworks Framework. * By dntzhang https://github.com/dntzhang * Github: https://github.com/Tencent/omi @@ -245,7 +245,7 @@ var ActionSheet = /** @class */ (function (_super) { _a)); return (h("div", __assign({ key: idx, onClick: function (_) { _this.hide(); - _this.fire('ItemClick', menu); + _this.fire('item-click', menu); } }, others, { class: cls }), label)); }); }; @@ -271,7 +271,7 @@ var ActionSheet = /** @class */ (function (_super) { _a)); return (h("div", __assign({ key: idx }, others, { onClick: function (_) { _this.hide(); - _this.fire('ItemClick', action); + _this.fire('item-click', action); }, className: cls }), label)); }); }; diff --git a/components/action-sheet/src/index.esm.js.map b/components/action-sheet/src/index.esm.js.map index 99122f37e..4c8562eaa 100644 --- a/components/action-sheet/src/index.esm.js.map +++ b/components/action-sheet/src/index.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"index.esm.js","sources":["../node_modules/_tslib@1.11.1@tslib/tslib.es6.js","index.tsx"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { tag, WeElement, classNames, h } from 'omi'\nimport * as css from './index.scss'\n\n\ninterface Props {\n type: string,\n menus: any[],\n actions: any[],\n show: boolean\n}\n\n\n@tag('o-action-sheet')\nexport default class ActionSheet extends WeElement {\n static css = css\n\n static defaultProps = {\n type: '',\n menus: [],\n actions: [],\n show: false\n }\n\n static propTypes = {\n type: String,\n menus: Array,\n actions: Array,\n show: Boolean\n }\n\n\n renderMenuItem() {\n return this.props.menus.map((menu, idx) => {\n const { label, className, ...others } = menu\n const cls = classNames({\n 'o-actionsheet__cell': true,\n [className]: className\n })\n\n return (\n
{\n this.hide()\n this.fire('ItemClick', menu)\n }} {...others} class={cls}>\n {label}\n
\n )\n })\n }\n\n show() {\n this.updateProps({\n show: true\n })\n }\n\n hide() {\n this.updateProps({\n show: false\n })\n }\n\n renderActions() {\n return this.props.actions.map((action, idx) => {\n const { label, className, ...others } = action\n const cls = classNames({\n 'o-actionsheet__cell': true,\n [className]: className\n })\n\n return (\n
{\n this.hide()\n this.fire('ItemClick', action)\n }} className={cls}>\n {label}\n
\n )\n })\n }\n\n handleMaskClick = e => {\n this.hide()\n this.fire('close')\n }\n\n render() {\n const { show, type, menus, actions, ...others } = this.props\n const cls = classNames({\n 'o-actionsheet': true,\n 'o-actionsheet_toggle': show\n })\n\n let styleType = type ? type : 'ios'\n\n return (\n
\n \n
\n
{this.renderMenuItem()}
\n
{this.renderActions()}
\n
\n
\n )\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,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K,CAAA;QAEnC,QACE,WAAK,SAAS,EAAE,SAAS,KAAK,SAAS,GAAG,gBAAgB,GAAG,EAAE;YAC7D,WACE,KAAK,EAAC,MAAM,EACZ,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,GAAG,MAAM,EAAE,EAC3C,OAAO,EAAE,IAAI,CAAC,eAAe,GAC7B;YACF,oBAAK,SAAS,EAAE,GAAG,IAAM,MAAM;gBAC7B,WAAK,SAAS,EAAC,qBAAqB,IAAE,IAAI,CAAC,cAAc,EAAE,CAAO;gBAClE,WAAK,SAAS,EAAC,uBAAuB,IAAE,IAAI,CAAC,aAAa,EAAE,CAAO,CAC/D,CACF,EACP;KACF;IA9FM,eAAG,GAAG,GAAG,CAAA;IAET,wBAAY,GAAG;QACpB,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;QACX,IAAI,EAAE,KAAK;KACZ,CAAA;IAEM,qBAAS,GAAG;QACjB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,KAAK;QACZ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO;KACd,CAAA;IAfkB,WAAW;QAD/B,GAAG,CAAC,gBAAgB,CAAC;OACD,WAAW,CAgG/B;IAAD,kBAAC;CAAA,CAhGwC,SAAS;;"} \ No newline at end of file +{"version":3,"file":"index.esm.js","sources":["../node_modules/_tslib@1.11.1@tslib/tslib.es6.js","index.tsx"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { tag, WeElement, classNames, h } from 'omi'\nimport * as css from './index.scss'\n\n\ninterface Props {\n type: string,\n menus: any[],\n actions: any[],\n show: boolean\n}\n\n\n@tag('o-action-sheet')\nexport default class ActionSheet extends WeElement {\n static css = css\n\n static defaultProps = {\n type: '',\n menus: [],\n actions: [],\n show: false\n }\n\n static propTypes = {\n type: String,\n menus: Array,\n actions: Array,\n show: Boolean\n }\n\n\n renderMenuItem() {\n return this.props.menus.map((menu, idx) => {\n const { label, className, ...others } = menu\n const cls = classNames({\n 'o-actionsheet__cell': true,\n [className]: className\n })\n\n return (\n
{\n this.hide()\n this.fire('item-click', menu)\n }} {...others} class={cls}>\n {label}\n
\n )\n })\n }\n\n show() {\n this.updateProps({\n show: true\n })\n }\n\n hide() {\n this.updateProps({\n show: false\n })\n }\n\n renderActions() {\n return this.props.actions.map((action, idx) => {\n const { label, className, ...others } = action\n const cls = classNames({\n 'o-actionsheet__cell': true,\n [className]: className\n })\n\n return (\n
{\n this.hide()\n this.fire('item-click', action)\n }} className={cls}>\n {label}\n
\n )\n })\n }\n\n handleMaskClick = e => {\n this.hide()\n this.fire('close')\n }\n\n render() {\n const { show, type, menus, actions, ...others } = this.props\n const cls = classNames({\n 'o-actionsheet': true,\n 'o-actionsheet_toggle': show\n })\n\n let styleType = type ? type : 'ios'\n\n return (\n
\n \n
\n
{this.renderMenuItem()}
\n
{this.renderActions()}
\n
\n
\n )\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;AACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;AACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;AACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;AAChC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;AAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC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AAK;QACZ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO;KACd,CAAA;IAfkB,WAAW;QAD/B,GAAG,CAAC,gBAAgB,CAAC;OACD,WAAW,CAgG/B;IAAD,kBAAC;CAAA,CAhGwC,SAAS;;"} \ No newline at end of file diff --git a/components/action-sheet/src/index.js b/components/action-sheet/src/index.js index 2886955c5..eae4bf87b 100644 --- a/components/action-sheet/src/index.js +++ b/components/action-sheet/src/index.js @@ -296,7 +296,7 @@ var ActionSheet = /** @class */ (function (_super) { _a)); return (omi_1.h("div", __assign({ key: idx, onClick: function (_) { _this.hide(); - _this.fire('ItemClick', menu); + _this.fire('item-click', menu); } }, others, { class: cls }), label)); }); }; @@ -322,7 +322,7 @@ var ActionSheet = /** @class */ (function (_super) { _a)); return (omi_1.h("div", __assign({ key: idx }, others, { onClick: function (_) { _this.hide(); - _this.fire('ItemClick', action); + _this.fire('item-click', action); }, className: cls }), label)); }); }; diff --git a/components/action-sheet/src/index.js.map b/components/action-sheet/src/index.js.map index 5867b5230..787f87c12 100644 --- a/components/action-sheet/src/index.js.map +++ b/components/action-sheet/src/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://OActionSheet/webpack/universalModuleDefinition","webpack://OActionSheet/webpack/bootstrap","webpack://OActionSheet/./src/index.scss","webpack://OActionSheet/./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js","webpack://OActionSheet/./src/index.scss?56db","webpack://OActionSheet/./src/index.tsx","webpack://OActionSheet/external {\"commonjs\":\"omi\",\"commonjs2\":\"omi\",\"amd\":\"omi\",\"root\":\"Omi\"}"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CA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AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,gBAAK;AACzB,UAAU,mBAAO,CAAC,sCAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,6CAA6C;AAC7C;AACA;AACA,iBAAiB,EAAE,WAAW,aAAa;AAC3C,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,6CAA6C,WAAW,WAAW;AACnE;AACA;AACA,iBAAiB,kBAAkB;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gCAAgC,6DAA6D;AAC7F,4BAA4B,wBAAwB,mCAAmC,iCAAiC;AACxH,qCAAqC,iBAAiB;AACtD,gCAAgC,mCAAmC;AACnE,gCAAgC,qCAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;AChIA,iD","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"omi\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"omi\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OActionSheet\"] = factory(require(\"omi\"));\n\telse\n\t\troot[\"OActionSheet\"] = factory(root[\"Omi\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_omi__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.tsx\");\n","exports = module.exports = require(\"../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".o-actionsheet {\\n position: fixed;\\n left: 0;\\n bottom: 0;\\n -webkit-transform: translate(0, 100%);\\n transform: translate(0, 100%);\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n z-index: 5000;\\n width: 100%;\\n background-color: #EFEFF4;\\n -webkit-transition: -webkit-transform .3s;\\n transition: -webkit-transform .3s;\\n transition: transform .3s;\\n transition: transform .3s, -webkit-transform .3s; }\\n\\n.o-actionsheet__title {\\n position: relative;\\n height: 65px;\\n padding: 0 20px;\\n line-height: 1.4;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-box-pack: center;\\n -webkit-justify-content: center;\\n justify-content: center;\\n -webkit-box-orient: vertical;\\n -webkit-box-direction: normal;\\n -webkit-flex-direction: column;\\n flex-direction: column;\\n text-align: center;\\n font-size: 14px;\\n color: #808080;\\n background: #FCFCFD; }\\n\\n.o-actionsheet__title:before {\\n content: \\\" \\\";\\n position: absolute;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n height: 1px;\\n border-bottom: 1px solid #e5e5e5;\\n color: #e5e5e5;\\n -webkit-transform-origin: 0 100%;\\n transform-origin: 0 100%;\\n -webkit-transform: scaleY(0.5);\\n transform: scaleY(0.5); }\\n\\n.o-actionsheet__title .o-actionsheet__title-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: -webkit-box;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 2; }\\n\\n.o-actionsheet__menu {\\n background-color: #FCFCFD; }\\n\\n.o-actionsheet__action {\\n margin-top: 6px;\\n background-color: #FCFCFD; }\\n\\n.o-actionsheet__cell {\\n position: relative;\\n padding: 10px 0;\\n text-align: center;\\n font-size: 18px; }\\n\\n.o-actionsheet__cell:before {\\n content: \\\" \\\";\\n position: absolute;\\n left: 0;\\n top: 0;\\n right: 0;\\n height: 1px;\\n border-top: 1px solid #e5e5e5;\\n color: #e5e5e5;\\n -webkit-transform-origin: 0 0;\\n transform-origin: 0 0;\\n -webkit-transform: scaleY(0.5);\\n transform: scaleY(0.5); }\\n\\n.o-actionsheet__cell:active {\\n background-color: #ECECEC; }\\n\\n.o-actionsheet__cell:first-child:before {\\n display: none; }\\n\\n.o-skin_android .o-actionsheet {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n bottom: auto;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n width: 274px;\\n box-sizing: border-box;\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n background: transparent;\\n -webkit-transition: -webkit-transform .3s;\\n transition: -webkit-transform .3s;\\n transition: transform .3s;\\n transition: transform .3s, -webkit-transform .3s; }\\n\\n.o-skin_android .o-actionsheet__action {\\n display: none; }\\n\\n.o-skin_android .o-actionsheet__menu {\\n border-radius: 2px;\\n box-shadow: 0 6px 30px 0 rgba(0, 0, 0, 0.1); }\\n\\n.o-skin_android .o-actionsheet__cell {\\n padding: 13px 24px;\\n font-size: 16px;\\n line-height: 1.4;\\n text-align: left; }\\n\\n.o-skin_android .o-actionsheet__cell:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n\\n.o-skin_android .o-actionsheet__cell:last-child {\\n border-bottom-left-radius: 2px;\\n border-bottom-right-radius: 2px; }\\n\\n.o-actionsheet_toggle {\\n -webkit-transform: translate(0, 0);\\n transform: translate(0, 0); }\\n\\n.mask {\\n position: fixed;\\n width: 100%;\\n height: 100%;\\n background-color: black;\\n opacity: 0.4;\\n z-index: 100;\\n left: 0;\\n top: 0; }\\n\\n.o-skin_android .o-actionsheet_toggle {\\n opacity: 1 !important;\\n top: 50% !important;\\n bottom: auto !important; }\\n\\n.o-skin_android .o-actionsheet {\\n opacity: 0;\\n transition: opacity .3s;\\n top: 150%;\\n bottom: 0; }\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","\n var result = require(\"!!../node_modules/_css-loader@1.0.1@css-loader/index.js!../node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!../node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./index.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nvar css = require(\"./index.scss\");\nvar ActionSheet = /** @class */ (function (_super) {\n __extends(ActionSheet, _super);\n function ActionSheet() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleMaskClick = function (e) {\n _this.hide();\n _this.fire('close');\n };\n return _this;\n }\n ActionSheet.prototype.renderMenuItem = function () {\n var _this = this;\n return this.props.menus.map(function (menu, idx) {\n var _a;\n var label = menu.label, className = menu.className, others = __rest(menu, [\"label\", \"className\"]);\n var cls = omi_1.classNames((_a = {\n 'o-actionsheet__cell': true\n },\n _a[className] = className,\n _a));\n return (omi_1.h(\"div\", __assign({ key: idx, onClick: function (_) {\n _this.hide();\n _this.fire('ItemClick', menu);\n } }, others, { class: cls }), label));\n });\n };\n ActionSheet.prototype.show = function () {\n this.updateProps({\n show: true\n });\n };\n ActionSheet.prototype.hide = function () {\n this.updateProps({\n show: false\n });\n };\n ActionSheet.prototype.renderActions = function () {\n var _this = this;\n return this.props.actions.map(function (action, idx) {\n var _a;\n var label = action.label, className = action.className, others = __rest(action, [\"label\", \"className\"]);\n var cls = omi_1.classNames((_a = {\n 'o-actionsheet__cell': true\n },\n _a[className] = className,\n _a));\n return (omi_1.h(\"div\", __assign({ key: idx }, others, { onClick: function (_) {\n _this.hide();\n _this.fire('ItemClick', action);\n }, className: cls }), label));\n });\n };\n ActionSheet.prototype.render = function () {\n var _a = this.props, show = _a.show, type = _a.type, menus = _a.menus, actions = _a.actions, others = __rest(_a, [\"show\", \"type\", \"menus\", \"actions\"]);\n var cls = omi_1.classNames({\n 'o-actionsheet': true,\n 'o-actionsheet_toggle': show\n });\n var styleType = type ? type : 'ios';\n return (omi_1.h(\"div\", { className: styleType === 'android' ? 'o-skin_android' : '' },\n omi_1.h(\"div\", { class: \"mask\", style: { display: show ? 'block' : 'none' }, onClick: this.handleMaskClick }),\n omi_1.h(\"div\", __assign({ className: cls }, others),\n omi_1.h(\"div\", { className: \"o-actionsheet__menu\" }, this.renderMenuItem()),\n omi_1.h(\"div\", { className: \"o-actionsheet__action\" }, this.renderActions()))));\n };\n ActionSheet.css = css;\n ActionSheet.defaultProps = {\n type: '',\n menus: [],\n actions: [],\n show: false\n };\n ActionSheet.propTypes = {\n type: String,\n menus: Array,\n actions: Array,\n show: Boolean\n };\n ActionSheet = __decorate([\n omi_1.tag('o-action-sheet')\n ], ActionSheet);\n return ActionSheet;\n}(omi_1.WeElement));\nexports.default = ActionSheet;\n","module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://OActionSheet/webpack/universalModuleDefinition","webpack://OActionSheet/webpack/bootstrap","webpack://OActionSheet/./src/index.scss","webpack://OActionSheet/./node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js","webpack://OActionSheet/./src/index.scss?56db","webpack://OActionSheet/./src/index.tsx","webpack://OActionSheet/external {\"commonjs\":\"omi\",\"commonjs2\":\"omi\",\"amd\":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a;AACb;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,YAAY,mBAAO,CAAC,gBAAK;AACzB,UAAU,mBAAO,CAAC,sCAAc;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,6CAA6C;AAC7C;AACA;AACA,iBAAiB,EAAE,WAAW,aAAa;AAC3C,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,6CAA6C,WAAW,WAAW;AACnE;AACA;AACA,iBAAiB,kBAAkB;AACnC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gCAAgC,6DAA6D;AAC7F,4BAA4B,wBAAwB,mCAAmC,iCAAiC;AACxH,qCAAqC,iBAAiB;AACtD,gCAAgC,mCAAmC;AACnE,gCAAgC,qCAAqC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;AChIA,iD","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"omi\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"omi\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"OActionSheet\"] = factory(require(\"omi\"));\n\telse\n\t\troot[\"OActionSheet\"] = factory(root[\"Omi\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_omi__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.tsx\");\n","exports = module.exports = require(\"../node_modules/_css-loader@1.0.1@css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".o-actionsheet {\\n position: fixed;\\n left: 0;\\n bottom: 0;\\n -webkit-transform: translate(0, 100%);\\n transform: translate(0, 100%);\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n z-index: 5000;\\n width: 100%;\\n background-color: #EFEFF4;\\n -webkit-transition: -webkit-transform .3s;\\n transition: -webkit-transform .3s;\\n transition: transform .3s;\\n transition: transform .3s, -webkit-transform .3s; }\\n\\n.o-actionsheet__title {\\n position: relative;\\n height: 65px;\\n padding: 0 20px;\\n line-height: 1.4;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-box-pack: center;\\n -webkit-justify-content: center;\\n justify-content: center;\\n -webkit-box-orient: vertical;\\n -webkit-box-direction: normal;\\n -webkit-flex-direction: column;\\n flex-direction: column;\\n text-align: center;\\n font-size: 14px;\\n color: #808080;\\n background: #FCFCFD; }\\n\\n.o-actionsheet__title:before {\\n content: \\\" \\\";\\n position: absolute;\\n left: 0;\\n bottom: 0;\\n right: 0;\\n height: 1px;\\n border-bottom: 1px solid #e5e5e5;\\n color: #e5e5e5;\\n -webkit-transform-origin: 0 100%;\\n transform-origin: 0 100%;\\n -webkit-transform: scaleY(0.5);\\n transform: scaleY(0.5); }\\n\\n.o-actionsheet__title .o-actionsheet__title-text {\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: -webkit-box;\\n -webkit-box-orient: vertical;\\n -webkit-line-clamp: 2; }\\n\\n.o-actionsheet__menu {\\n background-color: #FCFCFD; }\\n\\n.o-actionsheet__action {\\n margin-top: 6px;\\n background-color: #FCFCFD; }\\n\\n.o-actionsheet__cell {\\n position: relative;\\n padding: 10px 0;\\n text-align: center;\\n font-size: 18px; }\\n\\n.o-actionsheet__cell:before {\\n content: \\\" \\\";\\n position: absolute;\\n left: 0;\\n top: 0;\\n right: 0;\\n height: 1px;\\n border-top: 1px solid #e5e5e5;\\n color: #e5e5e5;\\n -webkit-transform-origin: 0 0;\\n transform-origin: 0 0;\\n -webkit-transform: scaleY(0.5);\\n transform: scaleY(0.5); }\\n\\n.o-actionsheet__cell:active {\\n background-color: #ECECEC; }\\n\\n.o-actionsheet__cell:first-child:before {\\n display: none; }\\n\\n.o-skin_android .o-actionsheet {\\n position: fixed;\\n left: 50%;\\n top: 50%;\\n bottom: auto;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n width: 274px;\\n box-sizing: border-box;\\n -webkit-backface-visibility: hidden;\\n backface-visibility: hidden;\\n background: transparent;\\n -webkit-transition: -webkit-transform .3s;\\n transition: -webkit-transform .3s;\\n transition: transform .3s;\\n transition: transform .3s, -webkit-transform .3s; }\\n\\n.o-skin_android .o-actionsheet__action {\\n display: none; }\\n\\n.o-skin_android .o-actionsheet__menu {\\n border-radius: 2px;\\n box-shadow: 0 6px 30px 0 rgba(0, 0, 0, 0.1); }\\n\\n.o-skin_android .o-actionsheet__cell {\\n padding: 13px 24px;\\n font-size: 16px;\\n line-height: 1.4;\\n text-align: left; }\\n\\n.o-skin_android .o-actionsheet__cell:first-child {\\n border-top-left-radius: 2px;\\n border-top-right-radius: 2px; }\\n\\n.o-skin_android .o-actionsheet__cell:last-child {\\n border-bottom-left-radius: 2px;\\n border-bottom-right-radius: 2px; }\\n\\n.o-actionsheet_toggle {\\n -webkit-transform: translate(0, 0);\\n transform: translate(0, 0); }\\n\\n.mask {\\n position: fixed;\\n width: 100%;\\n height: 100%;\\n background-color: black;\\n opacity: 0.4;\\n z-index: 100;\\n left: 0;\\n top: 0; }\\n\\n.o-skin_android .o-actionsheet_toggle {\\n opacity: 1 !important;\\n top: 50% !important;\\n bottom: auto !important; }\\n\\n.o-skin_android .o-actionsheet {\\n opacity: 0;\\n transition: opacity .3s;\\n top: 150%;\\n bottom: 0; }\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","\n var result = require(\"!!../node_modules/_css-loader@1.0.1@css-loader/index.js!../node_modules/_resolve-url-loader@3.1.1@resolve-url-loader/index.js!../node_modules/_sass-loader@7.3.1@sass-loader/dist/cjs.js??ref--4-3!./index.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar omi_1 = require(\"omi\");\nvar css = require(\"./index.scss\");\nvar ActionSheet = /** @class */ (function (_super) {\n __extends(ActionSheet, _super);\n function ActionSheet() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleMaskClick = function (e) {\n _this.hide();\n _this.fire('close');\n };\n return _this;\n }\n ActionSheet.prototype.renderMenuItem = function () {\n var _this = this;\n return this.props.menus.map(function (menu, idx) {\n var _a;\n var label = menu.label, className = menu.className, others = __rest(menu, [\"label\", \"className\"]);\n var cls = omi_1.classNames((_a = {\n 'o-actionsheet__cell': true\n },\n _a[className] = className,\n _a));\n return (omi_1.h(\"div\", __assign({ key: idx, onClick: function (_) {\n _this.hide();\n _this.fire('item-click', menu);\n } }, others, { class: cls }), label));\n });\n };\n ActionSheet.prototype.show = function () {\n this.updateProps({\n show: true\n });\n };\n ActionSheet.prototype.hide = function () {\n this.updateProps({\n show: false\n });\n };\n ActionSheet.prototype.renderActions = function () {\n var _this = this;\n return this.props.actions.map(function (action, idx) {\n var _a;\n var label = action.label, className = action.className, others = __rest(action, [\"label\", \"className\"]);\n var cls = omi_1.classNames((_a = {\n 'o-actionsheet__cell': true\n },\n _a[className] = className,\n _a));\n return (omi_1.h(\"div\", __assign({ key: idx }, others, { onClick: function (_) {\n _this.hide();\n _this.fire('item-click', action);\n }, className: cls }), label));\n });\n };\n ActionSheet.prototype.render = function () {\n var _a = this.props, show = _a.show, type = _a.type, menus = _a.menus, actions = _a.actions, others = __rest(_a, [\"show\", \"type\", \"menus\", \"actions\"]);\n var cls = omi_1.classNames({\n 'o-actionsheet': true,\n 'o-actionsheet_toggle': show\n });\n var styleType = type ? type : 'ios';\n return (omi_1.h(\"div\", { className: styleType === 'android' ? 'o-skin_android' : '' },\n omi_1.h(\"div\", { class: \"mask\", style: { display: show ? 'block' : 'none' }, onClick: this.handleMaskClick }),\n omi_1.h(\"div\", __assign({ className: cls }, others),\n omi_1.h(\"div\", { className: \"o-actionsheet__menu\" }, this.renderMenuItem()),\n omi_1.h(\"div\", { className: \"o-actionsheet__action\" }, this.renderActions()))));\n };\n ActionSheet.css = css;\n ActionSheet.defaultProps = {\n type: '',\n menus: [],\n actions: [],\n show: false\n };\n ActionSheet.propTypes = {\n type: String,\n menus: Array,\n actions: Array,\n show: Boolean\n };\n ActionSheet = __decorate([\n omi_1.tag('o-action-sheet')\n ], ActionSheet);\n return ActionSheet;\n}(omi_1.WeElement));\nexports.default = ActionSheet;\n","module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;"],"sourceRoot":""} \ No newline at end of file diff --git a/components/action-sheet/src/index.tsx b/components/action-sheet/src/index.tsx index 8e5f10ed4..78841d54d 100644 --- a/components/action-sheet/src/index.tsx +++ b/components/action-sheet/src/index.tsx @@ -40,7 +40,7 @@ export default class ActionSheet extends WeElement { return (
{ this.hide() - this.fire('ItemClick', menu) + this.fire('item-click', menu) }} {...others} class={cls}> {label}
@@ -71,7 +71,7 @@ export default class ActionSheet extends WeElement { return (
{ this.hide() - this.fire('ItemClick', action) + this.fire('item-click', action) }} className={cls}> {label}
diff --git a/components/docs-src/src/docs/en/action-sheet.md b/components/docs-src/src/docs/en/action-sheet.md index 953533991..501a5586e 100644 --- a/components/docs-src/src/docs/en/action-sheet.md +++ b/components/docs-src/src/docs/en/action-sheet.md @@ -51,5 +51,5 @@ Or use script tag to ref it. ``` ### Events -* ItemClick +* item-click * close diff --git a/components/docs-src/src/docs/zh-cn/action-sheet.md b/components/docs-src/src/docs/zh-cn/action-sheet.md index 2bec26267..084bef0f3 100644 --- a/components/docs-src/src/docs/zh-cn/action-sheet.md +++ b/components/docs-src/src/docs/zh-cn/action-sheet.md @@ -50,5 +50,5 @@ import '@omiu/action-sheet' } ``` ### 事件 -* ItemClick +* item-click * close