@abgov/react-components 4.0.0-alpha.63 → 4.0.0-alpha.65

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.
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
+ declare type ChipVariant = "filter";
2
3
  interface WCProps {
3
4
  ref: React.RefObject<HTMLElement>;
4
5
  leadingicon: string;
5
6
  error: boolean;
6
7
  deletable: boolean;
7
8
  content: string;
9
+ variant?: string;
8
10
  }
9
11
  declare global {
10
12
  namespace JSX {
@@ -19,6 +21,7 @@ interface Props {
19
21
  leadingIcon?: string;
20
22
  error?: boolean;
21
23
  content: string;
24
+ variant?: ChipVariant;
22
25
  }
23
- export declare const GoAChip: ({ leadingIcon, deletable, error, content, onClick }: Props) => JSX.Element;
26
+ export declare const GoAChip: ({ leadingIcon, deletable, error, variant, content, onClick }: Props) => JSX.Element;
24
27
  export default GoAChip;
@@ -1,6 +1,6 @@
1
1
  import React, { FC } from 'react';
2
2
  import { GoAIconType } from '../..';
3
- declare type GoAInputType = "text" | "number" | "password" | "email" | "date" | "datetime-local" | "month" | "range" | "search" | "tel" | "time" | "url" | "week";
3
+ declare type GoAInputType = "text" | "password" | "email" | "number" | "date" | "datetime-local" | "month" | "range" | "search" | "tel" | "time" | "url" | "week";
4
4
  declare type GoAAutoCapitalize = "on" | "off" | "none" | "sentences" | "words" | "characters";
5
5
  interface WCProps {
6
6
  ref?: React.MutableRefObject<HTMLInputElement | null>;
@@ -24,8 +24,8 @@ interface WCProps {
24
24
  prefix?: string;
25
25
  suffix?: string;
26
26
  testid?: string;
27
- min?: string;
28
- max?: string;
27
+ min?: string | number;
28
+ max?: string | number;
29
29
  step?: number;
30
30
  }
31
31
  declare global {
@@ -35,10 +35,8 @@ declare global {
35
35
  }
36
36
  }
37
37
  }
38
- export interface InputProps {
38
+ interface BaseProps {
39
39
  name: string;
40
- value: string;
41
- onChange: (name: string, value: string) => void;
42
40
  id?: string;
43
41
  disabled?: boolean;
44
42
  autoCapitalize?: GoAAutoCapitalize;
@@ -56,8 +54,26 @@ export interface InputProps {
56
54
  prefix?: string;
57
55
  suffix?: string;
58
56
  testId?: string;
59
- min?: string;
60
- max?: string;
57
+ }
58
+ export interface InputProps extends BaseProps {
59
+ onChange: (name: string, value: string) => void;
60
+ value: string;
61
+ min?: number | string;
62
+ max?: number | string;
63
+ step?: number;
64
+ }
65
+ interface NumberInputProps extends BaseProps {
66
+ onChange: (name: string, value: number) => void;
67
+ value: number;
68
+ min?: number;
69
+ max?: number;
70
+ step?: number;
71
+ }
72
+ interface DateInputProps extends BaseProps {
73
+ onChange: (name: string, value: Date) => void;
74
+ value: string | Date;
75
+ min?: string | Date;
76
+ max?: string | Date;
61
77
  step?: number;
62
78
  }
63
79
  export declare const GoAInput: FC<InputProps & {
@@ -65,25 +81,15 @@ export declare const GoAInput: FC<InputProps & {
65
81
  }>;
66
82
  export declare const GoAInputText: FC<InputProps>;
67
83
  export declare const GoAInputPassword: FC<InputProps>;
68
- export declare const GoAInputDate: FC<Omit<InputProps, "value"> & {
69
- value: Date | string;
70
- }>;
71
- export declare const GoAInputTime: FC<Omit<InputProps, "value"> & {
72
- value: Date | string;
73
- }>;
74
- export declare const GoAInputDateTime: FC<Omit<InputProps, "value"> & {
75
- value: Date;
76
- }>;
84
+ export declare const GoAInputDate: FC<DateInputProps>;
85
+ export declare const GoAInputTime: FC<DateInputProps>;
86
+ export declare const GoAInputDateTime: FC<DateInputProps>;
77
87
  export declare const GoAInputEmail: FC<InputProps>;
78
88
  export declare const GoAInputSearch: FC<InputProps>;
79
89
  export declare const GoAInputUrl: FC<InputProps>;
80
90
  export declare const GoAInputTel: FC<InputProps>;
81
91
  export declare const GoAInputFile: FC<InputProps>;
82
92
  export declare const GoAInputMonth: FC<InputProps>;
83
- export declare const GoAInputNumber: FC<Omit<InputProps, "value" | "min" | "max"> & {
84
- value: number;
85
- min?: number;
86
- max?: number;
87
- }>;
93
+ export declare const GoAInputNumber: FC<NumberInputProps>;
88
94
  export declare const GoAInputRange: FC<InputProps>;
89
95
  export default GoAInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "4.0.0-alpha.63",
3
+ "version": "4.0.0-alpha.65",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useRef, useEffect } from 'react';
3
- import { format } from 'date-fns';
3
+ import { parseISO, format } from 'date-fns';
4
4
 
5
5
  function noop() {}
6
6
 
@@ -3456,7 +3456,7 @@ function create_if_block_1$8(ctx) {
3456
3456
  }
3457
3457
 
3458
3458
  };
3459
- } // (42:2) {#if _deletable}
3459
+ } // (44:2) {#if _deletable}
3460
3460
 
3461
3461
 
3462
3462
  function create_if_block$e(ctx) {
@@ -3472,14 +3472,14 @@ function create_if_block$e(ctx) {
3472
3472
  set_custom_element_data(goa_icon, "type", "close-circle");
3473
3473
  set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value =
3474
3474
  /*_error*/
3475
- ctx[4] ? "var(--goa-color-status-emergency)" :
3475
+ ctx[5] ? "var(--goa-color-status-emergency)" :
3476
3476
  /*_hovering*/
3477
- ctx[3] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)");
3477
+ ctx[4] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)");
3478
3478
  set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value =
3479
3479
  /*_error*/
3480
- ctx[4] ?
3480
+ ctx[5] ?
3481
3481
  /*_hovering*/
3482
- ctx[3] ? 1 : 0.5 : 1);
3482
+ ctx[4] ? 1 : 0.5 : 1);
3483
3483
  },
