@kumori/aurora-wui-components 0.0.180 → 0.0.182

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.
@@ -1,7 +1,7 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  import { CarouselItem } from './axebow-carousel-input.js';
3
3
  import { AddDialogLabels } from './axebow-select-input.js';
4
- export type ControlType = 'input' | 'select' | 'carousel' | 'numeric' | 'integer' | 'checkbox' | 'providers' | 'small-input';
4
+ export type ControlType = 'input' | 'select' | 'carousel' | 'numeric' | 'integer' | 'checkbox' | 'providers';
5
5
  export interface Option {
6
6
  value: string;
7
7
  label: string | TemplateResult;
@@ -43,7 +43,6 @@ export declare class AxebowInput extends LitElement {
43
43
  }) => void;
44
44
  addDialogLabels: AddDialogLabels;
45
45
  compact: boolean;
46
- integerOnly: boolean;
47
46
  fixedWidth?: string;
48
47
  fixedHeight?: string;
49
48
  showStepper: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"axebow-input.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAEvE,OAAO,yDAAyD,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAA6B,MAAM,0BAA0B,CAAC;AACtF,OAAO,wBAAwB,CAAC;AAChC,OAAO,2BAA2B,CAAC;AACnC,OAAO,0BAA0B,CAAC;AAClC,OAAO,4BAA4B,CAAC;AACpC,OAAO,4BAA4B,CAAC;AACpC,OAAO,6BAA6B,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,CAAC;AAC7H,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd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O,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACrF,eAAe,EAAE,eAAe,CAA6B;IAChE,OAAO,UAAS;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,UAAQ;IACpB,UAAU,SAAK;IAE3C,MAAM;CAiJP"}
@@ -11,9 +11,12 @@ export declare class AxebowNumericInput extends AxebowInputBase {
11
11
  * existing caller keeps the field's previous default sizing unchanged. */
12
12
  fixedWidth?: string;
13
13
  fixedHeight?: string;
14
- /** Adds a 22x38 +/- stepper flush against the field's right border,
15
- * wired to the same min/max/integerOnly rules as typed input. Off by
16
- * default - opt in per caller. */
14
+ /** 22x38 +/- stepper flush against the field's right border, wired to
15
+ * the same min/max/integerOnly rules as typed input. This is the
16
+ * app-wide standard look for every numeric/integer field (the native
17
+ * browser spinner is always suppressed in favor of it) - on by default,
18
+ * size varies per caller via fixedWidth/fixedHeight. Only turn it off
19
+ * for a specific instance that truly needs the bare field. */
17
20
  showStepper: boolean;
18
21
  stepAmount: number;
19
22
  updated(changed: PropertyValues): void;
@@ -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,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"}
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,4BAiFX;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;;;;;mEAK+D;IAClC,WAAW,UAAQ;IACpB,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
@@ -1520,7 +1520,7 @@ var AxebowNumericInput = class AxebowNumericInput extends AxebowInputBase {
1520
1520
  this.max = Number.MAX_SAFE_INTEGER;
1521
1521
  this.min = 0;
1522
1522
  this.integerOnly = false;
1523
- this.showStepper = false;
1523
+ this.showStepper = true;
1524
1524
  this.stepAmount = 1;
1525
1525
  }
1526
1526
  static {
@@ -1529,6 +1529,18 @@ var AxebowNumericInput = class AxebowNumericInput extends AxebowInputBase {
1529
1529
  display: block;
1530
1530
  width: 100%;
1531
1531
  }
1532
+ /* Always off, unconditionally - the +/- stepper is the app-wide
1533
+ replacement for the browser's native number spinner, so the native
1534
+ one should never show regardless of whether the stepper itself is
1535
+ opted out for a given instance. */
1536
+ sl-input::part(input)::-webkit-outer-spin-button,
1537
+ sl-input::part(input)::-webkit-inner-spin-button {
1538
+ -webkit-appearance: none;
1539
+ margin: 0;
1540
+ }
1541
+ sl-input::part(input) {
1542
+ -moz-appearance: textfield;
1543
+ }
1532
1544
  /* All three guarded by their own host class - absent unless the
1533
1545
  matching property is set - so none ever touch sl-input's own
1534
1546
  default sizing/padding for every existing caller that doesn't opt
@@ -2048,8 +2060,7 @@ var AxebowInput = class AxebowInput extends LitElement {
2048
2060
  this.clearable = true;
2049
2061
  this.addDialogLabels = DEFAULT_ADD_DIALOG_LABELS;
2050
2062
  this.compact = false;
2051
- this.integerOnly = false;
2052
- this.showStepper = false;
2063
+ this.showStepper = true;
2053
2064
  this.stepAmount = 1;
2054
2065
  }
2055
2066
  static {
@@ -2057,10 +2068,6 @@ var AxebowInput = class AxebowInput extends LitElement {
2057
2068
  unsafeCSS(tailwind_default),
2058
2069
  axebowTheme,
2059
2070
  css`
2060
- sl-input,
2061
- sl-select {
2062
- width: 100%;
2063
- }
2064
2071
  axebow-numeric-input {
2065
2072
  display: block;
2066
2073
  width: 100%;
@@ -2173,31 +2180,6 @@ var AxebowInput = class AxebowInput extends LitElement {
2173
2180
  .carouselItems=${this.carouselItems}
2174
2181
  .carouselItemRenderer=${this.carouselItemRenderer}
2175
2182
  ></axebow-carousel-input>
2176
- `;
2177
- case "small-input": return html`
2178
- <sl-input
2179
- type="number"
2180
- size="small"
2181
- min=${this.min}
2182
- max=${this.max}
2183
- step=${this.integerOnly ? "1" : "any"}
2184
- .value=${this.value}
2185
- ?disabled=${this.disabled}
2186
- style="${this.hasError ? "--sl-input-border-color: var(--axebow-error, #e53e3e); --sl-input-border-color-focus: var(--axebow-error, #e53e3e); --sl-input-border-color-hover: var(--axebow-error, #e53e3e);" : ""}"
2187
- @sl-input=${(e) => {
2188
- if (this.disabled) return;
2189
- if (this.integerOnly) {
2190
- const target = e.target;
2191
- let truncated = Math.trunc(Number(target.value));
2192
- if (truncated > this.max) truncated = this.max;
2193
- target.value = truncated.toString();
2194
- }
2195
- if (this.callback) this.callback(e);
2196
- }}
2197
- @keydown=${(e) => {
2198
- if (this.integerOnly && (e.key === "." || e.key === "," || e.key === "e" || e.key === "E")) e.preventDefault();
2199
- }}
2200
- ></sl-input>
2201
2183
  `;
2202
2184
  case "providers": return html`
2203
2185
  <axebow-providers-input
@@ -2258,7 +2240,6 @@ __decorate([property({ type: Boolean })], AxebowInput.prototype, "clearable", vo
2258
2240
  __decorate([property({ attribute: false })], AxebowInput.prototype, "onAddNew", void 0);
2259
2241
  __decorate([property({ attribute: false })], AxebowInput.prototype, "addDialogLabels", void 0);
2260
2242
  __decorate([property({ type: Boolean })], AxebowInput.prototype, "compact", void 0);
2261
- __decorate([property({ type: Boolean })], AxebowInput.prototype, "integerOnly", void 0);
2262
2243
  __decorate([property({ type: String })], AxebowInput.prototype, "fixedWidth", void 0);
2263
2244
  __decorate([property({ type: String })], AxebowInput.prototype, "fixedHeight", void 0);
2264
2245
  __decorate([property({ type: Boolean })], AxebowInput.prototype, "showStepper", void 0);