@skf-design-system/ui-components 1.0.1-beta.0 → 1.0.1-beta.1

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 (67) hide show
  1. package/dist/components/accordion/accordion.component.js +3 -3
  2. package/dist/components/alert/alert.component.js +8 -8
  3. package/dist/components/button/button.component.d.ts +3 -3
  4. package/dist/components/button/button.component.js +59 -55
  5. package/dist/components/card/card.component.js +4 -4
  6. package/dist/components/checkbox/checkbox.component.d.ts +3 -1
  7. package/dist/components/checkbox/checkbox.component.js +69 -56
  8. package/dist/components/date-picker/datepicker.calendar.component.d.ts +72 -0
  9. package/dist/components/date-picker/datepicker.calendar.component.js +382 -0
  10. package/dist/components/date-picker/datepicker.calendar.styles.d.ts +1 -0
  11. package/dist/components/date-picker/datepicker.calendar.styles.js +192 -0
  12. package/dist/components/date-picker/datepicker.component.d.ts +74 -0
  13. package/dist/components/date-picker/datepicker.component.js +241 -0
  14. package/dist/components/date-picker/datepicker.d.ts +10 -0
  15. package/dist/components/date-picker/datepicker.helpers.d.ts +40 -0
  16. package/dist/components/date-picker/datepicker.helpers.js +69 -0
  17. package/dist/components/date-picker/datepicker.js +8 -0
  18. package/dist/components/date-picker/datepicker.styles.d.ts +1 -0
  19. package/dist/components/date-picker/datepicker.styles.js +99 -0
  20. package/dist/components/date-picker-input/datepicker-input.component.d.ts +107 -0
  21. package/dist/components/date-picker-input/datepicker-input.component.js +397 -0
  22. package/dist/components/date-picker-input/datepicker-input.d.ts +8 -0
  23. package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +4 -0
  24. package/dist/components/date-picker-input/datepicker-input.helpers.js +29 -0
  25. package/dist/components/date-picker-input/datepicker-input.js +6 -0
  26. package/dist/components/date-picker-input/datepicker-input.styles.d.ts +1 -0
  27. package/dist/components/date-picker-input/datepicker-input.styles.js +22 -0
  28. package/dist/components/dialog/dialog.component.js +19 -19
  29. package/dist/components/divider/divider.component.js +12 -12
  30. package/dist/components/heading/heading.component.js +13 -13
  31. package/dist/components/icon/icon.component.js +19 -19
  32. package/dist/components/input/input.component.d.ts +1 -0
  33. package/dist/components/input/input.component.js +87 -80
  34. package/dist/components/link/link.component.js +28 -28
  35. package/dist/components/loader/loader.component.js +19 -19
  36. package/dist/components/logo/logo.component.js +6 -6
  37. package/dist/components/popover/popover.component.js +12 -12
  38. package/dist/components/progress/progress.component.js +7 -7
  39. package/dist/components/radio/radio.component.js +4 -4
  40. package/dist/components/select-option-group/select-option-group.component.js +9 -9
  41. package/dist/components/stepper/stepper.component.js +9 -9
  42. package/dist/components/stepper/stepper.helpers.js +5 -5
  43. package/dist/components/stepper-item/stepper-item.component.js +23 -23
  44. package/dist/components/tab/tab.component.js +4 -4
  45. package/dist/components/tab-panel/tab-panel.component.js +12 -12
  46. package/dist/components/tag/tag.component.js +9 -9
  47. package/dist/components/textarea/textarea.component.js +3 -3
  48. package/dist/components/toast/toast.component.js +13 -13
  49. package/dist/components/toast-wrapper/toast-wrapper.component.js +10 -10
  50. package/dist/components/tooltip/tooltip.component.js +2 -2
  51. package/dist/custom-elements.json +941 -161
  52. package/dist/index.d.ts +2 -0
  53. package/dist/index.js +72 -66
  54. package/dist/internal/components/hint/hint.component.js +13 -13
  55. package/dist/internal/controllers/popover.controller.d.ts +2 -1
  56. package/dist/internal/controllers/popover.controller.js +2 -2
  57. package/dist/internal/helpers/dateFormatter.d.ts +2 -0
  58. package/dist/internal/helpers/utilityTypes.d.ts +22 -0
  59. package/dist/react/index.d.ts +1 -0
  60. package/dist/react/index.js +1 -0
  61. package/dist/react/skf-datepicker/index.d.ts +12 -0
  62. package/dist/react/skf-datepicker/index.js +18 -0
  63. package/dist/types/jsx/custom-element-jsx.d.ts +45 -3
  64. package/dist/types/vue/index.d.ts +44 -1
  65. package/dist/vscode.html-custom-data.json +39 -1
  66. package/dist/web-types.json +107 -10
  67. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export { default as SkfButton } from './components/button/button.js';