3484
3484
 
3485
3485
  m(target, anchor) {
@@ -3489,21 +3489,21 @@ function create_if_block$e(ctx) {
3489
3489
  p(ctx, dirty) {
3490
3490
  if (dirty &
3491
3491
  /*_error, _hovering*/
3492
- 24 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value =
3492
+ 48 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value =
3493
3493
  /*_error*/
3494
- ctx[4] ? "var(--goa-color-status-emergency)" :
3494
+ ctx[5] ? "var(--goa-color-status-emergency)" :
3495
3495
  /*_hovering*/
3496
- ctx[3] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)")) {
3496
+ ctx[4] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)")) {
3497
3497
  set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value);
3498
3498
  }
3499
3499
 
3500
3500
  if (dirty &
3501
3501
  /*_error, _hovering*/
3502
- 24 && goa_icon_opacity_value !== (goa_icon_opacity_value =
3502
+ 48 && goa_icon_opacity_value !== (goa_icon_opacity_value =
3503
3503
  /*_error*/
3504
- ctx[4] ?
3504
+ ctx[5] ?
3505
3505
  /*_hovering*/
3506
- ctx[3] ? 1 : 0.5 : 1)) {
3506
+ ctx[4] ? 1 : 0.5 : 1)) {
3507
3507
  set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value);
3508
3508
  }
3509
3509
  },
@@ -3528,7 +3528,7 @@ function create_fragment$u(ctx) {
3528
3528
  ctx[0] && create_if_block_1$8(ctx);
3529
3529
  let if_block1 =
3530
3530
  /*_deletable*/
3531
- ctx[5] && create_if_block$e(ctx);
3531
+ ctx[6] && create_if_block$e(ctx);
3532
3532
  return {
3533
3533
  c() {
3534
3534
  div1 = element("div");
@@ -3547,10 +3547,13 @@ function create_fragment$u(ctx) {
3547
3547
  attr(div1, "tabindex", "0");
3548
3548
  toggle_class(div1, "deletable",
3549
3549
  /*_deletable*/
3550
- ctx[5]);
3550
+ ctx[6]);
3551
3551
  toggle_class(div1, "error",
3552
3552
  /*_error*/
3553
- ctx[4]);
3553
+ ctx[5]);
3554
+ toggle_class(div1, "variant",
3555
+ /*variant*/
3556
+ ctx[2]);
3554
3557
  },
3555
3558
 
3556
3559
  m(target, anchor) {
@@ -3563,20 +3566,20 @@ function create_fragment$u(ctx) {
3563
3566
  if (if_block1) if_block1.m(div1, null);
3564
3567
  /*div1_binding*/
3565
3568
 
3566
- ctx[9](div1);
3569
+ ctx[10](div1);
3567
3570
 
3568
3571
  if (!mounted) {
3569
3572
  dispose = [listen(div1, "click",
3570
3573
  /*click_handler*/
3571
- ctx[10]), listen(div1, "mouseover",
3574
+ ctx[11]), listen(div1, "mouseover",
3572
3575
  /*mouseover_handler*/
3573
- ctx[11]), listen(div1, "mouseout",
3576
+ ctx[12]), listen(div1, "mouseout",
3574
3577
  /*mouseout_handler*/
3575
- ctx[12]), listen(div1, "focus",
3578
+ ctx[13]), listen(div1, "focus",
3576
3579
  /*focus_handler*/
3577
- ctx[13]), listen(div1, "blur",
3580
+ ctx[14]), listen(div1, "blur",
3578
3581
  /*blur_handler*/
3579
- ctx[14])];
3582
+ ctx[15])];
3580
3583
  mounted = true;
3581
3584
  }
3582
3585
  },
