@procore/core-react 11.7.0-rc.2 → 11.7.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/Avatar/Avatar.d.ts +25 -2
  2. package/dist/Avatar/Avatar.js +34 -4
  3. package/dist/Avatar/Avatar.js.map +1 -1
  4. package/dist/Avatar/Avatar.styles.d.ts +4 -4
  5. package/dist/Avatar/Avatar.styles.js +3 -3
  6. package/dist/Avatar/Avatar.styles.js.map +1 -1
  7. package/dist/Avatar/Avatar.types.d.ts +28 -6
  8. package/dist/AvatarStack/AvatarStack.js +2 -2
  9. package/dist/AvatarStack/AvatarStack.js.map +1 -1
  10. package/dist/AvatarStack/AvatarStack.styles.d.ts +3 -1
  11. package/dist/AvatarStack/AvatarStack.types.d.ts +1 -1
  12. package/dist/ContactItem/ContactItem.js +1 -1
  13. package/dist/ContactItem/ContactItem.js.map +1 -1
  14. package/dist/ContactItem/ContactItem.styles.d.ts +3 -1
  15. package/dist/DateInput/DateInput.js +30 -6
  16. package/dist/DateInput/DateInput.js.map +1 -1
  17. package/dist/Menu/Menu.d.ts +2 -2
  18. package/dist/Semantic/Semantic.styles.d.ts +10 -0
  19. package/dist/Semantic/Semantic.styles.js +21 -3
  20. package/dist/Semantic/Semantic.styles.js.map +1 -1
  21. package/dist/SuperSelect/SuperSelect.styles.d.ts +3 -1
  22. package/dist/ToolHeader/ActionIcon.d.ts +5 -0
  23. package/dist/ToolHeader/ActionIcon.js +46 -0
  24. package/dist/ToolHeader/ActionIcon.js.map +1 -0
  25. package/dist/ToolHeader/ActionIcon.types.d.ts +10 -0
  26. package/dist/ToolHeader/ActionIcon.types.example.d.ts +1 -0
  27. package/dist/ToolHeader/ActionIcon.types.example.js +43 -0
  28. package/dist/ToolHeader/ActionIcon.types.example.js.map +1 -0
  29. package/dist/ToolHeader/ActionIcon.types.js +2 -0
  30. package/dist/ToolHeader/ActionIcon.types.js.map +1 -0
  31. package/dist/ToolHeader/ToolHeader.d.ts +4 -1
  32. package/dist/ToolHeader/ToolHeader.js +10 -0
  33. package/dist/ToolHeader/ToolHeader.js.map +1 -1
  34. package/dist/ToolHeader/ToolHeader.styles.js +5 -2
  35. package/dist/ToolHeader/ToolHeader.styles.js.map +1 -1
  36. package/dist/ToolHeader/ToolHeader.types.d.ts +12 -0
  37. package/dist/Tooltip/Tooltip.types.d.ts +2 -2
  38. package/dist/_hooks/I18n.d.ts +7 -0
  39. package/dist/_locales/en.json +7 -0
  40. package/dist/_styles/mixins.d.ts +3 -0
  41. package/dist/_styles/mixins.js +3 -0
  42. package/dist/_styles/mixins.js.map +1 -1
  43. package/dist/_typedoc/Avatar/Avatar.types.json +60 -22
  44. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +24 -24
  45. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  46. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  47. package/dist/_typedoc/Box/Box.types.json +68 -68
  48. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  49. package/dist/_typedoc/Button/Button.types.json +11 -11
  50. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  51. package/dist/_typedoc/Card/Card.types.json +6 -6
  52. package/dist/_typedoc/Checkbox/Checkbox.types.json +7 -7
  53. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  54. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  55. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  56. package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
  57. package/dist/_typedoc/Dropdown/Dropdown.types.json +39 -39
  58. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  59. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  60. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  61. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  62. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  63. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  64. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  65. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  66. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  67. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  68. package/dist/_typedoc/Form/Form.types.json +702 -702
  69. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  70. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  71. package/dist/_typedoc/Input/Input.types.json +2 -2
  72. package/dist/_typedoc/Link/Link.types.json +4 -4
  73. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  74. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  75. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +71 -71
  76. package/dist/_typedoc/Modal/Modal.types.json +28 -28
  77. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  78. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  79. package/dist/_typedoc/NumberInput/NumberInput.types.json +55 -55
  80. package/dist/_typedoc/PageLayout/PageLayout.types.json +7 -7
  81. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  82. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  83. package/dist/_typedoc/Pill/Pill.types.json +1 -1
  84. package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
  85. package/dist/_typedoc/Popover/Popover.types.json +10 -10
  86. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +5 -5
  87. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  88. package/dist/_typedoc/Required/Required.types.json +5 -5
  89. package/dist/_typedoc/Search/Search.types.json +18 -18
  90. package/dist/_typedoc/Section/Section.types.json +14 -14
  91. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  92. package/dist/_typedoc/Select/Select.types.json +33 -33
  93. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  94. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  95. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  96. package/dist/_typedoc/Table/Table.types.json +94 -94
  97. package/dist/_typedoc/Tabs/Tabs.types.json +15 -15
  98. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +10 -10
  99. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  100. package/dist/_typedoc/TextEditor/TextEditor.types.json +7 -7
  101. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
  102. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +27 -27
  103. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  104. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  105. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  106. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  107. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  108. package/dist/_typedoc/Token/Token.types.json +4 -4
  109. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +34 -8
  110. package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
  111. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  112. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  113. package/dist/_typedoc/Typography/Typography.types.json +8 -8
  114. package/dist/_typedoc/_utils/types.json +3 -3
  115. package/dist/_typedoc/deprecations.json +1 -1
  116. package/dist/_utils/CalendarHelpers.js +1 -1
  117. package/dist/_utils/CalendarHelpers.js.map +1 -1
  118. package/dist/_utils/polymorphic.d.ts +18 -0
  119. package/dist/_utils/polymorphic.js +2 -0
  120. package/dist/_utils/polymorphic.js.map +1 -0
  121. package/dist/_utils/types.d.ts +5 -0
  122. package/package.json +3 -2
