@decidables/decidables-elements 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/LICENSE.md +641 -750
- package/README.md +20 -9
- package/lib/decidablesElements.esm.js +32 -32
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +2 -2
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +32 -32
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +1 -1
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<!--lint ignore first-heading-level-->
|
|
2
2
|
|
|
3
|
-
# decidables-elements
|
|
3
|
+
# **`@decidables/decidables-elements`**<br>Web Components for Basic UI in [**decidables**](https://decidables.github.io)
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@decidables/decidables-elements)
|
|
6
|
-
[](https://github.com/decidables/decidables/blob/main/LICENSE.md)
|
|
6
|
+
[](https://github.com/decidables/decidables/blob/main/LICENSE.md)
|
|
7
|
+
|
|
8
|
+
This package provides basic user interface web components for use in all of the explorables. This
|
|
9
|
+
facilitates a consistent look and feel. They try to use the native inputs when possible, but build
|
|
10
|
+
on them for new elements like a switch, and composite elements like a slider with a linked spinner.
|
|
7
11
|
|
|
8
12
|
## Usage
|
|
9
13
|
|
|
@@ -267,7 +271,9 @@ static get properties() {
|
|
|
267
271
|
|
|
268
272
|
And `this.stuff` will be a `Set` with members: `'this'`, `'that'`, and `'other'`
|
|
269
273
|
|
|
270
|
-
##
|
|
274
|
+
## Development
|
|
275
|
+
|
|
276
|
+
### Features/Bugs/Notes
|
|
271
277
|
|
|
272
278
|
- Custom spinner that looks better than User Agent spinners?
|
|
273
279
|
- Edge/IE11 - slider shadow is clipped
|
|
@@ -275,9 +281,7 @@ And `this.stuff` will be a `Set` with members: `'this'`, `'that'`, and `'other'`
|
|
|
275
281
|
- Firefox - spinner arrows look ugly and asymmetrical
|
|
276
282
|
- IE11 - No CSS variables outside custom elements (and not patched by ShadyCSS!)
|
|
277
283
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
### Local Scripts
|
|
284
|
+
### Package Scripts
|
|
281
285
|
|
|
282
286
|
- `yarn lint`
|
|
283
287
|
- Lints markdown, scripts and styles
|
|
@@ -290,7 +294,7 @@ And `this.stuff` will be a `Set` with members: `'this'`, `'that'`, and `'other'`
|
|
|
290
294
|
- `yarn build`
|
|
291
295
|
- Builds bundles from `src/` to `lib/`
|
|
292
296
|
|
|
293
|
-
|
|
297
|
+
### File Organization
|
|
294
298
|
|
|
295
299
|
- `decidables-elements/`
|
|
296
300
|
- `lib/` (Bundles created from `src/` by `build`) **\[autogenerated\]**
|
|
@@ -298,6 +302,13 @@ And `this.stuff` will be a `Set` with members: `'this'`, `'that'`, and `'other'`
|
|
|
298
302
|
- `test/` (Testing files)
|
|
299
303
|
- `coverage/` (Code coverage results) **\[autogenerated\]**
|
|
300
304
|
- `CHANGELOG.md` (Based on conventional commits) **\[autogenerated\]**
|
|
301
|
-
- `gulpfile.js` (
|
|
302
|
-
- `package.json` (
|
|
305
|
+
- `gulpfile.js` (Tasks for *gulp*)
|
|
306
|
+
- `package.json` (Package config for *yarn* and *npm*)
|
|
303
307
|
- `README.md` (This file)
|
|
308
|
+
|
|
309
|
+
## [License](https://github.com/decidables/decidables/blob/main/LICENSE.md)
|
|
310
|
+
|
|
311
|
+
The content of this project is licensed under [Creative Commons Attribution-ShareAlike 4.0
|
|
312
|
+
International License (CC-BY-SA-4.0)](https://creativecommons.org/licenses/by-sa/4.0/) and the
|
|
313
|
+
source code of this project is licensed under [GNU General Public License v3.0 or any later version
|
|
314
|
+
(GPL-3.0-or-later)](https://www.gnu.org/licenses/gpl-3.0.html).
|
|
@@ -655,12 +655,12 @@ var a$1 = /*#__PURE__*/function (_HTMLElement) {
|
|
|
655
655
|
key: "requestUpdate",
|
|
656
656
|
value: function requestUpdate(t, i, s) {
|
|
657
657
|
var e = !0;
|
|
658
|
-
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$
|
|
658
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
|
|
659
659
|
}
|
|
660
660
|
}, {
|
|
661
|
-
key: "_$
|
|
661
|
+
key: "_$E_",
|
|
662
662
|
value: function () {
|
|
663
|
-
var _$
|
|
663
|
+
var _$E_2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
664
664
|
var t;
|
|
665
665
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
666
666
|
while (1) {
|
|
@@ -703,11 +703,11 @@ var a$1 = /*#__PURE__*/function (_HTMLElement) {
|
|
|
703
703
|
}, _callee, this, [[1, 6]]);
|
|
704
704
|
}));
|
|
705
705
|
|
|
706
|
-
function _$
|
|
707
|
-
return _$
|
|
706
|
+
function _$E_() {
|
|
707
|
+
return _$E_2.apply(this, arguments);
|
|
708
708
|
}
|
|
709
709
|
|
|
710
|
-
return _$
|
|
710
|
+
return _$E_;
|
|
711
711
|
}()
|
|
712
712
|
}, {
|
|
713
713
|
key: "scheduleUpdate",
|
|
@@ -775,9 +775,9 @@ var a$1 = /*#__PURE__*/function (_HTMLElement) {
|
|
|
775
775
|
value: function update(t) {
|
|
776
776
|
var _this5 = this;
|
|
777
777
|
|
|
778
|
-
void 0 !== this._$
|
|
778
|
+
void 0 !== this._$EC && (this._$EC.forEach(function (t, i) {
|
|
779
779
|
return _this5._$ES(i, _this5[i], t);
|
|
780
|
-
}), this._$
|
|
780
|
+
}), this._$EC = void 0), this._$EU();
|
|
781
781
|
}
|
|
782
782
|
}, {
|
|
783
783
|
key: "updated",
|
|
@@ -904,7 +904,7 @@ a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a
|
|
|
904
904
|
mode: "open"
|
|
905
905
|
}, null == h$1 || h$1({
|
|
906
906
|
ReactiveElement: a$1
|
|
907
|
-
}), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.1
|
|
907
|
+
}), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.3.1");
|
|
908
908
|
|
|
909
909
|
/**
|
|
910
910
|
* @license
|
|
@@ -941,7 +941,7 @@ var i = globalThis.trustedTypes,
|
|
|
941
941
|
f = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
|
|
942
942
|
_ = /'/g,
|
|
943
943
|
m = /"/g,
|
|
944
|
-
g = /^(?:script|style|textarea)$/i,
|
|
944
|
+
g = /^(?:script|style|textarea|title)$/i,
|
|
945
945
|
p = function p(t) {
|
|
946
946
|
return function (i) {
|
|
947
947
|
for (var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -1230,23 +1230,23 @@ var N = /*#__PURE__*/function () {
|
|
|
1230
1230
|
key: "_$AI",
|
|
1231
1231
|
value: function _$AI(t) {
|
|
1232
1232
|
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
|
|
1233
|
-
t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.
|
|
1233
|
+
t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.k(t) : u(t) ? this.S(t) : this.$(t);
|
|
1234
1234
|
}
|
|
1235
1235
|
}, {
|
|
1236
|
-
key: "
|
|
1237
|
-
value: function
|
|
1236
|
+
key: "A",
|
|
1237
|
+
value: function A(t) {
|
|
1238
1238
|
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._$AB;
|
|
1239
1239
|
return this._$AA.parentNode.insertBefore(t, i);
|
|
1240
1240
|
}
|
|
1241
1241
|
}, {
|
|
1242
|
-
key: "
|
|
1243
|
-
value: function
|
|
1244
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
1242
|
+
key: "k",
|
|
1243
|
+
value: function k(t) {
|
|
1244
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
|
|
1245
1245
|
}
|
|
1246
1246
|
}, {
|
|
1247
1247
|
key: "$",
|
|
1248
1248
|
value: function $(t) {
|
|
1249
|
-
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.
|
|
1249
|
+
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
|
|
1250
1250
|
}
|
|
1251
1251
|
}, {
|
|
1252
1252
|
key: "T",
|
|
@@ -1259,7 +1259,7 @@ var N = /*#__PURE__*/function () {
|
|
|
1259
1259
|
var _t8 = new V(o, this),
|
|
1260
1260
|
_i9 = _t8.p(this.options);
|
|
1261
1261
|
|
|
1262
|
-
_t8.m(s), this.
|
|
1262
|
+
_t8.m(s), this.k(_i9), this._$AH = _t8;
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
1265
|
}, {
|
|
@@ -1269,8 +1269,8 @@ var N = /*#__PURE__*/function () {
|
|
|
1269
1269
|
return void 0 === i && T.set(t.strings, i = new E(t)), i;
|
|
1270
1270
|
}
|
|
1271
1271
|
}, {
|
|
1272
|
-
key: "
|
|
1273
|
-
value: function
|
|
1272
|
+
key: "S",
|
|
1273
|
+
value: function S(t) {
|
|
1274
1274
|
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
1275
1275
|
var i = this._$AH;
|
|
1276
1276
|
var s,
|
|
@@ -1282,7 +1282,7 @@ var N = /*#__PURE__*/function () {
|
|
|
1282
1282
|
try {
|
|
1283
1283
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
1284
1284
|
var _o2 = _step3.value;
|
|
1285
|
-
e === i.length ? i.push(s = new N(this.
|
|
1285
|
+
e === i.length ? i.push(s = new N(this.A(h()), this.A(h()), this, this.options)) : s = i[e], s._$AI(_o2), e++;
|
|
1286
1286
|
}
|
|
1287
1287
|
} catch (err) {
|
|
1288
1288
|
_iterator3.e(err);
|
|
@@ -1349,11 +1349,11 @@ var S = /*#__PURE__*/function () {
|
|
|
1349
1349
|
_h = P(this, _e[s + _l], i, _l), _h === b && (_h = this._$AH[_l]), n || (n = !r(_h) || _h !== this._$AH[_l]), _h === w ? t = w : t !== w && (t += (null != _h ? _h : "") + o[_l + 1]), this._$AH[_l] = _h;
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
n && !e && this.
|
|
1352
|
+
n && !e && this.C(t);
|
|
1353
1353
|
}
|
|
1354
1354
|
}, {
|
|
1355
|
-
key: "
|
|
1356
|
-
value: function
|
|
1355
|
+
key: "C",
|
|
1356
|
+
value: function C(t) {
|
|
1357
1357
|
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
1358
1358
|
}
|
|
1359
1359
|
}]);
|
|
@@ -1376,8 +1376,8 @@ var M = /*#__PURE__*/function (_S) {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
|
|
1378
1378
|
_createClass(M, [{
|
|
1379
|
-
key: "
|
|
1380
|
-
value: function
|
|
1379
|
+
key: "C",
|
|
1380
|
+
value: function C(t) {
|
|
1381
1381
|
this.element[this.name] = t === w ? void 0 : t;
|
|
1382
1382
|
}
|
|
1383
1383
|
}]);
|
|
@@ -1385,7 +1385,7 @@ var M = /*#__PURE__*/function (_S) {
|
|
|
1385
1385
|
return M;
|
|
1386
1386
|
}(S);
|
|
1387
1387
|
|
|
1388
|
-
var
|
|
1388
|
+
var k = i ? i.emptyScript : "";
|
|
1389
1389
|
|
|
1390
1390
|
var H = /*#__PURE__*/function (_S2) {
|
|
1391
1391
|
_inherits(H, _S2);
|
|
@@ -1402,9 +1402,9 @@ var H = /*#__PURE__*/function (_S2) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
1404
|
_createClass(H, [{
|
|
1405
|
-
key: "
|
|
1406
|
-
value: function
|
|
1407
|
-
t && t !== w ? this.element.setAttribute(this.name,
|
|
1405
|
+
key: "C",
|
|
1406
|
+
value: function C(t) {
|
|
1407
|
+
t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
|
|
1408
1408
|
}
|
|
1409
1409
|
}]);
|
|
1410
1410
|
|
|
@@ -1470,7 +1470,7 @@ var L = /*#__PURE__*/function () {
|
|
|
1470
1470
|
}();
|
|
1471
1471
|
|
|
1472
1472
|
var z = window.litHtmlPolyfillSupport;
|
|
1473
|
-
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.
|
|
1473
|
+
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.2.1");
|
|
1474
1474
|
|
|
1475
1475
|
/**
|
|
1476
1476
|
* @license
|
|
@@ -1540,7 +1540,7 @@ var n = globalThis.litElementPolyfillSupport;
|
|
|
1540
1540
|
null == n || n({
|
|
1541
1541
|
LitElement: s
|
|
1542
1542
|
});
|
|
1543
|
-
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.
|
|
1543
|
+
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.2.0");
|
|
1544
1544
|
|
|
1545
1545
|
var noop = {
|
|
1546
1546
|
value: function value() {}
|