@wistia/ui 0.3.2 → 0.4.0-beta.ebd58245.2c65ddd

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.3.2
3
+ * @license @wistia/ui v0.4.0-beta.ebd58245.2c65ddd
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -841,7 +841,7 @@ var colorAliasTokens = css4`
841
841
  --wui-color-icon: var(--wui-gray-11);
842
842
  --wui-color-icon-on-fill: var(--wui-gray-contrast);
843
843
  --wui-color-text: var(--wui-gray-12);
844
- --wui-color-text-high-contrast: var(--wui-gray-12);
844
+ --wui-color-text-button: var(--wui-gray-12);
845
845
  --wui-color-text-link: var(--wui-blue-9);
846
846
  --wui-color-text-on-fill: var(--wui-gray-contrast);
847
847
  --wui-color-text-secondary: var(--wui-gray-11);
@@ -869,7 +869,7 @@ var colorAliasTokens = css4`
869
869
  --wui-color-icon-error: var(--wui-error-11);
870
870
  --wui-color-icon-on-fill-error: var(--wui-error-contrast);
871
871
  --wui-color-text-error: var(--wui-error-11);
872
- --wui-color-text-high-contrast-error: var(--wui-error-12);
872
+ --wui-color-text-button-error: var(--wui-error-11);
873
873
  --wui-color-text-link-error: var(--wui-error-11);
874
874
  --wui-color-text-on-fill-error: var(--wui-error-contrast);
875
875
  --wui-color-text-secondary-error: var(--wui-error-11);
@@ -894,8 +894,8 @@ var colorAliasTokens = css4`
894
894
  --wui-color-border-secondary-active-info: var(--wui-blue-11);
895
895
  --wui-color-icon-info: var(--wui-blue-11);
896
896
  --wui-color-icon-on-fill-info: var(--wui-blue-contrast);
897
- --wui-color-text-high-contrast-info: var(--wui-blue-12);
898
- --wui-color-text-info: var(--wui-blue-11);
897
+ --wui-color-text-info: var(--wui-blue-12);
898
+ --wui-color-text-button-info: var(--wui-blue-11);
899
899
  --wui-color-text-link-info: var(--wui-blue-9);
900
900
  --wui-color-text-on-fill-info: var(--wui-blue-contrast);
901
901
  --wui-color-text-secondary-info: var(--wui-blue-11);
@@ -920,11 +920,11 @@ var colorAliasTokens = css4`
920
920
  --wui-color-border-secondary-active-success: var(--wui-success-11);
921
921
  --wui-color-icon-on-fill-success: var(--wui-success-contrast);
922
922
  --wui-color-icon-success: var(--wui-success-11);
923
- --wui-color-text-high-contrast-success: var(--wui-success-12);
924
923
  --wui-color-text-link-success: var(--wui-success-9);
925
924
  --wui-color-text-on-fill-success: var(--wui-success-contrast);
926
925
  --wui-color-text-secondary-success: var(--wui-success-11);
927
- --wui-color-text-success: var(--wui-success-11);
926
+ --wui-color-text-success: var(--wui-success-12);
927
+ --wui-color-text-button-success: var(--wui-success-11);
928
928
  --wui-color-focus-ring-success: var(--wui-success-9);
929
929
 
930
930
  /* Warning */
@@ -946,11 +946,11 @@ var colorAliasTokens = css4`
946
946
  --wui-color-border-secondary-active-warning: var(--wui-warning-11);
947
947
  --wui-color-icon-on-fill-warning: var(--wui-warning-2);
948
948
  --wui-color-icon-warning: var(--wui-warning-11);
949
- --wui-color-text-high-contrast-warning: var(--wui-warning-12);
950
949
  --wui-color-text-link-warning: var(--wui-warning-11);
951
950
  --wui-color-text-on-fill-warning: var(--wui-warning-contrast);
952
951
  --wui-color-text-secondary-warning: var(--wui-warning-11);
953
- --wui-color-text-warning: var(--wui-warning-11);
952
+ --wui-color-text-button-warning: var(--wui-warning-11);
953
+ --wui-color-text-warning: var(--wui-warning-12);
954
954
  --wui-color-focus-ring-warning: var(--wui-warning-9);
955
955
 
956
956
  /* --- Accent --- */
@@ -974,8 +974,8 @@ var colorAliasTokens = css4`
974
974
  --wui-color-border-secondary-active-blue: var(--wui-blue-11);
