@skf-design-system/ui-components 0.0.1-beta.3 → 1.0.0-alpha.27

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 (107) hide show
  1. package/dist/components/accordion/accordion.component.d.ts +9 -5
  2. package/dist/components/accordion/accordion.component.js +22 -19
  3. package/dist/components/accordion/accordion.d.ts +1 -1
  4. package/dist/components/accordion/accordion.styles.js +3 -3
  5. package/dist/components/alert/alert.component.d.ts +7 -5
  6. package/dist/components/alert/alert.component.js +61 -0
  7. package/dist/components/alert/alert.js +6 -0
  8. package/dist/components/alert/alert.styles.js +63 -0
  9. package/dist/components/button/button.component.js +1 -1
  10. package/dist/components/button/button.styles.js +1 -1
  11. package/dist/components/card/card.component.d.ts +3 -3
  12. package/dist/components/card/card.component.js +16 -19
  13. package/dist/components/card/card.styles.js +11 -3
  14. package/dist/components/checkbox/checkbox.component.d.ts +16 -9
  15. package/dist/components/checkbox/checkbox.component.js +32 -31
  16. package/dist/components/checkbox/checkbox.styles.js +7 -2
  17. package/dist/components/checkbox/checkbox.test.d.ts +1 -0
  18. package/dist/components/collapse/collapse.component.d.ts +9 -6
  19. package/dist/components/collapse/collapse.component.js +39 -36
  20. package/dist/components/collapse/collapse.styles.js +3 -3
  21. package/dist/components/collapse/collapse.test.d.ts +1 -0
  22. package/dist/components/divider/divider.component.d.ts +13 -10
  23. package/dist/components/divider/divider.component.js +34 -29
  24. package/dist/components/divider/divider.styles.js +1 -5
  25. package/dist/components/heading/heading.component.d.ts +12 -2
  26. package/dist/components/heading/heading.component.js +34 -0
  27. package/dist/components/heading/heading.js +6 -0
  28. package/dist/components/heading/heading.styles.js +62 -0
  29. package/dist/components/icon/icon.component.d.ts +14 -8
  30. package/dist/components/icon/icon.component.js +6 -6
  31. package/dist/components/icon/icon.styles.js +56 -54
  32. package/dist/components/input/input.component.d.ts +34 -29
  33. package/dist/components/input/input.component.js +43 -43
  34. package/dist/components/link/link.component.d.ts +15 -12
  35. package/dist/components/link/link.component.js +7 -7
  36. package/dist/components/link/link.styles.js +1 -1
  37. package/dist/components/loader/loader.component.d.ts +7 -7
  38. package/dist/components/loader/loader.component.js +35 -61
  39. package/dist/components/loader/loader.styles.js +42 -10
  40. package/dist/components/logo/logo.component.d.ts +5 -3
  41. package/dist/components/logo/logo.component.js +8 -8
  42. package/dist/components/logo/logo.styles.js +2 -2
  43. package/dist/components/radio/radio.component.d.ts +15 -13
  44. package/dist/components/radio/radio.component.js +3 -3
  45. package/dist/components/radio/radio.styles.js +6 -1
  46. package/dist/components/select/select.component.d.ts +137 -0
  47. package/dist/components/select/select.component.js +312 -0
  48. package/dist/components/select/select.controllers.d.ts +59 -0
  49. package/dist/components/select/select.controllers.js +169 -0
  50. package/dist/components/select/select.d.ts +8 -0
  51. package/dist/components/select/select.js +6 -0
  52. package/dist/components/select/select.styles.d.ts +1 -0
  53. package/dist/components/select/select.styles.js +131 -0
  54. package/dist/components/select-option/select-option.component.d.ts +77 -0
  55. package/dist/components/select-option/select-option.component.js +123 -0
  56. package/dist/components/select-option/select-option.controllers.d.ts +9 -0
  57. package/dist/components/select-option/select-option.d.ts +8 -0
  58. package/dist/components/select-option/select-option.js +6 -0
  59. package/dist/components/select-option/select-option.styles.d.ts +1 -0
  60. package/dist/components/select-option/select-option.styles.js +53 -0
  61. package/dist/components/select-option-group/select-option-group.component.d.ts +16 -0
  62. package/dist/components/select-option-group/select-option-group.component.js +31 -0
  63. package/dist/components/select-option-group/select-option-group.d.ts +8 -0
  64. package/dist/components/select-option-group/select-option-group.js +6 -0
  65. package/dist/components/select-option-group/select-option-group.style.d.ts +1 -0
  66. package/dist/components/select-option-group/select-option-group.style.js +18 -0
  67. package/dist/components/switch/switch.component.d.ts +2 -3
  68. package/dist/components/switch/switch.component.js +106 -0
  69. package/dist/components/switch/switch.js +6 -0
  70. package/dist/components/switch/switch.styles.js +85 -0
  71. package/dist/components/switch/switch.test.d.ts +1 -0
  72. package/dist/components/tag/tag.component.d.ts +25 -4
  73. package/dist/components/tag/tag.component.js +66 -29
  74. package/dist/components/tag/tag.styles.js +6 -5
  75. package/dist/components/textarea/textarea.component.d.ts +26 -23
  76. package/dist/components/textarea/textarea.component.js +15 -12
  77. package/dist/custom-elements.json +969 -295
  78. package/dist/index.d.ts +6 -0
  79. package/dist/index.js +48 -30
  80. package/dist/internal/components/formBase.d.ts +18 -1
  81. package/dist/internal/components/formBase.js +25 -13
  82. package/dist/internal/components/hint/hint.component.js +12 -10
  83. package/dist/internal/components/hint/hint.styles.js +26 -10
  84. package/dist/internal/components/skf-element.d.ts +4 -4
  85. package/dist/internal/components/skf-element.js +15 -19
  86. package/dist/internal/helpers/array.d.ts +4 -0
  87. package/dist/internal/helpers/findMatchingTags.d.ts +2 -0
  88. package/dist/internal/helpers/findMatchingTags.js +12 -0
  89. package/dist/internal/helpers/hintSeverity.d.ts +2 -0
  90. package/dist/internal/helpers/hintSeverity.js +6 -0
  91. package/dist/internal/helpers/raiseError.d.ts +28 -0
  92. package/dist/internal/helpers/raiseError.js +29 -0
  93. package/dist/internal/storybook/shadowRootTraverser.d.ts +16 -6
  94. package/dist/react/index.d.ts +3 -0
  95. package/dist/react/index.js +3 -0
  96. package/dist/react/skf-select/index.d.ts +21 -0
  97. package/dist/react/skf-select/index.js +21 -0
  98. package/dist/react/skf-select-option/index.d.ts +9 -0
  99. package/dist/react/skf-select-option/index.js +17 -0
  100. package/dist/react/skf-select-option-group/index.d.ts +3 -0
  101. package/dist/react/skf-select-option-group/index.js +13 -0
  102. package/dist/styles/form-field.styles.js +11 -7
  103. package/dist/types/jsx/custom-element-jsx.d.ts +292 -140
  104. package/dist/types/vue/index.d.ts +225 -90
  105. package/dist/vscode.html-custom-data.json +299 -97
  106. package/dist/web-types.json +624 -242
  107. package/package.json +34 -30
