blue-web 1.23.0 → 1.24.1

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var t={};function e(t,e,s){i(t,e),e.set(t,s)}function i(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(t,e,i){return t.set(h(t,e),i),i}function n(t,e){return t.get(h(t,e))}function h(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}t.d=(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o=new WeakMap,r=new WeakMap,l=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,g=new WeakSet;class b extends HTMLElement{get lightDom(){return n(a,this)}set lightDom(t){s(a,this,t),!0===this.lightDom?this.innerHTML=n(v,this):(this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot.innerHTML=n(v,this)),h(g,this,m).call(this)}get value(){return n(u,this)}set value(t){const e=n(u,this);s(u,this,t),s(r,this,this.value.split(""));for(let t=0;t<this.length;t++)n(l,this)[t]&&(n(l,this)[t].value=n(r,this)[t]||"");e!==t&&this.dispatchEvent(new CustomEvent("changeValue",{bubbles:!0,detail:t}))}get length(){return n(c,this)}set length(t){if(s(c,this,t),this.length>n(l,this).length)for(let t=0;t<this.length;t++)!n(l,this)[t]&&this.didInit&&h(g,this,f).call(this,n(l,this).length);else if(this.length<n(l,this).length){const t=Math.abs(n(l,this).length-this.length);for(let e=0;e<t;e++){const t=n(l,this).pop();null==t||t.remove()}}s(l,this,[...n(l,this)])}get controlClass(){return n(d,this)}set controlClass(t){s(d,this,t);for(const t of n(l,this))t.className=this.controlClass}get control1Id(){return n(p,this)}set control1Id(t){s(p,this,t),n(l,this)[0]&&(n(l,this)[0].id=this.control1Id)}constructor(){var t;super(),i(this,t=g),t.add(this),e(this,o,void 0),e(this,r,[]),e(this,l,[]),e(this,a,!1),e(this,u,""),e(this,c,0),e(this,d,""),e(this,p,""),e(this,v,"<style>\n input {\n display: var(--blue-input-splitted-display, revert);\n background-color: var(--blue-input-splitted-background-color, revert);\n border: var(--blue-input-splitted-border, revert);\n border-radius: var(--blue-input-splitted-border-radius, revert);\n box-shadow: var(--blue-input-splitted-box-shadow, revert);\n color: var(--blue-input-splitted-color, revert);\n margin: var(--blue-input-splitted-margin, revert);\n padding: var(--blue-input-splitted-padding, revert);\n text-align: var(--blue-input-splitted-text-align, revert);\n width: var(--blue-input-splitted-width, revert);\n }\n</style>"),function(t,e,i){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(this,"didInit",!1),this.onFocus=this.onFocus.bind(this)}connectedCallback(){this.didInit=!0,this.lightDom=null!==this.getAttribute("light-dom"),h(g,this,m).call(this),this.value=this.getAttribute("value")||this.value,this.length=k(this),this.controlClass=this.getAttribute("control-class")||this.controlClass,this.control1Id=this.getAttribute("control-1-id")||this.control1Id,h(g,this,w).call(this)}onFocus(){n(l,this)[0]&&n(l,this)[0].focus()}disconnectedCallback(){h(g,this,y).call(this)}static get formAssociated(){return!0}}function f(t){const e=document.createElement("input");n(l,this).push(e),e.type="text",e.className=this.controlClass,0===t&&(e.id=this.control1Id),e.maxLength=1,e.value=n(r,this)[t]||"",e.addEventListener("input",e=>{let{target:i}=e;const s=i;""!==s.value&&n(l,this)[t+1]&&n(l,this)[t+1].focus(),n(r,this)[t]=s.value,this.value=n(r,this).join("")}),e.addEventListener("keydown",e=>{let{key:i,target:s}=e;"Backspace"===i&&""===s.value&&void 0!==n(l,this)[t-1]&&n(l,this)[t-1].focus()}),e.addEventListener("paste",e=>{let{clipboardData:i}=e;const s=i.getData("Text");let h=0;for(let e=t;e<this.length;e++)n(r,this)[e]=s.split("")[h],n(l,this)[e].focus(),h+=1;this.value=n(r,this).join("")}),this.lightDom?this.appendChild(e):this.shadowRoot.appendChild(e)}function m(){this.value=this.getAttribute("value")||"",this.length=k(this),this.lightDom?(this.innerHTML=n(v,this),this.addEventListener("focus",this.onFocus)):(this.shadowRoot.innerHTML=n(v,this),this.shadowRoot.addEventListener("focus",this.onFocus)),s(r,this,this.value.split("")),s(l,this,[]);for(let t=0;t<this.length;t++)h(g,this,f).call(this,t)}function w(){s(o,this,n(o,this)||new MutationObserver(t=>{t.forEach(t=>{"value"===t.attributeName&&(this.value=this.getAttribute("value")||this.value),"length"===t.attributeName&&(this.length=k(this)),"control-class"===t.attributeName&&(this.controlClass=this.getAttribute("control-class")||this.controlClass),"control-1-id"===t.attributeName&&(this.control1Id=this.getAttribute("control-1-id")||this.control1Id),"light-dom"===t.attributeName&&(this.lightDom=null!==this.getAttribute("light-dom"))})})),n(o,this).observe(this,{attributeFilter:["value","length","control-class","control-1-id","light-dom"],attributeOldValue:!0,childList:!0,subtree:!0})}function y(){n(o,this)&&(n(o,this).takeRecords(),n(o,this).disconnect())}function k(t){const e=t.getAttribute("length");if(e)return parseInt(e)}customElements.define("bl-input-splitted",b)})();
1
+ (()=>{"use strict";var t={};function e(t,e,s){i(t,e),e.set(t,s)}function i(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(t,e,i){return t.set(h(t,e),i),i}function n(t,e){return t.get(h(t,e))}function h(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}t.d=(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var l=new WeakMap,o=new WeakMap,r=new WeakMap,a=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,b=new WeakMap,p=new WeakMap,g=new WeakMap,v=new WeakSet;class f extends HTMLElement{get lightDom(){return n(a,this)}set lightDom(t){s(a,this,t),!0===this.lightDom?this.innerHTML=n(g,this):(this.shadowRoot||this.attachShadow({mode:"open",delegatesFocus:!0}),this.shadowRoot.innerHTML=n(g,this)),h(v,this,w).call(this)}get value(){return n(u,this)}set value(t){const e=n(u,this);s(u,this,t),s(o,this,this.value.split(""));for(let t=0;t<this.length;t++)n(r,this)[t]&&(n(r,this)[t].value=n(o,this)[t]||"");e!==t&&this.dispatchEvent(new CustomEvent("changeValue",{bubbles:!0,detail:t}))}get length(){return n(d,this)}set length(t){if(s(d,this,t),this.length>n(r,this).length)for(let t=0;t<this.length;t++)!n(r,this)[t]&&this.didInit&&h(v,this,m).call(this,n(r,this).length);else if(this.length<n(r,this).length){const t=Math.abs(n(r,this).length-this.length);for(let e=0;e<t;e++){const t=n(r,this).pop();null==t||t.remove()}}s(r,this,[...n(r,this)])}get disabled(){return n(c,this)}set disabled(t){s(c,this,t);const e=this.lightDom?this.querySelectorAll("input"):this.shadowRoot.querySelectorAll("input");for(const i of e)i.disabled=t}get controlClass(){return n(b,this)}set controlClass(t){s(b,this,t);for(const t of n(r,this))t.className=this.controlClass}get control1Id(){return n(p,this)}set control1Id(t){s(p,this,t),n(r,this)[0]&&(n(r,this)[0].id=this.control1Id)}constructor(){var t;super(),i(this,t=v),t.add(this),e(this,l,void 0),e(this,o,[]),e(this,r,[]),e(this,a,!1),e(this,u,""),e(this,d,0),e(this,c,!1),e(this,b,""),e(this,p,""),e(this,g,"<style>\n input {\n display: var(--blue-input-splitted-display, revert);\n background-color: var(--blue-input-splitted-background-color, revert);\n border: var(--blue-input-splitted-border, revert);\n border-radius: var(--blue-input-splitted-border-radius, revert);\n box-shadow: var(--blue-input-splitted-box-shadow, revert);\n color: var(--blue-input-splitted-color, revert);\n margin: var(--blue-input-splitted-margin, revert);\n padding: var(--blue-input-splitted-padding, revert);\n text-align: var(--blue-input-splitted-text-align, revert);\n width: var(--blue-input-splitted-width, revert);\n }\n</style>"),function(t,e,i){(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(this,"didInit",!1),this.onFocus=this.onFocus.bind(this)}connectedCallback(){this.didInit=!0,this.lightDom=null!==this.getAttribute("light-dom"),this.disabled=null!==this.getAttribute("disabled"),h(v,this,w).call(this),this.value=this.getAttribute("value")||this.value,this.length=M(this),this.controlClass=this.getAttribute("control-class")||this.controlClass,this.control1Id=this.getAttribute("control-1-id")||this.control1Id,h(v,this,y).call(this)}onFocus(){n(r,this)[0]&&n(r,this)[0].focus()}disconnectedCallback(){h(v,this,k).call(this)}static get formAssociated(){return!0}}function m(t){const e=document.createElement("input");n(r,this).push(e),e.type="text",e.className=this.controlClass,0===t&&(e.id=this.control1Id),e.maxLength=1,e.value=n(o,this)[t]||"",e.disabled=this.disabled,e.addEventListener("input",e=>{let{target:i}=e;const s=i;""!==s.value&&n(r,this)[t+1]&&n(r,this)[t+1].focus(),n(o,this)[t]=s.value,this.value=n(o,this).join("")}),e.addEventListener("keydown",e=>{let{key:i,target:s}=e;"Backspace"===i&&""===s.value&&void 0!==n(r,this)[t-1]&&n(r,this)[t-1].focus()}),e.addEventListener("paste",e=>{let{clipboardData:i}=e;const s=i.getData("Text");let h=0;for(let e=t;e<this.length;e++)n(o,this)[e]=s.split("")[h],n(r,this)[e].focus(),h+=1;this.value=n(o,this).join("")}),this.lightDom?this.appendChild(e):this.shadowRoot.appendChild(e)}function w(){this.value=this.getAttribute("value")||"",this.length=M(this),this.lightDom?(this.innerHTML=n(g,this),this.addEventListener("focus",this.onFocus)):(this.shadowRoot.innerHTML=n(g,this),this.shadowRoot.addEventListener("focus",this.onFocus)),s(o,this,this.value.split("")),s(r,this,[]);for(let t=0;t<this.length;t++)h(v,this,m).call(this,t)}function y(){s(l,this,n(l,this)||new MutationObserver(t=>{t.forEach(t=>{"value"===t.attributeName&&(this.value=this.getAttribute("value")||this.value),"length"===t.attributeName&&(this.length=M(this)),"control-class"===t.attributeName&&(this.controlClass=this.getAttribute("control-class")||this.controlClass),"control-1-id"===t.attributeName&&(this.control1Id=this.getAttribute("control-1-id")||this.control1Id),"light-dom"===t.attributeName&&(this.lightDom=null!==this.getAttribute("light-dom")),"disabled"===t.attributeName&&(this.disabled=null!==this.getAttribute("disabled"))})})),n(l,this).observe(this,{attributeFilter:["value","length","control-class","control-1-id","light-dom","disabled"],attributeOldValue:!0,childList:!0,subtree:!0})}function k(){n(l,this)&&(n(l,this).takeRecords(),n(l,this).disconnect())}function M(t){const e=t.getAttribute("length");if(e)return parseInt(e)}customElements.define("bl-input-splitted",f)})();
@@ -6,6 +6,8 @@ export declare class InputSplitted extends HTMLElement {
6
6
  set value(_value: string);
7
7
  get length(): number;
8
8
  set length(_length: number);
9
+ get disabled(): boolean;
10
+ set disabled(_disabled: boolean);
9
11
  get controlClass(): string;
10
12
  set controlClass(value: string);
11
13
  get control1Id(): string;
@@ -13,6 +13,7 @@ var _refArray = /*#__PURE__*/new WeakMap();
13
13
  var _lightDom2 = /*#__PURE__*/new WeakMap();
14
14
  var _value2 = /*#__PURE__*/new WeakMap();
15
15
  var _length2 = /*#__PURE__*/new WeakMap();
16
+ var _disabled2 = /*#__PURE__*/new WeakMap();
16
17
  var _controlClass = /*#__PURE__*/new WeakMap();
17
18
  var _control1Id = /*#__PURE__*/new WeakMap();
18
19
  var _styling = /*#__PURE__*/new WeakMap();
@@ -75,6 +76,16 @@ export class InputSplitted extends HTMLElement {
75
76
  }
76
77
  _classPrivateFieldSet(_refArray, this, [..._classPrivateFieldGet(_refArray, this)]);
77
78
  }
79
+ get disabled() {
80
+ return _classPrivateFieldGet(_disabled2, this);
81
+ }
82
+ set disabled(_disabled) {
83
+ _classPrivateFieldSet(_disabled2, this, _disabled);
84
+ const inputs = this.lightDom ? this.querySelectorAll("input") : this.shadowRoot.querySelectorAll("input");
85
+ for (const input of inputs) {
86
+ input.disabled = _disabled;
87
+ }
88
+ }
78
89
  get controlClass() {
79
90
  return _classPrivateFieldGet(_controlClass, this);
80
91
  }
@@ -102,6 +113,7 @@ export class InputSplitted extends HTMLElement {
102
113
  _classPrivateFieldInitSpec(this, _lightDom2, false);
103
114
  _classPrivateFieldInitSpec(this, _value2, "");
104
115
  _classPrivateFieldInitSpec(this, _length2, 0);
116
+ _classPrivateFieldInitSpec(this, _disabled2, false);
105
117
  _classPrivateFieldInitSpec(this, _controlClass, "");
106
118
  _classPrivateFieldInitSpec(this, _control1Id, "");
107
119
  _classPrivateFieldInitSpec(this, _styling, /* html */"<style>\n input {\n display: var(--blue-input-splitted-display, revert);\n background-color: var(--blue-input-splitted-background-color, revert);\n border: var(--blue-input-splitted-border, revert);\n border-radius: var(--blue-input-splitted-border-radius, revert);\n box-shadow: var(--blue-input-splitted-box-shadow, revert);\n color: var(--blue-input-splitted-color, revert);\n margin: var(--blue-input-splitted-margin, revert);\n padding: var(--blue-input-splitted-padding, revert);\n text-align: var(--blue-input-splitted-text-align, revert);\n width: var(--blue-input-splitted-width, revert);\n }\n</style>");
@@ -111,6 +123,7 @@ export class InputSplitted extends HTMLElement {
111
123
  connectedCallback() {
112
124
  this.didInit = true;
113
125
  this.lightDom = this.getAttribute("light-dom") !== null;
126
+ this.disabled = this.getAttribute("disabled") !== null;
114
127
  _assertClassBrand(_InputSplitted_brand, this, _initDom).call(this);
115
128
  this.value = this.getAttribute("value") || this.value;
116
129
  this.length = getLength(this);
@@ -138,6 +151,7 @@ function _addInput(i) {
138
151
  }
139
152
  input.maxLength = 1;
140
153
  input.value = _classPrivateFieldGet(_valueArray, this)[i] || "";
154
+ input.disabled = this.disabled;
141
155
  input.addEventListener("input", _ref => {
142
156
  let {
143
157
  target
@@ -214,10 +228,13 @@ function _observe() {
214
228
  if (m.attributeName === "light-dom") {
215
229
  this.lightDom = this.getAttribute("light-dom") !== null;
216
230
  }
231
+ if (m.attributeName === "disabled") {
232
+ this.disabled = this.getAttribute("disabled") !== null;
233
+ }
217
234
  });
218
235
  }));
219
236
  _classPrivateFieldGet(_observer, this).observe(this, {
220
- attributeFilter: ["value", "length", "control-class", "control-1-id", "light-dom"],
237
+ attributeFilter: ["value", "length", "control-class", "control-1-id", "light-dom", "disabled"],
221
238
  attributeOldValue: true,
222
239
  childList: true,
223
240
  subtree: true
package/dist/merged.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue Web v1.23.0 (https://bruegmann.github.io/blue-web)
2
+ * Blue Web v1.24.1 (https://bruegmann.github.io/blue-web)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-web/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -10813,9 +10813,30 @@ $utilities: map-merge(
10813
10813
  // Unfortunately his class was removed in Bootstrap 5, so it's now part of Blue Web CSS.
10814
10814
  .blue-page-header,
10815
10815
  .page-header {
10816
- padding-bottom: 0.563rem;
10817
- margin: 2.5rem 0 1.25rem;
10818
- border-bottom: 0.25rem solid var(--blue-page-header-border-color, $table-border-color);
10816
+ padding-bottom: 0.5rem;
10817
+ margin: 2rem 0 1rem;
10818
+ border-bottom: 3px solid var(--bs-border-color, $table-border-color);
10819
+
10820
+ &:is(h1, .h1) {
10821
+ border-width: 4px;
10822
+ }
10823
+ &:is(h2, .h2) {
10824
+ border-width: 3px;
10825
+ }
10826
+ &:is(h3, .h3) {
10827
+ border-width: 2px;
10828
+ }
10829
+ &:is(h4, .h4, h5, .h5, h6, .h6) {
10830
+ border-width: 1px;
10831
+ }
10832
+ }
10833
+
10834
+ // Styling for a form control label.
10835
+ .blue-label {
10836
+ color: var(--bs-primary-text-emphasis);
10837
+ font-weight: 500;
10838
+ font-size: 1rem;
10839
+ margin-bottom: 0;
10819
10840
  }
10820
10841
 
10821
10842
  // Vertically alignment, especially for Bootstrap Icons.