@jsenv/navi 0.29.312 → 0.29.315
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/dev/jsenv_navi.js +72 -11
- package/dist/dev/jsenv_navi.js.map +7 -7
- package/dist/jsenv_navi.js +72 -11
- package/dist/jsenv_navi.js.map +7 -7
- package/docs/control_object.md +15 -6
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -40688,8 +40688,6 @@ time.navi_text {
|
|
|
40688
40688
|
}
|
|
40689
40689
|
|
|
40690
40690
|
.navi_text {
|
|
40691
|
-
position: relative;
|
|
40692
|
-
|
|
40693
40691
|
&[data-capitalize] {
|
|
40694
40692
|
&:first-letter, & .navi_text_sizer_placeholder:first-letter, & .navi_text_sizer_overlay:first-letter {
|
|
40695
40693
|
text-transform: uppercase;
|
|
@@ -40723,6 +40721,7 @@ time.navi_text {
|
|
|
40723
40721
|
&[data-skeleton] {
|
|
40724
40722
|
visibility: hidden;
|
|
40725
40723
|
max-width: 100%;
|
|
40724
|
+
position: relative;
|
|
40726
40725
|
|
|
40727
40726
|
& .navi_text_skeleton_children_placeholder {
|
|
40728
40727
|
width: 100%;
|
|
@@ -40805,6 +40804,7 @@ time.navi_text {
|
|
|
40805
40804
|
|
|
40806
40805
|
.navi_text[data-contains-absolute-child] {
|
|
40807
40806
|
display: inline-block;
|
|
40807
|
+
position: relative;
|
|
40808
40808
|
}
|
|
40809
40809
|
|
|
40810
40810
|
.navi_text[data-bold] {
|
|
@@ -41799,8 +41799,6 @@ const css$Y = /* css */`@layer navi {
|
|
|
41799
41799
|
}
|
|
41800
41800
|
|
|
41801
41801
|
&[aria-selected] {
|
|
41802
|
-
position: relative;
|
|
41803
|
-
|
|
41804
41802
|
& input[type="checkbox"] {
|
|
41805
41803
|
opacity: 0;
|
|
41806
41804
|
position: absolute;
|
|
@@ -41814,7 +41812,16 @@ const css$Y = /* css */`@layer navi {
|
|
|
41814
41812
|
|
|
41815
41813
|
&[data-focus], &[data-focus-visible] {
|
|
41816
41814
|
z-index: 1;
|
|
41817
|
-
|
|
41815
|
+
}
|
|
41816
|
+
|
|
41817
|
+
&[data-stretch] {
|
|
41818
|
+
position: static;
|
|
41819
|
+
|
|
41820
|
+
&:after {
|
|
41821
|
+
content: "";
|
|
41822
|
+
position: absolute;
|
|
41823
|
+
inset: 0;
|
|
41824
|
+
}
|
|
41818
41825
|
}
|
|
41819
41826
|
|
|
41820
41827
|
&[data-readonly] > * {
|
|
@@ -42041,6 +42048,15 @@ Object.assign(PSEUDO_CLASSES, {
|
|
|
42041
42048
|
* @param {boolean} [props.revealOnInteraction] - Hide the link until its
|
|
42042
42049
|
* container is hovered/focused (`data-reveal-on-interaction`), floating it
|
|
42043
42050
|
* out of flow — the "#" anchor-on-hover pattern (e.g. inside a `Title`).
|
|
42051
|
+
* @param {boolean} [props.stretch] - The press area is the nearest positioned
|
|
42052
|
+
* ancestor, not the link's own box (`data-stretch`): a row that leads
|
|
42053
|
+
* somewhere as a whole while only its name is the link — a button next to the
|
|
42054
|
+
* name cannot live inside an `<a>`. The ancestor to cover says so itself
|
|
42055
|
+
* (`<List.Item relative>`, `<Box relative>`), and nothing in between may be
|
|
42056
|
+
* positioned; navi's `Text` is not. A control in the row that keeps its own
|
|
42057
|
+
* press sits above the area when it is positioned and comes after the link
|
|
42058
|
+
* (navi's `Button` is positioned); one written before the link is raised
|
|
42059
|
+
* with a `z-index`. The link is never positioned itself, in any state.
|
|
42044
42060
|
* @param {boolean} [props.hrefFallback] - Use `href` as the visible text when
|
|
42045
42061
|
* no children are given; defaults to `true` unless `anchor`.
|
|
42046
42062
|
* @param {string|{type?: string, duration?: number|string, direction?: "forward"|"back"}} [props.routeTransition] -
|
|
@@ -42176,6 +42192,7 @@ const LinkPlain = props => {
|
|
|
42176
42192
|
startIcon,
|
|
42177
42193
|
endIcon,
|
|
42178
42194
|
revealOnInteraction = false,
|
|
42195
|
+
stretch,
|
|
42179
42196
|
hrefFallback = !anchor,
|
|
42180
42197
|
routeTransition,
|
|
42181
42198
|
pressableDuringRouteTransition,
|
|
@@ -42349,6 +42366,7 @@ const LinkPlain = props => {
|
|
|
42349
42366
|
anchor: undefined,
|
|
42350
42367
|
slide: undefined,
|
|
42351
42368
|
revealOnInteraction: undefined,
|
|
42369
|
+
stretch: undefined,
|
|
42352
42370
|
variant: undefined,
|
|
42353
42371
|
current: undefined,
|
|
42354
42372
|
currentExcept: undefined,
|
|
@@ -42439,6 +42457,7 @@ const LinkPlain = props => {
|
|
|
42439
42457
|
"data-anchor": anchor ? "" : undefined,
|
|
42440
42458
|
"data-interactive": onClick || props.command || props.action ? "" : undefined,
|
|
42441
42459
|
"data-reveal-on-interaction": revealOnInteraction ? "" : undefined,
|
|
42460
|
+
"data-stretch": stretch ? "" : undefined,
|
|
42442
42461
|
baseClassName: "navi_link",
|
|
42443
42462
|
styleCSSVars: LinkStyleCSSVars,
|
|
42444
42463
|
pseudoClasses: LinkPseudoClasses,
|
|
@@ -53576,8 +53595,8 @@ const Form = props => {
|
|
|
53576
53595
|
// second's opening tag, so the inner fields would silently belong to the
|
|
53577
53596
|
// outer form. Rather than forbidding the shape (a form inside a picker inside
|
|
53578
53597
|
// a form is a legitimate thing to want), a form that finds itself inside one
|
|
53579
|
-
// is a different component:
|
|
53580
|
-
// browser machinery that comes with it.
|
|
53598
|
+
// is a different component: a group of its own, no <form> element and none of
|
|
53599
|
+
// the browser machinery that comes with it (see FormNested).
|
|
53581
53600
|
const isNested = Boolean(useContext(FormContext));
|
|
53582
53601
|
return isNested ? jsx(FormNested, {
|
|
53583
53602
|
...props
|
|
@@ -53707,13 +53726,26 @@ const FormControl = props => {
|
|
|
53707
53726
|
// event to intercept and no requestSubmit() to go through, so it is driven the
|
|
53708
53727
|
// way every other group is — a command, or an action requested on it. method
|
|
53709
53728
|
// belongs to the browser's own submission, so it means nothing here either.
|
|
53729
|
+
//
|
|
53730
|
+
// And it owns what it holds: `standalone`, unconditionally. A <Form> is a
|
|
53731
|
+
// question with a send of its own, so its fields answer to it and to nothing
|
|
53732
|
+
// above it — they are not in the outer form's value, not in its "changed", and
|
|
53733
|
+
// not in the constraints it checks before sending. That last one is what a
|
|
53734
|
+
// caller feels: a required field in a popup nobody opened would otherwise
|
|
53735
|
+
// refuse the outer submit, pointing at something the screen is not even
|
|
53736
|
+
// showing. A cluster of fields that IS part of the value around it is a
|
|
53737
|
+
// <ControlGroup>, which is the shape without the send (see
|
|
53738
|
+
// docs/control_object.md).
|
|
53710
53739
|
const FormNested = props => {
|
|
53711
53740
|
const {
|
|
53712
53741
|
formRootProps,
|
|
53713
53742
|
formProps,
|
|
53714
53743
|
onnavi_action_end,
|
|
53715
53744
|
inside
|
|
53716
|
-
} = useFormGroup(
|
|
53745
|
+
} = useFormGroup({
|
|
53746
|
+
...props,
|
|
53747
|
+
standalone: true
|
|
53748
|
+
});
|
|
53717
53749
|
return jsx(Box, {
|
|
53718
53750
|
...formRootProps,
|
|
53719
53751
|
...formProps,
|
|
@@ -58708,6 +58740,18 @@ const css$E = /* css */`
|
|
|
58708
58740
|
--x-corner-bottom-right-radius: initial;
|
|
58709
58741
|
--x-corner-bottom-left-radius: initial;
|
|
58710
58742
|
|
|
58743
|
+
/* Sizing is per dialog: the anchor box (sizeFromAnchor) and the
|
|
58744
|
+
minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
|
|
58745
|
+
element, and an inline declaration wins over these resets. Without
|
|
58746
|
+
them, a dialog nested in another dialog would inherit its parent's
|
|
58747
|
+
inline values and open at the parent's size. */
|
|
58748
|
+
--anchor-width: initial;
|
|
58749
|
+
--anchor-height: initial;
|
|
58750
|
+
--dialog-min-width: initial;
|
|
58751
|
+
--dialog-max-width: initial;
|
|
58752
|
+
--dialog-min-height: initial;
|
|
58753
|
+
--dialog-max-height: initial;
|
|
58754
|
+
|
|
58711
58755
|
/* Computed once, reused by both max-width itself and min-width's own
|
|
58712
58756
|
clamp below (see its comment for why) — avoids repeating the same
|
|
58713
58757
|
min(..., ...) expression twice. */
|
|
@@ -60608,6 +60652,21 @@ const css$D = /* css */`
|
|
|
60608
60652
|
--x-corner-bottom-right-radius: initial;
|
|
60609
60653
|
--x-corner-bottom-left-radius: initial;
|
|
60610
60654
|
|
|
60655
|
+
/* Sizing is per popover: the anchor box and the
|
|
60656
|
+
minWidth/maxWidth/minHeight/maxHeight props are written inline on THIS
|
|
60657
|
+
element, and an inline declaration wins over these resets. Without
|
|
60658
|
+
them, a popover nested in another popup (or opened without an anchor
|
|
60659
|
+
inside one sized from its own) would inherit the outer inline values
|
|
60660
|
+
and open at the outer size. */
|
|
60661
|
+
--anchor-width: initial;
|
|
60662
|
+
--anchor-height: initial;
|
|
60663
|
+
--anchor-inner-width: initial;
|
|
60664
|
+
--anchor-inner-height: initial;
|
|
60665
|
+
--popover-min-width: initial;
|
|
60666
|
+
--popover-max-width: initial;
|
|
60667
|
+
--popover-min-height: initial;
|
|
60668
|
+
--popover-max-height: initial;
|
|
60669
|
+
|
|
60611
60670
|
--x-popover-max-width: min(
|
|
60612
60671
|
var(--popover-max-width, var(--popover-maxmax-width)),
|
|
60613
60672
|
var(--container-position-remaining-width, var(--popover-maxmax-width)),
|
|
@@ -70752,9 +70811,11 @@ const PickerText = props => {
|
|
|
70752
70811
|
};
|
|
70753
70812
|
|
|
70754
70813
|
// The popup holds a group of named controls — a `<ControlGroup>`, or a `<Form>`
|
|
70755
|
-
// when that group is a question with a send of its own
|
|
70756
|
-
//
|
|
70757
|
-
//
|
|
70814
|
+
// when that group is a question with a send of its own and the picker is not
|
|
70815
|
+
// itself inside a form (a form in a form answers for itself, see form.jsx) —
|
|
70816
|
+
// and this picker's value is the object that group aggregates. The popup itself
|
|
70817
|
+
// holds nothing: it is a surface (see dialog.jsx), so there is nothing to tell
|
|
70818
|
+
// it about the shape.
|
|
70758
70819
|
const PickerObject = props => {
|
|
70759
70820
|
const Next = useNextResolver();
|
|
70760
70821
|
return jsx(Next, {
|