@jsenv/navi 0.26.12 → 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 +273 -239
- package/dist/jsenv_navi.js.map +19 -15
- 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
|
@@ -22562,11 +22562,6 @@ installImportMetaCssBuild(import.meta);const css$x = /* css */`
|
|
|
22562
22562
|
--button-border-radius: 2px;
|
|
22563
22563
|
--button-outline-width: 1px;
|
|
22564
22564
|
--button-border-width: 1px;
|
|
22565
|
-
/* Global padding defaults — override these to change all button paddings. */
|
|
22566
|
-
/* Use --button-padding, --button-padding-x, --button-padding-y for per-button overrides. */
|
|
22567
|
-
--button-padding-x-default: 6px;
|
|
22568
|
-
--button-padding-y-default: 1px;
|
|
22569
|
-
/* default */
|
|
22570
22565
|
|
|
22571
22566
|
--button-outline-color: var(--navi-focus-outline-color);
|
|
22572
22567
|
--button-loader-color: var(--navi-loader-color);
|
|
@@ -24858,23 +24853,24 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24858
24853
|
|
|
24859
24854
|
position: relative;
|
|
24860
24855
|
display: inline-flex;
|
|
24861
|
-
box-sizing:
|
|
24856
|
+
box-sizing: border-box;
|
|
24857
|
+
width: var(--width);
|
|
24858
|
+
height: var(--height);
|
|
24862
24859
|
margin: var(--margin);
|
|
24863
|
-
|
|
24864
|
-
|
|
24865
|
-
|
|
24866
|
-
|
|
24867
|
-
|
|
24868
|
-
|
|
24869
|
-
|
|
24870
|
-
|
|
24871
|
-
|
|
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);
|
|
24872
24869
|
|
|
24873
24870
|
.navi_native_field {
|
|
24874
24871
|
position: absolute;
|
|
24875
24872
|
inset: 0;
|
|
24876
24873
|
margin: 0;
|
|
24877
|
-
padding: 0;
|
|
24878
24874
|
border: none;
|
|
24879
24875
|
border-radius: inherit;
|
|
24880
24876
|
opacity: 0;
|
|
@@ -24882,29 +24878,19 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24882
24878
|
cursor: var(--x-cursor);
|
|
24883
24879
|
}
|
|
24884
24880
|
|
|
24885
|
-
.
|
|
24886
|
-
|
|
24887
|
-
|
|
24888
|
-
|
|
24889
|
-
|
|
24890
|
-
|
|
24891
|
-
border-width: var(--border-width);
|
|
24892
|
-
border-style: solid;
|
|
24893
|
-
border-color: var(--x-border-color);
|
|
24894
|
-
border-radius: var(--border-radius);
|
|
24895
|
-
outline-width: var(--outline-width);
|
|
24896
|
-
outline-style: none;
|
|
24897
|
-
outline-color: var(--outline-color);
|
|
24898
|
-
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;
|
|
24899
24887
|
pointer-events: none;
|
|
24900
24888
|
}
|
|
24901
24889
|
|
|
24902
24890
|
/* Focus */
|
|
24903
24891
|
&[data-focus-visible] {
|
|
24904
24892
|
z-index: 1;
|
|
24905
|
-
|
|
24906
|
-
outline-style: solid;
|
|
24907
|
-
}
|
|
24893
|
+
outline-style: solid;
|
|
24908
24894
|
}
|
|
24909
24895
|
/* Hover */
|
|
24910
24896
|
&[data-hover] {
|
|
@@ -24986,7 +24972,6 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
24986
24972
|
/* Toggle appearance */
|
|
24987
24973
|
&[data-appearance="toggle"] {
|
|
24988
24974
|
--margin: var(--toggle-margin);
|
|
24989
|
-
--padding: var(--toggle-padding);
|
|
24990
24975
|
--width: var(--toggle-width);
|
|
24991
24976
|
--height: unset;
|
|
24992
24977
|
--border-radius: var(--toggle-border-radius);
|
|
@@ -25005,25 +24990,19 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25005
24990
|
--toggle-background-color-disabled-checked
|
|
25006
24991
|
);
|
|
25007
24992
|
|
|
25008
|
-
|
|
25009
|
-
|
|
25010
|
-
|
|
25011
|
-
|
|
25012
|
-
height: var(--height);
|
|
25013
|
-
padding: var(--padding);
|
|
25014
|
-
background-color: var(--x-background-color);
|
|
25015
|
-
border-color: transparent;
|
|
25016
|
-
user-select: none;
|
|
24993
|
+
position: relative;
|
|
24994
|
+
background-color: var(--x-background-color);
|
|
24995
|
+
border-color: transparent;
|
|
24996
|
+
user-select: none;
|
|
25017
24997
|
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
|
|
25025
|
-
|
|
25026
|
-
}
|
|
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;
|
|
25027
25006
|
}
|
|
25028
25007
|
|
|
25029
25008
|
&[data-checked] {
|
|
@@ -25049,22 +25028,17 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25049
25028
|
|
|
25050
25029
|
&[data-appearance="icon"] {
|
|
25051
25030
|
--margin: 0;
|
|
25052
|
-
--outline-offset: 0px;
|
|
25053
25031
|
--width: auto;
|
|
25054
25032
|
--height: auto;
|
|
25055
25033
|
|
|
25056
|
-
|
|
25057
|
-
|
|
25058
|
-
border: none;
|
|
25059
|
-
}
|
|
25034
|
+
background: none;
|
|
25035
|
+
border: none;
|
|
25060
25036
|
}
|
|
25061
25037
|
|
|
25062
25038
|
&[data-appearance="button"] {
|
|
25063
25039
|
--margin: 0;
|
|
25064
|
-
--outline-offset: 0px;
|
|
25065
25040
|
--width: auto;
|
|
25066
25041
|
--height: auto;
|
|
25067
|
-
--padding: 4px;
|
|
25068
25042
|
--border-color: var(--button-border-color);
|
|
25069
25043
|
--border-color-hover: var(--button-border-color-hover);
|
|
25070
25044
|
--background-color: var(--button-background-color);
|
|
@@ -25074,12 +25048,36 @@ installImportMetaCssBuild(import.meta);const css$p = /* css */`
|
|
|
25074
25048
|
--border-color-checked: var(--button-border-color);
|
|
25075
25049
|
--background-color-checked: var(--button-background-color);
|
|
25076
25050
|
|
|
25077
|
-
|
|
25078
|
-
|
|
25079
|
-
|
|
25080
|
-
|
|
25081
|
-
|
|
25082
|
-
|
|
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;
|
|
25083
25081
|
}
|
|
25084
25082
|
}
|
|
25085
25083
|
`;
|
|
@@ -25173,33 +25171,74 @@ const InputCheckboxUI = props => {
|
|
|
25173
25171
|
uiStateController.setUIState(checkboxIsChecked, e);
|
|
25174
25172
|
onInput?.(e);
|
|
25175
25173
|
});
|
|
25176
|
-
const renderCheckbox = checkboxProps =>
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
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
|
+
};
|
|
25196
25196
|
const renderCheckboxMemoized = useCallback(renderCheckbox, [id, innerName, checked, innerRequired]);
|
|
25197
25197
|
const boxRef = useRef();
|
|
25198
25198
|
useAccentColorAttributes(boxRef, accentColor, {
|
|
25199
25199
|
elementSelector: ".navi_checkbox_accent_probe"
|
|
25200
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
|
+
}
|
|
25201
25235
|
return jsxs(Box, {
|
|
25202
|
-
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,
|
|
25203
25242
|
...remainingProps,
|
|
25204
25243
|
autoFocus: undefined // See use_auto_focus.js
|
|
25205
25244
|
,
|
|
@@ -25228,36 +25267,7 @@ const InputCheckboxUI = props => {
|
|
|
25228
25267
|
inset: -1,
|
|
25229
25268
|
color: "var(--loader-color)",
|
|
25230
25269
|
targetSelector: ".navi_checkbox_field"
|
|
25231
|
-
}),
|
|
25232
|
-
className: "navi_checkbox_field",
|
|
25233
|
-
children: icon ? jsx("div", {
|
|
25234
|
-
className: "navi_checkbox_icon",
|
|
25235
|
-
"aria-hidden": "true",
|
|
25236
|
-
children: Array.isArray(icon) ? icon[checked ? 1 : 0] : icon
|
|
25237
|
-
}) : appearance === "toggle" ? jsx(Box, {
|
|
25238
|
-
className: "navi_checkbox_toggle",
|
|
25239
|
-
as: "svg",
|
|
25240
|
-
viewBox: "0 0 12 12",
|
|
25241
|
-
"aria-hidden": "true",
|
|
25242
|
-
preventInitialTransition: true,
|
|
25243
|
-
children: jsx("circle", {
|
|
25244
|
-
cx: "6",
|
|
25245
|
-
cy: "6",
|
|
25246
|
-
r: "5"
|
|
25247
|
-
})
|
|
25248
|
-
}) : jsx(Box, {
|
|
25249
|
-
className: "navi_checkbox_marker",
|
|
25250
|
-
as: "svg",
|
|
25251
|
-
viewBox: "0 0 12 12",
|
|
25252
|
-
"aria-hidden": "true",
|
|
25253
|
-
preventInitialTransition: true,
|
|
25254
|
-
children: jsx("path", {
|
|
25255
|
-
d: "M10.5 2L4.5 9L1.5 5.5",
|
|
25256
|
-
fill: "none",
|
|
25257
|
-
strokeWidth: "2"
|
|
25258
|
-
})
|
|
25259
|
-
})
|
|
25260
|
-
})]
|
|
25270
|
+
}), visualVnode, renderCheckboxMemoized]
|
|
25261
25271
|
});
|
|
25262
25272
|
};
|
|
25263
25273
|
const CheckboxStyleCSSVars = {
|
|
@@ -25288,17 +25298,18 @@ const CheckboxToggleStyleCSSVars = {
|
|
|
25288
25298
|
...CheckboxStyleCSSVars,
|
|
25289
25299
|
width: "--toggle-width",
|
|
25290
25300
|
height: "--toggle-height",
|
|
25291
|
-
borderRadius: "--border-radius"
|
|
25301
|
+
borderRadius: "--border-radius",
|
|
25302
|
+
padding: "--toggle-padding"
|
|
25292
25303
|
};
|
|
25293
25304
|
const CheckboxButtonStyleCSSVars = {
|
|
25294
25305
|
...CheckboxStyleCSSVars,
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
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"
|
|
25302
25313
|
};
|
|
25303
25314
|
const CheckboxPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":checked", ":-navi-loading"];
|
|
25304
25315
|
const CheckboxPseudoElements = ["::-navi-loader", "::-navi-checkmark"];
|
|
@@ -25604,8 +25615,14 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25604
25615
|
|
|
25605
25616
|
position: relative;
|
|
25606
25617
|
display: inline-flex;
|
|
25607
|
-
box-sizing:
|
|
25618
|
+
box-sizing: border-box;
|
|
25619
|
+
width: var(--x-width);
|
|
25620
|
+
height: var(--x-height);
|
|
25608
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);
|
|
25609
25626
|
|
|
25610
25627
|
.navi_radio_accent_probe {
|
|
25611
25628
|
position: absolute;
|
|
@@ -25631,9 +25648,7 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25631
25648
|
/* Focus */
|
|
25632
25649
|
&[data-focus-visible] {
|
|
25633
25650
|
z-index: 1;
|
|
25634
|
-
|
|
25635
|
-
outline-style: solid;
|
|
25636
|
-
}
|
|
25651
|
+
outline-style: solid;
|
|
25637
25652
|
}
|
|
25638
25653
|
/* Hover */
|
|
25639
25654
|
&[data-hover] {
|
|
@@ -25658,7 +25673,6 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25658
25673
|
.navi_radio_dashed_border {
|
|
25659
25674
|
display: none;
|
|
25660
25675
|
}
|
|
25661
|
-
|
|
25662
25676
|
&[data-checked] {
|
|
25663
25677
|
--x-background-color: var(--background-color-readonly-checked);
|
|
25664
25678
|
--x-border-color: var(--border-color-readonly-checked);
|
|
@@ -25689,45 +25703,32 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25689
25703
|
}
|
|
25690
25704
|
}
|
|
25691
25705
|
|
|
25692
|
-
.navi_radio_field {
|
|
25693
|
-
box-sizing: border-box;
|
|
25694
|
-
width: var(--x-width);
|
|
25695
|
-
height: var(--x-height);
|
|
25696
|
-
outline-width: var(--x-outline-width);
|
|
25697
|
-
outline-style: none;
|
|
25698
|
-
outline-color: var(--x-outline-color);
|
|
25699
|
-
outline-offset: var(--x-outline-offset);
|
|
25700
|
-
pointer-events: none;
|
|
25701
|
-
}
|
|
25702
|
-
|
|
25703
25706
|
/* Radio appearance */
|
|
25704
25707
|
&[data-appearance="radio"] {
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
|
|
25709
|
-
border-radius: 50%;
|
|
25708
|
+
display: inline-flex;
|
|
25709
|
+
align-items: center;
|
|
25710
|
+
justify-content: center;
|
|
25711
|
+
border-radius: 50%;
|
|
25710
25712
|
|
|
25711
|
-
|
|
25712
|
-
|
|
25713
|
-
|
|
25713
|
+
svg {
|
|
25714
|
+
overflow: visible;
|
|
25715
|
+
}
|
|
25714
25716
|
|
|
25715
|
-
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25720
|
-
|
|
25721
|
-
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25725
|
-
|
|
25726
|
-
|
|
25727
|
-
|
|
25728
|
-
|
|
25729
|
-
|
|
25730
|
-
}
|
|
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;
|
|
25731
25732
|
}
|
|
25732
25733
|
|
|
25733
25734
|
&[data-transition] {
|
|
@@ -25764,7 +25765,6 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25764
25765
|
--outline-offset: 0px;
|
|
25765
25766
|
--width: auto;
|
|
25766
25767
|
--height: auto;
|
|
25767
|
-
--padding: 2px;
|
|
25768
25768
|
--border-color: var(--button-border-color);
|
|
25769
25769
|
--border-color-hover: var(--button-border-color-hover);
|
|
25770
25770
|
--background-color: var(--button-background-color);
|
|
@@ -25774,25 +25774,45 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25774
25774
|
--border-color-checked: var(--button-border-color);
|
|
25775
25775
|
--background-color-checked: var(--button-background-color);
|
|
25776
25776
|
|
|
25777
|
-
|
|
25778
|
-
|
|
25779
|
-
|
|
25780
|
-
|
|
25781
|
-
|
|
25782
|
-
|
|
25783
|
-
|
|
25784
|
-
|
|
25785
|
-
|
|
25786
|
-
|
|
25787
|
-
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
|
|
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);
|
|
25791
25812
|
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
|
|
25795
|
-
}
|
|
25813
|
+
.navi_icon,
|
|
25814
|
+
img {
|
|
25815
|
+
border-radius: inherit;
|
|
25796
25816
|
}
|
|
25797
25817
|
|
|
25798
25818
|
&[data-hover] {
|
|
@@ -25803,11 +25823,9 @@ installImportMetaCssBuild(import.meta);const css$o = /* css */`
|
|
|
25803
25823
|
--x-border-color: var(--button-border-color-checked);
|
|
25804
25824
|
--x-background-color: var(--button-background-color-checked);
|
|
25805
25825
|
|
|
25806
|
-
|
|
25807
|
-
|
|
25808
|
-
|
|
25809
|
-
inset 0 0 0 1px var(--button-border-color-checked);
|
|
25810
|
-
}
|
|
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);
|
|
25811
25829
|
}
|
|
25812
25830
|
&[data-disabled] {
|
|
25813
25831
|
--x-border-color: var(--button-border-color-disabled);
|
|
@@ -25934,33 +25952,70 @@ const InputRadioUI = props => {
|
|
|
25934
25952
|
}
|
|
25935
25953
|
onClick?.(e);
|
|
25936
25954
|
});
|
|
25937
|
-
const renderRadio = radioProps =>
|
|
25938
|
-
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
|
|
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
|
+
};
|
|
25957
25977
|
const renderRadioMemoized = useCallback(renderRadio, [innerName, checked, innerRequired]);
|
|
25958
25978
|
const boxRef = useRef();
|
|
25959
25979
|
useAccentColorAttributes(boxRef, remainingProps.accentColor, {
|
|
25960
25980
|
elementSelector: ".navi_radio_accent_probe"
|
|
25961
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
|
+
}
|
|
25962
26012
|
return jsxs(Box, {
|
|
25963
|
-
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,
|
|
25964
26019
|
...remainingProps,
|
|
25965
26020
|
autoFocus: undefined // See use_auto_focus.js
|
|
25966
26021
|
,
|
|
@@ -25988,35 +26043,8 @@ const InputRadioUI = props => {
|
|
|
25988
26043
|
inset: -1,
|
|
25989
26044
|
targetSelector: ".navi_radio_field",
|
|
25990
26045
|
color: "var(--loader-color)",
|
|
25991
|
-
borderRadius: "50%"
|
|
25992
|
-
}),
|
|
25993
|
-
className: "navi_radio_field",
|
|
25994
|
-
children: appearance === "radio" ? jsxs("svg", {
|
|
25995
|
-
viewBox: "0 0 12 12",
|
|
25996
|
-
"aria-hidden": "true",
|
|
25997
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
25998
|
-
children: [jsx("circle", {
|
|
25999
|
-
className: "navi_radio_border",
|
|
26000
|
-
cx: "6",
|
|
26001
|
-
cy: "6",
|
|
26002
|
-
r: "5.5",
|
|
26003
|
-
strokeWidth: "1"
|
|
26004
|
-
}), jsx("circle", {
|
|
26005
|
-
className: "navi_radio_dashed_border",
|
|
26006
|
-
cx: "6",
|
|
26007
|
-
cy: "6",
|
|
26008
|
-
r: "5.5",
|
|
26009
|
-
strokeWidth: "1",
|
|
26010
|
-
strokeDasharray: "2.16 2.16",
|
|
26011
|
-
strokeDashoffset: "0"
|
|
26012
|
-
}), jsx("circle", {
|
|
26013
|
-
className: "navi_radio_marker",
|
|
26014
|
-
cx: "6",
|
|
26015
|
-
cy: "6",
|
|
26016
|
-
r: "3.5"
|
|
26017
|
-
})]
|
|
26018
|
-
}) : icon
|
|
26019
|
-
})]
|
|
26046
|
+
borderRadius: appearance === "radio" ? "50%" : "inherit"
|
|
26047
|
+
}), visualVNode, renderRadioMemoized]
|
|
26020
26048
|
});
|
|
26021
26049
|
};
|
|
26022
26050
|
const RadioStyleCSSVars = {
|
|
@@ -26046,7 +26074,13 @@ const RadioStyleCSSVars = {
|
|
|
26046
26074
|
};
|
|
26047
26075
|
const RadioButtonStyleCSSVars = {
|
|
26048
26076
|
...RadioStyleCSSVars,
|
|
26049
|
-
"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",
|
|
26050
26084
|
"borderRadius": "--button-border-radius",
|
|
26051
26085
|
"borderWidth": "--button-border-width",
|
|
26052
26086
|
"borderColor": "--button-border-color",
|