@public-ui/hydrate 2.0.0-rc.0 → 2.0.0-rc.2

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 +109 -41
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  /*!
9
- Stencil Mock Doc v4.3.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Mock Doc v4.5.0 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  const CONTENT_REF_ID = 'r';
12
12
  const ORG_LOCATION_ID = 'o';
@@ -1626,6 +1626,14 @@ class MockNodeList {
1626
1626
  }
1627
1627
  }
1628
1628
  class MockElement extends MockNode {
1629
+ attachInternals() {
1630
+ return new Proxy({}, {
1631
+ get: function (_target, prop, _receiver) {
1632
+ console.error(`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
1633
+ Testing components with ElementInternals is fully supported in e2e tests.`);
1634
+ },
1635
+ });
1636
+ }
1629
1637
  constructor(ownerDocument, nodeName) {
1630
1638
  super(ownerDocument, 1 /* NODE_TYPES.ELEMENT_NODE */, typeof nodeName === 'string' ? nodeName : null, null);
1631
1639
  this.namespaceURI = null;
@@ -4953,7 +4961,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
4953
4961
 
4954
4962
 
4955
4963
  const NAMESPACE = 'kolibri';
4956
- const BUILD = /* kolibri */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, patchPseudoShadowDom: false, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
4964
+ const BUILD = /* kolibri */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, patchPseudoShadowDom: false, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
4957
4965
 
4958
4966
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4959
4967
 
@@ -5756,7 +5764,8 @@ class Translator extends EventEmitter {
5756
5764
  usedKey: key,
5757
5765
  exactUsedKey: key,
5758
5766
  usedLng: lng,
5759
- usedNS: namespace
5767
+ usedNS: namespace,
5768
+ usedParams: this.getUsedParamsDetails(options)
5760
5769
  };
5761
5770
  }
5762
5771
  return `${namespace}${nsSeparator}${key}`;
@@ -5767,7 +5776,8 @@ class Translator extends EventEmitter {
5767
5776
  usedKey: key,
5768
5777
  exactUsedKey: key,
5769
5778
  usedLng: lng,
5770
- usedNS: namespace
5779
+ usedNS: namespace,
5780
+ usedParams: this.getUsedParamsDetails(options)
5771
5781
  };
5772
5782
  }
5773
5783
  return key;
@@ -5792,6 +5802,7 @@ class Translator extends EventEmitter {
5792
5802
  }) : `key '${key} (${this.language})' returned an object instead of string.`;
5793
5803
  if (returnDetails) {
5794
5804
  resolved.res = r;
5805
+ resolved.usedParams = this.getUsedParamsDetails(options);
5795
5806
  return resolved;
5796
5807
  }
5797
5808
  return r;
@@ -5892,6 +5903,7 @@ class Translator extends EventEmitter {
5892
5903
  }
5893
5904
  if (returnDetails) {
5894
5905
  resolved.res = res;
5906
+ resolved.usedParams = this.getUsedParamsDetails(options);
5895
5907
  return resolved;
5896
5908
  }
5897
5909
  return res;
@@ -6041,6 +6053,30 @@ class Translator extends EventEmitter {
6041
6053
  if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
6042
6054
  return this.resourceStore.getResource(code, ns, key, options);
6043
6055
  }
