Skip to content

Commit 8501a66

Browse files
committed
work
1 parent dafc33a commit 8501a66

18 files changed

Lines changed: 137 additions & 99 deletions

packages/frontend/navi/dist/jsenv_navi.js

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -39245,7 +39245,6 @@ installImportMetaCssBuild(import.meta);const css$W = /* css */`
3924539245
outline-style: solid;
3924639246
outline-color: var(--link-outline-color);
3924739247
cursor: var(--x-link-cursor);
39248-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
3924939248

3925039249
.navi_current_indicator {
3925139250
position: absolute;
@@ -44090,7 +44089,6 @@ installImportMetaCssBuild(import.meta);const css$N = /* css */`
4409044089
opacity: 0;
4409144090
appearance: none; /* This allows border-radius to have an effect */
4409244091
cursor: var(--x-cursor);
44093-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
4409444092
}
4409544093

4409644094
.navi_checkbox_accent_probe {
@@ -44871,7 +44869,6 @@ installImportMetaCssBuild(import.meta);const css$L = /* css */`
4487144869
opacity: 0;
4487244870
appearance: none; /* This allows border-radius to have an effect */
4487344871
cursor: var(--x-cursor);
44874-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
4487544872
}
4487644873

4487744874
/* Focus */
@@ -45434,7 +45431,6 @@ installImportMetaCssBuild(import.meta);const css$K = /* css */`
4543445431
min-width: inherit;
4543545432
font-size: inherit;
4543645433
appearance: none;
45437-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
4543845434

4543945435
&::-webkit-slider-thumb {
4544045436
width: var(--thumb-width);
@@ -46145,7 +46141,6 @@ installImportMetaCssBuild(import.meta);const css$J = /* css */`
4614546141
cursor: var(--x-button-cursor);
4614646142
touch-action: manipulation;
4614746143
user-select: none;
46148-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
4614946144

4615046145
.navi_button_content {
4615146146
/* The ask stops here: this element is the button's frame, so what is
@@ -47497,7 +47492,6 @@ const inputCss = /* css */`
4749747492
border: none;
4749847493
border-radius: inherit;
4749947494
outline: none;
47500-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
4750147495

4750247496
&::placeholder {
4750347497
color: var(--x-placeholder-color);
@@ -59302,6 +59296,22 @@ const PickerConfirmBody = ({
5930259296

5930359297
const PickerContext = createContext();
5930459298

59299+
/*
59300+
* A typed picker (`type="date"`, `type="array"`, …) draws its value with a ui
59301+
* of navi's own, installed as the very "ui" prop a caller overrides to draw
59302+
* that value themselves. Marking navi's own tells the two apart afterwards:
59303+
* an empty value is greyed as a placeholder only when the drawing is navi's —
59304+
* a caller's ui may well be their way of writing "no filter", which is an
59305+
* answer, not a blank (see navi-placeholder in picker.jsx).
59306+
*/
59307+
const asPickerOwnUI = PickerUI => {
59308+
PickerUI.isPickerOwnUI = true;
59309+
return PickerUI;
59310+
};
59311+
const pickerUIIsNaviOwn = ui => {
59312+
return Boolean(ui) && typeof ui === "object" && Boolean(ui.type?.isPickerOwnUI);
59313+
};
59314+
5930559315
const PickerNaviMinute = props => {
5930659316
const Next = useNextResolver();
5930759317
const {
@@ -60124,7 +60134,6 @@ installImportMetaCssBuild(import.meta);const css$y = /* css */`
6012460134
inputs (a horizontal list of choices), so it takes the control line
6012560135
with the control font — the same number of pixels tall as them. */
6012660136
line-height: var(--navi-control-line-height);
60127-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
6012860137
}
6012960138
}
6013060139

@@ -66342,7 +66351,7 @@ const PickerObject = props => {
6634266351
"navi-state-shape": "object"
6634366352
});
6634466353
};
66345-
const PickerObjectUI = () => {
66354+
const PickerObjectUI = asPickerOwnUI(() => {
6634666355
const {
6634766356
value,
6634866357
placeholder
@@ -66367,7 +66376,7 @@ const PickerObjectUI = () => {
6636766376
}, key);
6636866377
})
6636966378
});
66370-
};
66379+
});
6637166380
const PickerArray = props => {
6637266381
const Next = useNextResolver();
6637366382
return jsx(Next, {
@@ -66377,7 +66386,7 @@ const PickerArray = props => {
6637766386
"navi-state-shape": "array"
6637866387
});
6637966388
};
66380-
const PickerArrayUI = () => {
66389+
const PickerArrayUI = asPickerOwnUI(() => {
6638166390
const {
6638266391
value,
6638366392
placeholder,
@@ -66399,7 +66408,7 @@ const PickerArrayUI = () => {
6639966408
}, item);
6640066409
})
6640166410
});
66402-
};
66411+
});
6640366412

6640466413
/**
6640566414
* One value the picker holds, drawn as a chip with a cross that takes it back
@@ -66460,7 +66469,7 @@ const PickerColor = props => {
6646066469
...props
6646166470
});
6646266471
};
66463-
const PickerColorUI = () => {
66472+
const PickerColorUI = asPickerOwnUI(() => {
6646466473
const {
6646566474
value,
6646666475
placeholder
@@ -66474,7 +66483,7 @@ const PickerColorUI = () => {
6647466483
return jsx(Color, {
6647566484
children: value
6647666485
});
66477-
};
66486+
});
6647866487
const PickerDate = props => {
6647966488
const Next = useNextResolver();
6648066489
return jsx(Next, {
@@ -66484,7 +66493,7 @@ const PickerDate = props => {
6648466493
type: "date"
6648566494
});
6648666495
};
66487-
const PickerDateUI = props => {
66496+
const PickerDateUI = asPickerOwnUI(props => {
6648866497
const {
6648966498
value,
6649066499
placeholder
@@ -66506,7 +66515,7 @@ const PickerDateUI = props => {
6650666515
...props,
6650766516
children: value
6650866517
});
66509-
};
66518+
});
6651066519
const PickerMonth = props => {
6651166520
const Next = useNextResolver();
6651266521
return jsx(Next, {
@@ -66516,7 +66525,7 @@ const PickerMonth = props => {
6651666525
type: "month"
6651766526
});
6651866527
};
66519-
const PickerMonthUI = props => {
66528+
const PickerMonthUI = asPickerOwnUI(props => {
6652066529
const {
6652166530
value,
6652266531
placeholder
@@ -66537,7 +66546,7 @@ const PickerMonthUI = props => {
6653766546
...props,
6653866547
children: value
6653966548
});
66540-
};
66549+
});
6654166550
const PickerWeek = props => {
6654266551
const Next = useNextResolver();
6654366552
return jsx(Next, {
@@ -66547,7 +66556,7 @@ const PickerWeek = props => {
6654766556
type: "week"
6654866557
});
6654966558
};
66550-
const PickerWeekUI = props => {
66559+
const PickerWeekUI = asPickerOwnUI(props => {
6655166560
const {
6655266561
value,
6655366562
placeholder
@@ -66568,7 +66577,7 @@ const PickerWeekUI = props => {
6656866577
...props,
6656966578
children: value
6657066579
});
66571-
};
66580+
});
6657266581
const PickerTime = props => {
6657366582
const Next = useNextResolver();
6657466583
return jsx(Next, {
@@ -66578,7 +66587,7 @@ const PickerTime = props => {
6657866587
type: "time"
6657966588
});
6658066589
};
66581-
const PickerTimeUI = props => {
66590+
const PickerTimeUI = asPickerOwnUI(props => {
6658266591
const {
6658366592
value,
6658466593
placeholder
@@ -66598,7 +66607,7 @@ const PickerTimeUI = props => {
6659866607
...props,
6659966608
children: value
6660066609
});
66601-
};
66610+
});
6660266611
const PickerDuration = props => {
6660366612
const Next = useNextResolver();
6660466613
return jsx(Next, {
@@ -66609,7 +66618,7 @@ const PickerDuration = props => {
6660966618
"navi-input-type": "duration"
6661066619
});
6661166620
};
66612-
const PickerDurationUI = props => {
66621+
const PickerDurationUI = asPickerOwnUI(props => {
6661366622
const {
6661466623
value,
6661566624
placeholder
@@ -66629,7 +66638,7 @@ const PickerDurationUI = props => {
6662966638
...props,
6663066639
children: value
6663166640
});
66632-
};
66641+
});
6663366642
const PickerDatetime = props => {
6663466643
const Next = useNextResolver();
6663566644
return jsx(Next, {
@@ -66639,7 +66648,7 @@ const PickerDatetime = props => {
6663966648
type: "datetime-local"
6664066649
});
6664166650
};
66642-
const PickerDatetimeUI = props => {
66651+
const PickerDatetimeUI = asPickerOwnUI(props => {
6664366652
const {
6664466653
value,
6664566654
placeholder
@@ -66658,7 +66667,7 @@ const PickerDatetimeUI = props => {
6665866667
type: "datetime",
6665966668
children: value
6666066669
});
66661-
};
66670+
});
6666266671
const PickerFile = props => {
6666366672
const Next = useNextResolver();
6666466673
return jsx(Next, {
@@ -66668,7 +66677,7 @@ const PickerFile = props => {
6666866677
...props
6666966678
});
6667066679
};
66671-
const PickerFileUI = () => {
66680+
const PickerFileUI = asPickerOwnUI(() => {
6667266681
const {
6667366682
value,
6667466683
placeholder
@@ -66681,7 +66690,7 @@ const PickerFileUI = () => {
6668166690
}
6668266691
// value is a FileList-like string from the input; display file names
6668366692
return String(value);
66684-
};
66693+
});
6668566694

6668666695
installImportMetaCssBuild(import.meta);const css$t = /* css */`
6668766696
@layer navi {
@@ -66870,7 +66879,6 @@ installImportMetaCssBuild(import.meta);const css$t = /* css */`
6687066879
cursor: var(--x-picker-cursor, pointer);
6687166880
pointer-events: auto;
6687266881
/* user-select: none; */
66873-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
6687466882
}
6687566883

6687666884
.navi_picker_value {
@@ -67513,11 +67521,16 @@ const PickerButton = props => {
6751367521
,
6751467522

6751567523
"data-picker-facade": ui === undefined ? undefined : ""
67516-
// A button's label is not a placeholder, however empty the
67517-
// picker behind it is.
67524+
// A placeholder is the picker saying "nothing here yet" about
67525+
// the value navi draws — the default rendering, or the one a
67526+
// typed picker installs for itself. A button's label is not
67527+
// that, however empty the picker behind it is, and neither is a
67528+
// caller's own "ui": an empty value may be exactly what the
67529+
// caller is drawing there ("no filter", "anywhere"), so how it
67530+
// looks empty stays theirs (documented on the ui prop below).
6751867531
,
6751967532

67520-
"navi-placeholder": variant !== "button" && variant !== "text" && uiStateHoldsNothing(value) ? "" : undefined,
67533+
"navi-placeholder": (ui === undefined || pickerUIIsNaviOwn(ui)) && variant !== "button" && variant !== "text" && uiStateHoldsNothing(value) ? "" : undefined,
6752167534
maxLines: maxLines,
6752267535
children: jsx(PickerOwnContent, {
6752367536
children: jsx(PickerContext.Provider, {
@@ -67946,10 +67959,6 @@ const css$s = /* css */`
6794667959
keyboard here (see navi-focus-delegate below). */
6794767960
outline-color: var(--navi-focus-outline-color);
6794867961
outline-offset: 0px;
67949-
/* No grey flash under a finger: what a press does is said by the chevron's
67950-
own background, and the browser's rectangle is drawn square over corners
67951-
that are round. Inherited, so the three pieces inside get it too. */
67952-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
6795367962
}
6795467963
/* The middle holds the keyboard, and this box wears its ring: whatever is in
6795567964
there fills it, so a ring of its own would be drawn a pixel inside this
@@ -68203,7 +68212,6 @@ const css$s = /* css */`
6820368212
outline-width: var(--navi-focus-outline-width);
6820468213
outline-color: var(--navi-focus-outline-color);
6820568214
outline-offset: 0px;
68206-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
6820768215
}
6820868216
/* A value one PICKS has nowhere of its own to wear a ring — its middle is a
6820968217
container that hands the ring over (data-focus-outline-delegate) — so the
@@ -71145,7 +71153,6 @@ const css$m = /* css */`
7114571153
border: var(--navi-control-border-width) solid
7114671154
var(--navi-control-border-color);
7114771155
border-radius: var(--navi-control-border-radius);
71148-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
7114971156

7115071157
&:focus {
7115171158
/* Keyboard focus rings the center window only (see .navi_wheel_focus_ring) —
@@ -71275,7 +71282,6 @@ const css$m = /* css */`
7127571282
inherited here, so it stays fixed to the center window rather than flipping
7127671283
as rows scroll under the pointer. */
7127771284
user-select: none;
71278-
-webkit-tap-highlight-color: transparent;
7127971285
/* NO content-visibility here, ever. content-visibility: auto was tried
7128071286
(to skip painting clipped rows) and it breaks the first opening of any
7128171287
popup holding a wheel: rows born inside a closed dialog are "skipped"

packages/frontend/navi/dist/jsenv_navi.js.map

Lines changed: 17 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/frontend/navi/dist/jsenv_navi_side_effects.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/frontend/navi/dist/jsenv_navi_side_effects.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/frontend/navi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jsenv/navi",
3-
"version": "0.29.130",
3+
"version": "0.29.132",
44
"type": "module",
55
"description": "Library of components including navigation to create frontend applications",
66
"repository": {

packages/frontend/navi/src/control/input/button_ui.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ const css = /* css */ `
152152
cursor: var(--x-button-cursor);
153153
touch-action: manipulation;
154154
user-select: none;
155-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
156155
157156
.navi_button_content {
158157
/* The ask stops here: this element is the button's frame, so what is

packages/frontend/navi/src/control/input/input_checkbox.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ const css = /* css */ `
137137
opacity: 0;
138138
appearance: none; /* This allows border-radius to have an effect */
139139
cursor: var(--x-cursor);
140-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
141140
}
142141
143142
.navi_checkbox_accent_probe {

packages/frontend/navi/src/control/input/input_radio.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ const css = /* css */ `
139139
opacity: 0;
140140
appearance: none; /* This allows border-radius to have an effect */
141141
cursor: var(--x-cursor);
142-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
143142
}
144143
145144
/* Focus */

packages/frontend/navi/src/control/input/input_range.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ const css = /* css */ `
171171
min-width: inherit;
172172
font-size: inherit;
173173
appearance: none;
174-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
175174
176175
&::-webkit-slider-thumb {
177176
width: var(--thumb-width);

packages/frontend/navi/src/control/input/input_textual.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ export const inputCss = /* css */ `
232232
border: none;
233233
border-radius: inherit;
234234
outline: none;
235-
-webkit-tap-highlight-color: var(--navi-control-tap-highlight-color);
236235
237236
&::placeholder {
238237
color: var(--x-placeholder-color);

0 commit comments

Comments
 (0)