975
975
  --wui-color-icon-blue: var(--wui-blue-11);
976
976
  --wui-color-icon-on-fill-blue: var(--wui-blue-contrast);
977
- --wui-color-text-blue: var(--wui-blue-11);
978
- --wui-color-text-high-contrast-blue: var(--wui-blue-12);
977
+ --wui-color-text-blue: var(--wui-blue-12);
978
+ --wui-color-text-button-blue: var(--wui-blue-11);
979
979
  --wui-color-text-link-blue: var(--wui-blue-9);
980
980
  --wui-color-text-on-fill-blue: var(--wui-blue-2);
981
981
  --wui-color-text-secondary-blue: var(--wui-blue-5);
@@ -1000,8 +1000,8 @@ var colorAliasTokens = css4`
1000
1000
  --wui-color-border-secondary-active-green: var(--wui-green-11);
1001
1001
  --wui-color-icon-green: var(--wui-green-11);
1002
1002
  --wui-color-icon-on-fill-green: var(--wui-green-contrast);
1003
- --wui-color-text-green: var(--wui-green-11);
1004
- --wui-color-text-high-contrast-green: var(--wui-green-12);
1003
+ --wui-color-text-green: var(--wui-green-12);
1004
+ --wui-color-text-button-green: var(--wui-green-11);
1005
1005
  --wui-color-text-link-green: var(--wui-green-11);
1006
1006
  --wui-color-text-on-fill-green: var(--wui-green-contrast);
1007
1007
  --wui-color-text-secondary-green: var(--wui-green-10);
@@ -1026,10 +1026,10 @@ var colorAliasTokens = css4`
1026
1026
  --wui-color-border-secondary-active-orange: var(--wui-orange-11);
1027
1027
  --wui-color-icon-on-fill-orange: var(--wui-orange-contrast);
1028
1028
  --wui-color-icon-orange: var(--wui-orange-11);
1029
- --wui-color-text-high-contrast-orange: var(--wui-orange-12);
1030
1029
  --wui-color-text-link-orange: var(--wui-orange-11);
1031
1030
  --wui-color-text-on-fill-orange: var(--wui-orange-contrast);
1032
- --wui-color-text-orange: var(--wui-orange-11);
1031
+ --wui-color-text-orange: var(--wui-orange-12);
1032
+ --wui-color-text-button-orange: var(--wui-orange-11);
1033
1033
  --wui-color-text-secondary-orange: var(--wui-orange-10);
1034
1034
  --wui-color-focus-ring-orange: var(--wui-orange-9);
1035
1035
 
@@ -1052,10 +1052,10 @@ var colorAliasTokens = css4`
1052
1052
  --wui-color-border-secondary-active-pink: var(--wui-pink-11);
1053
1053
  --wui-color-icon-on-fill-pink: var(--wui-pink-contrast);
1054
1054
  --wui-color-icon-pink: var(--wui-pink-11);
1055
- --wui-color-text-high-contrast-pink: var(--wui-pink-12);
1056
1055
  --wui-color-text-link-pink: var(--wui-pink-11);
1057
1056
  --wui-color-text-on-fill-pink: var(--wui-pink-contrast);
1058
- --wui-color-text-pink: var(--wui-pink-11);
1057
+ --wui-color-text-pink: var(--wui-pink-12);
1058
+ --wui-color-text-button-pink: var(--wui-pink-11);
1059
1059
  --wui-color-text-secondary-pink: var(--wui-pink-10);
1060
1060
  --wui-color-focus-ring-pink: var(--wui-pink-9);
1061
1061
 
@@ -1078,10 +1078,10 @@ var colorAliasTokens = css4`
1078
1078
  --wui-color-border-secondary-active-purple: var(--wui-purple-11);
1079
1079
  --wui-color-icon-on-fill-purple: var(--wui-purple-contrast);
1080
1080
  --wui-color-icon-purple: var(--wui-purple-11);
1081
- --wui-color-text-high-contrast-purple: var(--wui-purple-12);
1082
1081
  --wui-color-text-link-purple: var(--wui-purple-11);
1083
1082
  --wui-color-text-on-fill-purple: var(--wui-purple-contrast);
1084
- --wui-color-text-purple: var(--wui-purple-11);
1083
+ --wui-color-text-button-purple: var(--wui-purple-11);
1084
+ --wui-color-text-purple: var(--wui-purple-12);
1085
1085
  --wui-color-text-secondary-purple: var(--wui-purple-11);
