Skip to content

Commit c0c5a49

Browse files
agviegasclaude
andcommitted
feat(ui): expose --bim-label--us, --bim-input--maxw, drop slider icon dup
* Label: user-select reads from a new --bim-label--us token (defaults to none, preserving prior behavior). Lets a host scope (e.g. a properties table) opt its label cells into selectable text. * Input: the :host(:not([vertical])[label]) .input { max-width: fit-content; } rule now reads from --bim-input--maxw. Defaults unchanged; overriding to none lets a wrapping component (e.g. a full-width slider in a panel) stretch the input area instead of shrinking it to its current value's text width. * NumberInput: in slider mode, the inner pref-label only renders when this.pref is set. Previously it also rendered when only icon was set, which duplicated the icon (the outer bim-input wrapper already shows it next to the label). Net effect: passing only icon now shows it once, in the label area. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b539f8a commit c0c5a49

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

packages/core/src/components/Input/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class Input extends LitElement implements HasValue, HasName {
5555
}
5656
5757
:host(:not([vertical])[label]) .input {
58-
max-width: fit-content;
58+
max-width: var(--bim-input--maxw, fit-content);
5959
}
6060
`;
6161

packages/core/src/components/Label/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Label extends LitElement {
2020
display: block;
2121
white-space: nowrap;
2222
transition: all 0.15s;
23-
user-select: none;
23+
user-select: var(--bim-label--us, none);
2424
text-overflow: ellipsis;
2525
overflow: auto;
2626
}

packages/core/src/components/NumberInput/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,8 @@ export class NumberInput extends LitElement implements HasValue, HasName {
445445
</style>
446446
<div class="slider" @mousedown=${this.onSliderMouseDown}>
447447
<div class="slider-indicator"></div>
448-
${this.pref || this.icon
449-
? html`<bim-label
450-
style="z-index: 1; margin-right: 0.125rem"
451-
.icon=${this.icon}
448+
${this.pref
449+
? html`<bim-label style="z-index: 1; margin-right: 0.125rem"
452450
>${`${this.pref}: `}</bim-label
453451
>`
454452
: null}

0 commit comments

Comments
 (0)