@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.js
CHANGED
|
@@ -2198,6 +2198,14 @@ var FormCheckbox = ({
|
|
|
2198
2198
|
);
|
|
2199
2199
|
};
|
|
2200
2200
|
|
|
2201
|
+
// src/SelectControl/controlBorder.ts
|
|
2202
|
+
var CONTROL_BORDER_SCALE = "controlBorder";
|
|
2203
|
+
var MAIN_STEP2 = "500";
|
|
2204
|
+
function controlBorderOf(theme) {
|
|
2205
|
+
const scale = theme.palette[CONTROL_BORDER_SCALE];
|
|
2206
|
+
return scale?.[MAIN_STEP2] ?? theme.colors.border;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2201
2209
|
// src/SearchSelect/SelectSurface.ts
|
|
2202
2210
|
var SelectSurface = /* @__PURE__ */ ((SelectSurface2) => {
|
|
2203
2211
|
SelectSurface2["Sheet"] = "sheet";
|
|
@@ -2333,7 +2341,7 @@ function NativeSelect({
|
|
|
2333
2341
|
const textColor = hasMatch ? colors.text : colors.textSecondary;
|
|
2334
2342
|
const fit = native === "fit";
|
|
2335
2343
|
const metrics = useSelectLookMetrics();
|
|
2336
|
-
const selectStyle = metrics === void 0 ? nativeSelectStyle(fit,
|
|
2344
|
+
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 });
|
|
2337
2345
|
const handleChange = (event) => onChange(event.target.value);
|
|
2338
2346
|
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [controlStyles.anchor, fit ? fitStyles.anchor : void 0, metrics === void 0 ? void 0 : fitStyles.oneLine, style], children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2339
2347
|
"select",
|
|
@@ -2398,7 +2406,7 @@ function lookTriggerBox(m) {
|
|
|
2398
2406
|
function triggerInk(m, colors, isEmpty) {
|
|
2399
2407
|
const themeText = isEmpty ? colors.textSecondary : colors.text;
|
|
2400
2408
|
return {
|
|
2401
|
-
border: m?.borderColor ?? colors.
|
|
2409
|
+
border: m?.borderColor ?? colors.controlBorder,
|
|
2402
2410
|
background: m?.backgroundColor ?? colors.surfaceElevated,
|
|
2403
2411
|
text: m?.textColor ?? themeText,
|
|
2404
2412
|
chevron: m?.textColor ?? colors.textSecondary
|
|
@@ -2452,7 +2460,7 @@ function MenuSelectControl({
|
|
|
2452
2460
|
[onChange]
|
|
2453
2461
|
);
|
|
2454
2462
|
const metrics = useSelectLookMetrics();
|
|
2455
|
-
const ink = triggerInk(metrics, colors, value === "");
|
|
2463
|
+
const ink = triggerInk(metrics, { ...colors, controlBorder: controlBorderOf(theme) }, value === "");
|
|
2456
2464
|
const listbox = useSelectListbox({ options, isOpen, open, toggle: toggle2, select });
|
|
2457
2465
|
const isListbox = menuAnchor !== void 0;
|
|
2458
2466
|
const captureKeys = isListbox ? { onKeyDownCapture: listbox.onKeyDown } : {};
|