@@ -3,5 +3,15 @@ export declare const StyledH2: import("styled-components").StyledComponent<"h2",
3
3
  export declare const StyledH3: import("styled-components").StyledComponent<"h3", any, {}, never>;
4
4
  export declare const StyledP: import("styled-components").StyledComponent<"p", any, {}, never>;
5
5
  export declare const StyledUL: import("styled-components").StyledComponent<"ul", any, {}, never>;
6
+ /**
7
+ * An unstyled `button`, browser reset
8
+ */
6
9
  export declare function getUnstyledButton(): import("styled-components").FlattenSimpleInterpolation;
10
+ /**
11
+ * An unstyled `button`, browser reset
12
+ */
7
13
  export declare const StyledUnstyledButton: import("styled-components").StyledComponent<"button", any, {}, never>;
14
+ /**
15
+ * An a styled component a
16
+ */
17
+ export declare const StyledAnchor: import("styled-components").StyledComponent<"a", any, {}, never>;
@@ -13,10 +13,28 @@ var topMarginRules = function () {
13
13
  return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n & + &,\n p + &,\n ul + & {\n margin-top: ", "px;\n }\n "], ["\n & + &,\n p + &,\n ul + & {\n margin-top: ", "px;\n }\n "])), spacing.lg);
14
14
  };
15
15
  export var StyledP = styled.p(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n ", "\n ", "\n ", "\n"], ["\n color: ", ";\n ", "\n ", "\n ", "\n"])), colors.gray15, getTypographyIntent('body'), topMarginRules, semiboldRules);
16
- export var StyledUL = styled.ul(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n margin: 0;\n padding: 0;\n ", "\n ", "\n\n padding-left: ", "px;\n\n & > li {\n list-style-type: disc;\n }\n"], ["\n color: ", ";\n margin: 0;\n padding: 0;\n ", "\n ", "\n\n padding-left: ", "px;\n\n & > li {\n list-style-type: disc;\n }\n"])), colors.gray15, getTypographyIntent('body'), topMarginRules, spacing.lg);
16
+ export var StyledUL = styled.ul(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n margin: 0;\n padding: 0;\n ", "\n ", "\n\n padding-left: ", "px;\n\n & > li {\n list-style-type: disc;\n }\n"], ["\n color: ", ";\n margin: 0;\n padding: 0;\n ", "\n ", "\n\n padding-left: ", "px;\n\n & > li {\n list-style-type: disc;\n }\n"
17
+ /**
18
+ * An unstyled `button`, browser reset
19
+ */
20
+ ])), colors.gray15, getTypographyIntent('body'), topMarginRules, spacing.lg);
21
+ /**
22
+ * An unstyled `button`, browser reset
23
+ */
17
24
  export function getUnstyledButton() {
18
25
  return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border: none;\n background: none;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n text-transform: none;\n -webkit-appearance: button;\n "], ["\n border: none;\n background: none;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n padding: 0;\n text-transform: none;\n -webkit-appearance: button;\n "])));
19
26
  }