4
4
  export { default as SkfCard } from './components/card/card.js';
5
5
  export { default as SkfCheckbox } from './components/checkbox/checkbox.js';
6
6
  export { default as SkfCollapse } from './components/collapse/collapse.js';
7
+ export { default as SkfDatePickerInput } from './components/date-picker-input/datepicker-input.js';
8
+ export { default as SkfDatePicker } from './components/date-picker/datepicker.js';
7
9
  export { default as SkfDialog } from './components/dialog/dialog.js';
8
10
  export { default as SkfDivider } from './components/divider/divider.js';
9
11
  export { default as SkfHeading } from './components/heading/heading.js';
package/dist/index.js CHANGED
@@ -4,6 +4,8 @@ import "./components/button/button.js";
4
4
  import "./components/card/card.js";
5
5
  import "./components/checkbox/checkbox.js";
6
6
  import "./components/collapse/collapse.js";
7
+ import "./components/date-picker-input/datepicker-input.js";
8
+ import "./components/date-picker/datepicker.js";
7
9
  import "./components/dialog/dialog.js";
8
10
  import "./components/divider/divider.js";
9
11
  import "./components/heading/heading.js";
@@ -30,71 +32,75 @@ import "./components/tag/tag.js";
30
32
  import "./components/textarea/textarea.js";
31
33
  import "./components/toast/toast.js";
32
34
  import "./components/tooltip/tooltip.js";