1086
1086
  --wui-color-focus-ring-purple: var(--wui-purple-9);
1087
1087
 
@@ -1104,11 +1104,11 @@ var colorAliasTokens = css4`
1104
1104
  --wui-color-border-secondary-active-yellow: var(--wui-yellow-11);
1105
1105
  --wui-color-icon-on-fill-yellow: var(--wui-yellow-contrast);
1106
1106
  --wui-color-icon-yellow: var(--wui-yellow-11);
1107
- --wui-color-text-high-contrast-yellow: var(--wui-yellow-12);
1108
1107
  --wui-color-text-link-yellow: var(--wui-yellow-11);
1109
1108
  --wui-color-text-on-fill-yellow: var(--wui-yellow-contrast);
1110
1109
  --wui-color-text-secondary-yellow: var(--wui-yellow-10);
1111
1110
  --wui-color-text-yellow: var(--wui-yellow-11);
1111
+ --wui-color-text-button-yellow: var(--wui-yellow-12);
1112
1112
  --wui-color-focus-ring-yellow: var(--wui-yellow-9);
1113
1113
 
1114
1114
  /* --- Misc --- */
@@ -1610,10 +1610,10 @@ var colorSchemeSchema = [
1610
1610
  { token: "bg-fill", step: "9" },
1611
1611
  { token: "bg-fill-hover", step: "10" },
1612
1612
  { token: "bg-fill-active", step: "11" },
1613
- { token: "text", step: "11" },
1614
- { token: "text-high-contrast", step: "12" },
1613
+ { token: "text", step: "12" },
1615
1614
  { token: "text-link", step: "9" },
1616
1615
  { token: "text-secondary", step: "11" },
1616
+ { token: "text-button", step: "11" },
1617
1617
  { token: "text-on-fill", step: "contrast" },
1618
1618
  { token: "border", step: "6" },
1619
1619
  { token: "border-hover", step: "8" },
@@ -1637,7 +1637,7 @@ var defaultScheme = css11`
1637
1637
  --wui-color-bg-fill-hover: var(--wui-blue-10);
1638
1638
  --wui-color-bg-fill-active: var(--wui-blue-11);
1639
1639
  --wui-color-text: var(--wui-gray-12);
1640
- --wui-color-text-high-contrast: var(--wui-gray-12);
1640
+ --wui-color-text-button: var(--wui-gray-12);
1641
1641
  --wui-color-text-link: var(--wui-blue-9);
1642
1642
  --wui-color-text-secondary: var(--wui-gray-11);
1643
1643
  --wui-color-text-on-fill: var(--wui-gray-contrast);
@@ -1670,11 +1670,11 @@ var navScheme = css11`
1670
1670
  --wui-color-border-secondary-active: var(--wui-blue-12);
1671
1671
  --wui-color-icon-on-fill: var(--wui-blue-9);
1672
1672
  --wui-color-icon: var(--wui-blue-4);
1673
- --wui-color-text-high-contrast: var(--wui-blue-1);
1674
1673
  --wui-color-text-link: var(--wui-blue-4);
1675
1674
  --wui-color-text-on-fill: var(--wui-blue-9);
1676
1675
  --wui-color-text-secondary: var(--wui-blue-4);
1677
1676
  --wui-color-text: var(--wui-blue-1);
1677
+ --wui-color-text-button: var(--wui-blue-1);
1678
1678
  --wui-color-focus-ring: var(--wui-blue-1);
1679
1679
 
1680
1680
  /* Nav - Disabled */
@@ -1745,7 +1745,7 @@ var StyledToast = styled2.div`
1745
1745
  border-radius: var(--wui-border-radius-01);
1746
1746
  background-color: var(--wui-color-bg-surface);
1747
1747
  border: 1px solid var(--wui-color-border);
1748
- color: var(--wui-color-text-high-contrast);
1748
+ color: var(--wui-color-text);
1749
1749
  padding-top: var(--wui-space-02);
1750
1750
  padding-right: 0; /* padding here is on the left/right slots */
1751
1751
  padding-bottom: var(--wui-space-02);