20
- export var StyledUnstyledButton = styled.button(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), getUnstyledButton);
21
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
27
+ /**
28
+ * An unstyled `button`, browser reset
29
+ */
30
+ export var StyledUnstyledButton = styled.button(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"
31
+ /**
32
+ * An a styled component a
33
+ */
34
+ ])), getUnstyledButton);
35
+ /**
36
+ * An a styled component a
37
+ */
38
+ export var StyledAnchor = styled.a(templateObject_9 || (templateObject_9 = __makeTemplateObject([""], [""])));
39
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
22
40
  //# sourceMappingURL=Semantic.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Semantic.styles.js","sourceRoot":"","sources":["../../src/Semantic/Semantic.styles.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EACL,mBAAmB,EACnB,aAAa,GACd,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,OAAO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E,8MAAA,aACtB,EAAa,oCAGpB,EAA2B,MAC3B,EAAc,sBAEA,EAAU,sDAK3B;IACD;;OAEG;KAdQ,MAAM,CAAC,MAAM,EAGpB,mBAAmB,CAAC,MAAM,CAAC,EAC3B,cAAc,EAEA,OAAO,CAAC,EAAE,CAK3B,CAAA;AACD;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,yRAAA,sNAUT,KAAA;AACH,CAAC;AACD;;GAEG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,+EAAA,MAC7C,EAAiB,IACpB;IAED;;OAEG;KALC,iBAAiB,CACpB,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,MAAM,CAAC,CAAC,qEAAA,EAAE,IAAA,CAAA"}
@@ -6,7 +6,9 @@ export declare const StyledVirtuoso: import("styled-components").StyledComponent
6
6
  export declare const StyledEllipses: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  export declare const StyledItemContent: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const StyledItemAvatarWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
9
- export declare const StyledItemAvatar: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").AvatarProps & import("../_utils/types").DivAttributes & import("react").RefAttributes<HTMLDivElement>> & {
9
+ export declare const StyledItemAvatar: import("styled-components").StyledComponent<(<Role extends import("../Avatar/Avatar.types").AvatarRoles>(props: import("..").AvatarProps<Role> | (import("../Avatar/Avatar.types").BaseAvatarProps & {
10
+ ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
11
+ })) => JSX.Element) & {
10
12
  Icon: import("react").ForwardRefExoticComponent<import("../_utils/types").DivAttributes & import("..").AvatarIconProps & import("react").RefAttributes<HTMLDivElement>>;
11
13
  Label: import("react").ForwardRefExoticComponent<import("../_utils/types").DivAttributes & import("../Avatar/Avatar.types").AvatarLabelProps & import("react").RefAttributes<HTMLDivElement>>;
12
14
  Portrait: import("react").ForwardRefExoticComponent<import("../_utils/types").DivAttributes & import("..").AvatarPortraitProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ActionIconPolyType, ActionIconProps, ActionIconRef } from './ActionIcon.types';
