@vialiq/web-components 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +250 -0
  2. package/base/controllers/floating-controller.d.ts +2 -2
  3. package/base/controllers/floating-controller.d.ts.map +1 -1
  4. package/base/flatpickr-mixin.d.ts +38 -0
  5. package/base/flatpickr-mixin.d.ts.map +1 -0
  6. package/base/validity-mixin.d.ts +2 -0
  7. package/base/validity-mixin.d.ts.map +1 -1
  8. package/button/vi-button.d.ts +2 -0
  9. package/button/vi-button.d.ts.map +1 -1
  10. package/button/vi-button.js +40 -11
  11. package/date-picker/i18n.d.ts +19 -0
  12. package/date-picker/i18n.d.ts.map +1 -0
  13. package/date-picker/index.d.ts +4 -0
  14. package/date-picker/index.d.ts.map +1 -0
  15. package/date-picker/index.js +2 -0
  16. package/date-picker/iso-week.d.ts +18 -0
  17. package/date-picker/iso-week.d.ts.map +1 -0
  18. package/date-picker/locale-registry.d.ts +8 -0
  19. package/date-picker/locale-registry.d.ts.map +1 -0
  20. package/date-picker/plugin-registry.d.ts +7 -0
  21. package/date-picker/plugin-registry.d.ts.map +1 -0
  22. package/date-picker/plugin-utils.d.ts +10 -0
  23. package/date-picker/plugin-utils.d.ts.map +1 -0
  24. package/date-picker/plugins/vi-month-year-plugin.d.ts +17 -0
  25. package/date-picker/plugins/vi-month-year-plugin.d.ts.map +1 -0
  26. package/date-picker/plugins/vi-range-plugin.d.ts +12 -0
  27. package/date-picker/plugins/vi-range-plugin.d.ts.map +1 -0
  28. package/date-picker/plugins/vi-shadow-dom-plugin.d.ts +18 -0
  29. package/date-picker/plugins/vi-shadow-dom-plugin.d.ts.map +1 -0
  30. package/date-picker/types.d.ts +34 -0
  31. package/date-picker/types.d.ts.map +1 -0
  32. package/date-picker/vi-date-picker-input.d.ts +34 -0
  33. package/date-picker/vi-date-picker-input.d.ts.map +1 -0
  34. package/date-picker/vi-date-picker-input.js +599 -0
  35. package/date-picker/vi-date-picker.d.ts +95 -0
  36. package/date-picker/vi-date-picker.d.ts.map +1 -0
  37. package/date-picker/vi-date-picker.js +2273 -0
  38. package/index.d.ts +8 -0
  39. package/index.js +7 -0
  40. package/keyboard-controller-D3htDhGR.js +322 -0
  41. package/package.json +23 -4
