@uniformdev/design-system 18.5.0 → 18.7.0

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/esm/index.js CHANGED
@@ -219,6 +219,20 @@ var useBreakpoint = createBreakpoint(breakpoints);
219
219
  var mq = (size) => `@media (min-width: ${breakpoints[size]}px)`;
220
220
  var supports = (cssProp) => `@supports (${cssProp})`;
221
221
 
222
+ // src/utils/useOutsideClick.tsx
223
+ import { useEffect } from "react";
224
+ var useOutsideClick = (containerRef, handler) => {
225
+ useEffect(() => {
226
+ const outsideClick = (event) => {
227
+ if ((containerRef == null ? void 0 : containerRef.current) && !containerRef.current.contains(event.target)) {
228
+ handler();
229
+ }
230
+ };
231
+ document.addEventListener("mousedown", outsideClick);
232
+ return () => document.removeEventListener("mousedown", outsideClick);
233
+ }, [containerRef, handler]);
234
+ };
235
+
222
236
  // src/components/Button/Button.styles.ts
223
237
  import { css } from "@emotion/react";
224
238
  var button = css`
@@ -319,6 +333,14 @@ var buttonGhost = css`
319
333
 
320
334
  ${buttonRippleEffect({ hoverColor: "var(--white)", activeColor: "var(--gray-100)" })}
321
335
  `;
336
+ var buttonGhostDestructive = css`
337
+ ${buttonGhost}
338
+ color: var(--brand-secondary-5);
339
+
340
+ &:hover {
341
+ border-color: var(--brand-secondary-5);
342
+ }
343
+ `;
322
344
  var buttonTertiary = css`
323
345
  background: var(--brand-secondary-3);
324
346
  color: var(--white);
@@ -605,7 +627,7 @@ var scrollbarStyles = css3`
605
627
  import { css as css6 } from "@emotion/react";
606
628
 
607
629
  // src/components/Shortcuts/ShortcutRevealer.tsx
608
- import React2, { useContext, useEffect, useState } from "react";
630
+ import React2, { useContext, useEffect as useEffect2, useState } from "react";
609
631
 
610
632
  // src/components/Shortcuts/ShortcutRevealer.styles.ts
611
633
  import { css as css4 } from "@emotion/react";
@@ -670,7 +692,7 @@ var Context = React2.createContext(false);
670
692
  var revealHotkey = ["ctrl+F1", "ctrl+shift+/"];
671
693
  function ShortcutContext({ children }) {
672
694
  const [reveal, setReveal] = useState(false);
673
- useEffect(() => {
695
+ useEffect2(() => {
674
696
  if (!loggedHotkeyConsole) {
675
697
  loggedHotkeyConsole = true;
676
698
  console.log(
@@ -847,7 +869,7 @@ var IconColorCurrent = css7`
847
869
 
848
870
  // src/components/Icons/IconsProvider.tsx
849
871
  import { paramCase } from "param-case";
850
- import { createContext, useContext as useContext2, useEffect as useEffect2, useState as useState2 } from "react";
872
+ import { createContext, useContext as useContext2, useEffect as useEffect3, useState as useState2 } from "react";
851
873
 
852
874
  // src/components/Icons/customIcons.tsx
853
875
  import { GenIcon } from "react-icons";
@@ -1185,7 +1207,7 @@ function IconsProvider({ children }) {
1185
1207
  setIconsMap({ ...iconMap, ...customIcons });
1186
1208
  setIsLoading(false);
1187
1209
  };
