@zendeskgarden/react-dropdowns.legacy 9.0.0-next.10

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 (114) hide show
  1. package/LICENSE.md +176 -0
  2. package/README.md +100 -0
  3. package/dist/esm/elements/Autocomplete/Autocomplete.js +144 -0
  4. package/dist/esm/elements/Combobox/Combobox.js +106 -0
  5. package/dist/esm/elements/Dropdown/Dropdown.js +178 -0
  6. package/dist/esm/elements/Fields/Field.js +35 -0
  7. package/dist/esm/elements/Fields/Hint.js +15 -0
  8. package/dist/esm/elements/Fields/Label.js +46 -0
  9. package/dist/esm/elements/Fields/Message.js +19 -0
  10. package/dist/esm/elements/Menu/Items/AddItem.js +66 -0
  11. package/dist/esm/elements/Menu/Items/HeaderIcon.js +44 -0
  12. package/dist/esm/elements/Menu/Items/HeaderItem.js +44 -0
  13. package/dist/esm/elements/Menu/Items/Item.js +140 -0
  14. package/dist/esm/elements/Menu/Items/ItemMeta.js +49 -0
  15. package/dist/esm/elements/Menu/Items/MediaBody.js +44 -0
  16. package/dist/esm/elements/Menu/Items/MediaFigure.js +42 -0
  17. package/dist/esm/elements/Menu/Items/MediaItem.js +44 -0
  18. package/dist/esm/elements/Menu/Items/NextItem.js +90 -0
  19. package/dist/esm/elements/Menu/Items/PreviousItem.js +87 -0
  20. package/dist/esm/elements/Menu/Menu.js +160 -0
  21. package/dist/esm/elements/Menu/Separator.js +37 -0
  22. package/dist/esm/elements/Multiselect/Multiselect.js +316 -0
  23. package/dist/esm/elements/Select/Select.js +195 -0
  24. package/dist/esm/elements/Trigger/Trigger.js +185 -0
  25. package/dist/esm/index.js +29 -0
  26. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/check-lg-stroke.svg.js +28 -0
  27. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-down-stroke.svg.js +25 -0
  28. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js +25 -0
  29. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js +25 -0
  30. package/dist/esm/node_modules/@zendeskgarden/svg-icons/src/16/plus-stroke.svg.js +26 -0
  31. package/dist/esm/styled/items/StyledAddItem.js +23 -0
  32. package/dist/esm/styled/items/StyledItem.js +44 -0
  33. package/dist/esm/styled/items/StyledItemIcon.js +27 -0
  34. package/dist/esm/styled/items/StyledItemMeta.js +22 -0
  35. package/dist/esm/styled/items/StyledNextIcon.js +31 -0
  36. package/dist/esm/styled/items/StyledNextItem.js +24 -0
  37. package/dist/esm/styled/items/StyledPreviousIcon.js +31 -0
  38. package/dist/esm/styled/items/StyledPreviousItem.js +23 -0
  39. package/dist/esm/styled/items/header/StyledHeaderIcon.js +22 -0
  40. package/dist/esm/styled/items/header/StyledHeaderItem.js +29 -0
  41. package/dist/esm/styled/items/media/StyledMediaBody.js +22 -0
  42. package/dist/esm/styled/items/media/StyledMediaFigure.js +34 -0
  43. package/dist/esm/styled/items/media/StyledMediaItem.js +23 -0
  44. package/dist/esm/styled/menu/StyledMenu.js +28 -0
  45. package/dist/esm/styled/menu/StyledMenuWrapper.js +30 -0
  46. package/dist/esm/styled/menu/StyledSeparator.js +23 -0
  47. package/dist/esm/styled/multiselect/StyledMultiselectInput.js +33 -0
  48. package/dist/esm/styled/multiselect/StyledMultiselectItemWrapper.js +22 -0
  49. package/dist/esm/styled/multiselect/StyledMultiselectItemsContainer.js +34 -0
  50. package/dist/esm/styled/multiselect/StyledMultiselectMoreAnchor.js +22 -0
  51. package/dist/esm/styled/select/StyledFauxInput.js +25 -0
  52. package/dist/esm/styled/select/StyledInput.js +25 -0
  53. package/dist/esm/styled/select/StyledSelect.js +22 -0
  54. package/dist/esm/types/index.js +10 -0
  55. package/dist/esm/utils/garden-placements.js +77 -0
  56. package/dist/esm/utils/useDropdownContext.js +18 -0
  57. package/dist/esm/utils/useFieldContext.js +18 -0
  58. package/dist/esm/utils/useItemContext.js +18 -0
  59. package/dist/esm/utils/useMenuContext.js +18 -0
  60. package/dist/index.cjs.js +2066 -0
  61. package/dist/typings/elements/Autocomplete/Autocomplete.d.ts +14 -0
  62. package/dist/typings/elements/Combobox/Combobox.d.ts +14 -0
  63. package/dist/typings/elements/Dropdown/Dropdown.d.ts +26 -0
  64. package/dist/typings/elements/Fields/Field.d.ts +11 -0
  65. package/dist/typings/elements/Fields/Hint.d.ts +11 -0
  66. package/dist/typings/elements/Fields/Label.d.ts +12 -0
  67. package/dist/typings/elements/Fields/Message.d.ts +12 -0
  68. package/dist/typings/elements/Menu/Items/AddItem.d.ts +12 -0
  69. package/dist/typings/elements/Menu/Items/HeaderIcon.d.ts +11 -0
  70. package/dist/typings/elements/Menu/Items/HeaderItem.d.ts +12 -0
  71. package/dist/typings/elements/Menu/Items/Item.d.ts +12 -0
  72. package/dist/typings/elements/Menu/Items/ItemMeta.d.ts +11 -0
  73. package/dist/typings/elements/Menu/Items/MediaBody.d.ts +11 -0
  74. package/dist/typings/elements/Menu/Items/MediaFigure.d.ts +11 -0
  75. package/dist/typings/elements/Menu/Items/MediaItem.d.ts +12 -0
  76. package/dist/typings/elements/Menu/Items/NextItem.d.ts +12 -0
  77. package/dist/typings/elements/Menu/Items/PreviousItem.d.ts +12 -0
  78. package/dist/typings/elements/Menu/Menu.d.ts +14 -0
  79. package/dist/typings/elements/Menu/Separator.d.ts +11 -0
  80. package/dist/typings/elements/Multiselect/Multiselect.d.ts +14 -0
  81. package/dist/typings/elements/Select/Select.d.ts +14 -0
  82. package/dist/typings/elements/Trigger/Trigger.d.ts +24 -0
  83. package/dist/typings/index.d.ts +31 -0
  84. package/dist/typings/styled/index.d.ts +29 -0
  85. package/dist/typings/styled/items/StyledAddItem.d.ts +13 -0
  86. package/dist/typings/styled/items/StyledItem.d.ts +20 -0
  87. package/dist/typings/styled/items/StyledItemIcon.d.ts +17 -0
  88. package/dist/typings/styled/items/StyledItemMeta.d.ts +18 -0
  89. package/dist/typings/styled/items/StyledNextIcon.d.ts +12 -0
  90. package/dist/typings/styled/items/StyledNextItem.d.ts +13 -0
  91. package/dist/typings/styled/items/StyledPreviousIcon.d.ts +12 -0
  92. package/dist/typings/styled/items/StyledPreviousItem.d.ts +13 -0
  93. package/dist/typings/styled/items/header/StyledHeaderIcon.d.ts +14 -0
  94. package/dist/typings/styled/items/header/StyledHeaderItem.d.ts +16 -0
  95. package/dist/typings/styled/items/media/StyledMediaBody.d.ts +17 -0
  96. package/dist/typings/styled/items/media/StyledMediaFigure.d.ts +285 -0
  97. package/dist/typings/styled/items/media/StyledMediaItem.d.ts +13 -0
  98. package/dist/typings/styled/menu/StyledMenu.d.ts +20 -0
  99. package/dist/typings/styled/menu/StyledMenuWrapper.d.ts +16 -0
  100. package/dist/typings/styled/menu/StyledSeparator.d.ts +10 -0
  101. package/dist/typings/styled/multiselect/StyledMultiselectInput.d.ts +22 -0
  102. package/dist/typings/styled/multiselect/StyledMultiselectItemWrapper.d.ts +10 -0
  103. package/dist/typings/styled/multiselect/StyledMultiselectItemsContainer.d.ts +16 -0
  104. package/dist/typings/styled/multiselect/StyledMultiselectMoreAnchor.d.ts +15 -0
  105. package/dist/typings/styled/select/StyledFauxInput.d.ts +22 -0
  106. package/dist/typings/styled/select/StyledInput.d.ts +15 -0
  107. package/dist/typings/styled/select/StyledSelect.d.ts +10 -0
  108. package/dist/typings/types/index.d.ts +150 -0
  109. package/dist/typings/utils/garden-placements.d.ts +26 -0
  110. package/dist/typings/utils/useDropdownContext.d.ts +28 -0
  111. package/dist/typings/utils/useFieldContext.d.ts +17 -0
  112. package/dist/typings/utils/useItemContext.d.ts +16 -0
  113. package/dist/typings/utils/useMenuContext.d.ts +17 -0
  114. package/package.json +56 -0
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ export { Dropdown } from './elements/Dropdown/Dropdown.js';
8
+ export { Trigger } from './elements/Trigger/Trigger.js';
9
+ export { Autocomplete } from './elements/Autocomplete/Autocomplete.js';
10
+ export { Combobox } from './elements/Combobox/Combobox.js';
11
+ export { Multiselect } from './elements/Multiselect/Multiselect.js';
12
+ export { Select } from './elements/Select/Select.js';
13
+ export { Field } from './elements/Fields/Field.js';
14
+ export { Hint } from './elements/Fields/Hint.js';
15
+ export { Label } from './elements/Fields/Label.js';
16
+ export { Message } from './elements/Fields/Message.js';
17
+ export { Menu } from './elements/Menu/Menu.js';
18
+ export { Separator } from './elements/Menu/Separator.js';
19
+ export { AddItem } from './elements/Menu/Items/AddItem.js';
20
+ export { HeaderIcon } from './elements/Menu/Items/HeaderIcon.js';
21
+ export { HeaderItem } from './elements/Menu/Items/HeaderItem.js';
22
+ export { Item } from './elements/Menu/Items/Item.js';
23
+ export { ItemMeta } from './elements/Menu/Items/ItemMeta.js';
24
+ export { MediaBody } from './elements/Menu/Items/MediaBody.js';
25
+ export { MediaFigure } from './elements/Menu/Items/MediaFigure.js';
26
+ export { MediaItem } from './elements/Menu/Items/MediaItem.js';
27
+ export { NextItem } from './elements/Menu/Items/NextItem.js';
28
+ export { PreviousItem } from './elements/Menu/Items/PreviousItem.js';
29
+ export { resetIdCounter } from 'downshift';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ var _path;
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
+ var SvgCheckLgStroke = function SvgCheckLgStroke(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 16,
15
+ height: 16,
16
+ focusable: "false",
17
+ viewBox: "0 0 16 16",
18
+ "aria-hidden": "true"
19
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
+ fill: "none",
21
+ stroke: "currentColor",
22
+ strokeLinecap: "round",
23
+ strokeLinejoin: "round",
24
+ d: "M1 9l4 4L15 3"
25
+ })));
26
+ };
27
+
28
+ export { SvgCheckLgStroke as default };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ var _path;
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
+ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 16,
15
+ height: 16,
16
+ focusable: "false",
17
+ viewBox: "0 0 16 16",
18
+ "aria-hidden": "true"
19
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
+ fill: "currentColor",
21
+ d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
22
+ })));
23
+ };
24
+
25
+ export { SvgChevronDownStroke as default };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ var _path;
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
+ var SvgChevronLeftStroke = function SvgChevronLeftStroke(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 16,
15
+ height: 16,
16
+ focusable: "false",
17
+ viewBox: "0 0 16 16",
18
+ "aria-hidden": "true"
19
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
+ fill: "currentColor",
21
+ d: "M10.39 12.688a.5.5 0 01-.718.69l-.062-.066-4-5a.5.5 0 01-.054-.542l.054-.082 4-5a.5.5 0 01.83.55l-.05.074L6.641 8l3.75 4.688z"
22
+ })));
23
+ };
24
+
25
+ export { SvgChevronLeftStroke as default };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ var _path;
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
+ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 16,
15
+ height: 16,
16
+ focusable: "false",
17
+ viewBox: "0 0 16 16",
18
+ "aria-hidden": "true"
19
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
+ fill: "currentColor",
21
+ d: "M5.61 3.312a.5.5 0 01.718-.69l.062.066 4 5a.5.5 0 01.054.542l-.054.082-4 5a.5.5 0 01-.83-.55l.05-.074L9.359 8l-3.75-4.688z"
22
+ })));
23
+ };
24
+
25
+ export { SvgChevronRightStroke as default };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import * as React from 'react';
8
+
9
+ var _path;
10
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
11
+ var SvgPlusStroke = function SvgPlusStroke(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: 16,
15
+ height: 16,
16
+ focusable: "false",
17
+ viewBox: "0 0 16 16",
18
+ "aria-hidden": "true"
19
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
20
+ stroke: "currentColor",
21
+ strokeLinecap: "round",
22
+ d: "M7.5 2.5v12m6-6h-12"
23
+ })));
24
+ };
25
+
26
+ export { SvgPlusStroke as default };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledItem } from './StyledItem.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.add_item';
12
+ const StyledAddItem = styled(StyledItem).attrs({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.10'
15
+ }).withConfig({
16
+ displayName: "StyledAddItem",
17
+ componentId: "sc-mlto71-0"
18
+ })(["color:", ";", ";"], props => !props.disabled && getColorV8('primaryHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ StyledAddItem.defaultProps = {
20
+ theme: DEFAULT_THEME
21
+ };
22
+
23
+ export { StyledAddItem };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled, { css } from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
9
+ import { rgba } from 'polished';
10
+
11
+ const COMPONENT_ID = 'dropdowns.item';
12
+ const getItemPaddingVertical = props => {
13
+ if (props.isCompact) {
14
+ return `${props.theme.space.base}px`;
15
+ }
16
+ return `${props.theme.space.base * 2}px`;
17
+ };
18
+ const getColorStyles = props => {
19
+ let foregroundColor;
20
+ let backgroundColor;
21
+ if (props.disabled) {
22
+ foregroundColor = getColorV8('neutralHue', 400, props.theme);
23
+ } else if (props.isDanger) {
24
+ foregroundColor = getColorV8('dangerHue', 600, props.theme);
25
+ backgroundColor = props.isFocused ? rgba(foregroundColor, 0.08) : 'inherit';
26
+ } else {
27
+ foregroundColor = getColorV8('foreground', 600 , props.theme);
28
+ backgroundColor = props.isFocused ? getColorV8('primaryHue', 600, props.theme, 0.08) : 'inherit';
29
+ }
30
+ return css(["background-color:", ";color:", ";& a,& a:hover,& a:focus,& a:active{color:inherit;}"], backgroundColor, foregroundColor);
31
+ };
32
+ const StyledItem = styled.li.attrs(props => ({
33
+ 'data-garden-id': COMPONENT_ID,
34
+ 'data-garden-version': '9.0.0-next.10',
35
+ 'aria-disabled': props.disabled
36
+ })).withConfig({
37
+ displayName: "StyledItem",
38
+ componentId: "sc-x4h8aw-0"
39
+ })(["display:block;position:relative;z-index:0;cursor:", ";padding:", " ", "px;text-decoration:none;line-height:", "px;word-wrap:break-word;user-select:none;&:first-child{margin-top:", "px;}&:last-child{margin-bottom:", "px;}&:focus{outline:none;}& a,& a:hover,& a:focus,& a:active{text-decoration:none;}", ";", ";"], props => props.disabled ? 'default' : 'pointer', props => getItemPaddingVertical(props), props => props.theme.space.base * 9, props => props.theme.space.base * 5, props => props.theme.space.base, props => props.theme.space.base, props => getColorStyles(props), props => retrieveComponentStyles(COMPONENT_ID, props));
40
+ StyledItem.defaultProps = {
41
+ theme: DEFAULT_THEME
42
+ };
43
+
44
+ export { StyledItem, getItemPaddingVertical };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled, { css } from 'styled-components';
8
+ import { math } from 'polished';
9
+ import { getColorV8, DEFAULT_THEME } from '@zendeskgarden/react-theming';
10
+ import { getItemPaddingVertical } from './StyledItem.js';
11
+
12
+ const COMPONENT_ID = 'dropdowns.item_icon';
13
+ const getSizeStyles = props => {
14
+ return css(["width:", ";height:calc(", "px + ", ");"], props.theme.iconSizes.md, props.theme.space.base * 5, math(`${getItemPaddingVertical(props)} * 2`));
15
+ };
16
+ const StyledItemIcon = styled.div.attrs({
17
+ 'data-garden-id': COMPONENT_ID,
18
+ 'data-garden-version': '9.0.0-next.10'
19
+ }).withConfig({
20
+ displayName: "StyledItemIcon",
21
+ componentId: "sc-pspm80-0"
22
+ })(["display:flex;position:absolute;top:0;", ":", "px;align-items:center;justify-content:center;transition:opacity 0.1s ease-in-out;opacity:", ";color:", ";", ";& > *{width:", ";height:", ";}"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 3, props => props.isVisible ? '1' : '0', props => props.isDisabled ? 'inherit' : getColorV8('primaryHue', 600, props.theme), props => getSizeStyles(props), props => props.theme.iconSizes.md, props => props.theme.iconSizes.md);
23
+ StyledItemIcon.defaultProps = {
24
+ theme: DEFAULT_THEME
25
+ };
26
+
27
+ export { StyledItemIcon };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'dropdowns.item_meta';
11
+ const StyledItemMeta = styled.span.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.10'
14
+ }).withConfig({
15
+ displayName: "StyledItemMeta",
16
+ componentId: "sc-1m3x8m1-0"
17
+ })(["display:block;line-height:", "px;color:", ";font-size:", ";", ";"], props => props.theme.space.base * (props.isCompact ? 3 : 4), props => getColorV8('neutralHue', props.isDisabled ? 400 : 600, props.theme), props => props.theme.fontSizes.sm, props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledItemMeta.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledItemMeta };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React__default from 'react';
8
+ import styled from 'styled-components';
9
+ import SvgChevronRightStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/chevron-right-stroke.svg.js';
10
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
11
+
12
+ const COMPONENT_ID = 'dropdowns.next_item_icon';
13
+ const NextIconComponent = _ref => {
14
+ let {
15
+ className
16
+ } = _ref;
17
+ return React__default.createElement(SvgChevronRightStroke, {
18
+ "data-garden-id": COMPONENT_ID,
19
+ "data-garden-version": '9.0.0-next.10',
20
+ className: className
21
+ });
22
+ };
23
+ const StyledNextIcon = styled(NextIconComponent).withConfig({
24
+ displayName: "StyledNextIcon",
25
+ componentId: "sc-1nzkdnq-0"
26
+ })(["transform:", ";color:", ";", ";"], props => props.theme.rtl && 'rotate(180deg)', props => props.isDisabled ? 'inherit' : getColorV8('neutralHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
27
+ StyledNextIcon.defaultProps = {
28
+ theme: DEFAULT_THEME
29
+ };
30
+
31
+ export { StyledNextIcon };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledItem } from './StyledItem.js';
10
+ import { StyledItemIcon } from './StyledItemIcon.js';
11
+
12
+ const COMPONENT_ID = 'dropdowns.next_item';
13
+ const StyledNextItem = styled(StyledItem).attrs({
14
+ 'data-garden-id': COMPONENT_ID,
15
+ 'data-garden-version': '9.0.0-next.10'
16
+ }).withConfig({
17
+ displayName: "StyledNextItem",
18
+ componentId: "sc-1wrjlge-0"
19
+ })(["", "{right:", ";left:", ";}", ";"], StyledItemIcon, props => props.theme.rtl ? 'auto' : `${props.theme.space.base * 3}px`, props => props.theme.rtl ? `${props.theme.space.base * 3}px` : 'auto', props => retrieveComponentStyles(COMPONENT_ID, props));
20
+ StyledNextItem.defaultProps = {
21
+ theme: DEFAULT_THEME
22
+ };
23
+
24
+ export { StyledNextItem };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React__default from 'react';
8
+ import styled from 'styled-components';
9
+ import SvgChevronLeftStroke from '../../node_modules/@zendeskgarden/svg-icons/src/16/chevron-left-stroke.svg.js';
10
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
11
+
12
+ const COMPONENT_ID = 'dropdowns.previous_item_icon';
13
+ const PreviousIconComponent = _ref => {
14
+ let {
15
+ className
16
+ } = _ref;
17
+ return React__default.createElement(SvgChevronLeftStroke, {
18
+ "data-garden-id": COMPONENT_ID,
19
+ "data-garden-version": '9.0.0-next.10',
20
+ className: className
21
+ });
22
+ };
23
+ const StyledPreviousIcon = styled(PreviousIconComponent).withConfig({
24
+ displayName: "StyledPreviousIcon",
25
+ componentId: "sc-1n1t07s-0"
26
+ })(["transform:", ";color:", ";", ";"], props => props.theme.rtl && 'rotate(180deg)', props => props.isDisabled ? 'inherit' : getColorV8('neutralHue', 600, props.theme), props => retrieveComponentStyles(COMPONENT_ID, props));
27
+ StyledPreviousIcon.defaultProps = {
28
+ theme: DEFAULT_THEME
29
+ };
30
+
31
+ export { StyledPreviousIcon };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledItem } from './StyledItem.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.previous_item';
12
+ const StyledPreviousItem = styled(StyledItem).attrs({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.10'
15
+ }).withConfig({
16
+ displayName: "StyledPreviousItem",
17
+ componentId: "sc-1qv9jwe-0"
18
+ })(["font-weight:", ";", ";"], props => props.theme.fontWeights.semibold, props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ StyledPreviousItem.defaultProps = {
20
+ theme: DEFAULT_THEME
21
+ };
22
+
23
+ export { StyledPreviousItem };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'dropdowns.header_icon';
11
+ const StyledHeaderIcon = styled.div.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.10'
14
+ }).withConfig({
15
+ displayName: "StyledHeaderIcon",
16
+ componentId: "sc-ow8s45-0"
17
+ })(["display:flex;position:absolute;top:0;bottom:0;align-items:center;justify-content:center;", ":", "px;color:", ";& > *{width:", ";height:", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 3, props => getColorV8('neutralHue', 600, props.theme), props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledHeaderIcon.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledHeaderIcon };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledItem } from '../StyledItem.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.header_item';
12
+ const getHorizontalPadding = props => {
13
+ if (props.hasIcon) {
14
+ return undefined;
15
+ }
16
+ return `${props.theme.space.base * 3}px`;
17
+ };
18
+ const StyledHeaderItem = styled(StyledItem).attrs({
19
+ 'data-garden-id': COMPONENT_ID,
20
+ 'data-garden-version': '9.0.0-next.10'
21
+ }).withConfig({
22
+ displayName: "StyledHeaderItem",
23
+ componentId: "sc-1xosinr-0"
24
+ })(["cursor:default;padding-right:", ";padding-left:", ";font-weight:", ";", ";"], props => getHorizontalPadding(props), props => getHorizontalPadding(props), props => props.theme.fontWeights.semibold, props => retrieveComponentStyles(COMPONENT_ID, props));
25
+ StyledHeaderItem.defaultProps = {
26
+ theme: DEFAULT_THEME
27
+ };
28
+
29
+ export { StyledHeaderItem };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'dropdowns.media_body';
11
+ const StyledMediaBody = styled.div.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.10'
14
+ }).withConfig({
15
+ displayName: "StyledMediaBody",
16
+ componentId: "sc-133sssc-0"
17
+ })(["display:block;overflow:hidden;padding-", ":", "px;", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 2, props => retrieveComponentStyles(COMPONENT_ID, props));
18
+ StyledMediaBody.defaultProps = {
19
+ theme: DEFAULT_THEME
20
+ };
21
+
22
+ export { StyledMediaBody };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React__default, { Children } from 'react';
8
+ import styled from 'styled-components';
9
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
10
+
11
+ const COMPONENT_ID = 'dropdowns.media_figure';
12
+ const StyledMediaFigure = styled(
13
+ _ref => {
14
+ let {
15
+ children,
16
+ isCompact,
17
+ theme,
18
+ ...props
19
+ } = _ref;
20
+ return (
21
+ React__default.cloneElement(Children.only(children), props)
22
+ );
23
+ }).attrs({
24
+ 'data-garden-id': COMPONENT_ID,
25
+ 'data-garden-version': '9.0.0-next.10'
26
+ }).withConfig({
27
+ displayName: "StyledMediaFigure",
28
+ componentId: "sc-16vz3xj-0"
29
+ })(["float:", ";margin-top:", "px !important;width:", ";height:", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 0.5, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, props => retrieveComponentStyles(COMPONENT_ID, props));
30
+ StyledMediaFigure.defaultProps = {
31
+ theme: DEFAULT_THEME
32
+ };
33
+
34
+ export { StyledMediaFigure };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { StyledItem } from '../StyledItem.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.media_item';
12
+ const StyledMediaItem = styled(StyledItem).attrs({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.10'
15
+ }).withConfig({
16
+ displayName: "StyledMediaItem",
17
+ componentId: "sc-af4509-0"
18
+ })(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ StyledMediaItem.defaultProps = {
20
+ theme: DEFAULT_THEME
21
+ };
22
+
23
+ export { StyledMediaItem };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { arrowStyles, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { getArrowPosition } from '../../utils/garden-placements.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.menu';
12
+ const StyledMenu = styled.ul.attrs(props => ({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.10',
15
+ className: props.isAnimated && 'is-animated'
16
+ })).withConfig({
17
+ displayName: "StyledMenu",
18
+ componentId: "sc-lzt5u6-0"
19
+ })(["position:static !important;max-height:", ";overflow-y:auto;", ";", ";"], props => props.maxHeight, props => props.hasArrow && arrowStyles(getArrowPosition(props.placement), {
20
+ size: `${props.theme.space.base * 2}px`,
21
+ inset: '2px',
22
+ animationModifier: props.isAnimated ? '.is-animated' : undefined
23
+ }), props => retrieveComponentStyles(COMPONENT_ID, props));
24
+ StyledMenu.defaultProps = {
25
+ theme: DEFAULT_THEME
26
+ };
27
+
28
+ export { StyledMenu };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { menuStyles, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+ import { getMenuPosition } from '../../utils/garden-placements.js';
10
+
11
+ const COMPONENT_ID = 'dropdowns.menu_wrapper';
12
+ const StyledMenuWrapper = styled.div.attrs(props => ({
13
+ 'data-garden-id': COMPONENT_ID,
14
+ 'data-garden-version': '9.0.0-next.10',
15
+ className: props.isAnimated && 'is-animated'
16
+ })).withConfig({
17
+ displayName: "StyledMenuWrapper",
18
+ componentId: "sc-u70fn3-0"
19
+ })(["", ";", ";"], props => menuStyles(getMenuPosition(props.placement), {
20
+ theme: props.theme,
21
+ hidden: props.isHidden,
22
+ margin: `${props.theme.space.base * (props.hasArrow ? 2 : 1)}px`,
23
+ zIndex: props.zIndex,
24
+ animationModifier: props.isAnimated ? '.is-animated' : undefined
25
+ }), props => retrieveComponentStyles(COMPONENT_ID, props));
26
+ StyledMenuWrapper.defaultProps = {
27
+ theme: DEFAULT_THEME
28
+ };
29
+
30
+ export { StyledMenuWrapper };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import styled from 'styled-components';
8
+ import { getColorV8, retrieveComponentStyles, DEFAULT_THEME } from '@zendeskgarden/react-theming';
9
+
10
+ const COMPONENT_ID = 'dropdowns.separator';
11
+ const StyledSeparator = styled.li.attrs({
12
+ 'data-garden-id': COMPONENT_ID,
13
+ 'data-garden-version': '9.0.0-next.10',
14
+ role: 'separator'
15
+ }).withConfig({
16
+ displayName: "StyledSeparator",
17
+ componentId: "sc-oncsf0-0"
18
+ })(["display:block;margin:", "px 0;border-bottom:", ";", ";"], props => props.theme.space.base, props => `${props.theme.borders.sm} ${getColorV8('neutralHue', 200, props.theme)}`, props => retrieveComponentStyles(COMPONENT_ID, props));
19
+ StyledSeparator.defaultProps = {
20
+ theme: DEFAULT_THEME
21
+ };
22
+
23
+ export { StyledSeparator };