@@ -3605,7 +3608,7 @@ function create_fragment$u(ctx) {
3605
3608
 
3606
3609
  if (
3607
3610
  /*_deletable*/
3608
- ctx[5]) {
3611
+ ctx[6]) {
3609
3612
  if (if_block1) {
3610
3613
  if_block1.p(ctx, dirty);
3611
3614
  } else {
@@ -3620,18 +3623,26 @@ function create_fragment$u(ctx) {
3620
3623
 
3621
3624
  if (dirty &
3622
3625
  /*_deletable*/
3623
- 32) {
3626
+ 64) {
3624
3627
  toggle_class(div1, "deletable",
3625
3628
  /*_deletable*/
3626
- ctx[5]);
3629
+ ctx[6]);
3627
3630
  }
3628
3631
 
3629
3632
  if (dirty &
3630
3633
  /*_error*/
3631
- 16) {
3634
+ 32) {
3632
3635
  toggle_class(div1, "error",
3633
3636
  /*_error*/
3634
- ctx[4]);
3637
+ ctx[5]);
3638
+ }
3639
+
3640
+ if (dirty &
3641
+ /*variant*/
3642
+ 4) {
3643
+ toggle_class(div1, "variant",
3644
+ /*variant*/
3645
+ ctx[2]);
3635
3646
  }
3636
3647
  },
3637
3648
 
@@ -3644,7 +3655,7 @@ function create_fragment$u(ctx) {
3644
3655
  if (if_block1) if_block1.d();
3645
3656
  /*div1_binding*/
3646
3657
 
3647
- ctx[9](null);
3658
+ ctx[10](null);
3648
3659
  mounted = false;
3649
3660
  run_all(dispose);
3650
3661
  }
@@ -3665,6 +3676,9 @@ function instance$s($$self, $$props, $$invalidate) {
3665
3676
  let {
3666
3677
  content
3667
3678
  } = $$props;
3679
+ let {
3680
+ variant
3681
+ } = $$props;
3668
3682
  let el;
3669
3683
  let _hovering = false; // booleans
3670
3684
 
@@ -3683,42 +3697,43 @@ function instance$s($$self, $$props, $$invalidate) {
3683
3697
  function div1_binding($$value) {
3684
3698
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
3685
3699
  el = $$value;
3686
- $$invalidate(2, el);
3700
+ $$invalidate(3, el);
3687
3701
  });
3688
3702
  }
3689
3703
 
3690
3704
  const click_handler = e => _deletable && onDelete(e);
3691
3705
 
3692
- const mouseover_handler = () => $$invalidate(3, _hovering = true);
3706
+ const mouseover_handler = () => $$invalidate(4, _hovering = true);
3693
3707
 
3694
- const mouseout_handler = () => $$invalidate(3, _hovering = false);
3708
+ const mouseout_handler = () => $$invalidate(4, _hovering = false);
3695
3709
 
3696
- const focus_handler = () => $$invalidate(3, _hovering = false);
3710
+ const focus_handler = () => $$invalidate(4, _hovering = false);
3697
3711
 
3698
- const blur_handler = () => $$invalidate(3, _hovering = false);
3712
+ const blur_handler = () => $$invalidate(4, _hovering = false);
3699
3713
 
3700
3714
  $$self.$$set = $$props => {
3701
3715
  if ('leadingicon' in $$props) $$invalidate(0, leadingicon = $$props.leadingicon);
3702
- if ('error' in $$props) $$invalidate(7, error = $$props.error);
3703
- if ('deletable' in $$props) $$invalidate(8, deletable = $$props.deletable);
3716
+ if ('error' in $$props) $$invalidate(8, error = $$props.error);
3717
+ if ('deletable' in $$props) $$invalidate(9, deletable = $$props.deletable);
3704
3718
  if ('content' in $$props) $$invalidate(1, content = $$props.content);
3719
+ if ('variant' in $$props) $$invalidate(2, variant = $$props.variant);
3705
3720
  };
3706
3721
 
3707
3722
  $$self.$$.update = () => {
3708
3723
  if ($$self.$$.dirty &
3709
3724
  /*error*/
3710
- 128) {
3711
- $$invalidate(4, _error = toBoolean(error));
3725
+ 256) {
3726
+ $$invalidate(5, _error = toBoolean(error));
3712
3727
  }
3713
3728
 
3714
3729
  if ($$self.$$.dirty &
3715
3730
  /*deletable*/
3716
- 256) {
3717
- $$invalidate(5, _deletable = toBoolean(deletable));
3731
+ 512) {
3732
+ $$invalidate(6, _deletable = toBoolean(deletable));
3718
3733
  }
3719
3734
  };
3720
3735
 
3721
- return [leadingicon, content, el, _hovering, _error, _deletable, onDelete, error, deletable, div1_binding, click_handler, mouseover_handler, mouseout_handler, focus_handler, blur_handler];
3736
+ return [leadingicon, content, variant, el, _hovering, _error, _deletable, onDelete, error, deletable, div1_binding, click_handler, mouseover_handler, mouseout_handler, focus_handler, blur_handler];
3722
3737
  }
