@redocly/openapi-docs 3.17.1 → 3.18.0-custom.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +3593 -2768
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/Callbacks/CallbackDetails.js +2 -2
- package/lib/components/Discriminator/Discriminator.d.ts +0 -1
- package/lib/components/Discriminator/Discriminator.js +2 -2
- package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/McpOverview/McpOverview.js +7 -3
- package/lib/components/OperationItem/OperationItem.js +10 -6
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PanelItem/styled.js +8 -4
- package/lib/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib/components/PayloadSamples/types.d.ts +1 -0
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/Request/RequestDetails.js +8 -2
- package/lib/components/Request/types.d.ts +1 -1
- package/lib/components/RequestParameters/Body.d.ts +1 -0
- package/lib/components/RequestParameters/Body.js +1 -1
- package/lib/components/RequestParameters/RequestParameters.d.ts +2 -1
- package/lib/components/RequestParameters/RequestParameters.js +1 -1
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.js +2 -2
- package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.d.ts +2 -1
- package/lib/components/ResponseSamples/Summary.js +1 -1
- package/lib/components/Responses/OperationResponseList.d.ts +1 -0
- package/lib/components/Responses/OperationResponseList.js +3 -2
- package/lib/components/Responses/ResponseDetails.js +1 -1
- package/lib/components/Responses/styled.js +4 -2
- package/lib/components/Responses/types.d.ts +1 -0
- package/lib/components/RightPanel/RightPanel.js +5 -1
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/Schema/ObjectSchema.js +1 -1
- package/lib/components/Schema/Schema.js +2 -2
- package/lib/components/Schema/types.d.ts +1 -3
- package/lib/components/SchemaDefinition/SchemaDefinition.js +5 -2
- package/lib/components/SectionContent/SectionContent.js +7 -5
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/OAuthScopes.d.ts +3 -3
- package/lib/components/Security/OAuthScopes.js +12 -11
- package/lib/components/Security/RequiredScopes.d.ts +6 -0
- package/lib/components/Security/RequiredScopes.js +17 -0
- package/lib/components/Security/RequiredScopesList.d.ts +14 -0
- package/lib/components/Security/RequiredScopesList.js +13 -0
- package/lib/components/Security/ScopeTagWithTooltip.d.ts +17 -0
- package/lib/components/Security/ScopeTagWithTooltip.js +33 -0
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityButton.js +14 -14
- package/lib/components/Security/SecurityFlow.js +18 -5
- package/lib/components/ServerList/ServerList.js +11 -11
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/TagItem/Breadcrumbs.d.ts +11 -0
- package/lib/components/TagItem/Breadcrumbs.js +41 -0
- package/lib/components/TagItem/OperationNavigationItems.d.ts +4 -2
- package/lib/components/TagItem/OperationNavigationItems.js +20 -5
- package/lib/components/TagItem/OperationsNavigation.js +27 -2
- package/lib/components/TagItem/TagItem.js +51 -37
- package/lib/components/ViewNested/ViewNested.js +7 -7
- package/lib/components/common/Badges.js +10 -8
- package/lib/components/common/BodyContent/BodyContent.d.ts +2 -0
- package/lib/components/common/BodyContent/BodyContent.js +4 -4
- package/lib/components/common/Dropdown/Dropdown.d.ts +2 -2
- package/lib/components/common/Dropdown/Dropdown.js +44 -10
- package/lib/components/common/Fields/fields.js +5 -3
- package/lib/components/common/OperationItemTitle.js +8 -6
- package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib/components/common/Select/Select.js +1 -1
- package/lib/components/common/Select/styled.d.ts +0 -1
- package/lib/components/common/Select/styled.js +19 -63
- package/lib/components/common/Select/types.d.ts +0 -3
- package/lib/components/common/linkify.js +7 -2
- package/lib/components/common/panels.js +1 -1
- package/lib/components/common/styled.js +4 -4
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +1 -1
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -1
- package/lib/icons/CSharpIcon/CSharpIcon.js +1 -1
- package/lib/icons/CurlIcon/CurlIcon.d.ts +3 -2
- package/lib/icons/CurlIcon/CurlIcon.js +2 -2
- package/lib/icons/GOIcon/GOIcon.d.ts +2 -1
- package/lib/icons/GOIcon/GOIcon.js +1 -1
- package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -1
- package/lib/icons/JavaIcon/JavaIcon.js +1 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -1
- package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -1
- package/lib/icons/PHPIcon/PHPIcon.js +1 -1
- package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -1
- package/lib/icons/PythonIcon/PythonIcon.js +1 -1
- package/lib/icons/RIcon/RIcon.d.ts +2 -1
- package/lib/icons/RIcon/RIcon.js +1 -1
- package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -1
- package/lib/icons/RubyIcon/RubyIcon.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/models/field.js +1 -1
- package/lib/models/group.js +1 -1
- package/lib/models/mediaType.js +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/request.js +1 -1
- package/lib/models/response.js +1 -1
- package/lib/models/schema.js +2 -2
- package/lib/models/types.d.ts +2 -0
- package/lib/services/code-samples/generator.d.ts +1 -0
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/menu/operation.d.ts +2 -2
- package/lib/services/menu/operation.js +1 -1
- package/lib/services/menu/tags.d.ts +1 -0
- package/lib/services/menu/tags.js +3 -3
- package/lib/services/types.d.ts +7 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -1
- package/lib/types/oauth2-types.d.ts +4 -0
- package/lib/types/oauth2-types.js +0 -0
- package/lib/types/open-api.d.ts +23 -2
- package/lib/utils/calculateMaxLength.d.ts +6 -0
- package/lib/utils/calculateMaxLength.js +1 -0
- package/lib/utils/getBreadcrumbs.d.ts +7 -0
- package/lib/utils/getBreadcrumbs.js +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +1 -1
- package/lib/utils/mcp.d.ts +1 -1
- package/lib/utils/mcp.js +1 -1
- package/lib/utils/openapi.d.ts +5 -1
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/security-scope.d.ts +5 -0
- package/lib/utils/security-scope.js +1 -0
- package/lib/utils/string.js +1 -1
- package/package.json +20 -21
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s,jsxs as O}from"react/jsx-runtime";import{useMemo as _,memo as D,useState as V,useCallback as z}from"react";import{useNavigate as K}from"react-router-dom";import{LayoutVariant as L}from"@redocly/config";import{useAtomValue as X}from"jotai/index";import{SamplesPanel as q}from"../common/index.js";import{layoutAtom as F}from"../../jotai/app.js";import{OperationNavigationItems as a}from"./OperationNavigationItems.js";import{StyledButton as G}from"./styled.js";import{useTranslate as H}from"../../hooks/index.js";import{styled as C}from"../../styled-components.js";import{isRenderableMenuItem as J}from"../../utils/menu.js";const x=8;function Q({items:m,routingBasePath:n}){const o=H(),[l,w]=V(!1),b=K(),P=X(F)===L.STACKED,{operations:h,rpcOperations:v,webhooks:u,schemas:d,mcpTools:g,showMoreCount:y,totalCount:M,mcpResources:f,mcpPrompts:k,tags:c}=_(()=>{const i=m.filter(t=>J(t)),T=l?i:i.slice(0,x),{operations:R,rpcOperations:A,additionalOperations:B,webhooks:I,schemas:N,mcpTools:j,mcpResources:E,mcpPrompts:W}=T.reduce((t,e)=>{if(e.type==="operation"&&e.isWebhook)t.webhooks.push(e);else if(e.type==="operation"){const p=e;p.isRpc?t.rpcOperations.push(p):p.isAdditionalOperation?t.additionalOperations.push(p):t.operations.push(p)}else e.type==="schema"?t.schemas.push(e):e.type==="tool"?t.mcpTools.push(e):e.type==="rsrc"?t.mcpResources.push(e):e.type==="prompt"&&t.mcpPrompts.push(e);return t},{operations:[],rpcOperations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...R,...B],rpcOperations:A,schemas:N,mcpTools:j,webhooks:I,mcpResources:E,mcpPrompts:W,showMoreCount:!l&&i.length>x?i.length-x:0,totalCount:i.length,tags:m.filter(t=>t.type==="tag")}},[l,m]),r=z(i=>b(i),[b]),S=d.length>0||g.length>0||f.length>0||k.length>0||h.length>0||u.length>0;return!M&&c.length===0?null:O(U,{isStacked:P,"data-testid":"operation-navigation-list",children:[d.length>0&&s(a,{items:d,onClick:r,routingBasePath:n,translate:o,title:o("openapi.schemas","Schemas")}),g.length>0&&s(a,{items:g,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),f.length>0&&s(a,{items:f,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),k.length>0&&s(a,{items:k,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),v.length>0&&s(a,{items:v,onClick:r,routingBasePath:n,translate:o,title:o("openapi.rpcMethods","RPC methods")}),h.length>0&&s(a,{items:h,onClick:r,routingBasePath:n,translate:o,title:o("openapi.operations","Operations")}),u.length>0&&s(a,{items:u,onClick:r,routingBasePath:n,translate:o,title:o("openapi.webhooks","Webhooks")}),!l&&!!y&&O(Z,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>w(!0),children:[o("openapi.actions.show","Show")," ",y," ",o("openapi.actions.more","more"),"..."]}),c.length>0&&S&&s(Y,{}),c.length>0&&s(a,{items:c,onClick:r,routingBasePath:n,translate:o,disableTooltip:!0})]})}const ho=D(Q),U=C(q)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
padding-top: var(--spacing-xxl);
|
|
6
|
-
|
|
6
|
+
`,Y=C.div`
|
|
7
|
+
border-bottom: 1px solid var(--border-color-secondary);
|
|
8
|
+
margin: var(--spacing-xs) 0;
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
&::before,
|
|
12
|
+
&::after {
|
|
13
|
+
content: '';
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: -3px;
|
|
16
|
+
width: 6px;
|
|
17
|
+
height: 6px;
|
|
18
|
+
background-color: var(--border-color-secondary);
|
|
19
|
+
border-radius: 50%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&::before {
|
|
23
|
+
left: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::after {
|
|
27
|
+
right: 0;
|
|
28
|
+
}
|
|
29
|
+
`,Z=C(G)`
|
|
30
|
+
margin-top: var(--spacing-xxs);
|
|
31
|
+
`;export{ho as OperationsNavigation,Q as OperationsNavigationComponent};
|
|
@@ -1,59 +1,73 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as e}from"react/jsx-runtime";import{memo as W,useCallback as u}from"react";import{useNavigate as M}from"react-router-dom";import{useAtomValue as z}from"jotai";import{LayoutVariant as C}from"@redocly/config";import{Markdown as s}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as o}from"@redocly/theme/core/openapi";import{Button as I}from"@redocly/theme/components/Button/Button";import{PageActions as j}from"@redocly/theme/components/PageActions/PageActions";import{H2 as B}from"@redocly/theme/components/Typography/H2";import{LinkIcon as A}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as L,getBreadcrumbs as H}from"../../utils/index.js";import{joinWithSeparator as v}from"../../services/history/helpers.js";import{Row as P,SamplesMiddlePanel as w,SamplesPanel as $,ShareLink as D}from"../common/index.js";import{Markdown as N}from"../Markdown/index.js";import{OperationsNavigation as V}from"./OperationsNavigation.js";import{Breadcrumbs as _}from"./Breadcrumbs.js";import{layoutAtom as E}from"../../jotai/app.js";import{useTranslate as F}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";import{StyledShareLink as K}from"../common/linkify.js";function O({item:a,routingBasePath:i="",isExpanded:c}){const b=F(),{description:k,name:g,href:x}=a,t=M(),f=z(E),d=v(i,a.href),S=u(()=>{t(d)},[t,d]),l=!!a.items.length,m=f===C.STACKED,p=!l,h=H(a),y=u(T=>{t(v(i,L(T)))},[t,i]);return e(R,{expanded:c,children:[e(P,{layout:f,children:[e(q,{fullWidth:p,isStacked:m,children:[e(G,{fullWidth:p,isStacked:m,children:[h.length>0&&n(_,{breadcrumbs:h,onClick:y}),e(Q,{children:[n(D,{to:x,"aria-label":`link to ${g}`}),g]}),n(j,{pageSlug:d})]}),n(J,{fullWidth:p,isStacked:m,children:n(N,{source:k})})]}),l&&n(V,{items:a.items,routingBasePath:i})]}),l&&!c&&e(U,{type:"button",variant:"text",size:"medium",onClick:S,children:["+ ",b("openapi.actions.show","Show")]})]})}const wa=W(O),R=r.div`
|
|
2
2
|
padding-top: var(--spacing-lg);
|
|
3
3
|
padding-bottom: ${({expanded:a})=>a?"var(--spacing-xxl)":""};
|
|
4
|
+
`,q=r(w)`
|
|
5
|
+
@media screen and (min-width: ${o.large}) {
|
|
6
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
|
|
7
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
|
|
8
|
+
}
|
|
9
|
+
`,G=r.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
margin: var(--h2-margin-top) 0 var(--h2-margin-bottom);
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
@media screen and (min-width: ${o.large}) {
|
|
16
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
17
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
18
|
+
width: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(100% - var(--panel-samples-width))":void 0};
|
|
4
19
|
|
|
20
|
+
${K} {
|
|
21
|
+
left: ${({fullWidth:a,isStacked:i})=>a&&!i?"unset":void 0};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,J=r.div`
|
|
5
25
|
/*
|
|
6
26
|
Markdoc components inside markdown that use SamplesPanel should not have padding.
|
|
7
27
|
E.g. SchemaDefinition, McpTool
|
|
8
28
|
padding is added by the TagItem itself
|
|
9
29
|
*/
|
|
10
|
-
${
|
|
11
|
-
padding-right: 0;
|
|
30
|
+
${s} ${$} {
|
|
12
31
|
padding-left: 0;
|
|
32
|
+
padding-right: 0;
|
|
13
33
|
}
|
|
14
34
|
|
|
15
|
-
${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
${p} ${m} {
|
|
22
|
-
padding-left: calc(var(--panel-gap-horizontal) * 2);
|
|
23
|
-
padding-right: var(--panel-gap-horizontal);
|
|
24
|
-
}
|
|
35
|
+
@media screen and (min-width: ${o.large}) {
|
|
36
|
+
${s} ${w} {
|
|
37
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
38
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
39
|
+
}
|
|
25
40
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
${s} .schema-definition ${$} {
|
|
42
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
43
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`,Q=r(B)`
|
|
47
|
+
position: relative;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: var(--spacing-xs);
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
overflow-wrap: anywhere;
|
|
53
|
+
word-break: break-word;
|
|
54
|
+
margin: 0;
|
|
30
55
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
`}
|
|
40
|
-
`,O=l(C)`
|
|
56
|
+
:hover {
|
|
57
|
+
${A} {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
visibility: visible;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`,U=r(I)`
|
|
41
63
|
margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
|
|
42
64
|
width: calc(100% - var(--spacing-xl) * 2);
|
|
43
65
|
|
|
44
|
-
@media screen and (min-width: ${
|
|
66
|
+
@media screen and (min-width: ${o.medium}) {
|
|
45
67
|
--button-margin-md: calc(var(--spacing-xl) * 2);
|
|
46
68
|
|
|
47
69
|
margin-left: var(--button-margin-md);
|
|
48
70
|
margin-right: var(--button-margin-md);
|
|
49
71
|
width: calc(100% - var(--button-margin-md) * 2);
|
|
50
72
|
}
|
|
51
|
-
|
|
52
|
-
display: flex;
|
|
53
|
-
:hover {
|
|
54
|
-
${L} {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
visibility: visible;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;export{da as TagItem,E as TagItemComponent};
|
|
73
|
+
`;export{wa as TagItem,O as TagItemComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,Fragment as l,jsxs as
|
|
1
|
+
import{jsx as o,Fragment as l,jsxs as s}from"react/jsx-runtime";import{css as d}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as c}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:t,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(t)||p(t)},[t]);const a=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?s(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:a,children:i})})]}):o(l,{children:s(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[s(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:a}),!r&&v,r&&(x||"")]}),r&&o(m,{color:a,children:i})]})})}const U=w(_),k=c.button`
|
|
2
2
|
background: none;
|
|
3
3
|
border: none;
|
|
4
4
|
cursor: pointer;
|
|
@@ -10,24 +10,24 @@ import{jsx as o,Fragment as l,jsxs as t}from"react/jsx-runtime";import{css as c}
|
|
|
10
10
|
font-size: var(--font-size-base);
|
|
11
11
|
font-family: var(--font-family-base);
|
|
12
12
|
line-height: var(--line-height-base);
|
|
13
|
-
margin: var(--spacing-xxs)
|
|
13
|
+
margin-top: var(--spacing-xxs);
|
|
14
14
|
width: 100%;
|
|
15
|
-
`,m=
|
|
15
|
+
`,m=c.div`
|
|
16
16
|
padding-left: var(--schema-nested-offset);
|
|
17
17
|
border-left: 1px solid ${({color:e})=>e||"var(--border-color-primary)"};
|
|
18
18
|
margin: -10px 0 0 9px;
|
|
19
|
-
${({color:e})=>e&&
|
|
19
|
+
${({color:e})=>e&&d`
|
|
20
20
|
.schema-name {
|
|
21
21
|
color: ${e};
|
|
22
22
|
}
|
|
23
23
|
`}
|
|
24
|
-
`,f=
|
|
24
|
+
`,f=c.div`
|
|
25
25
|
width: 100%;
|
|
26
|
-
${({$isArrayInsideArray:e})=>e&&
|
|
26
|
+
${({$isArrayInsideArray:e})=>e&&d`
|
|
27
27
|
padding-top: var(--schema-property-details-spacing);
|
|
28
28
|
`}
|
|
29
29
|
|
|
30
|
-
${({$divider:e})=>e&&
|
|
30
|
+
${({$divider:e})=>e&&d`
|
|
31
31
|
border-bottom: 1px solid var(--border-color-primary);
|
|
32
32
|
padding-bottom: var(--schema-property-details-spacing);
|
|
33
33
|
`}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import{
|
|
2
|
-
margin
|
|
3
|
-
|
|
4
|
-
${({deprecated:e})=>e&&f`
|
|
1
|
+
import{jsx as a,Fragment as n,jsxs as c}from"react/jsx-runtime";import{memo as p}from"react";import{css as l}from"styled-components";import{Tag as f}from"@redocly/theme/components/Tag/Tag";import{GenericIcon as g}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{Tooltip as x}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as s}from"../../styled-components.js";function d({name:r,color:e,description:o,icon:t}){return a(x,{tip:o,placement:"top",disabled:!o,children:a(m,{color:e,icon:t&&a(g,{icon:t}),children:r})},r)}function h({badges:r,children:e}){if(!r)return a(n,{children:e});const o=r.filter(({position:i})=>i==="before"),t=r.filter(({position:i})=>i==="after");return c(n,{children:[o.map(d),e,t.map(d)]})}const _=p(h),m=s(f)`
|
|
2
|
+
margin: 0;
|
|
3
|
+
${({deprecated:r})=>r&&l`
|
|
5
4
|
color: var(--badge-deprecated-text-color);
|
|
6
5
|
background-color: var(--badge-deprecated-bg-color);
|
|
7
6
|
border-radius: var(--badge-deprecated-border-radius);
|
|
8
7
|
`};
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
svg {
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
}
|
|
12
|
+
`,k=s(m)`
|
|
13
|
+
margin: 0;
|
|
11
14
|
font-size: var(--font-size-sm);
|
|
12
15
|
line-height: var(--line-height-sm);
|
|
13
16
|
padding: 0 var(--spacing-xxs);
|
|
14
|
-
max-width: 80px;
|
|
15
17
|
text-overflow: ellipsis;
|
|
16
18
|
white-space: nowrap;
|
|
17
19
|
overflow: hidden;
|
|
18
|
-
`;export{
|
|
20
|
+
`;export{_ as CustomBadges,k as NavigationBadge,m as StyledBadge};
|
|
@@ -6,6 +6,8 @@ interface BodyContentProps {
|
|
|
6
6
|
description?: string | GenericObject;
|
|
7
7
|
content?: MediaContentModel;
|
|
8
8
|
deepLink?: string;
|
|
9
|
+
isRpc?: boolean;
|
|
10
|
+
title?: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const BodyContent: import("react").NamedExoticComponent<BodyContentProps>;
|
|
11
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,
|
|
1
|
+
import{jsx as e,Fragment as h,jsxs as s}from"react/jsx-runtime";import{memo as k}from"react";import{useAtom as C}from"jotai";import{LinkIcon as q}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Dropdown as z}from"../Dropdown/index.js";import{RequiredLabel as v}from"../Fields/index.js";import{ConstraintsView as y}from"../ConstraintsView.js";import{Schema as u}from"../../Schema/index.js";import{getActiveMediaType as A}from"../../../models/index.js";import{Markdown as N}from"../../Markdown/index.js";import{activeMimeNameAtom as B}from"../../../jotai/app.js";import{LinkToField as D}from"../LinkToField.js";import{useTranslate as F}from"../../../hooks/index.js";import{styled as x}from"../../../styled-components.js";function O({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:r,deepLink:i,isRpc:a,title:d}){const n=F(),[j,w]=C(B);if(!r)return null;const{schema:o,examples:g,operation:f,name:M}=A(r,j),T=r.mediaTypes.map(({name:t})=>({label:t,value:t}));return a&&!d?s(h,{children:[m&&e(v,{children:n("openapi.badges.required","required")}),e(b,{source:c}),o?.type==="object"&&o?.constraints&&e(y,{constraints:o?.constraints||[]}),e(u,{skipReadOnly:p,skipWriteOnly:l,schema:o,examples:g,operation:f,level:1,disableDeepLinks:!i},"schema")]}):s(h,{children:[s(S,{children:[i&&e(D,{to:i}),d||n("openapi.body","Body"),!a&&e(z,{options:T,value:M,triggerVariant:"ghost",triggerSize:"large",onChange:({value:t})=>w(t)})]}),m&&e(v,{children:n("openapi.badges.required","required")}),e(b,{source:c}),o?.type==="object"&&o?.constraints&&e(y,{constraints:o?.constraints||[]}),e(u,{skipReadOnly:p,skipWriteOnly:l,schema:o,examples:g,operation:f,level:1,disableDeepLinks:!i},"schema"),a&&o===void 0?e("em",{children:"No parameters"}):null]})}const U=k(O),b=x(N)`
|
|
2
2
|
margin: var(--spacing-xxs) 0 0;
|
|
3
|
-
`,
|
|
3
|
+
`,S=x.span`
|
|
4
4
|
position: relative;
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
@@ -13,7 +13,7 @@ import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u
|
|
|
13
13
|
padding: var(--spacing-xxs) 0;
|
|
14
14
|
|
|
15
15
|
:hover {
|
|
16
|
-
${
|
|
16
|
+
${q} {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
visibility: visible;
|
|
19
19
|
}
|
|
@@ -24,4 +24,4 @@ import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u
|
|
|
24
24
|
font-size: var(--font-size-sm);
|
|
25
25
|
line-height: var(--line-height-lg);
|
|
26
26
|
}
|
|
27
|
-
`;export{
|
|
27
|
+
`;export{U as BodyContent};
|
|
@@ -6,8 +6,8 @@ export interface DropdownProps<T> {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
triggerVariant?: 'ghost' | 'outlined';
|
|
8
8
|
triggerSize?: string;
|
|
9
|
-
|
|
9
|
+
fullWidth?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize,
|
|
11
|
+
declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize, fullWidth, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const Dropdown: typeof DropdownComponent;
|
|
13
13
|
export {};
|
|
@@ -1,8 +1,40 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as d,Fragment as u}from"react/jsx-runtime";import v,{useMemo as C,useState as I}from"react";import{Dropdown as j}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as M}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as z}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as T}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as $}from"@redocly/theme/components/Button/Button";import{SearchIcon as A}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{typedMemo as F}from"@redocly/theme/core/openapi";import{styled as o}from"../../../styled-components.js";import{useTranslate as L}from"../../../hooks/index.js";const R=7;function _({options:n,value:t,onChange:p,className:x,triggerVariant:b="outlined",triggerSize:y="small",fullWidth:l=!1}){const[c,m]=I(""),g=L(),a=n.find(e=>e.value===t),S=n.length>=R,f=C(()=>n.filter(e=>e.label?.toLowerCase().includes(c.toLowerCase())??!1),[n,c]);if(n.length===1)return r(U,{children:a?.element||a?.label});const k=e=>{m(e.target.value)},D=()=>S?d(u,{children:[r(O,{prefix:r(V,{children:r(A,{color:"var(--icon-color-additional)",onClick:e=>e.stopPropagation()})}),content:r(W,{placeholder:g("openapi.discriminator.searchPlaceholder","Search items"),onClick:e=>e.stopPropagation(),onChange:k,value:c})}),r(B,{children:f.length?f.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s)):r(P,{content:g("openapi.discriminator.searchNoResults","No items found")})})]}):r(u,{children:n.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s))});return r(N,{className:x,$fullWidth:l,trigger:r(E,{variant:b,size:y,type:"button",$fullWidth:l,children:r(h,{children:a?.element||a?.label})}),withArrow:!0,onClose:()=>m(""),children:r(H,{$fullWidth:l,children:D()})})}const oe=F(_),N=o(j)`
|
|
2
|
+
${({$fullWidth:n})=>n&&`
|
|
3
|
+
> div {
|
|
4
|
+
min-width: 100%;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
}
|
|
7
|
+
`}
|
|
8
|
+
`,E=o($)`
|
|
9
|
+
${({$fullWidth:n})=>n&&`
|
|
10
|
+
&& {
|
|
11
|
+
width: 100%;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
background-color: var(--bg-color);
|
|
14
|
+
padding: var(--docs-dropdown-padding-vertical) var(--docs-dropdown-padding-left);
|
|
15
|
+
color: var(--text-color-primary);
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
background-color: var(--bg-color);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:focus {
|
|
22
|
+
background-color: var(--bg-color);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`}
|
|
26
|
+
`,h=o.span`
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
`,H=o(z)`
|
|
31
|
+
${({$fullWidth:n})=>n&&"min-width: 100%;"}
|
|
32
|
+
`,w=o(M)`
|
|
2
33
|
width: 16px;
|
|
3
34
|
height: 16px;
|
|
4
35
|
margin-left: auto;
|
|
5
|
-
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
`,i=o(T)`
|
|
6
38
|
--dropdown-menu-item-justify-content: space-between;
|
|
7
39
|
|
|
8
40
|
width: 100%;
|
|
@@ -12,23 +44,25 @@ import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import g,{useMem
|
|
|
12
44
|
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
13
45
|
font-size: var(--font-size-base);
|
|
14
46
|
line-height: var(--line-height-base);
|
|
15
|
-
`,
|
|
47
|
+
`,O=o(i)`
|
|
16
48
|
gap: 0;
|
|
17
49
|
padding: var(--spacing-xxs) var(--spacing-xs);
|
|
18
50
|
&:hover {
|
|
19
51
|
background-color: transparent;
|
|
20
52
|
}
|
|
21
|
-
`,
|
|
53
|
+
`,P=o(i)`
|
|
22
54
|
height: 66px;
|
|
23
55
|
justify-content: center;
|
|
24
56
|
&:hover,
|
|
25
57
|
&:focus-visible {
|
|
26
58
|
background-color: transparent;
|
|
27
59
|
}
|
|
28
|
-
`,
|
|
60
|
+
`,B=o.div`
|
|
29
61
|
overflow-y: auto;
|
|
30
62
|
max-height: 300px;
|
|
31
|
-
|
|
63
|
+
padding: calc(var(--spacing-unit) / 2);
|
|
64
|
+
margin: calc(var(--spacing-unit) / -2);
|
|
65
|
+
`,V=o.div`
|
|
32
66
|
display: flex;
|
|
33
67
|
align-items: center;
|
|
34
68
|
justify-content: center;
|
|
@@ -36,7 +70,7 @@ import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import g,{useMem
|
|
|
36
70
|
height: 24px;
|
|
37
71
|
cursor: pointer;
|
|
38
72
|
flex-shrink: 0;
|
|
39
|
-
`,
|
|
73
|
+
`,W=o.input`
|
|
40
74
|
width: 100%;
|
|
41
75
|
border: none;
|
|
42
76
|
outline: none;
|
|
@@ -47,11 +81,11 @@ import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import g,{useMem
|
|
|
47
81
|
font-family: var(--font-family-base);
|
|
48
82
|
padding: 0;
|
|
49
83
|
margin-left: var(--spacing-xxs);
|
|
50
|
-
|
|
84
|
+
min-width: 100px;
|
|
51
85
|
&::placeholder {
|
|
52
86
|
color: var(--search-trigger-color);
|
|
53
87
|
}
|
|
54
|
-
`,
|
|
88
|
+
`,U=o.span`
|
|
55
89
|
margin-right: var(--spacing-unit);
|
|
56
90
|
cursor: default;
|
|
57
91
|
background: none;
|
|
@@ -62,4 +96,4 @@ import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import g,{useMem
|
|
|
62
96
|
line-height: var(--line-height-lg);
|
|
63
97
|
font-family: var(--font-family-base);
|
|
64
98
|
font-weight: var(--font-weight-regular);
|
|
65
|
-
`;export{
|
|
99
|
+
`;export{oe as Dropdown};
|
|
@@ -7,7 +7,7 @@ import{Button as t}from"@redocly/theme/components/Button/Button";import{styled a
|
|
|
7
7
|
color: var(--schema-type-text-color);
|
|
8
8
|
`,d=r(o)`
|
|
9
9
|
color: var(--schema-type-text-color);
|
|
10
|
-
`,
|
|
10
|
+
`,p=r(o)`
|
|
11
11
|
color: var(--schema-type-title-text-color);
|
|
12
12
|
word-break: break-word;
|
|
13
13
|
`,c=r(o).attrs({as:"div"})`
|
|
@@ -16,7 +16,7 @@ import{Button as t}from"@redocly/theme/components/Button/Button";import{styled a
|
|
|
16
16
|
line-height: var(--schema-labels-line-height);
|
|
17
17
|
font-weight: normal;
|
|
18
18
|
display: block;
|
|
19
|
-
`,
|
|
19
|
+
`,m=r(o)`
|
|
20
20
|
color: var(--schema-property-required-label-text-color);
|
|
21
21
|
font-size: var(--font-size-base);
|
|
22
22
|
line-height: var(--line-height-base);
|
|
@@ -32,6 +32,8 @@ import{Button as t}from"@redocly/theme/components/Button/Button";import{styled a
|
|
|
32
32
|
color: var(--text-color-secondary);
|
|
33
33
|
display: inline-flex;
|
|
34
34
|
word-break: var(--code-word-break);
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: var(--spacing-xxs);
|
|
35
37
|
`,v=r(e)`
|
|
36
38
|
color: var(--schema-property-access-label-text-color);
|
|
37
39
|
background-color: var(--bg-color);
|
|
@@ -89,4 +91,4 @@ import{Button as t}from"@redocly/theme/components/Button/Button";import{styled a
|
|
|
89
91
|
padding: 0;
|
|
90
92
|
font-size: var(--font-size-sm);
|
|
91
93
|
line-height: var(--line-height-sm);
|
|
92
|
-
`;export{v as AccessLabel,b as AdditionalPropertiesLabel,u as ConstraintItem,x as DefaultValue,g as EnumValue,l as ExampleValue,f as ExtensionValue,o as FieldLabel,a as FieldValueLabel,c as PropertyLabel,h as RecursiveLabel,
|
|
94
|
+
`;export{v as AccessLabel,b as AdditionalPropertiesLabel,u as ConstraintItem,x as DefaultValue,g as EnumValue,l as ExampleValue,f as ExtensionValue,o as FieldLabel,a as FieldValueLabel,c as PropertyLabel,h as RecursiveLabel,m as RequiredLabel,e as Tag,y as ToggleButton,d as TypeName,i as TypePrefix,p as TypeTitle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LinkIcon as
|
|
1
|
+
import{LinkIcon as e}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as t}from"@redocly/theme/components/Typography/H2";import{styled as i}from"../../styled-components.js";const n=i.h4`
|
|
2
2
|
font-size: var(--h4-font-size);
|
|
3
3
|
font-weight: var(--h4-font-weight);
|
|
4
4
|
line-height: var(--h4-line-height);
|
|
@@ -11,27 +11,29 @@ import{LinkIcon as t}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as e
|
|
|
11
11
|
position: relative;
|
|
12
12
|
|
|
13
13
|
:hover {
|
|
14
|
-
${
|
|
14
|
+
${e} {
|
|
15
15
|
opacity: 1;
|
|
16
16
|
visibility: visible;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
`,l=i(
|
|
19
|
+
`,l=i(t)`
|
|
20
20
|
position: relative;
|
|
21
21
|
display: flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
gap: var(--spacing-xs);
|
|
24
24
|
flex-wrap: wrap;
|
|
25
|
+
overflow-wrap: anywhere;
|
|
26
|
+
word-break: break-word;
|
|
25
27
|
margin: 0;
|
|
26
28
|
|
|
27
29
|
:hover {
|
|
28
|
-
${
|
|
30
|
+
${e} {
|
|
29
31
|
opacity: 1;
|
|
30
32
|
visibility: visible;
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
`,
|
|
35
|
+
`,p=i.div`
|
|
34
36
|
display: flex;
|
|
35
37
|
align-items: flex-start;
|
|
36
38
|
margin: var(--h2-margin-top) 0 var(--h2-margin-bottom);
|
|
37
|
-
`;export{l as Heading,
|
|
39
|
+
`;export{l as Heading,p as HeadingWrapper,n as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{useCallback as
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{useCallback as E,useEffect as I,useRef as T,useState as g}from"react";import{useAtom as h}from"jotai";import{isUndefined as w}from"@redocly/theme/core/openapi";import{Segmented as x}from"@redocly/theme/components/Segmented/Segmented";import{Dropdown as y}from"../Dropdown/index.js";import{operationStore as A}from"../../../jotai/operation.js";const b=5;function z({options:t,onChange:r,pointer:u,schema:n,defaultOneOfIdx:d}){const[p,c]=h(A(u)),S=p.activeOneOf[n.pointer]??d,o=t[S]?.value,[i,O]=g(!1),s=T(null);I(()=>{if(!s.current)return;const e=()=>{const v=s.current?.querySelectorAll('button[role="tab"]'),a=Array.from(v||[]).some(l=>l.offsetWidth<l.scrollWidth);a!==i&&O(a)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i,t]);const f=E(({value:e})=>{e!==void 0&&(r?r(e):c({activeExampleName:n.oneOf?.[e]?.title,activeOneOf:{[n.pointer]:e},requestValues:{body:null}}))},[r,n.oneOf,n.pointer,c]);return w(o)?null:t.length>b||i?m(y,{options:t,value:o,onChange:f}):m(x,{ref:s,value:o,onChange:f,options:t,size:"small","data-testid":"segmented-schema"})}const D=z;export{D as SchemaSelection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{memo as u,useMemo as c}from"react";import{Dropdown as i}from"../Dropdown/Dropdown.js";import{normalizeText as f}from"../../../utils/index.js";function d({options:t,onChange:n,value:o="",className:a}){const m=c(()=>t.map(e=>({value:e.value,label:e.title||f(e.value)})),[t]);return s(i,{className:a,options:m,value:o,onChange:({value:e})=>{const l=t.find(r=>r.value===e);l&&n(l)},fullWidth:!0})}const C=u(d);export{C as Select};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import{css as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import{css as e}from"styled-components";import{Select as t}from"./Select.js";import{styled as r}from"../../../styled-components.js";const n=e`
|
|
2
|
+
button {
|
|
3
|
+
background-color: var(--panel-samples-dropdown-bg-color);
|
|
4
|
+
border: var(--panel-samples-dropdown-border);
|
|
5
|
+
color: var(--panel-samples-dropdown-color);
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
&,
|
|
8
|
+
&:hover,
|
|
9
|
+
&:focus {
|
|
10
|
+
box-shadow: none;
|
|
11
|
+
}
|
|
10
12
|
}
|
|
11
|
-
`,a=
|
|
13
|
+
`,a=r(t)`
|
|
12
14
|
box-sizing: border-box;
|
|
13
15
|
outline: none;
|
|
14
16
|
display: inline-block;
|
|
@@ -18,72 +20,26 @@ import{css as n}from"styled-components";import{ChevronDownIcon as t}from"@redocl
|
|
|
18
20
|
cursor: pointer;
|
|
19
21
|
text-transform: none;
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
+
button {
|
|
23
24
|
min-width: 90px;
|
|
24
|
-
height: 36px;
|
|
25
|
-
outline: none;
|
|
26
|
-
display: inline-block;
|
|
27
25
|
color: var(--docs-dropdown-text-color);
|
|
28
|
-
border-radius: var(--border-radius-md);
|
|
29
|
-
padding: var(--docs-dropdown-padding);
|
|
30
|
-
vertical-align: bottom;
|
|
31
|
-
width: ${({fullWidth:o})=>o?"100%":"auto"};
|
|
32
|
-
text-transform: none;
|
|
33
|
-
line-height: inherit;
|
|
34
26
|
font-size: var(--docs-dropdown-font-size);
|
|
35
|
-
|
|
36
|
-
text-overflow: ellipsis;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
white-space: nowrap;
|
|
39
|
-
|
|
40
|
-
&,
|
|
41
|
-
&:hover,
|
|
42
|
-
&:focus-within {
|
|
43
|
-
box-shadow: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
${({variant:o})=>o==="dark"?r:""};
|
|
27
|
+
border-radius: var(--border-radius-md);
|
|
47
28
|
}
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
left: 0;
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: 100%;
|
|
55
|
-
opacity: 0;
|
|
56
|
-
border: none;
|
|
57
|
-
appearance: none;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
|
|
60
|
-
color: var(--text-color-secondary);
|
|
61
|
-
line-height: inherit;
|
|
62
|
-
font-size: var(--font-size-base);
|
|
63
|
-
font-family: inherit;
|
|
64
|
-
padding: var(--docs-dropdown-padding);
|
|
65
|
-
${({variant:o})=>o==="dark"?r:""};
|
|
66
|
-
}
|
|
67
|
-
`,c=e(a)`
|
|
68
|
-
svg {
|
|
69
|
-
top: 60%;
|
|
70
|
-
transform: translateY(-60%);
|
|
71
|
-
}
|
|
72
|
-
label {
|
|
30
|
+
${({variant:o})=>o==="dark"?n:""};
|
|
31
|
+
`,l=r(a)`
|
|
32
|
+
button {
|
|
73
33
|
padding: 0 26px 0 4px;
|
|
74
34
|
background: transparent;
|
|
75
35
|
font-size: var(--font-size-base);
|
|
76
36
|
font-weight: var(--font-weight-regular);
|
|
77
|
-
appearance: none;
|
|
78
37
|
height: auto;
|
|
38
|
+
min-width: auto;
|
|
79
39
|
|
|
80
40
|
&:hover,
|
|
81
|
-
&:focus
|
|
41
|
+
&:focus {
|
|
82
42
|
box-shadow: none;
|
|
83
43
|
}
|
|
84
44
|
}
|
|
85
|
-
|
|
86
|
-
position: absolute;
|
|
87
|
-
right: 10px;
|
|
88
|
-
top: 10px;
|
|
89
|
-
`;export{h as Arrow,a as Select,c as SimpleSelect};
|
|
45
|
+
`;export{a as Select,l as SimpleSelect};
|
|
@@ -8,11 +8,8 @@ export interface SelectOption {
|
|
|
8
8
|
export interface SelectProps {
|
|
9
9
|
options: SelectOption[];
|
|
10
10
|
onChange: (option: SelectOption) => void;
|
|
11
|
-
handleClear?: () => void;
|
|
12
|
-
clearable?: boolean;
|
|
13
11
|
ariaLabel?: string;
|
|
14
12
|
className?: string;
|
|
15
|
-
placeholder?: string;
|
|
16
13
|
value?: string;
|
|
17
14
|
dense?: boolean;
|
|
18
15
|
fullWidth?: boolean;
|