@wistia/ui 0.6.20 → 0.6.21

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.mts CHANGED
@@ -439,6 +439,7 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
439
439
 
440
440
  type AvatarInstanceType = 'image' | 'initials';
441
441
  type AvatarImageLoadStateType = 'error' | 'loaded' | 'loading';
442
+ type AvatarSizeType = 'lg' | 'md' | 'sm';
442
443
  type AvatarStatus = {
443
444
  type: AvatarInstanceType;
444
445
  state: AvatarImageLoadStateType;
@@ -461,7 +462,7 @@ type AvatarProps = ComponentPropsWithoutRef<'div'> & {
461
462
  /**
462
463
  * A predefined size for the avatar
463
464
  */
464
- size?: 'lg' | 'md' | 'sm';
465
+ size?: AvatarSizeType;
465
466
  /**
466
467
  * A callback that is invoked after the image has loaded or failed to load
467
468
  */
@@ -826,7 +827,8 @@ declare const Card: {
826
827
  displayName: string;
827
828
  };
828
829
 
829
- type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
830
+ type CheckboxSizeType = 'lg' | 'md' | 'sm';
831
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "size"> & {
830
832
  /**
831
833
  * Indicates the state of the checkbox
832
834
  */
@@ -835,11 +837,6 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
835
837
  * Disables checkbox
836
838
  */
837
839
  disabled?: boolean;
838
- /**
839
- * @ignore
840
- * Force a Checkbox into a particular css state (for debugging)
841
- */
842
- forceState?: 'focus' | 'hover';
843
840
  /**
844
841
  * Optional ID attribute
845
842
  */
@@ -859,17 +856,20 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
859
856
  /**
860
857
  * Callback function invoked when the value changes
861
858
  */
862
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
859
+ onChange?: (event: ChangeEvent) => unknown;
863
860
  /**
864
- * Make Input a required element
861
+ * Indicates if the input is required
865
862
  */
866
863
  required?: boolean;
864
+ /**
865
+ * A predefined size for the checkbox
866
+ */
867
+ size?: CheckboxSizeType;
867
868
  /**
868
869
  * The value given as data when submitted with a `name`.
869
870
  */
870
871
  value?: string;
871
- };
872
- declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
872
+ } & react.RefAttributes<HTMLInputElement>>;
873
873
 
874
874
  type ClickRegionProps = {
875
875
  /**
@@ -2247,7 +2247,8 @@ declare const ProgressBar: {
2247
2247
  displayName: string;
2248
2248
  };
2249
2249
 
2250
- type RadioProps = ComponentPropsWithoutRef<'input'> & {
2250
+ type RadioSizeType = 'lg' | 'md' | 'sm';
2251
+ type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'onChange' | 'size'> & {
2251
2252
  /**
2252
2253
  * Indicates the state of the radio
2253
2254
  */
@@ -2267,7 +2268,7 @@ type RadioProps = ComponentPropsWithoutRef<'input'> & {
2267
2268
  /**
2268
2269
  * The label for the input
2269
2270
  */
2270
- label: JSX.Element | string;
2271
+ label?: JSX.Element | string;
2271
2272
  /**
2272
2273
  * The description for the radio
2273
2274
  */
@@ -2282,15 +2283,19 @@ type RadioProps = ComponentPropsWithoutRef<'input'> & {
2282
2283
  */
2283
2284
  onChange?: (event: ChangeEvent) => unknown;
2284
2285
  /**
2285
- * Make Radio a required element
2286
+ * Indicates if the input is required
2286
2287
  */
2287
2288
  required?: boolean;
2289
+ /**
2290
+ * A predefined size for the radio
2291
+ */
2292
+ size?: RadioSizeType;
2288
2293
  /**
2289
2294
  * The value attribute of the input
2290
2295
  */
2291
2296
  value?: string;
2292
2297
  };
2293
- declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
2298
+ declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "size"> & {
2294
2299
  /**
2295
2300
  * Indicates the state of the radio
2296
2301
  */
@@ -2310,7 +2315,7 @@ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
2310
2315
  /**
2311
2316
  * The label for the input
2312
2317
  */
2313
- label: JSX.Element | string;
2318
+ label?: JSX.Element | string;
2314
2319
  /**
2315
2320
  * The description for the radio
2316
2321
  */
@@ -2325,9 +2330,13 @@ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
2325
2330
  */
2326
2331
  onChange?: (event: ChangeEvent) => unknown;
2327
2332
  /**
2328
- * Make Radio a required element
2333
+ * Indicates if the input is required
2329
2334
  */
2330
2335
  required?: boolean;
2336
+ /**
2337
+ * A predefined size for the radio
2338
+ */
2339
+ size?: RadioSizeType;
2331
2340
  /**
2332
2341
  * The value attribute of the input
2333
2342
  */
@@ -2680,6 +2689,10 @@ type TagProps = ComponentPropsWithoutRef<'div'> & {
2680
2689
  * Valid URL for the `Tag` label to link to
2681
2690
  */
2682
2691
  href?: string;
2692
+ /**
2693
+ * Optional icon to display before the label
2694
+ */
2695
+ icon?: JSX.Element | undefined;
2683
2696
  /**
2684
2697
  * Text label for the `Tag`
2685
2698
  */
@@ -2705,6 +2718,10 @@ declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<
2705
2718
  * Valid URL for the `Tag` label to link to
2706
2719
  */
2707
2720
  href?: string;
2721
+ /**
2722
+ * Optional icon to display before the label
2723
+ */
2724
+ icon?: JSX.Element | undefined;
2708
2725
  /**
2709
2726
  * Text label for the `Tag`
2710
2727
  */
package/dist/index.d.ts CHANGED
@@ -439,6 +439,7 @@ declare const ActionButton: react.ForwardRefExoticComponent<(Omit<{
439
439
 
440
440
  type AvatarInstanceType = 'image' | 'initials';
441
441
  type AvatarImageLoadStateType = 'error' | 'loaded' | 'loading';
442
+ type AvatarSizeType = 'lg' | 'md' | 'sm';
442
443
  type AvatarStatus = {
443
444
  type: AvatarInstanceType;
444
445
  state: AvatarImageLoadStateType;
@@ -461,7 +462,7 @@ type AvatarProps = ComponentPropsWithoutRef<'div'> & {
461
462
  /**
462
463
  * A predefined size for the avatar
463
464
  */
464
- size?: 'lg' | 'md' | 'sm';
465
+ size?: AvatarSizeType;
465
466
  /**
466
467
  * A callback that is invoked after the image has loaded or failed to load
467
468
  */
@@ -826,7 +827,8 @@ declare const Card: {
826
827
  displayName: string;
827
828
  };
828
829
 
829
- type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
830
+ type CheckboxSizeType = 'lg' | 'md' | 'sm';
831
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "size"> & {
830
832
  /**
831
833
  * Indicates the state of the checkbox
832
834
  */
@@ -835,11 +837,6 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
835
837
  * Disables checkbox
836
838
  */
837
839
  disabled?: boolean;
838
- /**
839
- * @ignore
840
- * Force a Checkbox into a particular css state (for debugging)
841
- */
842
- forceState?: 'focus' | 'hover';
843
840
  /**
844
841
  * Optional ID attribute
845
842
  */
@@ -859,17 +856,20 @@ type CheckboxProps = Omit<ComponentPropsWithRef<'label'>, 'onChange'> & {
859
856
  /**
860
857
  * Callback function invoked when the value changes
861
858
  */
862
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
859
+ onChange?: (event: ChangeEvent) => unknown;
863
860
  /**
864
- * Make Input a required element
861
+ * Indicates if the input is required
865
862
  */
866
863
  required?: boolean;
864
+ /**
865
+ * A predefined size for the checkbox
866
+ */
867
+ size?: CheckboxSizeType;
867
868
  /**
868
869
  * The value given as data when submitted with a `name`.
869
870
  */
870
871
  value?: string;
871
- };
872
- declare const Checkbox: react.ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
872
+ } & react.RefAttributes<HTMLInputElement>>;
873
873
 
874
874
  type ClickRegionProps = {
875
875
  /**
@@ -2247,7 +2247,8 @@ declare const ProgressBar: {
2247
2247
  displayName: string;
2248
2248
  };
2249
2249
 
2250
- type RadioProps = ComponentPropsWithoutRef<'input'> & {
2250
+ type RadioSizeType = 'lg' | 'md' | 'sm';
2251
+ type RadioProps = Omit<ComponentPropsWithoutRef<'input'>, 'onChange' | 'size'> & {
2251
2252
  /**
2252
2253
  * Indicates the state of the radio
2253
2254
  */
@@ -2267,7 +2268,7 @@ type RadioProps = ComponentPropsWithoutRef<'input'> & {
2267
2268
  /**
2268
2269
  * The label for the input
2269
2270
  */
2270
- label: JSX.Element | string;
2271
+ label?: JSX.Element | string;
2271
2272
  /**
2272
2273
  * The description for the radio
2273
2274
  */
@@ -2282,15 +2283,19 @@ type RadioProps = ComponentPropsWithoutRef<'input'> & {
2282
2283
  */
2283
2284
  onChange?: (event: ChangeEvent) => unknown;
2284
2285
  /**
2285
- * Make Radio a required element
2286
+ * Indicates if the input is required
2286
2287
  */
2287
2288
  required?: boolean;
2289
+ /**
2290
+ * A predefined size for the radio
2291
+ */
2292
+ size?: RadioSizeType;
2288
2293
  /**
2289
2294
  * The value attribute of the input
2290
2295
  */
2291
2296
  value?: string;
2292
2297
  };
2293
- declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
2298
+ declare const Radio: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "size"> & {
2294
2299
  /**
2295
2300
  * Indicates the state of the radio
2296
2301
  */
@@ -2310,7 +2315,7 @@ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
2310
2315
  /**
2311
2316
  * The label for the input
2312
2317
  */
2313
- label: JSX.Element | string;
2318
+ label?: JSX.Element | string;
2314
2319
  /**
2315
2320
  * The description for the radio
2316
2321
  */
@@ -2325,9 +2330,13 @@ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
2325
2330
  */
2326
2331
  onChange?: (event: ChangeEvent) => unknown;
2327
2332
  /**
2328
- * Make Radio a required element
2333
+ * Indicates if the input is required
2329
2334
  */
2330
2335
  required?: boolean;
2336
+ /**
2337
+ * A predefined size for the radio
2338
+ */
2339
+ size?: RadioSizeType;
2331
2340
  /**
2332
2341
  * The value attribute of the input
2333
2342
  */
@@ -2680,6 +2689,10 @@ type TagProps = ComponentPropsWithoutRef<'div'> & {
2680
2689
  * Valid URL for the `Tag` label to link to
2681
2690
  */
2682
2691
  href?: string;
2692
+ /**
2693
+ * Optional icon to display before the label
2694
+ */
2695
+ icon?: JSX.Element | undefined;
2683
2696
  /**
2684
2697
  * Text label for the `Tag`
2685
2698
  */
@@ -2705,6 +2718,10 @@ declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<
2705
2718
  * Valid URL for the `Tag` label to link to
2706
2719
  */
2707
2720
  href?: string;
2721
+ /**
2722
+ * Optional icon to display before the label
2723
+ */
2724
+ icon?: JSX.Element | undefined;
2708
2725
  /**
2709
2726
  * Text label for the `Tag`
2710
2727
  */