3723
3738
 
3724
3739
  class Chip extends SvelteElement {
@@ -3731,9 +3746,10 @@ class Chip extends SvelteElement {
3731
3746
  customElement: true
3732
3747
  }, instance$s, create_fragment$u, safe_not_equal, {
3733
3748
  leadingicon: 0,
3734
- error: 7,
3735
- deletable: 8,
3736
- content: 1
3749
+ error: 8,
3750
+ deletable: 9,
3751
+ content: 1,
3752
+ variant: 2
3737
3753
  }, null);
3738
3754
 
3739
3755
  if (options) {
@@ -3749,7 +3765,7 @@ class Chip extends SvelteElement {
3749
3765
  }
3750
3766
 
3751
3767
  static get observedAttributes() {
3752
- return ["leadingicon", "error", "deletable", "content"];
3768
+ return ["leadingicon", "error", "deletable", "content", "variant"];
3753
3769
  }
3754
3770
 
3755
3771
  get leadingicon() {
@@ -3764,7 +3780,7 @@ class Chip extends SvelteElement {
3764
3780
  }
3765
3781
 
3766
3782
  get error() {
3767
- return this.$$.ctx[7];
3783
+ return this.$$.ctx[8];
3768
3784
  }
3769
3785
 
3770
3786
  set error(error) {
@@ -3775,7 +3791,7 @@ class Chip extends SvelteElement {
3775
3791
  }
3776
3792
 
3777
3793
  get deletable() {
3778
- return this.$$.ctx[8];
3794
+ return this.$$.ctx[9];
3779
3795
  }
3780
3796
 
3781
3797
  set deletable(deletable) {
@@ -3796,6 +3812,17 @@ class Chip extends SvelteElement {
3796
3812
  flush();
3797
3813
  }
3798
3814
 
3815
+ get variant() {
3816
+ return this.$$.ctx[2];
3817
+ }
3818
+
3819
+ set variant(variant) {
3820
+ this.$$set({
3821
+ variant
3822
+ });
3823
+ flush();
3824
+ }
3825
+
3799
3826
  }
3800
3827
 
3801
3828
  customElements.define("goa-chip", Chip);
@@ -14406,6 +14433,7 @@ const GoAChip = ({
14406
14433
  leadingIcon: _leadingIcon = "",
14407
14434
  deletable: _deletable = false,
14408
14435
  error: _error = false,
14436
+ variant,
14409
14437
  content,
14410
14438
  onClick
14411
14439
  }) => {
@@ -14429,7 +14457,8 @@ const GoAChip = ({
14429
14457
  leadingicon: _leadingIcon,
14430
14458
  error: _error,
14431
14459
  deletable: _deletable,
14432
- content: content
14460
+ content: content,
14461
+ variant: variant
14433
14462
  }, void 0);
14434
14463
  };
14435
14464
 
@@ -14799,38 +14828,55 @@ const GoAInputPassword = props => {
14799
14828
  const GoAInputDate = _a => {
14800
14829
  var {
14801
14830
  value,
14802
- min,
14803
- max
14831
+ min = "",
14832
+ max = ""
14804
14833
  } = _a,
14805
14834
  props = __rest(_a, ["value", "min", "max"]);
14806
14835
 
14807
- const _value = typeof value === "string" ? new Date(value) : value;
14836
+ const _format = value => {
14837
+ return format(value, "yyyy-MM-dd");
14838
+ };
14839
+
14840
+ const _value = _format(typeof value === "string" ? parseISO(value) : value);
14841
+
14842
+ const _min = min && _format(typeof min === "string" ? parseISO(min) : min);
14808
14843
 
14809
- const _min = min ? format(new Date(min), "yyyy-MM-dd") : "";
14844
+ const _max = max && _format(typeof max === "string" ? parseISO(max) : max);
14810
14845
 
14811
- const _max = max ? format(new Date(max), "yyyy-MM-dd") : "";
14846
+ const onDateChange = (name, value) => {
14847
+ props.onChange(name, parseISO(value));
14848
+ };
14812
14849
 
14813
14850
  return jsx(GoAInput, Object.assign({}, props, {
14851
+ onChange: onDateChange,
14814
14852
  min: _min,
14815
14853
  max: _max,
14816
- value: format(_value, "yyyy-MM-dd"),
14854
+ value: _value,
14817
14855
  type: "date"
14818
14856
  }), void 0);
14819
14857
  };
14820
14858
  const GoAInputTime = _a => {
14821
14859
  var {
14822
- value
14860
+ value,
14861
+ min = "",
14862
+ max = ""
14823
14863
  } = _a,
14824
- props = __rest(_a, ["value"]);
14864
+ props = __rest(_a, ["value", "min", "max"]);
14865
+
14866
+ const onDateChange = (name, value) => {
14867
+ props.onChange(name, parseISO(value));
14868
+ };
14825
14869
 
14826
14870
  try {
14827
- const d = typeof value === "string" ? new Date(value) : value;
14871
+ const d = typeof value === "string" ? parseISO(value) : value;
14828
14872
  return jsx(GoAInput, Object.assign({}, props, {
14873
+ onChange: onDateChange,
14829
14874
  value: format(d, "hh:mm"),
14830
14875
  type: "time"
14831
14876
  }), void 0);
14832
14877
  } catch (e) {
14833
14878
  return jsx(GoAInput, Object.assign({}, props, {
14879
+ onChange: onDateChange,
14834
14880
  value: value,
14835
14881
  type: "time"
14836
14882
  }), void 0);
@@ -14838,12 +14884,20 @@ const GoAInputTime = _a => {
14838
14884
  };
14839
14885
  const GoAInputDateTime = _a => {
14840
14886
  var {
14841
- value
14887
+ value,
14888
+ min = "",
14889
+ max = ""
14842
14890
  } = _a,
14843
- props = __rest(_a, ["value"]);
14891
+ props = __rest(_a, ["value", "min", "max"]);
14892
+
14893
+ const d = typeof value === "string" ? parseISO(value) : value;
14894
+
14895
+ const onDateChange = (name, value) => {
14896
+ props.onChange(name, parseISO(value));
14897
+ };
14844
14898
 
14845
- const d = typeof value === "string" ? new Date(value) : value;
14846
14899
  return jsx(GoAInput, Object.assign({}, props, {
14900
+ onChange: onDateChange,
14847
14901
  value: format(d, "yyyy-MM-dd'T'hh:mm"),
14848
14902
  type: "datetime-local"
14849
14903
  }), void 0);
@@ -14887,13 +14941,18 @@ const GoAInputMonth = props => {
14887
14941
  };
14888
14942
  const GoAInputNumber = _a => {
14889
14943
  var {
14890
- min,
14891
- max,
14944
+ min = Number.MIN_VALUE,
14945
+ max = Number.MAX_VALUE,
14892
14946
  value
14893
14947
  } = _a,
14894
14948
  props = __rest(_a, ["min", "max", "value"]);
14895
14949
 
14950
+ const onNumberChange = (name, value) => {
14951
+ props.onChange(name, parseInt(value));
14952
+ };
14953
+
14896
14954
  return jsx(GoAInput, Object.assign({}, props, {
14955
+ onChange: onNumberChange,
14897
14956
  min: min === null || min === void 0 ? void 0 : min.toString(),
14898
14957
  max: max === null || max === void 0 ? void 0 : max.toString(),
14899
14958
  value: value.toString(),
@@ -3497,7 +3497,7 @@
3497
3497
  }
3498
3498
 
3499
3499
  };
3500
- } // (42:2) {#if _deletable}
3500
+ } // (44:2) {#if _deletable}
3501
3501
 
3502
3502
 
3503
3503
  function create_if_block$e(ctx) {
@@ -3513,14 +3513,14 @@
3513
3513
  set_custom_element_data(goa_icon, "type", "close-circle");
3514
3514
  set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value =
3515
3515
  /*_error*/
3516
- ctx[4] ? "var(--goa-color-status-emergency)" :
3516
+ ctx[5] ? "var(--goa-color-status-emergency)" :
3517
3517
  /*_hovering*/
3518
- ctx[3] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)");
3518
+ ctx[4] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)");
3519
3519
  set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value =
3520
3520
  /*_error*/
3521
- ctx[4] ?
3521
+ ctx[5] ?
3522
3522
  /*_hovering*/
3523
- ctx[3] ? 1 : 0.5 : 1);
3523
+ ctx[4] ? 1 : 0.5 : 1);
3524
3524
  },
3525
3525
 
3526
3526
  m(target, anchor) {
@@ -3530,21 +3530,21 @@
3530
3530
  p(ctx, dirty) {
3531
3531
  if (dirty &
3532
3532
  /*_error, _hovering*/
3533
- 24 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value =
3533
+ 48 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value =
3534
3534
  /*_error*/
3535
- ctx[4] ? "var(--goa-color-status-emergency)" :
3535
+ ctx[5] ? "var(--goa-color-status-emergency)" :
3536
3536
  /*_hovering*/
3537
- ctx[3] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)")) {
3537
+ ctx[4] ? "var(--goa-color-interactive--hover)" : "var(--color-gray-600)")) {
3538
3538
  set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value);
3539
3539
  }
3540
3540
 
3541
3541
  if (dirty &
3542
3542
  /*_error, _hovering*/
3543
- 24 && goa_icon_opacity_value !== (goa_icon_opacity_value =
3543
+ 48 && goa_icon_opacity_value !== (goa_icon_opacity_value =
3544
3544
  /*_error*/
3545
- ctx[4] ?
3545
+ ctx[5] ?
3546
3546
  /*_hovering*/
3547
- ctx[3] ? 1 : 0.5 : 1)) {
3547
+ ctx[4] ? 1 : 0.5 : 1)) {
3548
3548
  set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value);
3549
3549
  }
3550
3550
  },
