@shoper/phoenix_design_system 0.19.3-4 → 0.19.3-6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/{packages/phoenix/external → external}/classnames/index.js +10 -16
- package/build/{esm/packages/phoenix → cjs}/external/classnames/index.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input.js +4 -2
- package/build/cjs/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/tabs/tab/tab.js +3 -3
- package/build/cjs/packages/phoenix/src/components/tabs/tabs.js +7 -15
- package/build/cjs/packages/phoenix/src/components/tabs/tabs.js.map +1 -1
- package/build/esm/{packages/phoenix/external → external}/classnames/index.js +10 -16
- package/build/{cjs/packages/phoenix → esm}/external/classnames/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.js +4 -2
- package/build/esm/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/tabs/tab/tab.js +1 -1
- package/build/esm/packages/phoenix/src/components/tabs/tabs.js +5 -13
- package/build/esm/packages/phoenix/src/components/tabs/tabs.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/tabs/tabs_types.d.ts +0 -3
- package/package.json +1 -1
- package/build/cjs/packages/utilities/build/esm/ui_dom_utils.js +0 -24
- package/build/cjs/packages/utilities/build/esm/ui_dom_utils.js.map +0 -1
- package/build/esm/packages/utilities/build/esm/ui_dom_utils.js +0 -20
- package/build/esm/packages/utilities/build/esm/ui_dom_utils.js.map +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _commonjsHelpers = require('
|
|
5
|
+
var _commonjsHelpers = require('../../_virtual/_commonjsHelpers.js');
|
|
6
6
|
|
|
7
7
|
/*!
|
|
8
|
-
Copyright (c)
|
|
8
|
+
Copyright (c) 2017 Jed Watson.
|
|
9
9
|
Licensed under the MIT License (MIT), see
|
|
10
10
|
http://jedwatson.github.io/classnames
|
|
11
11
|
*/
|
|
@@ -17,7 +17,7 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
17
17
|
|
|
18
18
|
var hasOwn = {}.hasOwnProperty;
|
|
19
19
|
|
|
20
|
-
function classNames() {
|
|
20
|
+
function classNames () {
|
|
21
21
|
var classes = [];
|
|
22
22
|
|
|
23
23
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -28,22 +28,16 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
28
28
|
|
|
29
29
|
if (argType === 'string' || argType === 'number') {
|
|
30
30
|
classes.push(arg);
|
|
31
|
-
} else if (Array.isArray(arg)) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
classes.push(inner);
|
|
36
|
-
}
|
|
31
|
+
} else if (Array.isArray(arg) && arg.length) {
|
|
32
|
+
var inner = classNames.apply(null, arg);
|
|
33
|
+
if (inner) {
|
|
34
|
+
classes.push(inner);
|
|
37
35
|
}
|
|
38
36
|
} else if (argType === 'object') {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
classes.push(key);
|
|
43
|
-
}
|
|
37
|
+
for (var key in arg) {
|
|
38
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
39
|
+
classes.push(key);
|
|
44
40
|
}
|
|
45
|
-
} else {
|
|
46
|
-
classes.push(arg.toString());
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,9 +6,9 @@ var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var index = require('../../../../external/classnames/index.js');
|
|
10
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
11
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
13
13
|
|
|
14
14
|
exports.HCheckbox = class HCheckbox extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
|
|
|
8
8
|
var litHtml = require('lit-html');
|
|
9
9
|
var decorators_js = require('@lit/reactive-element/decorators.js');
|
|
10
10
|
var ref_js = require('lit-html/directives/ref.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
13
13
|
var ifDefined_js = require('lit-html/directives/if-defined.js');
|
|
14
14
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -7,9 +7,9 @@ var decorators = require('lit/decorators');
|
|
|
7
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var input_constants = require('./input_constants.js');
|
|
10
|
-
var index = require('../../../../external/classnames/index.js');
|
|
11
10
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
12
11
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
12
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
13
13
|
|
|
14
14
|
exports.HInput = class HInput extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
15
15
|
constructor() {
|
|
@@ -23,7 +23,9 @@ exports.HInput = class HInput extends phoenix_light_lit_element.PhoenixLightLitE
|
|
|
23
23
|
connectedCallback() {
|
|
24
24
|
var _a;
|
|
25
25
|
super.connectedCallback();
|
|
26
|
-
this.
|
|
26
|
+
if (this.type !== input_constants.INPUT_CONTROL_TYPES.hidden) {
|
|
27
|
+
this.classList.add(input_constants.INPUT_CONTROL_CSS_CLASSES.input);
|
|
28
|
+
}
|
|
27
29
|
const cssClasses = index['default']({
|
|
28
30
|
[input_constants.INPUT_CONTROL_CSS_CLASSES.inputDisabled]: this.disabled,
|
|
29
31
|
[input_constants.INPUT_CONTROL_CSS_CLASSES.inputError]: this.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,9 +6,9 @@ var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var index = require('../../../../external/classnames/index.js');
|
|
10
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
11
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('../checkbox/checkbox_constants.js');
|
|
13
13
|
var radio_constants = require('./radio_constants.js');
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,9 +6,9 @@ var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var index = require('../../../../external/classnames/index.js');
|
|
10
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
11
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('../checkbox/checkbox_constants.js');
|
|
13
13
|
var switch_constants = require('./switch_constants.js');
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -6,9 +6,9 @@ var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
7
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
|
-
var index = require('../../../../external/classnames/index.js');
|
|
10
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
11
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var textarea_constants = require('./textarea_constants.js');
|
|
13
13
|
|
|
14
14
|
exports.HTextarea = class HTextarea extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
7
8
|
var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
9
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
10
|
var btn_controller = require('../../../controllers/btn_controller.js');
|
|
10
11
|
var tab_constants = require('./tab_constants.js');
|
|
11
|
-
var ui_dom_utils = require('../../../../../utilities/build/esm/ui_dom_utils.js');
|
|
12
12
|
|
|
13
13
|
exports.HTab = class HTab extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
14
14
|
constructor() {
|
|
@@ -33,7 +33,7 @@ exports.HTab = class HTab extends phoenix_light_lit_element.PhoenixLightLitEleme
|
|
|
33
33
|
set selected(selected) {
|
|
34
34
|
selected ? this.setAttribute(tab_constants.TAB_SELECTED_ATTRIBUTE_NAME, '') : this.removeAttribute(tab_constants.TAB_SELECTED_ATTRIBUTE_NAME);
|
|
35
35
|
this.setAttribute('aria-selected', String(selected));
|
|
36
|
-
selected ?
|
|
36
|
+
selected ? utilities.UiDomUtils.makeNavigable(this) : utilities.UiDomUtils.makeUnnavigable(this);
|
|
37
37
|
}
|
|
38
38
|
attributeChangedCallback(name, value, newValue) {
|
|
39
39
|
super.attributeChangedCallback(name, value, newValue);
|
|
@@ -49,7 +49,7 @@ exports.HTab = class HTab extends phoenix_light_lit_element.PhoenixLightLitEleme
|
|
|
49
49
|
this._btnController = new btn_controller.BtnController(this, this._dispatchSelectedEvent);
|
|
50
50
|
this._setupAttributes();
|
|
51
51
|
this._bindEvents();
|
|
52
|
-
this.selected ?
|
|
52
|
+
this.selected ? utilities.UiDomUtils.makeNavigable(this) : utilities.UiDomUtils.makeUnnavigable(this);
|
|
53
53
|
}
|
|
54
54
|
_setupAttributes() {
|
|
55
55
|
this.setAttribute('role', 'tab');
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib_es6 = require('../../../../../external/tslib/tslib.es6.js');
|
|
6
6
|
var decorators = require('lit/decorators');
|
|
7
|
+
var utilities = require('@dreamcommerce/utilities');
|
|
7
8
|
var phoenix_light_lit_element = require('../../core/phoenix_light_lit_element/phoenix_light_lit_element.js');
|
|
8
9
|
var phoenix_custom_element = require('../../core/decorators/phoenix_custom_element.js');
|
|
9
10
|
var keystrokes_controller = require('../../controllers/keystrokes_controller/keystrokes_controller.js');
|
|
10
11
|
var tab_constants = require('./tab/tab_constants.js');
|
|
11
|
-
var ui_dom_utils = require('../../../../utilities/build/esm/ui_dom_utils.js');
|
|
12
12
|
var tab = require('./tab/tab.js');
|
|
13
13
|
var tabs_constants = require('./tabs_constants.js');
|
|
14
14
|
|
|
@@ -22,8 +22,8 @@ exports.HTabs = class HTabs extends phoenix_light_lit_element.PhoenixLightLitEle
|
|
|
22
22
|
const newTabIndex = key === 'ArrowLeft' ? this._getPrevTabIndex(currentTabIndex) : this._getNextTabIndex(currentTabIndex);
|
|
23
23
|
if (newTabIndex === undefined)
|
|
24
24
|
return;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
utilities.UiDomUtils.makeUnnavigable(this._$tabs[currentTabIndex]);
|
|
26
|
+
utilities.UiDomUtils.makeNavigable(this._$tabs[newTabIndex]);
|
|
27
27
|
this._$tabs[newTabIndex].focus();
|
|
28
28
|
};
|
|
29
29
|
this._handleTabSelected = (event) => {
|
|
@@ -65,24 +65,16 @@ exports.HTabs = class HTabs extends phoenix_light_lit_element.PhoenixLightLitEle
|
|
|
65
65
|
}
|
|
66
66
|
_setupEvents() {
|
|
67
67
|
this.addEventListener(tab_constants.TAB_EVENT_NAMES.selected, this._handleTabSelected);
|
|
68
|
-
// this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleTabConnected);
|
|
69
68
|
}
|
|
70
|
-
// private _handleTabConnected = (event: TTabConnectedEvent): void => {
|
|
71
|
-
// const $connectedTab = event.detail.$el;
|
|
72
|
-
//
|
|
73
|
-
// if (!$connectedTab.selected) return;
|
|
74
|
-
//
|
|
75
|
-
// this._$selectedTab = event.detail.$el;
|
|
76
|
-
// this.switchPanel(this._$selectedTab.panelName);
|
|
77
|
-
// };
|
|
78
69
|
allChildrenConnected() {
|
|
79
70
|
const $selectedTab = this.querySelector('h-tab[selected]');
|
|
80
|
-
if (
|
|
81
|
-
|
|
71
|
+
if (!$selectedTab)
|
|
72
|
+
return;
|
|
73
|
+
this._$selectedTab = $selectedTab;
|
|
82
74
|
this.switchPanel(this._$selectedTab.panelName);
|
|
83
75
|
}
|
|
84
76
|
switchPanel(newPanelName) {
|
|
85
|
-
const $currentPanel = document.querySelectorAll(`[name="${this._$selectedTab.panelName}"]`);
|
|
77
|
+
const $currentPanel = this._$selectedTab && document.querySelectorAll(`[name="${this._$selectedTab.panelName}"]`);
|
|
86
78
|
const $newPanel = document.querySelectorAll(`[name="${newPanelName}"]`);
|
|
87
79
|
if ($currentPanel)
|
|
88
80
|
$currentPanel.forEach(($panel) => $panel.hide());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createCommonjsModule } from '
|
|
1
|
+
import { createCommonjsModule } from '../../_virtual/_commonjsHelpers.js';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2017 Jed Watson.
|
|
5
5
|
Licensed under the MIT License (MIT), see
|
|
6
6
|
http://jedwatson.github.io/classnames
|
|
7
7
|
*/
|
|
@@ -13,7 +13,7 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
13
13
|
|
|
14
14
|
var hasOwn = {}.hasOwnProperty;
|
|
15
15
|
|
|
16
|
-
function classNames() {
|
|
16
|
+
function classNames () {
|
|
17
17
|
var classes = [];
|
|
18
18
|
|
|
19
19
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -24,22 +24,16 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
24
24
|
|
|
25
25
|
if (argType === 'string' || argType === 'number') {
|
|
26
26
|
classes.push(arg);
|
|
27
|
-
} else if (Array.isArray(arg)) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
classes.push(inner);
|
|
32
|
-
}
|
|
27
|
+
} else if (Array.isArray(arg) && arg.length) {
|
|
28
|
+
var inner = classNames.apply(null, arg);
|
|
29
|
+
if (inner) {
|
|
30
|
+
classes.push(inner);
|
|
33
31
|
}
|
|
34
32
|
} else if (argType === 'object') {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
classes.push(key);
|
|
39
|
-
}
|
|
33
|
+
for (var key in arg) {
|
|
34
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
35
|
+
classes.push(key);
|
|
40
36
|
}
|
|
41
|
-
} else {
|
|
42
|
-
classes.push(arg.toString());
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,9 +2,9 @@ import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import classnames from '../../../../external/classnames/index.js';
|
|
6
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
7
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
9
9
|
|
|
10
10
|
let HCheckbox = class HCheckbox extends PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
|
|
|
4
4
|
import { html } from 'lit-html';
|
|
5
5
|
import { property } from '@lit/reactive-element/decorators.js';
|
|
6
6
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
9
9
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
10
10
|
import { CHECKBOX_CONTROL_EVENTS, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "../../../core/phoenix_light_lit_element/phoenix_light_lit_element";
|
|
2
|
-
import type { TInputSizesType } from "./input_types";
|
|
3
2
|
import type { TInputControlType } from "./input_types";
|
|
3
|
+
import type { TInputSizesType } from "./input_types";
|
|
4
4
|
export declare class HInput extends PhoenixLightLitElement {
|
|
5
5
|
controlId: string;
|
|
6
6
|
controlName: string;
|
|
@@ -3,9 +3,9 @@ import { property } from 'lit/decorators';
|
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { INPUT_CONTROL_TYPES, INPUT_PROPS_TO_SYNC, INPUT_CONTROL_CSS_CLASSES } from './input_constants.js';
|
|
6
|
-
import classnames from '../../../../external/classnames/index.js';
|
|
7
6
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
8
7
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
8
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
9
9
|
|
|
10
10
|
let HInput = class HInput extends PhoenixLightLitElement {
|
|
11
11
|
constructor() {
|
|
@@ -19,7 +19,9 @@ let HInput = class HInput extends PhoenixLightLitElement {
|
|
|
19
19
|
connectedCallback() {
|
|
20
20
|
var _a;
|
|
21
21
|
super.connectedCallback();
|
|
22
|
-
this.
|
|
22
|
+
if (this.type !== INPUT_CONTROL_TYPES.hidden) {
|
|
23
|
+
this.classList.add(INPUT_CONTROL_CSS_CLASSES.input);
|
|
24
|
+
}
|
|
23
25
|
const cssClasses = classnames({
|
|
24
26
|
[INPUT_CONTROL_CSS_CLASSES.inputDisabled]: this.disabled,
|
|
25
27
|
[INPUT_CONTROL_CSS_CLASSES.inputError]: this.error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,9 +2,9 @@ import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import classnames from '../../../../external/classnames/index.js';
|
|
6
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
7
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
|
|
9
9
|
import { RADIO_CONTROL_CSS_CLASSES } from './radio_constants.js';
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,9 +2,9 @@ import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import classnames from '../../../../external/classnames/index.js';
|
|
6
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
7
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
|
|
9
9
|
import { SWITCH_CONTROL_CSS_CLASSES } from './switch_constants.js';
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -2,9 +2,9 @@ import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
3
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
|
-
import classnames from '../../../../external/classnames/index.js';
|
|
6
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
7
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { TEXTAREA_PROPS_TO_SYNC, TEXTAREA_CONTROL_CSS_CLASSES } from './textarea_constants.js';
|
|
9
9
|
|
|
10
10
|
let HTextarea = class HTextarea extends PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { property } from 'lit/decorators';
|
|
3
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
3
4
|
import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
5
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { BtnController } from '../../../controllers/btn_controller.js';
|
|
6
7
|
import { TAB_EVENT_NAMES, TAB_SELECTED_ATTRIBUTE_NAME } from './tab_constants.js';
|
|
7
|
-
import { UiDomUtils } from '../../../../../utilities/build/esm/ui_dom_utils.js';
|
|
8
8
|
|
|
9
9
|
let HTab = class HTab extends PhoenixLightLitElement {
|
|
10
10
|
constructor() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from '../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { state } from 'lit/decorators';
|
|
3
|
+
import { UiDomUtils } from '@dreamcommerce/utilities';
|
|
3
4
|
import { PhoenixLightLitElement } from '../../core/phoenix_light_lit_element/phoenix_light_lit_element.js';
|
|
4
5
|
import { phoenixCustomElement } from '../../core/decorators/phoenix_custom_element.js';
|
|
5
6
|
import { KeystrokesController } from '../../controllers/keystrokes_controller/keystrokes_controller.js';
|
|
6
7
|
import { TAB_EVENT_NAMES } from './tab/tab_constants.js';
|
|
7
|
-
import { UiDomUtils } from '../../../../utilities/build/esm/ui_dom_utils.js';
|
|
8
8
|
import { HTab } from './tab/tab.js';
|
|
9
9
|
import { TABS_EVENT_NAMES } from './tabs_constants.js';
|
|
10
10
|
|
|
@@ -61,24 +61,16 @@ let HTabs = class HTabs extends PhoenixLightLitElement {
|
|
|
61
61
|
}
|
|
62
62
|
_setupEvents() {
|
|
63
63
|
this.addEventListener(TAB_EVENT_NAMES.selected, this._handleTabSelected);
|
|
64
|
-
// this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleTabConnected);
|
|
65
64
|
}
|
|
66
|
-
// private _handleTabConnected = (event: TTabConnectedEvent): void => {
|
|
67
|
-
// const $connectedTab = event.detail.$el;
|
|
68
|
-
//
|
|
69
|
-
// if (!$connectedTab.selected) return;
|
|
70
|
-
//
|
|
71
|
-
// this._$selectedTab = event.detail.$el;
|
|
72
|
-
// this.switchPanel(this._$selectedTab.panelName);
|
|
73
|
-
// };
|
|
74
65
|
allChildrenConnected() {
|
|
75
66
|
const $selectedTab = this.querySelector('h-tab[selected]');
|
|
76
|
-
if (
|
|
77
|
-
|
|
67
|
+
if (!$selectedTab)
|
|
68
|
+
return;
|
|
69
|
+
this._$selectedTab = $selectedTab;
|
|
78
70
|
this.switchPanel(this._$selectedTab.panelName);
|
|
79
71
|
}
|
|
80
72
|
switchPanel(newPanelName) {
|
|
81
|
-
const $currentPanel = document.querySelectorAll(`[name="${this._$selectedTab.panelName}"]`);
|
|
73
|
+
const $currentPanel = this._$selectedTab && document.querySelectorAll(`[name="${this._$selectedTab.panelName}"]`);
|
|
82
74
|
const $newPanel = document.querySelectorAll(`[name="${newPanelName}"]`);
|
|
83
75
|
if ($currentPanel)
|
|
84
76
|
$currentPanel.forEach(($panel) => $panel.hide());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
class UiDomUtils {
|
|
6
|
-
static show($el) {
|
|
7
|
-
$el.removeAttribute('hidden');
|
|
8
|
-
}
|
|
9
|
-
static hide($el) {
|
|
10
|
-
$el.setAttribute('hidden', '');
|
|
11
|
-
}
|
|
12
|
-
static empty($el) {
|
|
13
|
-
$el.innerHTML = '';
|
|
14
|
-
}
|
|
15
|
-
static makeUnnavigable($el) {
|
|
16
|
-
$el.setAttribute('tabindex', '-1');
|
|
17
|
-
}
|
|
18
|
-
static makeNavigable($el) {
|
|
19
|
-
$el.setAttribute('tabindex', '0');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.UiDomUtils = UiDomUtils;
|
|
24
|
-
//# sourceMappingURL=ui_dom_utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class UiDomUtils {
|
|
2
|
-
static show($el) {
|
|
3
|
-
$el.removeAttribute('hidden');
|
|
4
|
-
}
|
|
5
|
-
static hide($el) {
|
|
6
|
-
$el.setAttribute('hidden', '');
|
|
7
|
-
}
|
|
8
|
-
static empty($el) {
|
|
9
|
-
$el.innerHTML = '';
|
|
10
|
-
}
|
|
11
|
-
static makeUnnavigable($el) {
|
|
12
|
-
$el.setAttribute('tabindex', '-1');
|
|
13
|
-
}
|
|
14
|
-
static makeNavigable($el) {
|
|
15
|
-
$el.setAttribute('tabindex', '0');
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { UiDomUtils };
|
|
20
|
-
//# sourceMappingURL=ui_dom_utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|