3
+ declare function ActionIconInner<T extends ActionIconPolyType>(props: ActionIconProps<T>, ref: ActionIconRef<T>): JSX.Element;
4
+ export declare const ActionIcon: <Role extends ActionIconPolyType>(props: ActionIconProps<Role>) => ReturnType<typeof ActionIconInner>;
5
+ export {};
@@ -0,0 +1,46 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import React from 'react';
24
+ import { StyledAnchor, StyledUnstyledButton } from '../Semantic/Semantic.styles';
25
+ import { Tooltip } from '../Tooltip/Tooltip';
26
+ var ActionIconLink = React.forwardRef(function (_a, ref) {
27
+ var label = _a["aria-label"], href = _a.href, children = _a.children, props = __rest(_a, ['aria-label', "href", "children"]);
28
+ return (React.createElement(Tooltip, { overlay: label, trigger: ['hover', 'focus'] },
29
+ React.createElement(StyledAnchor, __assign({ "aria-label": label, href: href }, props, { ref: ref }), children)));
30
+ });
31
+ var ActionIconButton = React.forwardRef(function (_a, ref) {
32
+ var label = _a["aria-label"], children = _a.children, props = __rest(_a, ['aria-label', "children"]);
33
+ return (React.createElement(Tooltip, { overlay: label, trigger: ['hover', 'focus'] },
34
+ React.createElement(StyledUnstyledButton, __assign({ "aria-label": label }, props, { ref: ref }), children)));
35
+ });
36
+ function ActionIconInner(props, ref) {
37
+ if (props.role === 'link' || props.href) {
38
+ return (React.createElement(ActionIconLink, __assign({}, props, { ref: ref })));
39
+ }
40
+ if (props.role === 'button') {
41
+ return (React.createElement(ActionIconButton, __assign({}, props, { ref: ref })));
42
+ }
43
+ return (React.createElement(ActionIconButton, __assign({}, props, { ref: ref })));
44
+ }
45
+ export var ActionIcon = React.forwardRef(ActionIconInner);
46
+ //# sourceMappingURL=ActionIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionIcon.js","sourceRoot":"","sources":["../../src/ToolHeader/ActionIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAO5C,IAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAAC,UACtC,EAA0E,EAC1E,GAA0B;IADxB,IAAc,KAAK,mBAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA,EAAK,KAAK,cAA/C,kCAAiD,CAAF;IAG/C,OAAO,CACL,oBAAC,OAAO,IAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAClD,oBAAC,YAAY,2BAAa,KAAK,EAAE,IAAI,EAAE,IAAI,IAAM,KAAK,IAAE,GAAG,EAAE,GAAG,KAC7D,QAAQ,CACI,CACP,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,UACxC,EAAsE,EACtE,GAA4B;IAD1B,IAAc,KAAK,mBAAA,EAAE,QAAQ,cAAA,EAAK,KAAK,cAAzC,0BAA2C,CAAF;IAGzC,OAAO,CACL,oBAAC,OAAO,IAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QAClD,oBAAC,oBAAoB,2BAAa,KAAK,IAAM,KAAK,IAAE,GAAG,EAAE,GAAG,KACzD,QAAQ,CACY,CACf,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,SAAS,eAAe,CACtB,KAAyB,EACzB,GAAqB;IAErB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAK,KAAwC,CAAC,IAAI,EAAE;QAC3E,OAAO,CACL,oBAAC,cAAc,eACR,KAAwC,IAC7C,GAAG,EAAE,GAA4B,IACjC,CACH,CAAA;KACF;IAED,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC3B,OAAO,CACL,oBAAC,gBAAgB,eACV,KAAmC,IACxC,GAAG,EAAE,GAA8B,IACnC,CACH,CAAA;KACF;IACD,OAAO,CACL,oBAAC,gBAAgB,eACV,KAAmC,IACxC,GAAG,EAAE,GAA8B,IACnC,CACH,CAAA;AACH,CAAC;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,eAAe,CAInB,CAAA"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Polymorphic } from '../_utils/polymorphic';
3
+ import { AriaLabelled } from '../_utils/types';
4
+ export declare type ActionIconPolyType = 'link' | 'button';
5
+ export interface ActionIconPolyTagMap extends Record<ActionIconPolyType, React.ElementType> {
6
+ link: 'a';
7
+ button: 'button';
8
+ }
9
+ export declare type ActionIconRef<Role extends ActionIconPolyType> = Polymorphic.Ref<ActionIconPolyTagMap, Role>;
10
+ export declare type ActionIconProps<Role extends ActionIconPolyType> = Role extends 'link' ? Polymorphic.ComponentPropsWithRef<ActionIconPolyTagMap, 'link', 'href' | 'aria-label'> : Role extends 'button' ? AriaLabelled<Polymorphic.ComponentPropsWithRef<ActionIconPolyTagMap, 'button', 'onClick'>> : unknown;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { ActionIcon } from './ActionIcon';
3
+ function Custom() {
4
+ return React.createElement("a", { href: "/" }, "Hello");
5
+ }
6
+ test('Passing type check', function () {
7
+ function ExpectedToPass() {
8
+ var aRef = React.useRef(null);
9
+ var buttonRef = React.useRef(null);
10
+ return (React.createElement(React.Fragment, null,
11
+ React.createElement(ActionIcon, { role: "link", href: "#", "aria-label": "ok" }),
12
+ React.createElement(ActionIcon, { role: "link", href: "#", "aria-label": "ok", target: "ok", ref: aRef }),
13
+ React.createElement(ActionIcon, { role: "button", onClick: console.log, "aria-label": "ok" }),
14
+ React.createElement(ActionIcon, { role: "button", onClick: console.log, "aria-labelledby": "id" }),
15
+ React.createElement(ActionIcon, { role: "button", onClick: console.log, "aria-label": "id",
16
+ // See type. Supports aria-label or aria-labelledby required. But as props are any type
17
+ as: function (p) { return React.createElement("button", null); } }),
18
+ React.createElement(ActionIcon, { role: "button", onClick: console.log, "aria-label": "ok", ref: buttonRef }),
19
+ React.createElement(ActionIcon, { as: Custom, role: "link", href: "#", "aria-label": "ok", ref: aRef }),
20
+ React.createElement(ActionIcon, { as: function (p) { return React.createElement("a", null); }, role: "link", href: "#", "aria-label": "ok", ref: aRef })));
21
+ }
22
+ // This is a fake test, the real test is the file can be compiled/typechecked
23
+ expect(ExpectedToPass).toBeDefined();
24
+ });
25
+ /* When working with types, uncomment in development to confirm all fail typecheck */
26
+ // function ExpectedToFail() {
27
+ // const divRef = React.useRef<HTMLDivElement>(null)
28
+ // return (
29
+ // <>
30
+ // <ActionIcon />
31
+ // <ActionIcon role="link" />
32
+ // <ActionIcon role="button" aria-label="wrong" />
33
+ // <ActionIcon role="link" aria-label="wrong" href="#" ref={divRef} />
34
+ // <ActionIcon
35
+ // ref={divRef}
36
+ // role="button"
37
+ // onClick={console.log}
38
+ // aria-label="wrong"
39
+ // />
40
+ // </>
41
+ // )
42
+ // }
43
+ //# sourceMappingURL=ActionIcon.types.example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionIcon.types.example.js","sourceRoot":"","sources":["../../src/ToolHeader/ActionIcon.types.example.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,SAAS,MAAM;IACb,OAAO,2BAAG,IAAI,EAAC,GAAG,YAAU,CAAA;AAC9B,CAAC;AAED,IAAI,CAAC,oBAAoB,EAAE;IACzB,SAAS,cAAc;QACrB,IAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAoB,IAAI,CAAC,CAAA;QAClD,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAoB,IAAI,CAAC,CAAA;QAEvD,OAAO,CACL;YAEE,oBAAC,UAAU,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,GAAG,gBAAY,IAAI,GAAG;YAGnD,oBAAC,UAAU,IACT,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,GAAG,gBACG,IAAI,EACf,MAAM,EAAC,IAAI,EACX,GAAG,EAAE,IAAI,GACT;YACF,oBAAC,UAAU,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,GAAG,gBAAa,IAAI,GAAG;YAClE,oBAAC,UAAU,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,GAAG,qBAAkB,IAAI,GAAG;YACvE,oBAAC,UAAU,IACT,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,CAAC,GAAG,gBACT,IAAI;gBACf,uFAAuF;gBACvF,EAAE,EAAE,UAAC,CAAM,IAAK,OAAA,mCAAU,EAAV,CAAU,GAC1B;YACF,oBAAC,UAAU,IACT,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,CAAC,GAAG,gBACT,IAAI,EACf,GAAG,EAAE,SAAS,GACd;YACF,oBAAC,UAAU,IACT,EAAE,EAAE,MAAM,EACV,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,GAAG,gBACG,IAAI,EACf,GAAG,EAAE,IAAI,GACT;YACF,oBAAC,UAAU,IACT,EAAE,EAAE,UAAC,CAAC,IAAK,OAAA,8BAAK,EAAL,CAAK,EAChB,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,GAAG,gBACG,IAAI,EACf,GAAG,EAAE,IAAI,GACT,CACD,CACJ,CAAA;IACH,CAAC;IACD,6EAA6E;IAC7E,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE,CAAA;AACtC,CAAC,CAAC,CAAA;AAEF,qFAAqF;AACrF,8BAA8B;AAC9B,sDAAsD;AAEtD,aAAa;AACb,SAAS;AACT,uBAAuB;AACvB,mCAAmC;AACnC,wDAAwD;AACxD,4EAA4E;AAC5E,oBAAoB;AACpB,uBAAuB;AACvB,wBAAwB;AACxB,gCAAgC;AAChC,6BAA6B;AAC7B,WAAW;AACX,UAAU;AACV,MAAM;AACN,IAAI"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ActionIcon.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionIcon.types.js","sourceRoot":"","sources":["../../src/ToolHeader/ActionIcon.types.ts"],"names":[],"mappings":""}
@@ -1,8 +1,9 @@
1
1
  /// <reference types="hoist-non-react-statics" />
