@primer/components 0.0.0-20219283497 → 0.0.0-2021929153151

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 (162) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/dist/browser.esm.js +447 -440
  3. package/dist/browser.esm.js.map +1 -1
  4. package/dist/browser.umd.js +446 -439
  5. package/dist/browser.umd.js.map +1 -1
  6. package/lib/ActionList2/Description.d.ts +6 -0
  7. package/lib/ActionList2/Description.js +53 -0
  8. package/lib/ActionList2/Divider.d.ts +5 -0
  9. package/lib/ActionList2/Divider.js +33 -0
  10. package/lib/ActionList2/Group.d.ts +11 -0
  11. package/lib/ActionList2/Group.js +55 -0
  12. package/lib/ActionList2/Header.d.ts +26 -0
  13. package/lib/ActionList2/Header.js +55 -0
  14. package/lib/ActionList2/Item.d.ts +48 -0
  15. package/lib/ActionList2/Item.js +204 -0
  16. package/lib/ActionList2/List.d.ts +26 -0
  17. package/lib/ActionList2/List.js +56 -0
  18. package/lib/ActionList2/Selection.d.ts +5 -0
  19. package/lib/ActionList2/Selection.js +73 -0
  20. package/lib/ActionList2/Visuals.d.ts +11 -0
  21. package/lib/ActionList2/Visuals.js +90 -0
  22. package/lib/ActionList2/hacks.d.ts +30 -0
  23. package/lib/ActionList2/hacks.js +38 -0
  24. package/lib/ActionList2/index.d.ts +28 -0
  25. package/lib/ActionList2/index.js +42 -0
  26. package/lib/ActionMenu.js +2 -2
  27. package/lib/Autocomplete/Autocomplete.d.ts +30 -30
  28. package/lib/Autocomplete/AutocompleteInput.d.ts +30 -30
  29. package/lib/Button/Button.d.ts +30 -30
  30. package/lib/Button/ButtonBase.d.ts +1 -1
  31. package/lib/Button/ButtonClose.d.ts +35 -35
  32. package/lib/Button/ButtonDanger.d.ts +30 -30
  33. package/lib/Button/ButtonInvisible.d.ts +30 -30
  34. package/lib/Button/ButtonOutline.d.ts +30 -30
  35. package/lib/Button/ButtonPrimary.d.ts +30 -30
  36. package/lib/Button/ButtonStyles.js +1 -1
  37. package/lib/CircleBadge.d.ts +2 -2
  38. package/lib/CircleOcticon.d.ts +38 -38
  39. package/lib/Dialog/Dialog.d.ts +4 -4
  40. package/lib/Dialog/Dialog.js +22 -12
  41. package/lib/Dialog.d.ts +41 -41
  42. package/lib/Dropdown.d.ts +215 -137
  43. package/lib/Dropdown.js +5 -6
  44. package/lib/DropdownMenu/DropdownButton.d.ts +37 -37
  45. package/lib/FilterList.d.ts +30 -30
  46. package/lib/Flash.d.ts +1 -1
  47. package/lib/Label.d.ts +1 -1
  48. package/lib/Position.d.ts +4 -4
  49. package/lib/SelectMenu/SelectMenu.d.ts +187 -187
  50. package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
  51. package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
  52. package/lib/TextInputWithTokens.d.ts +34 -30
  53. package/lib/TextInputWithTokens.js +102 -29
  54. package/lib/Timeline.d.ts +39 -39
  55. package/lib/Token/AvatarToken.d.ts +1 -1
  56. package/lib/Token/IssueLabelToken.d.ts +1 -1
  57. package/lib/Token/Token.d.ts +1 -1
  58. package/lib/Token/Token.js +13 -2
  59. package/lib/Token/TokenBase.js +0 -4
  60. package/lib/Token/_RemoveTokenButton.js +15 -2
  61. package/lib/_TextInputWrapper.js +1 -1
  62. package/lib/constants.js +1 -3
  63. package/lib/experiments.d.ts +1 -0
  64. package/lib/experiments.js +18 -0
  65. package/lib/index.d.ts +0 -2
  66. package/lib/index.js +0 -8
  67. package/lib/sx.d.ts +10 -2
  68. package/lib/sx.js +8 -0
  69. package/lib/theme.d.ts +78 -0
  70. package/lib/theme.js +3 -1
  71. package/lib/utils/create-slots.d.ts +17 -0
  72. package/lib/utils/create-slots.js +105 -0
  73. package/lib/utils/testing.d.ts +1 -1
  74. package/lib/utils/types/KeyPaths.d.ts +3 -0
  75. package/lib/utils/types/KeyPaths.js +1 -0
  76. package/lib/utils/use-force-update.d.ts +1 -0
  77. package/lib/utils/use-force-update.js +19 -0
  78. package/lib-esm/ActionList2/Description.d.ts +6 -0
  79. package/lib-esm/ActionList2/Description.js +37 -0
  80. package/lib-esm/ActionList2/Divider.d.ts +5 -0
  81. package/lib-esm/ActionList2/Divider.js +21 -0
  82. package/lib-esm/ActionList2/Group.d.ts +11 -0
  83. package/lib-esm/ActionList2/Group.js +38 -0
  84. package/lib-esm/ActionList2/Header.d.ts +26 -0
  85. package/lib-esm/ActionList2/Header.js +45 -0
  86. package/lib-esm/ActionList2/Item.d.ts +48 -0
  87. package/lib-esm/ActionList2/Item.js +176 -0
  88. package/lib-esm/ActionList2/List.d.ts +26 -0
  89. package/lib-esm/ActionList2/List.js +38 -0
  90. package/lib-esm/ActionList2/Selection.d.ts +5 -0
  91. package/lib-esm/ActionList2/Selection.js +55 -0
  92. package/lib-esm/ActionList2/Visuals.d.ts +11 -0
  93. package/lib-esm/ActionList2/Visuals.js +68 -0
  94. package/lib-esm/ActionList2/hacks.d.ts +30 -0
  95. package/lib-esm/ActionList2/hacks.js +30 -0
  96. package/lib-esm/ActionList2/index.d.ts +28 -0
  97. package/lib-esm/ActionList2/index.js +29 -0
  98. package/lib-esm/ActionMenu.js +2 -2
  99. package/lib-esm/Autocomplete/Autocomplete.d.ts +30 -30
  100. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +30 -30
  101. package/lib-esm/Button/Button.d.ts +30 -30
  102. package/lib-esm/Button/ButtonBase.d.ts +1 -1
  103. package/lib-esm/Button/ButtonClose.d.ts +35 -35
  104. package/lib-esm/Button/ButtonDanger.d.ts +30 -30
  105. package/lib-esm/Button/ButtonInvisible.d.ts +30 -30
  106. package/lib-esm/Button/ButtonOutline.d.ts +30 -30
  107. package/lib-esm/Button/ButtonPrimary.d.ts +30 -30
  108. package/lib-esm/Button/ButtonStyles.js +1 -1
  109. package/lib-esm/CircleBadge.d.ts +2 -2
  110. package/lib-esm/CircleOcticon.d.ts +38 -38
  111. package/lib-esm/Dialog/Dialog.d.ts +4 -4
  112. package/lib-esm/Dialog/Dialog.js +21 -12
  113. package/lib-esm/Dialog.d.ts +41 -41
  114. package/lib-esm/Dropdown.d.ts +215 -137
  115. package/lib-esm/Dropdown.js +3 -4
  116. package/lib-esm/DropdownMenu/DropdownButton.d.ts +37 -37
  117. package/lib-esm/FilterList.d.ts +30 -30
  118. package/lib-esm/Flash.d.ts +1 -1
  119. package/lib-esm/Label.d.ts +1 -1
  120. package/lib-esm/Position.d.ts +4 -4
  121. package/lib-esm/SelectMenu/SelectMenu.d.ts +187 -187
  122. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
  123. package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
  124. package/lib-esm/TextInputWithTokens.d.ts +34 -30
  125. package/lib-esm/TextInputWithTokens.js +101 -30
  126. package/lib-esm/Timeline.d.ts +39 -39
  127. package/lib-esm/Token/AvatarToken.d.ts +1 -1
  128. package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
  129. package/lib-esm/Token/Token.d.ts +1 -1
  130. package/lib-esm/Token/Token.js +13 -2
  131. package/lib-esm/Token/TokenBase.js +0 -4
  132. package/lib-esm/Token/_RemoveTokenButton.js +11 -2
  133. package/lib-esm/_TextInputWrapper.js +1 -1
  134. package/lib-esm/constants.js +1 -3
  135. package/lib-esm/experiments.d.ts +1 -0
  136. package/lib-esm/experiments.js +2 -0
  137. package/lib-esm/index.d.ts +0 -2
  138. package/lib-esm/index.js +0 -1
  139. package/lib-esm/sx.d.ts +10 -2
  140. package/lib-esm/sx.js +3 -1
  141. package/lib-esm/theme.d.ts +78 -0
  142. package/lib-esm/theme.js +2 -1
  143. package/lib-esm/utils/create-slots.d.ts +17 -0
  144. package/lib-esm/utils/create-slots.js +84 -0
  145. package/lib-esm/utils/testing.d.ts +1 -1
  146. package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
  147. package/lib-esm/utils/types/KeyPaths.js +1 -0
  148. package/lib-esm/utils/use-force-update.d.ts +1 -0
  149. package/lib-esm/utils/use-force-update.js +6 -0
  150. package/package.json +4 -1
  151. package/lib/NewButton/button.d.ts +0 -581
  152. package/lib/NewButton/button.js +0 -297
  153. package/lib/NewButton/counter.d.ts +0 -6
  154. package/lib/NewButton/counter.js +0 -33
  155. package/lib/NewButton/index.d.ts +0 -4
  156. package/lib/NewButton/index.js +0 -21
  157. package/lib-esm/NewButton/button.d.ts +0 -581
  158. package/lib-esm/NewButton/button.js +0 -273
  159. package/lib-esm/NewButton/counter.d.ts +0 -6
  160. package/lib-esm/NewButton/counter.js +0 -21
  161. package/lib-esm/NewButton/index.d.ts +0 -4
  162. package/lib-esm/NewButton/index.js +0 -3
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { ForwardRefComponent as PolymorphicForwardRefComponent } from '@radix-ui/react-polymorphic';
3
+ import { SxProp } from '../sx';
4
+ import { AriaRole } from '../utils/types';
5
+ export declare type ListProps = {
6
+ /**
7
+ * `inset` children are offset (vertically and horizontally) from `List`’s edges, `full` children are flush (vertically and horizontally) with `List` edges
8
+ */
9
+ variant?: 'inset' | 'full';
10
+ /**
11
+ * Whether multiple Items or a single Item can be selected.
12
+ */
13
+ selectionVariant?: 'single' | 'multiple';
14
+ /**
15
+ * Display a divider above each `Item` in this `List` when it does not follow a `Header` or `Divider`.
16
+ */
17
+ showDividers?: boolean;
18
+ /**
19
+ * The ARIA role describing the function of `List` component. `listbox` or `menu` are a common values.
20
+ */
21
+ role?: AriaRole;
22
+ } & SxProp;
23
+ declare type ContextProps = Omit<ListProps, 'sx'>;
24
+ export declare const ListContext: React.Context<ContextProps>;
25
+ export declare const List: PolymorphicForwardRefComponent<"ul", ListProps>;
26
+ export {};
@@ -0,0 +1,38 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import Box from '../Box';
5
+ import { get } from '../constants';
6
+ import { merge } from '../sx';
7
+ export const ListContext = /*#__PURE__*/React.createContext({});
8
+ export const List = /*#__PURE__*/React.forwardRef(({
9
+ variant = 'inset',
10
+ selectionVariant,
11
+ showDividers = false,
12
+ sx = {},
13
+ ...props
14
+ }, forwardedRef) => {
15
+ const styles = {
16
+ margin: 0,
17
+ fontSize: get('fontSizes.1'),
18
+ lineHeight: '20px',
19
+ // TODO: check if we replace this already
20
+ paddingInlineStart: 0,
21
+ // reset ul styles
22
+ paddingY: variant === 'inset' ? get('space.2') : 0
23
+ };
24
+ return /*#__PURE__*/React.createElement(Box, _extends({
25
+ as: "ul",
26
+ sx: merge(styles, sx),
27
+ "aria-multiselectable": selectionVariant === 'multiple' ? true : undefined
28
+ }, props, {
29
+ ref: forwardedRef
30
+ }), /*#__PURE__*/React.createElement(ListContext.Provider, {
31
+ value: {
32
+ variant,
33
+ selectionVariant,
34
+ showDividers
35
+ }
36
+ }, props.children));
37
+ });
38
+ List.displayName = 'ActionList';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ItemProps } from './Item';
3
+ declare type SelectionProps = Pick<ItemProps, 'selected' | 'disabled'>;
4
+ export declare const Selection: React.FC<SelectionProps>;
5
+ export {};
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import { CheckIcon } from '@primer/octicons-react';
3
+ import { ListContext } from './List';
4
+ import { GroupContext } from './Group';
5
+ import { LeadingVisualContainer } from './Visuals';
6
+ export const Selection = ({
7
+ selected,
8
+ disabled
9
+ }) => {
10
+ const {
11
+ selectionVariant: listSelectionVariant
12
+ } = React.useContext(ListContext);
13
+ const {
14
+ selectionVariant: groupSelectionVariant
15
+ } = React.useContext(GroupContext);
16
+ /** selectionVariant in Group can override the selectionVariant in List root */
17
+
18
+ const selectionVariant = typeof groupSelectionVariant !== 'undefined' ? groupSelectionVariant : listSelectionVariant; // if selectionVariant is not set on List, don't show selection
19
+
20
+ if (!selectionVariant) {
21
+ // to avoid confusion, fail loudly instead of silently ignoring
22
+ if (selected) throw new Error('For Item to be selected, List needs to have a selectionVariant defined');
23
+ return null;
24
+ }
25
+
26
+ if (selectionVariant === 'single') {
27
+ return /*#__PURE__*/React.createElement(LeadingVisualContainer, null, selected && /*#__PURE__*/React.createElement(CheckIcon, null));
28
+ }
29
+ /**
30
+ * selectionVariant is multiple
31
+ * readOnly is required because we are doing a one-way bind to `checked`
32
+ * aria-readonly="false" tells screen that they can still interact with the checkbox
33
+ * TODO: not sure if disabled & aria-label be here or should we apply it on the instance as props
34
+ * TODO: aria-label should come from the text part of the slot
35
+ */
36
+
37
+
38
+ return /*#__PURE__*/React.createElement(LeadingVisualContainer, {
39
+ sx: {
40
+ input: {
41
+ margin: 0,
42
+ pointerEvents: 'none'
43
+ }
44
+ }
45
+ }, /*#__PURE__*/React.createElement("input", {
46
+ type: "checkbox",
47
+ checked: selected,
48
+ disabled: disabled,
49
+ "aria-label": "TODO",
50
+ tabIndex: -1,
51
+ readOnly: true,
52
+ "aria-readonly": "false"
53
+ }));
54
+ };
55
+ Selection.displayName = "Selection";
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SxProp } from '../sx';
3
+ declare type VisualProps = SxProp & {
4
+ children: React.ReactNode;
5
+ };
6
+ export declare const LeadingVisualContainer: React.FC<SxProp>;
7
+ export declare type LeadingVisualProps = VisualProps;
8
+ export declare const LeadingVisual: React.FC<VisualProps>;
9
+ export declare type TrailingVisualProps = VisualProps;
10
+ export declare const TrailingVisual: React.FC<VisualProps>;
11
+ export {};
@@ -0,0 +1,68 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import Box from '../Box';
5
+ import { merge } from '../sx';
6
+ import { get } from '../constants';
7
+ import { getVariantStyles, Slot } from './Item';
8
+ export const LeadingVisualContainer = ({
9
+ sx = {},
10
+ ...props
11
+ }) => {
12
+ return /*#__PURE__*/React.createElement(Box, _extends({
13
+ as: "span",
14
+ sx: merge({
15
+ height: '20px',
16
+ // match height of text row
17
+ minWidth: get('space.3'),
18
+ maxWidth: '20px',
19
+ // square (same as height)
20
+ display: 'flex',
21
+ justifyContent: 'center',
22
+ alignItems: 'center',
23
+ flexShrink: 0,
24
+ marginRight: 2
25
+ }, sx)
26
+ }, props));
27
+ };
28
+ LeadingVisualContainer.displayName = "LeadingVisualContainer";
29
+ export const LeadingVisual = ({
30
+ sx = {},
31
+ ...props
32
+ }) => {
33
+ return /*#__PURE__*/React.createElement(Slot, {
34
+ name: "LeadingVisual"
35
+ }, ({
36
+ variant,
37
+ disabled
38
+ }) => /*#__PURE__*/React.createElement(LeadingVisualContainer, _extends({
39
+ sx: merge({
40
+ color: getVariantStyles(variant, disabled).iconColor,
41
+ svg: {
42
+ fontSize: 0
43
+ }
44
+ }, sx)
45
+ }, props), props.children));
46
+ };
47
+ LeadingVisual.displayName = "LeadingVisual";
48
+ export const TrailingVisual = ({
49
+ sx = {},
50
+ ...props
51
+ }) => {
52
+ return /*#__PURE__*/React.createElement(Slot, {
53
+ name: "TrailingVisual"
54
+ }, ({
55
+ variant,
56
+ disabled
57
+ }) => /*#__PURE__*/React.createElement(Box, _extends({
58
+ as: "span",
59
+ sx: merge({
60
+ height: '20px',
61
+ // match height of text row
62
+ flexShrink: 0,
63
+ color: getVariantStyles(variant, disabled).annotationColor,
64
+ marginLeft: 2
65
+ }, sx)
66
+ }, props), props.children));
67
+ };
68
+ TrailingVisual.displayName = "TrailingVisual";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * These colors are not yet in our default theme.
3
+ * TODO: Need to remove this once they are added.
4
+ */
5
+ export declare const customItemThemes: {
6
+ default: {
7
+ hover: {
8
+ light: string;
9
+ dark: string;
10
+ dark_dimmed: string;
11
+ };
12
+ focus: {
13
+ light: string;
14
+ dark: string;
15
+ dark_dimmed: string;
16
+ };
17
+ };
18
+ danger: {
19
+ hover: {
20
+ light: string;
21
+ dark: string;
22
+ dark_dimmed: string;
23
+ };
24
+ focus: {
25
+ light: string;
26
+ dark: string;
27
+ dark_dimmed: string;
28
+ };
29
+ };
30
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * These colors are not yet in our default theme.
3
+ * TODO: Need to remove this once they are added.
4
+ */
5
+ export const customItemThemes = {
6
+ default: {
7
+ hover: {
8
+ light: 'rgba(46, 77, 108, 0.06)',
9
+ dark: 'rgba(201, 206, 212, 0.12)',
10
+ dark_dimmed: 'rgba(201, 206, 212, 0.12)'
11
+ },
12
+ focus: {
13
+ light: 'rgba(54, 77, 100, 0.16)',
14
+ dark: 'rgba(201, 206, 212, 0.24)',
15
+ dark_dimmed: 'rgba(201, 206, 212, 0.24)'
16
+ }
17
+ },
18
+ danger: {
19
+ hover: {
20
+ light: 'rgba(234, 74, 90, 0.08)',
21
+ dark: 'rgba(248, 81, 73, 0.16)',
22
+ dark_dimmed: 'rgba(248, 81, 73, 0.16)'
23
+ },
24
+ focus: {
25
+ light: 'rgba(234, 74, 90, 0.14)',
26
+ dark: 'rgba(248, 81, 73, 0.24)',
27
+ dark_dimmed: 'rgba(248, 81, 73, 0.24)'
28
+ }
29
+ }
30
+ };
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { Divider } from './Divider';
3
+ export type { ListProps as ActionListProps } from './List';
4
+ export type { GroupProps } from './Group';
5
+ export type { ItemProps } from './Item';
6
+ export type { DescriptionProps } from './Description';
7
+ export type { LeadingVisualProps, TrailingVisualProps } from './Visuals';
8
+ /**
9
+ * Collection of list-related components.
10
+ */
11
+ export declare const ActionList: import("@radix-ui/react-polymorphic").ForwardRefComponent<"ul", import("./List").ListProps> & {
12
+ /** Collects related `Items` in an `ActionList`. */
13
+ Group: import("react").FC<import("./Group").GroupProps>;
14
+ /** An actionable or selectable `Item` */
15
+ Item: import("@radix-ui/react-polymorphic").ForwardRefComponent<"li", import("./Item").ItemProps>;
16
+ /** Visually separates `Item`s or `Group`s in an `ActionList`. */
17
+ Divider: typeof Divider;
18
+ /** Secondary text which provides additional information about an `Item`. */
19
+ Description: import("react").FC<import("./Description").DescriptionProps>;
20
+ /** Icon (or similar) positioned before `Item` text. */
21
+ LeadingVisual: import("react").FC<import("../sx").SxProp & {
22
+ children: import("react").ReactNode;
23
+ }>;
24
+ /** Icon (or similar) positioned after `Item` text. */
25
+ TrailingVisual: import("react").FC<import("../sx").SxProp & {
26
+ children: import("react").ReactNode;
27
+ }>;
28
+ };
@@ -0,0 +1,29 @@
1
+ import { List } from './List';
2
+ import { Group } from './Group';
3
+ import { Item } from './Item';
4
+ import { Divider } from './Divider';
5
+ import { Description } from './Description';
6
+ import { LeadingVisual, TrailingVisual } from './Visuals';
7
+
8
+ /**
9
+ * Collection of list-related components.
10
+ */
11
+ export const ActionList = Object.assign(List, {
12
+ /** Collects related `Items` in an `ActionList`. */
13
+ Group,
14
+
15
+ /** An actionable or selectable `Item` */
16
+ Item,
17
+
18
+ /** Visually separates `Item`s or `Group`s in an `ActionList`. */
19
+ Divider,
20
+
21
+ /** Secondary text which provides additional information about an `Item`. */
22
+ Description,
23
+
24
+ /** Icon (or similar) positioned before `Item` text. */
25
+ LeadingVisual,
26
+
27
+ /** Icon (or similar) positioned after `Item` text. */
28
+ TrailingVisual
29
+ });
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import { List } from './ActionList/List';
4
4
  import { Item } from './ActionList/Item';
5
5
  import { Divider } from './ActionList/Divider';
6
- import NewButton from './NewButton';
6
+ import Button from './Button';
7
7
  import React, { useCallback, useMemo } from 'react';
8
8
  import { AnchoredOverlay } from './AnchoredOverlay';
9
9
  import { useProvidedStateOrCreate } from './hooks/useProvidedStateOrCreate';
@@ -18,7 +18,7 @@ ActionMenuItem.displayName = 'ActionMenu.Item';
18
18
 
19
19
  const ActionMenuBase = ({
20
20
  anchorContent,
21
- renderAnchor = props => /*#__PURE__*/React.createElement(NewButton, props),
21
+ renderAnchor = props => /*#__PURE__*/React.createElement(Button, props),
22
22
  anchorRef: externalAnchorRef,
23
23
  onAction,
24
24
  open,
@@ -20,7 +20,7 @@ declare const _default: React.FC<{
20
20
  } & {
21
21
  as?: string | React.ComponentType<any> | undefined;
22
22
  forwardedAs?: string | React.ComponentType<any> | undefined;
23
- }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "className" | "block" | "icon" | "sx" | "disabled" | "variant" | "contrast"> & {
23
+ }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "className" | "sx" | "variant" | "disabled" | "contrast"> & {
24
24
  className?: string | undefined;
25
25
  icon?: React.ComponentType<{
26
26
  className?: string | undefined;
@@ -31,10 +31,13 @@ declare const _default: React.FC<{
31
31
  minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
32
32
  translate?: "yes" | "no" | undefined;
33
33
  width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
34
+ hidden?: boolean | undefined;
35
+ children?: React.ReactNode;
36
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
34
37
  slot?: string | undefined;
35
38
  style?: React.CSSProperties | undefined;
36
39
  title?: string | undefined;
37
- ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
40
+ block?: boolean | undefined;
38
41
  key?: React.Key | null | undefined;
39
42
  defaultChecked?: boolean | undefined;
40
43
  defaultValue?: string | number | readonly string[] | undefined;
@@ -42,15 +45,14 @@ declare const _default: React.FC<{
42
45
  suppressHydrationWarning?: boolean | undefined;
43
46
  accessKey?: string | undefined;
44
47
  className?: string | undefined;
45
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
48
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
46
49
  contextMenu?: string | undefined;
47
50
  dir?: string | undefined;
48
- draggable?: (boolean | "true" | "false") | undefined;
49
- hidden?: boolean | undefined;
51
+ draggable?: (boolean | "false" | "true") | undefined;
50
52
  id?: string | undefined;
51
53
  lang?: string | undefined;
52
54
  placeholder?: string | undefined;
53
- spellCheck?: (boolean | "true" | "false") | undefined;
55
+ spellCheck?: (boolean | "false" | "true") | undefined;
54
56
  tabIndex?: number | undefined;
55
57
  radioGroup?: string | undefined;
56
58
  role?: React.AriaRole | undefined;
@@ -73,57 +75,56 @@ declare const _default: React.FC<{
73
75
  results?: number | undefined;
74
76
  security?: string | undefined;
75
77
  unselectable?: "on" | "off" | undefined;
76
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
78
+ inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
77
79
  is?: string | undefined;
78
80
  'aria-activedescendant'?: string | undefined;
79
- 'aria-atomic'?: boolean | "true" | "false" | undefined;
80
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
81
- 'aria-busy'?: boolean | "true" | "false" | undefined;
82
- 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
81
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
82
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list" | undefined;
83
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
84
+ 'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
83
85
  'aria-colcount'?: number | undefined;
84
86
  'aria-colindex'?: number | undefined;
85
87
  'aria-colspan'?: number | undefined;
86
88
  'aria-controls'?: string | undefined;
87
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
89
+ 'aria-current'?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
88
90
  'aria-describedby'?: string | undefined;
89
91
  'aria-details'?: string | undefined;
90
- 'aria-disabled'?: boolean | "true" | "false" | undefined;
92
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
91
93
  'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
92
94
  'aria-errormessage'?: string | undefined;
93
- 'aria-expanded'?: boolean | "true" | "false" | undefined;
95
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
94
96
  'aria-flowto'?: string | undefined;
95
- 'aria-grabbed'?: boolean | "true" | "false" | undefined;
96
- 'aria-haspopup'?: boolean | "grid" | "dialog" | "listbox" | "menu" | "tree" | "true" | "false" | undefined;
97
- 'aria-hidden'?: boolean | "true" | "false" | undefined;
98
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
97
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
98
+ 'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "false" | "true" | "tree" | undefined;
99
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
100
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
99
101
  'aria-keyshortcuts'?: string | undefined;
100
102
  'aria-label'?: string | undefined;
101
103
  'aria-labelledby'?: string | undefined;
102
104
  'aria-level'?: number | undefined;
103
105
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
104
- 'aria-modal'?: boolean | "true" | "false" | undefined;
105
- 'aria-multiline'?: boolean | "true" | "false" | undefined;
106
- 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
106
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
107
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
108
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
107
109
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
108
110
  'aria-owns'?: string | undefined;
109
111
  'aria-placeholder'?: string | undefined;
110
112
  'aria-posinset'?: number | undefined;
111
- 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
112
- 'aria-readonly'?: boolean | "true" | "false" | undefined;
113
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
114
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
113
115
  'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
114
- 'aria-required'?: boolean | "true" | "false" | undefined;
116
+ 'aria-required'?: boolean | "false" | "true" | undefined;
115
117
  'aria-roledescription'?: string | undefined;
116
118
  'aria-rowcount'?: number | undefined;
117
119
  'aria-rowindex'?: number | undefined;
118
120
  'aria-rowspan'?: number | undefined;
119
- 'aria-selected'?: boolean | "true" | "false" | undefined;
121
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
120
122
  'aria-setsize'?: number | undefined;
121
123
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
122
124
  'aria-valuemax'?: number | undefined;
123
125
  'aria-valuemin'?: number | undefined;
124
126
  'aria-valuenow'?: number | undefined;
125
127
  'aria-valuetext'?: string | undefined;
126
- children?: React.ReactNode;
127
128
  dangerouslySetInnerHTML?: {
128
129
  __html: string;
129
130
  } | undefined;
@@ -287,15 +288,14 @@ declare const _default: React.FC<{
287
288
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLSpanElement> | undefined;
288
289
  onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
289
290
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
290
- block?: boolean | undefined;
291
- sx?: import("@styled-system/css").SystemStyleObject | undefined;
292
- disabled?: boolean | undefined;
291
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
293
292
  variant?: "small" | "large" | undefined;
293
+ disabled?: boolean | undefined;
294
294
  hasIcon?: boolean | undefined;
295
295
  contrast?: boolean | undefined;
296
296
  } & {
297
297
  theme?: any;
298
- }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "disabled" | "variant" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, {
298
+ }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "variant" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, {
299
299
  as?: React.ComponentType<any> | undefined;
300
300
  }>;
301
301
  Menu: typeof AutocompleteMenu;
@@ -12,7 +12,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
12
12
  } & {
13
13
  as?: string | React.ComponentType<any> | undefined;
14
14
  forwardedAs?: string | React.ComponentType<any> | undefined;
15
- }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "className" | "block" | "icon" | "sx" | "disabled" | "variant" | "contrast"> & {
15
+ }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "className" | "sx" | "variant" | "disabled" | "contrast"> & {
16
16
  className?: string | undefined;
17
17
  icon?: React.ComponentType<{
18
18
  className?: string | undefined;
@@ -23,10 +23,13 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
23
23
  minWidth?: import("styled-system").ResponsiveValue<import("csstype").Property.MinWidth<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
24
24
  translate?: "yes" | "no" | undefined;
25
25
  width?: import("styled-system").ResponsiveValue<import("csstype").Property.Width<import("styled-system").TLengthStyledSystem>, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
26
+ hidden?: boolean | undefined;
27
+ children?: React.ReactNode;
28
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
26
29
  slot?: string | undefined;
27
30
  style?: React.CSSProperties | undefined;
28
31
  title?: string | undefined;
29
- ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
32
+ block?: boolean | undefined;
30
33
  key?: React.Key | null | undefined;
31
34
  defaultChecked?: boolean | undefined;
32
35
  defaultValue?: string | number | readonly string[] | undefined;
@@ -34,15 +37,14 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
34
37
  suppressHydrationWarning?: boolean | undefined;
35
38
  accessKey?: string | undefined;
36
39
  className?: string | undefined;
37
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
40
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
38
41
  contextMenu?: string | undefined;
39
42
  dir?: string | undefined;
40
- draggable?: (boolean | "true" | "false") | undefined;
41
- hidden?: boolean | undefined;
43
+ draggable?: (boolean | "false" | "true") | undefined;
42
44
  id?: string | undefined;
43
45
  lang?: string | undefined;
44
46
  placeholder?: string | undefined;
45
- spellCheck?: (boolean | "true" | "false") | undefined;
47
+ spellCheck?: (boolean | "false" | "true") | undefined;
46
48
  tabIndex?: number | undefined;
47
49
  radioGroup?: string | undefined;
48
50
  role?: React.AriaRole | undefined;
@@ -65,57 +67,56 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
65
67
  results?: number | undefined;
66
68
  security?: string | undefined;
67
69
  unselectable?: "on" | "off" | undefined;
68
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
70
+ inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
69
71
  is?: string | undefined;
70
72
  'aria-activedescendant'?: string | undefined;
71
- 'aria-atomic'?: boolean | "true" | "false" | undefined;
72
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
73
- 'aria-busy'?: boolean | "true" | "false" | undefined;
74
- 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
73
+ 'aria-atomic'?: boolean | "false" | "true" | undefined;
74
+ 'aria-autocomplete'?: "none" | "both" | "inline" | "list" | undefined;
75
+ 'aria-busy'?: boolean | "false" | "true" | undefined;
76
+ 'aria-checked'?: boolean | "mixed" | "false" | "true" | undefined;
75
77
  'aria-colcount'?: number | undefined;
76
78
  'aria-colindex'?: number | undefined;
77
79
  'aria-colspan'?: number | undefined;
78
80
  'aria-controls'?: string | undefined;
79
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
81
+ 'aria-current'?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
80
82
  'aria-describedby'?: string | undefined;
81
83
  'aria-details'?: string | undefined;
82
- 'aria-disabled'?: boolean | "true" | "false" | undefined;
84
+ 'aria-disabled'?: boolean | "false" | "true" | undefined;
83
85
  'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
84
86
  'aria-errormessage'?: string | undefined;
85
- 'aria-expanded'?: boolean | "true" | "false" | undefined;
87
+ 'aria-expanded'?: boolean | "false" | "true" | undefined;
86
88
  'aria-flowto'?: string | undefined;
87
- 'aria-grabbed'?: boolean | "true" | "false" | undefined;
88
- 'aria-haspopup'?: boolean | "grid" | "dialog" | "listbox" | "menu" | "tree" | "true" | "false" | undefined;
89
- 'aria-hidden'?: boolean | "true" | "false" | undefined;
90
- 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
89
+ 'aria-grabbed'?: boolean | "false" | "true" | undefined;
90
+ 'aria-haspopup'?: boolean | "grid" | "dialog" | "menu" | "listbox" | "false" | "true" | "tree" | undefined;
91
+ 'aria-hidden'?: boolean | "false" | "true" | undefined;
92
+ 'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
91
93
  'aria-keyshortcuts'?: string | undefined;
92
94
  'aria-label'?: string | undefined;
93
95
  'aria-labelledby'?: string | undefined;
94
96
  'aria-level'?: number | undefined;
95
97
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
96
- 'aria-modal'?: boolean | "true" | "false" | undefined;
97
- 'aria-multiline'?: boolean | "true" | "false" | undefined;
98
- 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
98
+ 'aria-modal'?: boolean | "false" | "true" | undefined;
99
+ 'aria-multiline'?: boolean | "false" | "true" | undefined;
100
+ 'aria-multiselectable'?: boolean | "false" | "true" | undefined;
99
101
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
100
102
  'aria-owns'?: string | undefined;
101
103
  'aria-placeholder'?: string | undefined;
102
104
  'aria-posinset'?: number | undefined;
103
- 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
104
- 'aria-readonly'?: boolean | "true" | "false" | undefined;
105
+ 'aria-pressed'?: boolean | "mixed" | "false" | "true" | undefined;
106
+ 'aria-readonly'?: boolean | "false" | "true" | undefined;
105
107
  'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
106
- 'aria-required'?: boolean | "true" | "false" | undefined;
108
+ 'aria-required'?: boolean | "false" | "true" | undefined;
107
109
  'aria-roledescription'?: string | undefined;
108
110
  'aria-rowcount'?: number | undefined;
109
111
  'aria-rowindex'?: number | undefined;
110
112
  'aria-rowspan'?: number | undefined;
111
- 'aria-selected'?: boolean | "true" | "false" | undefined;
113
+ 'aria-selected'?: boolean | "false" | "true" | undefined;
112
114
  'aria-setsize'?: number | undefined;
113
115
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
114
116
  'aria-valuemax'?: number | undefined;
115
117
  'aria-valuemin'?: number | undefined;
116
118
  'aria-valuenow'?: number | undefined;
117
119
  'aria-valuetext'?: string | undefined;
118
- children?: React.ReactNode;
119
120
  dangerouslySetInnerHTML?: {
120
121
  __html: string;
121
122
  } | undefined;
@@ -279,14 +280,13 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
279
280
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLSpanElement> | undefined;
280
281
  onTransitionEnd?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
281
282
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLSpanElement> | undefined;
282
- block?: boolean | undefined;
283
- sx?: import("@styled-system/css").SystemStyleObject | undefined;
284
- disabled?: boolean | undefined;
283
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
285
284
  variant?: "small" | "large" | undefined;
285
+ disabled?: boolean | undefined;
286
286
  hasIcon?: boolean | undefined;
287
287
  contrast?: boolean | undefined;
288
288
  } & {
289
289
  theme?: any;
290
- }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "disabled" | "variant" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, InternalAutocompleteInputProps>;
290
+ }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "variant" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, InternalAutocompleteInputProps>;
291
291
  export declare type AutocompleteInputProps = ComponentProps<typeof AutocompleteInput>;
292
292
  export default AutocompleteInput;