@skf-design-system/ui-components 1.0.2-beta.10 → 1.0.2-beta.12

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.
@@ -1650,19 +1650,6 @@
1650
1650
  "attribute": "invalid-dates",
1651
1651
  "reflects": true
1652
1652
  },
1653
- {
1654
- "kind": "field",
1655
- "name": "lang",
1656
- "type": {
1657
- "text": "Language"
1658
- },
1659
- "default": "'en'",
1660
- "description": "Sets the internal language of the component",
1661
- "attribute": "lang",
1662
- "expandedType": {
1663
- "text": "'en' | 'es' | 'pt' | 'sv'"
1664
- }
1665
- },
1666
1653
  {
1667
1654
  "kind": "field",
1668
1655
  "name": "locale",
@@ -1810,18 +1797,6 @@
1810
1797
  "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
1811
1798
  "fieldName": "invalidDates"
1812
1799
  },
1813
- {
1814
- "name": "lang",
1815
- "type": {
1816
- "text": "Language"
1817
- },
1818
- "default": "'en'",
1819
- "description": "Sets the internal language of the component",
1820
- "fieldName": "lang",
1821
- "expandedType": {
1822
- "text": "'en' | 'es' | 'pt' | 'sv'"
1823
- }
1824
- },
1825
1800
  {
1826
1801
  "name": "locale",
1827
1802
  "type": {
@@ -3381,6 +3356,13 @@
3381
3356
  "type": {
3382
3357
  "text": "_handleAsChange() => void"
3383
3358
  }
3359
+ },
3360
+ {
3361
+ "kind": "method",
3362
+ "name": "_handleDisabledChange",
3363
+ "type": {
3364
+ "text": "_handleDisabledChange() => void"
3365
+ }
3384
3366
  }
3385
3367
  ],
3386
3368
  "events": [
@@ -3871,6 +3853,15 @@
3871
3853
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
3872
3854
  "attribute": "autocomplete"
3873
3855
  },
3856
+ {
3857
+ "kind": "field",
3858
+ "name": "autofocus",
3859
+ "type": {
3860
+ "text": "boolean"
3861
+ },
3862
+ "default": "false",
3863
+ "attribute": "autofocus"
3864
+ },
3874
3865
  {
3875
3866
  "kind": "field",
3876
3867
  "name": "customInvalid",
@@ -4087,6 +4078,27 @@
4087
4078
  "name": "value",
4088
4079
  "description": "The current value of the input field",
4089
4080
  "attribute": "value"
4081
+ },
4082
+ {
4083
+ "kind": "method",
4084
+ "name": "focus",
4085
+ "type": {
4086
+ "text": "focus() => void"
4087
+ }
4088
+ },
4089
+ {
4090
+ "kind": "method",
4091
+ "name": "blur",
4092
+ "type": {
4093
+ "text": "blur() => void"
4094
+ }
4095
+ },
4096
+ {
4097
+ "kind": "method",
4098
+ "name": "select",
4099
+ "type": {
4100
+ "text": "select() => void"
4101
+ }
4090
4102
  }
4091
4103
  ],
4092
4104
  "events": [
@@ -4130,6 +4142,14 @@
4130
4142
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
4131
4143
  "fieldName": "autocomplete"
4132
4144
  },
4145
+ {
4146
+ "name": "autofocus",
4147
+ "type": {
4148
+ "text": "boolean"
4149
+ },
4150
+ "default": "false",
4151
+ "fieldName": "autofocus"
4152
+ },
4133
4153
  {
4134
4154
  "name": "custom-invalid",
4135
4155
  "description": "If defined, forces component to invalid state until removed. Its value is used as hint text.",
@@ -4550,6 +4570,17 @@
4550
4570
  "type": {
4551
4571
  "text": "_handleAsChange() => void"
4552
4572
  }
4573
+ },
4574
+ {
4575
+ "kind": "method",
4576
+ "name": "_handleDisabledChange",
4577
+ "inheritedFrom": {
4578
+ "name": "SkfLink",
4579
+ "module": "src/components/link/link.component.ts"
4580
+ },
4581
+ "type": {
4582
+ "text": "_handleDisabledChange() => void"
4583
+ }
4553
4584
  }
