From e55684bf4fe55200dcfa093ee519c819501ef871 Mon Sep 17 00:00:00 2001 From: KoreX Labs Date: Sun, 13 Sep 2026 18:37:25 -0300 Subject: [PATCH] fix(web): compact installation parent checkbox options --- .../AuthoritativeInventoryConfigPage.tsx | 10 ++-- web-v2/src/styles.css | 52 +++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx b/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx index a52f071..108d75a 100644 --- a/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx +++ b/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx @@ -245,8 +245,8 @@ export function AuthoritativeInventoryConfigPage() { {canManage &&

+ Nuevo tipo

- {level === 'SUBINSTALLATION' &&
Puede estar dentro de
- {installationFamilies.filter((family) => family.isActive !== false).map((family) => )} + {level === 'SUBINSTALLATION' &&
Puede estar dentro de
+ {installationFamilies.filter((family) => family.isActive !== false).map((family) => )}
}
} @@ -265,10 +265,10 @@ export function AuthoritativeInventoryConfigPage() { {selectedFamily.level === 'SUBINSTALLATION' &&
Puede estar dentro de: -
- {installationFamilies.filter((family) => family.isActive !== false).map((family) =>
} diff --git a/web-v2/src/styles.css b/web-v2/src/styles.css index 6d4eb96..2fd064e 100644 --- a/web-v2/src/styles.css +++ b/web-v2/src/styles.css @@ -1296,3 +1296,55 @@ code { color: #5e6677; font-family: ui-monospace, monospace; font-size: 9px; } /* D5.6.4 · combobox buscable global */ .searchable-select{position:relative;width:100%;min-width:0}.searchable-select-native{position:absolute!important;inset:0;width:1px!important;height:1px!important;opacity:0;pointer-events:none}.searchable-select-trigger{display:flex;width:100%;min-height:41px;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border:1px solid #d7dce5;border-radius:8px;background:#fff;color:var(--ink);font-size:13px;text-align:left;cursor:pointer;outline:none}.searchable-select-trigger:hover{border-color:#bcc6d6}.searchable-select-trigger:focus-visible{border-color:#6b95ed;box-shadow:0 0 0 3px rgba(40,100,220,.1)}.searchable-select-trigger:disabled{cursor:not-allowed;color:#9199a8;background:#f1f3f6}.searchable-select-trigger>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.searchable-select-trigger .placeholder{color:#7e8796}.searchable-select-trigger .icon{flex:0 0 auto;transform:rotate(90deg)}.searchable-select-popup{position:fixed;z-index:10000;max-height:315px;padding:6px;border:1px solid #ccd4e0;border-radius:10px;background:#fff;box-shadow:0 14px 40px rgba(18,31,53,.18)}.searchable-select-search{display:flex;align-items:center;gap:7px;padding:5px 7px 7px;border-bottom:1px solid var(--line)}.searchable-select-search input{width:100%;min-width:0;height:34px;padding:6px 8px;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}.searchable-select-options{max-height:245px;overflow:auto;padding-top:4px}.searchable-select-options>button{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;padding:8px 9px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:12px;text-align:left;cursor:pointer}.searchable-select-options>button:hover,.searchable-select-options>button:focus-visible{background:#f2f5fa;outline:none}.searchable-select-options>button.selected{background:#eef4ff;color:#174ea6;font-weight:750}.searchable-select-options>button:disabled{cursor:not-allowed;color:#a0a7b3;background:transparent}.searchable-select-empty{padding:14px 10px;color:var(--muted);font-size:11px;text-align:center}.select-field>.searchable-select{width:100%}.survey-inline-select.searchable-select{min-width:130px;margin-top:6px;padding:0;border:0;background:transparent}.survey-inline-select.wide.searchable-select{min-width:175px;margin-top:0}.survey-inline-select .searchable-select-trigger{min-height:33px;padding:6px 8px;border-radius:7px;font-size:9px}.operational-context-selectors .searchable-select-trigger{min-height:36px;padding:7px 9px;font-size:10px}.parent-picker .searchable-select-trigger{border-radius:5px 5px 8px 8px} .inspection-quick-create{max-width:980px;margin-left:auto;margin-right:auto}.inspection-quick-create .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.inspection-generated-code{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--soft)}.inspection-generated-code small{color:var(--muted);font-weight:700}.inspection-generated-code strong{font-size:15px;letter-spacing:.02em}@media(max-width:760px){.inspection-quick-create .form-grid{grid-template-columns:1fr}} + +/* Parent choices need fixed-size controls even inside a generic form field. */ +.inventory-parent-options { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); + gap: 8px; + margin: 10px 0 14px; +} +.inventory-parent-option { + display: flex; + align-items: center; + justify-content: flex-start; + gap: 10px; + min-width: 0; + min-height: 42px; + padding: 10px 12px; + border: 1px solid var(--line); + border-radius: 8px; + background: #fff; + color: var(--ink); + font-size: 12px; + font-weight: 600; + line-height: 1.4; + cursor: pointer; +} +.inventory-parent-option input[type="checkbox"] { + flex: 0 0 17px; + width: 17px; + height: 17px; + min-height: 17px; + padding: 0; + margin: 0; + accent-color: var(--blue); + cursor: inherit; +} +.inventory-parent-option > span { + display: block; + min-width: 0; + overflow-wrap: anywhere; +} +.inventory-parent-option:has(input:checked) { + border-color: #9db9ed; + background: #eef4ff; +} +.inventory-parent-option:has(input:focus-visible) { + outline: 2px solid var(--blue); + outline-offset: 2px; +} +.inventory-parent-option:has(input:disabled) { + cursor: default; + opacity: .65; +}