@jsenv/navi 0.26.11 → 0.26.13
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 +276 -239
- package/dist/jsenv_navi.js.map +21 -17
- package/dist/jsenv_navi_side_effects.js +6 -0
- package/dist/jsenv_navi_side_effects.js.map +2 -2
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -6729,6 +6729,8 @@ const COPIED_ON_VISUAL_CHILD_PROP_SET = new Set([
|
|
|
6729
6729
|
"align",
|
|
6730
6730
|
"alignX",
|
|
6731
6731
|
"alignY",
|
|
6732
|
+
"minWidth",
|
|
6733
|
+
"minHeight",
|
|
6732
6734
|
]);
|
|
6733
6735
|
const HANDLED_BY_VISUAL_CHILD_PROP_SET = new Set([
|
|
6734
6736
|
...INNER_SPACING_PROP_NAME_SET,
|
|
@@ -22560,11 +22562,6 @@ installImportMetaCssBuild(import.meta);const css$x = /* css */`
|
|
|
22560
22562
|
--button-border-radius: 2px;
|
|
22561
22563
|
--button-outline-width: 1px;
|
|
22562
22564
|
--button-border-width: 1px;
|
|
22563
|
-
/* Global padding defaults — override these to change all button paddings. */
|
|
22564
|
-
/* Use --button-padding, --button-padding-x, --button-padding-y for per-button overrides. */
|
|
22565
|
-
--button-padding-x-default: 6px;
|
|
22566
|
-
--button-padding-y-default: 1px;
|
|
22567
|
-
/* default */
|
|
22568
22565
|
|
|
22569
22566
|
--button-outline-color: var(--navi-focus-outline-color);
|
|
22570
22567
|
--button-loader-color: var(--navi-loader-color);
|
|
@@ -24856,23 +24853,24 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24856
24853
|
|
|
24857
24854
|
position: relative;
|
|
24858
24855
|
display: inline-flex;
|
|
24859
|
-
box-sizing:
|
|
24856
|
+
box-sizing: border-box;
|
|
24857
|
+
width: var(--width);
|
|
24858
|
+
height: var(--height);
|
|
24860
24859
|
margin: var(--margin);
|
|
24861
|
-
|
|
24862
|
-
|
|
24863
|
-
|
|
24864
|
-
|
|
24865
|
-
|
|
24866
|
-
|
|
24867
|
-
|
|
24868
|
-
|
|
24869
|
-
|
|
24860
|
+
background-color: var(--x-background-color);
|
|
24861
|
+
border-width: var(--border-width);
|
|
24862
|
+
border-style: solid;
|
|
24863
|
+
border-color: var(--x-border-color);
|
|
24864
|
+
border-radius: var(--border-radius);
|
|
24865
|
+
outline-width: var(--outline-width);
|
|
24866
|
+
outline-style: none;
|
|
24867
|
+
outline-color: var(--outline-color);
|
|
24868
|
+
outline-offset: var(--outline-offset);
|
|
24870
24869
|
|
|
24871
24870
|
.navi_native_field {
|
|
24872
24871
|
position: absolute;
|
|
24873
24872
|
inset: 0;
|
|
24874
24873
|
margin: 0;
|
|
24875
|
-
padding: 0;
|
|
24876
24874
|
border: none;
|
|
24877
24875
|
border-radius: inherit;
|
|
24878
24876
|
opacity: 0;
|
|
@@ -24880,29 +24878,19 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24880
24878
|
cursor: var(--x-cursor);
|
|
24881
24879
|
}
|
|
24882
24880
|
|
|
24883
|
-
.
|
|
24884
|
-
|
|
24885
|
-
|
|
24886
|
-
|
|
24887
|
-
|
|
24888
|
-
|
|
24889
|
-
border-width: var(--border-width);
|
|
24890
|
-
border-style: solid;
|
|
24891
|
-
border-color: var(--x-border-color);
|
|
24892
|
-
border-radius: var(--border-radius);
|
|
24893
|
-
outline-width: var(--outline-width);
|
|
24894
|
-
outline-style: none;
|
|
24895
|
-
outline-color: var(--outline-color);
|
|
24896
|
-
outline-offset: var(--outline-offset);
|
|
24881
|
+
.navi_checkbox_accent_probe {
|
|
24882
|
+
position: absolute;
|
|
24883
|
+
width: 0;
|
|
24884
|
+
height: 0;
|
|
24885
|
+
background-color: var(--accent-color);
|
|
24886
|
+
visibility: hidden;
|
|
24897
24887
|
pointer-events: none;
|
|
24898
24888
|
}
|
|
24899
24889
|
|
|
24900
24890
|
/* Focus */
|
|
24901
24891
|
&[data-focus-visible] {
|
|
24902
24892
|
z-index: 1;
|
|
24903
|
-
|
|
24904
|
-
outline-style: solid;
|
|
24905
|
-
}
|
|
24893
|
+
outline-style: solid;
|
|
24906
24894
|
}
|
|
24907
24895
|
/* Hover */
|
|
24908
24896
|
&[data-hover] {
|
|
@@ -24984,7 +24972,6 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24984
24972
|
/* Toggle appearance */
|
|
24985
24973
|
&[data-appearance="toggle"] {
|
|
24986
24974
|
--margin: var(--toggle-margin);
|
|
24987
|
-
--padding: var(--toggle-padding);
|
|
24988
24975
|
--width: var(--toggle-width);
|
|
24989
24976
|
--height: unset;
|
|
24990
24977
|
--border-radius: var(--toggle-border-radius);
|
|
@@ -25003,25 +24990,19 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25003
24990
|
--toggle-background-color-disabled-checked
|
|
25004
24991
|
);
|
|
25005
24992
|
|
|
25006
|
-
|
|
25007
|
-
|
|
25008
|
-
|
|
25009
|
-
|
|
25010
|
-
height: var(--height);
|
|
25011
|
-
padding: var(--padding);
|
|
25012
|
-
background-color: var(--x-background-color);
|
|
25013
|
-
border-color: transparent;
|
|
25014
|
-
user-select: none;
|
|
24993
|
+
position: relative;
|
|
24994
|
+
background-color: var(--x-background-color);
|
|
24995
|
+
border-color: transparent;
|
|
24996
|
+
user-select: none;
|
|
25015
24997
|
|
|
25016
|
-
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
}
|
|
24998
|
+
.navi_checkbox_toggle {
|
|
24999
|
+
width: var(--toggle-thumb-size);
|
|
25000
|
+
height: var(--toggle-thumb-size);
|
|
25001
|
+
border-radius: var(--toggle-thumb-border-radius);
|
|
25002
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
25003
|
+
fill: var(--toggle-thumb-color);
|
|
25004
|
+
transform: translateX(0);
|
|
25005
|
+
transition: transform 0.2s ease;
|
|
25025
25006
|
}
|
|
25026
25007
|
|
|
25027
25008
|
&[data-checked] {
|
|
@@ -25047,22 +25028,17 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25047
25028
|
|
|
25048
25029
|
&[data-appearance="icon"] {
|
|
25049
25030
|
--margin: 0;
|
|
25050
|
-
--outline-offset: 0px;
|
|
25051
25031
|
--width: auto;
|
|
25052
25032
|
--height: auto;
|
|
25053
25033
|
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
border: none;
|
|
25057
|
-
}
|
|
25034
|
+
background: none;
|
|
25035
|
+
border: none;
|
|
25058
25036
|
}
|
|
25059
25037
|
|
|
25060
25038
|
&[data-appearance="button"] {
|
|
25061
25039
|
--margin: 0;
|
|
25062
|
-
--outline-offset: 0px;
|
|
25063
25040
|
--width: auto;
|
|
25064
25041
|
--height: auto;
|
|
25065
|
-
--padding: 4px;
|
|
25066
25042
|
--border-color: var(--button-border-color);
|
|
25067
25043
|
--border-color-hover: var(--button-border-color-hover);
|
|
25068
25044
|
--background-color: var(--button-background-color);
|
|
@@ -25072,12 +25048,36 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25072
25048
|
--border-color-checked: var(--button-border-color);
|
|
25073
25049
|
--background-color-checked: var(--button-background-color);
|
|
25074
25050
|
|
|
25075
|
-
|
|
25076
|
-
|
|
25077
|
-
|
|
25078
|
-
|
|
25079
|
-
|
|
25080
|
-
|
|
25051
|
+
padding-top: var(
|
|
25052
|
+
--button-padding-top,
|
|
25053
|
+
var(
|
|
25054
|
+
--button-padding-y,
|
|
25055
|
+
var(--button-padding, var(--button-padding-y-default))
|
|
25056
|
+
)
|
|
25057
|
+
);
|
|
25058
|
+
padding-right: var(
|
|
25059
|
+
--button-padding-right,
|
|
25060
|
+
var(
|
|
25061
|
+
--button-padding-x,
|
|
25062
|
+
var(--button-padding, var(--button-padding-x-default))
|
|
25063
|
+
)
|
|
25064
|
+
);
|
|
25065
|
+
padding-bottom: var(
|
|
25066
|
+
--button-padding-bottom,
|
|
25067
|
+
var(
|
|
25068
|
+
--button-padding-y,
|
|
25069
|
+
var(--button-padding, var(--button-padding-y-default))
|
|
25070
|
+
)
|
|
25071
|
+
);
|
|
25072
|
+
padding-left: var(
|
|
25073
|
+
--button-padding-left,
|
|
25074
|
+
var(
|
|
25075
|
+
--button-padding-x,
|
|
25076
|
+
var(--button-padding, var(--button-padding-x-default))
|
|
25077
|
+
)
|
|
25078
|
+
);
|
|
25079
|
+
align-items: center;
|
|
25080
|
+
justify-content: center;
|
|
25081
25081
|
}
|
|
25082
25082
|
}
|
|
25083
25083
|
`;
|
|
@@ -25171,33 +25171,74 @@ const InputCheckboxUI = props => {
|
|
|
25171
25171
|
uiStateController.setUIState(checkboxIsChecked, e);
|
|
25172
25172
|
onInput?.(e);
|
|
25173
25173
|
});
|
|
25174
|
-
const renderCheckbox = checkboxProps =>
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25174
|
+
const renderCheckbox = checkboxProps => {
|
|
25175
|
+
return jsx(Box, {
|
|
25176
|
+
...checkboxProps,
|
|
25177
|
+
id: id,
|
|
25178
|
+
as: "input",
|
|
25179
|
+
ref: ref,
|
|
25180
|
+
type: "checkbox",
|
|
25181
|
+
name: innerName,
|
|
25182
|
+
checked: checked,
|
|
25183
|
+
required: innerRequired,
|
|
25184
|
+
baseClassName: "navi_native_field",
|
|
25185
|
+
"data-callout-arrow-x": "center",
|
|
25186
|
+
onClick: innerOnClick,
|
|
25187
|
+
onInput: innerOnInput,
|
|
25188
|
+
onresetuistate: e => {
|
|
25189
|
+
uiStateController.resetUIState(e);
|
|
25190
|
+
},
|
|
25191
|
+
onsetuistate: e => {
|
|
25192
|
+
uiStateController.setUIState(e.detail.value, e);
|
|
25193
|
+
}
|
|
25194
|
+
});
|
|
25195
|
+
};
|
|
25194
25196
|
const renderCheckboxMemoized = useCallback(renderCheckbox, [id, innerName, checked, innerRequired]);
|
|
25195
25197
|
const boxRef = useRef();
|
|
25196
25198
|
useAccentColorAttributes(boxRef, accentColor, {
|
|
25197
25199
|
elementSelector: ".navi_checkbox_accent_probe"
|
|
25198
25200
|
});
|
|
25201
|
+
let visualVnode;
|
|
25202
|
+
if (icon) {
|
|
25203
|
+
visualVnode = jsx("div", {
|
|
25204
|
+
className: "navi_checkbox_icon",
|
|
25205
|
+
"aria-hidden": "true",
|
|
25206
|
+
children: Array.isArray(icon) ? icon[checked ? 1 : 0] : icon
|
|
25207
|
+
});
|
|
25208
|
+
} else if (appearance === "toggle") {
|
|
25209
|
+
visualVnode = jsx(Box, {
|
|
25210
|
+
className: "navi_checkbox_toggle",
|
|
25211
|
+
as: "svg",
|
|
25212
|
+
viewBox: "0 0 12 12",
|
|
25213
|
+
"aria-hidden": "true",
|
|
25214
|
+
preventInitialTransition: true,
|
|
25215
|
+
children: jsx("circle", {
|
|
25216
|
+
cx: "6",
|
|
25217
|
+
cy: "6",
|
|
25218
|
+
r: "5"
|
|
25219
|
+
})
|
|
25220
|
+
});
|
|
25221
|
+
} else {
|
|
25222
|
+
visualVnode = jsx(Box, {
|
|
25223
|
+
className: "navi_checkbox_marker",
|
|
25224
|
+
as: "svg",
|
|
25225
|
+
viewBox: "0 0 12 12",
|
|
25226
|
+
"aria-hidden": "true",
|
|
25227
|
+
preventInitialTransition: true,
|
|
25228
|
+
children: jsx("path", {
|
|
25229
|
+
d: "M10.5 2L4.5 9L1.5 5.5",
|
|
25230
|
+
fill: "none",
|
|
25231
|
+
strokeWidth: "2"
|
|
25232
|
+
})
|
|
25233
|
+
});
|
|
25234
|
+
}
|
|
25199
25235
|
return jsxs(Box, {
|
|
25200
|
-
as: "span"
|
|
25236
|
+
as: "span"
|
|
25237
|
+
// Checkbox displayed as button are usually squarish
|
|
25238
|
+
// (passsing any custom width/height would auto disable aspectRatio forced by the square prop)
|
|
25239
|
+
,
|
|
25240
|
+
|
|
25241
|
+
square: appearance === "button" ? true : undefined,
|
|
25201
25242
|
...remainingProps,
|
|
25202
25243
|
autoFocus: undefined // See use_auto_focus.js
|
|
25203
25244
|
,
|
|
@@ -25226,36 +25267,7 @@ const InputCheckboxUI = props => {
|
|
|
25226
25267
|
inset: -1,
|
|
25227
25268
|
color: "var(--loader-color)",
|
|
25228
25269
|
targetSelector: ".navi_checkbox_field"
|
|
25229
|
-
}),
|
|
25230
|
-
className: "navi_checkbox_field",
|
|
25231
|
-
children: icon ? jsx("div", {
|
|
25232
|
-
className: "navi_checkbox_icon",
|
|
25233
|
-
"aria-hidden": "true",
|
|
25234
|
-
children: Array.isArray(icon) ? icon[checked ? 1 : 0] : icon
|
|
25235
|
-
}) : appearance === "toggle" ? jsx(Box, {
|
|
25236
|
-
className: "navi_checkbox_toggle",
|
|
25237
|
-
as: "svg",
|
|
25238
|
-
viewBox: "0 0 12 12",
|
|
25239
|
-
"aria-hidden": "true",
|
|
25240
|
-
preventInitialTransition: true,
|
|
25241
|
-
children: jsx("circle", {
|
|
25242
|
-
cx: "6",
|
|
25243
|
-
cy: "6",
|
|
25244
|
-
r: "5"
|
|
25245
|
-
})
|
|
25246
|
-
}) : jsx(Box, {
|
|
25247
|
-
className: "navi_checkbox_marker",
|
|
25248
|
-
as: "svg",
|
|
25249
|
-
viewBox: "0 0 12 12",
|
|
25250
|
-
"aria-hidden": "true",
|
|
25251
|
-
preventInitialTransition: true,
|
|
25252
|
-
children: jsx("path", {
|
|
25253
|
-
d: "M10.5 2L4.5 9L1.5 5.5",
|
|
25254
|
-
fill: "none",
|
|
25255
|
-
strokeWidth: "2"
|
|
25256
|
-
})
|
|
25257
|
-
})
|
|
25258
|
-
})]
|
|
25270
|
+
}), visualVnode, renderCheckboxMemoized]
|
|
25259
25271
|
});
|
|
25260
25272
|
};
|
|
25261
25273
|
const CheckboxStyleCSSVars = {
|
|
@@ -25286,17 +25298,18 @@ const CheckboxToggleStyleCSSVars = {
|
|
|
25286
25298
|
...CheckboxStyleCSSVars,
|
|
25287
25299
|
width: "--toggle-width",
|
|
25288
25300
|
height: "--toggle-height",
|
|
25289
|
-
borderRadius: "--border-radius"
|
|
25301
|
+
borderRadius: "--border-radius",
|
|
25302
|
+
padding: "--toggle-padding"
|
|
25290
25303
|
};
|
|
25291
25304
|
const CheckboxButtonStyleCSSVars = {
|
|
25292
25305
|
...CheckboxStyleCSSVars,
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25306
|
+
padding: "--button-padding",
|
|
25307
|
+
paddingX: "--button-padding-x",
|
|
25308
|
+
paddingY: "--button-padding-y",
|
|
25309
|
+
paddingTop: "--button-padding-top",
|
|
25310
|
+
paddingRight: "--button-padding-right",
|
|
25311
|
+
paddingBottom: "--button-padding-bottom",
|
|
25312
|
+
paddingLeft: "--button-padding-left"
|
|
25300
25313
|
};
|
|
25301
25314
|
const CheckboxPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":checked", ":-navi-loading"];
|
|
25302
25315
|
const CheckboxPseudoElements = ["::-navi-loader", "::-navi-checkmark"];
|
|
@@ -25602,8 +25615,14 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25602
25615
|
|
|
25603
25616
|
position: relative;
|
|
25604
25617
|
display: inline-flex;
|
|
25605
|
-
box-sizing:
|
|
25618
|
+
box-sizing: border-box;
|
|
25619
|
+
width: var(--x-width);
|
|
25620
|
+
height: var(--x-height);
|
|
25606
25621
|
margin: var(--margin);
|
|
25622
|
+
outline-width: var(--x-outline-width);
|
|
25623
|
+
outline-style: none;
|
|
25624
|
+
outline-color: var(--x-outline-color);
|
|
25625
|
+
outline-offset: var(--x-outline-offset);
|
|
25607
25626
|
|
|
25608
25627
|
.navi_radio_accent_probe {
|
|
25609
25628
|
position: absolute;
|
|
@@ -25629,9 +25648,7 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25629
25648
|
/* Focus */
|
|
25630
25649
|
&[data-focus-visible] {
|
|
25631
25650
|
z-index: 1;
|
|
25632
|
-
|
|
25633
|
-
outline-style: solid;
|
|
25634
|
-
}
|
|
25651
|
+
outline-style: solid;
|
|
25635
25652
|
}
|
|
25636
25653
|
/* Hover */
|
|
25637
25654
|
&[data-hover] {
|
|
@@ -25656,7 +25673,6 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25656
25673
|
.navi_radio_dashed_border {
|
|
25657
25674
|
display: none;
|
|
25658
25675
|
}
|
|
25659
|
-
|
|
25660
25676
|
&[data-checked] {
|
|
25661
25677
|
--x-background-color: var(--background-color-readonly-checked);
|
|
25662
25678
|
--x-border-color: var(--border-color-readonly-checked);
|
|
@@ -25687,45 +25703,32 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25687
25703
|
}
|
|
25688
25704
|
}
|
|
25689
25705
|
|
|
25690
|
-
.navi_radio_field {
|
|
25691
|
-
box-sizing: border-box;
|
|
25692
|
-
width: var(--x-width);
|
|
25693
|
-
height: var(--x-height);
|
|
25694
|
-
outline-width: var(--x-outline-width);
|
|
25695
|
-
outline-style: none;
|
|
25696
|
-
outline-color: var(--x-outline-color);
|
|
25697
|
-
outline-offset: var(--x-outline-offset);
|
|
25698
|
-
pointer-events: none;
|
|
25699
|
-
}
|
|
25700
|
-
|
|
25701
25706
|
/* Radio appearance */
|
|
25702
25707
|
&[data-appearance="radio"] {
|
|
25703
|
-
|
|
25704
|
-
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
border-radius: 50%;
|
|
25708
|
+
display: inline-flex;
|
|
25709
|
+
align-items: center;
|
|
25710
|
+
justify-content: center;
|
|
25711
|
+
border-radius: 50%;
|
|
25708
25712
|
|
|
25709
|
-
|
|
25710
|
-
|
|
25711
|
-
|
|
25713
|
+
svg {
|
|
25714
|
+
overflow: visible;
|
|
25715
|
+
}
|
|
25712
25716
|
|
|
25713
|
-
|
|
25714
|
-
|
|
25715
|
-
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25720
|
-
|
|
25721
|
-
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25725
|
-
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
}
|
|
25717
|
+
.navi_radio_border {
|
|
25718
|
+
fill: var(--x-background-color);
|
|
25719
|
+
stroke: var(--x-border-color);
|
|
25720
|
+
}
|
|
25721
|
+
.navi_radio_dashed_border {
|
|
25722
|
+
display: none;
|
|
25723
|
+
}
|
|
25724
|
+
.navi_radio_marker {
|
|
25725
|
+
width: 100%;
|
|
25726
|
+
height: 100%;
|
|
25727
|
+
opacity: 0;
|
|
25728
|
+
fill: var(--x-radiomark-color);
|
|
25729
|
+
transform: scale(0.3);
|
|
25730
|
+
transform-origin: center;
|
|
25731
|
+
pointer-events: none;
|
|
25729
25732
|
}
|
|
25730
25733
|
|
|
25731
25734
|
&[data-transition] {
|
|
@@ -25762,7 +25765,6 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25762
25765
|
--outline-offset: 0px;
|
|
25763
25766
|
--width: auto;
|
|
25764
25767
|
--height: auto;
|
|
25765
|
-
--padding: 2px;
|
|
25766
25768
|
--border-color: var(--button-border-color);
|
|
25767
25769
|
--border-color-hover: var(--button-border-color-hover);
|
|
25768
25770
|
--background-color: var(--button-background-color);
|
|
@@ -25772,25 +25774,45 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25772
25774
|
--border-color-checked: var(--button-border-color);
|
|
25773
25775
|
--background-color-checked: var(--button-background-color);
|
|
25774
25776
|
|
|
25775
|
-
|
|
25776
|
-
|
|
25777
|
-
|
|
25778
|
-
|
|
25779
|
-
|
|
25780
|
-
|
|
25781
|
-
|
|
25782
|
-
|
|
25783
|
-
|
|
25784
|
-
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25777
|
+
padding-top: var(
|
|
25778
|
+
--button-padding-top,
|
|
25779
|
+
var(
|
|
25780
|
+
--button-padding-y,
|
|
25781
|
+
var(--button-padding, var(--button-padding-y-default))
|
|
25782
|
+
)
|
|
25783
|
+
);
|
|
25784
|
+
padding-right: var(
|
|
25785
|
+
--button-padding-right,
|
|
25786
|
+
var(
|
|
25787
|
+
--button-padding-x,
|
|
25788
|
+
var(--button-padding, var(--button-padding-x-default))
|
|
25789
|
+
)
|
|
25790
|
+
);
|
|
25791
|
+
padding-bottom: var(
|
|
25792
|
+
--button-padding-bottom,
|
|
25793
|
+
var(
|
|
25794
|
+
--button-padding-y,
|
|
25795
|
+
var(--button-padding, var(--button-padding-y-default))
|
|
25796
|
+
)
|
|
25797
|
+
);
|
|
25798
|
+
padding-left: var(
|
|
25799
|
+
--button-padding-left,
|
|
25800
|
+
var(
|
|
25801
|
+
--button-padding-x,
|
|
25802
|
+
var(--button-padding, var(--button-padding-x-default))
|
|
25803
|
+
)
|
|
25804
|
+
);
|
|
25805
|
+
align-items: center;
|
|
25806
|
+
justify-content: center;
|
|
25807
|
+
background-color: var(--x-background-color);
|
|
25808
|
+
border-width: var(--button-border-width);
|
|
25809
|
+
border-style: solid;
|
|
25810
|
+
border-color: var(--x-border-color);
|
|
25811
|
+
border-radius: var(--button-border-radius);
|
|
25789
25812
|
|
|
25790
|
-
|
|
25791
|
-
|
|
25792
|
-
|
|
25793
|
-
}
|
|
25813
|
+
.navi_icon,
|
|
25814
|
+
img {
|
|
25815
|
+
border-radius: inherit;
|
|
25794
25816
|
}
|
|
25795
25817
|
|
|
25796
25818
|
&[data-hover] {
|
|
@@ -25801,11 +25823,9 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25801
25823
|
--x-border-color: var(--button-border-color-checked);
|
|
25802
25824
|
--x-background-color: var(--button-background-color-checked);
|
|
25803
25825
|
|
|
25804
|
-
|
|
25805
|
-
|
|
25806
|
-
|
|
25807
|
-
inset 0 0 0 1px var(--button-border-color-checked);
|
|
25808
|
-
}
|
|
25826
|
+
box-shadow:
|
|
25827
|
+
inset 0 2px 4px rgba(0, 0, 0, 0.15),
|
|
25828
|
+
inset 0 0 0 1px var(--button-border-color-checked);
|
|
25809
25829
|
}
|
|
25810
25830
|
&[data-disabled] {
|
|
25811
25831
|
--x-border-color: var(--button-border-color-disabled);
|
|
@@ -25932,33 +25952,70 @@ const InputRadioUI = props => {
|
|
|
25932
25952
|
}
|
|
25933
25953
|
onClick?.(e);
|
|
25934
25954
|
});
|
|
25935
|
-
const renderRadio = radioProps =>
|
|
25936
|
-
|
|
25937
|
-
|
|
25938
|
-
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
+
const renderRadio = radioProps => {
|
|
25956
|
+
return jsx(Box, {
|
|
25957
|
+
...radioProps,
|
|
25958
|
+
as: "input",
|
|
25959
|
+
ref: ref,
|
|
25960
|
+
type: "radio",
|
|
25961
|
+
name: innerName,
|
|
25962
|
+
checked: checked,
|
|
25963
|
+
disabled: innerDisabled,
|
|
25964
|
+
required: innerRequired,
|
|
25965
|
+
baseClassName: "navi_native_field",
|
|
25966
|
+
"data-callout-arrow-x": "center",
|
|
25967
|
+
onClick: innerOnClick,
|
|
25968
|
+
onInput: innerOnInput,
|
|
25969
|
+
onresetuistate: e => {
|
|
25970
|
+
uiStateController.resetUIState(e);
|
|
25971
|
+
},
|
|
25972
|
+
onsetuistate: e => {
|
|
25973
|
+
uiStateController.setUIState(e.detail.value, e);
|
|
25974
|
+
}
|
|
25975
|
+
});
|
|
25976
|
+
};
|
|
25955
25977
|
const renderRadioMemoized = useCallback(renderRadio, [innerName, checked, innerRequired]);
|
|
25956
25978
|
const boxRef = useRef();
|
|
25957
25979
|
useAccentColorAttributes(boxRef, remainingProps.accentColor, {
|
|
25958
25980
|
elementSelector: ".navi_radio_accent_probe"
|
|
25959
25981
|
});
|
|
25982
|
+
let visualVNode;
|
|
25983
|
+
if (appearance === "radio") {
|
|
25984
|
+
visualVNode = jsxs("svg", {
|
|
25985
|
+
viewBox: "0 0 12 12",
|
|
25986
|
+
"aria-hidden": "true",
|
|
25987
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
25988
|
+
children: [jsx("circle", {
|
|
25989
|
+
className: "navi_radio_border",
|
|
25990
|
+
cx: "6",
|
|
25991
|
+
cy: "6",
|
|
25992
|
+
r: "5.5",
|
|
25993
|
+
strokeWidth: "1"
|
|
25994
|
+
}), jsx("circle", {
|
|
25995
|
+
className: "navi_radio_dashed_border",
|
|
25996
|
+
cx: "6",
|
|
25997
|
+
cy: "6",
|
|
25998
|
+
r: "5.5",
|
|
25999
|
+
strokeWidth: "1",
|
|
26000
|
+
strokeDasharray: "2.16 2.16",
|
|
26001
|
+
strokeDashoffset: "0"
|
|
26002
|
+
}), jsx("circle", {
|
|
26003
|
+
className: "navi_radio_marker",
|
|
26004
|
+
cx: "6",
|
|
26005
|
+
cy: "6",
|
|
26006
|
+
r: "3.5"
|
|
26007
|
+
})]
|
|
26008
|
+
});
|
|
26009
|
+
} else {
|
|
26010
|
+
visualVNode = icon;
|
|
26011
|
+
}
|
|
25960
26012
|
return jsxs(Box, {
|
|
25961
|
-
as: "span"
|
|
26013
|
+
as: "span"
|
|
26014
|
+
// Radio displayed as button are usually squarish
|
|
26015
|
+
// (passsing any custom width/height would auto disable aspectRatio forced by the square prop)
|
|
26016
|
+
,
|
|
26017
|
+
|
|
26018
|
+
square: appearance === "button" ? true : undefined,
|
|
25962
26019
|
...remainingProps,
|
|
25963
26020
|
autoFocus: undefined // See use_auto_focus.js
|
|
25964
26021
|
,
|
|
@@ -25986,35 +26043,8 @@ const InputRadioUI = props => {
|
|
|
25986
26043
|
inset: -1,
|
|
25987
26044
|
targetSelector: ".navi_radio_field",
|
|
25988
26045
|
color: "var(--loader-color)",
|
|
25989
|
-
borderRadius: "50%"
|
|
25990
|
-
}),
|
|
25991
|
-
className: "navi_radio_field",
|
|
25992
|
-
children: appearance === "radio" ? jsxs("svg", {
|
|
25993
|
-
viewBox: "0 0 12 12",
|
|
25994
|
-
"aria-hidden": "true",
|
|
25995
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
25996
|
-
children: [jsx("circle", {
|
|
25997
|
-
className: "navi_radio_border",
|
|
25998
|
-
cx: "6",
|
|
25999
|
-
cy: "6",
|
|
26000
|
-
r: "5.5",
|
|
26001
|
-
strokeWidth: "1"
|
|
26002
|
-
}), jsx("circle", {
|
|
26003
|
-
className: "navi_radio_dashed_border",
|
|
26004
|
-
cx: "6",
|
|
26005
|
-
cy: "6",
|
|
26006
|
-
r: "5.5",
|
|
26007
|
-
strokeWidth: "1",
|
|
26008
|
-
strokeDasharray: "2.16 2.16",
|
|
26009
|
-
strokeDashoffset: "0"
|
|
26010
|
-
}), jsx("circle", {
|
|
26011
|
-
className: "navi_radio_marker",
|
|
26012
|
-
cx: "6",
|
|
26013
|
-
cy: "6",
|
|
26014
|
-
r: "3.5"
|
|
26015
|
-
})]
|
|
26016
|
-
}) : icon
|
|
26017
|
-
})]
|
|
26046
|
+
borderRadius: appearance === "radio" ? "50%" : "inherit"
|
|
26047
|
+
}), visualVNode, renderRadioMemoized]
|
|
26018
26048
|
});
|
|
26019
26049
|
};
|
|
26020
26050
|
const RadioStyleCSSVars = {
|
|
@@ -26044,7 +26074,13 @@ const RadioStyleCSSVars = {
|
|
|
26044
26074
|
};
|
|
26045
26075
|
const RadioButtonStyleCSSVars = {
|
|
26046
26076
|
...RadioStyleCSSVars,
|
|
26047
|
-
"padding": "--padding",
|
|
26077
|
+
"padding": "--button-padding",
|
|
26078
|
+
"paddingX": "--button-padding-x",
|
|
26079
|
+
"paddingY": "--button-padding-y",
|
|
26080
|
+
"paddingTop": "--button-padding-top",
|
|
26081
|
+
"paddingRight": "--button-padding-right",
|
|
26082
|
+
"paddingBottom": "--button-padding-bottom",
|
|
26083
|
+
"paddingLeft": "--button-padding-left",
|
|
26048
26084
|
"borderRadius": "--button-border-radius",
|
|
26049
26085
|
"borderWidth": "--button-border-width",
|
|
26050
26086
|
"borderColor": "--button-border-color",
|
|
@@ -26183,6 +26219,7 @@ installImportMetaCssBuild(import.meta);const css$n = /* css */`
|
|
|
26183
26219
|
margin: 0;
|
|
26184
26220
|
opacity: 0;
|
|
26185
26221
|
--webkit-appearance: none;
|
|
26222
|
+
min-width: inherit;
|
|
26186
26223
|
font-size: inherit;
|
|
26187
26224
|
appearance: none;
|
|
26188
26225
|
|