4554
4585
  ],
4555
4586
  "superclass": {
@@ -5891,6 +5922,14 @@
5891
5922
  "description": "If defined, limits the number of selectable options",
5892
5923
  "attribute": "max"
5893
5924
  },
5925
+ {
5926
+ "kind": "field",
5927
+ "name": "maxVisibleItems",
5928
+ "type": {
5929
+ "text": "number | undefined"
5930
+ },
5931
+ "attribute": "max-visible-items"
5932
+ },
5894
5933
  {
5895
5934
  "kind": "field",
5896
5935
  "name": "min",
@@ -5956,17 +5995,18 @@
5956
5995
  "description": "Returns the selected value. (if multiple: in a comma separated string). If set will default set corresponding option."
5957
5996
  },
5958
5997
  {
5959
- "kind": "method",
5960
- "name": "_handleSizeUpdate",
5998
+ "kind": "field",
5999
+ "name": "desiredPopupHeight",
5961
6000
  "type": {
5962
- "text": "_handleSizeUpdate() => void"
5963
- }
6001
+ "text": "number | undefined"
6002
+ },
6003
+ "privacy": "private"
5964
6004
  },
5965
6005
  {
5966
6006
  "kind": "method",
5967
- "name": "handleExpandedChange",
6007
+ "name": "_handleSizeUpdate",
5968
6008
  "type": {
5969
- "text": "handleExpandedChange() => void"
6009
+ "text": "_handleSizeUpdate() => void"
5970
6010
  }
5971
6011
  },
5972
6012
  {
@@ -6106,6 +6146,13 @@
6106
6146
  "description": "If defined, limits the number of selectable options",
6107
6147
  "fieldName": "max"
6108
6148
  },
