@wistia/ui 0.0.18 → 0.0.20

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
@@ -126,7 +126,7 @@ type BadgeProps = ComponentPropsWithoutRef<'div'> & {
126
126
  label: string;
127
127
  };
128
128
  /**
129
- * A badge is a compact label, with optional icon, to convey status or context.
129
+ * A `Badge` is a compact label, with optional icon, to convey status or context.
130
130
  */
131
131
  declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
132
132
  /**
@@ -1392,6 +1392,93 @@ declare const CheckboxMenuItem: {
1392
1392
  displayName: string;
1393
1393
  };
1394
1394
 
1395
+ type RadioProps = ComponentPropsWithoutRef<'input'> & {
1396
+ /**
1397
+ * Indicates the state of the radio
1398
+ */
1399
+ checked?: boolean;
1400
+ /**
1401
+ * Disables input
1402
+ */
1403
+ disabled?: boolean;
1404
+ /**
1405
+ * Indicates that there is an error with the input
1406
+ */
1407
+ hasError?: boolean;
1408
+ /**
1409
+ * Provides an ID for the input
1410
+ */
1411
+ id?: string;
1412
+ /**
1413
+ * The label for the input
1414
+ */
1415
+ label: JSX.Element | string;
1416
+ /**
1417
+ * The description for the radio
1418
+ */
1419
+ description?: JSX.Element | string | undefined;
1420
+ /**
1421
+ * Should match the ID attribute of the radio.
1422
+ * Can be used to group together multiple radios
1423
+ */
1424
+ name?: string;
1425
+ /**
1426
+ * Callback function invoked when the value changes
1427
+ */
1428
+ onChange?: (event: ChangeEvent) => unknown;
1429
+ /**
1430
+ * Make Radio a required element
1431
+ */
1432
+ required?: boolean;
1433
+ /**
1434
+ * The value attribute of the input
1435
+ */
1436
+ value?: string;
1437
+ };
1438
+ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
1439
+ /**
1440
+ * Indicates the state of the radio
1441
+ */
1442
+ checked?: boolean;
1443
+ /**
1444
+ * Disables input
1445
+ */
1446
+ disabled?: boolean;
1447
+ /**
1448
+ * Indicates that there is an error with the input
1449
+ */
1450
+ hasError?: boolean;
1451
+ /**
1452
+ * Provides an ID for the input
1453
+ */
1454
+ id?: string;
1455
+ /**
1456
+ * The label for the input
1457
+ */
1458
+ label: JSX.Element | string;
1459
+ /**
1460
+ * The description for the radio
1461
+ */
1462
+ description?: JSX.Element | string | undefined;
1463
+ /**
1464
+ * Should match the ID attribute of the radio.
1465
+ * Can be used to group together multiple radios
1466
+ */
1467
+ name?: string;
1468
+ /**
1469
+ * Callback function invoked when the value changes
1470
+ */
1471
+ onChange?: (event: ChangeEvent) => unknown;
1472
+ /**
1473
+ * Make Radio a required element
1474
+ */
1475
+ required?: boolean;
1476
+ /**
1477
+ * The value attribute of the input
1478
+ */
1479
+ value?: string;
1480
+ } & react.RefAttributes<HTMLInputElement>>;
1481
+
1395
1482
  type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
