@public-ui/hydrate 2.0.0-rc.7 → 2.0.0-rc.8

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -17
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -7850,7 +7850,7 @@ const initKoliBri = () => {
7850
7850
  | . ' | .-. | | | ,--. | .-. \\ | .--' ,--.
7851
7851
  | |\\ \\ | '-' | | | | | | '--' / | | | |
7852
7852
  \`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'
7853
- 🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 2.0.0-rc.7
7853
+ 🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 2.0.0-rc.8
7854
7854
  `, {
7855
7855
  forceLog: true,
7856
7856
  });
@@ -10160,6 +10160,9 @@ class KolAccordion {
10160
10160
  constructor(hostRef) {
10161
10161
  registerInstance(this, hostRef);
10162
10162
  this.nonce = nonce();
10163
+ this.catchRef = (ref) => {
10164
+ propagateFocus(this.host, ref);
10165
+ };
10163
10166
  this.onClick = (event) => {
10164
10167
  this._open = !this._open;
10165
10168
  setTimeout(() => {
@@ -10182,7 +10185,7 @@ class KolAccordion {
10182
10185
  return (hAsync(Host, null, hAsync("div", { class: {
10183
10186
  accordion: true,
10184
10187
  open: this.state._open === true,
10185
- } }, hAsync("kol-heading-wc", { _label: "", _level: this.state._level }, hAsync("kol-button-wc", { _ariaControls: this.nonce, _ariaExpanded: this.state._open, _icons: this.state._open ? 'codicon codicon-remove' : 'codicon codicon-add', _label: this.state._label, _on: { onClick: this.onClick } })), hAsync("div", { class: "wrapper" }, hAsync("div", { class: "animation-wrapper" }, hAsync("div", { "aria-hidden": this.state._open === false ? 'true' : undefined, class: "content", id: this.nonce }, hAsync("slot", null)))))));
10188
+ } }, hAsync("kol-heading-wc", { _label: "", _level: this.state._level }, hAsync("kol-button-wc", { ref: this.catchRef, slot: "expert", _ariaControls: this.nonce, _ariaExpanded: this.state._open, _icons: this.state._open ? 'codicon codicon-remove' : 'codicon codicon-add', _label: this.state._label, _on: { onClick: this.onClick } })), hAsync("div", { class: "wrapper" }, hAsync("div", { class: "animation-wrapper" }, hAsync("div", { "aria-hidden": this.state._open === false ? 'true' : undefined, class: "content", id: this.nonce }, hAsync("slot", null)))))));
10186
10189
  }
