@revisium/schema-toolkit-ui 0.6.10 → 0.6.11
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/index.cjs +61 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -26
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +26 -26
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +62 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -39,7 +39,6 @@ let _uiw_codemirror_theme_github = require("@uiw/codemirror-theme-github");
|
|
|
39
39
|
let _uiw_react_codemirror = require("@uiw/react-codemirror");
|
|
40
40
|
_uiw_react_codemirror = __toESM(_uiw_react_codemirror);
|
|
41
41
|
let _codemirror_lang_json = require("@codemirror/lang-json");
|
|
42
|
-
let _chakra_ui_react_breadcrumb = require("@chakra-ui/react/breadcrumb");
|
|
43
42
|
let react_icons_md = require("react-icons/md");
|
|
44
43
|
let _chakra_ui_react_menu = require("@chakra-ui/react/menu");
|
|
45
44
|
let react_icons_lu = require("react-icons/lu");
|
|
@@ -2784,29 +2783,40 @@ const EditableSegment = ({ value, onChange, onBlur, tooltip, placeholder, dataTe
|
|
|
2784
2783
|
|
|
2785
2784
|
//#endregion
|
|
2786
2785
|
//#region src/components/Breadcrumbs/SegmentContent.tsx
|
|
2786
|
+
const StyledButton = (0, _chakra_ui_react.chakra)("button");
|
|
2787
|
+
const SHARED_STYLES = {
|
|
2788
|
+
display: "inline-block",
|
|
2789
|
+
borderRadius: BREADCRUMB_BORDER_RADIUS,
|
|
2790
|
+
px: BREADCRUMB_PADDING,
|
|
2791
|
+
py: BREADCRUMB_PADDING,
|
|
2792
|
+
lineHeight: "inherit",
|
|
2793
|
+
fontSize: "inherit",
|
|
2794
|
+
fontFamily: "inherit"
|
|
2795
|
+
};
|
|
2787
2796
|
const SegmentContent = ({ segment, isHighlighted, onClick }) => {
|
|
2788
|
-
if (
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
});
|
|
2794
|
-
if (onClick) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react_breadcrumb.Breadcrumb.Link, {
|
|
2795
|
-
as: "button",
|
|
2796
|
-
color: SEGMENT_COLOR,
|
|
2797
|
-
borderRadius: BREADCRUMB_BORDER_RADIUS,
|
|
2798
|
-
px: BREADCRUMB_PADDING,
|
|
2799
|
-
py: BREADCRUMB_PADDING,
|
|
2800
|
-
focusRing: "none",
|
|
2797
|
+
if (onClick) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledButton, {
|
|
2798
|
+
type: "button",
|
|
2799
|
+
...SHARED_STYLES,
|
|
2800
|
+
color: isHighlighted ? CURRENT_COLOR : SEGMENT_COLOR,
|
|
2801
|
+
fontWeight: isHighlighted ? "600" : void 0,
|
|
2801
2802
|
cursor: "pointer",
|
|
2803
|
+
border: "none",
|
|
2804
|
+
background: "none",
|
|
2805
|
+
outline: "none",
|
|
2802
2806
|
_hover: { bg: HOVER_BG },
|
|
2803
2807
|
_focusVisible: { bg: HOVER_BG },
|
|
2804
2808
|
onClick,
|
|
2809
|
+
"aria-current": isHighlighted ? "page" : void 0,
|
|
2805
2810
|
"data-testid": segment.dataTestId,
|
|
2806
2811
|
children: segment.label
|
|
2807
2812
|
});
|
|
2808
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.
|
|
2809
|
-
|
|
2813
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.Box, {
|
|
2814
|
+
as: "span",
|
|
2815
|
+
...SHARED_STYLES,
|
|
2816
|
+
color: isHighlighted ? CURRENT_COLOR : SEGMENT_COLOR,
|
|
2817
|
+
fontWeight: isHighlighted ? "600" : void 0,
|
|
2818
|
+
cursor: isHighlighted ? "text" : "default",
|
|
2819
|
+
"aria-current": isHighlighted ? "page" : void 0,
|
|
2810
2820
|
"data-testid": segment.dataTestId,
|
|
2811
2821
|
children: segment.label
|
|
2812
2822
|
});
|
|
@@ -2816,35 +2826,53 @@ const SegmentContent = ({ segment, isHighlighted, onClick }) => {
|
|
|
2816
2826
|
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
2817
2827
|
const Breadcrumbs = ({ segments, separator = "/", dataTestId, highlightLast = true, onSegmentClick, editable, action }) => {
|
|
2818
2828
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_chakra_ui_react.Flex, {
|
|
2829
|
+
as: "nav",
|
|
2830
|
+
"aria-label": "breadcrumb",
|
|
2819
2831
|
alignItems: "center",
|
|
2820
2832
|
gap: BREADCRUMB_PADDING,
|
|
2821
|
-
|
|
2833
|
+
"data-testid": dataTestId,
|
|
2834
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_chakra_ui_react.Flex, {
|
|
2835
|
+
as: "ol",
|
|
2836
|
+
alignItems: "center",
|
|
2837
|
+
listStyleType: "none",
|
|
2838
|
+
margin: 0,
|
|
2839
|
+
padding: 0,
|
|
2822
2840
|
fontWeight: "400",
|
|
2823
2841
|
fontSize: BREADCRUMB_FONT_SIZE,
|
|
2824
|
-
|
|
2825
|
-
children:
|
|
2826
|
-
|
|
2827
|
-
children: [
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react_breadcrumb.Breadcrumb.Item, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentContent, {
|
|
2842
|
+
gap: BREADCRUMB_PADDING,
|
|
2843
|
+
children: [segments.map((segment, index) => {
|
|
2844
|
+
const isLast = index === segments.length - 1 && !editable;
|
|
2845
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.Flex, {
|
|
2846
|
+
as: "li",
|
|
2847
|
+
alignItems: "center",
|
|
2848
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SegmentContent, {
|
|
2832
2849
|
segment,
|
|
2833
|
-
isHighlighted,
|
|
2834
|
-
onClick: isLast ? void 0 :
|
|
2835
|
-
})
|
|
2850
|
+
isHighlighted: isLast && highlightLast,
|
|
2851
|
+
onClick: isLast ? void 0 : onSegmentClick ? () => onSegmentClick(segment, index) : void 0
|
|
2852
|
+
})
|
|
2853
|
+
}), (!isLast || editable) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.Flex, {
|
|
2854
|
+
as: "li",
|
|
2855
|
+
"aria-hidden": true,
|
|
2856
|
+
alignItems: "center",
|
|
2857
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.Text, {
|
|
2836
2858
|
color: SEPARATOR_COLOR,
|
|
2859
|
+
px: BREADCRUMB_PADDING,
|
|
2860
|
+
lineHeight: 1,
|
|
2837
2861
|
children: separator
|
|
2838
|
-
})
|
|
2839
|
-
})
|
|
2862
|
+
})
|
|
2863
|
+
})] }, `${segment.label}-${index}`);
|
|
2864
|
+
}), editable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_chakra_ui_react.Flex, {
|
|
2865
|
+
as: "li",
|
|
2866
|
+
alignItems: "center",
|
|
2867
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EditableSegment, {
|
|
2840
2868
|
value: editable.value,
|
|
2841
2869
|
onChange: editable.onChange,
|
|
2842
2870
|
onBlur: editable.onBlur,
|
|
2843
2871
|
tooltip: editable.tooltip,
|
|
2844
2872
|
placeholder: editable.placeholder,
|
|
2845
2873
|
dataTestId: editable.dataTestId
|
|
2846
|
-
})
|
|
2847
|
-
})
|
|
2874
|
+
})
|
|
2875
|
+
})]
|
|
2848
2876
|
}), action]
|
|
2849
2877
|
});
|
|
2850
2878
|
};
|
|
@@ -14369,7 +14397,7 @@ const TableEditor = (0, mobx_react_lite.observer)(({ viewModel, useWindowScroll
|
|
|
14369
14397
|
px: 3,
|
|
14370
14398
|
pt: "32px",
|
|
14371
14399
|
pb: "48px",
|
|
14372
|
-
alignItems: "
|
|
14400
|
+
alignItems: "flex-start",
|
|
14373
14401
|
justifyContent: "space-between",
|
|
14374
14402
|
...useWindowScroll && {
|
|
14375
14403
|
position: "sticky",
|