1188
- useEffect2(() => {
1210
+ useEffect3(() => {
1189
1211
  initializeIconsMap();
1190
1212
  }, []);
1191
1213
  return /* @__PURE__ */ jsx5(IconContext.Provider, { value: { iconsMap, isLoading }, children });
@@ -1902,6 +1924,7 @@ var Button = React5.forwardRef(
1902
1924
  secondary: buttonSecondary,
1903
1925
  secondaryInvert: buttonSecondaryInvert,
1904
1926
  ghost: buttonGhost,
1927
+ ghostDestructive: buttonGhostDestructive,
1905
1928
  unimportant: buttonUnimportant,
1906
1929
  tertiary: buttonTertiary
1907
1930
  };
@@ -2764,7 +2787,7 @@ var Details = ({ summary: summary2, children, isOpenByDefault = false, ...props
2764
2787
  };
2765
2788
 
2766
2789
  // src/components/Drawer/Drawer.tsx
2767
- import React10, { useEffect as useEffect4, useMemo, useRef as useRef2 } from "react";
2790
+ import React10, { useEffect as useEffect5, useMemo, useRef as useRef2 } from "react";
2768
2791
  import { CgChevronRight } from "react-icons/cg";
2769
2792
 
2770
2793
  // src/components/Drawer/Drawer.styles.ts
@@ -2776,7 +2799,7 @@ var drawerStyles = (bgColor = "var(--white)") => css27`
2776
2799
  flex-direction: column;
2777
2800
  position: absolute;
2778
2801
  inset: 0;
2779
- padding: var(--spacing-base);
2802
+ padding-top: var(--spacing-sm);
2780
2803
  height: 100%;
2781
2804
  `;
2782
2805
  var drawerCloseButtonStyles = css27`
@@ -2785,19 +2808,22 @@ var drawerCloseButtonStyles = css27`
2785
2808
  border: none;
2786
2809
  display: block;
2787
2810
  padding: var(--spacing-xs);
2811
+ margin-right: var(--spacing-sm);
2788
2812
  `;
2789
2813
  var drawerHeaderStyles = css27`
2790
2814
  font-size: var(--fs-lg);
2791
2815
  font-weight: var(--fw-bold);
2816
+ padding-inline: var(--spacing-base);
2792
2817
  `;
2793
2818
  var drawerRendererStyles = (position) => css27`
2794
2819
  position: ${position};
2795
2820
  inset: 0;
2796
2821
  overflow: hidden;
2797
- z-index: var(--z-10);
2822
+ z-index: 40;
2798
2823
  `;
2799
2824
  var drawerInnerStyles = css27`
2800
2825
  height: 100%;
2826
+ padding: var(--spacing-base);
2801
2827
  overflow: auto;
2802
2828
  ${scrollbarStyles}
2803
2829
  `;
@@ -2830,8 +2856,7 @@ var drawerWrapperStyles = css27`
2830
2856
  var drawerWrapperOverlayStyles = css27`
2831
2857
  position: absolute;
2832
2858
  inset: 0;
2833
- background: rgba(100, 100, 100, 0.01);
2834
- backdrop-filter: blur(2px);
2859
+ background: rgba(31, 43, 52, 0.4);
2835
2860
  animation: ${fadeIn} var(--duration-fast) ease-out;
2836
2861
  `;
2837
2862
 
@@ -2915,6 +2940,7 @@ var Drawer = React10.forwardRef(
2915
2940
  tabIndex: -1,
2916
2941
  "aria-labelledby": headerId,
2917
2942
  css: drawerStyles(bgColor),
2943
+ "data-test-id": "side-dialog",
2918
2944
  children: [
2919
2945
  /* @__PURE__ */ jsx30(
2920
2946
  Button,
@@ -2934,7 +2960,7 @@ var Drawer = React10.forwardRef(
2934
2960
  }
2935
2961
  );
2936
2962
  }, [children, header, id, stackId, bgColor, onRequestClose, ref]);
2937
- useEffect4(() => {
2963
+ useEffect5(() => {
2938
2964
  registerDrawer({
2939
2965
  drawer: {
2940
2966
  id,
@@ -2951,7 +2977,7 @@ var Drawer = React10.forwardRef(
2951
2977
  }
2952
2978
  });
2953
2979
  }, [component, instanceKey, registerDrawer]);
2954
- useEffect4(() => {
2980
+ useEffect5(() => {
2955
2981
  return () => unregisterDrawer({ id, stackId, instanceKey });
2956
2982
  }, [id, stackId, instanceKey, unregisterDrawer]);
2957
2983
  return null;
@@ -3610,7 +3636,7 @@ var InputKeywordSearch = ({
3610
3636
  placeholder,
3611
3637
  showLabel: false,
3612
3638
  value,
3613
- icon: value ? /* @__PURE__ */ jsx41("button", { onClick: onClear, children: /* @__PURE__ */ jsx41(Icon, { icon: "close", css: inputSearchCloseIcon }) }) : /* @__PURE__ */ jsxs25(
3639
+ icon: value ? /* @__PURE__ */ jsx41("button", { onClick: onClear, css: { pointerEvents: "all" }, children: /* @__PURE__ */ jsx41(Icon, { icon: "close", css: inputSearchCloseIcon }) }) : /* @__PURE__ */ jsxs25(
3614
3640
  "svg",
3615
3641
  {
3616
3642
  width: "26",
@@ -4427,7 +4453,7 @@ var EditTeamIntegrationTile = ({
4427
4453
 
4428
4454
  // src/components/Tiles/IntegrationComingSoon.tsx
4429
4455
  import { css as css46 } from "@emotion/react";
4430
- import { useEffect as useEffect6, useState as useState6 } from "react";
4456
+ import { useEffect as useEffect7, useState as useState6 } from "react";
4431
4457
  import { CgHeart } from "react-icons/cg";
4432
4458
  import { jsx as jsx57, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
4433
4459
  var IntegrationComingSoon = ({
@@ -4443,7 +4469,7 @@ var IntegrationComingSoon = ({
4443
4469
  setUpVote((prev) => !prev);
4444
4470
  onUpVoteClick();
4445
4471
  };
4446
- useEffect6(() => {
4472
+ useEffect7(() => {
4447
4473
  if (upVote) {
4448
4474
  const timer = setTimeout(() => setUpVote(false), timing);
4449
4475
  return () => {
@@ -4735,12 +4761,51 @@ var IntegrationModalHeader = ({ icon, name, menu: menu2, children }) => {
4735
4761
  ] });
4736
4762
  };
4737
4763
 
4764
+ // src/components/Skeleton/Skeleton.styles.ts
4765
+ import { css as css51, keyframes as keyframes4 } from "@emotion/react";
4766
+ var lightFadingOut = keyframes4`
4767
+ from { opacity: 0.1; }
4768
+ to { opacity: 0.025; }
4769
+ `;
4770
+ var skeletonStyles = css51`
4771
+ animation: ${lightFadingOut} 1s ease-out infinite alternate;
4772
+ background-color: var(--gray-900);
4773
+ `;
4774
+
4775
+ // src/components/Skeleton/Skeleton.tsx
4776
+ import { jsx as jsx63 } from "@emotion/react/jsx-runtime";
4777
+ var Skeleton = ({
4778
+ width = "100%",
4779
+ height = "1.25rem",
4780
+ inline = false,
4781
+ circle = false,
4782
+ children,
4783
+ ...otherProps
4784
+ }) => /* @__PURE__ */ jsx63(
4785
+ "div",
4786
+ {
4787
+ css: [
4788
+ skeletonStyles,
4789
+ {
4790
+ width: circle ? height : width,
4791
+ height,
4792
+ display: inline ? "inline-block" : "block",
4793
+ borderRadius: circle ? "var(--rounded-full)" : "var(--rounded-md)"
4794
+ }
4795
+ ],
4796
+ ...otherProps,
4797
+ "aria-busy": "true",
4798
+ "aria-label": "Loading...",
4799
+ children
4800
+ }
4801
+ );
4802
+
4738
4803
  // src/components/Switch/Switch.tsx
4739
4804
  import * as React14 from "react";
4740
4805
 
4741
4806
  // src/components/Switch/Switch.styles.ts
4742
- import { css as css51 } from "@emotion/react";
4743
- var SwitchInputContainer = css51`
4807
+ import { css as css52 } from "@emotion/react";
4808
+ var SwitchInputContainer = css52`
4744
4809
  cursor: pointer;
4745
4810
  display: inline-block;
4746
4811
  position: relative;
@@ -4749,7 +4814,7 @@ var SwitchInputContainer = css51`
4749
4814
  vertical-align: middle;
4750
4815
  user-select: none;
4751
4816
  `;
4752
- var SwitchInput = css51`
4817
+ var SwitchInput = css52`
4753
4818
  appearance: none;
4754
4819
  border-radius: var(--rounded-full);
4755
4820
  background-color: var(--white);
@@ -4787,7 +4852,7 @@ var SwitchInput = css51`
4787
4852
  cursor: not-allowed;
4788
4853
  }
4789
4854
  `;
4790
- var SwitchInputDisabled = css51`
4855
+ var SwitchInputDisabled = css52`
4791
4856
  opacity: var(--opacity-50);
4792
4857
  cursor: not-allowed;
4793
4858
 
@@ -4795,7 +4860,7 @@ var SwitchInputDisabled = css51`
4795
4860
  cursor: not-allowed;
4796
4861
  }
4797
4862
  `;
4798
- var SwitchInputLabel = css51`
4863
+ var SwitchInputLabel = css52`
4799
4864
  align-items: center;
4800
4865
  color: var(--brand-secondary-1);
4801
4866
  display: inline-flex;
@@ -4817,14 +4882,14 @@ var SwitchInputLabel = css51`
4817
4882
  top: 0;
4818
4883
  }
4819
4884
  `;
4820
- var SwitchText = css51`
4885
+ var SwitchText = css52`
4821
4886
  color: var(--gray-500);
4822
4887
  font-size: var(--fs-sm);
4823
4888
  padding-inline: var(--spacing-2xl) 0;
4824
4889
  `;
4825
4890
 
4826
4891
  // src/components/Switch/Switch.tsx
4827
- import { Fragment as Fragment9, jsx as jsx63, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
4892
+ import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
4828
4893
  var Switch = React14.forwardRef(
4829
4894
  ({ label, infoText, toggleText, children, ...inputProps }, ref) => {
4830
4895
  let additionalText = infoText;
@@ -4833,10 +4898,10 @@ var Switch = React14.forwardRef(
4833
4898
  }
4834
4899
  return /* @__PURE__ */ jsxs44(Fragment9, { children: [
4835
4900
  /* @__PURE__ */ jsxs44("label", { css: [SwitchInputContainer, inputProps.disabled ? SwitchInputDisabled : void 0], children: [
4836
- /* @__PURE__ */ jsx63("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
4837
- /* @__PURE__ */ jsx63("span", { css: SwitchInputLabel, children: label })
4901
+ /* @__PURE__ */ jsx64("input", { type: "checkbox", css: SwitchInput, ...inputProps, ref }),
4902
+ /* @__PURE__ */ jsx64("span", { css: SwitchInputLabel, children: label })
4838
4903
  ] }),
4839
- additionalText ? /* @__PURE__ */ jsx63("p", { css: SwitchText, children: additionalText }) : null,
4904
+ additionalText ? /* @__PURE__ */ jsx64("p", { css: SwitchText, children: additionalText }) : null,
4840
4905
  children
4841
4906
  ] });
4842
4907
  }
@@ -4846,69 +4911,69 @@ var Switch = React14.forwardRef(
4846
4911
  import * as React15 from "react";
4847
4912
 
4848
4913
  // src/components/Table/Table.styles.ts
4849
- import { css as css52 } from "@emotion/react";
4850
- var table = css52`
4914
+ import { css as css53 } from "@emotion/react";
4915
+ var table = css53`
4851
4916
  border-bottom: 1px solid var(--gray-400);
4852
4917
  border-collapse: collapse;
4853
4918
  min-width: 100%;
4854
4919
  table-layout: auto;
4855
4920
  `;
4856
- var tableHead = css52`
4921
+ var tableHead = css53`
4857
4922
  background: var(--gray-100);
4858
4923
  color: var(--brand-secondary-1);
4859
4924
  text-align: left;
4860
4925
  `;
4861
- var tableRow = css52`
4926
+ var tableRow = css53`
4862
4927
  border-bottom: 1px solid var(--gray-200);
4863
4928
  `;
4864
- var tableCellHead = css52`
4929
+ var tableCellHead = css53`
4865
4930
  font-size: var(--fs-sm);
4866
4931
  padding: var(--spacing-base) var(--spacing-md);
4867
4932
  text-transform: uppercase;
4868
4933
  font-weight: var(--fw-bold);
4869
4934
  `;
4870
- var tableCellData = css52`
4935
+ var tableCellData = css53`
4871
4936
  padding: var(--spacing-base) var(--spacing-md);
4872
4937
  `;
4873
4938
 
4874
4939
  // src/components/Table/Table.tsx
4875
- import { jsx as jsx64 } from "@emotion/react/jsx-runtime";
4940
+ import { jsx as jsx65 } from "@emotion/react/jsx-runtime";
4876
4941
  var Table = React15.forwardRef(({ children, ...otherProps }, ref) => {
4877
- return /* @__PURE__ */ jsx64("table", { ref, css: table, ...otherProps, children });
4942
+ return /* @__PURE__ */ jsx65("table", { ref, css: table, ...otherProps, children });
4878
4943
  });
4879
4944
  var TableHead = React15.forwardRef(
4880
4945
  ({ children, ...otherProps }, ref) => {
4881
- return /* @__PURE__ */ jsx64("thead", { ref, css: tableHead, ...otherProps, children });
4946
+ return /* @__PURE__ */ jsx65("thead", { ref, css: tableHead, ...otherProps, children });
4882
4947
  }
4883
4948
  );
4884
4949
  var TableBody = React15.forwardRef(
4885
4950
  ({ children, ...otherProps }, ref) => {
4886
- return /* @__PURE__ */ jsx64("tbody", { ref, ...otherProps, children });
4951
+ return /* @__PURE__ */ jsx65("tbody", { ref, ...otherProps, children });
4887
4952
  }
4888
4953
  );
4889
4954
  var TableFoot = React15.forwardRef(
4890
4955
  ({ children, ...otherProps }, ref) => {
4891
- return /* @__PURE__ */ jsx64("tfoot", { ref, ...otherProps, children });
4956
+ return /* @__PURE__ */ jsx65("tfoot", { ref, ...otherProps, children });
4892
4957
  }
4893
4958
  );
4894
4959
  var TableRow = React15.forwardRef(
4895
4960
  ({ children, ...otherProps }, ref) => {
4896
- return /* @__PURE__ */ jsx64("tr", { ref, css: tableRow, ...otherProps, children });
4961
+ return /* @__PURE__ */ jsx65("tr", { ref, css: tableRow, ...otherProps, children });
4897
4962
  }
4898
4963
  );
4899
4964
  var TableCellHead = React15.forwardRef(
4900
4965
  ({ children, ...otherProps }, ref) => {
4901
- return /* @__PURE__ */ jsx64("th", { ref, css: tableCellHead, ...otherProps, children });
4966
+ return /* @__PURE__ */ jsx65("th", { ref, css: tableCellHead, ...otherProps, children });
4902
4967
  }
4903
4968
  );
4904
4969
  var TableCellData = React15.forwardRef(
4905
4970
  ({ children, ...otherProps }, ref) => {
4906
- return /* @__PURE__ */ jsx64("td", { ref, css: tableCellData, ...otherProps, children });
4971
+ return /* @__PURE__ */ jsx65("td", { ref, css: tableCellData, ...otherProps, children });
4907
4972
  }
4908
4973
  );
4909
4974
 
4910
4975
  // src/components/Tabs/Tabs.tsx
4911
- import { createContext as createContext4, useContext as useContext5, useEffect as useEffect7 } from "react";
4976
+ import { createContext as createContext4, useContext as useContext5, useEffect as useEffect8 } from "react";
4912
4977
  import {
4913
4978
  Tab as ReakitTab,
4914
4979
  TabList as ReakitTabList,
@@ -4917,8 +4982,8 @@ import {
4917
4982
  } from "reakit/Tab";
4918
4983
 
4919
4984
  // src/components/Tabs/Tabs.styles.ts
4920
- import { css as css53 } from "@emotion/react";
4921
- var tabButtonStyles = css53`
4985
+ import { css as css54 } from "@emotion/react";
4986
+ var tabButtonStyles = css54`
4922
4987
  align-items: center;
4923
4988
  border: 0;
4924
4989
  height: 2.5rem;
@@ -4935,13 +5000,13 @@ var tabButtonStyles = css53`
4935
5000
  -webkit-text-stroke-width: thin;
4936
5001
  }
4937
5002
  `;
4938
- var tabButtonGroupStyles = css53`
5003
+ var tabButtonGroupStyles = css54`
4939
5004
  display: flex;
4940
5005
  gap: var(--spacing-base);
4941
5006
  `;
4942
5007
 
4943
5008
  // src/components/Tabs/Tabs.tsx
4944
- import { jsx as jsx65 } from "@emotion/react/jsx-runtime";
5009
+ import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
4945
5010
  var CurrentTabContext = createContext4(null);
4946
5011
  var useCurrentTab = () => {
4947
5012
  const context = useContext5(CurrentTabContext);
@@ -4952,31 +5017,31 @@ var useCurrentTab = () => {
4952
5017
  };
4953
5018
  var Tabs = ({ children, onSelectedIdChange, ...props }) => {
4954
5019
  const tab = useTabState(props);
4955
- useEffect7(() => {
5020
+ useEffect8(() => {
4956
5021
  var _a;
4957
5022
  onSelectedIdChange == null ? void 0 : onSelectedIdChange((_a = tab.selectedId) != null ? _a : void 0);
4958
5023
  }, [tab.selectedId, onSelectedIdChange]);
4959
- useEffect7(() => {
5024
+ useEffect8(() => {
4960
5025
  tab.setSelectedId(props.selectedId);
4961
5026
  }, [props.selectedId]);
4962
- return /* @__PURE__ */ jsx65(CurrentTabContext.Provider, { value: tab, children });
5027
+ return /* @__PURE__ */ jsx66(CurrentTabContext.Provider, { value: tab, children });
4963
5028
  };
4964
5029
  var TabButtonGroup = ({ children, ...props }) => {
4965
5030
  const currentTab = useCurrentTab();
4966
- return /* @__PURE__ */ jsx65(ReakitTabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
5031
+ return /* @__PURE__ */ jsx66(ReakitTabList, { ...props, ...currentTab, css: tabButtonGroupStyles, children });
4967
5032
  };
4968
5033
  var TabButton = ({ children, id, ...props }) => {
4969
5034
  const currentTab = useCurrentTab();
4970
- return /* @__PURE__ */ jsx65(ReakitTab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
5035
+ return /* @__PURE__ */ jsx66(ReakitTab, { type: "button", id, ...currentTab, ...props, css: tabButtonStyles, children });
4971
5036
  };
4972
5037
  var TabContent = ({ children, ...props }) => {
4973
5038
  const currentTab = useCurrentTab();
4974
- return /* @__PURE__ */ jsx65(ReakitTabPanel, { ...props, ...currentTab, children });
5039
+ return /* @__PURE__ */ jsx66(ReakitTabPanel, { ...props, ...currentTab, children });
4975
5040
  };
4976
5041
 
4977
5042
  // src/components/Validation/StatusBullet.styles.ts
4978
- import { css as css54 } from "@emotion/react";
4979
- var StatusBulletContainer = css54`
5043
+ import { css as css55 } from "@emotion/react";
5044
+ var StatusBulletContainer = css55`
4980
5045
  align-items: center;
4981
5046
  align-self: center;
4982
5047
  color: var(--gray-500);
@@ -4996,18 +5061,18 @@ var StatusBulletContainer = css54`
4996
5061
  height: var(--fs-xs);
4997
5062
  }
4998
5063
  `;
4999
- var StatusDraft = css54`
5064
+ var StatusDraft = css55`
5000
5065
  &:before {
5001
5066
  background: var(--white);
5002
5067
  box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
5003
5068
  }
5004
5069
  `;
5005
- var StatusModified = css54`
5070
+ var StatusModified = css55`
5006
5071
  &:before {
5007
5072
  background: var(--brand-primary-1);
5008
5073
  }
5009
5074
  `;
5010
- var StatusError = css54`
5075
+ var StatusError = css55`
5011
5076
  color: var(--error);
5012
5077
  &:before {
5013
5078
  background: var(--error);
@@ -5023,19 +5088,19 @@ var StatusError = css54`
5023
5088
  rotate: -45deg;
5024
5089
  }
5025
5090
  `;
5026
- var StatusPublished = css54`
5091
+ var StatusPublished = css55`
5027
5092
  &:before {
5028
5093
  background: var(--brand-secondary-3);
5029
5094
  }
5030
5095
  `;
5031
- var StatusOrphan = css54`
5096
+ var StatusOrphan = css55`
5032
5097
  &:before {
5033
5098
  background: var(--brand-secondary-5);
5034
5099
  }
5035
5100
  `;
5036
5101
 
5037
5102
  // src/components/Validation/StatusBullet.tsx
5038
- import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
5103
+ import { jsx as jsx67 } from "@emotion/react/jsx-runtime";
5039
5104
  var StatusBullet = ({ status, hideText = false, message, ...props }) => {
5040
5105
  const currentStateStyles = {
5041
5106
  Error: StatusError,
@@ -5045,7 +5110,7 @@ var StatusBullet = ({ status, hideText = false, message, ...props }) => {
5045
5110
  Published: StatusPublished,
5046
5111
  Draft: StatusDraft
5047
5112
  };
5048
- return /* @__PURE__ */ jsx66(
5113
+ return /* @__PURE__ */ jsx67(
5049
5114
  "span",
5050
5115
  {
5051
5116
  css: [StatusBulletContainer, currentStateStyles[status]],
@@ -5114,6 +5179,7 @@ export {
5114
5179
  ScrollableListItem,
5115
5180
  ShortcutContext,
5116
5181
  ShortcutRevealer,
5182
+ Skeleton,
5117
5183
  StatusBullet,
5118
5184
  Switch,
5119
5185
  TabButton,
@@ -5136,6 +5202,7 @@ export {
5136
5202
  breakpoints,
5137
5203
  button,
5138
5204
  buttonGhost,
5205
+ buttonGhostDestructive,
5139
5206
  buttonPrimary,
5140
5207
  buttonRippleEffect,
5141
5208
  buttonSecondary,
@@ -5164,5 +5231,6 @@ export {
5164
5231
  useDrawer,
5165
5232
  useIconContext,
5166
5233
  useMenuContext,
5234
+ useOutsideClick,
5167
5235
  useShortcut
5168
5236
  };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ReactNode, HTMLAttributes } from 'react';
2
+ import React__default, { RefObject, ReactNode, HTMLAttributes } from 'react';
3
3
  import * as _emotion_react from '@emotion/react';
4
4
  import { SerializedStyles } from '@emotion/react';
5
5
  import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
@@ -52,6 +52,8 @@ declare const mq: (size: BreakpointSize) => string;
52
52
  */
53
53
  declare const supports: (cssProp: string) => string;
54
54
 
55
+ declare const useOutsideClick: (containerRef: RefObject<HTMLElement | null>, handler: () => void) => void;
56
+
55
57
  declare const button: _emotion_react.SerializedStyles;
56
58
  declare const buttonRippleEffect: (props: {
57
59
  hoverColor: string;
@@ -62,6 +64,7 @@ declare const buttonSecondary: _emotion_react.SerializedStyles;
62
64
  declare const buttonSecondaryInvert: _emotion_react.SerializedStyles;
63
65
  declare const buttonUnimportant: _emotion_react.SerializedStyles;
64
66
  declare const buttonGhost: _emotion_react.SerializedStyles;
67
+ declare const buttonGhostDestructive: _emotion_react.SerializedStyles;
65
68
  declare const buttonTertiary: _emotion_react.SerializedStyles;
66
69
 
67
70
  declare const labelText: _emotion_react.SerializedStyles;
@@ -203,7 +206,7 @@ declare const UniformBadge: ({ theme, ...props }: React__default.SVGAttributes<S
203
206
  declare const UniformLogo: ({ theme, ...props }: UniformLogoProps & React.SVGAttributes<SVGElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
204
207
 
205
208
  /** Button themes that are available to use with our brand */
206
- type ButtonThemeProps$1 = 'primary' | 'secondary' | 'tertiary' | 'unimportant' | 'ghost' | 'secondaryInvert';
209
+ type ButtonThemeProps$1 = 'primary' | 'secondary' | 'tertiary' | 'unimportant' | 'ghost' | 'ghostDestructive' | 'secondaryInvert';
207
210
  /** Button sizes that are available to use with our brand */
208
211
  type ButtonSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
209
212
  type ButtonProps = ButtonProps$1 & {
@@ -735,7 +738,7 @@ type InputSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
735
738
  */
736
739
  declare const InputSelect: ({ label, defaultOption, options, caption, errorMessage, warningMessage, showLabel, labelCta, compact, classNameContainer, classNameControl, classNameLabel, ...props }: InputSelectProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
737
740
 
738
- type InputToggleProps = React$1.HTMLAttributes<HTMLInputElement> & {
741
+ type InputToggleProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
739
742
  /** sets the label value */
740
743
  label: string;
741
744
  /** sets the type of input to use, either radio or checkbox */
@@ -1004,6 +1007,18 @@ type UseShortcutOptions = {
1004
1007
  declare function macifyShortcut(shortcut: string | null): string | null;
1005
1008
  declare function useShortcut({ handler, shortcut, macShortcut, doNotPreventDefault, activeWhenEditing, }: UseShortcutOptions): void;
1006
1009
 
1010
+ type SkeletonProps = React__default.PropsWithChildren<React__default.HTMLAttributes<HTMLDivElement>> & {
1011
+ width?: string;
1012
+ height?: string;
1013
+ inline?: boolean;
1014
+ circle?: boolean;
1015
+ };
1016
+ /**
1017
+ * A loading skeleton
1018
+ * @example <Skeleton width="50%" height="32px" />
1019
+ */
1020
+ declare const Skeleton: ({ width, height, inline, circle, children, ...otherProps }: SkeletonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1021
+
1007
1022
  type SwitchProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'type'> & {
1008
1023
  /** sets the label value */
1009
1024
  label: string;
@@ -1337,4 +1352,4 @@ type StatusBulletProps = React$1.HTMLAttributes<HTMLSpanElement> & {
1337
1352
  };
1338
1353
  declare const StatusBullet: ({ status, hideText, message, ...props }: StatusBulletProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1339
1354
 
1340
- export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, ArrowPositionProps, Badge, BadgeProps, BoxHeightProps, BreakpointSize, BreakpointsMap, Button, ButtonProps, ButtonSizeProps, ButtonThemeProps$1 as ButtonThemeProps, ButtonWithMenu, ButtonWithMenuProps, Callout, CalloutProps, CalloutType, Caption, CaptionProps, Card, CardContainer, CardContainerBgColorProps, CardContainerProps, CardProps, CheckboxWithInfo, CheckboxWithInforProps, ChildFunction, ComboBoxGroupBase, Counter, CounterProps, CreateTeamIntegrationTile, CreateTeamIntegrationTileProps, DashedBox, DashedBoxProps, Details, DetailsProps, Drawer, DrawerContextValue, DrawerItem, DrawerProps, DrawerProvider, DrawerRenderer, DrawerRendererItemProps, DrawerRendererProps, EditTeamIntegrationTile, EditTeamIntegrationTileProps, ErrorMessage, ErrorMessageProps, Fieldset, FieldsetProps, Heading, HeadingProps, HexModalBackground, Icon, IconColor, IconName, IconProps, IconType, IconsProvider, InlineAlert, InlineAlertProps, Input, InputComboBox, InputComboBoxOption, InputComboBoxProps, InputInlineSelect, InputInlineSelectOption, InputInlineSelectProps, InputKeywordSearch, InputKeywordSearchProps, InputProps, InputSelect, InputSelectProps, InputToggle, InputToggleProps, IntegrationComingSoon, IntegrationComingSoonProps, IntegrationHeaderSection, IntegrationHeaderSectionProps, IntegrationLoadingTile, IntegrationLoadingTileProps, IntegrationModalHeader, IntegrationModalHeaderProps, IntegrationModalIcon, IntegrationModalIconProps, IntegrationTile, IntegrationTileProps, Label, LabelProps, Legend, LegendProps, LevelProps, LimitsBar, LimitsBarProps, Link, LinkColorProps, LinkList, LinkListProps, LinkManagerWithRefType, LinkProps, LinkWithRef, LoadingIcon, LoadingIconProps, LoadingIndicator, LoadingOverlay, LoadingOverlayProps, Menu, MenuContext, MenuItem, MenuItemProps, MenuItemSeparator, MenuItemTextThemeProps, MenuProps, PageHeaderSection, PageHeaderSectionProps, Paragraph, ParagraphProps, RegisterDrawerProps, ResolveIcon, ResolveIconProps, ScrollableItemProps, ScrollableList, ScrollableListInputItem, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, ShortcutContext, ShortcutRevealer, StatusBullet, StatusBulletProps, StatusTypeProps, Switch, SwitchProps, TabButton, TabButtonGroup, TabButtonProps, TabContent, TabContentProps, Table, TableBody, TableBodyProps, TableCellData, TableCellDataProps, TableCellHead, TableCellHeadProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableProps, TableRow, TableRowProps, Tabs, TabsProps, TextAlignProps, Textarea, TextareaProps, Theme, ThemeProps, TileContainer, TileContainerProps, UniformBadge, UniformLogo, UniformLogoProps, UseShortcutOptions, WarningMessage, WarningMessageProps, breakpoints, button, buttonGhost, buttonPrimary, buttonRippleEffect, buttonSecondary, buttonSecondaryInvert, buttonTertiary, buttonUnimportant, fadeIn, fadeInBottom, fadeInLtr, fadeInRtl, fadeOutBottom, growSubtle, input, inputError, inputSelect, isMacLike, labelText, macifyShortcut, mq, ripple, scrollbarStyles, skeletonLoading, supports, useBreakpoint, useCurrentTab, useDrawer, useIconContext, useMenuContext, useShortcut };
1355
+ export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, ArrowPositionProps, Badge, BadgeProps, BoxHeightProps, BreakpointSize, BreakpointsMap, Button, ButtonProps, ButtonSizeProps, ButtonThemeProps$1 as ButtonThemeProps, ButtonWithMenu, ButtonWithMenuProps, Callout, CalloutProps, CalloutType, Caption, CaptionProps, Card, CardContainer, CardContainerBgColorProps, CardContainerProps, CardProps, CheckboxWithInfo, CheckboxWithInforProps, ChildFunction, ComboBoxGroupBase, Counter, CounterProps, CreateTeamIntegrationTile, CreateTeamIntegrationTileProps, DashedBox, DashedBoxProps, Details, DetailsProps, Drawer, DrawerContextValue, DrawerItem, DrawerProps, DrawerProvider, DrawerRenderer, DrawerRendererItemProps, DrawerRendererProps, EditTeamIntegrationTile, EditTeamIntegrationTileProps, ErrorMessage, ErrorMessageProps, Fieldset, FieldsetProps, Heading, HeadingProps, HexModalBackground, Icon, IconColor, IconName, IconProps, IconType, IconsProvider, InlineAlert, InlineAlertProps, Input, InputComboBox, InputComboBoxOption, InputComboBoxProps, InputInlineSelect, InputInlineSelectOption, InputInlineSelectProps, InputKeywordSearch, InputKeywordSearchProps, InputProps, InputSelect, InputSelectProps, InputToggle, InputToggleProps, IntegrationComingSoon, IntegrationComingSoonProps, IntegrationHeaderSection, IntegrationHeaderSectionProps, IntegrationLoadingTile, IntegrationLoadingTileProps, IntegrationModalHeader, IntegrationModalHeaderProps, IntegrationModalIcon, IntegrationModalIconProps, IntegrationTile, IntegrationTileProps, Label, LabelProps, Legend, LegendProps, LevelProps, LimitsBar, LimitsBarProps, Link, LinkColorProps, LinkList, LinkListProps, LinkManagerWithRefType, LinkProps, LinkWithRef, LoadingIcon, LoadingIconProps, LoadingIndicator, LoadingOverlay, LoadingOverlayProps, Menu, MenuContext, MenuItem, MenuItemProps, MenuItemSeparator, MenuItemTextThemeProps, MenuProps, PageHeaderSection, PageHeaderSectionProps, Paragraph, ParagraphProps, RegisterDrawerProps, ResolveIcon, ResolveIconProps, ScrollableItemProps, ScrollableList, ScrollableListInputItem, ScrollableListItem, ScrollableListItemProps, ScrollableListProps, ShortcutContext, ShortcutRevealer, Skeleton, SkeletonProps, StatusBullet, StatusBulletProps, StatusTypeProps, Switch, SwitchProps, TabButton, TabButtonGroup, TabButtonProps, TabContent, TabContentProps, Table, TableBody, TableBodyProps, TableCellData, TableCellDataProps, TableCellHead, TableCellHeadProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableProps, TableRow, TableRowProps, Tabs, TabsProps, TextAlignProps, Textarea, TextareaProps, Theme, ThemeProps, TileContainer, TileContainerProps, UniformBadge, UniformLogo, UniformLogoProps, UseShortcutOptions, WarningMessage, WarningMessageProps, breakpoints, button, buttonGhost, buttonGhostDestructive, buttonPrimary, buttonRippleEffect, buttonSecondary, buttonSecondaryInvert, buttonTertiary, buttonUnimportant, fadeIn, fadeInBottom, fadeInLtr, fadeInRtl, fadeOutBottom, growSubtle, input, inputError, inputSelect, isMacLike, labelText, macifyShortcut, mq, ripple, scrollbarStyles, skeletonLoading, supports, useBreakpoint, useCurrentTab, useDrawer, useIconContext, useMenuContext, useOutsideClick, useShortcut };