@dloizides/ui-forms 1.57.0 → 1.58.0
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/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2191,6 +2191,14 @@ var FormCheckbox = ({
|
|
|
2191
2191
|
);
|
|
2192
2192
|
};
|
|
2193
2193
|
|
|
2194
|
+
// src/SelectControl/controlBorder.ts
|
|
2195
|
+
var CONTROL_BORDER_SCALE = "controlBorder";
|
|
2196
|
+
var MAIN_STEP2 = "500";
|
|
2197
|
+
function controlBorderOf(theme) {
|
|
2198
|
+
const scale = theme.palette[CONTROL_BORDER_SCALE];
|
|
2199
|
+
return scale?.[MAIN_STEP2] ?? theme.colors.border;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2194
2202
|
// src/SearchSelect/SelectSurface.ts
|
|
2195
2203
|
var SelectSurface = /* @__PURE__ */ ((SelectSurface2) => {
|
|
2196
2204
|
SelectSurface2["Sheet"] = "sheet";
|
|
@@ -2326,7 +2334,7 @@ function NativeSelect({
|
|
|
2326
2334
|
const textColor = hasMatch ? colors.text : colors.textSecondary;
|
|
2327
2335
|
const fit = native === "fit";
|
|
2328
2336
|
const metrics = useSelectLookMetrics();
|
|
2329
|
-
const selectStyle = metrics === void 0 ? nativeSelectStyle(fit,
|
|
2337
|
+
const selectStyle = metrics === void 0 ? nativeSelectStyle(fit, controlBorderOf(theme), colors.surfaceElevated, textColor) : lookSelectStyle(fit, metrics, { border: controlBorderOf(theme), background: colors.surfaceElevated, text: textColor, chevron: colors.textSecondary });
|
|
2330
2338
|
const handleChange = (event) => onChange(event.target.value);
|
|
2331
2339
|
return /* @__PURE__ */ jsx(View, { style: [controlStyles.anchor, fit ? fitStyles.anchor : void 0, metrics === void 0 ? void 0 : fitStyles.oneLine, style], children: /* @__PURE__ */ jsxs(
|
|
2332
2340
|
"select",
|
|
@@ -2391,7 +2399,7 @@ function lookTriggerBox(m) {
|
|
|
2391
2399
|
function triggerInk(m, colors, isEmpty) {
|
|
2392
2400
|
const themeText = isEmpty ? colors.textSecondary : colors.text;
|
|
2393
2401
|
return {
|
|
2394
|
-
border: m?.borderColor ?? colors.
|
|
2402
|
+
border: m?.borderColor ?? colors.controlBorder,
|
|
2395
2403
|
background: m?.backgroundColor ?? colors.surfaceElevated,
|
|
2396
2404
|
text: m?.textColor ?? themeText,
|
|
2397
2405
|
chevron: m?.textColor ?? colors.textSecondary
|
|
@@ -2445,7 +2453,7 @@ function MenuSelectControl({
|
|
|
2445
2453
|
[onChange]
|
|
2446
2454
|
);
|
|
2447
2455
|
const metrics = useSelectLookMetrics();
|
|
2448
|
-
const ink = triggerInk(metrics, colors, value === "");
|
|
2456
|
+
const ink = triggerInk(metrics, { ...colors, controlBorder: controlBorderOf(theme) }, value === "");
|
|
2449
2457
|
const listbox = useSelectListbox({ options, isOpen, open, toggle: toggle2, select });
|
|
2450
2458
|
const isListbox = menuAnchor !== void 0;
|
|
2451
2459
|
const captureKeys = isListbox ? { onKeyDownCapture: listbox.onKeyDown } : {};
|