@@ -0,0 +1,18 @@
1
+ import { Instance } from 'flatpickr/dist/types/instance';
2
+ /**
3
+ * A Carbon Web Components inspired plugin that fixes Flatpickr's native
4
+ * event targeting issues when used within a Web Component (Shadow DOM).
5
+ *
6
+ * Flatpickr relies on native `Node.contains()` for its `documentClick` listener
7
+ * to determine if a click occurred outside the calendar. Because Shadow DOM
8
+ * boundaries are not pierced by `Node.contains()`, clicks on custom elements
9
+ * (like `<vi-select>`) inside the calendar are falsely identified as outside
10
+ * clicks, causing the calendar to close unexpectedly.
11
+ *
12
+ * This plugin overrides `fp.calendarContainer.contains` to properly traverse
13
+ * up through Shadow Roots.
14
+ */
15
+ export declare function ViShadowDomPlugin(): (fp: Instance) => {
16
+ onReady: () => void;
17
+ };
18
+ //# sourceMappingURL=vi-shadow-dom-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-shadow-dom-plugin.d.ts","sourceRoot":"","sources":["../../../../../libs/web-components/src/date-picker/plugins/vi-shadow-dom-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,KACd,IAAI,QAAQ;;EAyB9B"}
@@ -0,0 +1,34 @@
1
+ import { Plugin } from 'flatpickr/dist/types/options';
2
+ import { CustomLocale, key as LocaleKey, Locale } from 'flatpickr/dist/types/locale';
3
+ export type DatePickerMode = 'date' | 'month' | 'month-year' | 'range' | 'week';
4
+ export interface DateComponents {
5
+ day: number;
6
+ month: number;
7
+ year: number;
8
+ }
9
+ export type SegmentOrder = 'DMY' | 'MDY' | 'YMD';
10
+ export interface DatePickerChangeDetail {
11
+ value: string | null;
12
+ type: DatePickerMode;
13
+ isoValue: string | null;
14
+ utcIso: string | null;
15
+ formattedValue: string;
16
+ rawValue: DateComponents | null;
17
+ rawEndValue?: DateComponents | null;
18
+ weekNumber: number | null;
19
+ locale: string;
20
+ timeZone: string;
21
+ }
22
+ export interface ViDatePickerPlugin {
23
+ id: string;
24
+ label: string;
25
+ factory: Plugin;
26
+ defaultConfig?: Record<string, unknown>;
27
+ }
28
+ /** Shape of a flatpickr dist/l10n/*.js module's default export */
29
+ export type L10nModule = Partial<Record<LocaleKey, CustomLocale>> & {
30
+ default: Locale;
31
+ };
32
+ export type DatePickerPluginInput = Plugin | ViDatePickerPlugin;
33
+ export type ControlStatus = 'default' | 'valid' | 'invalid';
34
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/date-picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAE1F,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACpC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,kEAAkE;AAClE,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,kBAAkB,CAAC;AAEhE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { ViElement } from '../base/vi-element.js';
2
+ export declare class ViDatePickerInput extends ViElement {
3
+ accessor kind: 'from' | 'to' | 'single';
4
+ accessor label: string;
5
+ accessor placeholder: string;
6
+ accessor disabled: boolean;
7
+ accessor required: boolean;
8
+ accessor invalid: boolean;
9
+ accessor validityMessage: string;
10
+ accessor expanded: boolean;
11
+ accessor value: string;
12
+ private accessor _triggerBtn;
13
+ static shadowRootOptions: {
14
+ delegatesFocus: boolean;
15
+ clonable?: boolean;
16
+ customElementRegistry?: CustomElementRegistry;
17
+ mode: ShadowRootMode;
18
+ serializable?: boolean;
19
+ slotAssignment?: SlotAssignmentMode;
20
+ };
21
+ /**
22
+ * Returns the interactable element for Flatpickr to bind to.
23
+ */
24
+ get inputElement(): HTMLElement;
25
+ focus(options?: FocusOptions): void;
26
+ render(): import('lit-html').TemplateResult<1>;
27
+ static styles: import('lit').CSSResult;
28
+ }
29
+ declare global {
30
+ interface HTMLElementTagNameMap {
31
+ 'vi-date-picker-input': ViDatePickerInput;
32
+ }
33
+ }
34
+ //# sourceMappingURL=vi-date-picker-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-date-picker-input.d.ts","sourceRoot":"","sources":["../../../../libs/web-components/src/date-picker/vi-date-picker-input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,qBACa,iBAAkB,SAAQ,SAAS;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAY;IAClE,QAAQ,CAAC,KAAK,SAAM;IACpB,QAAQ,CAAC,WAAW,EAAG,MAAM,CAAC;IACd,QAAQ,CAAC,QAAQ,UAAS;IAC1B,QAAQ,CAAC,QAAQ,UAAS;IAC1B,QAAQ,CAAC,OAAO,UAAS;IACzC,QAAQ,CAAC,eAAe,SAAM;IAC7B,QAAQ,CAAC,QAAQ,UAAS;IAG3B,QAAQ,CAAC,KAAK,SAAM;IAE7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IAEpE,OAAgB,iBAAiB;;;;;;;MAG/B;IAEF;;OAEG;IACH,IAAI,YAAY,IAAI,WAAW,CAE9B;IAEQ,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAQ5B,MAAM;IAuCf,OAAgB,MAAM,0BAEpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,iBAAiB,CAAC;KAC3C;CACF"}