1396
1483
  /**
1397
1484
  * Pass an arbitrary child node
@@ -1446,6 +1533,54 @@ declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps
1446
1533
  renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
1447
1534
  })>, never> & Record<string, never>;
1448
1535
 
1536
+ type TagProps = ComponentPropsWithoutRef<'div'> & {
1537
+ /**
1538
+ * Set the [color scheme](/?path=/docs/docs-color-schemes--docs) of the `Tag`
1539
+ */
1540
+ colorScheme?: ColorSchemeTypes;
1541
+ /**
1542
+ * Valid URL for the `Tag` label to link to
1543
+ */
1544
+ href?: string;
1545
+ /**
1546
+ * Text label for the `Tag`
1547
+ */
1548
+ label: ReactNode;
1549
+ /**
1550
+ * Callback function to be called when the `x` button is clicked
1551
+ */
1552
+ onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
1553
+ /**
1554
+ * Accessible label for the `x` button (ie. "Remove tag")
1555
+ */
1556
+ onClickRemoveLabel?: string | undefined;
1557
+ };
1558
+ /**
1559
+ * A `Tag` is an optionally linked label, with an optional action button, to categorize content.
1560
+ */
1561
+ declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1562
+ /**
1563
+ * Set the [color scheme](/?path=/docs/docs-color-schemes--docs) of the `Tag`
1564
+ */
1565
+ colorScheme?: ColorSchemeTypes;
1566
+ /**
1567
+ * Valid URL for the `Tag` label to link to
1568
+ */
1569
+ href?: string;
1570
+ /**
1571
+ * Text label for the `Tag`
1572
+ */
1573
+ label: ReactNode;
1574
+ /**
1575
+ * Callback function to be called when the `x` button is clicked
1576
+ */
1577
+ onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
1578
+ /**
1579
+ * Accessible label for the `x` button (ie. "Remove tag")
1580
+ */
1581
+ onClickRemoveLabel?: string | undefined;
1582
+ } & react.RefAttributes<HTMLDivElement>>;
1583
+
1449
1584
  type TooltipProps = {
1450
1585
  /**
1451
1586
  * The content of the tooltip
@@ -1525,4 +1660,4 @@ declare const WistiaLogo: {
1525
1660
  displayName: string;
1526
1661
  };
1527
1662
 
1528
- export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, RadioMenuItem, ScreenReaderOnly, Stack, SubMenu, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
1663
+ export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -126,7 +126,7 @@ type BadgeProps = ComponentPropsWithoutRef<'div'> & {
126
126
  label: string;
127
127
  };
128
128
  /**
129
- * A badge is a compact label, with optional icon, to convey status or context.
129
+ * A `Badge` is a compact label, with optional icon, to convey status or context.
130
130
  */
131
131
  declare const Badge: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
132
132
  /**
@@ -1392,6 +1392,93 @@ declare const CheckboxMenuItem: {
1392
1392
  displayName: string;
1393
1393
  };
1394
1394
 
1395
+ type RadioProps = ComponentPropsWithoutRef<'input'> & {
1396
+ /**
1397
+ * Indicates the state of the radio
1398
+ */
1399
+ checked?: boolean;
1400
+ /**
1401
+ * Disables input
1402
+ */
1403
+ disabled?: boolean;
1404
+ /**
1405
+ * Indicates that there is an error with the input
1406
+ */
1407
+ hasError?: boolean;
1408
+ /**
1409
+ * Provides an ID for the input
1410
+ */
1411
+ id?: string;
1412
+ /**
1413
+ * The label for the input
1414
+ */
1415
+ label: JSX.Element | string;
1416
+ /**
1417
+ * The description for the radio
1418
+ */
1419
+ description?: JSX.Element | string | undefined;
1420
+ /**
1421
+ * Should match the ID attribute of the radio.
1422
+ * Can be used to group together multiple radios
1423
+ */
1424
+ name?: string;
1425
+ /**
1426
+ * Callback function invoked when the value changes
1427
+ */
1428
+ onChange?: (event: ChangeEvent) => unknown;
1429
+ /**
1430
+ * Make Radio a required element
1431
+ */
1432
+ required?: boolean;
1433
+ /**
1434
+ * The value attribute of the input
1435
+ */
1436
+ value?: string;
1437
+ };
1438
+ declare const Radio: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
1439
+ /**
1440
+ * Indicates the state of the radio
1441
+ */
1442
+ checked?: boolean;
1443
+ /**
1444
+ * Disables input
1445
+ */
1446
+ disabled?: boolean;
1447
+ /**
1448
+ * Indicates that there is an error with the input
1449
+ */
1450
+ hasError?: boolean;
1451
+ /**
1452
+ * Provides an ID for the input
1453
+ */
1454
+ id?: string;
1455
+ /**
1456
+ * The label for the input
1457
+ */
1458
+ label: JSX.Element | string;
1459
+ /**
1460
+ * The description for the radio
1461
+ */
1462
+ description?: JSX.Element | string | undefined;
1463
+ /**
1464
+ * Should match the ID attribute of the radio.
1465
+ * Can be used to group together multiple radios
1466
+ */
1467
+ name?: string;
1468
+ /**
1469
+ * Callback function invoked when the value changes
1470
+ */
1471
+ onChange?: (event: ChangeEvent) => unknown;
1472
+ /**
1473
+ * Make Radio a required element
1474
+ */
1475
+ required?: boolean;
1476
+ /**
1477
+ * The value attribute of the input
1478
+ */
1479
+ value?: string;
1480
+ } & react.RefAttributes<HTMLInputElement>>;
1481
+
1395
1482
  type ScreenReaderOnlyProps = ComponentPropsWithoutRef<'div'> & {
1396
1483
  /**
1397
1484
  * Pass an arbitrary child node
@@ -1446,6 +1533,54 @@ declare const Stack: (<C = "div">(props: PolymorphicComponentProps<C, StackProps
1446
1533
  renderAs: react.JSXElementConstructor<any> | keyof react.JSX.IntrinsicElements;
1447
1534
  })>, never> & Record<string, never>;
1448
1535
 
1536
+ type TagProps = ComponentPropsWithoutRef<'div'> & {
1537
+ /**
1538
+ * Set the [color scheme](/?path=/docs/docs-color-schemes--docs) of the `Tag`
1539
+ */
1540
+ colorScheme?: ColorSchemeTypes;
1541
+ /**
1542
+ * Valid URL for the `Tag` label to link to
1543
+ */
1544
+ href?: string;
1545
+ /**
1546
+ * Text label for the `Tag`
1547
+ */
1548
+ label: ReactNode;
1549
+ /**
1550
+ * Callback function to be called when the `x` button is clicked
1551
+ */
1552
+ onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
1553
+ /**
1554
+ * Accessible label for the `x` button (ie. "Remove tag")
1555
+ */
1556
+ onClickRemoveLabel?: string | undefined;
1557
+ };
1558
+ /**
1559
+ * A `Tag` is an optionally linked label, with an optional action button, to categorize content.
1560
+ */
1561
+ declare const Tag: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1562
+ /**
1563
+ * Set the [color scheme](/?path=/docs/docs-color-schemes--docs) of the `Tag`
1564
+ */
1565
+ colorScheme?: ColorSchemeTypes;
1566
+ /**
1567
+ * Valid URL for the `Tag` label to link to
1568
+ */
1569
+ href?: string;
1570
+ /**
1571
+ * Text label for the `Tag`
1572
+ */
1573
+ label: ReactNode;
1574
+ /**
1575
+ * Callback function to be called when the `x` button is clicked
1576
+ */
1577
+ onClickRemove?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined;
1578
+ /**
1579
+ * Accessible label for the `x` button (ie. "Remove tag")
1580
+ */
1581
+ onClickRemoveLabel?: string | undefined;
1582
+ } & react.RefAttributes<HTMLDivElement>>;
1583
+
1449
1584
  type TooltipProps = {
1450
1585
  /**
1451
1586
  * The content of the tooltip
@@ -1525,4 +1660,4 @@ declare const WistiaLogo: {
1525
1660
  displayName: string;
1526
1661
  };
1527
1662
 
1528
- export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, RadioMenuItem, ScreenReaderOnly, Stack, SubMenu, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };
1663
+ export { Avatar, type AvatarInstanceType, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, ButtonGroup, type ButtonProps, Checkbox, CheckboxMenuItem, type ColorSchemeTypes, ColorSchemeWrapper, type ColorSchemeWrapperProps, Divider, Ellipsis, Heading, type HeadingProps, Icon, IconButton, type IconButtonProps, type IconNameType, Label, type LabelProps, Link, type LinkProps, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Radio, RadioMenuItem, type RadioProps, ScreenReaderOnly, Stack, SubMenu, Tag, type TagProps, Text, type TextProps, Tooltip, type TooltipProps, UIProvider, WistiaLogo, colorSchemeOptions, copyToClipboard, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, mq, useActiveMq, useAriaLive, useMq, useWindowSize };