@haiilo/catalyst 10.19.0 → 10.19.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.
@@ -13365,6 +13365,11 @@ const CatTime = class {
13365
13365
  this.reclamp('max', max);
13366
13366
  }
13367
13367
  }
13368
+ onValueChanged(value, oldValue) {
13369
+ if (value !== oldValue) {
13370
+ this.syncValue(value);
13371
+ }
13372
+ }
13368
13373
  componentWillLoad() {
13369
13374
  this.syncValue(this.value ?? '');
13370
13375
  }
@@ -13440,14 +13445,14 @@ const CatTime = class {
13440
13445
  this.input?.clear();
13441
13446
  }
13442
13447
  render() {
13443
- return (index.h(index.Host, { key: 'e9bfaeee8aa39aa58ac287afeaed1a2fc39d7b83' }, index.h("cat-input", { key: '1e200e6041b06a0859e392cfc6b6b03668b3eb35', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: 'e91e3e12272c24858a71b485e00e54cf00d7386f', slot: "label" }, this.hasSlottedLabel && index.h("slot", { key: '2449ea042497293868bcc767b1626070b3a1dcec', name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: '3bab583a7629d01350fbd9e54d3fe1f113e0b372', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '8340d31e70e30ebe1d020f456b3a7bc5bed6b998', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { key: 'e6bb50abe2c3296cee7c3d5c02a6cef7c69f8678', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: 'e79b7f58ffdc4d356e94f3e96afb6727d3e9be26', slot: "addon", placement: this.placement }, index.h("cat-button", { key: 'd6bd905d7760e0ae7e9ab8c23e87f7c926769aa9', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: 'c2ae49020a1e8cafedd27b8a7e061e63dbb4c6d2', slot: "content", class: "cat-nav" }, index.h("ul", { key: 'b918672be1b65ca3a1c2daa239a196d4117b52f7' }, this.timeArray().map(time => {
13448
+ return (index.h(index.Host, { key: 'e8e1ce6233982a53633893f6821665511ec2a09c' }, index.h("cat-input", { key: 'cdb8318f5cf1aadea614ea92f12fcbf4b9f9bbd0', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: 'c0a0ab5e6c869c7e152dbd0efe518410c390e450', slot: "label" }, this.hasSlottedLabel && index.h("slot", { key: '3136de4f0a814706c3e17d2ebc7994b9f300b0e3', name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: '605627b2b58ae30426a5eebb96392d27c119a1c5', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: '4b68598ab85c1c5673369bcd30a3b1991694f696', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { key: '9da13a2d77af3c2b973f542e863f9ca2f4d56d3d', class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: '806e88cdaeecf208bfc7a440600a51cc53b0b426', slot: "addon", placement: this.placement }, index.h("cat-button", { key: '866209cdca6617c440d5fb4fa91504cd09786c8a', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: '704f9854c55c3d8f84f37474fa05326d8390898d', slot: "content", class: "cat-nav" }, index.h("ul", { key: '5039ca6ce902e6796bda9c16e7f7101c8a0fd72f' }, this.timeArray().map(time => {
13444
13449
  const isoTime = formatIso(time);
13445
13450
  const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
13446
13451
  return (index.h("li", null, index.h("cat-button", { class: {
13447
13452
  'cat-nav-item': true,
13448
13453
  'time-disabled': disabled
13449
13454
  }, disabled: disabled, active: isoTime === this.value, color: isoTime === this.value ? 'primary' : 'secondary', variant: isoTime === this.value ? 'filled' : 'outlined', onCatClick: () => this.select(time), "data-time": isoTime }, this.format(time))));
13450
- }))))), this.hasSlottedHint && (index.h("span", { key: '817f2b58417911affc39ce6977160998c39ebf71', slot: "hint" }, index.h("slot", { key: 'a1ffdd541103064abf49311801088fe15d5ed88d', name: "hint" }))))));
13455
+ }))))), this.hasSlottedHint && (index.h("span", { key: '034daef728e22d9bf13514d5b5a6597355af5960', slot: "hint" }, index.h("slot", { key: '56bd873c145f9f582873355b0a72522a9476bef3', name: "hint" }))))));
13451
13456
  }
13452
13457
  timeArray() {
13453
13458
  const result = [];
@@ -13505,7 +13510,8 @@ const CatTime = class {
13505
13510
  get hostElement() { return index.getElement(this); }
13506
13511
  static get watchers() { return {
13507
13512
  "min": ["onMinChanged"],
13508
- "max": ["onMaxChanged"]
13513
+ "max": ["onMaxChanged"],
13514
+ "value": ["onValueChanged"]
13509
13515
  }; }
13510
13516
  };
13511
13517
  CatTime.style = CatTimeStyle0;
@@ -13659,12 +13665,12 @@ const CatTooltip = class {
13659
13665
  }
13660
13666
  }
13661
13667
  render() {
13662
- return (index.h(index.Host, { key: '7d72ac4a2ccb057d7bca7290d6fc4e06c02c644c' }, index.h("slot", { key: '260fb1edf80d86a93892eed9df3ce4622cc441a3' }), index.h("div", { key: 'f7a7dc3f3333be42ed1a795dad64f74e9194201a', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
13668
+ return (index.h(index.Host, { key: '340e9ed5613717d88fc8dde858d16716d0d100e8' }, index.h("slot", { key: 'af044aaa5e320540463d1318ba8cf8ed1b02b7e4' }), index.h("div", { key: '117ed1ce275f03f879aa2f320d9c0b28bfc953bd', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
13663
13669
  tooltip: true,
13664
13670
  'tooltip-hidden': this.inactive,
13665
13671
  'tooltip-round': this.round,
13666
13672
  [`tooltip-${this.size}`]: Boolean(this.size)
13667
- } }, index.h("slot", { key: 'ebed88ce3b9481d6046cf5a70245c26a3dbc0a03', name: "content" }, index.h("p", { key: '455f894145ba5d1b8a8c001a6a4017d8aac81771' }, this.content)))));
13673
+ } }, index.h("slot", { key: 'af0986e70f3d6ba0ad2f791cfa327ae9ebf768f5', name: "content" }, index.h("p", { key: 'bfcca7d936fa6e05719a88ace8bacf806b8f423b' }, this.content)))));
13668
13674
  }
13669
13675
  async update() {
13670
13676
  if (this.trigger && this.tooltip) {