10187
10190
  validateLabel(value) {
10188
10191
  validateLabel(this, value);
@@ -10204,6 +10207,7 @@ class KolAccordion {
10204
10207
  this.validateOn(this._on);
10205
10208
  this.validateOpen(this._open);
10206
10209
  }
10210
+ get host() { return getElement(this); }
10207
10211
  static get watchers() { return {
10208
10212
  "_label": ["validateLabel"],
10209
10213
  "_level": ["validateLevel"],
@@ -11274,8 +11278,7 @@ class KolButton {
11274
11278
  constructor(hostRef) {
11275
11279
  registerInstance(this, hostRef);
11276
11280
  this.catchRef = (ref) => {
11277
- this.ref = ref;
11278
- propagateFocus(this.host, this.ref);
11281
+ propagateFocus(this.host, ref);
11279
11282
  };
11280
11283
  this._accessKey = undefined;
11281
11284
  this._ariaControls = undefined;
@@ -11386,8 +11389,7 @@ class KolButtonLink {
11386
11389
  constructor(hostRef) {
11387
11390
  registerInstance(this, hostRef);
11388
11391
  this.catchRef = (ref) => {
11389
- this.ref = ref;
11390
- propagateFocus(this.host, this.ref);
11392
+ propagateFocus(this.host, ref);
11391
11393
  };
11392
11394
  this._accessKey = undefined;
11393
11395
  this._ariaControls = undefined;
@@ -12197,6 +12199,10 @@ const defaultStyleCss$y = "@layer kol-global {\n\t\n\t.sc-kol-details-default-h
12197
12199
  class KolDetails {
12198
12200
  constructor(hostRef) {
12199
12201
  registerInstance(this, hostRef);
12202
+ this.catchRef = (ref) => {
12203
+ this.summaryElement = ref;
12204
+ propagateFocus(this.host, this.summaryElement);
12205
+ };
12200
12206
  this.handleToggle = (event) => {
12201
12207
  clearTimeout(this.toggleTimeout);
12202
12208
  this.toggleTimeout = setTimeout(() => {
@@ -12222,7 +12228,7 @@ class KolDetails {
12222
12228
  render() {
12223
12229
  return (hAsync(Host, null, hAsync("details", { ref: (el) => {
12224
12230
  this.detailsElement = el;
12225
- }, onToggle: this.handleToggle }, hAsync("summary", { ref: (element) => (this.summaryElement = element) }, hAsync("kol-icon", { _label: "", _icons: "codicon codicon-chevron-right", class: `icon ${this.state._open ? 'is-open' : ''}` }), hAsync("span", null, this.state._label)), hAsync("div", { class: "content", ref: (element) => (this.contentElement = element) }, hAsync("kol-indented-text", null, hAsync("slot", null))))));
12231
+ }, onToggle: this.handleToggle }, hAsync("summary", { ref: this.catchRef }, hAsync("kol-icon", { _label: "", _icons: "codicon codicon-chevron-right", class: `icon ${this.state._open ? 'is-open' : ''}` }), hAsync("span", null, this.state._label)), hAsync("div", { "aria-hidden": this.state._open === false ? 'true' : undefined, class: "content", ref: (element) => (this.contentElement = element) }, hAsync("kol-indented-text", null, hAsync("slot", null))))));
12226
12232
  }
12227
12233
  validateLabel(value) {
12228
12234
  validateLabel(this, value);
@@ -12498,7 +12504,7 @@ function validateLoading(component, value) {
12498
12504
  watchValidator(component, '_loading', (value) => typeof value === 'string' && loadingOptions.includes(value), new Set(loadingOptions), value);
12499
12505
  }
12500
12506
 
12501
- const defaultStyleCss$v = "@layer kol-component {\n\timg {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}";
12507
+ const defaultStyleCss$v = "@layer kol-component {\n\t.sc-kol-image-default-h {\n\t\tdisplay: inline-block;\n\t}\n\timg {\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}";
12502
12508
 
12503
12509
  class KolImage {
12504
12510
  constructor(hostRef) {
@@ -13094,13 +13100,12 @@ class KolInputCheckbox {
13094
13100
  [this.state._variant]: true,
13095
13101
  'hide-label': !!this.state._hideLabel,
13096
13102
  checked: this.state._checked,
13097
- }, "data-role": this.state._variant === 'button' ? 'button' : undefined, onKeyPress: this.state._variant === 'button' ? this.onChange : undefined, tabIndex: this.state._variant === 'button' ? 0 : undefined, _accessKey: this.state._accessKey, _alert: this.state._alert, _disabled: this.state._disabled, _error: this.state._error, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { slot: "input" }, hAsync("kol-icon", { class: "icon", onClick: this.handleIconClick.bind(this), _icons: this.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked, _label: "" }), hAsync("input", Object.assign({ ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, checked: this.state._checked, disabled: this.state._disabled, id: this.state._id, indeterminate: this.state._indeterminate, name: this.state._name, required: this.state._required, tabIndex: this.state._tabIndex, type: "checkbox" }, this.controller.onFacade, { onChange: this.onChange, onClick: undefined }))))));
13103
+ }, "data-role": this.state._variant === 'button' ? 'button' : undefined, onKeyPress: this.state._variant === 'button' ? this.onChange : undefined, tabIndex: this.state._variant === 'button' && !this.state._disabled ? 0 : undefined, _accessKey: this.state._accessKey, _alert: this.state._alert, _disabled: this.state._disabled, _error: this.state._error, _hideError: this.state._hideError, _hideLabel: this.state._hideLabel, _hint: this.state._hint, _id: this.state._id, _label: this.state._label, _required: this.state._required, _tooltipAlign: this._tooltipAlign, _touched: this.state._touched }, hAsync("span", { slot: "label" }, hasExpertSlot ? (hAsync("slot", { name: "expert" })) : typeof this.state._accessKey === 'string' ? (hAsync(Fragment, null, hAsync(InternalUnderlinedAccessKey, { accessKey: this.state._accessKey, label: this.state._label }), ' ', hAsync("span", { class: "access-key-hint", "aria-hidden": "true" }, this.state._accessKey))) : (hAsync("span", null, this.state._label))), hAsync("div", { slot: "input" }, hAsync("kol-icon", { class: "icon", onClick: this.handleIconClick.bind(this), _icons: this.state._indeterminate ? this.state._icons.indeterminate : this.state._checked ? this.state._icons.checked : this.state._icons.unchecked, _label: "" }), hAsync("input", Object.assign({ ref: this.catchRef, title: "", accessKey: this.state._accessKey, "aria-describedby": ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined, "aria-label": this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined, checked: this.state._checked, disabled: this.state._disabled, id: this.state._id, indeterminate: this.state._indeterminate, name: this.state._name, required: this.state._required, tabIndex: this.state._tabIndex, type: "checkbox" }, this.controller.onFacade, { onChange: this.onChange, onClick: undefined }))))));
13098
13104
  }
13099
13105
  constructor(hostRef) {
13100
13106
  registerInstance(this, hostRef);
13101
13107
  this.catchRef = (ref) => {
13102
- this.ref = ref;
13103
- propagateFocus(this.host, this.ref);
13108
+ propagateFocus(this.host, ref);
13104
13109
  };
13105
13110
  this.onChange = (event) => {
13106
13111
  var _a;
@@ -15058,8 +15063,7 @@ class KolInputRadio {
15058
15063
  constructor(hostRef) {
15059
15064
  registerInstance(this, hostRef);
15060
15065
  this.catchRef = (ref) => {
15061
- this.ref = ref;
15062
- propagateFocus(this.host, this.ref);
15066
+ propagateFocus(this.host, ref);
15063
15067
  };
15064
15068
  this.onChange = (event) => {
15065
15069
  var _a;
@@ -15830,8 +15834,7 @@ class KolLink {
15830
15834
  constructor(hostRef) {
15831
15835
  registerInstance(this, hostRef);
15832
15836
  this.catchRef = (ref) => {
15833
- this.ref = ref;
15834
- propagateFocus(this.host, this.ref);
15837
+ propagateFocus(this.host, ref);
15835
15838
  };
15836
15839
  this._accessKey = undefined;
15837
15840
  this._download = undefined;
@@ -15884,8 +15887,7 @@ class KolLinkButton {
15884
15887
  constructor(hostRef) {
15885
15888
  registerInstance(this, hostRef);
15886
15889
  this.catchRef = (ref) => {
15887
- this.ref = ref;
15888
- propagateFocus(this.host, this.ref);
15890
+ propagateFocus(this.host, ref);
15889
15891
  };
15890
15892
  this._accessKey = undefined;
15891
15893
  this._customClass = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/hydrate",
3
- "version": "2.0.0-rc.7",
3
+ "version": "2.0.0-rc.8",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": "https://github.com/public-ui/kolibri",
@@ -42,11 +42,11 @@
42
42
  "hydrate"
43
43
  ],
44
44
  "devDependencies": {
45
- "@public-ui/components": "2.0.0-rc.7",
45
+ "@public-ui/components": "2.0.0-rc.8",
46
46
  "rimraf": "3.0.2"
47
47
  },
48
48
  "peerDependencies": {
49
- "@public-ui/components": "2.0.0-rc.7"
49
+ "@public-ui/components": "2.0.0-rc.8"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "type": "commonjs",