@stoplight/elements-core 7.13.2 → 7.13.3
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/components/Docs/Sections.d.ts +1 -0
- package/index.esm.js +4 -4
- package/index.js +4 -4
- package/index.mjs +4 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2299,10 +2299,10 @@ const CustomLinkHeading = React.memo(function LinkHeading(_a) {
|
|
|
2299
2299
|
return React.createElement(LinkHeading$1, Object.assign({ id: id }, props));
|
|
2300
2300
|
});
|
|
2301
2301
|
|
|
2302
|
-
const SectionTitle = ({ title, id, size = 2, children }) => {
|
|
2302
|
+
const SectionTitle = ({ title, id, size = 2, isCompact = false, children }) => {
|
|
2303
2303
|
return (React.createElement(Flex, { w: "full" },
|
|
2304
2304
|
React.createElement(Box, { py: 1, pr: 6, as: LinkHeading, size: size, "aria-label": title, id: id || slugify(title) }, title),
|
|
2305
|
-
React.createElement(
|
|
2305
|
+
React.createElement(Flex, { alignSelf: 'center', py: 1, flexGrow: true, style: { minWidth: 0 }, justify: isCompact ? 'end' : undefined }, children)));
|
|
2306
2306
|
};
|
|
2307
2307
|
const SectionSubtitle = props => {
|
|
2308
2308
|
return React.createElement(SectionTitle, Object.assign({}, props, { size: 3 }));
|
|
@@ -2568,7 +2568,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2568
2568
|
const compactResponses = (React.createElement(React.Fragment, null,
|
|
2569
2569
|
React.createElement(Button, { "aria-label": "response-codes", onPress: open, iconRight: React.createElement(Icon, { icon: "chevron-down", color: "var(--color-border-button)" }), style: {
|
|
2570
2570
|
color: `var(--color-${codeToIntentVal(activeResponseId)})`,
|
|
2571
|
-
} }, activeResponseId),
|
|
2571
|
+
}, appearance: "minimal" }, activeResponseId),
|
|
2572
2572
|
React.createElement(Modal, { title: "Response Code", isOpen: isOpen, onClose: close, size: "sm", footer: React.createElement(HStack, { justifyContent: "end" },
|
|
2573
2573
|
React.createElement(Button, { onPress: close, intent: "default", appearance: "primary" }, "Close")) },
|
|
2574
2574
|
React.createElement(ListBox, { "aria-label": "Response Code", overflowY: "auto", m: -5, items: responses, selectionMode: "single", onSelectionChange: onSelectionChange }, (response) => (React.createElement(ListBoxItem, { key: response.id },
|
|
@@ -2578,7 +2578,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2578
2578
|
React.createElement(Text, { ml: 3, fontWeight: "medium" }, response.code)))))))));
|
|
2579
2579
|
const tabResponses = (React.createElement(TabList, { density: "compact" }, responses.map(({ code }) => (React.createElement(Tab, { key: code, id: code, intent: codeToIntentVal(code) }, code)))));
|
|
2580
2580
|
return (React.createElement(VStack, { spacing: 8, as: Tabs, selectedId: activeResponseId, onChange: setActiveResponseId, appearance: "pill" },
|
|
2581
|
-
React.createElement(SectionTitle, { title: "Responses" }, isCompact ? compactResponses : tabResponses),
|
|
2581
|
+
React.createElement(SectionTitle, { title: "Responses", isCompact: isCompact }, isCompact ? compactResponses : tabResponses),
|
|
2582
2582
|
isCompact ? (React.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange })) : (React.createElement(TabPanels, { p: 0 }, responses.map(response => (React.createElement(TabPanel, { key: response.code, id: response.code },
|
|
2583
2583
|
React.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange }))))))));
|
|
2584
2584
|
};
|
package/index.js
CHANGED
|
@@ -2355,10 +2355,10 @@ const CustomLinkHeading = React__namespace.memo(function LinkHeading(_a) {
|
|
|
2355
2355
|
return React__namespace.createElement(mosaic.LinkHeading, Object.assign({ id: id }, props));
|
|
2356
2356
|
});
|
|
2357
2357
|
|
|
2358
|
-
const SectionTitle = ({ title, id, size = 2, children }) => {
|
|
2358
|
+
const SectionTitle = ({ title, id, size = 2, isCompact = false, children }) => {
|
|
2359
2359
|
return (React__namespace.createElement(mosaic.Flex, { w: "full" },
|
|
2360
2360
|
React__namespace.createElement(mosaic.Box, { py: 1, pr: 6, as: LinkHeading, size: size, "aria-label": title, id: id || slugify(title) }, title),
|
|
2361
|
-
React__namespace.createElement(mosaic.
|
|
2361
|
+
React__namespace.createElement(mosaic.Flex, { alignSelf: 'center', py: 1, flexGrow: true, style: { minWidth: 0 }, justify: isCompact ? 'end' : undefined }, children)));
|
|
2362
2362
|
};
|
|
2363
2363
|
const SectionSubtitle = props => {
|
|
2364
2364
|
return React__namespace.createElement(SectionTitle, Object.assign({}, props, { size: 3 }));
|
|
@@ -2624,7 +2624,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2624
2624
|
const compactResponses = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2625
2625
|
React__namespace.createElement(mosaic.Button, { "aria-label": "response-codes", onPress: open, iconRight: React__namespace.createElement(mosaic.Icon, { icon: "chevron-down", color: "var(--color-border-button)" }), style: {
|
|
2626
2626
|
color: `var(--color-${codeToIntentVal(activeResponseId)})`,
|
|
2627
|
-
} }, activeResponseId),
|
|
2627
|
+
}, appearance: "minimal" }, activeResponseId),
|
|
2628
2628
|
React__namespace.createElement(mosaic.Modal, { title: "Response Code", isOpen: isOpen, onClose: close, size: "sm", footer: React__namespace.createElement(mosaic.HStack, { justifyContent: "end" },
|
|
2629
2629
|
React__namespace.createElement(mosaic.Button, { onPress: close, intent: "default", appearance: "primary" }, "Close")) },
|
|
2630
2630
|
React__namespace.createElement(mosaic.ListBox, { "aria-label": "Response Code", overflowY: "auto", m: -5, items: responses, selectionMode: "single", onSelectionChange: onSelectionChange }, (response) => (React__namespace.createElement(mosaic.ListBoxItem, { key: response.id },
|
|
@@ -2634,7 +2634,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2634
2634
|
React__namespace.createElement(mosaic.Text, { ml: 3, fontWeight: "medium" }, response.code)))))))));
|
|
2635
2635
|
const tabResponses = (React__namespace.createElement(mosaic.TabList, { density: "compact" }, responses.map(({ code }) => (React__namespace.createElement(mosaic.Tab, { key: code, id: code, intent: codeToIntentVal(code) }, code)))));
|
|
2636
2636
|
return (React__namespace.createElement(mosaic.VStack, { spacing: 8, as: mosaic.Tabs, selectedId: activeResponseId, onChange: setActiveResponseId, appearance: "pill" },
|
|
2637
|
-
React__namespace.createElement(SectionTitle, { title: "Responses" }, isCompact ? compactResponses : tabResponses),
|
|
2637
|
+
React__namespace.createElement(SectionTitle, { title: "Responses", isCompact: isCompact }, isCompact ? compactResponses : tabResponses),
|
|
2638
2638
|
isCompact ? (React__namespace.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange })) : (React__namespace.createElement(mosaic.TabPanels, { p: 0 }, responses.map(response => (React__namespace.createElement(mosaic.TabPanel, { key: response.code, id: response.code },
|
|
2639
2639
|
React__namespace.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange }))))))));
|
|
2640
2640
|
};
|
package/index.mjs
CHANGED
|
@@ -2299,10 +2299,10 @@ const CustomLinkHeading = React.memo(function LinkHeading(_a) {
|
|
|
2299
2299
|
return React.createElement(LinkHeading$1, Object.assign({ id: id }, props));
|
|
2300
2300
|
});
|
|
2301
2301
|
|
|
2302
|
-
const SectionTitle = ({ title, id, size = 2, children }) => {
|
|
2302
|
+
const SectionTitle = ({ title, id, size = 2, isCompact = false, children }) => {
|
|
2303
2303
|
return (React.createElement(Flex, { w: "full" },
|
|
2304
2304
|
React.createElement(Box, { py: 1, pr: 6, as: LinkHeading, size: size, "aria-label": title, id: id || slugify(title) }, title),
|
|
2305
|
-
React.createElement(
|
|
2305
|
+
React.createElement(Flex, { alignSelf: 'center', py: 1, flexGrow: true, style: { minWidth: 0 }, justify: isCompact ? 'end' : undefined }, children)));
|
|
2306
2306
|
};
|
|
2307
2307
|
const SectionSubtitle = props => {
|
|
2308
2308
|
return React.createElement(SectionTitle, Object.assign({}, props, { size: 3 }));
|
|
@@ -2568,7 +2568,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2568
2568
|
const compactResponses = (React.createElement(React.Fragment, null,
|
|
2569
2569
|
React.createElement(Button, { "aria-label": "response-codes", onPress: open, iconRight: React.createElement(Icon, { icon: "chevron-down", color: "var(--color-border-button)" }), style: {
|
|
2570
2570
|
color: `var(--color-${codeToIntentVal(activeResponseId)})`,
|
|
2571
|
-
} }, activeResponseId),
|
|
2571
|
+
}, appearance: "minimal" }, activeResponseId),
|
|
2572
2572
|
React.createElement(Modal, { title: "Response Code", isOpen: isOpen, onClose: close, size: "sm", footer: React.createElement(HStack, { justifyContent: "end" },
|
|
2573
2573
|
React.createElement(Button, { onPress: close, intent: "default", appearance: "primary" }, "Close")) },
|
|
2574
2574
|
React.createElement(ListBox, { "aria-label": "Response Code", overflowY: "auto", m: -5, items: responses, selectionMode: "single", onSelectionChange: onSelectionChange }, (response) => (React.createElement(ListBoxItem, { key: response.id },
|
|
@@ -2578,7 +2578,7 @@ const Responses = ({ responses: unsortedResponses, onStatusCodeChange, onMediaTy
|
|
|
2578
2578
|
React.createElement(Text, { ml: 3, fontWeight: "medium" }, response.code)))))))));
|
|
2579
2579
|
const tabResponses = (React.createElement(TabList, { density: "compact" }, responses.map(({ code }) => (React.createElement(Tab, { key: code, id: code, intent: codeToIntentVal(code) }, code)))));
|
|
2580
2580
|
return (React.createElement(VStack, { spacing: 8, as: Tabs, selectedId: activeResponseId, onChange: setActiveResponseId, appearance: "pill" },
|
|
2581
|
-
React.createElement(SectionTitle, { title: "Responses" }, isCompact ? compactResponses : tabResponses),
|
|
2581
|
+
React.createElement(SectionTitle, { title: "Responses", isCompact: isCompact }, isCompact ? compactResponses : tabResponses),
|
|
2582
2582
|
isCompact ? (React.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange })) : (React.createElement(TabPanels, { p: 0 }, responses.map(response => (React.createElement(TabPanel, { key: response.code, id: response.code },
|
|
2583
2583
|
React.createElement(Response, { response: response, onMediaTypeChange: onMediaTypeChange }))))))));
|
|
2584
2584
|
};
|