@nexxtmove/ui 1.0.5 → 1.0.7

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.
package/dist/index.d.ts CHANGED
@@ -66,21 +66,27 @@ declare const __VLS_component_16: DefineComponent<NexxtStepperHeaderProps, {}, {
66
66
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
67
67
 
68
68
  declare const __VLS_component_17: DefineComponent<__VLS_PublicProps_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
69
- "update:modelValue": (value: string) => any;
69
+ "update:modelValue": (value: boolean) => any;
70
70
  }, string, PublicProps, Readonly<__VLS_PublicProps_9> & Readonly<{
71
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
72
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
73
+
74
+ declare const __VLS_component_18: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
75
+ "update:modelValue": (value: string) => any;
76
+ }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
71
77
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
72
78
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
73
79
 
74
- declare const __VLS_component_18: DefineComponent<NexxtToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
80
+ declare const __VLS_component_19: DefineComponent<NexxtToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
75
81
  dismiss: () => any;
76
82
  }, string, PublicProps, Readonly<NexxtToastProps> & Readonly<{
77
83
  onDismiss?: (() => any) | undefined;
78
84
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
79
85
 
80
- declare const __VLS_component_19: DefineComponent<NexxtTooltip_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtTooltip_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
81
-
82
86
  declare const __VLS_component_2: DefineComponent<NexxtButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
83
87
 
88
+ declare const __VLS_component_20: DefineComponent<NexxtTooltip_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtTooltip_2> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
89
+
84
90
  declare const __VLS_component_3: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
85
91
 
86
92
  declare const __VLS_component_4: DefineComponent<NexxtChipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<NexxtChipProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
@@ -404,16 +410,18 @@ declare type __VLS_Props = {
404
410
  delay?: number;
405
411
  };
406
412
 
407
- declare type __VLS_Props_10 = NexxtTabbedContent_2;
413
+ declare type __VLS_Props_10 = NexxtSwitchProps;
414
+
415
+ declare type __VLS_Props_11 = NexxtTabbedContent_2;
408
416
 
409
- declare type __VLS_Props_11 = NexxtTabs_2;
417
+ declare type __VLS_Props_12 = NexxtTabs_2;
410
418
 
411
- declare type __VLS_Props_12 = {
419
+ declare type __VLS_Props_13 = {
412
420
  event: TimelineEvent;
413
421
  splitView?: boolean;
414
422
  };
415
423
 
416
- declare type __VLS_Props_13 = {
424
+ declare type __VLS_Props_14 = {
417
425
  phase: TimelinePhase;
418
426
  /** Index within the filtered phases array (used to determine phase direction/date). */
419
427
  index: number;
@@ -444,9 +452,13 @@ declare type __VLS_PublicProps = {
444
452
  } & __VLS_Props_2;
445
453
 
446
454
  declare type __VLS_PublicProps_10 = {
447
- modelValue?: typeof selected['value'];
455
+ modelValue?: string;
448
456
  } & __VLS_Props_11;
449
457
 
458
+ declare type __VLS_PublicProps_11 = {
459
+ modelValue?: typeof selected['value'];
460
+ } & __VLS_Props_12;
461
+
450
462
  declare type __VLS_PublicProps_2 = {
451
463
  modelValue?: boolean;
452
464
  } & __VLS_Props_3;
@@ -477,7 +489,7 @@ declare type __VLS_PublicProps_8 = {
477
489
  } & __VLS_Props_9;
478
490
 
479
491
  declare type __VLS_PublicProps_9 = {
480
- modelValue?: string;
492
+ modelValue?: boolean;
481
493
  } & __VLS_Props_10;
482
494
 
483
495
  declare function __VLS_template(): {
@@ -556,13 +568,23 @@ declare function __VLS_template_16(): {
556
568
  };
557
569
 
558
570
  declare function __VLS_template_17(): {
571
+ attrs: Partial<{}>;
572
+ slots: {
573
+ default?(_: {}): any;
574
+ default?(_: {}): any;
575
+ };
576
+ refs: {};
577
+ rootEl: any;
578
+ };
579
+
580
+ declare function __VLS_template_18(): {
559
581
  attrs: Partial<{}>;
560
582
  slots: Partial<Record<string, (_: {}) => any>>;
561
583
  refs: {};
562
584
  rootEl: HTMLDivElement;
563
585
  };
564
586
 
565
- declare function __VLS_template_18(): {
587
+ declare function __VLS_template_19(): {
566
588
  attrs: Partial<{}>;
567
589
  slots: {
568
590
  default?(_: {}): any;
@@ -571,23 +593,23 @@ declare function __VLS_template_18(): {
571
593
  rootEl: HTMLDivElement;
572
594
  };
573
595
 
574
- declare function __VLS_template_19(): {
596
+ declare function __VLS_template_2(): {
575
597
  attrs: Partial<{}>;
576
598
  slots: {
577
599
  default?(_: {}): any;
578
- tooltip?(_: {}): any;
579
600
  };
580
601
  refs: {};
581
- rootEl: any;
602
+ rootEl: HTMLButtonElement;
582
603
  };
583
604
 
584
- declare function __VLS_template_2(): {
605
+ declare function __VLS_template_20(): {
585
606
  attrs: Partial<{}>;
586
607
  slots: {
587
608
  default?(_: {}): any;
609
+ tooltip?(_: {}): any;
588
610
  };
589
611
  refs: {};
590
- rootEl: HTMLButtonElement;
612
+ rootEl: any;
591
613
  };
592
614
 
593
615
  declare function __VLS_template_3(): {
@@ -917,6 +939,8 @@ declare type __VLS_TemplateResult_19 = ReturnType<typeof __VLS_template_19>;
917
939
 
918
940
  declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
919
941
 
942
+ declare type __VLS_TemplateResult_20 = ReturnType<typeof __VLS_template_20>;
943
+
920
944
  declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
921
945
 
922
946
  declare type __VLS_TemplateResult_4 = ReturnType<typeof __VLS_template_4>;
@@ -1003,6 +1027,12 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
1003
1027
  };
1004
1028
  };
1005
1029
 
1030
+ declare type __VLS_WithTemplateSlots_20<T, S> = T & {
1031
+ new (): {
1032
+ $slots: S;
1033
+ };
1034
+ };
1035
+
1006
1036
  declare type __VLS_WithTemplateSlots_3<T, S> = T & {
1007
1037
  new (): {
1008
1038
  $slots: S;
@@ -1768,7 +1798,16 @@ declare interface NexxtStepperHeaderProps {
1768
1798
  backButtonAction: InstanceType<typeof NexxtHeader>['backButtonAction'];
1769
1799
  }
1770
1800
 
1771
- export declare const NexxtTabbedContent: __VLS_WithTemplateSlots_17<typeof __VLS_component_17, __VLS_TemplateResult_17["slots"]>;
1801
+ export declare const NexxtSwitch: __VLS_WithTemplateSlots_17<typeof __VLS_component_17, __VLS_TemplateResult_17["slots"]>;
1802
+
1803
+ declare interface NexxtSwitchProps {
1804
+ labelPosition?: 'before' | 'after';
1805
+ color?: SwitchColor;
1806
+ iconOn?: IconName;
1807
+ iconOff?: IconName;
1808
+ }
1809
+
1810
+ export declare const NexxtTabbedContent: __VLS_WithTemplateSlots_18<typeof __VLS_component_18, __VLS_TemplateResult_18["slots"]>;
1772
1811
 
1773
1812
  declare interface NexxtTabbedContent_2 {
1774
1813
  tabs: InstanceType<typeof NexxtTabs>['tabs'];
@@ -1814,9 +1853,9 @@ declare interface NexxtTableProps<TKey extends string = string, TRow extends Rec
1814
1853
  loading?: boolean;
1815
1854
  }
1816
1855
 
1817
- export declare const NexxtTabs: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1856
+ export declare const NexxtTabs: DefineComponent<__VLS_PublicProps_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1818
1857
  "update:modelValue": (value: string) => any;
1819
- }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
1858
+ }, string, PublicProps, Readonly<__VLS_PublicProps_11> & Readonly<{
1820
1859
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
1821
1860
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1822
1861
  containerRef: HTMLDivElement;
@@ -1827,13 +1866,13 @@ declare interface NexxtTabs_2 {
1827
1866
  tablistLabel?: string;
1828
1867
  }
1829
1868
 
1830
- export declare const NexxtTimelineEvent: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{}>, {
1869
+ export declare const NexxtTimelineEvent: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{}>, {
1831
1870
  splitView: boolean;
1832
1871
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1833
1872
 
1834
- export declare const NexxtTimelinePhaseblock: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1873
+ export declare const NexxtTimelinePhaseblock: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1835
1874
 
1836
- export declare const NexxtToast: __VLS_WithTemplateSlots_18<typeof __VLS_component_18, __VLS_TemplateResult_18["slots"]>;
1875
+ export declare const NexxtToast: __VLS_WithTemplateSlots_19<typeof __VLS_component_19, __VLS_TemplateResult_19["slots"]>;
1837
1876
 
1838
1877
  export declare const NexxtToaster: DefineComponent<NexxtToasterProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1839
1878
  dismiss: (id: string) => any;
@@ -1854,7 +1893,7 @@ declare interface NexxtToastProps {
1854
1893
  autoClose?: number;
1855
1894
  }
1856
1895
 
1857
- export declare const NexxtTooltip: __VLS_WithTemplateSlots_19<typeof __VLS_component_19, __VLS_TemplateResult_19["slots"]>;
1896
+ export declare const NexxtTooltip: __VLS_WithTemplateSlots_20<typeof __VLS_component_20, __VLS_TemplateResult_20["slots"]>;
1858
1897
 
1859
1898
  declare interface NexxtTooltip_2 {
1860
1899
  delay?: number;
@@ -1897,6 +1936,7 @@ export declare const SOURCE_MAP: {
1897
1936
  readonly realworks_agenda_api: "Realworks Agenda API";
1898
1937
  readonly realworks_api: "Realworks API";
1899
1938
  readonly kolibri: "Kolibri";
1939
+ readonly kolibri_agenda_api: "Kolibri Agenda API";
1900
1940
  readonly kolibri_app_exchange: "Kolibri App Exchange";
1901
1941
  readonly zapier: "Zapier";
1902
1942
  readonly bricr: "Bricr";
@@ -1909,6 +1949,8 @@ export declare const SOURCE_MAP: {
1909
1949
  readonly dossier_data: "Dossier Data";
1910
1950
  };
1911
1951
 
1952
+ declare type SwitchColor = 'blue' | 'green';
1953
+
1912
1954
  declare interface TableColumn<K extends string = string> {
1913
1955
  key: K;
1914
1956
  label: string;
package/dist/index.js CHANGED
@@ -7040,6 +7040,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7040
7040
  realworks_agenda_api: "Realworks Agenda API",
7041
7041
  realworks_api: "Realworks API",
7042
7042
  kolibri: "Kolibri",
7043
+ kolibri_agenda_api: "Kolibri Agenda API",
7043
7044
  kolibri_app_exchange: "Kolibri App Exchange",
7044
7045
  zapier: "Zapier",
7045
7046
  bricr: "Bricr",
@@ -7059,6 +7060,10 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7059
7060
  url: gl,
7060
7061
  height: "h-6"
7061
7062
  },
7063
+ kolibri_agenda_api: {
7064
+ url: gl,
7065
+ height: "h-6"
7066
+ },
7062
7067
  kolibri_app_exchange: {
7063
7068
  url: _l,
7064
7069
  height: "h-6"
@@ -7164,12 +7169,50 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7164
7169
  "back-button-text"
7165
7170
  ]));
7166
7171
  }
7167
- }), kl = ["aria-label"], Al = [
7172
+ }), kl = { class: "inline-flex cursor-pointer items-center gap-2" }, Al = { class: "relative inline-block h-8 w-15" }, jl = /* @__PURE__ */ g({
7173
+ name: "NexxtSwitch",
7174
+ inheritAttrs: !1,
7175
+ __name: "Switch",
7176
+ props: /* @__PURE__ */ b({
7177
+ labelPosition: { default: "after" },
7178
+ color: { default: "blue" },
7179
+ iconOn: {},
7180
+ iconOff: {}
7181
+ }, {
7182
+ modelValue: { type: Boolean },
7183
+ modelModifiers: {}
7184
+ }),
7185
+ emits: ["update:modelValue"],
7186
+ setup(e) {
7187
+ let t = P(e, "modelValue"), n = {
7188
+ blue: "border-cornflower-blue-500 bg-cornflower-blue-500",
7189
+ green: "border-green-400 bg-green-400"
7190
+ };
7191
+ return (r, i) => (D(), u("label", kl, [
7192
+ e.labelPosition === "before" ? A(r.$slots, "default", { key: 0 }) : l("", !0),
7193
+ d("span", Al, [oe(d("input", x(r.$attrs, {
7194
+ type: "checkbox",
7195
+ class: "peer sr-only",
7196
+ "onUpdate:modelValue": i[0] ||= (e) => t.value = e
7197
+ }), null, 16), [[ne, t.value]]), d("span", { class: C(["absolute inset-0 overflow-hidden rounded-[30px] border transition-colors duration-200", t.value ? n[e.color] : "border-gray-500 bg-gray-200"]) }, [d("span", { class: C(["absolute top-0.75 left-0.75 h-6 w-6 rounded-full bg-white transition-transform duration-400", t.value && "translate-x-7"]) }, null, 2), d("span", { class: C(["absolute top-0.75 left-0.75 flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform duration-300", t.value && "translate-x-7"]) }, [t.value && e.iconOn ? (D(), c(z, {
7198
+ key: 0,
7199
+ name: e.iconOn,
7200
+ type: "solid",
7201
+ class: "text-xs text-gray-600"
7202
+ }, null, 8, ["name"])) : !t.value && e.iconOff ? (D(), c(z, {
7203
+ key: 1,
7204
+ name: e.iconOff,
7205
+ class: "text-xs text-gray-600"
7206
+ }, null, 8, ["name"])) : l("", !0)], 2)], 2)]),
7207
+ e.labelPosition === "after" ? A(r.$slots, "default", { key: 1 }) : l("", !0)
7208
+ ]));
7209
+ }
7210
+ }), Ml = ["aria-label"], Nl = [
7168
7211
  "aria-selected",
7169
7212
  "tabindex",
7170
7213
  "onClick",
7171
7214
  "onKeydown"
7172
- ], jl = /* @__PURE__ */ g({
7215
+ ], Pl = /* @__PURE__ */ g({
7173
7216
  name: "NexxtTabs",
7174
7217
  __name: "Tabs",
7175
7218
  props: /* @__PURE__ */ b({
@@ -7229,7 +7272,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7229
7272
  class: C(["relative h-9 cursor-pointer rounded-full px-4 text-sm text-gray-950 transition-none", n.value === e ? "z-10" : "z-30"]),
7230
7273
  onClick: (t) => n.value = e,
7231
7274
  onKeydown: (e) => f(e, t)
7232
- }, M(e), 43, Al))), 128)),
7275
+ }, M(e), 43, Nl))), 128)),
7233
7276
  d("div", {
7234
7277
  "aria-hidden": "true",
7235
7278
  class: C(["pointer-events-none absolute inset-0 z-20 flex", c.value ? "transition-[clip-path] duration-500 ease-[cubic-bezier(0.34,1.2,0.64,1)]" : ""]),
@@ -7238,9 +7281,9 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7238
7281
  key: e,
7239
7282
  class: "flex h-9 items-center rounded-full px-4 text-sm text-white"
7240
7283
  }, M(e), 1))), 128))], 6)
