@jsenv/navi 0.12.13 → 0.12.15
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/jsenv_navi.js +274 -190
- package/dist/jsenv_navi.js.map +77 -48
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -9601,9 +9601,6 @@ const UITransition = ({
|
|
|
9601
9601
|
const uiTransitionRefDefault = useRef();
|
|
9602
9602
|
uiTransitionRef = uiTransitionRef || uiTransitionRefDefault;
|
|
9603
9603
|
useLayoutEffect(() => {
|
|
9604
|
-
if (disabled) {
|
|
9605
|
-
return null;
|
|
9606
|
-
}
|
|
9607
9604
|
const uiTransition = createUITransitionController(ref.current, {
|
|
9608
9605
|
alignX,
|
|
9609
9606
|
alignY
|
|
@@ -10074,6 +10071,44 @@ const renderActionableComponent = (props, {
|
|
|
10074
10071
|
});
|
|
10075
10072
|
};
|
|
10076
10073
|
|
|
10074
|
+
/**
|
|
10075
|
+
* Merges a component's base className with className received from props.
|
|
10076
|
+
*
|
|
10077
|
+
* ```jsx
|
|
10078
|
+
* const MyButton = ({ className, children }) => (
|
|
10079
|
+
* <button className={withPropsClassName("btn", className)}>
|
|
10080
|
+
* {children}
|
|
10081
|
+
* </button>
|
|
10082
|
+
* );
|
|
10083
|
+
*
|
|
10084
|
+
* // Usage:
|
|
10085
|
+
* <MyButton className="primary large" /> // Results in "btn primary large"
|
|
10086
|
+
* <MyButton /> // Results in "btn"
|
|
10087
|
+
* ```
|
|
10088
|
+
*
|
|
10089
|
+
* @param {string} baseClassName - The component's base CSS class name
|
|
10090
|
+
* @param {string} [classNameFromProps] - Additional className from props (optional)
|
|
10091
|
+
* @returns {string} The merged className string
|
|
10092
|
+
*/
|
|
10093
|
+
const withPropsClassName = (baseClassName, classNameFromProps) => {
|
|
10094
|
+
if (!classNameFromProps) {
|
|
10095
|
+
return baseClassName;
|
|
10096
|
+
}
|
|
10097
|
+
|
|
10098
|
+
// Trim and normalize whitespace from the props className
|
|
10099
|
+
const trimmedPropsClassName = classNameFromProps.trim();
|
|
10100
|
+
if (!trimmedPropsClassName) {
|
|
10101
|
+
return baseClassName;
|
|
10102
|
+
}
|
|
10103
|
+
|
|
10104
|
+
// Normalize multiple spaces to single spaces and combine
|
|
10105
|
+
const normalizedPropsClassName = trimmedPropsClassName.replace(/\s+/g, " ");
|
|
10106
|
+
if (!baseClassName) {
|
|
10107
|
+
return normalizedPropsClassName;
|
|
10108
|
+
}
|
|
10109
|
+
return `${baseClassName} ${normalizedPropsClassName}`;
|
|
10110
|
+
};
|
|
10111
|
+
|
|
10077
10112
|
/**
|
|
10078
10113
|
* Processes component props to extract and generate styles for layout, spacing, alignment, expansion, and typography.
|
|
10079
10114
|
* Returns remaining props and styled objects based on configuration.
|
|
@@ -10429,13 +10464,7 @@ const CONTENT_PROPS = {
|
|
|
10429
10464
|
}
|
|
10430
10465
|
return { justifyContent: value };
|
|
10431
10466
|
}
|
|
10432
|
-
|
|
10433
|
-
if (value === "start") {
|
|
10434
|
-
return undefined; // this is the default
|
|
10435
|
-
}
|
|
10436
|
-
return { textAlign: value };
|
|
10437
|
-
}
|
|
10438
|
-
return undefined;
|
|
10467
|
+
return { textAlign: value };
|
|
10439
10468
|
},
|
|
10440
10469
|
contentAlignY: (value, { layout }) => {
|
|
10441
10470
|
if (layout === "row" || layout === "inline-row") {
|
|
@@ -10452,13 +10481,7 @@ const CONTENT_PROPS = {
|
|
|
10452
10481
|
}
|
|
10453
10482
|
return { alignItems: value };
|
|
10454
10483
|
}
|
|
10455
|
-
|
|
10456
|
-
if (value === "start") {
|
|
10457
|
-
return undefined;
|
|
10458
|
-
}
|
|
10459
|
-
return { verticalAlign: value };
|
|
10460
|
-
}
|
|
10461
|
-
return undefined;
|
|
10484
|
+
return { verticalAlign: value };
|
|
10462
10485
|
},
|
|
10463
10486
|
contentSpacing: (value, { layout }) => {
|
|
10464
10487
|
if (
|
|
@@ -11138,44 +11161,6 @@ const updateStyle = (element, style) => {
|
|
|
11138
11161
|
return;
|
|
11139
11162
|
};
|
|
11140
11163
|
|
|
11141
|
-
/**
|
|
11142
|
-
* Merges a component's base className with className received from props.
|
|
11143
|
-
*
|
|
11144
|
-
* ```jsx
|
|
11145
|
-
* const MyButton = ({ className, children }) => (
|
|
11146
|
-
* <button className={withPropsClassName("btn", className)}>
|
|
11147
|
-
* {children}
|
|
11148
|
-
* </button>
|
|
11149
|
-
* );
|
|
11150
|
-
*
|
|
11151
|
-
* // Usage:
|
|
11152
|
-
* <MyButton className="primary large" /> // Results in "btn primary large"
|
|
11153
|
-
* <MyButton /> // Results in "btn"
|
|
11154
|
-
* ```
|
|
11155
|
-
*
|
|
11156
|
-
* @param {string} baseClassName - The component's base CSS class name
|
|
11157
|
-
* @param {string} [classNameFromProps] - Additional className from props (optional)
|
|
11158
|
-
* @returns {string} The merged className string
|
|
11159
|
-
*/
|
|
11160
|
-
const withPropsClassName = (baseClassName, classNameFromProps) => {
|
|
11161
|
-
if (!classNameFromProps) {
|
|
11162
|
-
return baseClassName;
|
|
11163
|
-
}
|
|
11164
|
-
|
|
11165
|
-
// Trim and normalize whitespace from the props className
|
|
11166
|
-
const trimmedPropsClassName = classNameFromProps.trim();
|
|
11167
|
-
if (!trimmedPropsClassName) {
|
|
11168
|
-
return baseClassName;
|
|
11169
|
-
}
|
|
11170
|
-
|
|
11171
|
-
// Normalize multiple spaces to single spaces and combine
|
|
11172
|
-
const normalizedPropsClassName = trimmedPropsClassName.replace(/\s+/g, " ");
|
|
11173
|
-
if (!baseClassName) {
|
|
11174
|
-
return normalizedPropsClassName;
|
|
11175
|
-
}
|
|
11176
|
-
return `${baseClassName} ${normalizedPropsClassName}`;
|
|
11177
|
-
};
|
|
11178
|
-
|
|
11179
11164
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
11180
11165
|
[data-layout-inline] {
|
|
11181
11166
|
display: inline;
|
|
@@ -13485,12 +13470,121 @@ const useAutoFocus = (
|
|
|
13485
13470
|
}, []);
|
|
13486
13471
|
};
|
|
13487
13472
|
|
|
13473
|
+
const useInitialTextSelection = (ref, textSelection) => {
|
|
13474
|
+
const deps = [];
|
|
13475
|
+
if (Array.isArray(textSelection)) {
|
|
13476
|
+
deps.push(...textSelection);
|
|
13477
|
+
} else {
|
|
13478
|
+
deps.push(textSelection);
|
|
13479
|
+
}
|
|
13480
|
+
useLayoutEffect(() => {
|
|
13481
|
+
const el = ref.current;
|
|
13482
|
+
if (!el || !textSelection) {
|
|
13483
|
+
return;
|
|
13484
|
+
}
|
|
13485
|
+
const range = document.createRange();
|
|
13486
|
+
const selection = window.getSelection();
|
|
13487
|
+
if (Array.isArray(textSelection)) {
|
|
13488
|
+
if (textSelection.length === 2) {
|
|
13489
|
+
const [start, end] = textSelection;
|
|
13490
|
+
if (typeof start === "number" && typeof end === "number") {
|
|
13491
|
+
// Format: [0, 10] - character indices
|
|
13492
|
+
selectByCharacterIndices(el, range, start, end);
|
|
13493
|
+
} else if (typeof start === "string" && typeof end === "string") {
|
|
13494
|
+
// Format: ["Click on the", "button to return"] - text strings
|
|
13495
|
+
selectByTextStrings(el, range, start, end);
|
|
13496
|
+
}
|
|
13497
|
+
}
|
|
13498
|
+
} else if (typeof textSelection === "string") {
|
|
13499
|
+
// Format: "some text" - select the entire string occurrence
|
|
13500
|
+
selectSingleTextString(el, range, textSelection);
|
|
13501
|
+
}
|
|
13502
|
+
selection.removeAllRanges();
|
|
13503
|
+
selection.addRange(range);
|
|
13504
|
+
}, deps);
|
|
13505
|
+
};
|
|
13506
|
+
const selectByCharacterIndices = (element, range, startIndex, endIndex) => {
|
|
13507
|
+
const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
|
|
13508
|
+
let currentIndex = 0;
|
|
13509
|
+
let startNode = null;
|
|
13510
|
+
let startOffset = 0;
|
|
13511
|
+
let endNode = null;
|
|
13512
|
+
let endOffset = 0;
|
|
13513
|
+
while (walker.nextNode()) {
|
|
13514
|
+
const textContent = walker.currentNode.textContent;
|
|
13515
|
+
const nodeLength = textContent.length;
|
|
13516
|
+
|
|
13517
|
+
// Check if start position is in this text node
|
|
13518
|
+
if (!startNode && currentIndex + nodeLength > startIndex) {
|
|
13519
|
+
startNode = walker.currentNode;
|
|
13520
|
+
startOffset = startIndex - currentIndex;
|
|
13521
|
+
}
|
|
13522
|
+
|
|
13523
|
+
// Check if end position is in this text node
|
|
13524
|
+
if (currentIndex + nodeLength >= endIndex) {
|
|
13525
|
+
endNode = walker.currentNode;
|
|
13526
|
+
endOffset = endIndex - currentIndex;
|
|
13527
|
+
break;
|
|
13528
|
+
}
|
|
13529
|
+
currentIndex += nodeLength;
|
|
13530
|
+
}
|
|
13531
|
+
if (startNode && endNode) {
|
|
13532
|
+
range.setStart(startNode, startOffset);
|
|
13533
|
+
range.setEnd(endNode, endOffset);
|
|
13534
|
+
}
|
|
13535
|
+
};
|
|
13536
|
+
const selectSingleTextString = (element, range, text) => {
|
|
13537
|
+
const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
|
|
13538
|
+
while (walker.nextNode()) {
|
|
13539
|
+
const textContent = walker.currentNode.textContent;
|
|
13540
|
+
const index = textContent.indexOf(text);
|
|
13541
|
+
if (index !== -1) {
|
|
13542
|
+
range.setStart(walker.currentNode, index);
|
|
13543
|
+
range.setEnd(walker.currentNode, index + text.length);
|
|
13544
|
+
return;
|
|
13545
|
+
}
|
|
13546
|
+
}
|
|
13547
|
+
};
|
|
13548
|
+
const selectByTextStrings = (element, range, startText, endText) => {
|
|
13549
|
+
const walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false);
|
|
13550
|
+
let startNode = null;
|
|
13551
|
+
let endNode = null;
|
|
13552
|
+
let foundStart = false;
|
|
13553
|
+
while (walker.nextNode()) {
|
|
13554
|
+
const textContent = walker.currentNode.textContent;
|
|
13555
|
+
if (!foundStart && textContent.includes(startText)) {
|
|
13556
|
+
startNode = walker.currentNode;
|
|
13557
|
+
foundStart = true;
|
|
13558
|
+
}
|
|
13559
|
+
if (foundStart && textContent.includes(endText)) {
|
|
13560
|
+
endNode = walker.currentNode;
|
|
13561
|
+
break;
|
|
13562
|
+
}
|
|
13563
|
+
}
|
|
13564
|
+
if (startNode && endNode) {
|
|
13565
|
+
const startOffset = startNode.textContent.indexOf(startText);
|
|
13566
|
+
const endOffset = endNode.textContent.indexOf(endText) + endText.length;
|
|
13567
|
+
range.setStart(startNode, startOffset);
|
|
13568
|
+
range.setEnd(endNode, endOffset);
|
|
13569
|
+
}
|
|
13570
|
+
};
|
|
13571
|
+
|
|
13488
13572
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
13573
|
+
*[data-navi-space] {
|
|
13574
|
+
/* user-select: none; */
|
|
13575
|
+
}
|
|
13576
|
+
|
|
13489
13577
|
.navi_text {
|
|
13490
13578
|
position: relative;
|
|
13491
13579
|
color: inherit;
|
|
13492
13580
|
}
|
|
13493
13581
|
|
|
13582
|
+
.navi_text_overflow {
|
|
13583
|
+
flex-wrap: wrap;
|
|
13584
|
+
text-overflow: ellipsis;
|
|
13585
|
+
overflow: hidden;
|
|
13586
|
+
}
|
|
13587
|
+
|
|
13494
13588
|
.navi_text_overflow_wrapper {
|
|
13495
13589
|
display: flex;
|
|
13496
13590
|
width: 0;
|
|
@@ -13504,6 +13598,59 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
13504
13598
|
overflow: hidden;
|
|
13505
13599
|
}
|
|
13506
13600
|
`;
|
|
13601
|
+
const INSERTED_SPACE = jsx("span", {
|
|
13602
|
+
"data-navi-space": "",
|
|
13603
|
+
children: " "
|
|
13604
|
+
});
|
|
13605
|
+
const applyContentSpacingOnTextChildren = (children, contentSpacing) => {
|
|
13606
|
+
if (contentSpacing === "pre") {
|
|
13607
|
+
return children;
|
|
13608
|
+
}
|
|
13609
|
+
if (!children) {
|
|
13610
|
+
return children;
|
|
13611
|
+
}
|
|
13612
|
+
const childArray = toChildArray(children);
|
|
13613
|
+
const childCount = childArray.length;
|
|
13614
|
+
if (childCount <= 1) {
|
|
13615
|
+
return children;
|
|
13616
|
+
}
|
|
13617
|
+
|
|
13618
|
+
// Helper function to check if a value ends with whitespace
|
|
13619
|
+
const endsWithWhitespace = value => {
|
|
13620
|
+
if (typeof value === "string") {
|
|
13621
|
+
return /\s$/.test(value);
|
|
13622
|
+
}
|
|
13623
|
+
return false;
|
|
13624
|
+
};
|
|
13625
|
+
|
|
13626
|
+
// Helper function to check if a value starts with whitespace
|
|
13627
|
+
const startsWithWhitespace = value => {
|
|
13628
|
+
if (typeof value === "string") {
|
|
13629
|
+
return /^\s/.test(value);
|
|
13630
|
+
}
|
|
13631
|
+
return false;
|
|
13632
|
+
};
|
|
13633
|
+
const separator = contentSpacing === undefined || contentSpacing === " " ? INSERTED_SPACE : contentSpacing;
|
|
13634
|
+
const childrenWithGap = [];
|
|
13635
|
+
let i = 0;
|
|
13636
|
+
while (true) {
|
|
13637
|
+
const child = childArray[i];
|
|
13638
|
+
childrenWithGap.push(child);
|
|
13639
|
+
i++;
|
|
13640
|
+
if (i === childCount) {
|
|
13641
|
+
break;
|
|
13642
|
+
}
|
|
13643
|
+
|
|
13644
|
+
// Check if we should skip adding contentSpacing
|
|
13645
|
+
const currentChild = childArray[i - 1];
|
|
13646
|
+
const nextChild = childArray[i];
|
|
13647
|
+
const shouldSkipSpacing = endsWithWhitespace(currentChild) || startsWithWhitespace(nextChild);
|
|
13648
|
+
if (!shouldSkipSpacing) {
|
|
13649
|
+
childrenWithGap.push(separator);
|
|
13650
|
+
}
|
|
13651
|
+
}
|
|
13652
|
+
return childrenWithGap;
|
|
13653
|
+
};
|
|
13507
13654
|
const OverflowPinnedElementContext = createContext(null);
|
|
13508
13655
|
const Text = props => {
|
|
13509
13656
|
const {
|
|
@@ -13525,8 +13672,6 @@ const Text = props => {
|
|
|
13525
13672
|
});
|
|
13526
13673
|
};
|
|
13527
13674
|
const TextOverflow = ({
|
|
13528
|
-
as = "div",
|
|
13529
|
-
contentSpacing = " ",
|
|
13530
13675
|
noWrap,
|
|
13531
13676
|
pre = !noWrap,
|
|
13532
13677
|
children,
|
|
@@ -13534,21 +13679,20 @@ const TextOverflow = ({
|
|
|
13534
13679
|
}) => {
|
|
13535
13680
|
const [OverflowPinnedElement, setOverflowPinnedElement] = useState(null);
|
|
13536
13681
|
return jsx(Text, {
|
|
13537
|
-
|
|
13538
|
-
as: as,
|
|
13539
|
-
box: true,
|
|
13540
|
-
expandX: true,
|
|
13682
|
+
as: "div",
|
|
13541
13683
|
pre: pre,
|
|
13542
13684
|
nowWrap: noWrap,
|
|
13685
|
+
...rest,
|
|
13686
|
+
className: "navi_text_overflow",
|
|
13687
|
+
expandX: true,
|
|
13543
13688
|
contentSpacing: "pre",
|
|
13544
|
-
style: "text-overflow: ellipsis; overflow: hidden; flex-wrap: wrap;",
|
|
13545
13689
|
children: jsxs("span", {
|
|
13546
13690
|
className: "navi_text_overflow_wrapper",
|
|
13547
|
-
children: [jsx(
|
|
13548
|
-
|
|
13549
|
-
children: jsx(
|
|
13550
|
-
|
|
13551
|
-
children:
|
|
13691
|
+
children: [jsx(OverflowPinnedElementContext.Provider, {
|
|
13692
|
+
value: setOverflowPinnedElement,
|
|
13693
|
+
children: jsx(Text, {
|
|
13694
|
+
className: "navi_text_overflow_text",
|
|
13695
|
+
children: children
|
|
13552
13696
|
})
|
|
13553
13697
|
}), OverflowPinnedElement]
|
|
13554
13698
|
})
|
|
@@ -13574,80 +13718,22 @@ const TextOverflowPinned = ({
|
|
|
13574
13718
|
return text;
|
|
13575
13719
|
};
|
|
13576
13720
|
const TextBasic = ({
|
|
13577
|
-
as = "span",
|
|
13578
13721
|
contentSpacing = " ",
|
|
13722
|
+
selectRange,
|
|
13579
13723
|
children,
|
|
13580
13724
|
...rest
|
|
13581
13725
|
}) => {
|
|
13582
|
-
const
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
as: as,
|
|
13586
|
-
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
13587
|
-
});
|
|
13588
|
-
return text;
|
|
13589
|
-
};
|
|
13590
|
-
const Paragraph = ({
|
|
13591
|
-
contentSpacing = " ",
|
|
13592
|
-
marginTop = "md",
|
|
13593
|
-
children,
|
|
13594
|
-
...rest
|
|
13595
|
-
}) => {
|
|
13726
|
+
const defaultRef = useRef();
|
|
13727
|
+
const ref = rest.ref || defaultRef;
|
|
13728
|
+
useInitialTextSelection(ref, selectRange);
|
|
13596
13729
|
return jsx(Box, {
|
|
13730
|
+
ref: ref,
|
|
13731
|
+
as: "span",
|
|
13597
13732
|
...rest,
|
|
13598
|
-
|
|
13599
|
-
marginTop: marginTop,
|
|
13733
|
+
baseClassName: "navi_text",
|
|
13600
13734
|
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
13601
13735
|
});
|
|
13602
13736
|
};
|
|
13603
|
-
const applyContentSpacingOnTextChildren = (children, contentSpacing) => {
|
|
13604
|
-
if (contentSpacing === "pre") {
|
|
13605
|
-
return children;
|
|
13606
|
-
}
|
|
13607
|
-
if (!children) {
|
|
13608
|
-
return children;
|
|
13609
|
-
}
|
|
13610
|
-
const childArray = toChildArray(children);
|
|
13611
|
-
const childCount = childArray.length;
|
|
13612
|
-
if (childCount <= 1) {
|
|
13613
|
-
return children;
|
|
13614
|
-
}
|
|
13615
|
-
|
|
13616
|
-
// Helper function to check if a value ends with whitespace
|
|
13617
|
-
const endsWithWhitespace = value => {
|
|
13618
|
-
if (typeof value === "string") {
|
|
13619
|
-
return /\s$/.test(value);
|
|
13620
|
-
}
|
|
13621
|
-
return false;
|
|
13622
|
-
};
|
|
13623
|
-
|
|
13624
|
-
// Helper function to check if a value starts with whitespace
|
|
13625
|
-
const startsWithWhitespace = value => {
|
|
13626
|
-
if (typeof value === "string") {
|
|
13627
|
-
return /^\s/.test(value);
|
|
13628
|
-
}
|
|
13629
|
-
return false;
|
|
13630
|
-
};
|
|
13631
|
-
const childrenWithGap = [];
|
|
13632
|
-
let i = 0;
|
|
13633
|
-
while (true) {
|
|
13634
|
-
const child = childArray[i];
|
|
13635
|
-
childrenWithGap.push(child);
|
|
13636
|
-
i++;
|
|
13637
|
-
if (i === childCount) {
|
|
13638
|
-
break;
|
|
13639
|
-
}
|
|
13640
|
-
|
|
13641
|
-
// Check if we should skip adding contentSpacing
|
|
13642
|
-
const currentChild = childArray[i - 1];
|
|
13643
|
-
const nextChild = childArray[i];
|
|
13644
|
-
const shouldSkipSpacing = endsWithWhitespace(currentChild) || startsWithWhitespace(nextChild);
|
|
13645
|
-
if (!shouldSkipSpacing) {
|
|
13646
|
-
childrenWithGap.push(contentSpacing);
|
|
13647
|
-
}
|
|
13648
|
-
}
|
|
13649
|
-
return childrenWithGap;
|
|
13650
|
-
};
|
|
13651
13737
|
|
|
13652
13738
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
13653
13739
|
.navi_icon {
|
|
@@ -13657,6 +13743,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
13657
13743
|
|
|
13658
13744
|
.navi_icon_char_slot {
|
|
13659
13745
|
opacity: 0;
|
|
13746
|
+
cursor: default;
|
|
13747
|
+
user-select: none;
|
|
13660
13748
|
}
|
|
13661
13749
|
.navi_icon_foreground {
|
|
13662
13750
|
position: absolute;
|
|
@@ -13741,6 +13829,7 @@ const Icon = ({
|
|
|
13741
13829
|
...ariaProps,
|
|
13742
13830
|
box: box,
|
|
13743
13831
|
className: withPropsClassName("navi_icon", className),
|
|
13832
|
+
contentSpacing: "pre",
|
|
13744
13833
|
"data-icon-char": "",
|
|
13745
13834
|
"data-width": width,
|
|
13746
13835
|
"data-height": height,
|
|
@@ -13751,6 +13840,7 @@ const Icon = ({
|
|
|
13751
13840
|
}), jsx("span", {
|
|
13752
13841
|
className: "navi_icon_foreground",
|
|
13753
13842
|
children: jsx(Text, {
|
|
13843
|
+
contentSpacing: "pre",
|
|
13754
13844
|
children: innerChildren
|
|
13755
13845
|
})
|
|
13756
13846
|
})]
|
|
@@ -13898,7 +13988,7 @@ const LinkPlain = props => {
|
|
|
13898
13988
|
blankTargetIcon,
|
|
13899
13989
|
anchorIcon,
|
|
13900
13990
|
icon,
|
|
13901
|
-
contentSpacing
|
|
13991
|
+
contentSpacing,
|
|
13902
13992
|
children,
|
|
13903
13993
|
...rest
|
|
13904
13994
|
} = props;
|
|
@@ -13950,7 +14040,8 @@ const LinkPlain = props => {
|
|
|
13950
14040
|
rel: innerRel,
|
|
13951
14041
|
target: innerTarget === "_self" ? undefined : target,
|
|
13952
14042
|
"aria-busy": loading,
|
|
13953
|
-
inert: disabled
|
|
14043
|
+
inert: disabled,
|
|
14044
|
+
contentSpacing: "pre"
|
|
13954
14045
|
// Visual
|
|
13955
14046
|
,
|
|
13956
14047
|
baseClassName: "navi_link",
|
|
@@ -16661,7 +16752,10 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
16661
16752
|
}
|
|
16662
16753
|
.navi_button_content {
|
|
16663
16754
|
position: relative;
|
|
16755
|
+
display: inherit;
|
|
16664
16756
|
box-sizing: border-box;
|
|
16757
|
+
width: 100%;
|
|
16758
|
+
height: 100%;
|
|
16665
16759
|
padding-top: var(
|
|
16666
16760
|
--button-padding-top,
|
|
16667
16761
|
var(--button-padding-y, var(--button-padding, 1px))
|
|
@@ -16678,6 +16772,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
16678
16772
|
--button-padding-left,
|
|
16679
16773
|
var(--button-padding-x, var(--button-padding, 6px))
|
|
16680
16774
|
);
|
|
16775
|
+
align-items: inherit;
|
|
16776
|
+
justify-content: inherit;
|
|
16681
16777
|
color: var(--x-button-color);
|
|
16682
16778
|
background-color: var(--x-button-background-color);
|
|
16683
16779
|
border-width: var(--x-button-outer-width);
|
|
@@ -16824,7 +16920,6 @@ const ButtonBasic = props => {
|
|
|
16824
16920
|
autoFocus,
|
|
16825
16921
|
// visual
|
|
16826
16922
|
discrete,
|
|
16827
|
-
contentSpacing = " ",
|
|
16828
16923
|
children,
|
|
16829
16924
|
...rest
|
|
16830
16925
|
} = props;
|
|
@@ -16835,13 +16930,11 @@ const ButtonBasic = props => {
|
|
|
16835
16930
|
const innerLoading = loading || contextLoading && contextLoadingElement === ref.current;
|
|
16836
16931
|
const innerReadOnly = readOnly || contextReadOnly || innerLoading;
|
|
16837
16932
|
const innerDisabled = disabled || contextDisabled;
|
|
16838
|
-
const innerChildren = applyContentSpacingOnTextChildren(children, contentSpacing);
|
|
16839
16933
|
const renderButtonContent = buttonProps => {
|
|
16840
|
-
return jsxs(
|
|
16934
|
+
return jsxs(Text, {
|
|
16841
16935
|
...buttonProps,
|
|
16842
|
-
as: "span",
|
|
16843
16936
|
className: "navi_button_content",
|
|
16844
|
-
children: [
|
|
16937
|
+
children: [children, jsx("span", {
|
|
16845
16938
|
className: "navi_button_shadow"
|
|
16846
16939
|
})]
|
|
16847
16940
|
});
|
|
@@ -21338,10 +21431,6 @@ const useSignalSync = (value, initialValue = value) => {
|
|
|
21338
21431
|
return signal;
|
|
21339
21432
|
};
|
|
21340
21433
|
|
|
21341
|
-
const FontSizedSvg = () => {};
|
|
21342
|
-
|
|
21343
|
-
const IconAndText = () => {};
|
|
21344
|
-
|
|
21345
21434
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
21346
21435
|
.svg_mask_content * {
|
|
21347
21436
|
fill: black !important;
|
|
@@ -21435,11 +21524,11 @@ const useContrastingColor = (ref) => {
|
|
|
21435
21524
|
|
|
21436
21525
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
21437
21526
|
@layer navi {
|
|
21438
|
-
.
|
|
21527
|
+
.navi_badge_count {
|
|
21439
21528
|
--border-radius: 1em;
|
|
21440
21529
|
}
|
|
21441
21530
|
}
|
|
21442
|
-
.
|
|
21531
|
+
.navi_badge_count {
|
|
21443
21532
|
display: inline-block;
|
|
21444
21533
|
box-sizing: border-box;
|
|
21445
21534
|
min-width: 1.5em;
|
|
@@ -21495,34 +21584,21 @@ const BadgeCount = ({
|
|
|
21495
21584
|
return jsx(Text, {
|
|
21496
21585
|
...props,
|
|
21497
21586
|
ref: ref,
|
|
21498
|
-
className: "
|
|
21587
|
+
className: "navi_badge_count",
|
|
21499
21588
|
bold: bold,
|
|
21500
21589
|
managedByCSSVars: BadgeManagedByCSSVars,
|
|
21590
|
+
contentSpacing: "pre",
|
|
21501
21591
|
children: displayValue
|
|
21502
21592
|
});
|
|
21503
21593
|
};
|
|
21504
21594
|
|
|
21505
|
-
const Code =
|
|
21506
|
-
|
|
21507
|
-
children,
|
|
21508
|
-
...rest
|
|
21509
|
-
}) => {
|
|
21510
|
-
return jsx(Box, {
|
|
21511
|
-
...rest,
|
|
21512
|
-
as: "code",
|
|
21513
|
-
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
21514
|
-
});
|
|
21515
|
-
};
|
|
21516
|
-
|
|
21517
|
-
const Image = props => {
|
|
21518
|
-
return jsx(Box, {
|
|
21595
|
+
const Code = props => {
|
|
21596
|
+
return jsx(Text, {
|
|
21519
21597
|
...props,
|
|
21520
|
-
as: "
|
|
21598
|
+
as: "code"
|
|
21521
21599
|
});
|
|
21522
21600
|
};
|
|
21523
21601
|
|
|
21524
|
-
const LinkWithIcon = () => {};
|
|
21525
|
-
|
|
21526
21602
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
21527
21603
|
@layer navi {
|
|
21528
21604
|
.navi_message_box {
|
|
@@ -21615,19 +21691,19 @@ const MessageBoxReportTitleChildContext = createContext();
|
|
|
21615
21691
|
const MessageBox = ({
|
|
21616
21692
|
level = "info",
|
|
21617
21693
|
padding = "sm",
|
|
21618
|
-
contentSpacing = " ",
|
|
21619
21694
|
leftStripe,
|
|
21620
21695
|
children,
|
|
21696
|
+
contentSpacing,
|
|
21621
21697
|
...rest
|
|
21622
21698
|
}) => {
|
|
21623
21699
|
const [hasTitleChild, setHasTitleChild] = useState(false);
|
|
21624
21700
|
const innerLeftStripe = leftStripe === undefined ? hasTitleChild : leftStripe;
|
|
21625
|
-
return jsx(
|
|
21701
|
+
return jsx(Text, {
|
|
21626
21702
|
as: "div",
|
|
21627
21703
|
role: level === "info" ? "status" : "alert",
|
|
21628
21704
|
"data-left-stripe": innerLeftStripe ? "" : undefined,
|
|
21629
21705
|
...rest,
|
|
21630
|
-
|
|
21706
|
+
className: withPropsClassName("navi_message_box", rest.className),
|
|
21631
21707
|
padding: padding,
|
|
21632
21708
|
pseudoClasses: MessageBoxPseudoClasses,
|
|
21633
21709
|
basePseudoState: {
|
|
@@ -21646,38 +21722,46 @@ const MessageBox = ({
|
|
|
21646
21722
|
});
|
|
21647
21723
|
};
|
|
21648
21724
|
|
|
21649
|
-
const
|
|
21650
|
-
return jsx(
|
|
21725
|
+
const Paragraph = props => {
|
|
21726
|
+
return jsx(Text, {
|
|
21727
|
+
marginTop: "md",
|
|
21651
21728
|
...props,
|
|
21652
|
-
as: "
|
|
21729
|
+
as: "p",
|
|
21730
|
+
...props
|
|
21653
21731
|
});
|
|
21654
21732
|
};
|
|
21655
21733
|
|
|
21656
|
-
const Title =
|
|
21657
|
-
as,
|
|
21658
|
-
bold = true,
|
|
21659
|
-
contentSpacing = " ",
|
|
21660
|
-
color,
|
|
21661
|
-
children,
|
|
21662
|
-
marginTop,
|
|
21663
|
-
marginBottom,
|
|
21664
|
-
...rest
|
|
21665
|
-
}) => {
|
|
21734
|
+
const Title = props => {
|
|
21666
21735
|
const messageBoxLevel = useContext(MessageBoxLevelContext);
|
|
21667
21736
|
const reportTitleToMessageBox = useContext(MessageBoxReportTitleChildContext);
|
|
21668
|
-
const innerColor = color === undefined ? messageBoxLevel ? `var(--x-color)` : undefined : color;
|
|
21669
|
-
const innerAs = as === undefined ? messageBoxLevel ? "h4" : "h1" : as;
|
|
21670
21737
|
reportTitleToMessageBox?.(true);
|
|
21671
|
-
|
|
21672
|
-
|
|
21738
|
+
return jsx(Text, {
|
|
21739
|
+
bold: true,
|
|
21740
|
+
as: messageBoxLevel ? "h4" : "h1",
|
|
21741
|
+
marginTop: messageBoxLevel ? "0" : undefined,
|
|
21742
|
+
marginBottom: messageBoxLevel ? "sm" : undefined,
|
|
21743
|
+
color: messageBoxLevel ? `var(--x-color)` : undefined,
|
|
21744
|
+
...props
|
|
21745
|
+
});
|
|
21746
|
+
};
|
|
21747
|
+
|
|
21748
|
+
const FontSizedSvg = () => {};
|
|
21749
|
+
|
|
21750
|
+
const IconAndText = () => {};
|
|
21751
|
+
|
|
21752
|
+
const LinkWithIcon = () => {};
|
|
21753
|
+
|
|
21754
|
+
const Image = props => {
|
|
21673
21755
|
return jsx(Box, {
|
|
21674
|
-
...
|
|
21675
|
-
as:
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21756
|
+
...props,
|
|
21757
|
+
as: "img"
|
|
21758
|
+
});
|
|
21759
|
+
};
|
|
21760
|
+
|
|
21761
|
+
const Svg = props => {
|
|
21762
|
+
return jsx(Box, {
|
|
21763
|
+
...props,
|
|
21764
|
+
as: "svg"
|
|
21681
21765
|
});
|
|
21682
21766
|
};
|
|
21683
21767
|
|