@uniformdev/design-system 18.9.1-alpha.4 → 18.11.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
@@ -9797,7 +9797,6 @@ function InputComboBox(props) {
9797
9797
 
9798
9798
  // src/components/Input/InputInlineSelect.tsx
9799
9799
  import { css as css34 } from "@emotion/react";
9800
- import * as React13 from "react";
9801
9800
  import { useRef as useRef3, useState as useState5 } from "react";
9802
9801
  import { CgChevronDown as CgChevronDown2 } from "react-icons/cg";
9803
9802
 
@@ -9880,17 +9879,7 @@ var InputInlineSelect = ({
9880
9879
  var _a;
9881
9880
  const [menuVisible, setMenuVisible] = useState5(false);
9882
9881
  const divRef = useRef3(null);
9883
- React13.useEffect(() => {
9884
- const outsideClick = (event) => {
9885
- if (divRef.current && !divRef.current.contains(event.target)) {
9886
- setMenuVisible(false);
9887
- }
9888
- };
9889
- document.addEventListener("mousedown", outsideClick);
9890
- return () => {
9891
- document.removeEventListener("mousedown", outsideClick);
9892
- };
9893
- }, [divRef]);
9882
+ useOutsideClick(divRef, () => setMenuVisible(false));
9894
9883
  const selected = options.find((option) => option.value === value);
9895
9884
  return /* @__PURE__ */ jsxs24(
9896
9885
  "div",
@@ -10792,7 +10781,7 @@ var EditTeamIntegrationTile = ({
10792
10781
 
10793
10782
  // src/components/Tiles/IntegrationComingSoon.tsx
10794
10783
  import { css as css46 } from "@emotion/react";
10795
- import { useEffect as useEffect7, useState as useState6 } from "react";
10784
+ import { useEffect as useEffect6, useState as useState6 } from "react";
10796
10785
  import { CgHeart } from "react-icons/cg";
10797
10786
  import { jsx as jsx58, jsxs as jsxs39 } from "@emotion/react/jsx-runtime";
10798
10787
  var IntegrationComingSoon = ({
@@ -10808,7 +10797,7 @@ var IntegrationComingSoon = ({
10808
10797
  setUpVote((prev) => !prev);
10809
10798
  onUpVoteClick();
10810
10799
  };
10811
- useEffect7(() => {
10800
+ useEffect6(() => {
10812
10801
  if (upVote) {
10813
10802
  const timer = setTimeout(() => setUpVote(false), timing);
10814
10803
  return () => {
@@ -11140,7 +11129,7 @@ var Skeleton = ({
11140
11129
  );
11141
11130
 
11142
11131
  // src/components/Switch/Switch.tsx
11143
- import * as React14 from "react";
11132
+ import * as React13 from "react";
11144
11133
 
11145
11134
  // src/components/Switch/Switch.styles.ts
11146
11135
  import { css as css52 } from "@emotion/react";
@@ -11229,7 +11218,7 @@ var SwitchText = css52`
11229
11218
 
11230
11219
  // src/components/Switch/Switch.tsx
11231
11220
  import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
11232
- var Switch = React14.forwardRef(
11221
+ var Switch = React13.forwardRef(
11233
11222
  ({ label, infoText, toggleText, children, ...inputProps }, ref) => {
11234
11223
  let additionalText = infoText;
11235
11224
  if (infoText && toggleText) {
@@ -11247,7 +11236,7 @@ var Switch = React14.forwardRef(
11247
11236
  );
11248
11237
 
11249
11238
  // src/components/Table/Table.tsx
11250
- import * as React15 from "react";
11239
+ import * as React14 from "react";
11251
11240
 
11252
11241
  // src/components/Table/Table.styles.ts
11253
11242
  import { css as css53 } from "@emotion/react";
@@ -11277,42 +11266,42 @@ var tableCellData = css53`
11277
11266
 
11278
11267
  // src/components/Table/Table.tsx
11279
11268
  import { jsx as jsx66 } from "@emotion/react/jsx-runtime";
11280
- var Table = React15.forwardRef(({ children, ...otherProps }, ref) => {
11269
+ var Table = React14.forwardRef(({ children, ...otherProps }, ref) => {
11281
11270
  return /* @__PURE__ */ jsx66("table", { ref, css: table, ...otherProps, children });
11282
11271
  });
11283
- var TableHead = React15.forwardRef(
11272
+ var TableHead = React14.forwardRef(
11284
11273
  ({ children, ...otherProps }, ref) => {
11285
11274
  return /* @__PURE__ */ jsx66("thead", { ref, css: tableHead, ...otherProps, children });
11286
11275
  }
11287
11276
  );
11288
- var TableBody = React15.forwardRef(
11277
+ var TableBody = React14.forwardRef(
11289
11278
  ({ children, ...otherProps }, ref) => {
11290
11279
  return /* @__PURE__ */ jsx66("tbody", { ref, ...otherProps, children });
11291
11280
  }
11292
11281
  );
11293
- var TableFoot = React15.forwardRef(
11282
+ var TableFoot = React14.forwardRef(
11294
11283
  ({ children, ...otherProps }, ref) => {
11295
11284
  return /* @__PURE__ */ jsx66("tfoot", { ref, ...otherProps, children });
11296
11285
  }
11297
11286
  );
11298
- var TableRow = React15.forwardRef(
11287
+ var TableRow = React14.forwardRef(
11299
11288
  ({ children, ...otherProps }, ref) => {
11300
11289
  return /* @__PURE__ */ jsx66("tr", { ref, css: tableRow, ...otherProps, children });
11301
11290
  }
11302
11291
  );
11303
- var TableCellHead = React15.forwardRef(
11292
+ var TableCellHead = React14.forwardRef(
11304
11293
  ({ children, ...otherProps }, ref) => {
11305
11294
  return /* @__PURE__ */ jsx66("th", { ref, css: tableCellHead, ...otherProps, children });
11306
11295
  }
11307
11296
  );
11308
- var TableCellData = React15.forwardRef(
11297
+ var TableCellData = React14.forwardRef(
11309
11298
  ({ children, ...otherProps }, ref) => {
11310
11299
  return /* @__PURE__ */ jsx66("td", { ref, css: tableCellData, ...otherProps, children });
11311
11300
  }
11312
11301
  );
11313
11302
 
11314
11303
  // src/components/Tabs/Tabs.tsx
11315
- import { createContext as createContext4, useContext as useContext5, useEffect as useEffect8 } from "react";
11304
+ import { createContext as createContext4, useContext as useContext5, useEffect as useEffect7 } from "react";
11316
11305
  import {
11317
11306
  Tab as ReakitTab,
11318
11307
  TabList as ReakitTabList,
@@ -11356,11 +11345,11 @@ var useCurrentTab = () => {
11356
11345
  };
11357
11346
  var Tabs = ({ children, onSelectedIdChange, ...props }) => {
11358
11347
  const tab = useTabState(props);
11359
- useEffect8(() => {
11348
+ useEffect7(() => {
11360
11349
  var _a;
11361
11350
  onSelectedIdChange == null ? void 0 : onSelectedIdChange((_a = tab.selectedId) != null ? _a : void 0);
11362
11351
  }, [tab.selectedId, onSelectedIdChange]);
11363
- useEffect8(() => {
11352
+ useEffect7(() => {
11364
11353
  tab.setSelectedId(props.selectedId);
11365
11354
  }, [props.selectedId]);
11366
11355
  return /* @__PURE__ */ jsx67(CurrentTabContext.Provider, { value: tab, children });
@@ -11378,9 +11367,47 @@ var TabContent = ({ children, ...props }) => {
11378
11367
  return /* @__PURE__ */ jsx67(ReakitTabPanel, { ...props, ...currentTab, children });
11379
11368
  };
11380
11369
 
11381
- // src/components/Validation/StatusBullet.styles.ts
11370
+ // src/components/Tooltip/Tooltip.tsx
11371
+ import React16 from "react";
11372
+ import {
11373
+ Tooltip as ReakitTooltip,
11374
+ TooltipArrow,
11375
+ TooltipReference,
11376
+ useTooltipState
11377
+ } from "reakit/Tooltip";
11378
+
11379
+ // src/components/Tooltip/Tooltip.styles.ts
11382
11380
  import { css as css55 } from "@emotion/react";
11383
- var StatusBulletContainer = css55`
11381
+ var TooltipContainer = css55`
11382
+ border: 2px solid var(--gray-300);
11383
+ border-radius: var(--rounded-base);
11384
+ padding: var(--spacing-xs) var(--spacing-sm);
11385
+ color: var(--gray-500);
11386
+ font-size: var(--fs-xs);
11387
+ background: var(--white);
11388
+ `;
11389
+ var TooltipArrowStyles = css55`
11390
+ svg {
11391
+ fill: var(--gray-300);
11392
+ }
11393
+ `;
11394
+
11395
+ // src/components/Tooltip/Tooltip.tsx
11396
+ import { Fragment as Fragment10, jsx as jsx68, jsxs as jsxs45 } from "@emotion/react/jsx-runtime";
11397
+ function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
11398
+ const tooltip = useTooltipState({ placement });
11399
+ return /* @__PURE__ */ jsxs45(Fragment10, { children: [
11400
+ /* @__PURE__ */ jsx68(TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => React16.cloneElement(children, referenceProps) }),
11401
+ /* @__PURE__ */ jsxs45(ReakitTooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
11402
+ /* @__PURE__ */ jsx68(TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
11403
+ title
11404
+ ] })
11405
+ ] });
11406
+ }
11407
+
11408
+ // src/components/Validation/StatusBullet.styles.ts
11409
+ import { css as css56 } from "@emotion/react";
11410
+ var StatusBulletContainer = css56`
11384
11411
  align-items: center;
11385
11412
  align-self: center;
11386
11413
  color: var(--gray-500);
@@ -11400,18 +11427,19 @@ var StatusBulletContainer = css55`
11400
11427
  height: var(--fs-xs);
11401
11428
  }
11402
11429
  `;
11403
- var StatusDraft = css55`
11430
+ var StatusDraft = css56`
11404
11431
  &:before {
11405
11432
  background: var(--white);
11406
11433
  box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
11407
11434
  }
11408
11435
  `;
11409
- var StatusModified = css55`
11436
+ var StatusModified = css56`
11410
11437
  &:before {
11411
- background: var(--brand-primary-1);
11438
+ background: linear-gradient(to right, var(--white) 50%, var(--brand-primary-1) 50% 100%);
11439
+ box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
11412
11440
  }
11413
11441
  `;
11414
- var StatusError = css55`
11442
+ var StatusError = css56`
11415
11443
  color: var(--error);
11416
11444
  &:before {
11417
11445
  background: var(--error);
@@ -11427,19 +11455,19 @@ var StatusError = css55`
11427
11455
  rotate: -45deg;
11428
11456
  }
11429
11457
  `;
11430
- var StatusPublished = css55`
11458
+ var StatusPublished = css56`
11431
11459
  &:before {
11432
11460
  background: var(--brand-secondary-3);
11433
11461
  }
11434
11462
  `;
11435
- var StatusOrphan = css55`
11463
+ var StatusOrphan = css56`
11436
11464
  &:before {
11437
11465
  background: var(--brand-secondary-5);
11438
11466
  }
11439
11467
  `;
11440
11468
 
11441
11469
  // src/components/Validation/StatusBullet.tsx
11442
- import { jsx as jsx68 } from "@emotion/react/jsx-runtime";
11470
+ import { jsx as jsx69 } from "@emotion/react/jsx-runtime";
11443
11471
  var StatusBullet = ({ status, hideText = false, message, ...props }) => {
11444
11472
  const currentStateStyles = {
11445
11473
  Error: StatusError,
@@ -11449,7 +11477,7 @@ var StatusBullet = ({ status, hideText = false, message, ...props }) => {
11449
11477
  Published: StatusPublished,
11450
11478
  Draft: StatusDraft
11451
11479
  };
11452
- return /* @__PURE__ */ jsx68(
11480
+ return /* @__PURE__ */ jsx69(
11453
11481
  "span",
11454
11482
  {
11455
11483
  css: [StatusBulletContainer, currentStateStyles[status]],
@@ -11537,6 +11565,7 @@ export {
11537
11565
  Textarea,
11538
11566
  Theme,
11539
11567
  TileContainer,
11568
+ Tooltip,
11540
11569
  UniformBadge,
11541
11570
  UniformLogo,
11542
11571
  WarningMessage,
package/dist/index.d.ts CHANGED
@@ -12,6 +12,7 @@ import InternalSelect from 'react-select/dist/declarations/src/Select';
12
12
  import { StateManagerProps } from 'react-select/dist/declarations/src/useStateManager';
13
13
  import { MenuHTMLProps, MenuProps as MenuProps$2, MenuStateReturn } from 'reakit/Menu';
14
14
  import { TabState, TabListProps, TabProps, TabPanelProps } from 'reakit/Tab';
15
+ import { TooltipOptions, TooltipInitialState } from 'reakit/Tooltip';
15
16
 
16
17
  /** @todo: line 144 onwards will be brought into a title, paragraph, list and link components */
17
18
  type ThemeProps = {
@@ -1242,6 +1243,17 @@ type TileContainerProps = React$1.HtmlHTMLAttributes<HTMLDivElement> & {
1242
1243
  */
1243
1244
  declare const TileContainer: ({ children, ...props }: TileContainerProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1244
1245
 
1246
+ type TooltipProps = TooltipOptions & {
1247
+ /** Content of tooltip popover */
1248
+ title: string | React__default.ReactElement;
1249
+ /** Optional ability to specify alternative placement. By default - bottom center */
1250
+ placement?: TooltipInitialState['placement'];
1251
+ /** Optional ability to control visibility of Tooltip manually, useful for showing tooltip on click instead of on hover */
1252
+ visible?: TooltipInitialState['visible'];
1253
+ children: JSX.Element;
1254
+ };
1255
+ declare function Tooltip({ children, title, placement, visible, ...props }: TooltipProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1256
+
1245
1257
  /** Available heading weights e.g. 1 - 6 */
1246
1258
  type LevelProps = 1 | 2 | 3 | 4 | 5 | 6;
1247
1259
  type HeadingProps = {
@@ -1375,4 +1387,4 @@ type StatusBulletProps = React$1.HTMLAttributes<HTMLSpanElement> & {
1375
1387
  };
1376
1388
  declare const StatusBullet: ({ status, hideText, message, ...props }: StatusBulletProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
1377
1389
 
1378
- export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, AnimationFile, AnimationFileProps, 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, LottieFile, LottieFileKeyProps, LottieFileProps, 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 };
1390
+ export { ActionButtonsProps, AddButton, AddButtonProps, AddListButton, AddListButtonProps, AddListButtonThemeProps, AnimationFile, AnimationFileProps, 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, LottieFile, LottieFileKeyProps, LottieFileProps, 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, Tooltip, TooltipProps, 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 };
package/dist/index.js CHANGED
@@ -103,6 +103,7 @@ __export(src_exports, {
103
103
  Textarea: () => Textarea,
104
104
  Theme: () => Theme,
105
105
  TileContainer: () => TileContainer,
106
+ Tooltip: () => Tooltip,
106
107
  UniformBadge: () => UniformBadge,
107
108
  UniformLogo: () => UniformLogo,
108
109
  WarningMessage: () => WarningMessage,
@@ -9938,7 +9939,6 @@ function InputComboBox(props) {
9938
9939
 
9939
9940
  // src/components/Input/InputInlineSelect.tsx
9940
9941
  var import_react44 = require("@emotion/react");
9941
- var React13 = __toESM(require("react"));
9942
9942
  var import_react45 = require("react");
9943
9943
  var import_cg8 = require("react-icons/cg");
9944
9944
 
@@ -10021,17 +10021,7 @@ var InputInlineSelect = ({
10021
10021
  var _a;
10022
10022
  const [menuVisible, setMenuVisible] = (0, import_react45.useState)(false);
10023
10023
  const divRef = (0, import_react45.useRef)(null);
10024
- React13.useEffect(() => {
10025
- const outsideClick = (event) => {
10026
- if (divRef.current && !divRef.current.contains(event.target)) {
10027
- setMenuVisible(false);
10028
- }
10029
- };
10030
- document.addEventListener("mousedown", outsideClick);
10031
- return () => {
10032
- document.removeEventListener("mousedown", outsideClick);
10033
- };
10034
- }, [divRef]);
10024
+ useOutsideClick(divRef, () => setMenuVisible(false));
10035
10025
  const selected = options.find((option) => option.value === value);
10036
10026
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
10037
10027
  "div",
@@ -11281,7 +11271,7 @@ var Skeleton = ({
11281
11271
  );
11282
11272
 
11283
11273
  // src/components/Switch/Switch.tsx
11284
- var React14 = __toESM(require("react"));
11274
+ var React13 = __toESM(require("react"));
11285
11275
 
11286
11276
  // src/components/Switch/Switch.styles.ts
11287
11277
  var import_react64 = require("@emotion/react");
@@ -11370,7 +11360,7 @@ var SwitchText = import_react64.css`
11370
11360
 
11371
11361
  // src/components/Switch/Switch.tsx
11372
11362
  var import_jsx_runtime64 = require("@emotion/react/jsx-runtime");
11373
- var Switch = React14.forwardRef(
11363
+ var Switch = React13.forwardRef(
11374
11364
  ({ label, infoText, toggleText, children, ...inputProps }, ref) => {
11375
11365
  let additionalText = infoText;
11376
11366
  if (infoText && toggleText) {
@@ -11388,7 +11378,7 @@ var Switch = React14.forwardRef(
11388
11378
  );
11389
11379
 
11390
11380
  // src/components/Table/Table.tsx
11391
- var React15 = __toESM(require("react"));
11381
+ var React14 = __toESM(require("react"));
11392
11382
 
11393
11383
  // src/components/Table/Table.styles.ts
11394
11384
  var import_react65 = require("@emotion/react");
@@ -11418,35 +11408,35 @@ var tableCellData = import_react65.css`
11418
11408
 
11419
11409
  // src/components/Table/Table.tsx
11420
11410
  var import_jsx_runtime65 = require("@emotion/react/jsx-runtime");
11421
- var Table = React15.forwardRef(({ children, ...otherProps }, ref) => {
11411
+ var Table = React14.forwardRef(({ children, ...otherProps }, ref) => {
11422
11412
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("table", { ref, css: table, ...otherProps, children });
11423
11413
  });
11424
- var TableHead = React15.forwardRef(
11414
+ var TableHead = React14.forwardRef(
11425
11415
  ({ children, ...otherProps }, ref) => {
11426
11416
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("thead", { ref, css: tableHead, ...otherProps, children });
11427
11417
  }
11428
11418
  );
11429
- var TableBody = React15.forwardRef(
11419
+ var TableBody = React14.forwardRef(
11430
11420
  ({ children, ...otherProps }, ref) => {
11431
11421
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("tbody", { ref, ...otherProps, children });
11432
11422
  }
11433
11423
  );
11434
- var TableFoot = React15.forwardRef(
11424
+ var TableFoot = React14.forwardRef(
11435
11425
  ({ children, ...otherProps }, ref) => {
11436
11426
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("tfoot", { ref, ...otherProps, children });
11437
11427
  }
11438
11428
  );
11439
- var TableRow = React15.forwardRef(
11429
+ var TableRow = React14.forwardRef(
11440
11430
  ({ children, ...otherProps }, ref) => {
11441
11431
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("tr", { ref, css: tableRow, ...otherProps, children });
11442
11432
  }
11443
11433
  );
11444
- var TableCellHead = React15.forwardRef(
11434
+ var TableCellHead = React14.forwardRef(
11445
11435
  ({ children, ...otherProps }, ref) => {
11446
11436
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("th", { ref, css: tableCellHead, ...otherProps, children });
11447
11437
  }
11448
11438
  );
11449
- var TableCellData = React15.forwardRef(
11439
+ var TableCellData = React14.forwardRef(
11450
11440
  ({ children, ...otherProps }, ref) => {
11451
11441
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("td", { ref, css: tableCellData, ...otherProps, children });
11452
11442
  }
@@ -11514,9 +11504,42 @@ var TabContent = ({ children, ...props }) => {
11514
11504
  return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_Tab.TabPanel, { ...props, ...currentTab, children });
11515
11505
  };
11516
11506
 
11517
- // src/components/Validation/StatusBullet.styles.ts
11507
+ // src/components/Tooltip/Tooltip.tsx
11508
+ var import_react69 = __toESM(require("react"));
11509
+ var import_Tooltip = require("reakit/Tooltip");
11510
+
11511
+ // src/components/Tooltip/Tooltip.styles.ts
11518
11512
  var import_react68 = require("@emotion/react");
11519
- var StatusBulletContainer = import_react68.css`
11513
+ var TooltipContainer = import_react68.css`
11514
+ border: 2px solid var(--gray-300);
11515
+ border-radius: var(--rounded-base);
11516
+ padding: var(--spacing-xs) var(--spacing-sm);
11517
+ color: var(--gray-500);
11518
+ font-size: var(--fs-xs);
11519
+ background: var(--white);
11520
+ `;
11521
+ var TooltipArrowStyles = import_react68.css`
11522
+ svg {
11523
+ fill: var(--gray-300);
11524
+ }
11525
+ `;
11526
+
11527
+ // src/components/Tooltip/Tooltip.tsx
11528
+ var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
11529
+ function Tooltip({ children, title, placement = "bottom", visible, ...props }) {
11530
+ const tooltip = (0, import_Tooltip.useTooltipState)({ placement });
11531
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
11532
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_Tooltip.TooltipReference, { ...tooltip, ...children.props, children: (referenceProps) => import_react69.default.cloneElement(children, referenceProps) }),
11533
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_Tooltip.Tooltip, { ...tooltip, ...props, css: TooltipContainer, visible: visible != null ? visible : tooltip.visible, children: [
11534
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_Tooltip.TooltipArrow, { ...tooltip, css: TooltipArrowStyles }),
11535
+ title
11536
+ ] })
11537
+ ] });
11538
+ }
11539
+
11540
+ // src/components/Validation/StatusBullet.styles.ts
11541
+ var import_react70 = require("@emotion/react");
11542
+ var StatusBulletContainer = import_react70.css`
11520
11543
  align-items: center;
11521
11544
  align-self: center;
11522
11545
  color: var(--gray-500);
@@ -11536,18 +11559,19 @@ var StatusBulletContainer = import_react68.css`
11536
11559
  height: var(--fs-xs);
11537
11560
  }
11538
11561
  `;
11539
- var StatusDraft = import_react68.css`
11562
+ var StatusDraft = import_react70.css`
11540
11563
  &:before {
11541
11564
  background: var(--white);
11542
11565
  box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
11543
11566
  }
11544
11567
  `;
11545
- var StatusModified = import_react68.css`
11568
+ var StatusModified = import_react70.css`
11546
11569
  &:before {
11547
- background: var(--brand-primary-1);
11570
+ background: linear-gradient(to right, var(--white) 50%, var(--brand-primary-1) 50% 100%);
11571
+ box-shadow: inset 0 0 0 0.125rem var(--brand-primary-1);
11548
11572
  }
11549
11573
  `;
11550
- var StatusError = import_react68.css`
11574
+ var StatusError = import_react70.css`
11551
11575
  color: var(--error);
11552
11576
  &:before {
11553
11577
  background: var(--error);
@@ -11563,19 +11587,19 @@ var StatusError = import_react68.css`
11563
11587
  rotate: -45deg;
11564
11588
  }
11565
11589
  `;
11566
- var StatusPublished = import_react68.css`
11590
+ var StatusPublished = import_react70.css`
11567
11591
  &:before {
11568
11592
  background: var(--brand-secondary-3);
11569
11593
  }
11570
11594
  `;
11571
- var StatusOrphan = import_react68.css`
11595
+ var StatusOrphan = import_react70.css`
11572
11596
  &:before {
11573
11597
  background: var(--brand-secondary-5);
11574
11598
  }
11575
11599
  `;
11576
11600
 
11577
11601
  // src/components/Validation/StatusBullet.tsx
11578
- var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
11602
+ var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
11579
11603
  var StatusBullet = ({ status, hideText = false, message, ...props }) => {
11580
11604
  const currentStateStyles = {
11581
11605
  Error: StatusError,
@@ -11585,7 +11609,7 @@ var StatusBullet = ({ status, hideText = false, message, ...props }) => {
11585
11609
  Published: StatusPublished,
11586
11610
  Draft: StatusDraft
11587
11611
  };
11588
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11612
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
11589
11613
  "span",
11590
11614
  {
11591
11615
  css: [StatusBulletContainer, currentStateStyles[status]],
@@ -11674,6 +11698,7 @@ var StatusBullet = ({ status, hideText = false, message, ...props }) => {
11674
11698
  Textarea,
11675
11699
  Theme,
11676
11700
  TileContainer,
11701
+ Tooltip,
11677
11702
  UniformBadge,
11678
11703
  UniformLogo,
11679
11704
  WarningMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "18.9.1-alpha.4+62fc5d7ec",
3
+ "version": "18.11.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "62fc5d7ecb13c2a8e74fab5b19524479c9d550df"
52
+ "gitHead": "87433008a407efd686f3ab0d37eb5ceece6e66db"
53
53
  }