2
2
  import React from 'react';
3
3
  import { DivAttributes, Props, SVGAttributes } from '../_utils/types';
4
- import { ToolHeaderBadgeProps, ToolHeaderIconProps } from './ToolHeader.types';
4
+ import { ToolHeaderBadgeProps, ToolHeaderIconProps, ToolHeaderSettingsActionPolyType, ToolHeaderSettingsActionProps, ToolHeaderSettingsActionRef } from './ToolHeader.types';
5
5
  export declare const Icon: React.ForwardRefExoticComponent<SVGAttributes & ToolHeaderIconProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare function SettingsActionInner<Role extends ToolHeaderSettingsActionPolyType>(props: ToolHeaderSettingsActionProps<Role>, ref: ToolHeaderSettingsActionRef<Role>): JSX.Element;
6
7
  export declare const Title: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../_utils/types").HeadingAttributes & React.RefAttributes<HTMLHeadingElement>>, any, {}, never>;
7
8
  export declare const Tabs: React.ForwardRefExoticComponent<DivAttributes & Props & React.RefAttributes<HTMLDivElement>>;
8
9
  export declare const Actions: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -22,4 +23,6 @@ export declare const ToolHeader: string & import("styled-components").StyledComp
22
23
  Tabs: React.ForwardRefExoticComponent<DivAttributes & Props & React.RefAttributes<HTMLDivElement>>;
23
24
  Actions: import("styled-components").StyledComponent<"div", any, {}, never>;
24
25
  Badge: React.ForwardRefExoticComponent<DivAttributes & ToolHeaderBadgeProps & React.RefAttributes<HTMLDivElement>>;
26
+ SettingsAction: <Role extends ToolHeaderSettingsActionPolyType>(props: ToolHeaderSettingsActionProps<Role>) => ReturnType<typeof SettingsActionInner>;
25
27
  };
28
+ export {};
@@ -23,7 +23,9 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { Cog } from '@procore/core-icons';
24
24
  import React from 'react';
25
25
  import { Tabs as TabsBase } from '../Tabs/Tabs';
