@redocly/theme 0.68.0-next.3 → 0.68.0-next.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.
@@ -57,7 +57,7 @@ function Panel({ expanded = true, isExpandable = true, renderChildrenHidden = fa
57
57
  (0, react_1.useEffect)(() => setExpanded(expanded), [expanded]);
58
58
  return (react_1.default.createElement(PanelWrapper, { className: className, "data-testid": typeof header === 'string' ? ('panel-' + header).replace(/ /g, '-').toLowerCase() : null, "data-component-name": "Panel/Panel" },
59
59
  header &&
60
- (typeof header === 'function' ? (header({ expanded: isExpanded, toggle })) : (react_1.default.createElement(PanelHeader_1.PanelHeader, { "data-testid": "panel-header", onClick: toggle, expanded: isExpanded, isExpandable: isExpandable },
60
+ (typeof header === 'function' ? (header({ expanded: isExpanded, toggle })) : (react_1.default.createElement(PanelHeader_1.PanelHeader, { "data-testid": "panel-header", toggle: toggle, expanded: isExpanded, isExpandable: isExpandable },
61
61
  react_1.default.createElement(InlineBox, null,
62
62
  react_1.default.createElement(PanelHeaderTitle_1.PanelHeaderTitle, { "data-testid": "title" }, header),
63
63
  isExpandable &&
@@ -43,6 +43,7 @@ const constants_1 = require("../../core/constants");
43
43
  const Button_1 = require("../../components/Button/Button");
44
44
  const SendIcon_1 = require("../../icons/SendIcon/SendIcon");
45
45
  const hooks_1 = require("../../core/hooks");
46
+ const utils_1 = require("../../core/utils");
46
47
  function SearchAiConversationInput({ isGeneratingResponse, onMessageSent, className, placeholder, disabled, multiline = false, }) {
47
48
  const { useTranslate } = (0, hooks_1.useThemeHooks)();
48
49
  const { translate } = useTranslate();
@@ -120,6 +121,11 @@ const inputStyles = `
120
121
  &:focus:disabled {
121
122
  border-color: var(--search-ai-conversation-input-border-color-disabled);
122
123
  }
124
+
125
+ // Keep at least 16px on mobile so iOS Safari doesn't auto-zoom the viewport on focus.
126
+ @media screen and (max-width: ${utils_1.breakpoints.small}) {
127
+ font-size: max(16px, var(--search-ai-conversation-input-font-size));
128
+ }
123
129
  `;
124
130
  const ConversationInput = styled_components_1.default.input `
125
131
  ${inputStyles}
@@ -60,6 +60,11 @@ const SearchInputField = styled_components_1.default.input `
60
60
  &::placeholder {
61
61
  color: var(--search-input-placeholder-color);
62
62
  }
63
+
64
+ // Keep at least 16px on mobile so iOS Safari doesn't auto-zoom the viewport on focus.
65
+ @media screen and (max-width: ${utils_1.breakpoints.small}) {
66
+ font-size: max(16px, var(--search-input-font-size));
67
+ }
63
68
  `;
64
69
  const ResetButton = (0, styled_components_1.default)(Button_1.Button) `
65
70
  color: var(--color-warm-grey-5);
@@ -33,6 +33,7 @@ export type SidebarNavItem = {
33
33
  linePosition?: 'top' | 'bottom';
34
34
  version?: string;
35
35
  variant?: 'primary' | 'secondary';
36
+ hideWhenEmpty?: boolean;
36
37
  badges?: ItemBadge[];
37
38
  };
38
39
  export type ItemState = Omit<SidebarNavItem, 'items'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.68.0-next.3",
3
+ "version": "0.68.0-next.4",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -81,7 +81,7 @@
81
81
  "openapi-sampler": "^1.7.2",
82
82
  "react-calendar": "5.1.0",
83
83
  "react-date-picker": "11.0.0",
84
- "@redocly/config": "0.52.0"
84
+ "@redocly/config": "0.53.0"
85
85
  },
86
86
  "scripts": {
87
87
  "watch": "tsgo -p tsconfig.build.json && (concurrently \"tsgo -w -p tsconfig.build.json\" \"tsc-alias -w -p tsconfig.build.json\")",
@@ -58,7 +58,7 @@ export function Panel({
58
58
  ) : (
59
59
  <PanelHeader
60
60
  data-testid="panel-header"
61
- onClick={toggle}
61
+ toggle={toggle}
62
62
  expanded={isExpanded}
63
63
  isExpandable={isExpandable}
64
64
  >
@@ -7,6 +7,7 @@ import { AI_SEARCH_MAX_MESSAGE_LENGTH } from '@redocly/theme/core/constants';
7
7
  import { Button } from '@redocly/theme/components/Button/Button';
8
8
  import { SendIcon } from '@redocly/theme/icons/SendIcon/SendIcon';
9
9
  import { useThemeHooks } from '@redocly/theme/core/hooks';
10
+ import { breakpoints } from '@redocly/theme/core/utils';
10
11
 
11
12
  type SearchAiConversationInputProps = {
12
13
  onMessageSent: (message: string) => void;
@@ -142,6 +143,11 @@ const inputStyles = `
142
143
  &:focus:disabled {
143
144
  border-color: var(--search-ai-conversation-input-border-color-disabled);
144
145
  }
146
+
147
+ // Keep at least 16px on mobile so iOS Safari doesn't auto-zoom the viewport on focus.
148
+ @media screen and (max-width: ${breakpoints.small}) {
149
+ font-size: max(16px, var(--search-ai-conversation-input-font-size));
150
+ }
145
151
  `;
146
152
 
147
153
  const ConversationInput = styled.input`
@@ -9,7 +9,7 @@ import { Button } from '@redocly/theme/components/Button/Button';
9
9
  import { useInputKeyCommands, useRecentSearches, useThemeHooks } from '@redocly/theme/core/hooks';
10
10
  import { CloseFilledIcon } from '@redocly/theme/icons/CloseFilledIcon/CloseFilledIcon';
11
11
  import { ChevronLeftIcon } from '@redocly/theme/icons/ChevronLeftIcon/ChevronLeftIcon';
12
- import { getBaseDataAttributes } from '@redocly/theme/core/utils';
12
+ import { breakpoints, getBaseDataAttributes } from '@redocly/theme/core/utils';
13
13
 
14
14
  export type SearchInputProps = {
15
15
  placeholder?: string;
@@ -110,6 +110,11 @@ const SearchInputField = styled.input`
110
110
  &::placeholder {
111
111
  color: var(--search-input-placeholder-color);
112
112
  }
113
+
114
+ // Keep at least 16px on mobile so iOS Safari doesn't auto-zoom the viewport on focus.
115
+ @media screen and (max-width: ${breakpoints.small}) {
116
+ font-size: max(16px, var(--search-input-font-size));
117
+ }
113
118
  `;
114
119
 
115
120
  const ResetButton = styled(Button)`
@@ -40,6 +40,7 @@ export type SidebarNavItem = {
40
40
  linePosition?: 'top' | 'bottom';
41
41
  version?: string;
42
42
  variant?: 'primary' | 'secondary';
43
+ hideWhenEmpty?: boolean;
43
44
  badges?: ItemBadge[];
44
45
  };
45
46