@@ -3569,7 +3569,7 @@
3569
3569
  ctx[0] && create_if_block_1$8(ctx);
3570
3570
  let if_block1 =
3571
3571
  /*_deletable*/
3572
- ctx[5] && create_if_block$e(ctx);
3572
+ ctx[6] && create_if_block$e(ctx);
3573
3573
  return {
3574
3574
  c() {
3575
3575
  div1 = element("div");
@@ -3588,10 +3588,13 @@
3588
3588
  attr(div1, "tabindex", "0");
3589
3589
  toggle_class(div1, "deletable",
3590
3590
  /*_deletable*/
3591
- ctx[5]);
3591
+ ctx[6]);
3592
3592
  toggle_class(div1, "error",
3593
3593
  /*_error*/
3594
- ctx[4]);
3594
+ ctx[5]);
3595
+ toggle_class(div1, "variant",
3596
+ /*variant*/
3597
+ ctx[2]);
3595
3598
  },
3596
3599
 
3597
3600
  m(target, anchor) {
@@ -3604,20 +3607,20 @@
3604
3607
  if (if_block1) if_block1.m(div1, null);
3605
3608
  /*div1_binding*/
3606
3609
 
3607
- ctx[9](div1);
3610
+ ctx[10](div1);
3608
3611
 
3609
3612
  if (!mounted) {
3610
3613
  dispose = [listen(div1, "click",
3611
3614
  /*click_handler*/
3612
- ctx[10]), listen(div1, "mouseover",
3615
+ ctx[11]), listen(div1, "mouseover",
3613
3616
  /*mouseover_handler*/
3614
- ctx[11]), listen(div1, "mouseout",
3617
+ ctx[12]), listen(div1, "mouseout",
3615
3618
  /*mouseout_handler*/
3616
- ctx[12]), listen(div1, "focus",
3619
+ ctx[13]), listen(div1, "focus",
3617
3620
  /*focus_handler*/
3618
- ctx[13]), listen(div1, "blur",
3621
+ ctx[14]), listen(div1, "blur",
3619
3622
  /*blur_handler*/
3620
- ctx[14])];
3623
+ ctx[15])];
3621
3624
  mounted = true;