@@ -1934,7 +1934,7 @@ var ghostButtonVariant = css13`
1934
1934
  --button-color-bg: transparent;
1935
1935
  --button-color-bg-hover: var(--wui-color-bg-surface-hover);
1936
1936
  --button-color-bg-active: var(--wui-color-bg-surface-active);
1937
- --button-color-text: var(--wui-color-text);
1937
+ --button-color-text: var(--wui-color-text-button);
1938
1938
  --button-color-icon: var(--wui-color-icon);
1939
1939
  `;
1940
1940
  var outlineButtonVariant = css13`
@@ -1947,7 +1947,7 @@ var softButtonVariant = css13`
1947
1947
  --button-color-bg: var(--wui-color-bg-surface-secondary);
1948
1948
  --button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
1949
1949
  --button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
1950
- --button-color-text: var(--wui-color-text);
1950
+ --button-color-text: var(--wui-color-text-button);
1951
1951
  --button-color-icon: var(--wui-color-icon);
1952
1952
  `;
1953
1953
  var solidButtonVariant = css13`
@@ -5606,8 +5606,7 @@ var StyledLabel = styled6.span`
5606
5606
  font-size: var(--wui-typography-heading-4-size);
5607
5607
  font-weight: var(--wui-typography-heading-4-weight);
5608
5608
  line-height: var(--wui-typography-heading-4-line-height);
5609
- color: var(--wui-color-text-high-contrast);
5610
- color: ${({ $disabled }) => $disabled ? "var(--wui-color-text-disabled)" : "var(--wui-color-text-high-contrast)"};
5609
+ color: ${({ $disabled }) => $disabled ? "var(--wui-color-text-disabled)" : "var(--wui-color-text)"};
5611
5610
  grid-column: 1 / -1;
5612
5611
  grid-row: 2;
5613
5612
  text-align: left;
@@ -6750,31 +6749,29 @@ var variantStyleMap2 = {
6750
6749
  label3: label3TextStyle,
6751
6750
  label4: label4TextStyle
6752
6751
  };
6753
- var highContrastProminenceStyle = css18`
6754
- --text-color: var(--wui-color-text-high-contrast);
6755
- `;
6756
- var vibrantProminenceStyle = css18`
6757
- --text-color: var(--wui-color-text);
6758
- `;
6759
- var secondaryProminenceStyle = css18`
6760
- --text-color: var(--wui-color-text-secondary);
6761
- `;
6762
- var prominenceMap = {
6763
- highContrast: highContrastProminenceStyle,
6764
- vibrant: vibrantProminenceStyle,
6765
- secondary: secondaryProminenceStyle
6766
- };
6767
6752
  var StyledText = styled19.div`
6768
6753
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
6754
+ --text-color: ${({ $prominence, $disabled }) => {
6755
+ if ($disabled) {
6756
+ return "var(--wui-color-text-disabled)";
6757
+ }
6758
+ if ($prominence === "secondary") {
6759
+ return "var(--wui-color-text-secondary)";
6760
+ }
6761
+ if ($prominence === "button") {
6762
+ return "var(--wui-color-text-button)";
6763
+ }
6764
+ return "var(--wui-color-text)";
6765
+ }};
6766
+
6767
+ color: var(--text-color);
6769
6768
  font-family: var(--font-family);
6770
6769
  font-size: var(--font-size);
6771
6770
  font-weight: var(--font-weight);
6772
6771
  line-height: var(--line-height);
6773
- color: var(--text-color);
6774
6772
  font-style: normal;
6775
6773
  margin: 0;
6776
6774
  ${({ $variant }) => variantStyleMap2[$variant]}
6777
- ${({ $prominence }) => prominenceMap[$prominence]}
6778
6775
  ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