33
- import { SkfAccordion as H } from "./components/accordion/accordion.component.js";
34
- import { SkfAlert as j } from "./components/alert/alert.component.js";
35
- import { SkfButton as y } from "./components/button/button.component.js";
36
- import { SkfCard as E } from "./components/card/card.component.js";
37
- import { SkfCheckbox as J } from "./components/checkbox/checkbox.component.js";
38
- import { SkfCollapse as N } from "./components/collapse/collapse.component.js";
39
- import { SkfDialog as U } from "./components/dialog/dialog.component.js";
40
- import { SkfDivider as W } from "./components/divider/divider.component.js";
41
- import { SkfHeading as Y } from "./components/heading/heading.component.js";
42
- import { SkfIcon as _ } from "./components/icon/icon.component.js";
43
- import { SkfInput as oo } from "./components/input/input.component.js";
44
- import { SkfLink as to } from "./components/link/link.component.js";
45
- import { SkfLoader as fo } from "./components/loader/loader.component.js";
46
- import { SkfLogo as eo } from "./components/logo/logo.component.js";
47
- import { SkfMenuItem as So } from "./components/menu-item/menu-item.component.js";
48
- import { SkfMenu as xo } from "./components/menu/menu.component.js";
49
- import { SkfPopover as no } from "./components/popover/popover.component.js";
50
- import { SkfProgress as lo } from "./components/progress/progress.component.js";
51
- import { SkfRadio as To } from "./components/radio/radio.component.js";
52
- import { SkfSelectOptionGroup as bo } from "./components/select-option-group/select-option-group.component.js";
53
- import { SkfSelectOption as Io } from "./components/select-option/select-option.component.js";
54
- import { SkfSelect as Go } from "./components/select/select.component.js";
55
- import { SkfStepperItem as Co } from "./components/stepper-item/stepper-item.component.js";
56
- import { SkfStepper as Po } from "./components/stepper/stepper.component.js";
57
- import { SkfSwitch as vo } from "./components/switch/switch.component.js";
58
- import { SkfTabGroup as Mo } from "./components/tab-group/tab-group.component.js";
59
- import { SkfTabPanel as Bo } from "./components/tab-panel/tab-panel.component.js";
60
- import { SkfTab as Ro } from "./components/tab/tab.component.js";
61
- import { SkfTag as qo } from "./components/tag/tag.component.js";
62
- import { SkfTextArea as zo } from "./components/textarea/textarea.component.js";
63
- import { SkfToast as Fo } from "./components/toast/toast.component.js";
64
- import { SkfTooltip as Ko } from "./components/tooltip/tooltip.component.js";
65
- import { SkfAccordionItem as Qo } from "./components/accordion/accordion-item.js";
35
+ import { SkfAccordion as j } from "./components/accordion/accordion.component.js";
36
+ import { SkfAlert as y } from "./components/alert/alert.component.js";
37
+ import { SkfButton as E } from "./components/button/button.component.js";
38
+ import { SkfCard as J } from "./components/card/card.component.js";
39
+ import { SkfCheckbox as N } from "./components/checkbox/checkbox.component.js";
40
+ import { SkfCollapse as U } from "./components/collapse/collapse.component.js";
41
+ import { SkfDatePickerInput as W } from "./components/date-picker-input/datepicker-input.component.js";
42
+ import { SkfDatePicker as Y } from "./components/date-picker/datepicker.component.js";
43
+ import { SkfDialog as _ } from "./components/dialog/dialog.component.js";
44
+ import { SkfDivider as oo } from "./components/divider/divider.component.js";
45
+ import { SkfHeading as to } from "./components/heading/heading.component.js";
46
+ import { SkfIcon as fo } from "./components/icon/icon.component.js";
47
+ import { SkfInput as eo } from "./components/input/input.component.js";
48
+ import { SkfLink as So } from "./components/link/link.component.js";
49
+ import { SkfLoader as xo } from "./components/loader/loader.component.js";
50
+ import { SkfLogo as no } from "./components/logo/logo.component.js";
51
+ import { SkfMenuItem as lo } from "./components/menu-item/menu-item.component.js";
52
+ import { SkfMenu as To } from "./components/menu/menu.component.js";
53
+ import { SkfPopover as Io } from "./components/popover/popover.component.js";
54
+ import { SkfProgress as go } from "./components/progress/progress.component.js";
55
+ import { SkfRadio as Ao } from "./components/radio/radio.component.js";
56
+ import { SkfSelectOptionGroup as Go } from "./components/select-option-group/select-option-group.component.js";
57
+ import { SkfSelectOption as Co } from "./components/select-option/select-option.component.js";
58
+ import { SkfSelect as ho } from "./components/select/select.component.js";
59
+ import { SkfStepperItem as Mo } from "./components/stepper-item/stepper-item.component.js";
60
+ import { SkfStepper as Bo } from "./components/stepper/stepper.component.js";
61
+ import { SkfSwitch as Ro } from "./components/switch/switch.component.js";
62
+ import { SkfTabGroup as qo } from "./components/tab-group/tab-group.component.js";
63
+ import { SkfTabPanel as zo } from "./components/tab-panel/tab-panel.component.js";
64
+ import { SkfTab as Fo } from "./components/tab/tab.component.js";
65
+ import { SkfTag as Ko } from "./components/tag/tag.component.js";
66
+ import { SkfTextArea as Qo } from "./components/textarea/textarea.component.js";
67
+ import { SkfToast as Vo } from "./components/toast/toast.component.js";
68
+ import { SkfTooltip as Xo } from "./components/tooltip/tooltip.component.js";
69
+ import { SkfAccordionItem as Zo } from "./components/accordion/accordion-item.js";
66
70
  export {
67
- H as SkfAccordion,
68
- Qo as SkfAccordionItem,
69
- j as SkfAlert,
70
- y as SkfButton,
71
- E as SkfCard,
72
- J as SkfCheckbox,
73
- N as SkfCollapse,
74
- U as SkfDialog,
75
- W as SkfDivider,
76
- Y as SkfHeading,
77
- _ as SkfIcon,
78
- oo as SkfInput,
79
- to as SkfLink,
80
- fo as SkfLoader,
81
- eo as SkfLogo,
82
- xo as SkfMenu,
83
- So as SkfMenuItem,
84
- Io as SkfOption,
85
- bo as SkfOptionGroup,
86
- no as SkfPopover,
87
- lo as SkfProgress,
88
- To as SkfRadio,
89
- Go as SkfSelect,
90
- Po as SkfStepper,
91
- Co as SkfStepperItem,
92
- vo as SkfSwitch,
93
- Ro as SkfTab,
94
- Mo as SkfTabGoup,
95
- Bo as SkfTabPanel,
96
- qo as SkfTag,
97
- zo as SkfTextArea,
98
- Fo as SkfToast,
99
- Ko as SkfTooltip
71
+ j as SkfAccordion,
72
+ Zo as SkfAccordionItem,
73
+ y as SkfAlert,
74
+ E as SkfButton,
75
+ J as SkfCard,
76
+ N as SkfCheckbox,
77
+ U as SkfCollapse,
78
+ Y as SkfDatePicker,
79
+ W as SkfDatePickerInput,
80
+ _ as SkfDialog,
81
+ oo as SkfDivider,
82
+ to as SkfHeading,
83
+ fo as SkfIcon,
84
+ eo as SkfInput,
85
+ So as SkfLink,
86
+ xo as SkfLoader,
87
+ no as SkfLogo,
88
+ To as SkfMenu,
89
+ lo as SkfMenuItem,
90
+ Co as SkfOption,
91
+ Go as SkfOptionGroup,
92
+ Io as SkfPopover,
93
+ go as SkfProgress,
94
+ Ao as SkfRadio,
95
+ ho as SkfSelect,
96
+ Bo as SkfStepper,
97
+ Mo as SkfStepperItem,
98
+ Ro as SkfSwitch,
99
+ Fo as SkfTab,
100
+ qo as SkfTabGoup,
101
+ zo as SkfTabPanel,
102
+ Ko as SkfTag,
103
+ Qo as SkfTextArea,
104
+ Vo as SkfToast,
105
+ Xo as SkfTooltip
100
106
  };