3622
3625
  }
3623
3626
  },
@@ -3646,7 +3649,7 @@
3646
3649
 
3647
3650
  if (
3648
3651
  /*_deletable*/
3649
- ctx[5]) {
3652
+ ctx[6]) {
3650
3653
  if (if_block1) {
3651
3654
  if_block1.p(ctx, dirty);
3652
3655
  } else {
@@ -3661,18 +3664,26 @@
3661
3664
 
3662
3665
  if (dirty &
3663
3666
  /*_deletable*/
3664
- 32) {
3667
+ 64) {
3665
3668
  toggle_class(div1, "deletable",
3666
3669
  /*_deletable*/
3667
- ctx[5]);
3670
+ ctx[6]);
3668
3671
  }
3669
3672
 
3670
3673
  if (dirty &
3671
3674
  /*_error*/
3672
- 16) {
3675
+ 32) {
3673
3676
  toggle_class(div1, "error",
3674
3677
  /*_error*/
3675
- ctx[4]);
3678
+ ctx[5]);
3679
+ }
3680
+
3681
+ if (dirty &
3682
+ /*variant*/
3683
+ 4) {
3684
+ toggle_class(div1, "variant",
3685
+ /*variant*/
3686
+ ctx[2]);
3676
3687
  }
3677
3688
  },
3678
3689
 
@@ -3685,7 +3696,7 @@
3685
3696
  if (if_block1) if_block1.d();
3686
3697
  /*div1_binding*/
3687
3698
 
3688
- ctx[9](null);
3699
+ ctx[10](null);
3689
3700
  mounted = false;
3690
3701
  run_all(dispose);
3691
3702
  }
@@ -3706,6 +3717,9 @@
3706
3717
  let {
3707
3718
  content
3708
3719
  } = $$props;
3720
+ let {
3721
+ variant
3722
+ } = $$props;
3709
3723
  let el;
3710
3724
  let _hovering = false; // booleans
3711
3725
 
@@ -3724,42 +3738,43 @@
3724
3738
  function div1_binding($$value) {
3725
3739
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
3726
3740
  el = $$value;
3727
- $$invalidate(2, el);
3741
+ $$invalidate(3, el);
3728
3742
  });
3729
3743
  }
3730
3744
 
3731
3745
  const click_handler = e => _deletable && onDelete(e);
3732
3746
 
3733
- const mouseover_handler = () => $$invalidate(3, _hovering = true);
3747
+ const mouseover_handler = () => $$invalidate(4, _hovering = true);
3734
3748
 
3735
- const mouseout_handler = () => $$invalidate(3, _hovering = false);
3749
+ const mouseout_handler = () => $$invalidate(4, _hovering = false);
3736
3750
 
