@wistia/ui 0.10.4-beta.f468ee4b.d928e02 → 0.10.4
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.cjs +8 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.mjs +8 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -550,7 +550,6 @@ declare const Avatar: {
|
|
|
550
550
|
displayName: string;
|
|
551
551
|
};
|
|
552
552
|
|
|
553
|
-
type BadgeVariants = 'default' | 'outline';
|
|
554
553
|
type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
555
554
|
/**
|
|
556
555
|
* Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
|
|
@@ -564,10 +563,6 @@ type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
564
563
|
* The text to display in the `Badge`
|
|
565
564
|
*/
|
|
566
565
|
label: ReactNode;
|
|
567
|
-
/**
|
|
568
|
-
* The variant of the `Badge`
|
|
569
|
-
*/
|
|
570
|
-
variant?: BadgeVariants;
|
|
571
566
|
};
|
|
572
567
|
/**
|
|
573
568
|
* A `Badge` is a compact label, with optional icon, to convey status or context.
|
|
@@ -585,10 +580,6 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
585
580
|
* The text to display in the `Badge`
|
|
586
581
|
*/
|
|
587
582
|
label: ReactNode;
|
|
588
|
-
/**
|
|
589
|
-
* The variant of the `Badge`
|
|
590
|
-
*/
|
|
591
|
-
variant?: BadgeVariants;
|
|
592
583
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
593
584
|
|
|
594
585
|
type UnknownRecord = Record<string, unknown>;
|
|
@@ -3339,7 +3330,7 @@ type ComboboxProps = {
|
|
|
3339
3330
|
*/
|
|
3340
3331
|
searchValue: string;
|
|
3341
3332
|
/**
|
|
3342
|
-
*
|
|
3333
|
+
* vent that fires when a value is selected
|
|
3343
3334
|
*/
|
|
3344
3335
|
onChange: (value: string[]) => void;
|
|
3345
3336
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -550,7 +550,6 @@ declare const Avatar: {
|
|
|
550
550
|
displayName: string;
|
|
551
551
|
};
|
|
552
552
|
|
|
553
|
-
type BadgeVariants = 'default' | 'outline';
|
|
554
553
|
type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
555
554
|
/**
|
|
556
555
|
* Sets the [color scheme](../?path=/docs/docs-color-schemes--docs)
|
|
@@ -564,10 +563,6 @@ type BadgeProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
564
563
|
* The text to display in the `Badge`
|
|
565
564
|
*/
|
|
566
565
|
label: ReactNode;
|
|
567
|
-
/**
|
|
568
|
-
* The variant of the `Badge`
|
|
569
|
-
*/
|
|
570
|
-
variant?: BadgeVariants;
|
|
571
566
|
};
|
|
572
567
|
/**
|
|
573
568
|
* A `Badge` is a compact label, with optional icon, to convey status or context.
|
|
@@ -585,10 +580,6 @@ declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProp
|
|
|
585
580
|
* The text to display in the `Badge`
|
|
586
581
|
*/
|
|
587
582
|
label: ReactNode;
|
|
588
|
-
/**
|
|
589
|
-
* The variant of the `Badge`
|
|
590
|
-
*/
|
|
591
|
-
variant?: BadgeVariants;
|
|
592
583
|
} & react.RefAttributes<HTMLDivElement>>;
|
|
593
584
|
|
|
594
585
|
type UnknownRecord = Record<string, unknown>;
|
|
@@ -3339,7 +3330,7 @@ type ComboboxProps = {
|
|
|
3339
3330
|
*/
|
|
3340
3331
|
searchValue: string;
|
|
3341
3332
|
/**
|
|
3342
|
-
*
|
|
3333
|
+
* vent that fires when a value is selected
|
|
3343
3334
|
*/
|
|
3344
3335
|
onChange: (value: string[]) => void;
|
|
3345
3336
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.10.4
|
|
3
|
+
* @license @wistia/ui v0.10.4
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7691,7 +7691,6 @@ var StyledBadge = styled10.div`
|
|
|
7691
7691
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7692
7692
|
align-items: center;
|
|
7693
7693
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
7694
|
-
box-shadow: ${({ $variant }) => $variant === "outline" ? "inset 0 0 0 1px var(--wui-color-border)" : "none"};
|
|
7695
7694
|
border-radius: var(--wui-border-radius-rounded);
|
|
7696
7695
|
color: var(--wui-color-text);
|
|
7697
7696
|
display: inline-flex;
|
|
@@ -7699,21 +7698,17 @@ var StyledBadge = styled10.div`
|
|
|
7699
7698
|
font-weight: var(--wui-typography-label-4-weight);
|
|
7700
7699
|
gap: var(--wui-space-01);
|
|
7701
7700
|
justify-content: center;
|
|
7702
|
-
line-height: var(--wui-typography-label-3-line-height);
|
|
7703
7701
|
padding: var(--wui-space-01) var(--wui-space-02);
|
|
7704
7702
|
width: fit-content;
|
|
7705
7703
|
|
|
7706
|
-
/* Icon component size
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
height: 12px;
|
|
7711
|
-
width: 12px;
|
|
7712
|
-
}
|
|
7704
|
+
/* Icon component size */
|
|
7705
|
+
svg {
|
|
7706
|
+
height: 12px;
|
|
7707
|
+
width: 12px;
|
|
7713
7708
|
}
|
|
7714
7709
|
`;
|
|
7715
7710
|
var Badge = forwardRef4(
|
|
7716
|
-
({ colorScheme = "inherit", label, icon,
|
|
7711
|
+
({ colorScheme = "inherit", label, icon, ...props }, ref) => {
|
|
7717
7712
|
const hasIcon = isNotNil9(icon);
|
|
7718
7713
|
return /* @__PURE__ */ jsxs11(
|
|
7719
7714
|
StyledBadge,
|
|
@@ -7722,7 +7717,6 @@ var Badge = forwardRef4(
|
|
|
7722
7717
|
...props,
|
|
7723
7718
|
$colorScheme: colorScheme,
|
|
7724
7719
|
$hasIcon: hasIcon,
|
|
7725
|
-
$variant: variant,
|
|
7726
7720
|
children: [
|
|
7727
7721
|
hasIcon ? icon : null,
|
|
7728
7722
|
/* @__PURE__ */ jsx200("span", { children: label })
|
|
@@ -9774,23 +9768,6 @@ var EditableHeading = ({
|
|
|
9774
9768
|
import { forwardRef as forwardRef12, useRef as useRef11, useMemo as useMemo6, createContext as createContext4, useState as useState11, useId as useId2 } from "react";
|
|
9775
9769
|
import styled34 from "styled-components";
|
|
9776
9770
|
import { isNotUndefined as isNotUndefined7, isUndefined as isUndefined3 } from "@wistia/type-guards";
|
|
9777
|
-
|
|
9778
|
-
// src/components/Form/serializeFormData.tsx
|
|
9779
|
-
var ARRAY_SUFFIX = "[]";
|
|
9780
|
-
var serializeFormData = (formData) => {
|
|
9781
|
-
const data = {};
|
|
9782
|
-
formData.forEach((value, key) => {
|
|
9783
|
-
if (key.endsWith(ARRAY_SUFFIX)) {
|
|
9784
|
-
const newKey = key.slice(0, -ARRAY_SUFFIX.length);
|
|
9785
|
-
data[newKey] = formData.getAll(key);
|
|
9786
|
-
} else {
|
|
9787
|
-
data[key] = value;
|
|
9788
|
-
}
|
|
9789
|
-
});
|
|
9790
|
-
return data;
|
|
9791
|
-
};
|
|
9792
|
-
|
|
9793
|
-
// src/components/Form/Form.tsx
|
|
9794
9771
|
import { jsx as jsx226 } from "react/jsx-runtime";
|
|
9795
9772
|
var StyledForm = styled34.form`
|
|
9796
9773
|
--form-default-width: 690px;
|
|
@@ -9821,7 +9798,7 @@ var FormComponent = ({
|
|
|
9821
9798
|
const autoId = useId2();
|
|
9822
9799
|
const id = props.id ?? autoId;
|
|
9823
9800
|
const handleValidate = (nextFormData) => {
|
|
9824
|
-
const nextData =
|
|
9801
|
+
const nextData = Object.fromEntries(nextFormData.entries());
|
|
9825
9802
|
if (isUndefined3(validate)) {
|
|
9826
9803
|
return {};
|
|
9827
9804
|
}
|
|
@@ -9904,7 +9881,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9904
9881
|
setError(null);
|
|
9905
9882
|
return;
|
|
9906
9883
|
}
|
|
9907
|
-
const nextData =
|
|
9884
|
+
const nextData = Object.fromEntries(nextFormData.entries());
|
|
9908
9885
|
setIsPending(true);
|
|
9909
9886
|
try {
|
|
9910
9887
|
const result = await action(data, nextData);
|