@@ -1,21 +1,21 @@
1
1
  import "../../../components/icon/icon.js";
2
- import { SkfElement as n } from "../skf-element.js";
3
- import { ICON_SEVERITY as l } from "../../constants/iconSeverity.js";
2
+ import { SkfElement as l } from "../skf-element.js";
3
+ import { ICON_SEVERITY as n } from "../../constants/iconSeverity.js";
4
4
  import v from "../../../styles/component.styles.js";
5
5
  import { html as f } from "lit";
6
- import { property as d } from "lit/decorators.js";
7
- import y from "./hint.styles.js";
6
+ import { property as y } from "lit/decorators.js";
7
+ import d from "./hint.styles.js";
8
8
  var a = Object.defineProperty, c = (s, i, m, h) => {
9
- for (var r = void 0, e = s.length - 1, p; e >= 0; e--)
10
- (p = s[e]) && (r = p(i, m, r) || r);
9
+ for (var r = void 0, t = s.length - 1, p; t >= 0; t--)
10
+ (p = s[t]) && (r = p(i, m, r) || r);
11
11
  return r && a(i, m, r), r;
12
12
  };
13
- const o = class o extends n {
13
+ const o = class o extends l {
14
14
  render() {
15
15
  return f`
16
16
  <div id="root">
17
17
  ${this.severity && f`
18
- <skf-icon color=${this.severity} name="${l[this.severity]}" size="xs">
18
+ <skf-icon color=${this.severity} name="${n[this.severity]}" size="xs">
19
19
  </skf-icon>
20
20
  `}
21
21
  <slot></slot>
@@ -23,11 +23,11 @@ const o = class o extends n {
23
23
  `;
24
24
  }
25
25
  };
26
- o.styles = [v, y];
27
- let t = o;
26
+ o.styles = [v, d];
27
+ let e = o;
28
28
  c([
29
- d()
30
- ], t.prototype, "severity");
29
+ y()
30
+ ], e.prototype, "severity");
31
31
  export {
32
- t as SkfHint
32
+ e as SkfHint
33
33
  };