6149
+ {
6150
+ "name": "max-visible-items",
6151
+ "type": {
6152
+ "text": "number | undefined"
6153
+ },
6154
+ "fieldName": "maxVisibleItems"
6155
+ },
6109
6156
  {
6110
6157
  "name": "min",
6111
6158
  "type": {
@@ -1,4 +1,4 @@
1
- import { flip as w, offset as E, arrow as $, computePosition as O } from "@floating-ui/dom";
1
+ import { flip as w, offset as $, arrow as E, computePosition as O } from "@floating-ui/dom";
2
2
  import { SkfElement as C } from "../../components/skf-element.js";
3
3
  import { PopoverController as x } from "../../controllers/popover.controller.js";
4
4
  import { uuid as A } from "../../helpers/uuid.js";
@@ -21,7 +21,7 @@ const s = (p = class extends C {
21
21
  const o = t.newState === "open";
22
22
  this.isOpen = o, this.emit(o ? "skf-opened" : "skf-closed");
23
23
  }, this.handleToggleOpen = async () => {
24
- this.$anchor && (this.isOpen ? (this.$popover.togglePopover(!0), this.$popover.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 250, fill: "forwards" })) : (await this.$popover.animate([{ opacity: 0 }], { duration: 150, fill: "forwards" }).finished, this.$popover.togglePopover(this.isOpen)));
24
+ this.$anchor && (this.isOpen ? (this.$popover.togglePopover(!0), this.$popover.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 250, fill: "forwards" })) : (await this.$popover.animate([{ opacity: 0 }], { duration: 150, fill: "forwards" }).finished, this.$popover && this.$popover.togglePopover(this.isOpen)));
25
25
  }, this.handleAnchorChange = async () => {
26
26
  if (!this.anchor) return;
27
27
  await this.popoverController.stop(), this.$anchor && this.removeEventListeners();
@@ -29,8 +29,8 @@ const s = (p = class extends C {
29
29
  this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
30
30
  }, this.reposition = async () => {
31
31
  if (!this.$anchor) return;
32
- const t = [w(), E(this.offset)];
33
- this.arrow && t.push($({ element: this.$arrow }));
32
+ const t = [w(), $(this.offset)];
33
+ this.arrow && t.push(E({ element: this.$arrow }));
34
34
  const { x: o, y: i, middlewareData: e } = await O(this.$anchor, this.$popover, {
35
35
  placement: this.placement,
36
36
  middleware: t,
@@ -426,8 +426,6 @@ export type SkfDatepickerCalendarProps = {
426
426
  "invalid-dates"?: SkfDatepickerCalendar['invalidDates'];
427
427
  /** A comma-separated list of dates (yyyy-mm-dd format) that are not selectable. */
428
428
  "invalidDates"?: SkfDatepickerCalendar['invalidDates'];
429
- /** Sets the internal language of the component */
430
- "lang"?: SkfDatepickerCalendar['lang'];
431
429
  /** */
432
430
  "locale"?: SkfDatepickerCalendar['locale'];
433
431
  /** */
@@ -674,6 +672,8 @@ export type SkfInputProps = {
674
672
  /** Indicates whether the value of the control can be automatically completed by the browser. See
675
673
  [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details. */
676
674
  "autocomplete"?: SkfInput['autocomplete'];
675
+ /** */
676
+ "autofocus"?: SkfInput['autofocus'];
677
677
  /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
678
678
  "custom-invalid"?: SkfInput['customInvalid'];
679
679
  /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
@@ -945,6 +945,10 @@ export type SkfSelectProps = {
945
945
  "lang"?: SkfSelect['lang'];
946
946
  /** If defined, limits the number of selectable options */
947
947
  "max"?: SkfSelect['max'];
948
+ /** */
949
+ "max-visible-items"?: SkfSelect['maxVisibleItems'];
950
+ /** */
951
+ "maxVisibleItems"?: SkfSelect['maxVisibleItems'];
948
952
  /** If defined, sets the minimum number of required options */
949
953
  "min"?: SkfSelect['min'];
950
954
  /** If true, allows for multiple options to be selected */
@@ -1509,7 +1513,6 @@ export type SkfTooltipProps = {
1509
1513
  * - `eventid`: undefined
1510
1514
  * - `firstDayOfWeek`: undefined
1511
1515
  * - `invalid-dates`/`invalidDates`: A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.
1512
- * - `lang`: Sets the internal language of the component
1513
1516
  * - `locale`: undefined
1514
1517
  * - `range`: undefined
1515
1518
  * - `selectable-from`/`selectableFrom`: Earliest selectable date. (yyyy-mm-dd format)
@@ -1747,6 +1750,7 @@ export type SkfTooltipProps = {
1747
1750
  * Methods that can be called to access component functionality.
1748
1751
  *
1749
1752
  * - `_handleAsChange() => void`: undefined
1753
+ * - `_handleDisabledChange() => void`: undefined
1750
1754
  */
1751
1755
  "skf-link": Partial<SkfLinkProps & BaseProps<SkfLink> & BaseEvents>;
1752
1756
 
@@ -1824,6 +1828,7 @@ export type SkfTooltipProps = {
1824
1828
  * - `required`/`undefined`: If true, value is required or must be checked for the form to be submittable
1825
1829
  * - `autocomplete`: Indicates whether the value of the control can be automatically completed by the browser. See
1826
1830
  * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.
1831
+ * - `autofocus`: undefined
1827
1832
  * - `custom-invalid`/`customInvalid`: If defined, forces component to invalid state until removed. Its value is used as hint text.
1828
1833
  * - `debug`: If true, outputs helping hints in console
1829
1834
  * - `hide-label`/`hideLabel`: If true, hides the label visually
@@ -1861,6 +1866,14 @@ export type SkfTooltipProps = {
1861
1866
  * Areas where markup can be added to the component.
1862
1867
  *
1863
1868
  * - `(default)`: The Inputs label. Alternatively, you can use the `label` attribute.
1869
+ *
1870
+ * #### Methods
1871
+ *
1872
+ * Methods that can be called to access component functionality.
1873
+ *
1874
+ * - `focus() => void`: undefined
1875
+ * - `blur() => void`: undefined
1876
+ * - `select() => void`: undefined
1864
1877
  */
1865
1878
  "skf-input": Partial<SkfInputProps & BaseProps<SkfInput> & BaseEvents>;
1866
1879
 
@@ -1901,6 +1914,7 @@ export type SkfTooltipProps = {
1901
1914
  * Methods that can be called to access component functionality.
1902
1915
  *
1903
1916
  * - `_handleAsChange() => void`: undefined
1917
+ * - `_handleDisabledChange() => void`: undefined
1904
1918
  */
1905
1919
  "skf-menu-item": Partial<SkfMenuItemProps & BaseProps<SkfMenuItem> & BaseEvents>;
1906
1920
 
@@ -2126,6 +2140,7 @@ export type SkfTooltipProps = {
2126
2140
  * - `label`: If defined, displays provided label
2127
2141
  * - `lang`: Sets the internal language of the component
2128
2142
  * - `max`: If defined, limits the number of selectable options
2143
+ * - `max-visible-items`/`maxVisibleItems`: undefined
2129
2144
  * - `min`: If defined, sets the minimum number of required options
2130
2145
  * - `multiple`: If true, allows for multiple options to be selected
2131
2146
  * - `name`: If defined, set name of the component
@@ -2159,7 +2174,6 @@ export type SkfTooltipProps = {
2159
2174
  * Methods that can be called to access component functionality.
2160
2175
  *
2161
2176
  * - `_handleSizeUpdate() => void`: undefined
2162
- * - `handleExpandedChange() => void`: undefined
2163
2177
  */
2164
2178
  "skf-select": Partial<SkfSelectProps & BaseProps<SkfSelect> & BaseEvents>;
2165
2179
 
@@ -203,8 +203,6 @@ type SkfDatepickerCalendarProps = {
203
203
  firstDayOfWeek?: SkfDatepickerCalendar["firstDayOfWeek"];
204
204
  /** A comma-separated list of dates (yyyy-mm-dd format) that are not selectable. */
205
205
  "invalid-dates"?: SkfDatepickerCalendar["invalidDates"];
206
- /** Sets the internal language of the component */
207
- lang?: SkfDatepickerCalendar["lang"];
208
206
  /** */
209
207
  locale?: SkfDatepickerCalendar["locale"];
210
208
  /** */
@@ -392,6 +390,8 @@ type SkfInputProps = {
392
390
  /** Indicates whether the value of the control can be automatically completed by the browser. See
393
391
  [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details. */
394
392
  autocomplete?: SkfInput["autocomplete"];
393
+ /** */
394
+ autofocus?: SkfInput["autofocus"];
395
395
  /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
396
396
  "custom-invalid"?: SkfInput["customInvalid"];
397
397
  /** If true, outputs helping hints in console */
@@ -609,6 +609,8 @@ type SkfSelectProps = {
609
609
  lang?: SkfSelect["lang"];
610
610
  /** If defined, limits the number of selectable options */
611
611
  max?: SkfSelect["max"];
612
+ /** */
613
+ "max-visible-items"?: SkfSelect["maxVisibleItems"];
612
614
  /** If defined, sets the minimum number of required options */
613
615
  min?: SkfSelect["min"];
614
616
  /** If true, allows for multiple options to be selected */
@@ -338,11 +338,6 @@
338
338
  "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
339
339
  "values": []
340
340
  },
341
- {
342
- "name": "lang",
343
- "description": "Sets the internal language of the component",
344
- "values": [{ "name": "Language" }]
345
- },
346
341
  { "name": "locale", "values": [] },
347
342
  { "name": "range", "values": [] },
348
343
  {
@@ -720,6 +715,7 @@
720
715
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
721
716
  "values": [{ "name": "HTMLInputElement['autocomplete']" }]
722
717
  },
718
+ { "name": "autofocus", "values": [] },
723
719
  {
724
720
  "name": "custom-invalid",
725
721
  "description": "If defined, forces component to invalid state until removed. Its value is used as hint text.",
@@ -1198,6 +1194,7 @@
1198
1194
  "description": "If defined, limits the number of selectable options",
1199
1195
  "values": []
1200
1196
  },
1197
+ { "name": "max-visible-items", "values": [] },
1201
1198
  {
1202
1199
  "name": "min",
1203
1200
  "description": "If defined, sets the minimum number of required options",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@skf-design-system/ui-components",
4
- "version": "1.0.2-beta.8",
4
+ "version": "1.0.2-beta",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -745,11 +745,6 @@
745
745
  "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
746
746
  "value": { "type": "string | undefined" }
747
747
  },
748
- {
749
- "name": "lang",
750
- "description": "Sets the internal language of the component",
751
- "value": { "type": "Language", "default": "'en'" }
752
- },
753
748
  {
754
749
  "name": "locale",
755
750
  "value": { "type": "string", "default": "'en-CA'" }
@@ -790,11 +785,6 @@
790
785
  "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
791
786
  "type": "string | undefined"
792
787
  },
793
- {
794
- "name": "lang",
795
- "description": "Sets the internal language of the component",
796
- "type": "Language"
797
- },
798
788
  { "name": "locale", "type": "string" },
799
789
  { "name": "range", "type": "boolean" },
800
790
  {
@@ -1583,6 +1573,10 @@
1583
1573
  "type": "HTMLInputElement['autocomplete'] | undefined"
1584
1574
  }
1585
1575
  },
1576
+ {
1577
+ "name": "autofocus",
1578
+ "value": { "type": "boolean", "default": "false" }
1579
+ },
1586
1580
  {
1587
1581
  "name": "custom-invalid",
1588
1582
  "description": "If defined, forces component to invalid state until removed. Its value is used as hint text.",
@@ -1733,6 +1727,7 @@
1733
1727
  "description": "Indicates whether the value of the control can be automatically completed by the browser. See\n[MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/autocomplete) for details.",
1734
1728
  "type": "HTMLInputElement['autocomplete'] | undefined"
1735
1729
  },
1730
+ { "name": "autofocus", "type": "boolean" },
1736
1731
  {
1737
1732
  "name": "customInvalid",
1738
1733
  "description": "If defined, forces component to invalid state until removed. Its value is used as hint text."
@@ -2559,6 +2554,10 @@
2559
2554
  "description": "If defined, limits the number of selectable options",
2560
2555
  "value": { "type": "number | undefined" }
2561
2556
  },
2557
+ {
2558
+ "name": "max-visible-items",
2559
+ "value": { "type": "number | undefined" }
2560
+ },
2562
2561
  {
2563
2562
  "name": "min",
2564
2563
  "description": "If defined, sets the minimum number of required options",
@@ -2674,6 +2673,7 @@
2674
2673
  "description": "If defined, limits the number of selectable options",
2675
2674
  "type": "number | undefined"
2676
2675
  },
2676
+ { "name": "maxVisibleItems", "type": "number | undefined" },
2677
2677
  {
2678
2678
  "name": "min",
2679
2679
  "description": "If defined, sets the minimum number of required options",
package/package.json CHANGED
@@ -35,7 +35,7 @@
35
35
  "sideEffects": true,
36
36
  "type": "module",
37
37
  "types": "./dist/index.d.ts",
38
- "version": "1.0.2-beta.10",
38
+ "version": "1.0.2-beta.12",
39
39
  "dependencies": {
40
40
  "@floating-ui/dom": "^1.7.1",
41
41
  "@js-temporal/polyfill": "^0.5.1",
@@ -44,6 +44,7 @@
44
44
  "lit": "^3.3.0"
45
45
  },
46
46
  "devDependencies": {
47
+ "@changesets/cli": "^2.29.5",
47
48
  "@chromatic-com/storybook": "^4.0.1",
48
49
  "@commitlint/cli": "^19.8.1",
49
50
  "@commitlint/config-conventional": "^19.8.1",