@helvetia-design/angular 0.1.0-snapshot.332-4b8089f → 0.2.0

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.
@@ -370,6 +370,7 @@ let DsAccordion = class DsAccordion {
370
370
  buttonLabelOpen: "buttonLabelOpen",
371
371
  buttonSize: "buttonSize",
372
372
  buttonWide: "buttonWide",
373
+ disabled: "disabled",
373
374
  group: "group",
374
375
  marker: "marker",
375
376
  markerPosition: "markerPosition",
@@ -401,6 +402,7 @@ DsAccordion = __decorate([ProxyCmp({
401
402
  "buttonLabelOpen",
402
403
  "buttonSize",
403
404
  "buttonWide",
405
+ "disabled",
404
406
  "group",
405
407
  "marker",
406
408
  "markerPosition",
@@ -434,6 +436,7 @@ i0.ɵɵngDeclareClassMetadata({
434
436
  "buttonLabelOpen",
435
437
  "buttonSize",
436
438
  "buttonWide",
439
+ "disabled",
437
440
  "group",
438
441
  "marker",
439
442
  "markerPosition",
@@ -1002,7 +1005,8 @@ DsButton = __decorate([ProxyCmp({
1002
1005
  "tooltipPlacement",
1003
1006
  "value",
1004
1007
  "wide"
1005
- ]
1008
+ ],
1009
+ methods: ["configChanged"]
1006
1010
  }), __metadata("design:paramtypes", [
1007
1011
  ChangeDetectorRef,
1008
1012
  ElementRef,
@@ -1177,16 +1181,20 @@ let DsCard = class DsCard {
1177
1181
  isStandalone: true,
1178
1182
  selector: "ds-card",
1179
1183
  inputs: {
1184
+ a11yLabel: "a11yLabel",
1180
1185
  align: "align",
1181
1186
  clickable: "clickable",
1182
1187
  color: "color",
1183
1188
  dense: "dense",
1184
1189
  flat: "flat",
1185
1190
  fullheight: "fullheight",
1191
+ href: "href",
1186
1192
  imageTeaser: "imageTeaser",
1187
1193
  inverted: "inverted",
1194
+ rel: "rel",
1188
1195
  selected: "selected",
1189
1196
  space: "space",
1197
+ target: "target",
1190
1198
  tile: "tile"
1191
1199
  },
1192
1200
  ngImport: i0,
@@ -1199,16 +1207,20 @@ let DsCard = class DsCard {
1199
1207
  DsCard = __decorate([ProxyCmp({
1200
1208
  defineCustomElementFn: defineCustomElement$8,
1201
1209
  inputs: [
1210
+ "a11yLabel",
1202
1211
  "align",
1203
1212
  "clickable",
1204
1213
  "color",
1205
1214
  "dense",
1206
1215
  "flat",
1207
1216
  "fullheight",
1217
+ "href",
1208
1218
  "imageTeaser",
1209
1219
  "inverted",
1220
+ "rel",
1210
1221
  "selected",
1211
1222
  "space",
1223
+ "target",
1212
1224
  "tile"
1213
1225
  ]
1214
1226
  }), __metadata("design:paramtypes", [
@@ -1228,16 +1240,20 @@ i0.ɵɵngDeclareClassMetadata({
1228
1240
  changeDetection: ChangeDetectionStrategy.OnPush,
1229
1241
  template: "<ng-content></ng-content>",
1230
1242
  inputs: [
1243
+ "a11yLabel",
1231
1244
  "align",
1232
1245
  "clickable",
1233
1246
  "color",
1234
1247
  "dense",
1235
1248
  "flat",
1236
1249
  "fullheight",
1250
+ "href",
1237
1251
  "imageTeaser",
1238
1252
  "inverted",
1253
+ "rel",
1239
1254
  "selected",
1240
1255
  "space",
1256
+ "target",
1241
1257
  "tile"
1242
1258
  ]
1243
1259
  }]
@@ -1691,6 +1707,7 @@ let DsCarouselItem = class DsCarouselItem {
1691
1707
  isStandalone: true,
1692
1708
  selector: "ds-carousel-item",
1693
1709
  inputs: {
1710
+ alt: "alt",
1694
1711
  name: "name",
1695
1712
  navigation: "navigation",
1696
1713
  selected: "selected",
@@ -1707,6 +1724,7 @@ let DsCarouselItem = class DsCarouselItem {
1707
1724
  DsCarouselItem = __decorate([ProxyCmp({
1708
1725
  defineCustomElementFn: defineCustomElement$15,
1709
1726
  inputs: [
1727
+ "alt",
1710
1728
  "name",
1711
1729
  "navigation",
1712
1730
  "selected",
@@ -1729,6 +1747,7 @@ i0.ɵɵngDeclareClassMetadata({
1729
1747
  changeDetection: ChangeDetectionStrategy.OnPush,
1730
1748
  template: "<ng-content></ng-content>",
1731
1749
  inputs: [
1750
+ "alt",
1732
1751
  {
1733
1752
  name: "name",
1734
1753
  required: true
@@ -1747,7 +1766,7 @@ i0.ɵɵngDeclareClassMetadata({
1747
1766
  ],
1748
1767
  propDecorators: { dsCarouselItemSelect: [{ type: Output }] }
1749
1768
  });
1750
- let DsCheckbox = class DsCheckbox {
1769
+ let DsCheckbox$1 = class DsCheckbox {
1751
1770
  constructor(c, r, z) {
1752
1771
  this.z = z;
1753
1772
  this.dsFocus = new EventEmitter();
@@ -1804,7 +1823,7 @@ let DsCheckbox = class DsCheckbox {
1804
1823
  });
1805
1824
  }
1806
1825
  };
1807
- DsCheckbox = __decorate([ProxyCmp({
1826
+ DsCheckbox$1 = __decorate([ProxyCmp({
1808
1827
  defineCustomElementFn: defineCustomElement$16,
1809
1828
  inputs: [
1810
1829
  "autoInvalidOff",
@@ -1825,12 +1844,12 @@ DsCheckbox = __decorate([ProxyCmp({
1825
1844
  ChangeDetectorRef,
1826
1845
  ElementRef,
1827
1846
  NgZone
1828
- ])], DsCheckbox);
1847
+ ])], DsCheckbox$1);
1829
1848
  i0.ɵɵngDeclareClassMetadata({
1830
1849
  minVersion: "12.0.0",
1831
1850
  version: "22.2.6",
1832
1851
  ngImport: i0,
1833
- type: DsCheckbox,
1852
+ type: DsCheckbox$1,
1834
1853
  decorators: [{
1835
1854
  type: Component,
1836
1855
  args: [{
@@ -4016,6 +4035,7 @@ let DsLogo = class DsLogo {
4016
4035
  isStandalone: true,
4017
4036
  selector: "ds-logo",
4018
4037
  inputs: {
4038
+ a11yLabel: "a11yLabel",
4019
4039
  animated: "animated",
4020
4040
  brand: "brand",
4021
4041
  inverted: "inverted",
@@ -4031,6 +4051,7 @@ let DsLogo = class DsLogo {
4031
4051
  DsLogo = __decorate([ProxyCmp({
4032
4052
  defineCustomElementFn: defineCustomElement$38,
4033
4053
  inputs: [
4054
+ "a11yLabel",
4034
4055
  "animated",
4035
4056
  "brand",
4036
4057
  "inverted",
@@ -4053,6 +4074,7 @@ i0.ɵɵngDeclareClassMetadata({
4053
4074
  changeDetection: ChangeDetectionStrategy.OnPush,
4054
4075
  template: "<ng-content></ng-content>",
4055
4076
  inputs: [
4077
+ "a11yLabel",
4056
4078
  "animated",
4057
4079
  "brand",
4058
4080
  "inverted",
@@ -4826,8 +4848,8 @@ let DsPopup = class DsPopup {
4826
4848
  label: "label",
4827
4849
  offset: "offset",
4828
4850
  open: "open",
4851
+ panelRole: "panelRole",
4829
4852
  placement: "placement",
4830
- role: "role",
4831
4853
  trapFocus: "trapFocus",
4832
4854
  trigger: "trigger"
4833
4855
  },
@@ -4855,8 +4877,8 @@ DsPopup = __decorate([ProxyCmp({
4855
4877
  "label",
4856
4878
  "offset",
4857
4879
  "open",
4880
+ "panelRole",
4858
4881
  "placement",
4859
- "role",
4860
4882
  "trapFocus",
4861
4883
  "trigger"
4862
4884
  ],
@@ -4890,8 +4912,8 @@ i0.ɵɵngDeclareClassMetadata({
4890
4912
  "label",
4891
4913
  "offset",
4892
4914
  "open",
4915
+ "panelRole",
4893
4916
  "placement",
4894
- "role",
4895
4917
  "trapFocus",
4896
4918
  "trigger"
4897
4919
  ],
@@ -7699,18 +7721,20 @@ var DsValueAccessor = class {
7699
7721
  this.onChange = () => {};
7700
7722
  this.onTouched = () => {};
7701
7723
  this.handleChange = (event) => {
7724
+ if (event.target !== this.element) return;
7702
7725
  const value = this.config.extractValue ? this.config.extractValue(event, this.element) : event.detail;
7703
7726
  this.onChange(value);
7704
7727
  this.cdr?.markForCheck();
7705
7728
  };
7706
- this.handleBlur = () => {
7729
+ this.handleBlur = (event) => {
7730
+ if (event.target !== this.element) return;
7707
7731
  this.onTouched();
7708
7732
  this.cdr?.markForCheck();
7709
7733
  };
7710
7734
  }
7711
7735
  init() {
7712
7736
  this.destroyed = false;
7713
- this.ngControl = this.injector.get(NgControl, null);
7737
+ this.ngControl = this.injector.get(NgControl, null, { self: true });
7714
7738
  this.cdr = this.injector.get(ChangeDetectorRef);
7715
7739
  this.element.addEventListener(this.config.changeEvent, this.handleChange);
7716
7740
  this.element.addEventListener(this.config.blurEvent, this.handleBlur);
@@ -7754,7 +7778,7 @@ var DsValueAccessor = class {
7754
7778
  if (!control) return;
7755
7779
  const isInvalid = !!control.touched && !!control.invalid;
7756
7780
  element.invalid = isInvalid;
7757
- element.invalidText = isInvalid ? this.firstErrorMessage(control.errors) : "";
7781
+ if ("invalidText" in element) element.invalidText = isInvalid ? this.firstErrorMessage(control.errors) : "";
7758
7782
  }
7759
7783
  firstErrorMessage(errors) {
7760
7784
  const [key, value] = Object.entries(errors ?? {})[0] ?? [];
@@ -7790,6 +7814,26 @@ function withValueAccessor(config) {
7790
7814
  };
7791
7815
  };
7792
7816
  }
7817
+ const DsCheckboxInputs = [
7818
+ "autoInvalidOff",
7819
+ "checked",
7820
+ "disabled",
7821
+ "hideTrigger",
7822
+ "invalid",
7823
+ "label",
7824
+ "labelPosition",
7825
+ "name",
7826
+ "readonly",
7827
+ "required",
7828
+ "tile",
7829
+ "tileColor",
7830
+ "value"
7831
+ ];
7832
+ const DsCheckboxOutputs = [
7833
+ "dsFocus",
7834
+ "dsBlur",
7835
+ "dsChange"
7836
+ ];
7793
7837
  const DsCheckboxGroupInputs = [
7794
7838
  "autoInvalidOff",
7795
7839
  "color",
@@ -8770,11 +8814,93 @@ i0.ɵɵngDeclareClassMetadata({
8770
8814
  }]
8771
8815
  }]
8772
8816
  });
8817
+ var DsCheckbox = class DsCheckbox extends withValueAccessor({
8818
+ changeEvent: "dsChange",
8819
+ blurEvent: "dsBlur",
8820
+ valueProp: "checked"
8821
+ })(DsCheckbox$1) {
8822
+ static {
8823
+ this.ɵfac = i0.ɵɵngDeclareFactory({
8824
+ minVersion: "12.0.0",
8825
+ version: "22.2.6",
8826
+ ngImport: i0,
8827
+ type: DsCheckbox,
8828
+ deps: null,
8829
+ target: i0.ɵɵFactoryTarget.Component
8830
+ });
8831
+ }
8832
+ static {
8833
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
8834
+ minVersion: "14.0.0",
8835
+ version: "22.2.6",
8836
+ type: DsCheckbox,
8837
+ isStandalone: true,
8838
+ selector: "ds-checkbox",
8839
+ inputs: {
8840
+ autoInvalidOff: "autoInvalidOff",
8841
+ checked: "checked",
8842
+ disabled: "disabled",
8843
+ hideTrigger: "hideTrigger",
8844
+ invalid: "invalid",
8845
+ label: "label",
8846
+ labelPosition: "labelPosition",
8847
+ name: "name",
8848
+ readonly: "readonly",
8849
+ required: "required",
8850
+ tile: "tile",
8851
+ tileColor: "tileColor",
8852
+ value: "value"
8853
+ },
8854
+ outputs: {
8855
+ dsFocus: "dsFocus",
8856
+ dsBlur: "dsBlur",
8857
+ dsChange: "dsChange"
8858
+ },
8859
+ host: { attributes: { "data-ds-form-control": "" } },
8860
+ providers: [{
8861
+ provide: NG_VALUE_ACCESSOR,
8862
+ useExisting: forwardRef(() => DsCheckbox),
8863
+ multi: true
8864
+ }],
8865
+ usesInheritance: true,
8866
+ ngImport: i0,
8867
+ template: "<ng-content></ng-content>",
8868
+ isInline: true,
8869
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
8870
+ });
8871
+ }
8872
+ };
8873
+ i0.ɵɵngDeclareClassMetadata({
8874
+ minVersion: "12.0.0",
8875
+ version: "22.2.6",
8876
+ ngImport: i0,
8877
+ type: DsCheckbox,
8878
+ decorators: [{
8879
+ type: Component,
8880
+ args: [{
8881
+ selector: "ds-checkbox",
8882
+ host: { "data-ds-form-control": "" },
8883
+ template: "<ng-content></ng-content>",
8884
+ changeDetection: ChangeDetectionStrategy.OnPush,
8885
+ inputs: DsCheckboxInputs,
8886
+ outputs: DsCheckboxOutputs,
8887
+ providers: [{
8888
+ provide: NG_VALUE_ACCESSOR,
8889
+ useExisting: forwardRef(() => DsCheckbox),
8890
+ multi: true
8891
+ }]
8892
+ }]
8893
+ }]
8894
+ });
8773
8895
  var DsCheckboxGroup = class DsCheckboxGroup extends withValueAccessor({
8774
8896
  changeEvent: "dsChange",
8775
8897
  blurEvent: "dsBlur",
8776
8898
  valueProp: "value"
8777
8899
  })(DsCheckboxGroup$1) {
8900
+ writeValue(value) {
8901
+ this.el.control = true;
8902
+ super.writeValue(value);
8903
+ }
8778
8904
  static {
8779
8905
  this.ɵfac = i0.ɵɵngDeclareFactory({
8780
8906
  minVersion: "12.0.0",