3737
- const focus_handler = () => $$invalidate(3, _hovering = false);
3751
+ const focus_handler = () => $$invalidate(4, _hovering = false);
3738
3752
 
3739
- const blur_handler = () => $$invalidate(3, _hovering = false);
3753
+ const blur_handler = () => $$invalidate(4, _hovering = false);
3740
3754
 
3741
3755
  $$self.$$set = $$props => {
3742
3756
  if ('leadingicon' in $$props) $$invalidate(0, leadingicon = $$props.leadingicon);
3743
- if ('error' in $$props) $$invalidate(7, error = $$props.error);
3744
- if ('deletable' in $$props) $$invalidate(8, deletable = $$props.deletable);
3757
+ if ('error' in $$props) $$invalidate(8, error = $$props.error);
3758
+ if ('deletable' in $$props) $$invalidate(9, deletable = $$props.deletable);
3745
3759
  if ('content' in $$props) $$invalidate(1, content = $$props.content);
3760
+ if ('variant' in $$props) $$invalidate(2, variant = $$props.variant);
3746
3761
  };
3747
3762
 
3748
3763
  $$self.$$.update = () => {
3749
3764
  if ($$self.$$.dirty &
3750
3765
  /*error*/
3751
- 128) {
3752
- $$invalidate(4, _error = toBoolean(error));
3766
+ 256) {
3767
+ $$invalidate(5, _error = toBoolean(error));
3753
3768
  }
3754
3769
 
3755
3770
  if ($$self.$$.dirty &
3756
3771
  /*deletable*/
3757
- 256) {
3758
- $$invalidate(5, _deletable = toBoolean(deletable));
3772
+ 512) {
3773
+ $$invalidate(6, _deletable = toBoolean(deletable));
3759
3774
  }
3760
3775
  };
3761
3776
 
3762
- return [leadingicon, content, el, _hovering, _error, _deletable, onDelete, error, deletable, div1_binding, click_handler, mouseover_handler, mouseout_handler, focus_handler, blur_handler];
3777
+ return [leadingicon, content, variant, el, _hovering, _error, _deletable, onDelete, error, deletable, div1_binding, click_handler, mouseover_handler, mouseout_handler, focus_handler, blur_handler];
3763
3778
  }
3764
3779
 
3765
3780
  class Chip extends SvelteElement {
@@ -3772,9 +3787,10 @@
3772
3787
  customElement: true
3773
3788
  }, instance$s, create_fragment$u, safe_not_equal, {
3774
3789
  leadingicon: 0,
3775
- error: 7,
3776
- deletable: 8,
3777
- content: 1
3790
+ error: 8,
3791
+ deletable: 9,
3792
+ content: 1,
3793
+ variant: 2
3778
3794
  }, null);
3779
3795
 
3780
3796
  if (options) {
@@ -3790,7 +3806,7 @@
3790
3806
  }
3791
3807
 
3792
3808
  static get observedAttributes() {
3793
- return ["leadingicon", "error", "deletable", "content"];
3809
+ return ["leadingicon", "error", "deletable", "content", "variant"];
3794
3810
  }
3795
3811
 
3796
3812
  get leadingicon() {
@@ -3805,7 +3821,7 @@
3805
3821
  }
3806
3822
 
3807
3823
  get error() {
3808
- return this.$$.ctx[7];
3824
+ return this.$$.ctx[8];
3809
3825
  }
3810
3826
 
3811
3827
  set error(error) {
@@ -3816,7 +3832,7 @@
3816
3832
  }
3817
3833
 
3818
3834
  get deletable() {
3819
- return this.$$.ctx[8];
3835
+ return this.$$.ctx[9];
3820
3836
  }
3821
3837
 
3822
3838
  set deletable(deletable) {
@@ -3837,6 +3853,17 @@
3837
3853
  flush();
3838
3854
  }
3839
3855
 
3856
+ get variant() {
3857
+ return this.$$.ctx[2];
3858
+ }
3859
+
3860
+ set variant(variant) {
3861
+ this.$$set({
3862
+ variant
3863
+ });
3864
+ flush();
3865
+ }
3866
+
3840
3867
  }
3841
3868
 
3842
3869
  customElements.define("goa-chip", Chip);
@@ -14489,6 +14516,7 @@
14489
14516
  deletable = _c === void 0 ? false : _c,
14490
14517
  _d = _a.error,
14491
14518
  error = _d === void 0 ? false : _d,
14519
+ variant = _a.variant,
14492
14520
  content = _a.content,
14493
14521
  onClick = _a.onClick;
14494
14522
  var el = react.useRef(null);
@@ -14511,7 +14539,8 @@
14511
14539
  leadingicon: leadingIcon,
14512
14540
  error: error,
14513
14541
  deletable: deletable,
14514
- content: content
14542
+ content: content,
14543
+ variant: variant
14515
14544
  }, void 0);
14516
14545
  };
14517
14546
 
@@ -14844,46 +14873,73 @@
14844
14873
  };