6056
+ getUsedParamsDetails() {
6057
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6058
+ const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];
6059
+ const useOptionsReplaceForData = options.replace && typeof options.replace !== 'string';
6060
+ let data = useOptionsReplaceForData ? options.replace : options;
6061
+ if (useOptionsReplaceForData && typeof options.count !== 'undefined') {
6062
+ data.count = options.count;
6063
+ }
6064
+ if (this.options.interpolation.defaultVariables) {
6065
+ data = {
6066
+ ...this.options.interpolation.defaultVariables,
6067
+ ...data
6068
+ };
6069
+ }
6070
+ if (!useOptionsReplaceForData) {
6071
+ data = {
6072
+ ...data
6073
+ };
6074
+ for (const key of optionsKeys) {
6075
+ delete data[key];
6076
+ }
6077
+ }
6078
+ return data;
6079
+ }
6044
6080
  static hasDefaultValue(options) {
6045
6081
  const prefix = 'defaultValue';
6046
6082
  for (const option in options) {
@@ -7810,7 +7846,7 @@ const initKoliBri = () => {
7810
7846
  | . ' | .-. | | | ,--. | .-. \\ | .--' ,--.
7811
7847
  | |\\ \\ | '-' | | | | | | '--' / | | | |
7812
7848
  \`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'
7813
- 🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 2.0.0-rc.0
7849
+ 🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 2.0.0-rc.2
7814
7850
  `, {
7815
7851
  forceLog: true,
7816
7852
  });
@@ -8279,36 +8315,42 @@ const createElm = (e, t, o, n) => {
8279
8315
  isSvgMode && "svg" === l && (isSvgMode = !1));
8280
8316
  }, updateFallbackSlotVisibility = e => {
8281
8317
  const t = e.childNodes;
8282
- let o, n, s, l, a, r;
8283
- for (n = 0, s = t.length; n < s; n++) if (o = t[n], 1 === o.nodeType) {
8284
- if (o["s-sr"]) for (a = o["s-sn"], o.hidden = !1, l = 0; l < s; l++) if (r = t[l].nodeType,
8285
- t[l]["s-hn"] !== o["s-hn"] || "" !== a) {
8286
- if (1 === r && a === t[l].getAttribute("slot")) {
8287
- o.hidden = !0;
8318
+ for (const e of t) if (1 === e.nodeType) {
8319
+ if (e["s-sr"]) {
8320
+ const o = e["s-sn"];
8321
+ e.hidden = !1;
8322
+ for (const n of t) if (n["s-hn"] !== e["s-hn"] || "" !== o) {
8323
+ if (1 === n.nodeType && o === n.getAttribute("slot")) {
8324
+ e.hidden = !0;
8325
+ break;
8326
+ }
8327
+ } else if (1 === n.nodeType || 3 === n.nodeType && "" !== n.textContent.trim()) {
8328
+ e.hidden = !0;
8288
8329
  break;
8289
8330
  }
8290
- } else if (1 === r || 3 === r && "" !== t[l].textContent.trim()) {
8291
- o.hidden = !0;
8292
- break;
8293
8331
  }
8294
- updateFallbackSlotVisibility(o);
8332
+ updateFallbackSlotVisibility(e);
8295
8333
  }
8296
- }, relocateNodes = [], relocateSlotContent = e => {
8297
- let t, o, n, s, l, a, r = 0;
8298
- const i = e.childNodes, d = i.length;
8299
- for (;r < d; r++) {
8300
- if (t = i[r], t["s-sr"] && (o = t["s-cr"]) && o.parentNode) for (n = o.parentNode.childNodes,
8301
- s = t["s-sn"], a = n.length - 1; a >= 0; a--) o = n[a], o["s-cn"] || o["s-nr"] || o["s-hn"] === t["s-hn"] || (isNodeLocatedInSlot(o, s) ? (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
8302
- checkSlotFallbackVisibility = !0, o["s-sn"] = o["s-sn"] || s, l ? l.$slotRefNode$ = t : relocateNodes.push({
8303
- $slotRefNode$: t,
8304
- $nodeToRelocate$: o
8305
- }), o["s-sr"] && relocateNodes.map((e => {
8306
- isNodeLocatedInSlot(e.$nodeToRelocate$, o["s-sn"]) && (l = relocateNodes.find((e => e.$nodeToRelocate$ === o)),
8307
- l && !e.$slotRefNode$ && (e.$slotRefNode$ = l.$slotRefNode$));
8308
- }))) : relocateNodes.some((e => e.$nodeToRelocate$ === o)) || relocateNodes.push({
8309
- $nodeToRelocate$: o
8310
- }));
8311
- 1 === t.nodeType && relocateSlotContent(t);
8334
+ }, relocateNodes = [], markSlotContentForRelocation = e => {
8335
+ let t, o, n;
8336
+ for (const s of e.childNodes) {
8337
+ if (s["s-sr"] && (t = s["s-cr"]) && t.parentNode) {
8338
+ o = t.parentNode.childNodes;
8339
+ const e = s["s-sn"];
8340
+ for (n = o.length - 1; n >= 0; n--) if (t = o[n], !t["s-cn"] && !t["s-nr"] && t["s-hn"] !== s["s-hn"]) if (isNodeLocatedInSlot(t, e)) {
8341
+ let o = relocateNodes.find((e => e.$nodeToRelocate$ === t));
8342
+ checkSlotFallbackVisibility = !0, t["s-sn"] = t["s-sn"] || e, o ? o.$slotRefNode$ = s : relocateNodes.push({
8343
+ $slotRefNode$: s,
8344
+ $nodeToRelocate$: t
8345
+ }), t["s-sr"] && relocateNodes.map((e => {
8346
+ isNodeLocatedInSlot(e.$nodeToRelocate$, t["s-sn"]) && (o = relocateNodes.find((e => e.$nodeToRelocate$ === t)),
8347
+ o && !e.$slotRefNode$ && (e.$slotRefNode$ = o.$slotRefNode$));
8348
+ }));
8349
+ } else relocateNodes.some((e => e.$nodeToRelocate$ === t)) || relocateNodes.push({
8350
+ $nodeToRelocate$: t
8351
+ });
8352
+ }
8353
+ 1 === s.nodeType && markSlotContentForRelocation(s);
8312
8354
  }
8313
8355
  }, isNodeLocatedInSlot = (e, t) => 1 === e.nodeType ? null === e.getAttribute("slot") && "" === t || e.getAttribute("slot") === t : e["s-sn"] === t || "" === t, nullifyVNodeRefs = e => {
8314
8356
  (e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(nullifyVNodeRefs));
@@ -8323,7 +8365,7 @@ const createElm = (e, t, o, n) => {
8323
8365
  BUILD.slotRelocation) {
8324
8366
  if (plt.$flags$ |= 1, checkSlotRelocate) {
8325
8367
  let e, t, o, n, s, l;
8326
- relocateSlotContent(a.$elm$);
8368
+ markSlotContentForRelocation(a.$elm$);
8327
8369
  let r = 0;
8328
8370
  for (;r < relocateNodes.length; r++) e = relocateNodes[r], t = e.$nodeToRelocate$,
8329
8371
  t["s-ol"] || (o = originalLocationDebugNode(t) ,
@@ -8387,9 +8429,9 @@ const callRender = (e, t, o, n) => {
8387
8429
  (safeCall(s, "componentDidRender"),
8388
8430
  BUILD.isDev ), 64 & e.$flags$ ? (n()) : (e.$flags$ |= 64, addHydratedFlag(o),
8389
8431
  (safeCall(s, "componentDidLoad"),
8390
- BUILD.isDev ), n(), (e.$onReadyResolve$(o), l || appDidLoad())), e.$onInstanceResolve$(o), (e.$onRenderResolve$ && (e.$onRenderResolve$(),
8391
- e.$onRenderResolve$ = void 0), 512 & e.$flags$ && nextTick((() => scheduleUpdate(e, !1))),
8392
- e.$flags$ &= -517);
8432
+ BUILD.isDev ), n(), (e.$onReadyResolve$(o), l || appDidLoad())), e.$onInstanceResolve$(o),
8433
+ (e.$onRenderResolve$ && (e.$onRenderResolve$(), e.$onRenderResolve$ = void 0),
8434
+ 512 & e.$flags$ && nextTick((() => scheduleUpdate(e, !1))), e.$flags$ &= -517);
8393
8435
  }, appDidLoad = e => {
8394
8436
  addHydratedFlag(doc.documentElement), nextTick((() => emitEvent(win, "appload", {
8395
8437
  detail: {
@@ -8477,10 +8519,11 @@ const callRender = (e, t, o, n) => {
8477
8519
  }
8478
8520
  }
8479
8521
  return e;
8480
- }, initializeComponent = async (e, t, o, n, s) => {
8522
+ }, initializeComponent = async (e, t, o, n) => {
8523
+ let s;
8481
8524
  if (0 == (32 & t.$flags$)) {
8482
8525
  if (t.$flags$ |= 32, BUILD.lazyLoad ) {
8483
- if ((s = loadModule(o)).then) {
8526
+ if (s = loadModule(o), s.then) {
8484
8527
  const e = (() => {});
8485
8528
  s = await s, e();
8486
8529
  }
@@ -10232,6 +10275,8 @@ var locale_de = {
10232
10275
  'page-current': 'Seite {{page}}',
10233
10276
  'page-selected': 'Seite {{page}} ist ausgewählt',
10234
10277
  'page-per-site': '{{entries}} Einträge pro Seite',
10278
+ 'nav-maximize': 'Navigation maximieren',
10279
+ 'nav-minimize': 'Navigation minimieren',
10235
10280
  'logo-description': 'Logo {{orgShort}}. Bundesadler mit Flaggenstab und Schriftzug {{orgLong}}',
10236
10281
  'open-link-in-tab': 'Der Link wird in einem neuen Tab geöffnet.',
10237
10282
  'kolibri-logo': 'Logo von KoliBri',
@@ -10267,6 +10312,8 @@ var locale_en = {
10267
10312
  'page-current': 'Page {{page}}',
10268
10313
  'page-selected': 'Page {{page}} is selected',
10269
10314
  'page-per-site': '{{entries}} entries per page',
10315
+ 'nav-maximize': 'Maximize navigation',
10316
+ 'nav-minimize': 'Minimize navigation',
10270
10317
  'logo-description': 'Logo {{orgShort}}. Federal eagle with flag staff and lettering {{orgLong}}',
10271
10318
  'open-link-in-tab': 'The link will open in a new tab.',
10272
10319
  'kolibri-logo': 'KoliBri logo',
@@ -11373,7 +11420,7 @@ class KolButtonLinkTextSwitch {
11373
11420
  constructor(hostRef) {
11374
11421
  registerInstance(this, hostRef);
11375
11422
  this.button = (button) => hAsync("kol-button-wc", Object.assign({}, button));
11376
- this.link = (link) => hAsync("kol-link-wc", Object.assign({}, link));
11423
+ this.link = (link) => hAsync("kol-link-wc", Object.assign({ _label: link._href }, link));
11377
11424
  this.text = (text) => hAsync("kol-span-wc", Object.assign({}, text));
11378
11425
  this._link = undefined;
11379
11426
  }
@@ -12102,7 +12149,7 @@ class DetailsAnimationController {
12102
12149
  }
12103
12150
  }
12104
12151
 
12105
- const defaultStyleCss$z = "/*!@:host*/.sc-kol-details-default-h{--a11y-min-size:44px;font-size:inherit}/*!@**/*.sc-kol-details-default{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}/*!@[role='button'],\nbutton:not([role='link']),\nkol-input .input*/[role='button'].sc-kol-details-default,button.sc-kol-details-default:not([role='link']),kol-input.sc-kol-details-default .input.sc-kol-details-default{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}/*!@a,\nbutton,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ninput,\noption,\nselect,\ntextarea*/a.sc-kol-details-default,button.sc-kol-details-default,h1.sc-kol-details-default,h2.sc-kol-details-default,h3.sc-kol-details-default,h4.sc-kol-details-default,h5.sc-kol-details-default,h6.sc-kol-details-default,input.sc-kol-details-default,option.sc-kol-details-default,select.sc-kol-details-default,textarea.sc-kol-details-default{font-family:inherit;font-size:inherit}/*!@:is(a, button)*/.sc-kol-details-default:is(a,button).sc-kol-details-default{background-color:transparent;border:none;margin:0;padding:0;width:100%}/*!@:host*/.sc-kol-details-default-h{max-width:100%}/*!@**/*.sc-kol-details-default{box-sizing:border-box}/*!@kol-span-wc*/kol-span-wc.sc-kol-details-default{display:grid;place-items:center}/*!@kol-span-wc > span*/kol-span-wc.sc-kol-details-default>span.sc-kol-details-default{display:flex;place-items:center}/*!@a,\nbutton*/a.sc-kol-details-default,button.sc-kol-details-default{cursor:pointer}/*!@button,\ninput,\noption,\nselect,\ntextarea*/button.sc-kol-details-default,input.sc-kol-details-default,option.sc-kol-details-default,select.sc-kol-details-default,textarea.sc-kol-details-default{font-family:inherit}/*!@.icon-only > kol-span-wc > span > span*/.icon-only.sc-kol-details-default>kol-span-wc.sc-kol-details-default>span.sc-kol-details-default>span.sc-kol-details-default{display:none}/*!@:host*/.sc-kol-details-default-h{display:block}/*!@details*/details.sc-kol-details-default{display:grid}/*!@details > summary*/details.sc-kol-details-default>summary.sc-kol-details-default{cursor:pointer;display:flex;place-items:center}/*!@details > summary > span*/details.sc-kol-details-default>summary.sc-kol-details-default>span.sc-kol-details-default{border-bottom-color:grey;border-bottom-style:solid}/*!@details > summary:focus > span,\ndetails > summary:hover > span,\ndetails[open] > summary > span*/details.sc-kol-details-default>summary.sc-kol-details-default:focus>span.sc-kol-details-default,details.sc-kol-details-default>summary.sc-kol-details-default:hover>span.sc-kol-details-default,details[open].sc-kol-details-default>summary.sc-kol-details-default>span.sc-kol-details-default{border-bottom-color:#000}/*!@details > kol-indented-text*/details.sc-kol-details-default>kol-indented-text.sc-kol-details-default{margin:0.25em 0 0 0.5em}";
12152
+ const defaultStyleCss$z = "/*!@:host*/.sc-kol-details-default-h{--a11y-min-size:44px;font-size:inherit}/*!@**/*.sc-kol-details-default{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}/*!@[role='button'],\nbutton:not([role='link']),\nkol-input .input*/[role='button'].sc-kol-details-default,button.sc-kol-details-default:not([role='link']),kol-input.sc-kol-details-default .input.sc-kol-details-default{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}/*!@a,\nbutton,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ninput,\noption,\nselect,\ntextarea*/a.sc-kol-details-default,button.sc-kol-details-default,h1.sc-kol-details-default,h2.sc-kol-details-default,h3.sc-kol-details-default,h4.sc-kol-details-default,h5.sc-kol-details-default,h6.sc-kol-details-default,input.sc-kol-details-default,option.sc-kol-details-default,select.sc-kol-details-default,textarea.sc-kol-details-default{font-family:inherit;font-size:inherit}/*!@:is(a, button)*/.sc-kol-details-default:is(a,button).sc-kol-details-default{background-color:transparent;border:none;margin:0;padding:0;width:100%}/*!@:host*/.sc-kol-details-default-h{max-width:100%}/*!@**/*.sc-kol-details-default{box-sizing:border-box}/*!@kol-span-wc*/kol-span-wc.sc-kol-details-default{display:grid;place-items:center}/*!@kol-span-wc > span*/kol-span-wc.sc-kol-details-default>span.sc-kol-details-default{display:flex;place-items:center}/*!@a,\nbutton*/a.sc-kol-details-default,button.sc-kol-details-default{cursor:pointer}/*!@button,\ninput,\noption,\nselect,\ntextarea*/button.sc-kol-details-default,input.sc-kol-details-default,option.sc-kol-details-default,select.sc-kol-details-default,textarea.sc-kol-details-default{font-family:inherit}/*!@.icon-only > kol-span-wc > span > span*/.icon-only.sc-kol-details-default>kol-span-wc.sc-kol-details-default>span.sc-kol-details-default>span.sc-kol-details-default{display:none}/*!@:host*/.sc-kol-details-default-h{display:block}/*!@details*/details.sc-kol-details-default{display:grid}/*!@details > summary*/details.sc-kol-details-default>summary.sc-kol-details-default{cursor:pointer;display:flex;place-items:center}/*!@details > summary > span*/details.sc-kol-details-default>summary.sc-kol-details-default>span.sc-kol-details-default{border-bottom-color:grey;border-bottom-style:solid}/*!@details > summary:focus > span,\ndetails > summary:hover > span,\ndetails[open] > summary > span*/details.sc-kol-details-default>summary.sc-kol-details-default:focus>span.sc-kol-details-default,details.sc-kol-details-default>summary.sc-kol-details-default:hover>span.sc-kol-details-default,details[open].sc-kol-details-default>summary.sc-kol-details-default>span.sc-kol-details-default{border-bottom-color:#000}/*!@details > kol-indented-text*/details.sc-kol-details-default>kol-indented-text.sc-kol-details-default{margin:0.25em 0 0 0.5em}/*!@.icon.is-open::part(icon)*/.icon.is-open.sc-kol-details-default::part(icon){transform:rotate(90deg)}";
12106
12153
 
12107
12154
  class KolDetails {
12108
12155
  constructor(hostRef) {
@@ -12132,7 +12179,7 @@ class KolDetails {
12132
12179
  render() {
12133
12180
  return (hAsync(Host, null, hAsync("details", { ref: (el) => {
12134
12181
  this.detailsElement = el;
12135
- }, onToggle: this.handleToggle }, hAsync("summary", { ref: (element) => (this.summaryElement = element) }, this.state._open ? hAsync("kol-icon", { _label: "", _icons: "codicon codicon-chevron-down" }) : hAsync("kol-icon", { _label: "", _icons: "codicon codicon-chevron-right" }), hAsync("span", null, this.state._label)), hAsync("div", { class: "content", ref: (element) => (this.contentElement = element) }, hAsync("kol-indented-text", null, hAsync("slot", null))))));
12182
+ }, 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))))));
12136
12183
  }
12137
12184
  validateLabel(value) {
12138
12185
  validateLabel(this, value);
@@ -16461,6 +16508,10 @@ const validateCollapsible = (component, value) => {
16461
16508
  watchBoolean(component, '_collapsible', value);
16462
16509
  };
16463
16510
 
16511
+ const validateHasCompactButton = (component, value) => {
16512
+ watchBoolean(component, '_hasCompactButton', value);
16513
+ };
16514
+
16464
16515
  const defaultStyleCss$e = "/*!@:host*/.sc-kol-nav-default-h{--a11y-min-size:44px;font-size:inherit}/*!@**/*.sc-kol-nav-default{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}/*!@[role='button'],\nbutton:not([role='link']),\nkol-input .input*/[role='button'].sc-kol-nav-default,button.sc-kol-nav-default:not([role='link']),kol-input.sc-kol-nav-default .input.sc-kol-nav-default{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}/*!@a,\nbutton,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ninput,\noption,\nselect,\ntextarea*/a.sc-kol-nav-default,button.sc-kol-nav-default,h1.sc-kol-nav-default,h2.sc-kol-nav-default,h3.sc-kol-nav-default,h4.sc-kol-nav-default,h5.sc-kol-nav-default,h6.sc-kol-nav-default,input.sc-kol-nav-default,option.sc-kol-nav-default,select.sc-kol-nav-default,textarea.sc-kol-nav-default{font-family:inherit;font-size:inherit}/*!@:is(a, button)*/.sc-kol-nav-default:is(a,button).sc-kol-nav-default{background-color:transparent;border:none;margin:0;padding:0;width:100%}/*!@:host*/.sc-kol-nav-default-h{max-width:100%}/*!@**/*.sc-kol-nav-default{box-sizing:border-box}/*!@kol-span-wc*/kol-span-wc.sc-kol-nav-default{display:grid;place-items:center}/*!@kol-span-wc > span*/kol-span-wc.sc-kol-nav-default>span.sc-kol-nav-default{display:flex;place-items:center}/*!@a,\nbutton*/a.sc-kol-nav-default,button.sc-kol-nav-default{cursor:pointer}/*!@button,\ninput,\noption,\nselect,\ntextarea*/button.sc-kol-nav-default,input.sc-kol-nav-default,option.sc-kol-nav-default,select.sc-kol-nav-default,textarea.sc-kol-nav-default{font-family:inherit}/*!@.icon-only > kol-span-wc > span > span*/.icon-only.sc-kol-nav-default>kol-span-wc.sc-kol-nav-default>span.sc-kol-nav-default>span.sc-kol-nav-default{display:none}/*!@:host > div*/.sc-kol-nav-default-h>div.sc-kol-nav-default{display:grid;place-items:center}/*!@nav*/nav.sc-kol-nav-default{width:100%}/*!@.list*/.list.sc-kol-nav-default{display:flex;list-style:none;margin:0;padding:0}/*!@.list.vertical*/.list.vertical.sc-kol-nav-default{flex-direction:column}/*!@.entry*/.entry.sc-kol-nav-default{display:flex}/*!@.entry kol-button-wc:first-child,\n.entry kol-link-wc,\n.entry kol-span-wc*/.entry.sc-kol-nav-default kol-button-wc.sc-kol-nav-default:first-child,.entry.sc-kol-nav-default kol-link-wc.sc-kol-nav-default,.entry.sc-kol-nav-default kol-span-wc.sc-kol-nav-default{flex-grow:1}/*!@.entry kol-span-wc*/.entry.sc-kol-nav-default kol-span-wc.sc-kol-nav-default{justify-items:start}";
16465
16516
 
16466
16517
  class KolNav {
@@ -16483,6 +16534,7 @@ class KolNav {
16483
16534
  };
16484
16535
  this._ariaCurrentValue = false;
16485
16536
  this._collapsible = true;
16537
+ this._hasCompactButton = false;
16486
16538
  this._hideLabel = false;
16487
16539
  this._label = undefined;
16488
16540
  this._links = undefined;
@@ -16490,6 +16542,7 @@ class KolNav {
16490
16542
  this.state = {
16491
16543
  _ariaCurrentValue: false,
16492
16544
  _collapsible: true,
16545
+ _hasCompactButton: false,
16493
16546
  _hideLabel: false,
16494
16547
  _label: '…',
16495
16548
  _links: [],
@@ -16513,12 +16566,21 @@ class KolNav {
16513
16566
  }, key: index }, this.entry(collapsible, hideLabel, hasChildren, link, active), expanded ? (hAsync(this.linkList, { collapsible: collapsible, hideLabel: hideLabel, deep: deep + 1, links: link._children || [], orientation: orientation })) : ('')));
16514
16567
  }
16515
16568
  render() {
16569
+ let hasCompactButton = this.state._hasCompactButton;
16570
+ if (this.state._orientation === 'horizontal' && this.state._hasCompactButton === true) {
16571
+ hasCompactButton = false;
16572
+ devWarning(`[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.`);
16573
+ }
16516
16574
  const collapsible = this.state._collapsible === true;
16517
16575
  const hideLabel = this.state._hideLabel === true;
16518
16576
  const orientation = this.state._orientation;
16519
16577
  return (hAsync(Host, null, hAsync("div", { class: {
16520
16578
  [orientation]: true,
16521
- } }, hAsync("nav", { "aria-label": this.state._label, id: "nav" }, hAsync(this.linkList, { collapsible: collapsible, hideLabel: hideLabel, deep: 0, links: this.state._links, orientation: orientation })))));
16579
+ } }, hAsync("nav", { "aria-label": this.state._label, id: "nav" }, hAsync(this.linkList, { collapsible: collapsible, hideLabel: hideLabel, deep: 0, links: this.state._links, orientation: orientation })), hasCompactButton && (hAsync("div", { class: "compact" }, hAsync("kol-button", { _ariaControls: "nav", _ariaExpanded: !hideLabel, _icons: hideLabel ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left', _hideLabel: true, _label: translate(hideLabel ? 'kol-nav-maximize' : 'kol-nav-minimize'), _on: {
16580
+ onClick: () => {
16581
+ this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: this.state._hideLabel === false });
16582
+ },
16583
+ }, _tooltipAlign: "right", _variant: "ghost" }))))));
16522
16584
  }
16523
16585
  validateAriaCurrentValue(value) {
16524
16586
  watchValidator(this, '_ariaCurrentValue', (value) => value === true || value === 'date' || value === 'location' || value === 'page' || value === 'step' || value === 'time', new Set(['boolean', 'String {data, location, page, step, time}']), value);
@@ -16526,6 +16588,9 @@ class KolNav {
16526
16588
  validateCollapsible(value) {
16527
16589
  validateCollapsible(this, value);
16528
16590
  }
16591
+ validateHasCompactButton(value) {
16592
+ validateHasCompactButton(this, value);
16593
+ }
16529
16594
  validateHideLabel(value) {
16530
16595
  validateHideLabel(this, value);
16531
16596
  }
@@ -16550,6 +16615,7 @@ class KolNav {
16550
16615
  this.validateAriaCurrentValue(this._ariaCurrentValue);
16551
16616
  this.validateCollapsible(this._collapsible);
16552
16617
  this.validateHideLabel(this._hideLabel);
16618
+ this.validateHasCompactButton(this._hasCompactButton);
16553
16619
  this.validateLabel(this._label, undefined, true);
16554
16620
  this.validateLinks(this._links);
16555
16621
  this.validateOrientation(this._orientation);
@@ -16560,6 +16626,7 @@ class KolNav {
16560
16626
  static get watchers() { return {
16561
16627
  "_ariaCurrentValue": ["validateAriaCurrentValue"],
16562
16628
  "_collapsible": ["validateCollapsible"],
16629
+ "_hasCompactButton": ["validateHasCompactButton"],
16563
16630
  "_hideLabel": ["validateHideLabel"],
16564
16631
  "_label": ["validateLabel"],
16565
16632
  "_links": ["validateLinks"],
@@ -16574,6 +16641,7 @@ class KolNav {
16574
16641
  "$members$": {
16575
16642
  "_ariaCurrentValue": [8, "_aria-current-value"],
16576
16643
  "_collapsible": [4],
16644
+ "_hasCompactButton": [4, "_has-compact-button"],
16577
16645
  "_hideLabel": [4, "_hide-label"],
16578
16646
  "_label": [1],
16579
16647
  "_links": [1],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/hydrate",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.0-rc.2",
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.0",
45
+ "@public-ui/components": "2.0.0-rc.2",
46
46
  "rimraf": "3.0.2"
47
47
  },
48
48
  "peerDependencies": {
49
- "@public-ui/components": "2.0.0-rc.0"
49
+ "@public-ui/components": "2.0.0-rc.2"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "type": "commonjs",