@@ -63,9 +63,9 @@ type BaseEvents = {};
63
63
  export type SkfAccordionProps = {
64
64
  /** If true, will animate the expand/collapse state */
65
65
  animated?: boolean | undefined;
66
- /** Controls which heading element will be rendered */
67
- "heading-as"?: Exclude<HeadingType, "h1">;
68
- /** If provided, adds a gap between each item */
66
+ /** Defines which heading element will be rendered */
67
+ "heading-as"?: "h1" | "h2" | "h3" | "h4";
68
+ /** If true, adds a gap between each item */
69
69
  gap?: boolean | undefined;
70
70
  /** If true, allowes multiple accordion items to open */
71
71
  multiple?: boolean | undefined;
@@ -76,14 +76,14 @@ export type SkfAccordionProps = {
76
76
  };
77
77
 
78
78
  export type SkfAlertProps = {
79
- /** If true, alert is being used as a toast with an close button */
79
+ /** If true, alert is being used as a toast (alertdialog) with an close button */
80
80
  closeable?: boolean | undefined;
81
81
  /** Close button aria-label */
82
82
  "button-label"?: string;
83
83
  /** If defined, displays leading icon */
84
84
  icon?: SkfIcon["name"] | undefined;
85
85
  /** If defined, gives the supplied appearance */
86
- severity?: SeverityFgColor | undefined;
86
+ severity?: "error" | "info" | "warning" | "success" | "alert";
87
87
 
88
88
  /** Fires when the close button is clicked */
89
89
  "onskf-alert-close"?: (e: CustomEvent<never>) => void;
@@ -261,11 +261,11 @@ export type SkfButtonProps = {
261
261
 
262
262
  export type SkfCardProps = {
263
263
  /** If true, removes border */
264
- "no-border"?: boolean;
264
+ "no-border"?: boolean | undefined;
265
265
  /** If true, removes padding */
266
- "no-padding"?: boolean;
266
+ "no-padding"?: boolean | undefined;
267
267
  /** If true, the Card fills the parent element height */
268
- stretch?: boolean;
268
+ stretch?: boolean | undefined;
269
269
  };
270
270
 
271
271
  export type SkfCheckboxProps = {
@@ -283,18 +283,20 @@ export type SkfCheckboxProps = {
283
283
  "hide-label"?: boolean | undefined;
284
284
  /** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
285
285
  indeterminate?: boolean | undefined;
286
+ /** Read only indicator of the local state. Use custom-invalid to set it to invalid state. */
287
+ invalid?: boolean | undefined;
286
288
  /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
287
289
  label?: string | undefined;
288
290
  /** If defined, adds name to the input-element */
289
291
  name?: string | undefined;
290
292
  /** If defined, renders an alternative A11y text for the asterisk */
291
293
  "required-label"?: string | undefined;
292
- /** Size of the checkbox */
293
- size?: "sm" | "md";
294
294
  /** If defined, styles checkbox using provided severity */
295
- severity?: FormFieldBaseProps["severity"] | undefined;
296
- /** If defined, displays valid state after interaction */
295
+ severity?: "alert" | "success" | "info" | "warning";
296
+ /** If true, displays valid state after interaction */
297
297
  "show-valid"?: boolean | undefined;
298
+ /** Size of the checkbox */
299
+ size?: "sm" | "md";
298
300
  /** The current value of the input field */
299
301
  value?: string;
300
302
 
@@ -304,44 +306,44 @@ export type SkfCheckboxProps = {
304
306
 
305
307
  export type SkfCollapseProps = {
306
308
  /** If true, will animate the expand/collapse state */
307
- animated?: boolean;
309
+ animated?: boolean | undefined;
308
310
  /** If true, will set the collapse to be expanded by default */
309
- expanded?: boolean;
311
+ expanded?: boolean | undefined;
310
312
  /** Heading for the collapse */
311
313
  heading?: string | undefined;
312
- /** Controls which heading element will be rendered */
313
- "heading-as"?: Exclude<HeadingType, "h1">;
314
+ /** Defines which heading element will be rendered */
315
+ "heading-as"?: "h1" | "h2" | "h3" | "h4";
314
316
  /** If true, renders the small version */
315
- small?: boolean;
317
+ small?: boolean | undefined;
316
318
  /** If true, will truncate the heading in collapsed state */
317
- truncate?: boolean;
319
+ truncate?: boolean | undefined;
318
320
 
319
321
  /** Event emitted when toggled */
320
322
  "onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
321
323
  };
322
324
 
323
325
  export type SkfDividerProps = {
324
- /** If provided, alters the Divider color */
326
+ /** Defines the Divider color */
325
327
  color?: "emphasised" | "primary" | "secondary" | "tertiary" | "inverse";
326
328
  /** If true, renders a div for presentational purpose instead of the semantic hr-element */
327
- decorative?: boolean;
329
+ decorative?: boolean | undefined;
328
330
  /** If true, renders the divider vertically */
329
- vertical?: boolean;
331
+ vertical?: boolean | undefined;
330
332
  };
331
333
 
332
334
  export type SkfHeadingProps = {
333
- /** Controls which heading element will be rendered. Should not be used to affect appearance. */
334
- as?: HeadingType;
335
+ /** Controls which heading element will be rendered. Should not be used to affect appearance */
336
+ as?: "h1" | "h2" | "h3" | "h4";
335
337
  /** If provided, changes the appearance of the heading */
336
- "styled-as"?: HeadingType | undefined;
338
+ "styled-as"?: "h1" | "h2" | "h3" | "h4";
337
339
  };
338
340
 
339
341
  export type SkfIconProps = {
340
- /** */
342
+ /** Sets the color of the icon */
341
343
  color?: "primary" | "inverse" | "emphasised" | "secondary" | "success" | "info" | "warning" | "error" | "alert";
342
- /** If provided, adds an alternate description to use for assistive devices */
344
+ /** If defined, adds an alternate description to use for assistive devices */
343
345
  label?: string | undefined;
344
- /** */
346
+ /** Name of the icon to display */
345
347
  name?:
346
348
  | "arrowDown"
347
349
  | "arrowDownUp"
@@ -494,7 +496,7 @@ export type SkfIconProps = {
494
496
  | "warningDiamond"
495
497
  | "zoomIn"
496
498
  | "zoomOut";
497
- /** */
499
+ /** Size of the icon */
498
500
  size?: "xs" | "sm" | "md" | "lg";
499
501
  };
500
502
 
@@ -503,62 +505,79 @@ export type SkfInputProps = {
503
505
  disabled?: boolean;
504
506
  /** If true, value is required or must be checked for the form to be submittable */
505
507
  required?: boolean;
506
- /** If provided, renders a custom aria-label for the clear button **Notice!** Only applicable to type=search. */
508
+ /** Custom aria-label for the clear button. **Notice!** Only applicable to type=search. */
507
509
  "button-aria-label-clear"?: string;
508
- /** If provided, renders a custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
510
+ /** Custom aria-label for the visibility button. **Notice!** Only applicable to type=password. */
509
511
  "button-aria-label-hide"?: string;
510
- /** If provided, renders a custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
512
+ /** Custom aria-label for the visibility button **Notice!** Only applicable to type=password. */
511
513
  "button-aria-label-show"?: string;
512
- /** If provided, forces component to invalid state until removed. Its value is used as hint text. */
514
+ /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
513
515
  "custom-invalid"?: string;
514
- /** If provided, outputs helping hints in console */
515
- debug?: boolean;
516
+ /** If true, outputs helping hints in console */
517
+ debug?: boolean | undefined;
516
518
  /** If true, hides the label visually */
517
- "hide-label"?: boolean;
518
- /** If provided, displays informational text below the field */
519
+ "hide-label"?: boolean | undefined;
520
+ /** If defined, displays informational text below the field */
519
521
  hint?: string | undefined;
520
- /** If provided, tells what keyboard to use if applicable */
522
+ /** Tells what keyboard to use if applicable */
521
523
  inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
522
- /** The input's label. Alternatively, you can use the `label` attribute. */
524
+ /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
523
525
  label?: string | undefined;
524
- /** If provided, displays a prefix/adornment before the input-element */
526
+ /** If defined, displays a prefix/adornment before the input-element */
525
527
  leading?: string | undefined;
526
- /** If provided, sets the maximum value to accept for this input */
528
+ /** If defined, sets the maximum value to accept for this input */
527
529
  max?: number | string | undefined;
528
- /** If provided, sets the maximum character length to accept for this input */
530
+ /** If defined, sets the maximum character length to accept for this input */
529
531
  maxlength?: number | undefined;
530
- /** If provided, sets the minimum value to accept for this input */
532
+ /** If defined, sets the minimum value to accept for this input */
531
533
  min?: number | string | undefined;
532
- /** If provided, sets the minimum character length to accept for this input */
534
+ /** If defined, sets the minimum character length to accept for this input */
533
535
  minlength?: number | undefined;
534
- /** If provided, adds name to the input-element */
536
+ /** If defined, adds name to the input-element */
535
537
  name?: string | undefined;
536
- /** If provided, adds name to the input-element */
538
+ /** If defined, adds name to the input-element */
537
539
  pattern?: string | undefined;
538
- /** If provided, displays placeholder text */
540
+ /** If defined, displays placeholder text */
539
541
  placeholder?: string | undefined;
540
542
  /** If true, makes the element not mutable, meaning the user can not edit the control */
541
543
  readonly?: boolean | undefined;
542
- /** If provided, renders an alternative A11y text for the asterisk */
544
+ /** If defined, renders an alternative A11y text for the asterisk */
543
545
  "required-label"?: string | undefined;
544
- /** If provided, displays provided severity state */
545
- severity?: FormFieldBaseProps["severity"] | undefined;
546
- /** If provided, displays provided severity state */
546
+ /** If defined, displays provided severity state */
547
+ severity?: "alert" | "success" | "info" | "warning";
548
+ /** If true, displays valid state after interaction */
547
549
  "show-valid"?: boolean | undefined;
548
- /** If provided, displays an alternative size */
549
- size?: "sm" | "md" | undefined;
550
- /** If provided, displays a suffix/adornment after the input-element */
550
+ /** Size of the input */
551
+ size?: "sm" | "md";
552
+ /** If defined, displays a suffix/adornment after the input-element */
551
553
  trailing?: string | undefined;
552
- /** If provided, changes the type of form control */
553
- type?: Exclude<FormFieldBaseProps["type"], "checkbox" | "radio"> | undefined;
554
- /** If provided, sets validation start, "input", "change" or "submit" */
555
- "validate-on"?: "input" | "change" | "submit" | undefined;
554
+ /** Type of input control */
555
+ type?:
556
+ | "button"
557
+ | "color"
558
+ | "date"
559
+ | "datetime-local"
560
+ | "email"
561
+ | "file"
562
+ | "hidden"
563
+ | "image"
564
+ | "month"
565
+ | "number"
566
+ | "password"
567
+ | "range"
568
+ | "reset"
569
+ | "search"
570
+ | "submit"
571
+ | "tel"
572
+ | "text"
573
+ | "time"
574
+ | "url"
575
+ | "week";
576
+ /** Sets validation start */
577
+ "validate-on"?: "input" | "change" | "submit";
556
578
  /** The current value of the input field */
557
579
  value?: string;
558
- /** */
559
- _numberController?: string;
560
- /** */
561
- _passwordController?: string;
580
+
562
581
  /** Fires when the value of the input changes */
563
582
  onchange?: (e: CustomEvent<never>) => void;
564
583
  /** Fires when the input is invalid */
@@ -566,17 +585,17 @@ export type SkfInputProps = {
566
585
  };
567
586
 
568
587
  export type SkfLinkProps = {
569
- /** Specifies semantic element to render - */
588
+ /** Defines the semantic element to render */
570
589
  as?: "button" | "a";
571
- /** */
590
+ /** Defines the text-color */
572
591
  color?: "primary" | "inverse";
573
592
  /** If true, disables the link */
574
593
  disabled?: boolean | undefined;
575
- /** If provided, downloads the url */
594
+ /** If defined, downloads the url */
576
595
  download?: string | undefined;
577
- /** If provided, loads url on click */
596
+ /** If defined, loads url on click */
578
597
  href?: string | undefined;
579
- /** If provided, renders an icon before or after the text */
598
+ /** If defined, renders an icon before or after the text */
580
599
  icon?:
581
600
  | "arrowDown"
582
601
  | "arrowDownUp"
@@ -729,35 +748,39 @@ export type SkfLinkProps = {
729
748
  | "warningDiamond"
730
749
  | "zoomIn"
731
750
  | "zoomOut";
732
- /** Position of the icon in relation to the text - */
751
+ /** Defines the position of the icon in relation to the text */
733
752
  "icon-placement"?: "left" | "right";
734
- /** Specifies the relationship of the target object to the link object - */
753
+ /** Defines the relationship of the target object to the link object */
735
754
  rel?: string;
736
- /** If provided, used on conjunction with onClick property, second argument */
755
+ /** If defined, used on conjunction with onClick property, second argument */
737
756
  route?: string | undefined;
738
757
  /** If true, fills the parents horizontal axis */
739
758
  stretch?: boolean | undefined;
740
- /** If provided, specifies where to open the linked document */
759
+ /** If defined, specifies where to open the linked document */
741
760
  target?: "_blank" | "_parent" | "_self" | "_top" | undefined;
742
- /** Type of button - */
761
+ /** Defines the type of button */
743
762
  type?: "button" | "submit" | "reset";
744
763
  /** If provided, custom function triggered by click where the second return parameter enables custom routing. */
745
764
  onClick?: function;
746
765
  };
747
766
 
748
767
  export type SkfLoaderProps = {
749
- /** */
768
+ /** Defines the aria-label */
750
769
  "aria-label"?: string;
751
770
  /** If true, inverts the color (to be used on colored backgrounds) */
752
- invert?: boolean;
753
- /** If provided, displays an alternative size */
771
+ invert?: boolean | undefined;
772
+ /** Defines the size of the loader */
754
773
  size?: "md" | "sm" | undefined;
774
+ /** */
775
+ role?: string;
776
+ /** */
777
+ ariaLive?: string;
755
778
  };
756
779
 
757
780
  export type SkfLogoProps = {
758
- /** The title of the logo */
781
+ /** Defines the title of the logo */
759
782
  title?: string;
760
- /** If provided, sets color of the logo */
783
+ /** If defined, sets color of the logo */
761
784
  color?: "primary" | "secondary" | "inverse";
762
785
  };
763
786
 
@@ -766,25 +789,25 @@ export type SkfRadioProps = {
766
789
  disabled?: boolean;
767
790
  /** If true, value is required or must be checked for the form to be submittable */
768
791
  required?: boolean;
769
- /** If provided, outputs helping hints in console */
770
- debug?: boolean;
792
+ /** If true, outputs helping hints in console */
793
+ debug?: boolean | undefined;
771
794
  /** If true, outputs helping hints in console */
772
795
  checked?: boolean | undefined;
773
796
  /** If true, forces component to invalid state until removed */
774
797
  "custom-invalid"?: boolean | undefined;
775
798
  /** If true, hides the label visually */
776
- "hide-label"?: boolean;
777
- /** The input's label. Alternatively, you can use the `label` attribute. */
799
+ "hide-label"?: boolean | undefined;
800
+ /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
778
801
  label?: string | undefined;
779
- /** If provided, adds name to the input-element */
802
+ /** If defined, adds name to the input-element */
780
803
  name?: string | undefined;
781
- /** If provided, renders an alternative A11y text for the asterisk */
804
+ /** If defined, renders an alternative A11y text for the asterisk */
782
805
  "required-label"?: string | undefined;
783
- /** If provided, displays an alternative size */
784
- size?: "sm" | "md" | undefined;
785
- /** If provided, displays provided severity state */
786
- severity?: FormFieldBaseProps["severity"] | undefined;
787
- /** If provided, displays valid state after interaction */
806
+ /** Size of the Radio */
807
+ size?: "sm" | "md";
808
+ /** If defined, displays provided severity state */
809
+ severity?: "success" | "info" | "warning" | "alert";
810
+ /** If true, displays valid state after interaction */
788
811
  "show-valid"?: boolean | undefined;
789
812
  /** The current value of the input field */
790
813
  value?: string;
@@ -793,6 +816,87 @@ export type SkfRadioProps = {
793
816
  onchange?: (e: CustomEvent<never>) => void;
794
817
  };
795
818
 
819
+ export type SkfSelectProps = {
820
+ /** If true, the select is disabled `default: false` */
821
+ disabled?: boolean;
822
+ /** Sets the first visible text on the component */
823
+ "button-label"?: string;
824
+ /** If defined, forces component to invalid state until removed */
825
+ "custom-invalid"?: string | undefined;
826
+ /** If true, hides the label visually */
827
+ "hide-label"?: boolean | undefined;
828
+ /** If true and mulltiple is true, no tags are displayed under the select */
829
+ "hide-tags"?: boolean | undefined;
830
+ /** If defined, sets the hint text under the select component in the form */
831
+ hint?: string | undefined;
832
+ /** If defined, displays provided label */
833
+ label?: string | undefined;
834
+ /** If defined, limits the number of selectable options */
835
+ max?: number | undefined;
836
+ /** If defined, sets the minimum number of required options */
837
+ min?: number | undefined;
838
+ /** If true, allows for multiple options to be selected */
839
+ multiple?: boolean | undefined;
840
+ /** If defined, set name of the component */
841
+ name?: string | undefined;
842
+ /** If defined, renders an alternative A11y text for the asterisk */
843
+ "required-label"?: string | undefined;
844
+ /** If defined, displays provided severity state */
845
+ severity?: FormFieldBaseProps["severity"] | undefined;
846
+ /** If true, displays valid state after interaction */
847
+ "show-valid"?: boolean | undefined;
848
+ /** Size of the Select */
849
+ size?: "sm" | "md";
850
+ /** A readonly property that returns the selected value(s) in a array */
851
+ getSelectedValues?: string;
852
+ /** A readonly property that returns the selected slot(s) text content in a array */
853
+ getSelectedOptionsText?: string;
854
+ /** Read only, returns the selected value. (if multiple: in a comma separated string) */
855
+ value?: string;
856
+ /** */
857
+ _selectedOptions?: array;
858
+ /** Fired when the selected option(s) changes */
859
+ onchange?: (e: CustomEvent<never>) => void;
860
+ /** Fired when the select is invalid */
861
+ oninvalid?: (e: CustomEvent<never>) => void;
862
+ /** Fired when the form is reset */
863
+ onreset?: (e: CustomEvent<never>) => void;
864
+ /** {detail: {expanded: boolean}} Fired when the select dropdown is toggled */
865
+ "onskf-select:dropdown"?: (e: CustomEvent<never>) => void;
866
+ /** {detail: {value: string | null, option: SkfSelectOption}} Fired when the select dropdown is toggled */
867
+ "onskf-select-option:select"?: (e: CustomEvent<never>) => void;
868
+ };
869
+
870
+ export type SkfSelectOptionProps = {
871
+ /** If true, prevents interaction with the option */
872
+ disabled?: boolean | undefined;
873
+ /** If defined, set an icon */
874
+ icon?: SkfIcon["name"] | undefined;
875
+ /** If defined, sets provided color on the icon */
876
+ "icon-color"?: SeverityFgColor | undefined;
877
+ /** If true, sets the option as selected */
878
+ selected?: boolean | undefined;
879
+ /** If defined, sets a short label */
880
+ "short-label"?: string | undefined;
881
+ /** Returns or sets the tags value. If value is omitted, defaults to the tags text. */
882
+ value?: string;
883
+ /** The option's label text (equivalent to the tags textContent) */
884
+ text?: string;
885
+ /** */
886
+ role?: string;
887
+ /** */
888
+ _parent?: string;
889
+ /** */
890
+ _shortcutUpdate?: boolean;
891
+ /** {detail: { value: string | null, option: SkfSelectOption }} Fires when the option is selected/deselected. */
892
+ "onskf-select-option:select"?: (e: CustomEvent<never>) => void;
893
+ };
894
+
895
+ export type SkfSelectOptionGroupProps = {
896
+ /** */
897
+ label?: string;
898
+ };
899
+
796
900
  export type SkfSwitchProps = {
797
901
  /** If true, sets disabled state */
798
902
  disabled?: boolean;
@@ -804,7 +908,7 @@ export type SkfSwitchProps = {
804
908
  checked?: boolean | undefined;
805
909
  /** If true, hides the label visually */
806
910
  "hide-label"?: boolean | undefined;
807
- /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
911
+ /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
808
912
  label?: string | undefined;
809
913
  /** If defined, adds name to the input-element */
810
914
  name?: string | undefined;
@@ -817,9 +921,9 @@ export type SkfSwitchProps = {
817
921
  };
818
922
 
819
923
  export type SkfTagProps = {
820
- /** Specifies Tag size - */
924
+ /** Specifies Tag size */
821
925
  size?: "sm" | "md" | "lg";
822
- /** If defined, displays leading/provided icon - */
926
+ /** If defined, displays leading/provided icon */
823
927
  icon?:
824
928
  | "arrowDown"
825
929
  | "arrowDownUp"
@@ -972,10 +1076,14 @@ export type SkfTagProps = {
972
1076
  | "warningDiamond"
973
1077
  | "zoomIn"
974
1078
  | "zoomOut";
975
- /** If defined, gives the supplied appearance - */
1079
+ /** If defined, gives the supplied appearance */
976
1080
  color?: "warning" | "success" | "info" | "error" | "alert";
977
1081
  /** If true, adds trailing button to remove tag */
978
1082
  removable?: boolean | undefined;
1083
+ /** If defined, accepts a function that runs on click */
1084
+ onClick?: string;
1085
+ /** If defined, accepts a function that runs on click. Self removal can be overridden by using `event.stopPropagation()`. */
1086
+ onRemove?: string;
979
1087
  };
980
1088
 
981
1089
  export type SkfTextAreaProps = {
@@ -983,40 +1091,40 @@ export type SkfTextAreaProps = {
983
1091
  disabled?: boolean;
984
1092
  /** If true, value is required or must be checked for the form to be submittable */
985
1093
  required?: boolean;
986
- /** If provided, sets the cols of the textarea */
987
- cols?: number;
988
- /** If provided, forces component to invalid state until removed. Its value is used as hint text. */
1094
+ /** If defined, sets the cols of the textarea */
1095
+ cols?: number | undefined;
1096
+ /** If defined, forces component to invalid state until removed. Its value is used as hint text. */
989
1097
  "custom-invalid"?: string;
990
- /** If provided, outputs helping hints in console */
991
- debug?: boolean;
992
- /** hide-label - If true, hides the label visually */
993
- "hide-label"?: boolean;
994
- /** If provided, displays informational text below the field */
1098
+ /** If true, outputs helping hints in console */
1099
+ debug?: boolean | undefined;
1100
+ /** If true, hides the label visually */
1101
+ "hide-label"?: boolean | undefined;
1102
+ /** If defined, displays informational text below the field */
995
1103
  hint?: string | undefined;
996
- /** The input's label. Alternatively, you can use the component slot. */
997
- label?: string;
998
- /** If provided, adds name to the input-element */
1104
+ /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
1105
+ label?: string | undefined;
1106
+ /** If defined, adds name to the input-element */
999
1107
  name?: string | undefined;
1000
- /** If provided, sets the maximum character length to accept for this input */
1108
+ /** If defined, sets the maximum character length to accept for this input */
1001
1109
  maxlength?: number | undefined;
1002
- /** If provided, sets the minimum character length to accept for this input */
1110
+ /** If defined, sets the minimum character length to accept for this input */
1003
1111
  minlength?: number | undefined;
1004
- /** If provided, displays placeholder text */
1112
+ /** If defined, displays placeholder text */
1005
1113
  placeholder?: string | undefined;
1006
1114
  /** If true, makes the element not mutable, meaning the user can not edit the control */
1007
1115
  readonly?: boolean | undefined;
1008
- /** If provided, renders an alternative A11y text for the asterisk */
1116
+ /** If defined, renders an alternative A11y text for the asterisk */
1009
1117
  "required-label"?: string | undefined;
1010
- /** If provided, sets the rows of the textarea */
1011
- rows?: number;
1012
- /** If provided, displays provided severity state */
1013
- severity?: "success" | "error";
1118
+ /** If defined, sets the rows of the textarea */
1119
+ rows?: number | undefined;
1120
+ /** If defined, displays provided severity state */
1121
+ severity?: "success" | "info" | "warning" | "alert";
1014
1122
  /** If true, displays valid state after interaction */
1015
1123
  "show-valid"?: boolean | undefined;
1016
- /** If provided, displays an alternative size */
1124
+ /** Size of the Textarea */
1017
1125
  size?: "sm" | "md" | undefined;
1018
- /** If provided, sets validation start, "input", "change" or "submit" */
1019
- "validate-on"?: "input" | "change" | "submit" | undefined;
1126
+ /** Sets validation start */
1127
+ "validate-on"?: "input" | "change" | "submit";
1020
1128
  /** The current value of the text area */
1021
1129
  value?: string;
1022
1130
 
@@ -1030,14 +1138,14 @@ export type CustomElements = {
1030
1138
  /**
1031
1139
  * The `<skf-accordion>` component consists of multiple `<skf-collapse>`, working together.
1032
1140
  *
1033
- * See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6256cb1b44eba592d319d92e) for design principles.
1141
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
1034
1142
  * ---
1035
1143
  *
1036
1144
  *
1037
1145
  * ### **Slots:**
1038
1146
  * - _default_ - Expects one or more <skf-accordion-item> element(s)
1039
1147
  */
1040
- "skf-accordion": Partial<SkfAccordionProps | BaseProps | BaseEvents>;
1148
+ "skf-accordion": Partial<SkfAccordionProps & BaseProps & BaseEvents>;
1041
1149
 
1042
1150
  /**
1043
1151
  * The `<skf-alert>` is a type of notification that appears in-line
@@ -1049,9 +1157,9 @@ export type CustomElements = {
1049
1157
  *
1050
1158
  * ### **Slots:**
1051
1159
  * - _default_ - Alert message. **Notice!** See design principles for approved content
1052
- * - **link** - lodjvodjvodjo
1160
+ * - **link** - Slot for the link
1053
1161
  */
1054
- "skf-alert": Partial<SkfAlertProps | BaseProps | BaseEvents>;
1162
+ "skf-alert": Partial<SkfAlertProps & BaseProps & BaseEvents>;
1055
1163
 
1056
1164
  /**
1057
1165
  * Component to be used in forms or for interactivity
@@ -1061,7 +1169,7 @@ export type CustomElements = {
1061
1169
  * ### **Slots:**
1062
1170
  * - _default_ - The Primary content
1063
1171
  */
1064
- "skf-button": Partial<SkfButtonProps | BaseProps | BaseEvents>;
1172
+ "skf-button": Partial<SkfButtonProps & BaseProps & BaseEvents>;
1065
1173
 
1066
1174
  /**
1067
1175
  * The `<skf-card>` can be used to group related subjects in a container
@@ -1071,7 +1179,7 @@ export type CustomElements = {
1071
1179
  * ### **Slots:**
1072
1180
  * - _default_ - The card's main content
1073
1181
  */
1074
- "skf-card": Partial<SkfCardProps | BaseProps | BaseEvents>;
1182
+ "skf-card": Partial<SkfCardProps & BaseProps & BaseEvents>;
1075
1183
 
1076
1184
  /**
1077
1185
  * The `<skf-checkbox>` component is used to create a checkbox input
@@ -1082,14 +1190,14 @@ export type CustomElements = {
1082
1190
  * - **change** - {object} - When the value of the input changes
1083
1191
  *
1084
1192
  * ### **Slots:**
1085
- * - **Default** - Alternatively, you can use the `label` attribute
1193
+ * - _default_ - The Radios label. Alternatively, you can use the `label` attribute.
1086
1194
  */
1087
- "skf-checkbox": Partial<SkfCheckboxProps | BaseProps | BaseEvents>;
1195
+ "skf-checkbox": Partial<SkfCheckboxProps & BaseProps & BaseEvents>;
1088
1196
 
1089
1197
  /**
1090
1198
  * The `<skf-collapse>` component is a general purpose container for content that can be collapsed / expanded.
1091
1199
  *
1092
- * See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229e2eb8a8dacf366dc3243) for design principles.
1200
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/6590bf-accordion) for design principles.
1093
1201
  * ---
1094
1202
  *
1095
1203
  *
@@ -1103,10 +1211,10 @@ export type CustomElements = {
1103
1211
  * ### **Slots:**
1104
1212
  * - _default_ - Main content
1105
1213
  */
1106
- "skf-collapse": Partial<SkfCollapseProps | BaseProps | BaseEvents>;
1214
+ "skf-collapse": Partial<SkfCollapseProps & BaseProps & BaseEvents>;
1107
1215
 
1108
1216
  /**
1109
- * The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information.
1217
+ * The `<Divider>` component can separate items from each other, to visually emphasize their lack of a relationship between groups of information
1110
1218
  * ---
1111
1219
  *
1112
1220
  *
@@ -1114,22 +1222,25 @@ export type CustomElements = {
1114
1222
  * - **--skf-divider-spacing** - The amount of space the divider occupies. Pass valid CSS **margin-block** values when horizontal and **margin-inline** when vertical _(default: undefined)_
1115
1223
  * - **--skf-divider-inset** - The amount of space the divider should be indented. Pass valid CSS **margin-inline** values when horizontal and **margin-block** when vertical _(default: undefined)_
1116
1224
  */
1117
- "skf-divider": Partial<SkfDividerProps | BaseProps | BaseEvents>;
1225
+ "skf-divider": Partial<SkfDividerProps & BaseProps & BaseEvents>;
1118
1226
 
1119
1227
  /**
1120
1228
  * The `<Heading>` component is to deliniate content on a page. When using, take note not to skip heading levels.<br>
1121
1229
  * It extends the interface of native html `<h1>` to `<h4>` elements.
1122
1230
  * ---
1123
1231
  *
1232
+ *
1233
+ * ### **Slots:**
1234
+ * - _default_ - The headings content
1124
1235
  */
1125
- "skf-heading": Partial<SkfHeadingProps | BaseProps | BaseEvents>;
1236
+ "skf-heading": Partial<SkfHeadingProps & BaseProps & BaseEvents>;
1126
1237
 
1127
1238
  /**
1128
1239
  * The `<skf-icon>` component is used to clarify interface elements. When used, should always be paired with (possibly invisible) text
1129
1240
  * ---
1130
1241
  *
1131
1242
  */
1132
- "skf-icon": Partial<SkfIconProps | BaseProps | BaseEvents>;
1243
+ "skf-icon": Partial<SkfIconProps & BaseProps & BaseEvents>;
1133
1244
 
1134
1245
  /**
1135
1246
  * The skf-text-field is used to create a text input field. It can be used inside a form element or standalone.
@@ -1141,9 +1252,9 @@ export type CustomElements = {
1141
1252
  * - **invalid** - Fires when the input is invalid
1142
1253
  *
1143
1254
  * ### **Slots:**
1144
- * - **Default** - Alternatively, you can use the `label` attribute
1255
+ * - _default_ - The Inputs label. Alternatively, you can use the `label` attribute.
1145
1256
  */
1146
- "skf-input": Partial<SkfInputProps | BaseProps | BaseEvents>;
1257
+ "skf-input": Partial<SkfInputProps & BaseProps & BaseEvents>;
1147
1258
 
1148
1259
  /**
1149
1260
  * The `<skf-link>` can be used as either a regular link or a link styled semantic button
@@ -1153,14 +1264,14 @@ export type CustomElements = {
1153
1264
  * ### **Slots:**
1154
1265
  * - _default_ - The links' main content
1155
1266
  */
1156
- "skf-link": Partial<SkfLinkProps | BaseProps | BaseEvents>;
1267
+ "skf-link": Partial<SkfLinkProps & BaseProps & BaseEvents>;
1157
1268
 
1158
1269
  /**
1159
- * The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities.
1270
+ * The `<skf-loader>` component is a progress indicator that uses circular indicators for short, indeterminate activities
1160
1271
  * ---
1161
1272
  *
1162
1273
  */
1163
- "skf-loader": Partial<SkfLoaderProps | BaseProps | BaseEvents>;
1274
+ "skf-loader": Partial<SkfLoaderProps & BaseProps & BaseEvents>;
1164
1275
 
1165
1276
  /**
1166
1277
  * The `<skf-logo>` component is used to display the SKF logo.
@@ -1170,7 +1281,7 @@ export type CustomElements = {
1170
1281
  * ### **CSS Properties:**
1171
1282
  * - **--skf-logo-height** - The height of the logo _(default: undefined)_
1172
1283
  */
1173
- "skf-logo": Partial<SkfLogoProps | BaseProps | BaseEvents>;
1284
+ "skf-logo": Partial<SkfLogoProps & BaseProps & BaseEvents>;
1174
1285
 
1175
1286
  /**
1176
1287
  * The `<skf-radio>` component is used to create a radio input
@@ -1181,19 +1292,60 @@ export type CustomElements = {
1181
1292
  * - **change** - {object} - When the value of the input changes
1182
1293
  *
1183
1294
  * ### **Slots:**
1184
- * - **Default** - Alternatively, you can use the `label` attribute
1295
+ * - _default_ - The radios label. Alternatively, you can use the `label` attribute.
1185
1296
  */
1186
- "skf-radio": Partial<SkfRadioProps | BaseProps | BaseEvents>;
1297
+ "skf-radio": Partial<SkfRadioProps & BaseProps & BaseEvents>;
1187
1298
 
1188
1299
  /**
1189
- * The `<skf-switch>` is a component that displays a list of actions or options
1300
+ * The `<skf-select>` is a component that displays a list of actions or options. A click in the options list toggle the selected state of the option. Use it together with the ´skf-select-option` tag.
1301
+ * ---
1302
+ *
1303
+ *
1304
+ * ### **Events:**
1305
+ * - **change** - Fired when the selected option(s) changes
1306
+ * - **invalid** - Fired when the select is invalid
1307
+ * - **reset** - Fired when the form is reset
1308
+ * - **skf-select:dropdown** - {detail: {expanded: boolean}} Fired when the select dropdown is toggled
1309
+ * - **skf-select-option:select** - {detail: {value: string | null, option: SkfSelectOption}} Fired when the select dropdown is toggled
1310
+ *
1311
+ * ### **Slots:**
1312
+ * - _default_ - The select's placeholder content
1313
+ */
1314
+ "skf-select": Partial<SkfSelectProps & BaseProps & BaseEvents>;
1315
+
1316
+ /**
1317
+ * The `<skf-select-option>` is a component is used nested in a skf-select or skf-select-option-group.
1318
+ * ---
1319
+ *
1320
+ *
1321
+ * ### **Events:**
1322
+ * - **skf-select-option:select** - {detail: { value: string | null, option: SkfSelectOption }} Fires when the option is selected/deselected.
1323
+ *
1324
+ * ### **Slots:**
1325
+ * - _default_ - The option's text content
1326
+ * - **icon** - The option's slot for icon or custom meta information (svg).
1327
+ */
1328
+ "skf-select-option": Partial<SkfSelectOptionProps & BaseProps & BaseEvents>;
1329
+
1330
+ /**
1331
+ * The `<skf-select-option-group>` is a component that groups select-options
1190
1332
  * ---
1191
1333
  *
1192
1334
  *
1193
1335
  * ### **Slots:**
1194
1336
  * - _default_ - The component's placeholder content
1195
1337
  */
1196
- "skf-switch": Partial<SkfSwitchProps | BaseProps | BaseEvents>;
1338
+ "skf-select-option-group": Partial<SkfSelectOptionGroupProps & BaseProps & BaseEvents>;
1339
+
1340
+ /**
1341
+ * The `<skf-switch>` is a component that displays a list of actions or options
1342
+ * ---
1343
+ *
1344
+ *
1345
+ * ### **Slots:**
1346
+ * - _default_ - The Switchs label. Alternatively, you can use the `label` attribute.
1347
+ */
1348
+ "skf-switch": Partial<SkfSwitchProps & BaseProps & BaseEvents>;
1197
1349
 
1198
1350
  /**
1199
1351
  * The `<skf-tag>` is a component that displays a list of actions or options
@@ -1203,7 +1355,7 @@ export type CustomElements = {
1203
1355
  * ### **Slots:**
1204
1356
  * - _default_ - The component's placeholder content
1205
1357
  */
1206
- "skf-tag": Partial<SkfTagProps | BaseProps | BaseEvents>;
1358
+ "skf-tag": Partial<SkfTagProps & BaseProps & BaseEvents>;
1207
1359
 
1208
1360
  /**
1209
1361
  * The skf-textarea is used to create a textarea. Use it inside a form element or wherever you like.
@@ -1215,7 +1367,7 @@ export type CustomElements = {
1215
1367
  * - **invalid** - Fires when the input is invalid
1216
1368
  *
1217
1369
  * ### **Slots:**
1218
- * - **The** - textareas label. Alternatively, you can use the `label` attribute.
1370
+ * - _default_ - The textareas label. Alternatively, you can use the `label` attribute.
1219
1371
  */
1220
- "skf-textarea": Partial<SkfTextAreaProps | BaseProps | BaseEvents>;
1372
+ "skf-textarea": Partial<SkfTextAreaProps & BaseProps & BaseEvents>;
1221
1373
  };