14845
14874
  var GoAInputDate = function GoAInputDate(_a) {
14846
14875
  var value = _a.value,
14847
- min = _a.min,
14848
- max = _a.max,
14876
+ _b = _a.min,
14877
+ min = _b === void 0 ? "" : _b,
14878
+ _c = _a.max,
14879
+ max = _c === void 0 ? "" : _c,
14849
14880
  props = __rest(_a, ["value", "min", "max"]);
14850
14881
 
14851
- var _value = typeof value === "string" ? new Date(value) : value;
14882
+ var _format = function _format(value) {
14883
+ return dateFns.format(value, "yyyy-MM-dd");
14884
+ };
14885
+
14886
+ var _value = _format(typeof value === "string" ? dateFns.parseISO(value) : value);
14852
14887
 
14853
- var _min = min ? dateFns.format(new Date(min), "yyyy-MM-dd") : "";
14888
+ var _min = min && _format(typeof min === "string" ? dateFns.parseISO(min) : min);
14854
14889
 
14855
- var _max = max ? dateFns.format(new Date(max), "yyyy-MM-dd") : "";
14890
+ var _max = max && _format(typeof max === "string" ? dateFns.parseISO(max) : max);
14891
+
14892
+ var onDateChange = function onDateChange(name, value) {
14893
+ props.onChange(name, dateFns.parseISO(value));
14894
+ };
14856
14895
 
14857
14896
  return jsxRuntime.jsx(GoAInput, __assign({}, props, {
14897
+ onChange: onDateChange,
14858
14898
  min: _min,
14859
14899
  max: _max,
14860
- value: dateFns.format(_value, "yyyy-MM-dd"),
14900
+ value: _value,
14861
14901
  type: "date"
14862
14902
  }), void 0);
14863
14903
  };
14864
14904
  var GoAInputTime = function GoAInputTime(_a) {
14865
- var value = _a.value,
14866
- props = __rest(_a, ["value"]);
14905
+ var value = _a.value;
14906
+ _a.min;
14907
+ _a.max;
14908
+ var props = __rest(_a, ["value", "min", "max"]);
14909
+
14910
+ var onDateChange = function onDateChange(name, value) {
14911
+ props.onChange(name, dateFns.parseISO(value));
14912
+ };
14867
14913
 
14868
14914
  try {
14869
- var d = typeof value === "string" ? new Date(value) : value;
14915
+ var d = typeof value === "string" ? dateFns.parseISO(value) : value;
14870
14916
  return jsxRuntime.jsx(GoAInput, __assign({}, props, {
14917
+ onChange: onDateChange,
14871
14918
  value: dateFns.format(d, "hh:mm"),
14872
14919
  type: "time"
14873
14920
  }), void 0);
14874
14921
  } catch (e) {
14875
14922
  return jsxRuntime.jsx(GoAInput, __assign({}, props, {
14923
+ onChange: onDateChange,
14876
14924
  value: value,
14877
14925
  type: "time"
14878
14926
  }), void 0);
14879
14927
  }
14880
14928
  };
14881
14929
  var GoAInputDateTime = function GoAInputDateTime(_a) {
14882
- var value = _a.value,
14883
- props = __rest(_a, ["value"]);
14930
+ var value = _a.value;
14931
+ _a.min;
14932
+ _a.max;
14933
+ var props = __rest(_a, ["value", "min", "max"]);
14934
+
14935
+ var d = typeof value === "string" ? dateFns.parseISO(value) : value;
14936
+
14937
+ var onDateChange = function onDateChange(name, value) {
14938
+ props.onChange(name, dateFns.parseISO(value));
14939
+ };
14884
14940
 
14885
- var d = typeof value === "string" ? new Date(value) : value;
14886
14941
  return jsxRuntime.jsx(GoAInput, __assign({}, props, {
14942
+ onChange: onDateChange,
14887
14943
  value: dateFns.format(d, "yyyy-MM-dd'T'hh:mm"),
14888
14944
  type: "datetime-local"
14889
14945
  }), void 0);
@@ -14928,12 +14984,19 @@
14928
14984
  }), void 0);
14929
14985
  };
14930
14986
  var GoAInputNumber = function GoAInputNumber(_a) {
14931
- var min = _a.min,
14932
- max = _a.max,
14987
+ var _b = _a.min,
14988
+ min = _b === void 0 ? Number.MIN_VALUE : _b,
14989
+ _c = _a.max,
14990
+ max = _c === void 0 ? Number.MAX_VALUE : _c,
14933
14991
  value = _a.value,
14934
14992
  props = __rest(_a, ["min", "max", "value"]);
14935
14993
 
14994
+ var onNumberChange = function onNumberChange(name, value) {
14995
+ props.onChange(name, parseInt(value));
14996
+ };
14997
+
14936
14998
  return jsxRuntime.jsx(GoAInput, __assign({}, props, {
14999
+ onChange: onNumberChange,
14937
15000
  min: min === null || min === void 0 ? void 0 : min.toString(),
14938
15001
  max: max === null || max === void 0 ? void 0 : max.toString(),
14939
15002
  value: value.toString(),