@kumori/aurora-wui-components 0.0.178 → 0.0.180

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.
@@ -5,9 +5,10 @@ export declare class AxebowNumericInput extends AxebowInputBase {
5
5
  max: number;
6
6
  min: number;
7
7
  integerOnly: boolean;
8
- /** Opt-in exact field width/height (e.g. '6.1875rem' / '2.5rem'). Left
9
- * unset, every existing caller keeps the field's previous default sizing
10
- * unchanged. */
8
+ /** Opt-in exact size for the field itself - the sl-input box, not the
9
+ * label/description column above it (e.g. fixedWidth '6.1875rem' for a
10
+ * 99px-wide field, fixedHeight '2.5rem' for 40px). Left unset, every
11
+ * existing caller keeps the field's previous default sizing unchanged. */
11
12
  fixedWidth?: string;
12
13
  fixedHeight?: string;
13
14
  /** Adds a 22x38 +/- stepper flush against the field's right border,
@@ -1 +1 @@
1
- {"version":3,"file":"axebow-numeric-input.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-numeric-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,yDAAyD,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBACa,kBAAmB,SAAQ,eAAe;IACrD,MAAM,CAAC,MAAM,4BA+CX;IAE0B,GAAG,SAA2B;IAC9B,GAAG,SAAK;IACP,WAAW,UAAS;IAEjD;;qBAEiB;IACW,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAEjD;;uCAEmC;IACN,WAAW,UAAS;IACrB,UAAU,SAAK;IAE3C,OAAO,CAAC,OAAO,EAAE,cAAc;IAmB/B,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK;IAgB/B,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,aAAa;IAMxC,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,cAAc;IA2BtB,MAAM;CAoBP"}
1
+ {"version":3,"file":"axebow-numeric-input.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-numeric-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,yDAAyD,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBACa,kBAAmB,SAAQ,eAAe;IACrD,MAAM,CAAC,MAAM,4BAqEX;IAE0B,GAAG,SAA2B;IAC9B,GAAG,SAAK;IACP,WAAW,UAAS;IAEjD;;;+EAG2E;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IAEjD;;uCAEmC;IACN,WAAW,UAAS;IACrB,UAAU,SAAK;IAE3C,OAAO,CAAC,OAAO,EAAE,cAAc;IAyB/B,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK;IAgB/B,SAAS,CAAC,aAAa,CAAC,CAAC,EAAE,aAAa;IAMxC,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,cAAc;IA2BtB,MAAM;CAoBP"}
package/dist/index.js CHANGED
@@ -1529,11 +1529,24 @@ var AxebowNumericInput = class AxebowNumericInput extends AxebowInputBase {
1529
1529
  display: block;
1530
1530
  width: 100%;
1531
1531
  }
1532
- /* Both guarded by their own host class - absent unless the matching
1533
- property is set - so neither ever touches sl-input's own default
1534
- sizing/padding for every existing caller that doesn't opt in. */
1532
+ /* All three guarded by their own host class - absent unless the
1533
+ matching property is set - so none ever touch sl-input's own
1534
+ default sizing/padding for every existing caller that doesn't opt
1535
+ in. fixedWidth only constrains the field itself (not the host, so
1536
+ the label above keeps its full width and doesn't wrap).
1537
+ !important is needed on the sizing declarations - Shoelace sets its
1538
+ own height internally off --sl-input-height-medium (not just the
1539
+ exposed 'base' part), so both are overridden together to reliably
1540
+ win regardless of which one actually drives the rendered size. */
1541
+ :host(.axebow-fixed-width) sl-input {
1542
+ width: var(--axebow-input-width) !important;
1543
+ }
1544
+ :host(.axebow-fixed-height) sl-input {
1545
+ --sl-input-height-medium: var(--axebow-input-height);
1546
+ }
1535
1547
  :host(.axebow-fixed-height) sl-input::part(base) {
1536
- height: var(--axebow-input-height);
1548
+ height: var(--axebow-input-height) !important;
1549
+ box-sizing: border-box;
1537
1550
  }
1538
1551
  :host(.axebow-has-stepper) sl-input::part(base) {
1539
1552
  padding-right: 0;
@@ -1544,26 +1557,35 @@ var AxebowNumericInput = class AxebowNumericInput extends AxebowInputBase {
1544
1557
  padding: 0;
1545
1558
  }
1546
1559
 
1560
+ /* Only a left border (separating the stepper from the typed number)
1561
+ and a divider between the two buttons - the top/right/bottom edges
1562
+ coincide with sl-input's own border, so drawing our own there
1563
+ would just double it up. */
1547
1564
  .axebow-numeric-stepper {
1548
1565
  display: flex;
1549
1566
  flex-direction: column;
1550
- width: 1.375rem;
1551
- height: 2.375rem;
1567
+ width: 1.375rem !important;
1568
+ height: 2.375rem !important;
1569
+ border-left: 1px solid var(--axebow-gray);
1552
1570
  border-radius: 0 var(--sl-input-border-radius-medium, 0.25rem) var(--sl-input-border-radius-medium, 0.25rem) 0;
1553
1571
  overflow: hidden;
1554
1572
  }
1555
1573
  .axebow-numeric-stepper-btn {
1556
- flex: 1;
1574
+ flex: 1 1 0 !important;
1557
1575
  display: flex;
1558
1576
  align-items: center;
1559
1577
  justify-content: center;
1578
+ min-height: 0;
1560
1579
  min-width: 0;
1561
- border: 1px solid var(--axebow-gray);
1580
+ border: none;
1562
1581
  background: transparent;
1563
1582
  padding: 0;
1564
1583
  margin: 0;
1565
1584
  cursor: pointer;
1566
1585
  }
1586
+ .axebow-numeric-stepper-btn:first-child {
1587
+ border-bottom: 1px solid var(--axebow-gray);
1588
+ }
1567
1589
  .axebow-numeric-stepper-btn:disabled {
1568
1590
  cursor: not-allowed;
1569
1591
  opacity: 0.5;
@@ -1572,7 +1594,13 @@ var AxebowNumericInput = class AxebowNumericInput extends AxebowInputBase {
1572
1594
  }
1573
1595
  updated(changed) {
1574
1596
  super.updated(changed);
1575
- if (changed.has("fixedWidth")) this.style.width = this.fixedWidth || "";
1597
+ if (changed.has("fixedWidth")) if (this.fixedWidth) {
1598
+ this.style.setProperty("--axebow-input-width", this.fixedWidth);
1599
+ this.classList.add("axebow-fixed-width");
1600
+ } else {
1601
+ this.style.removeProperty("--axebow-input-width");
1602
+ this.classList.remove("axebow-fixed-width");
1603
+ }
1576
1604
  if (changed.has("fixedHeight")) if (this.fixedHeight) {
1577
1605
  this.style.setProperty("--axebow-input-height", this.fixedHeight);
1578
1606
  this.classList.add("axebow-fixed-height");