7241
- ], 8, kl));
7284
+ ], 8, Ml));
7242
7285
  }
7243
- }), Ml = { class: "flex flex-col items-center" }, Nl = { class: "relative w-full overflow-hidden" }, Pl = ["aria-labelledby"], Fl = /* @__PURE__ */ g({
7286
+ }), Fl = { class: "flex flex-col items-center" }, Il = { class: "relative w-full overflow-hidden" }, Ll = ["aria-labelledby"], Rl = /* @__PURE__ */ g({
7244
7287
  name: "NexxtTabbedContent",
7245
7288
  __name: "TabbedContent",
7246
7289
  props: /* @__PURE__ */ b({
@@ -7265,7 +7308,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7265
7308
  enterFromClass: r.value === "forward" ? "-translate-x-10 opacity-0" : "translate-x-10 opacity-0",
7266
7309
  leaveToClass: r.value === "forward" ? "translate-x-10 opacity-0" : "-translate-x-10 opacity-0"
7267
7310
  } : { mode: "out-in" });
7268
- return (t, r) => (D(), u("div", Ml, [h(jl, {
7311
+ return (t, r) => (D(), u("div", Fl, [h(Pl, {
7269
7312
  tabs: e.tabs,
7270
7313
  modelValue: n.value,
7271
7314
  "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
@@ -7275,49 +7318,49 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7275
7318
  "tabs",
7276
7319
  "modelValue",
7277
7320
  "tablist-label"
7278
- ]), d("div", Nl, [h(a, w(v(c.value)), {
7321
+ ]), d("div", Il, [h(a, w(v(c.value)), {
7279
7322
  default: F(() => [(D(), u("div", {
7280
7323
  key: n.value,
7281
7324
  role: "tabpanel",
7282
7325
  "aria-labelledby": o(n.value),
7283
7326
  class: "w-full"
7284
- }, [A(t.$slots, i(n.value))], 8, Pl))]),
7327
+ }, [A(t.$slots, i(n.value))], 8, Ll))]),
7285
7328
  _: 3
7286
7329
  }, 16)])]));
7287
7330
  }
7288
- }), Il = { class: "flex flex-col gap-3" }, Ll = ["aria-colcount", "aria-rowcount"], Rl = { class: "sticky top-0 z-10 mb-0.5" }, zl = { key: 0 }, Bl = {
7331
+ }), zl = { class: "flex flex-col gap-3" }, Bl = ["aria-colcount", "aria-rowcount"], Vl = { class: "sticky top-0 z-10 mb-0.5" }, Hl = { key: 0 }, Ul = {
7289
7332
  key: 0,
7290
7333
  class: "flex items-center justify-center px-2 py-3",
7291
7334
  role: "columnheader",
7292
7335
  "aria-colindex": "1"
7293
- }, Vl = [
7336
+ }, Wl = [
7294
7337
  "aria-colindex",
7295
7338
  "aria-sort",
7296
7339
  "tabindex",
7297
7340
  "onClick",
7298
7341
  "onKeydown"
7299
- ], Hl = {
7342
+ ], Gl = {
7300
7343
  role: "rowgroup",
7301
7344
  class: "relative"
7302
- }, Ul = [
7345
+ }, Kl = [
7303
7346
  "aria-rowindex",
7304
7347
  "aria-selected",
7305
7348
  "onClick",
7306
7349
  "onKeydown"
7307
- ], Wl = {
7350
+ ], ql = {
7308
7351
  key: 0,
7309
7352
  class: "flex items-center justify-center px-2 py-4",
7310
7353
  role: "gridcell",
7311
7354
  "aria-colindex": 1
7312
- }, Gl = ["aria-colindex"], Kl = {
7355
+ }, Jl = ["aria-colindex"], Yl = {
7313
7356
  key: 0,
7314
7357
  class: "px-4 py-8 text-center text-sm text-slate-400",
7315
7358
  role: "row"
7316
- }, ql = {
7359
+ }, Xl = {
7317
7360
  key: 0,
7318
7361
  "data-testid": "loading-overlay",
7319
7362
  class: "absolute inset-0 flex items-center justify-center rounded-md bg-white/40 backdrop-blur-sm"
7320
- }, Jl = /* @__PURE__ */ g({
7363
+ }, Zl = /* @__PURE__ */ g({
7321
7364
  name: "NexxtTable",
7322
7365
  __name: "Table",
7323
7366
  props: /* @__PURE__ */ b({
@@ -7367,17 +7410,17 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7367
7410
  }, te = (e, t) => e[t], ne = (e) => `cell-${e}`, re = (e, t) => {
7368
7411
  e.key === "ArrowDown" ? (e.preventDefault(), _.value[Math.min(t + 1, i.rows.length - 1)]?.focus()) : e.key === "ArrowUp" && (e.preventDefault(), _.value[Math.max(t - 1, 0)]?.focus());
7369
7412
  };
7370
- return (t, n) => (D(), u("div", Il, [d("div", {
7413
+ return (t, n) => (D(), u("div", zl, [d("div", {
7371
7414
  role: "grid",
7372
7415
  "aria-colcount": e.columns.length + +!!e.selectable,
7373
7416
  "aria-rowcount": e.rows.length + 1,
7374
7417
  class: "min-w-full"
7375
- }, [d("div", Rl, [t.$slots.toolbar ? (D(), u("div", zl, [A(t.$slots, "toolbar")])) : l("", !0), d("div", {
7418
+ }, [d("div", Vl, [t.$slots.toolbar ? (D(), u("div", Hl, [A(t.$slots, "toolbar")])) : l("", !0), d("div", {
7376
7419
  class: "grid rounded-md bg-gray-50",
7377
7420
  style: T({ gridTemplateColumns: E.value }),
7378
7421
  role: "row",
7379
7422
  "aria-rowindex": "1"
7380
- }, [e.selectable ? (D(), u("div", Bl, [e.selectionMode === "multiple" ? (D(), c(Si, {
7423
+ }, [e.selectable ? (D(), u("div", Ul, [e.selectionMode === "multiple" ? (D(), c(Si, {
7381
7424
  key: 0,
7382
7425
  "model-value": v.value,
7383
7426
  indeterminate: y.value,
@@ -7396,7 +7439,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7396
7439
  key: 0,
7397
7440
  name: p.value === t.key ? g.value === "asc" ? "angle-down" : "angle-up" : "angles-up-down",
7398
7441
  class: C(["shrink-0 text-xs", p.value === t.key ? "text-cornflower-blue-600" : "text-slate-400"])
7399
- }, null, 8, ["name", "class"])) : l("", !0)], 42, Vl))), 128))], 4)]), d("div", Hl, [
7442
+ }, null, 8, ["name", "class"])) : l("", !0)], 42, Wl))), 128))], 4)]), d("div", Gl, [
7400
7443
  (D(!0), u(r, null, k(e.rows, (n, i) => (D(), u("div", {
7401
7444
  key: i,
7402
7445
  ref_for: !0,
@@ -7415,7 +7458,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7415
7458
  tabindex: "0",
7416
7459
  onClick: (e) => j(e, i),
7417
7460
  onKeydown: (e) => re(e, i)
7418
- }, [e.selectable ? (D(), u("div", Wl, [h(Si, {
7461
+ }, [e.selectable ? (D(), u("div", ql, [h(Si, {
7419
7462
  "model-value": b(n),
7420
7463
  "aria-label": `Select row ${i + 1}`,
7421
7464
  "onUpdate:modelValue": (e) => S(n)
@@ -7431,30 +7474,30 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7431
7474
  }, [A(t.$slots, ne(r.key), {
7432
7475
  row: n,
7433
7476
  value: te(n, r.key)
7434
- }, () => [m(M(te(n, r.key)), 1)])], 8, Gl))), 128))], 46, Ul))), 128)),
7435
- e.rows.length ? l("", !0) : (D(), u("div", Kl, [A(t.$slots, "empty", {}, () => [n[0] ||= m("Geen data beschikbaar", -1)])])),
7477
+ }, () => [m(M(te(n, r.key)), 1)])], 8, Jl))), 128))], 46, Kl))), 128)),
7478
+ e.rows.length ? l("", !0) : (D(), u("div", Yl, [A(t.$slots, "empty", {}, () => [n[0] ||= m("Geen data beschikbaar", -1)])])),
7436
7479
  h(a, {
7437
7480
  "enter-active-class": "transition-opacity duration-200",
7438
7481
  "leave-active-class": "transition-opacity duration-200",
7439
7482
  "enter-from-class": "opacity-0",
7440
7483
  "leave-to-class": "opacity-0"
7441
7484
  }, {
7442
- default: F(() => [e.loading ? (D(), u("div", ql, [A(t.$slots, "loading", {}, () => [h(z, {
7485
+ default: F(() => [e.loading ? (D(), u("div", Xl, [A(t.$slots, "loading", {}, () => [h(z, {
7443
7486
  name: "spinner-third",
7444
7487
  class: "fa-spin text-3xl text-purple-500"
7445
7488
  })])])) : l("", !0)]),
7446
7489
  _: 3
7447
7490
  })
7448
- ])], 8, Ll)]));
7491
+ ])], 8, Bl)]));
7449
7492
  }