6779
6776
  ${({ $inline }) => $inline && css18`
6780
6777
  display: inline-block;
@@ -6801,7 +6798,7 @@ var TextComponent = forwardRef9(
6801
6798
  ellipsis = false,
6802
6799
  inline = false,
6803
6800
  preventUserSelect = false,
6804
- prominence = "highContrast",
6801
+ prominence = "primary",
6805
6802
  variant = "body2",
6806
6803
  renderAs,
6807
6804
  ...otherProps
@@ -6888,7 +6885,7 @@ CheckboxGroup.displayName = "CheckboxGroup";
6888
6885
  import { jsx as jsx180, jsxs as jsxs11 } from "react/jsx-runtime";
6889
6886
  var StyledFormField = styled21.div`
6890
6887
  --form-field-spacing: var(--wui-space-01);
6891
- --form-field-error-color: var(--wui-color-text-error);
6888
+ --form-field-error-color: var(--wui-color-text-secondary-error);
6892
6889
 
6893
6890
  display: flex;
6894
6891
  flex-direction: column;
@@ -6919,6 +6916,7 @@ var ErrorMessages = ({ errors, id }) => {
6919
6916
  {
6920
6917
  colorScheme: "error",
6921
6918
  id,
6919
+ prominence: "secondary",
6922
6920
  variant: "label4",
6923
6921
  children: errors
6924
6922
  },
@@ -7393,7 +7391,7 @@ var StyledButton3 = styled26(Button)`
7393
7391
  padding: var(--menu-item-padding);
7394
7392
  border-radius: var(--wui-border-radius-01);
7395
7393
  text-align: left;
7396
- color: var(--wui-color-text);
7394
+ color: var(--wui-color-text-button);
7397
7395
  font-size: var(--menu-label-font-size);
7398
7396
  font-weight: var(--menu-label-font-weight);
7399
7397
  line-height: var(--menu-label-line-height);
@@ -7409,7 +7407,7 @@ var StyledButton3 = styled26(Button)`
7409
7407
  }
7410
7408
 
7411
7409
  &[aria-disabled='true'] {
7412
- --wui-color-text: var(--wui-color-text-disabled);
7410
+ --wui-color-text-button: var(--wui-color-text-disabled);
7413
7411
  --wui-color-text-secondary: var(--wui-color-text-disabled);
7414
7412
  --wui-color-icon: var(--wui-color-icon-disabled);
7415
7413
 
@@ -8162,7 +8160,7 @@ var TagLabel = styled36.a`
8162
8160
  line-height: var(--wui-typography-label-4-line-height);
8163
8161
  border-radius: var(--wui-border-radius-01);
8164
8162
  align-items: center;
8165
- color: var(--wui-color-text-high-contrast);
8163
+ color: var(--wui-color-text);
8166
8164
  text-decoration: none;
8167
8165
  padding: var(--wui-space-01);
8168
8166
 
@@ -8506,11 +8504,60 @@ var WistiaLogo = ({
8506
8504
  return href !== void 0 ? /* @__PURE__ */ jsx202("a", { href, children: Logo }) : Logo;
8507
8505
  };
8508
8506
  WistiaLogo.displayName = "WistiaLogo";
8507
+
8508
+ // src/components/Breadcrumbs/Breadcrumbs.tsx
8509
+ import styled39 from "styled-components";
8510
+ import { jsx as jsx203 } from "react/jsx-runtime";
8511
+ var StyledBreadcrumbs = styled39.nav`
8512
+ display: flex;
8513
+ align-items: center;
8514
+ gap: var(--wui-space-01);
8515
+
8516
+ > svg:last-of-type {
8517
+ display: none;
8518
+ }
8519
+ `;
8520
+ var Breadcrumbs = ({ children, ...props }) => {
8521
+ return /* @__PURE__ */ jsx203(
8522
+ StyledBreadcrumbs,
8523
+ {
8524
+ "aria-label": "Breadcrumbs",
8525
+ ...props,
8526
+ children
8527
+ }
8528
+ );
8529
+ };
8530
+ Breadcrumbs.displayName = "Breadcrumbs";
8531
+
8532
+ // src/components/Breadcrumbs/Breadcrumb.tsx
8533
+ import { Fragment as Fragment3, jsx as jsx204, jsxs as jsxs24 } from "react/jsx-runtime";
8534
+ var Breadcrumb = ({ icon, href, children }) => {
8535
+ return /* @__PURE__ */ jsxs24(Fragment3, { children: [
8536
+ /* @__PURE__ */ jsx204(
8537
+ Button,
8538
+ {
8539
+ href,
8540
+ leftIcon: icon,
8541
+ variant: "ghost",
8542
+ children
8543
+ }
8544
+ ),
8545
+ /* @__PURE__ */ jsx204(
8546
+ Icon,
8547
+ {
8548
+ size: "sm",
8549
+ type: "caret-right"
8550
+ }
8551
+ )
8552
+ ] });
8553
+ };
8509
8554
  export {
8510
8555
  ActionButton,
8511
8556
  Avatar,
8512
8557
  Badge,
8513
8558
  Box,
8559
+ Breadcrumb,
8560
+ Breadcrumbs,
8514
8561
  Button,
8515
8562
  ButtonGroup,
8516
8563
  Checkbox,