26
+ import { useI18nContext } from '../_hooks/I18n';
26
27
  import { addSubcomponents } from '../_utils/addSubcomponents';
28
+ import { ActionIcon } from './ActionIcon';
27
29
  import { StyledHeaderActions, StyledHeaderBadge, StyledHeaderTabs, StyledToolHeader, StyledToolHeaderIconContainer, StyledToolHeaderTitle, } from './ToolHeader.styles';
28
30
  var ToolHeader_ = StyledToolHeader;
29
31
  export var Icon = React.forwardRef(function Icon(_a, ref) {
@@ -31,6 +33,13 @@ export var Icon = React.forwardRef(function Icon(_a, ref) {
31
33
  var icon = icon_ ? (React.cloneElement(icon_, __assign(__assign({}, props), { size: 'sm' }))) : (React.createElement(Cog, __assign({}, props, { size: "sm" })));
32
34
  return (React.createElement(StyledToolHeaderIconContainer, { className: className, ref: ref }, icon));
33
35
  });
36
+ function SettingsActionInner(props, ref) {
37
+ var i18n = useI18nContext();
38
+ var Comp = ActionIcon;
39
+ return (React.createElement(Comp, __assign({ "aria-label": i18n.t('core.toolHeader.settingsAction'), ref: ref }, props),
40
+ React.createElement(ToolHeader.Icon, null)));
41
+ }
42
+ var SettingsAction = React.forwardRef(SettingsActionInner);
34
43
  export var Title = StyledToolHeaderTitle;
35
44
  export var Tabs = React.forwardRef(function Tabs(_a, ref) {
36
45
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
@@ -63,5 +72,6 @@ export var ToolHeader = addSubcomponents({
63
72
  Tabs: Tabs,
64
73
  Actions: Actions,
65
74
  Badge: Badge,
75
+ SettingsAction: SettingsAction,
66
76
  }, ToolHeader_);
67
77
  //# sourceMappingURL=ToolHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolHeader.js","sourceRoot":"","sources":["../../src/ToolHeader/ToolHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AACzC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,qBAAqB,CAAA;AAG5B,IAAM,WAAW,GAAG,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAGlC,SAAS,IAAI,CAAC,EAAoC,EAAE,G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KAAK,CAAC,EAA+B,EAAE,GAAG;IAAlC,IAAA,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAK,KAAK,cAA7B,uBAA+B,CAAF;IAC5C,OAAO,CACL,oBAAC,iBAAiB,eAAK,KAAK,gBAAY,OAAO,EAAE,GAAG,EAAE,GAAG,KACtD,QAAQ,CACS,CACrB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,WAAW,CAAC,WAAW,GAAG,YAAY,CAAA;AAEtC,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEpC,KAAK,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEtC,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAEpC,OAAO,CAAC,WAAW,GAAG,oBAAoB,CAAA;AAE1C,KAAK,CAAC,WAAW,GAAG,kBAAkB,CAAA;AAEtC,MAAM,CAAC,IAAM,UAAU,GAAG,gBAAgB,CACxC;IACE,IAAI,MAAA;IACJ,KAAK,OAAA;IACL,IAAI,MAAA;IACJ,OAAO,SAAA;IACP,KAAK,OAAA;IACL,cAAc,gBAAA;CACf,EACD,WAAW,CACZ,CAAA"}
@@ -7,7 +7,9 @@ import { H1 } from '../Semantic/Semantic';
7
7
  import { getTypographyIntent } from '../Typography/Typography.styles';
8
8
  import { colors } from '../_styles/colors';
9
9
  import { spacing } from '../_styles/spacing';
10
- export var StyledHeaderBadge = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n border-radius: 10px;\n border-style: solid;\n border-width: 1px;\n display: inline-block;\n margin-bottom: ", "px;\n padding: 1px ", "px;\n\n ", "\n"], ["\n ", "\n border-radius: 10px;\n border-style: solid;\n border-width: 1px;\n display: inline-block;\n margin-bottom: ", "px;\n padding: 1px ", "px;\n\n ", "\n"])), getTypographyIntent('small'), spacing.sm, spacing.sm, function (_a) {
10
+ export var StyledHeaderBadge = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n border-radius: 10px;\n border-style: solid;\n border-width: 1px;\n display: inline-block;\n margin-bottom: ", "px;\n padding: 1px ", "px;\n\n ", "\n"], ["\n ", "\n border-radius: 10px;\n border-style: solid;\n border-width: 1px;\n display: inline-block;\n margin-bottom: ", "px;\n padding: 1px ", "px;\n\n ", "\n"
11
+ // TODO in v12 remove cursor: pointer;
12
+ ])), getTypographyIntent('small'), spacing.sm, spacing.sm, function (_a) {
11
13
  var $variant = _a.$variant;
12
14
  if ($variant) {
13
15
  if ($variant === 'trial') {
@@ -15,10 +17,11 @@ export var StyledHeaderBadge = styled.div(templateObject_2 || (templateObject_2
15
17
  }
16
18
  }
17
19
  });
20
+ // TODO in v12 remove cursor: pointer;
18
21
  export var StyledToolHeaderIconContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n cursor: pointer;\n display: inline-flex;\n flex: 0 0 auto;\n"], ["\n color: ", ";\n cursor: pointer;\n display: inline-flex;\n flex: 0 0 auto;\n"])), colors.orange50);
19
22
  export var StyledHeaderTabs = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-self: flex-end;\n flex: 1 1 auto;\n min-width: 100px;\n overflow: hidden;\n"], ["\n align-self: flex-end;\n flex: 1 1 auto;\n min-width: 100px;\n overflow: hidden;\n"])));
20
23
  export var StyledHeaderActions = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex: 0 0 auto;\n margin-left: auto;\n padding-left: ", "px;\n"], ["\n flex: 0 0 auto;\n margin-left: auto;\n padding-left: ", "px;\n"])), spacing.lg);
21
24
  export var StyledToolHeaderTitle = styled(H1)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-right: ", "px;\n white-space: nowrap;\n"], ["\n margin-right: ", "px;\n white-space: nowrap;\n"])), spacing.xl);
22
- export var StyledToolHeader = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n min-height: 36px;\n width: 100%;\n\n ", " + ", ",\n a + ", " {\n margin-left: ", "px;\n }\n"], ["\n align-items: center;\n display: flex;\n min-height: 36px;\n width: 100%;\n\n ", " + ", ",\n a + ", " {\n margin-left: ", "px;\n }\n"])), StyledToolHeaderIconContainer, StyledToolHeaderTitle, StyledToolHeaderTitle, spacing.lg);
25
+ export var StyledToolHeader = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n min-height: 36px;\n width: 100%;\n\n ", " + ", ",\n a + ", ", button + ", " {\n margin-left: ", "px;\n }\n"], ["\n align-items: center;\n display: flex;\n min-height: 36px;\n width: 100%;\n\n ", " + ", ",\n a + ", ", button + ", " {\n margin-left: ", "px;\n }\n"])), StyledToolHeaderIconContainer, StyledToolHeaderTitle, StyledToolHeaderTitle, StyledToolHeaderTitle, spacing.lg);
23
26
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
24
27
  //# sourceMappingURL=ToolHeader.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToolHeader.styles.js","sourceRoot":"","sources":["../../src/ToolHeader/ToolHeader.styles.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,MAAM,CAAC,IAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,2OAEzC,MACE,EAA4B,qHAKb,EAAU,sBACZ,EAAU,WAEvB,EAUD,IACF,KAnBG,mBAAmB,CAAC,OAAO,CAAC,EAKb,OAAO,CAAC,EAAE,EACZ,OAAO,CAAC,EAAE,EAEvB,UAAC,EAAY;QAAV,QAAQ,cAAA;IACX,IAAI,QAAQ,EAAE;QACZ,IA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@@
1
1
  /// <reference types="react" />
2
+ import { Polymorphic } from '../_utils/polymorphic';
2
3
  import { Props } from '../_utils/types';
3
4
  export declare type ToolHeaderBadgeVariant = 'beta' | 'new' | 'trial';
4
5
  export interface ToolHeaderBadgeProps extends Props {
@@ -14,3 +15,14 @@ export interface ToolHeaderIconProps extends Props {
14
15
  */
15
16
  icon?: React.ReactNode;
16
17
  }
18
+ export declare type ToolHeaderSettingsActionPolyType = 'link' | 'button';
19
+ export interface ToolHeaderSettingsActionPolyTagMap extends Record<ToolHeaderSettingsActionPolyType, React.ElementType> {
20
+ link: 'a';
21
+ button: 'button';
22
+ }
23
+ export declare type ToolHeaderSettingsActionRef<Role extends ToolHeaderSettingsActionPolyType> = Polymorphic.Ref<ToolHeaderSettingsActionPolyTagMap, Role>;
24
+ export declare type ToolHeaderSettingsActionProps<Role extends ToolHeaderSettingsActionPolyType> = Role extends 'link' ? Polymorphic.ComponentPropsWithRef<ToolHeaderSettingsActionPolyTagMap, 'link', 'href', {
25
+ 'aria-label'?: string;
26
+ }> : Role extends 'button' ? Polymorphic.ComponentPropsWithRef<ToolHeaderSettingsActionPolyTagMap, 'button', 'onClick', {
27
+ 'aria-label'?: string;
28
+ }> : unknown;
@@ -1,4 +1,4 @@
1
- import { TriggerVariant } from '../_hooks/Trigger';
1
+ import { OverlayTriggerProps } from '../OverlayTrigger/OverlayTrigger.types';
2
2
  import { Placement } from '../_utils/placement';
3
3
  import { Props } from '../_utils/types';
4
4
  export interface TooltipContentProps extends Props {
@@ -35,5 +35,5 @@ export interface TooltipProps extends Props {
35
35
  * The event to trigger the overlay
36
36
  * @since 10.19.0
37
37
  */
38
- trigger?: TriggerVariant;
38
+ trigger?: OverlayTriggerProps['trigger'];
39
39
  }
@@ -444,6 +444,7 @@ export declare const coreTranslations: {
444
444
  };
445
445
  dateInput: {
446
446
  clear: string;
447
+ ariaLabel: string;
447
448
  segment: {
448
449
  ariaLabel: {
449
450
  withValue: {
@@ -457,6 +458,9 @@ export declare const coreTranslations: {
457
458
  year: string;
458
459
  };
459
460
  };
461
+ ariaValueText: {
462
+ empty: string;
463
+ };
460
464
  };
461
465
  clearButton: {
462
466
  ariaLabel: string;
@@ -608,6 +612,9 @@ export declare const coreTranslations: {
608
612
  token: {
609
613
  remove: string;
610
614
  };
615
+ toolHeader: {
616
+ settingsAction: string;
617
+ };
611
618
  fileSelect: {
612
619
  localFilesSource: string;
613
620
  uploadFailed: string;
@@ -141,6 +141,7 @@
141
141
  },
142
142
  "dateInput": {
143
143
  "clear": "Delete field",
144
+ "ariaLabel": "Current value is {{value}}",
144
145
  "segment": {
145
146
  "ariaLabel": {
146
147
  "withValue": {
@@ -153,6 +154,9 @@
153
154
  "day": "Set a day",
154
155
  "year": "Set a year"
155
156
  }
157
+ },
158
+ "ariaValueText": {
159
+ "empty": "Empty"
156
160
  }
157
161
  },
158
162
  "clearButton": {
@@ -305,6 +309,9 @@
305
309
  "token": {
306
310
  "remove": "Remove selection"
307
311
  },
312
+ "toolHeader": {
313
+ "settingsAction": "Configure Settings"
314
+ },
308
315
  "fileSelect": {
309
316
  "localFilesSource": "My Computer",
310
317
  "uploadFailed": "Upload Failed",
@@ -1,4 +1,7 @@
1
1
  import { Intent } from '../Typography/Typography.types';
2
+ /**
3
+ * Using box-shadow only, will not change size with a border.
4
+ */
2
5
  export declare const focusable: import("styled-components").FlattenSimpleInterpolation;
3
6
  export declare const defaultTransition: import("styled-components").FlattenSimpleInterpolation;
4
7
  export declare function getEllipsis(): import("styled-components").FlattenSimpleInterpolation;
@@ -5,6 +5,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import { css } from 'styled-components';
6
6
  import { typographyLineHeight } from '../Typography/Typography.styles';
7
7
  import { colors } from './colors';
8
+ /**
9
+ * Using box-shadow only, will not change size with a border.
10
+ */
8
11
  export var focusable = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.focus,\n &:focus {\n outline: none;\n box-shadow: 0 0 0 1px ", ", inset 0 0 0 1px ", ";\n }\n"], ["\n &.focus,\n &:focus {\n outline: none;\n box-shadow: 0 0 0 1px ", ", inset 0 0 0 1px ", ";\n }\n"])), colors.blue40, colors.blue40);
9
12
  export var defaultTransition = css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transition: all 0.2s ease-in;\n"], ["\n transition: all 0.2s ease-in;\n"])));
10
13
  export function getEllipsis() {
@@ -1 +1 @@
1
- {"version":3,"file":"mixins.js","sourceRoot":"","sources":["../../src/_styles/mixins.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAEtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,CAAC,IAAM,SAAS,GAAG,GAAG,gLAAA,2EAIA,EAAa,oBAAqB,EAAa,UAE1E,KAF2B,MAAM,CAAC,MAAM,EAAqB,MAAM,CAAC,MAAM,CAE1E,CAAA;AAED,MAAM,CAAC,IAAM,iBAAiB,GAAG,GAAG,wGAAA,qCAEnC,IAAA,CAAA;AAED,MAAM,UAAU,WAAW;IACzB,OAAO,GAAG,wJAAA,qFAIT,KAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,GAAG,yMAAA,wEAGQ,EAAa,+BACL,EAAa,2BAEtC,KAHiB,MAAM,CAAC,MAAM,EACL,MAAM,CAAC,MAAM,EAEtC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAS;IAAT,sBAAA,EAAA,SAAS;IACpC,OAAO,GAAG,uMAAqB,uDAEP,EAAK,mEAGzB,EAGD,MACF,KAPuB,KAAK,EAGzB,UAAC,EAAmB;YAAjB,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA;QAAO,OAAA,GAAG,kLAAA,kGAEd,EAAgC,WAC/C,KADe,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC;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