7450
- }), Yl = [
7493
+ }), Ql = [
7451
7494
  "data-event-source",
7452
7495
  "data-event-date",
7453
7496
  "date-event-type"
7454
- ], Xl = { class: "heading-3" }, Zl = ["href"], Ql = { class: "truncate group-hover:underline" }, $l = {
7497
+ ], $l = { class: "heading-3" }, eu = ["href"], tu = { class: "truncate group-hover:underline" }, nu = {
7455
7498
  key: 1,
7456
7499
  class: "mt-1 text-sm text-gray-500"
7457
- }, eu = /* @__PURE__ */ g({
7500
+ }, ru = /* @__PURE__ */ g({
7458
7501
  name: "NexxtTimelineEvent",
7459
7502
  __name: "TimelineEvent",
7460
7503
  props: {
@@ -7492,20 +7535,20 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7492
7535
  name: n.value.icon,
7493
7536
  class: "flex h-6 w-6 text-xl text-white"
7494
7537
  }, null, 8, ["name"])], 2), d("div", { class: C(["flex w-full flex-col gap-2 rounded-xl border border-gray-200 p-8", { "max-w-lg": e.splitView }]) }, [
7495
- d("span", Xl, M(n.value.label), 1),
7538
+ d("span", $l, M(n.value.label), 1),
7496
7539
  e.event.url ? (D(), u("a", {
7497
7540
  key: 0,
7498
7541
  href: e.event.url,
7499
7542
  target: "_blank",
7500
7543
  class: "group mt-1 flex justify-between gap-2 text-sm text-cornflower-blue-500 hover:text-cornflower-blue-600"
7501
- }, [d("span", Ql, M(e.event.description || e.event.url), 1), h(z, {
7544
+ }, [d("span", tu, M(e.event.description || e.event.url), 1), h(z, {
7502
7545
  name: "external-link",
7503
7546
  class: "ml-1 h-4 w-4 text-gray-950"
7504
- })], 8, Zl)) : l("", !0),
7505
- e.event.request_reason ? (D(), u("span", $l, " Reden: " + M(e.event.request_reason), 1)) : l("", !0)
7506
- ], 2)], 2)], 10, Yl));
7547
+ })], 8, eu)) : l("", !0),
7548
+ e.event.request_reason ? (D(), u("span", nu, " Reden: " + M(e.event.request_reason), 1)) : l("", !0)
7549
+ ], 2)], 2)], 10, Ql));
7507
7550
  }
