sharedui2 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/craco.config.js +2 -2
- package/dist/asset-manifest.json +3 -4
- package/dist/index.html +1 -1
- package/dist/ws-button.component.jsx +806 -0
- package/package.json +2 -2
- package/dist/shared.js +0 -3
package/craco.config.js
CHANGED
@@ -4,13 +4,13 @@ module.exports = {
|
|
4
4
|
webpack: {
|
5
5
|
configure: (webpackConfig) => {
|
6
6
|
// Set the entry point to the specific component
|
7
|
-
webpackConfig.entry = path.resolve(__dirname, "src/components/ws-button/
|
7
|
+
webpackConfig.entry = path.resolve(__dirname, "src/components/ws-button/ws-button.component.jsx");
|
8
8
|
|
9
9
|
|
10
10
|
// Set the output to a library format (e.g., UMD or ES Modules)
|
11
11
|
webpackConfig.output = {
|
12
12
|
path: path.resolve(__dirname, "dist"), // Output directory
|
13
|
-
filename: "
|
13
|
+
filename: "ws-button.component.jsx", // Output file
|
14
14
|
library: "SharedLibrary", // Library name
|
15
15
|
libraryTarget: "umd", // Export as UMD module
|
16
16
|
globalObject: "this", // Ensure compatibility with Node.js
|
package/dist/asset-manifest.json
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
|
-
"main.
|
3
|
+
"main.jsx": "/ws-button.component.jsx",
|
4
4
|
"spinner-dark.svg": "/65512c09253771cf0875.svg",
|
5
5
|
"spinner-light.svg": "/b0f8f368da08f13ab31d.svg",
|
6
|
-
"index.html": "/index.html"
|
7
|
-
"shared.js.map": "/shared.js.map"
|
6
|
+
"index.html": "/index.html"
|
8
7
|
},
|
9
8
|
"entrypoints": [
|
10
|
-
"
|
9
|
+
"ws-button.component.jsx"
|
11
10
|
]
|
12
11
|
}
|
package/dist/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
@@ -0,0 +1,806 @@
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("React"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["React"], factory);
|
6
|
+
else if(typeof exports === 'object')
|
7
|
+
exports["SharedLibrary"] = factory(require("React"));
|
8
|
+
else
|
9
|
+
root["SharedLibrary"] = factory(root["React"]);
|
10
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__883__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 424:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
/*
|
21
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
22
|
+
Author Tobias Koppers @sokra
|
23
|
+
*/
|
24
|
+
module.exports = function (cssWithMappingToString) {
|
25
|
+
var list = [];
|
26
|
+
|
27
|
+
// return the list of modules as css string
|
28
|
+
list.toString = function toString() {
|
29
|
+
return this.map(function (item) {
|
30
|
+
var content = "";
|
31
|
+
var needLayer = typeof item[5] !== "undefined";
|
32
|
+
if (item[4]) {
|
33
|
+
content += "@supports (".concat(item[4], ") {");
|
34
|
+
}
|
35
|
+
if (item[2]) {
|
36
|
+
content += "@media ".concat(item[2], " {");
|
37
|
+
}
|
38
|
+
if (needLayer) {
|
39
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
40
|
+
}
|
41
|
+
content += cssWithMappingToString(item);
|
42
|
+
if (needLayer) {
|
43
|
+
content += "}";
|
44
|
+
}
|
45
|
+
if (item[2]) {
|
46
|
+
content += "}";
|
47
|
+
}
|
48
|
+
if (item[4]) {
|
49
|
+
content += "}";
|
50
|
+
}
|
51
|
+
return content;
|
52
|
+
}).join("");
|
53
|
+
};
|
54
|
+
|
55
|
+
// import a list of modules into the list
|
56
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
57
|
+
if (typeof modules === "string") {
|
58
|
+
modules = [[null, modules, undefined]];
|
59
|
+
}
|
60
|
+
var alreadyImportedModules = {};
|
61
|
+
if (dedupe) {
|
62
|
+
for (var k = 0; k < this.length; k++) {
|
63
|
+
var id = this[k][0];
|
64
|
+
if (id != null) {
|
65
|
+
alreadyImportedModules[id] = true;
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
70
|
+
var item = [].concat(modules[_k]);
|
71
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
72
|
+
continue;
|
73
|
+
}
|
74
|
+
if (typeof layer !== "undefined") {
|
75
|
+
if (typeof item[5] === "undefined") {
|
76
|
+
item[5] = layer;
|
77
|
+
} else {
|
78
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
79
|
+
item[5] = layer;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
if (media) {
|
83
|
+
if (!item[2]) {
|
84
|
+
item[2] = media;
|
85
|
+
} else {
|
86
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
87
|
+
item[2] = media;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
if (supports) {
|
91
|
+
if (!item[4]) {
|
92
|
+
item[4] = "".concat(supports);
|
93
|
+
} else {
|
94
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
95
|
+
item[4] = supports;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
list.push(item);
|
99
|
+
}
|
100
|
+
};
|
101
|
+
return list;
|
102
|
+
};
|
103
|
+
|
104
|
+
/***/ }),
|
105
|
+
|
106
|
+
/***/ 963:
|
107
|
+
/***/ ((module) => {
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
module.exports = function (url, options) {
|
112
|
+
if (!options) {
|
113
|
+
options = {};
|
114
|
+
}
|
115
|
+
if (!url) {
|
116
|
+
return url;
|
117
|
+
}
|
118
|
+
url = String(url.__esModule ? url.default : url);
|
119
|
+
|
120
|
+
// If url is already wrapped in quotes, remove them
|
121
|
+
if (/^['"].*['"]$/.test(url)) {
|
122
|
+
url = url.slice(1, -1);
|
123
|
+
}
|
124
|
+
if (options.hash) {
|
125
|
+
url += options.hash;
|
126
|
+
}
|
127
|
+
|
128
|
+
// Should url be wrapped?
|
129
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
130
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
131
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
132
|
+
}
|
133
|
+
return url;
|
134
|
+
};
|
135
|
+
|
136
|
+
/***/ }),
|
137
|
+
|
138
|
+
/***/ 136:
|
139
|
+
/***/ ((module) => {
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
module.exports = function (item) {
|
144
|
+
var content = item[1];
|
145
|
+
var cssMapping = item[3];
|
146
|
+
if (!cssMapping) {
|
147
|
+
return content;
|
148
|
+
}
|
149
|
+
if (typeof btoa === "function") {
|
150
|
+
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
151
|
+
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
152
|
+
var sourceMapping = "/*# ".concat(data, " */");
|
153
|
+
return [content].concat([sourceMapping]).join("\n");
|
154
|
+
}
|
155
|
+
return [content].join("\n");
|
156
|
+
};
|
157
|
+
|
158
|
+
/***/ }),
|
159
|
+
|
160
|
+
/***/ 998:
|
161
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
162
|
+
|
163
|
+
var __webpack_unused_export__;
|
164
|
+
/**
|
165
|
+
* @license React
|
166
|
+
* react-jsx-runtime.production.min.js
|
167
|
+
*
|
168
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
169
|
+
*
|
170
|
+
* This source code is licensed under the MIT license found in the
|
171
|
+
* LICENSE file in the root directory of this source tree.
|
172
|
+
*/
|
173
|
+
|
174
|
+
|
175
|
+
var f = __webpack_require__(883),
|
176
|
+
k = Symbol.for("react.element"),
|
177
|
+
l = Symbol.for("react.fragment"),
|
178
|
+
m = Object.prototype.hasOwnProperty,
|
179
|
+
n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
180
|
+
p = {
|
181
|
+
key: !0,
|
182
|
+
ref: !0,
|
183
|
+
__self: !0,
|
184
|
+
__source: !0
|
185
|
+
};
|
186
|
+
function q(c, a, g) {
|
187
|
+
var b,
|
188
|
+
d = {},
|
189
|
+
e = null,
|
190
|
+
h = null;
|
191
|
+
void 0 !== g && (e = "" + g);
|
192
|
+
void 0 !== a.key && (e = "" + a.key);
|
193
|
+
void 0 !== a.ref && (h = a.ref);
|
194
|
+
for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
195
|
+
if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
|
196
|
+
return {
|
197
|
+
$$typeof: k,
|
198
|
+
type: c,
|
199
|
+
key: e,
|
200
|
+
ref: h,
|
201
|
+
props: d,
|
202
|
+
_owner: n.current
|
203
|
+
};
|
204
|
+
}
|
205
|
+
__webpack_unused_export__ = l;
|
206
|
+
exports.jsx = q;
|
207
|
+
__webpack_unused_export__ = q;
|
208
|
+
|
209
|
+
/***/ }),
|
210
|
+
|
211
|
+
/***/ 446:
|
212
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
if (true) {
|
217
|
+
module.exports = __webpack_require__(998);
|
218
|
+
} else {}
|
219
|
+
|
220
|
+
/***/ }),
|
221
|
+
|
222
|
+
/***/ 994:
|
223
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
224
|
+
|
225
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
226
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
227
|
+
/* harmony export */ });
|
228
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(136);
|
229
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
230
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(424);
|
231
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
232
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(963);
|
233
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
234
|
+
// Imports
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(226), __webpack_require__.b);
|
239
|
+
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(714), __webpack_require__.b);
|
240
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
241
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
242
|
+
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
|
243
|
+
// Module
|
244
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.ws-button {
|
245
|
+
cursor: pointer;
|
246
|
+
display: inline-block;
|
247
|
+
font-size: 16px;
|
248
|
+
font-weight: 600;
|
249
|
+
text-align: center;
|
250
|
+
transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;
|
251
|
+
user-select: none;
|
252
|
+
width: 100%;
|
253
|
+
}
|
254
|
+
.ws-button-default {
|
255
|
+
border-radius: 20px;
|
256
|
+
height: 40px;
|
257
|
+
}
|
258
|
+
.ws-button-baby {
|
259
|
+
border-radius: 12px;
|
260
|
+
height: 24px;
|
261
|
+
}
|
262
|
+
.ws-button-loading {
|
263
|
+
background-color: #05758a;
|
264
|
+
border: none;
|
265
|
+
}
|
266
|
+
.ws-button-loading-content-light {
|
267
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
|
268
|
+
background-repeat: no-repeat;
|
269
|
+
display: block;
|
270
|
+
height: 20px;
|
271
|
+
margin: 0 auto;
|
272
|
+
width: 20px;
|
273
|
+
}
|
274
|
+
.ws-button-loading-content-dark {
|
275
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});
|
276
|
+
background-repeat: no-repeat;
|
277
|
+
display: block;
|
278
|
+
height: 20px;
|
279
|
+
margin: 0 auto;
|
280
|
+
width: 20px;
|
281
|
+
}
|
282
|
+
.ws-button:focus {
|
283
|
+
outline: none;
|
284
|
+
}
|
285
|
+
.ws-button-primary,
|
286
|
+
.ws-button-primary-loading {
|
287
|
+
background-color: #05758a;
|
288
|
+
border: none;
|
289
|
+
color: #ffffff;
|
290
|
+
}
|
291
|
+
.ws-button-primary-loading {
|
292
|
+
cursor: none;
|
293
|
+
}
|
294
|
+
.ws-button-primary:hover {
|
295
|
+
background-color: #005463;
|
296
|
+
}
|
297
|
+
.ws-button-primary.disabled,
|
298
|
+
.ws-button-primary[disabled] {
|
299
|
+
background-color: #82bac4;
|
300
|
+
border: none;
|
301
|
+
cursor: none;
|
302
|
+
}
|
303
|
+
.ws-button-secondary,
|
304
|
+
.ws-button-secondary-loading {
|
305
|
+
background-color: #ffffff;
|
306
|
+
border: 2px solid #05758a;
|
307
|
+
color: #05758a;
|
308
|
+
}
|
309
|
+
.ws-button-secondary-loading {
|
310
|
+
cursor: none;
|
311
|
+
}
|
312
|
+
.ws-button-secondary:hover {
|
313
|
+
border: 2px solid #005463;
|
314
|
+
color: #005463;
|
315
|
+
}
|
316
|
+
.ws-button-secondary.disabled,
|
317
|
+
.ws-button-secondary[disabled] {
|
318
|
+
background-color: #ffffff;
|
319
|
+
border: 2px solid #82bac4;
|
320
|
+
color: #82bac4;
|
321
|
+
cursor: none;
|
322
|
+
}
|
323
|
+
`, "",{"version":3,"sources":["webpack://./src/components/ws-button/ws-button.component.less"],"names":[],"mappings":"AAIA;EACI,eAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,yEAAA;EACA,iBAAA;EACA,WAAA;AAHJ;AAKI;EACI,mBAAA;EACA,YAAA;AAHR;AAMI;EACI,mBAAA;EACA,YAAA;AAJR;AAOI;EACI,yBAAA;EACA,YAAA;AALR;AAQI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AANR;AAUI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AARR;AAYA;EACI,aAAA;AAVJ;AAcA;;EAEI,yBAAA;EACA,YAAA;EACA,cAAA;AAZJ;AAeA;EACI,YAAA;AAbJ;AAgBA;EACI,yBAAA;AAdJ;AAiBA;;EAEI,yBAAA;EACA,YAAA;EACA,YAAA;AAfJ;AAmBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;AAjBJ;AAoBA;EACI,YAAA;AAlBJ;AAqBA;EACI,yBAAA;EACA,cAAA;AAnBJ;AAsBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,YAAA;AApBJ","sourcesContent":["// Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.\n\n@import (reference) '../../../theme.less';\n\n.ws-button {\n cursor: pointer;\n display: inline-block;\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;\n user-select: none;\n width: 100%;\n\n &-default {\n border-radius: 20px;\n height: 40px;\n }\n\n &-baby {\n border-radius: 12px;\n height: 24px;\n }\n\n &-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n }\n\n &-loading-content-light {\n background-image: url('../../assets/spinner-light.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n \n }\n\n &-loading-content-dark {\n background-image: url('../../assets/spinner-dark.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n }\n}\n\n.ws-button:focus {\n outline: none;\n}\n\n// primary button\n.ws-button-primary, \n.ws-button-primary-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n color: @ws-button-primary-text-color;\n}\n\n.ws-button-primary-loading {\n cursor: none;\n}\n\n.ws-button-primary:hover {\n background-color: @ws-button-primary-background-color-hover;\n}\n\n.ws-button-primary.disabled, \n.ws-button-primary[disabled] {\n background-color: @ws-button-primary-background-color-disabled;\n border: none;\n cursor: none;\n}\n\n// secondary button\n.ws-button-secondary,\n.ws-button-secondary-loading {\n background-color: @ws-button-secondary-background-color;\n border: 2px solid @ws-button-secondary-border-color;\n color: @ws-button-secondary-text-color;\n}\n\n.ws-button-secondary-loading {\n cursor: none;\n}\n\n.ws-button-secondary:hover {\n border: 2px solid @ws-button-secondary-border-hover;\n color: @ws-button-secondary-text-color-hover;\n}\n\n.ws-button-secondary.disabled, \n.ws-button-secondary[disabled] {\n background-color: @ws-button-secondary-background-color-disabled;\n border: 2px solid @ws-button-secondary-border-hover-disabled;\n color: @ws-button-secondary-text-color-disabled;\n cursor: none;\n}\n"],"sourceRoot":""}]);
|
324
|
+
// Exports
|
325
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
326
|
+
|
327
|
+
|
328
|
+
/***/ }),
|
329
|
+
|
330
|
+
/***/ 186:
|
331
|
+
/***/ ((module) => {
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
var stylesInDOM = [];
|
336
|
+
function getIndexByIdentifier(identifier) {
|
337
|
+
var result = -1;
|
338
|
+
for (var i = 0; i < stylesInDOM.length; i++) {
|
339
|
+
if (stylesInDOM[i].identifier === identifier) {
|
340
|
+
result = i;
|
341
|
+
break;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
return result;
|
345
|
+
}
|
346
|
+
function modulesToDom(list, options) {
|
347
|
+
var idCountMap = {};
|
348
|
+
var identifiers = [];
|
349
|
+
for (var i = 0; i < list.length; i++) {
|
350
|
+
var item = list[i];
|
351
|
+
var id = options.base ? item[0] + options.base : item[0];
|
352
|
+
var count = idCountMap[id] || 0;
|
353
|
+
var identifier = "".concat(id, " ").concat(count);
|
354
|
+
idCountMap[id] = count + 1;
|
355
|
+
var indexByIdentifier = getIndexByIdentifier(identifier);
|
356
|
+
var obj = {
|
357
|
+
css: item[1],
|
358
|
+
media: item[2],
|
359
|
+
sourceMap: item[3],
|
360
|
+
supports: item[4],
|
361
|
+
layer: item[5]
|
362
|
+
};
|
363
|
+
if (indexByIdentifier !== -1) {
|
364
|
+
stylesInDOM[indexByIdentifier].references++;
|
365
|
+
stylesInDOM[indexByIdentifier].updater(obj);
|
366
|
+
} else {
|
367
|
+
var updater = addElementStyle(obj, options);
|
368
|
+
options.byIndex = i;
|
369
|
+
stylesInDOM.splice(i, 0, {
|
370
|
+
identifier: identifier,
|
371
|
+
updater: updater,
|
372
|
+
references: 1
|
373
|
+
});
|
374
|
+
}
|
375
|
+
identifiers.push(identifier);
|
376
|
+
}
|
377
|
+
return identifiers;
|
378
|
+
}
|
379
|
+
function addElementStyle(obj, options) {
|
380
|
+
var api = options.domAPI(options);
|
381
|
+
api.update(obj);
|
382
|
+
var updater = function updater(newObj) {
|
383
|
+
if (newObj) {
|
384
|
+
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
|
385
|
+
return;
|
386
|
+
}
|
387
|
+
api.update(obj = newObj);
|
388
|
+
} else {
|
389
|
+
api.remove();
|
390
|
+
}
|
391
|
+
};
|
392
|
+
return updater;
|
393
|
+
}
|
394
|
+
module.exports = function (list, options) {
|
395
|
+
options = options || {};
|
396
|
+
list = list || [];
|
397
|
+
var lastIdentifiers = modulesToDom(list, options);
|
398
|
+
return function update(newList) {
|
399
|
+
newList = newList || [];
|
400
|
+
for (var i = 0; i < lastIdentifiers.length; i++) {
|
401
|
+
var identifier = lastIdentifiers[i];
|
402
|
+
var index = getIndexByIdentifier(identifier);
|
403
|
+
stylesInDOM[index].references--;
|
404
|
+
}
|
405
|
+
var newLastIdentifiers = modulesToDom(newList, options);
|
406
|
+
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
|
407
|
+
var _identifier = lastIdentifiers[_i];
|
408
|
+
var _index = getIndexByIdentifier(_identifier);
|
409
|
+
if (stylesInDOM[_index].references === 0) {
|
410
|
+
stylesInDOM[_index].updater();
|
411
|
+
stylesInDOM.splice(_index, 1);
|
412
|
+
}
|
413
|
+
}
|
414
|
+
lastIdentifiers = newLastIdentifiers;
|
415
|
+
};
|
416
|
+
};
|
417
|
+
|
418
|
+
/***/ }),
|
419
|
+
|
420
|
+
/***/ 433:
|
421
|
+
/***/ ((module) => {
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
var memo = {};
|
426
|
+
|
427
|
+
/* istanbul ignore next */
|
428
|
+
function getTarget(target) {
|
429
|
+
if (typeof memo[target] === "undefined") {
|
430
|
+
var styleTarget = document.querySelector(target);
|
431
|
+
|
432
|
+
// Special case to return head of iframe instead of iframe itself
|
433
|
+
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
|
434
|
+
try {
|
435
|
+
// This will throw an exception if access to iframe is blocked
|
436
|
+
// due to cross-origin restrictions
|
437
|
+
styleTarget = styleTarget.contentDocument.head;
|
438
|
+
} catch (e) {
|
439
|
+
// istanbul ignore next
|
440
|
+
styleTarget = null;
|
441
|
+
}
|
442
|
+
}
|
443
|
+
memo[target] = styleTarget;
|
444
|
+
}
|
445
|
+
return memo[target];
|
446
|
+
}
|
447
|
+
|
448
|
+
/* istanbul ignore next */
|
449
|
+
function insertBySelector(insert, style) {
|
450
|
+
var target = getTarget(insert);
|
451
|
+
if (!target) {
|
452
|
+
throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
|
453
|
+
}
|
454
|
+
target.appendChild(style);
|
455
|
+
}
|
456
|
+
module.exports = insertBySelector;
|
457
|
+
|
458
|
+
/***/ }),
|
459
|
+
|
460
|
+
/***/ 990:
|
461
|
+
/***/ ((module) => {
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
/* istanbul ignore next */
|
466
|
+
function insertStyleElement(options) {
|
467
|
+
var element = document.createElement("style");
|
468
|
+
options.setAttributes(element, options.attributes);
|
469
|
+
options.insert(element, options.options);
|
470
|
+
return element;
|
471
|
+
}
|
472
|
+
module.exports = insertStyleElement;
|
473
|
+
|
474
|
+
/***/ }),
|
475
|
+
|
476
|
+
/***/ 626:
|
477
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
/* istanbul ignore next */
|
482
|
+
function setAttributesWithoutAttributes(styleElement) {
|
483
|
+
var nonce = true ? __webpack_require__.nc : 0;
|
484
|
+
if (nonce) {
|
485
|
+
styleElement.setAttribute("nonce", nonce);
|
486
|
+
}
|
487
|
+
}
|
488
|
+
module.exports = setAttributesWithoutAttributes;
|
489
|
+
|
490
|
+
/***/ }),
|
491
|
+
|
492
|
+
/***/ 155:
|
493
|
+
/***/ ((module) => {
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
/* istanbul ignore next */
|
498
|
+
function apply(styleElement, options, obj) {
|
499
|
+
var css = "";
|
500
|
+
if (obj.supports) {
|
501
|
+
css += "@supports (".concat(obj.supports, ") {");
|
502
|
+
}
|
503
|
+
if (obj.media) {
|
504
|
+
css += "@media ".concat(obj.media, " {");
|
505
|
+
}
|
506
|
+
var needLayer = typeof obj.layer !== "undefined";
|
507
|
+
if (needLayer) {
|
508
|
+
css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
|
509
|
+
}
|
510
|
+
css += obj.css;
|
511
|
+
if (needLayer) {
|
512
|
+
css += "}";
|
513
|
+
}
|
514
|
+
if (obj.media) {
|
515
|
+
css += "}";
|
516
|
+
}
|
517
|
+
if (obj.supports) {
|
518
|
+
css += "}";
|
519
|
+
}
|
520
|
+
var sourceMap = obj.sourceMap;
|
521
|
+
if (sourceMap && typeof btoa !== "undefined") {
|
522
|
+
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
|
523
|
+
}
|
524
|
+
|
525
|
+
// For old IE
|
526
|
+
/* istanbul ignore if */
|
527
|
+
options.styleTagTransform(css, styleElement, options.options);
|
528
|
+
}
|
529
|
+
function removeStyleElement(styleElement) {
|
530
|
+
// istanbul ignore if
|
531
|
+
if (styleElement.parentNode === null) {
|
532
|
+
return false;
|
533
|
+
}
|
534
|
+
styleElement.parentNode.removeChild(styleElement);
|
535
|
+
}
|
536
|
+
|
537
|
+
/* istanbul ignore next */
|
538
|
+
function domAPI(options) {
|
539
|
+
if (typeof document === "undefined") {
|
540
|
+
return {
|
541
|
+
update: function update() {},
|
542
|
+
remove: function remove() {}
|
543
|
+
};
|
544
|
+
}
|
545
|
+
var styleElement = options.insertStyleElement(options);
|
546
|
+
return {
|
547
|
+
update: function update(obj) {
|
548
|
+
apply(styleElement, options, obj);
|
549
|
+
},
|
550
|
+
remove: function remove() {
|
551
|
+
removeStyleElement(styleElement);
|
552
|
+
}
|
553
|
+
};
|
554
|
+
}
|
555
|
+
module.exports = domAPI;
|
556
|
+
|
557
|
+
/***/ }),
|
558
|
+
|
559
|
+
/***/ 827:
|
560
|
+
/***/ ((module) => {
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
/* istanbul ignore next */
|
565
|
+
function styleTagTransform(css, styleElement) {
|
566
|
+
if (styleElement.styleSheet) {
|
567
|
+
styleElement.styleSheet.cssText = css;
|
568
|
+
} else {
|
569
|
+
while (styleElement.firstChild) {
|
570
|
+
styleElement.removeChild(styleElement.firstChild);
|
571
|
+
}
|
572
|
+
styleElement.appendChild(document.createTextNode(css));
|
573
|
+
}
|
574
|
+
}
|
575
|
+
module.exports = styleTagTransform;
|
576
|
+
|
577
|
+
/***/ }),
|
578
|
+
|
579
|
+
/***/ 714:
|
580
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
581
|
+
|
582
|
+
module.exports = __webpack_require__.p + "65512c09253771cf0875.svg";
|
583
|
+
|
584
|
+
/***/ }),
|
585
|
+
|
586
|
+
/***/ 226:
|
587
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
588
|
+
|
589
|
+
module.exports = __webpack_require__.p + "b0f8f368da08f13ab31d.svg";
|
590
|
+
|
591
|
+
/***/ }),
|
592
|
+
|
593
|
+
/***/ 883:
|
594
|
+
/***/ ((module) => {
|
595
|
+
|
596
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__883__;
|
597
|
+
|
598
|
+
/***/ })
|
599
|
+
|
600
|
+
/******/ });
|
601
|
+
/************************************************************************/
|
602
|
+
/******/ // The module cache
|
603
|
+
/******/ var __webpack_module_cache__ = {};
|
604
|
+
/******/
|
605
|
+
/******/ // The require function
|
606
|
+
/******/ function __webpack_require__(moduleId) {
|
607
|
+
/******/ // Check if module is in cache
|
608
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
609
|
+
/******/ if (cachedModule !== undefined) {
|
610
|
+
/******/ return cachedModule.exports;
|
611
|
+
/******/ }
|
612
|
+
/******/ // Create a new module (and put it into the cache)
|
613
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
614
|
+
/******/ id: moduleId,
|
615
|
+
/******/ // no module.loaded needed
|
616
|
+
/******/ exports: {}
|
617
|
+
/******/ };
|
618
|
+
/******/
|
619
|
+
/******/ // Execute the module function
|
620
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
621
|
+
/******/
|
622
|
+
/******/ // Return the exports of the module
|
623
|
+
/******/ return module.exports;
|
624
|
+
/******/ }
|
625
|
+
/******/
|
626
|
+
/******/ // expose the modules object (__webpack_modules__)
|
627
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
628
|
+
/******/
|
629
|
+
/************************************************************************/
|
630
|
+
/******/ /* webpack/runtime/compat get default export */
|
631
|
+
/******/ (() => {
|
632
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
633
|
+
/******/ __webpack_require__.n = (module) => {
|
634
|
+
/******/ var getter = module && module.__esModule ?
|
635
|
+
/******/ () => (module['default']) :
|
636
|
+
/******/ () => (module);
|
637
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
638
|
+
/******/ return getter;
|
639
|
+
/******/ };
|
640
|
+
/******/ })();
|
641
|
+
/******/
|
642
|
+
/******/ /* webpack/runtime/define property getters */
|
643
|
+
/******/ (() => {
|
644
|
+
/******/ // define getter functions for harmony exports
|
645
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
646
|
+
/******/ for(var key in definition) {
|
647
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
648
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
649
|
+
/******/ }
|
650
|
+
/******/ }
|
651
|
+
/******/ };
|
652
|
+
/******/ })();
|
653
|
+
/******/
|
654
|
+
/******/ /* webpack/runtime/global */
|
655
|
+
/******/ (() => {
|
656
|
+
/******/ __webpack_require__.g = (function() {
|
657
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
658
|
+
/******/ try {
|
659
|
+
/******/ return this || new Function('return this')();
|
660
|
+
/******/ } catch (e) {
|
661
|
+
/******/ if (typeof window === 'object') return window;
|
662
|
+
/******/ }
|
663
|
+
/******/ })();
|
664
|
+
/******/ })();
|
665
|
+
/******/
|
666
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
667
|
+
/******/ (() => {
|
668
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
669
|
+
/******/ })();
|
670
|
+
/******/
|
671
|
+
/******/ /* webpack/runtime/make namespace object */
|
672
|
+
/******/ (() => {
|
673
|
+
/******/ // define __esModule on exports
|
674
|
+
/******/ __webpack_require__.r = (exports) => {
|
675
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
676
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
677
|
+
/******/ }
|
678
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
679
|
+
/******/ };
|
680
|
+
/******/ })();
|
681
|
+
/******/
|
682
|
+
/******/ /* webpack/runtime/publicPath */
|
683
|
+
/******/ (() => {
|
684
|
+
/******/ var scriptUrl;
|
685
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
686
|
+
/******/ var document = __webpack_require__.g.document;
|
687
|
+
/******/ if (!scriptUrl && document) {
|
688
|
+
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
689
|
+
/******/ scriptUrl = document.currentScript.src;
|
690
|
+
/******/ if (!scriptUrl) {
|
691
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
692
|
+
/******/ if(scripts.length) {
|
693
|
+
/******/ var i = scripts.length - 1;
|
694
|
+
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
695
|
+
/******/ }
|
696
|
+
/******/ }
|
697
|
+
/******/ }
|
698
|
+
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
699
|
+
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
700
|
+
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
701
|
+
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
702
|
+
/******/ __webpack_require__.p = scriptUrl;
|
703
|
+
/******/ })();
|
704
|
+
/******/
|
705
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
706
|
+
/******/ (() => {
|
707
|
+
/******/ __webpack_require__.b = document.baseURI || self.location.href;
|
708
|
+
/******/
|
709
|
+
/******/ // object to store loaded and loading chunks
|
710
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
711
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
712
|
+
/******/ var installedChunks = {
|
713
|
+
/******/ 792: 0
|
714
|
+
/******/ };
|
715
|
+
/******/
|
716
|
+
/******/ // no chunk on demand loading
|
717
|
+
/******/
|
718
|
+
/******/ // no prefetching
|
719
|
+
/******/
|
720
|
+
/******/ // no preloaded
|
721
|
+
/******/
|
722
|
+
/******/ // no HMR
|
723
|
+
/******/
|
724
|
+
/******/ // no HMR manifest
|
725
|
+
/******/
|
726
|
+
/******/ // no on chunks loaded
|
727
|
+
/******/
|
728
|
+
/******/ // no jsonp function
|
729
|
+
/******/ })();
|
730
|
+
/******/
|
731
|
+
/******/ /* webpack/runtime/nonce */
|
732
|
+
/******/ (() => {
|
733
|
+
/******/ __webpack_require__.nc = undefined;
|
734
|
+
/******/ })();
|
735
|
+
/******/
|
736
|
+
/************************************************************************/
|
737
|
+
var __webpack_exports__ = {};
|
738
|
+
// ESM COMPAT FLAG
|
739
|
+
__webpack_require__.r(__webpack_exports__);
|
740
|
+
|
741
|
+
// EXPORTS
|
742
|
+
__webpack_require__.d(__webpack_exports__, {
|
743
|
+
"default": () => (/* binding */ components_ws_button_ws_button_component)
|
744
|
+
});
|
745
|
+
|
746
|
+
// EXTERNAL MODULE: external "React"
|
747
|
+
var external_React_ = __webpack_require__(883);
|
748
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
|
749
|
+
var injectStylesIntoStyleTag = __webpack_require__(186);
|
750
|
+
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
|
751
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleDomAPI.js
|
752
|
+
var styleDomAPI = __webpack_require__(155);
|
753
|
+
var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
|
754
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertBySelector.js
|
755
|
+
var insertBySelector = __webpack_require__(433);
|
756
|
+
var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
|
757
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
|
758
|
+
var setAttributesWithoutAttributes = __webpack_require__(626);
|
759
|
+
var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
|
760
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/insertStyleElement.js
|
761
|
+
var insertStyleElement = __webpack_require__(990);
|
762
|
+
var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
|
763
|
+
// EXTERNAL MODULE: ./node_modules/style-loader/dist/runtime/styleTagTransform.js
|
764
|
+
var styleTagTransform = __webpack_require__(827);
|
765
|
+
var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
|
766
|
+
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./src/components/ws-button/ws-button.component.less
|
767
|
+
var ws_button_component = __webpack_require__(994);
|
768
|
+
;// ./src/components/ws-button/ws-button.component.less
|
769
|
+
|
770
|
+
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
var options = {};
|
781
|
+
|
782
|
+
options.styleTagTransform = (styleTagTransform_default());
|
783
|
+
options.setAttributes = (setAttributesWithoutAttributes_default());
|
784
|
+
|
785
|
+
options.insert = insertBySelector_default().bind(null, "head");
|
786
|
+
|
787
|
+
options.domAPI = (styleDomAPI_default());
|
788
|
+
options.insertStyleElement = (insertStyleElement_default());
|
789
|
+
|
790
|
+
var update = injectStylesIntoStyleTag_default()(ws_button_component/* default */.A, options);
|
791
|
+
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
/* harmony default export */ const ws_button_ws_button_component = (ws_button_component/* default */.A && ws_button_component/* default */.A.locals ? ws_button_component/* default */.A.locals : undefined);
|
796
|
+
|
797
|
+
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
798
|
+
var jsx_runtime = __webpack_require__(446);
|
799
|
+
;// ./src/components/ws-button/ws-button.component.jsx
|
800
|
+
// Copyright © 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.
|
801
|
+
// Dependencies
|
802
|
+
function WsButton(_ref){let{id,children,disabled,isLoading,name,onClick,size,tabIndex,type,value,variant}=_ref;const classes=['ws-button'];if(!size||size==='default'){classes.push('ws-button-default');}else if(size==='baby'){classes.push('ws-button-baby');}let loading=null;if(isLoading){classes.push('ws-button-loading');if(variant==='primary'){loading=/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"ws-button-loading-content-light"});}else if(variant==='secondary'){loading=/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"ws-button-loading-content-dark"});}if(variant==='primary'){classes.push('ws-button-primary-loading');}else if(variant==='secondary'){classes.push('ws-button-secondary-loading');}}else{if(variant==='primary'){classes.push('ws-button-primary');}else if(variant==='secondary'){classes.push('ws-button-secondary');}}return/*#__PURE__*/(0,jsx_runtime.jsx)("button",{"data-testid":"ws-button.component",className:classes.join(' '),disabled:disabled,id:id,name:name,onClick:onClick,tabIndex:tabIndex,type:type,value:value,children:loading?loading:children});}/* harmony default export */ const components_ws_button_ws_button_component = (WsButton);
|
803
|
+
/******/ return __webpack_exports__;
|
804
|
+
/******/ })()
|
805
|
+
;
|
806
|
+
});
|
package/package.json
CHANGED
package/dist/shared.js
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
/*! For license information please see shared.js.LICENSE.txt */
|
2
|
-
!function(n,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("React")):"function"===typeof define&&define.amd?define(["React"],e):"object"===typeof exports?exports.SharedLibrary=e(require("React")):n.SharedLibrary=e(n.React)}(this,(n=>(()=>{"use strict";var e={424:n=>{n.exports=function(n){var e=[];return e.toString=function(){return this.map((function(e){var o="",r="undefined"!==typeof e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),r&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=n(e),r&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o})).join("")},e.i=function(n,o,r,t,a){"string"===typeof n&&(n=[[null,n,void 0]]);var s={};if(r)for(var c=0;c<this.length;c++){var i=this[c][0];null!=i&&(s[i]=!0)}for(var A=0;A<n.length;A++){var u=[].concat(n[A]);r&&s[u[0]]||("undefined"!==typeof a&&("undefined"===typeof u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),t&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=t):u[4]="".concat(t)),e.push(u))}},e}},963:n=>{n.exports=function(n,e){return e||(e={}),n?(n=String(n.__esModule?n.default:n),/^['"].*['"]$/.test(n)&&(n=n.slice(1,-1)),e.hash&&(n+=e.hash),/["'() \t\n]|(%20)/.test(n)||e.needQuotes?'"'.concat(n.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):n):n}},136:n=>{n.exports=function(n){var e=n[1],o=n[3];if(!o)return e;if("function"===typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),t="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(t," */");return[e].concat([a]).join("\n")}return[e].join("\n")}},998:(n,e,o)=>{var r=o(883),t=Symbol.for("react.element"),a=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function A(n,e,o){var r,a={},A=null,u=null;for(r in void 0!==o&&(A=""+o),void 0!==e.key&&(A=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,r)&&!i.hasOwnProperty(r)&&(a[r]=e[r]);if(n&&n.defaultProps)for(r in e=n.defaultProps)void 0===a[r]&&(a[r]=e[r]);return{$$typeof:t,type:n,key:A,ref:u,props:a,_owner:c.current}}e.jsx=A},446:(n,e,o)=>{n.exports=o(998)},994:(n,e,o)=>{o.d(e,{A:()=>b});var r=o(136),t=o.n(r),a=o(424),s=o.n(a),c=o(963),i=o.n(c),A=new URL(o(226),o.b),u=new URL(o(714),o.b),d=s()(t()),l=i()(A),p=i()(u);d.push([n.id,`.ws-button {\n cursor: pointer;\n display: inline-block;\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;\n user-select: none;\n width: 100%;\n}\n.ws-button-default {\n border-radius: 20px;\n height: 40px;\n}\n.ws-button-baby {\n border-radius: 12px;\n height: 24px;\n}\n.ws-button-loading {\n background-color: #05758a;\n border: none;\n}\n.ws-button-loading-content-light {\n background-image: url(${l});\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n}\n.ws-button-loading-content-dark {\n background-image: url(${p});\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n}\n.ws-button:focus {\n outline: none;\n}\n.ws-button-primary,\n.ws-button-primary-loading {\n background-color: #05758a;\n border: none;\n color: #ffffff;\n}\n.ws-button-primary-loading {\n cursor: none;\n}\n.ws-button-primary:hover {\n background-color: #005463;\n}\n.ws-button-primary.disabled,\n.ws-button-primary[disabled] {\n background-color: #82bac4;\n border: none;\n cursor: none;\n}\n.ws-button-secondary,\n.ws-button-secondary-loading {\n background-color: #ffffff;\n border: 2px solid #05758a;\n color: #05758a;\n}\n.ws-button-secondary-loading {\n cursor: none;\n}\n.ws-button-secondary:hover {\n border: 2px solid #005463;\n color: #005463;\n}\n.ws-button-secondary.disabled,\n.ws-button-secondary[disabled] {\n background-color: #ffffff;\n border: 2px solid #82bac4;\n color: #82bac4;\n cursor: none;\n}\n`,"",{version:3,sources:["webpack://./src/components/ws-button/ws-button.component.less"],names:[],mappings:"AAIA;EACI,eAAA;EACA,qBAAA;EACA,eAAA;EACA,gBAAA;EACA,kBAAA;EACA,yEAAA;EACA,iBAAA;EACA,WAAA;AAHJ;AAKI;EACI,mBAAA;EACA,YAAA;AAHR;AAMI;EACI,mBAAA;EACA,YAAA;AAJR;AAOI;EACI,yBAAA;EACA,YAAA;AALR;AAQI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AANR;AAUI;EACI,yDAAA;EACA,4BAAA;EACA,cAAA;EACA,YAAA;EACA,cAAA;EACA,WAAA;AARR;AAYA;EACI,aAAA;AAVJ;AAcA;;EAEI,yBAAA;EACA,YAAA;EACA,cAAA;AAZJ;AAeA;EACI,YAAA;AAbJ;AAgBA;EACI,yBAAA;AAdJ;AAiBA;;EAEI,yBAAA;EACA,YAAA;EACA,YAAA;AAfJ;AAmBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;AAjBJ;AAoBA;EACI,YAAA;AAlBJ;AAqBA;EACI,yBAAA;EACA,cAAA;AAnBJ;AAsBA;;EAEI,yBAAA;EACA,yBAAA;EACA,cAAA;EACA,YAAA;AApBJ",sourcesContent:["// Copyright \xa9 2024. Cloud Software Group, Inc. All Rights Reserved. Confidential & Proprietary.\n\n@import (reference) '../../../theme.less';\n\n.ws-button {\n cursor: pointer;\n display: inline-block;\n font-size: 16px;\n font-weight: 600;\n text-align: center;\n transition: background-color 0.1s ease, border 0.1s ease, color 0.1s ease;\n user-select: none;\n width: 100%;\n\n &-default {\n border-radius: 20px;\n height: 40px;\n }\n\n &-baby {\n border-radius: 12px;\n height: 24px;\n }\n\n &-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n }\n\n &-loading-content-light {\n background-image: url('../../assets/spinner-light.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n \n }\n\n &-loading-content-dark {\n background-image: url('../../assets/spinner-dark.svg');\n background-repeat: no-repeat;\n display: block;\n height: 20px;\n margin: 0 auto;\n width: 20px;\n }\n}\n\n.ws-button:focus {\n outline: none;\n}\n\n// primary button\n.ws-button-primary, \n.ws-button-primary-loading {\n background-color: @ws-button-primary-background-color;\n border: none;\n color: @ws-button-primary-text-color;\n}\n\n.ws-button-primary-loading {\n cursor: none;\n}\n\n.ws-button-primary:hover {\n background-color: @ws-button-primary-background-color-hover;\n}\n\n.ws-button-primary.disabled, \n.ws-button-primary[disabled] {\n background-color: @ws-button-primary-background-color-disabled;\n border: none;\n cursor: none;\n}\n\n// secondary button\n.ws-button-secondary,\n.ws-button-secondary-loading {\n background-color: @ws-button-secondary-background-color;\n border: 2px solid @ws-button-secondary-border-color;\n color: @ws-button-secondary-text-color;\n}\n\n.ws-button-secondary-loading {\n cursor: none;\n}\n\n.ws-button-secondary:hover {\n border: 2px solid @ws-button-secondary-border-hover;\n color: @ws-button-secondary-text-color-hover;\n}\n\n.ws-button-secondary.disabled, \n.ws-button-secondary[disabled] {\n background-color: @ws-button-secondary-background-color-disabled;\n border: 2px solid @ws-button-secondary-border-hover-disabled;\n color: @ws-button-secondary-text-color-disabled;\n cursor: none;\n}\n"],sourceRoot:""}]);const b=d},186:n=>{var e=[];function o(n){for(var o=-1,r=0;r<e.length;r++)if(e[r].identifier===n){o=r;break}return o}function r(n,r){for(var a={},s=[],c=0;c<n.length;c++){var i=n[c],A=r.base?i[0]+r.base:i[0],u=a[A]||0,d="".concat(A," ").concat(u);a[A]=u+1;var l=o(d),p={css:i[1],media:i[2],sourceMap:i[3],supports:i[4],layer:i[5]};if(-1!==l)e[l].references++,e[l].updater(p);else{var b=t(p,r);r.byIndex=c,e.splice(c,0,{identifier:d,updater:b,references:1})}s.push(d)}return s}function t(n,e){var o=e.domAPI(e);o.update(n);return function(e){if(e){if(e.css===n.css&&e.media===n.media&&e.sourceMap===n.sourceMap&&e.supports===n.supports&&e.layer===n.layer)return;o.update(n=e)}else o.remove()}}n.exports=function(n,t){var a=r(n=n||[],t=t||{});return function(n){n=n||[];for(var s=0;s<a.length;s++){var c=o(a[s]);e[c].references--}for(var i=r(n,t),A=0;A<a.length;A++){var u=o(a[A]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}a=i}}},433:n=>{var e={};n.exports=function(n,o){var r=function(n){if("undefined"===typeof e[n]){var o=document.querySelector(n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(r){o=null}e[n]=o}return e[n]}(n);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(o)}},990:n=>{n.exports=function(n){var e=document.createElement("style");return n.setAttributes(e,n.attributes),n.insert(e,n.options),e}},626:(n,e,o)=>{n.exports=function(n){var e=o.nc;e&&n.setAttribute("nonce",e)}},155:n=>{n.exports=function(n){if("undefined"===typeof document)return{update:function(){},remove:function(){}};var e=n.insertStyleElement(n);return{update:function(o){!function(n,e,o){var r="";o.supports&&(r+="@supports (".concat(o.supports,") {")),o.media&&(r+="@media ".concat(o.media," {"));var t="undefined"!==typeof o.layer;t&&(r+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),r+=o.css,t&&(r+="}"),o.media&&(r+="}"),o.supports&&(r+="}");var a=o.sourceMap;a&&"undefined"!==typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(r,n,e.options)}(e,n,o)},remove:function(){!function(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n)}(e)}}}},827:n=>{n.exports=function(n,e){if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},714:(n,e,o)=>{n.exports=o.p+"65512c09253771cf0875.svg"},226:(n,e,o)=>{n.exports=o.p+"b0f8f368da08f13ab31d.svg"},883:e=>{e.exports=n}},o={};function r(n){var t=o[n];if(void 0!==t)return t.exports;var a=o[n]={id:n,exports:{}};return e[n](a,a.exports,r),a.exports}r.m=e,r.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return r.d(e,{a:e}),e},r.d=(n,e)=>{for(var o in e)r.o(e,o)&&!r.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"===typeof window)return window}}(),r.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),r.r=n=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},(()=>{var n;r.g.importScripts&&(n=r.g.location+"");var e=r.g.document;if(!n&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(n=e.currentScript.src),!n)){var o=e.getElementsByTagName("script");if(o.length)for(var t=o.length-1;t>-1&&(!n||!/^http(s?):/.test(n));)n=o[t--].src}if(!n)throw new Error("Automatic publicPath is not supported in this browser");n=n.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=n})(),r.b=document.baseURI||self.location.href,r.nc=void 0;var t={};r.r(t),r.d(t,{WsButton:()=>w});r(883);var a=r(186),s=r.n(a),c=r(155),i=r.n(c),A=r(433),u=r.n(A),d=r(626),l=r.n(d),p=r(990),b=r.n(p),f=r(827),y=r.n(f),g=r(994),h={};h.styleTagTransform=y(),h.setAttributes=l(),h.insert=u().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=b();s()(g.A,h);g.A&&g.A.locals&&g.A.locals;var m=r(446);const w=function(n){let{id:e,children:o,disabled:r,isLoading:t,name:a,onClick:s,size:c,tabIndex:i,type:A,value:u,variant:d}=n;const l=["ws-button"];c&&"default"!==c?"baby"===c&&l.push("ws-button-baby"):l.push("ws-button-default");let p=null;return t?(l.push("ws-button-loading"),"primary"===d?p=(0,m.jsx)("div",{className:"ws-button-loading-content-light"}):"secondary"===d&&(p=(0,m.jsx)("div",{className:"ws-button-loading-content-dark"})),"primary"===d?l.push("ws-button-primary-loading"):"secondary"===d&&l.push("ws-button-secondary-loading")):"primary"===d?l.push("ws-button-primary"):"secondary"===d&&l.push("ws-button-secondary"),(0,m.jsx)("button",{"data-testid":"ws-button.component",className:l.join(" "),disabled:r,id:e,name:a,onClick:s,tabIndex:i,type:A,value:u,children:p||o})};return t})()));
|
3
|
-
//# sourceMappingURL=shared.js.map
|