@@ -1,7 +1,8 @@
1
+ import type { SkfDatePickerInput } from '../../components/date-picker-input/datepicker-input.component.js';
1
2
  import { SkfSelect } from '../../components/select/select.component.js';
2
3
  import type { SkfPopoverBase } from '../base-classes/popover/popover.base.js';
3
4
  import type { ReactiveController } from 'lit';
4
- type ControllerHost = SkfPopoverBase | SkfSelect;
5
+ type ControllerHost = SkfPopoverBase | SkfSelect | SkfDatePickerInput;
5
6
  export declare class PopoverController implements ReactiveController {
6
7
  host?: ControllerHost;
7
8
  private cleanup;
@@ -18,8 +18,8 @@ class p {
18
18
  });
19
19
  }
20
20
  start() {
21
- var e, r;
22
- const t = (e = this.host) == null ? void 0 : e.$anchor, o = (r = this.host) == null ? void 0 : r.$popover;
21
+ var r, e;
22
+ const t = (r = this.host) == null ? void 0 : r.$anchor, o = (e = this.host) == null ? void 0 : e.$popover;
23
23
  if (!t || !o) {
24
24
  console.warn("PopoverController: anchor or popup not found");
25
25
  return;
@@ -0,0 +1,2 @@
1
+ /** Formats a date to SKF standard format. Can be localized, defaults to GB English */
2
+ export declare function dateFormatter(date?: Date | null, locale?: string): string;
@@ -0,0 +1,22 @@
1
+ export type Mutable<T> = {
2
+ -readonly [K in keyof T]: T[K];
3
+ };
4
+ type oneToNine = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
5
+ type zeroToNine = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
6
+ /**
7
+ * Years
8
+ */
9
+ type YYYY = `19${zeroToNine}${zeroToNine}` | `20${zeroToNine}${zeroToNine}`;
10
+ /**
11
+ * Months
12
+ */
13
+ type MM = `0${oneToNine}` | `1${0 | 1 | 2}`;
14
+ /**
15
+ * Days
16
+ */
17
+ type DD = `${0}${oneToNine}` | `${1 | 2}${zeroToNine}` | `3${0 | 1}`;
18
+ /**
19
+ * YYYY-MM-DD
20
+ */
21
+ export type ISODateString = `${YYYY}-${MM}-${DD}`;
22
+ export {};
@@ -6,6 +6,7 @@ export { default as SkfButton } from './skf-button/index.js';
6
6
  export { default as SkfCard } from './skf-card/index.js';
7
7
  export { default as SkfCheckbox } from './skf-checkbox/index.js';
8
8
  export { default as SkfCollapse } from './skf-collapse/index.js';
9
+ export { default as SkfDatePicker } from './skf-datepicker/index.js';
9
10
  export { default as SkfDialog } from './skf-dialog/index.js';
10
11
  export { default as SkfDivider } from './skf-divider/index.js';
11
12
  export { default as SkfHeading } from './skf-heading/index.js';
@@ -6,6 +6,7 @@ export { default as SkfButton } from './skf-button/index.js';
6
6
  export { default as SkfCard } from './skf-card/index.js';
7
7
  export { default as SkfCheckbox } from './skf-checkbox/index.js';
8
8
  export { default as SkfCollapse } from './skf-collapse/index.js';
9
+ export { default as SkfDatePicker } from './skf-datepicker/index.js';
9
10
  export { default as SkfDialog } from './skf-dialog/index.js';
10
11
  export { default as SkfDivider } from './skf-divider/index.js';
11
12
  export { default as SkfHeading } from './skf-heading/index.js';
@@ -0,0 +1,12 @@
1
+ import Component from '../../components/date-picker/datepicker.js';
2
+ import { type SkfDatePicker } from '../../components/date-picker/datepicker.js';
3
+ import { type EventName } from '@lit/react';
4
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
5
+ onSelectedDateChanged: EventName<Event & {
6
+ target: SkfDatePicker;
7
+ }>;
8
+ onSelectedDateRangeChanged: EventName<Event & {
9
+ target: SkfDatePicker;
10
+ }>;
11
+ }>;
12
+ export default reactWrapper;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/date-picker/datepicker.js';
4
+ import {} from '../../components/date-picker/datepicker.js';
5
+ import {} from '@lit/react';
6
+ const tagName = 'skf-datepicker';
7
+ Component.define('skf-datepicker');
8
+ const reactWrapper = createComponent({
9
+ tagName,
10
+ elementClass: Component,
11
+ react: React,
12
+ events: {
13
+ onSelectedDateChanged: 'selected-date-changed',
14
+ onSelectedDateRangeChanged: 'selected-date-range-changed',
15
+ },
16
+ displayName: 'SkfDatePicker',
17
+ });
18
+ export default reactWrapper;
@@ -266,8 +266,8 @@ export type SkfButtonProps = {
266
266
  | "zoomOut";
267
267
  /** If true, removes border */
268
268
  iconOnly?: boolean;
269
- /** If provided, determines the positioning of the icon in relation to the text */
270
- "icon-position"?: "left" | "right" | undefined;
269
+ /** Determines the positioning of the icon in relation to the text */
270
+ "icon-position"?: "left" | "right";
271
271
  /** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `variant` is `primary`. */
272
272
  loading?: boolean;
273
273
  /** */
@@ -300,7 +300,7 @@ export type SkfCheckboxProps = {
300
300
  /** If defined, outputs helping hints in console */
301
301
  debug?: boolean | undefined;
302
302
  /** If true, outputs helping hints in console */
303
- checked?: boolean | undefined;
303
+ checked?: string;
304
304
  /** If true, forces component to invalid state until removed */
305
305
  "custom-invalid"?: boolean | undefined;
306
306
  /** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
@@ -342,6 +342,31 @@ export type SkfCollapseProps = {
342
342
  "onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
343
343
  };
344
344
 
345
+ export type SkfDatePickerProps = {
346
+ /** The locale to use for formatting the date */
347
+ locale?: string;
348
+ /** The date to display in the date picker */
349
+ date?: string;
350
+ /** */
351
+ id?: string;
352
+ /** A comma-separated list of dates (yyyy-mm-dd format) that are not selectable. */
353
+ "invalid-dates"?: string | undefined;
354
+ /** If true, the date picker will allow the selection of a range of dates */
355
+ range?: boolean;
356
+ /** Earliest selectable date. (yyyy-mm-dd format) */
357
+ "selectable-from"?: string | undefined;
358
+ /** Latest selectable date. (yyyy-mm-dd format) */
359
+ "selectable-to"?: string | undefined;
360
+ /** */
361
+ selectedDate?: Date | undefined;
362
+ /** */
363
+ selectedDateRange?: SkfDatePickerDateRange;
364
+ /** When a date is selected */
365
+ "onselected-date-changed"?: (e: CustomEvent<never>) => void;
366
+ /** When a range of dates is selected */
367
+ "onselected-date-range-changed"?: (e: CustomEvent<never>) => void;
368
+ };
369
+
345
370
  export type SkfDialogProps = {
346
371
  /** If defined, sets the aria-label for the close button */
347
372
  "close-button-aria-label"?: string | undefined;
@@ -1655,6 +1680,23 @@ export type CustomElements = {
1655
1680
  */
1656
1681
  "skf-collapse": Partial<SkfCollapseProps & BaseProps & BaseEvents>;
1657
1682
 
1683
+ /**
1684
+ * A date picker component that allows users to select a date or a range of dates.
1685
+ * ---
1686
+ *
1687
+ *
1688
+ * ### **Events:**
1689
+ * - **selected-date-changed** - When a date is selected
1690
+ * - **selected-date-range-changed** - When a range of dates is selected
1691
+ *
1692
+ * ### **Slots:**
1693
+ * - _default_ - Default hint content placed inside the date picker
1694
+ *
1695
+ * ### **CSS Properties:**
1696
+ * - **--max-width** - The maximum width of the date picker _(default: undefined)_
1697
+ */
1698
+ "skf-datepicker": Partial<SkfDatePickerProps & BaseProps & BaseEvents>;
1699
+
1658
1700
  /**
1659
1701
  * The `<skf-dialog>` is a component that open up a dialog with the content provided
1660
1702
  * ---
@@ -8,6 +8,7 @@ import type { SkfButton } from "../../components/button/button.component.js";
8
8
  import type { SkfCard } from "../../components/card/card.component.js";
9
9
  import type { SkfCheckbox } from "../../components/checkbox/checkbox.component.js";
10
10
  import type { SkfCollapse, CustomEvent } from "../../components/collapse/collapse.component.js";
11
+ import type { SkfDatePicker } from "../../components/datepicker/datepicker.component.js";
11
12
  import type { SkfDialog } from "../../components/dialog/dialog.component.js";
12
13
  import type { SkfDivider } from "../../components/divider/divider.component.js";
13
14
  import type { SkfHeading } from "../../components/heading/heading.component.js";
@@ -91,7 +92,7 @@ type SkfButtonProps = {
91
92
  icon?: SkfButton["icon"];
92
93
  /** If true, removes border */
93
94
  iconOnly?: SkfButton["iconOnly"];
94
- /** If provided, determines the positioning of the icon in relation to the text */
95
+ /** Determines the positioning of the icon in relation to the text */
95
96
  "icon-position"?: SkfButton["iconPosition"];
96
97
  /** If true, hides text & icon and shows loading indicator. **Notice!** Only applicable if `variant` is `primary`. */
97
98
  loading?: SkfButton["loading"];
@@ -167,6 +168,31 @@ type SkfCollapseProps = {
167
168
  "onskf-collapse-toggle"?: (e: CustomEvent<CustomEvent>) => void;
168
169
  };
169
170
 
171
+ type SkfDatePickerProps = {
172
+ /** The locale to use for formatting the date */
173
+ locale?: SkfDatePicker["locale"];
174
+ /** The date to display in the date picker */
175
+ date?: SkfDatePicker["date"];
176
+ /** */
177
+ id?: SkfDatePicker["id"];
178
+ /** A comma-separated list of dates (yyyy-mm-dd format) that are not selectable. */
179
+ "invalid-dates"?: SkfDatePicker["invalidDates"];
180
+ /** If true, the date picker will allow the selection of a range of dates */
181
+ range?: SkfDatePicker["range"];
182
+ /** Earliest selectable date. (yyyy-mm-dd format) */
183
+ "selectable-from"?: SkfDatePicker["selectableFrom"];
184
+ /** Latest selectable date. (yyyy-mm-dd format) */
185
+ "selectable-to"?: SkfDatePicker["selectableTo"];
186
+ /** */
187
+ selectedDate?: SkfDatePicker["selectedDate"];
188
+ /** */
189
+ selectedDateRange?: SkfDatePicker["selectedDateRange"];
190
+ /** When a date is selected */
191
+ "onselected-date-changed"?: (e: CustomEvent<never>) => void;
192
+ /** When a range of dates is selected */
193
+ "onselected-date-range-changed"?: (e: CustomEvent<never>) => void;
194
+ };
195
+
170
196
  type SkfDialogProps = {
171
197
  /** If defined, sets the aria-label for the close button */
172
198
  "close-button-aria-label"?: SkfDialog["closeButtonAriaLabel"];
@@ -820,6 +846,23 @@ export type CustomElements = {
820
846
  */
821
847
  "skf-collapse": DefineComponent<SkfCollapseProps>;
822
848
 
849
+ /**
850
+ * A date picker component that allows users to select a date or a range of dates.
851
+ * ---
852
+ *
853
+ *
854
+ * ### **Events:**
855
+ * - **selected-date-changed** - When a date is selected
856
+ * - **selected-date-range-changed** - When a range of dates is selected
857
+ *
858
+ * ### **Slots:**
859
+ * - _default_ - Default hint content placed inside the date picker
860
+ *
861
+ * ### **CSS Properties:**
862
+ * - **--max-width** - The maximum width of the date picker _(default: undefined)_
863
+ */
864
+ "skf-datepicker": DefineComponent<SkfDatePickerProps>;
865
+
823
866
  /**
824
867
  * The `<skf-dialog>` is a component that open up a dialog with the content provided
825
868
  * ---
@@ -284,7 +284,7 @@
284
284
  },
285
285
  {
286
286
  "name": "icon-position",
287
- "description": "If provided, determines the positioning of the icon in relation to the text",
287
+ "description": "Determines the positioning of the icon in relation to the text",
288
288
  "values": [{ "name": "left" }, { "name": "right" }]
289
289
  },
290
290
  {
@@ -455,6 +455,44 @@
455
455
  ],
456
456
  "references": []
457
457
  },
458
+ {
459
+ "name": "skf-datepicker",
460
+ "description": "A date picker component that allows users to select a date or a range of dates.\n---\n\n\n### **Events:**\n - **selected-date-changed** - When a date is selected\n- **selected-date-range-changed** - When a range of dates is selected\n\n### **Slots:**\n - _default_ - Default hint content placed inside the date picker\n\n### **CSS Properties:**\n - **--max-width** - The maximum width of the date picker _(default: undefined)_",
461
+ "attributes": [
462
+ {
463
+ "name": "locale",
464
+ "description": "The locale to use for formatting the date",
465
+ "values": []
466
+ },
467
+ {
468
+ "name": "date",
469
+ "description": "The date to display in the date picker",
470
+ "values": []
471
+ },
472
+ { "name": "id", "values": [] },
473
+ {
474
+ "name": "invalid-dates",
475
+ "description": "A comma-separated list of dates (yyyy-mm-dd format) that are not selectable.",
476
+ "values": []
477
+ },
478
+ {
479
+ "name": "range",
480
+ "description": "If true, the date picker will allow the selection of a range of dates",
481
+ "values": []
482
+ },
483
+ {
484
+ "name": "selectable-from",
485
+ "description": "Earliest selectable date. (yyyy-mm-dd format)",
486
+ "values": []
487
+ },
488
+ {
489
+ "name": "selectable-to",
490
+ "description": "Latest selectable date. (yyyy-mm-dd format)",
491
+ "values": []
492
+ }
493
+ ],
494
+ "references": []
495
+ },
458
496
  {
459
497
  "name": "skf-dialog",
460
498
  "description": "The `<skf-dialog>` is a component that open up a dialog with the content provided\n---\n\n\n### **Events:**\n - **skf-dialog-open** - Fires when the dialog is opened (after transitioned in)\n- **skf-dialog-close** - Fires when the dialog is closed (before transitioned out)\n- **close** - Fires when the dialog is closed (after transitioned out)\n\n### **Slots:**\n - _default_ - The dialog component's content\n- **footer** - The dialog component's buttons goes here\n\n### **CSS Properties:**\n - **--skf-dialog-height** - A custom height for the Dialog. Pass valid CSS **block-size** values _(default: undefined)_\n- **--skf-dialog-width** - A custom width for the Dialog Pass valid CSS **inline-size** values _(default: undefined)_",