7508
- }), tu = /* @__PURE__ */ g({
7551
+ }), iu = /* @__PURE__ */ g({
7509
7552
  name: "NexxtTooltip",
7510
7553
  __name: "Tooltip",
7511
7554
  props: {
@@ -7548,13 +7591,13 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7548
7591
  _: 3
7549
7592
  }));
7550
7593
  }
7551
- }), nu = ["data-phase"], ru = {
7594
+ }), au = ["data-phase"], ou = {
7552
7595
  key: 0,
7553
7596
  class: "relative z-10"
7554
- }, iu = { class: "flex items-center justify-between px-4 py-2" }, au = { class: "flex gap-1" }, ou = { class: "flex gap-1" }, su = { class: "text-sm font-semibold tracking-wider uppercase" }, cu = { class: "mt-2 font-medium text-xs text-gray-500" }, lu = {
7597
+ }, su = { class: "flex items-center justify-between px-4 py-2" }, cu = { class: "flex gap-1" }, lu = { class: "flex gap-1" }, uu = { class: "text-sm font-semibold tracking-wider uppercase" }, du = { class: "mt-2 font-medium text-xs text-gray-500" }, fu = {
7555
7598
  key: 1,
7556
7599
  class: "h-1"
7557
- }, uu = /* @__PURE__ */ g({
7600
+ }, pu = /* @__PURE__ */ g({
7558
7601
  name: "NexxtTimelinePhaseblock",
7559
7602
  __name: "TimelinePhaseblock",
7560
7603
  props: {
@@ -7590,14 +7633,14 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7590
7633
  class: "relative z-10 flex flex-col gap-16",
7591
7634
  "data-phase": e.phase.phase.value
7592
7635
  }, [
7593
- e.index === 0 && e.isSplitView ? (D(), u("div", ru, [d("div", iu, [d("span", au, [i[1] ||= m(" Outbound ", -1), h(tu, null, {
7636
+ e.index === 0 && e.isSplitView ? (D(), u("div", ou, [d("div", su, [d("span", cu, [i[1] ||= m(" Outbound ", -1), h(iu, null, {
7594
7637
  tooltip: F(() => [...i[0] ||= [d("span", { class: "text-sm" }, "Vanuit Nexxtmove", -1)]]),
7595
7638
  default: F(() => [h(z, {
7596
7639
  name: "circle-info",
7597
7640
  class: "h-4 w-4 text-xs text-gray-600"
7598
7641
  })]),
7599
7642
  _: 1
7600
- })]), d("span", ou, [i[3] ||= m(" Inbound ", -1), h(tu, { "as-child": "" }, {
7643
+ })]), d("span", lu, [i[3] ||= m(" Inbound ", -1), h(iu, { "as-child": "" }, {
7601
7644
  tooltip: F(() => [...i[2] ||= [d("span", { class: "text-sm" }, "Vanuit relatie", -1)]]),
7602
7645
  default: F(() => [h(z, {
7603
7646
  name: "circle-info",
@@ -7610,7 +7653,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7610
7653
  key: 1,
7611
7654
  class: C(["absolute right-5 bottom-0 w-0 border-l", [N(ds)[e.phase.phase.value].color, e.index === 0 ? "top-10" : "top-0"]])
7612
7655
  }, null, 2)) : l("", !0),
7613
- (D(!0), u(r, null, k(e.phase.events, (t) => (D(), c(eu, {
7656
+ (D(!0), u(r, null, k(e.phase.events, (t) => (D(), c(ru, {
7614
7657
  key: t.id,
7615
7658
  event: t,
7616
7659
  "split-view": e.isSplitView
@@ -7619,36 +7662,36 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7619
7662
  key: 2,
7620
7663
  class: C(["relative flex flex-col items-center pt-8 pb-24 text-center", { "pl-16": !e.isSplitView }])
7621
7664
  }, [
7622
- d("div", { class: C(["flex items-center gap-2 rounded-full px-12 py-4", [N(ds)[e.phase.phase.value].bgColor, N(ds)[e.phase.phase.value].textColor]]) }, [d("span", su, M(N(ds)[e.phase.phase.value].label), 1), o() ? (D(), c(z, {
7665
+ d("div", { class: C(["flex items-center gap-2 rounded-full px-12 py-4", [N(ds)[e.phase.phase.value].bgColor, N(ds)[e.phase.phase.value].textColor]]) }, [d("span", uu, M(N(ds)[e.phase.phase.value].label), 1), o() ? (D(), c(z, {
7623
7666
  key: 0,
7624
7667
  name: o() === "up" ? "arrow-up" : "arrow-down",
7625
7668
  class: "h-4 w-4 text-white"
7626
7669
  }, null, 8, ["name"])) : l("", !0)], 2),
7627
- d("span", cu, M(a()), 1),
7670
+ d("span", du, M(a()), 1),
7628
7671
  e.isSplitView ? (D(), u("div", {
7629
7672
  key: 0,
7630
7673
  class: C(["mt-4 h-px w-[75%]", N(ds)[e.phase.phase.value].bgColor])
7631
7674
  }, null, 2)) : l("", !0),
7632
- e.isLast ? l("", !0) : (D(), u("div", lu)),
7675
+ e.isLast ? l("", !0) : (D(), u("div", fu)),
7633
7676
  d("div", { class: C(["absolute top-0 bottom-0 left-5 w-px bg-linear-to-b", n.value]) }, null, 2),
7634
7677
  e.isSplitView ? (D(), u("div", {
7635
7678
  key: 2,
7636
7679
  class: C(["absolute top-0 right-5 bottom-0 w-px bg-linear-to-b", n.value])
7637
7680
  }, null, 2)) : l("", !0)
7638
7681
  ], 2))
7639
- ], 8, nu));
7682
+ ], 8, au));
7640
7683
  }
7641
- }), du = ["role", "aria-live"], fu = { class: "flex min-w-0 flex-1 flex-col gap-0.5 pt-0.5" }, pu = {
7684
+ }), mu = ["role", "aria-live"], hu = { class: "flex min-w-0 flex-1 flex-col gap-0.5 pt-0.5" }, gu = {
7642
7685
  key: 1,
7643
7686
  class: "body-normal"
7644
- }, mu = ["aria-label"], hu = {
7687
+ }, _u = ["aria-label"], vu = {
7645
7688
  key: 0,
7646
7689
  class: "absolute inset-0 -rotate-90 text-gray-400",
7647
7690
  viewBox: "0 0 24 24",
7648
7691
  width: "32",
7649
7692
  height: "32",
7650
7693
  "aria-hidden": "true"
7651
- }, gu = 56.55, _u = /* @__PURE__ */ Wo(/* @__PURE__ */ g({
7694
+ }, yu = 56.55, bu = /* @__PURE__ */ Wo(/* @__PURE__ */ g({
7652
7695
  name: "NexxtToast",
7653
7696
  __name: "Toast",
7654
7697
  props: {
@@ -7663,7 +7706,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7663
7706
  },
7664
7707
  emits: ["dismiss"],
7665
7708
  setup(e, { emit: t }) {
7666
- te((e) => ({ v3e3d3e68: gu }));
7709
+ te((e) => ({ v3e3d3e68: yu }));
7667
7710
  let n = {
7668
7711
  info: {
7669
7712
  icon: "info",
@@ -7711,12 +7754,12 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7711
7754
  name: a.value.icon,
7712
7755
  class: "text-xl"
7713
7756
  }, null, 8, ["name"])], 2),
7714
- d("div", fu, [
7757
+ d("div", hu, [
7715
7758
  e.title ? (D(), u("p", {
7716
7759
  key: 0,
7717
7760
  class: C(["heading-4", a.value.titleColor])
7718
7761
  }, M(e.title), 3)) : l("", !0),
7719
- e.message ? (D(), u("p", pu, M(e.message), 1)) : l("", !0),
7762
+ e.message ? (D(), u("p", gu, M(e.message), 1)) : l("", !0),
7720
7763
  A(t.$slots, "default", {}, void 0, !0)
7721
7764
  ]),
7722
7765
  e.dismissible ? (D(), u("button", {
@@ -7725,7 +7768,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7725
7768
  class: "relative flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center focus:outline-none",
7726
7769
  "aria-label": e.autoClose ? `Sluiten (verdwijnt automatisch na ${e.autoClose / 1e3} seconden)` : "Sluiten",
7727
7770
  onClick: n[0] ||= (e) => r("dismiss")
7728
- }, [e.autoClose ? (D(), u("svg", hu, [d("circle", {
7771
+ }, [e.autoClose ? (D(), u("svg", vu, [d("circle", {
7729
7772
  cx: "12",
7730
7773
  cy: "12",
7731
7774
  r: "9",
@@ -7733,7 +7776,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7733
7776
  stroke: "currentColor",
7734
7777
  "stroke-width": "1.2",
7735
7778
  "stroke-linecap": "round",
7736
- "stroke-dasharray": gu,
7779
+ "stroke-dasharray": yu,
7737
7780
  class: "timer-circle",
7738
7781
  style: T({
7739
7782
  animationDuration: `${e.autoClose}ms`,
@@ -7742,10 +7785,10 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7742
7785
  }, null, 4)])) : l("", !0), h(z, {
7743
7786
  name: "xmark",
7744
7787
  class: "text-sm"
7745
- })], 8, mu)) : l("", !0)
7746
- ], 42, du));
7788
+ })], 8, _u)) : l("", !0)
7789
+ ], 42, mu));
7747
7790
  }
7748
- }), [["__scopeId", "data-v-89269eaa"]]), vu = /* @__PURE__ */ g({
7791
+ }), [["__scopeId", "data-v-89269eaa"]]), xu = /* @__PURE__ */ g({
7749
7792
  name: "NexxtToaster",
7750
7793
  __name: "Toaster",
7751
7794
  props: {
@@ -7778,7 +7821,7 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7778
7821
  default: F(() => [(D(!0), u(r, null, k(e.toasts, (e) => (D(), u("div", {
7779
7822
  key: e.id,
7780
7823
  class: "pointer-events-auto"
7781
- }, [h(_u, x({ ref_for: !0 }, e, { onDismiss: (t) => n("dismiss", e.id) }), null, 16, ["onDismiss"])]))), 128))]),
7824
+ }, [h(bu, x({ ref_for: !0 }, e, { onDismiss: (t) => n("dismiss", e.id) }), null, 16, ["onDismiss"])]))), 128))]),
7782
7825
  _: 1
7783
7826
  }, 8, [
7784
7827
  "class",
@@ -7788,4 +7831,4 @@ var ll = { render: cl }, ul = { class: "flex items-center justify-end self-stret
7788
7831
  }
7789
7832
  });
7790
7833
  //#endregion
7791
- export { xt as NexxtAnimatedNumber, Ct as NexxtAnnouncement, Ot as NexxtAvatar, At as NexxtButton, _i as NexxtCalendar, bi as NexxtCard, Si as NexxtCheckbox, Ci as NexxtChip, Uo as NexxtCombobox, Vo as NexxtComboboxPanel, Xo as NexxtContactInfoCard, ls as NexxtCountrySelect, hs as NexxtCustomerJourneyTile, gs as NexxtDatePicker, ws as NexxtDoughnutChart, Os as NexxtDropdownButton, yo as NexxtFloatingPanel, js as NexxtHeader, z as NexxtIcon, Ns as NexxtInfoBlock, Oo as NexxtInputField, Hs as NexxtInputSelect, Ks as NexxtModal, qs as NexxtPagination, Zs as NexxtPresenceIndicator, oc as NexxtProgressBar, _c as NexxtPropertyCard, fc as NexxtPropertyListing, Ec as NexxtSelect, Mc as NexxtSidebarMenuItem, Pc as NexxtSkeleton, Rc as NexxtSkeletonPropertyCard, Vc as NexxtSocialIcons, Gc as NexxtSocialMediaCustomTemplate, el as NexxtSocialMediaTemplate, ml as NexxtSocialMediaType, Dl as NexxtSource, Dt as NexxtSquircle, Ol as NexxtStepperHeader, Fl as NexxtTabbedContent, Jl as NexxtTable, jl as NexxtTabs, eu as NexxtTimelineEvent, uu as NexxtTimelinePhaseblock, _u as NexxtToast, vu as NexxtToaster, tu as NexxtTooltip, wl as SOURCE_MAP };
7834
+ export { xt as NexxtAnimatedNumber, Ct as NexxtAnnouncement, Ot as NexxtAvatar, At as NexxtButton, _i as NexxtCalendar, bi as NexxtCard, Si as NexxtCheckbox, Ci as NexxtChip, Uo as NexxtCombobox, Vo as NexxtComboboxPanel, Xo as NexxtContactInfoCard, ls as NexxtCountrySelect, hs as NexxtCustomerJourneyTile, gs as NexxtDatePicker, ws as NexxtDoughnutChart, Os as NexxtDropdownButton, yo as NexxtFloatingPanel, js as NexxtHeader, z as NexxtIcon, Ns as NexxtInfoBlock, Oo as NexxtInputField, Hs as NexxtInputSelect, Ks as NexxtModal, qs as NexxtPagination, Zs as NexxtPresenceIndicator, oc as NexxtProgressBar, _c as NexxtPropertyCard, fc as NexxtPropertyListing, Ec as NexxtSelect, Mc as NexxtSidebarMenuItem, Pc as NexxtSkeleton, Rc as NexxtSkeletonPropertyCard, Vc as NexxtSocialIcons, Gc as NexxtSocialMediaCustomTemplate, el as NexxtSocialMediaTemplate, ml as NexxtSocialMediaType, Dl as NexxtSource, Dt as NexxtSquircle, Ol as NexxtStepperHeader, jl as NexxtSwitch, Rl as NexxtTabbedContent, Zl as NexxtTable, Pl as NexxtTabs, ru as NexxtTimelineEvent, pu as NexxtTimelinePhaseblock, bu as NexxtToast, xu as NexxtToaster, iu as NexxtTooltip, wl as SOURCE_MAP };
package/dist/nuxt.js CHANGED
@@ -42976,6 +42976,7 @@ var Vw, Hw, Uw, Ww, Gw, Kw = t((() => {
42976
42976
  NexxtSource: "components/Source/Source.vue",
42977
42977
  NexxtSquircle: "components/Squircle/Squircle.vue",
42978
42978
  NexxtStepperHeader: "components/StepperHeader/StepperHeader.vue",
42979
+ NexxtSwitch: "components/Switch/Switch.vue",
42979
42980
  NexxtTabbedContent: "components/TabbedContent/TabbedContent.vue",
42980
42981
  NexxtTable: "components/Table/Table.vue",
42981
42982
  NexxtTabs: "components/Tabs/Tabs.vue",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nexxtmove/ui",
3
3
  "type": "module",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -12,6 +12,7 @@ export const SOURCE_MAP = {
12
12
  realworks_agenda_api: 'Realworks Agenda API',
13
13
  realworks_api: 'Realworks API',
14
14
  kolibri: 'Kolibri',
15
+ kolibri_agenda_api: 'Kolibri Agenda API',
15
16
  kolibri_app_exchange: 'Kolibri App Exchange',
16
17
  zapier: 'Zapier',
17
18
  bricr: 'Bricr',
@@ -32,6 +33,7 @@ interface SourceImage {
32
33
  const SOURCE_IMAGES: Partial<Record<keyof typeof SOURCE_MAP, SourceImage>> = {
33
34
  bricr: { url: imgBricr, height: 'h-5' },
34
35
  kolibri: { url: imgKolibri, height: 'h-6' },
36
+ kolibri_agenda_api: { url: imgKolibri, height: 'h-6' },
35
37
  kolibri_app_exchange: { url: imgKolibriAppExchange, height: 'h-6' },
36
38
  realworks: { url: imgRealworks, height: 'h-4' },
37
39
  realworks_agenda_api: { url: imgRealworksAgendaApi, height: 'h-4' },
@@ -0,0 +1,59 @@
1
+ <script lang="ts" setup>
2
+ import type { IconName } from '@awesome.me/kit-37b149f3ef/icons'
3
+ import Icon from '../Icon/Icon.vue'
4
+
5
+ type SwitchColor = 'blue' | 'green'
6
+
7
+ interface NexxtSwitchProps {
8
+ labelPosition?: 'before' | 'after'
9
+ color?: SwitchColor
10
+ iconOn?: IconName
11
+ iconOff?: IconName
12
+ }
13
+
14
+ defineOptions({
15
+ name: 'NexxtSwitch',
16
+ inheritAttrs: false,
17
+ })
18
+
19
+ const { labelPosition = 'after', color = 'blue', iconOn, iconOff } = defineProps<NexxtSwitchProps>()
20
+
21
+ const model = defineModel<boolean>()
22
+
23
+ const checkedColorClasses: Record<SwitchColor, string> = {
24
+ blue: 'border-cornflower-blue-500 bg-cornflower-blue-500',
25
+ green: 'border-green-400 bg-green-400',
26
+ }
27
+ </script>
28
+
29
+ <template>
30
+ <label class="inline-flex cursor-pointer items-center gap-2">
31
+ <slot v-if="labelPosition === 'before'" />
32
+ <span class="relative inline-block h-8 w-15">
33
+ <input v-bind="$attrs" type="checkbox" class="peer sr-only" v-model="model" />
34
+ <span
35
+ :class="[
36
+ 'absolute inset-0 overflow-hidden rounded-[30px] border transition-colors duration-200',
37
+ model ? checkedColorClasses[color] : 'border-gray-500 bg-gray-200',
38
+ ]"
39
+ >
40
+ <span
41
+ :class="[
42
+ 'absolute top-0.75 left-0.75 h-6 w-6 rounded-full bg-white transition-transform duration-400',
43
+ model && 'translate-x-7',
44
+ ]"
45
+ />
46
+ <span
47
+ :class="[
48
+ 'absolute top-0.75 left-0.75 flex h-6 w-6 items-center justify-center rounded-full bg-white transition-transform duration-300',
49
+ model && 'translate-x-7',
50
+ ]"
51
+ >
52
+ <Icon v-if="model && iconOn" :name="iconOn" type="solid" class="text-xs text-gray-600" />
53
+ <Icon v-else-if="!model && iconOff" :name="iconOff" class="text-xs text-gray-600" />
54
+ </span>
55
+ </span>
56
+ </span>
57
+ <slot v-if="labelPosition === 'after'" />
58
+ </label>
59
+ </template>
@@ -38,6 +38,7 @@
38
38
  "NexxtSource": "components/Source/Source.vue",
39
39
  "NexxtSquircle": "components/Squircle/Squircle.vue",
40
40
  "NexxtStepperHeader": "components/StepperHeader/StepperHeader.vue",
41
+ "NexxtSwitch": "components/Switch/Switch.vue",
41
42
  "NexxtTabbedContent": "components/TabbedContent/TabbedContent.vue",
42
43
  "NexxtTable": "components/Table/Table.vue",
43
44
  "NexxtTabs": "components/Tabs/Tabs.vue",
package/src/index.ts CHANGED
@@ -38,6 +38,7 @@ export { default as NexxtSocialMediaType } from './components/SocialMediaType/So
38
38
  export { default as NexxtSource, SOURCE_MAP } from './components/Source/Source.vue'
39
39
  export { default as NexxtSquircle } from './components/Squircle/Squircle.vue'
40
40
  export { default as NexxtStepperHeader } from './components/StepperHeader/StepperHeader.vue'
41
+ export { default as NexxtSwitch } from './components/Switch/Switch.vue'
41
42
  export { default as NexxtTabbedContent } from './components/TabbedContent/TabbedContent.vue'
42
43
  export { default as NexxtTable } from './components/Table/Table.vue'
43
44
  export { default as NexxtTabs } from './components/Tabs/Tabs.vue'