@kumori/aurora-wui-components 0.0.228 → 0.0.229
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/components/axebow-input/axebow-input-base.d.ts +0 -17
- package/dist/components/axebow-input/axebow-input-base.d.ts.map +1 -1
- package/dist/components/axebow-input/axebow-input.d.ts +1 -0
- package/dist/components/axebow-input/axebow-input.d.ts.map +1 -1
- package/dist/components/axebow-input/axebow-select-input.d.ts +3 -7
- package/dist/components/axebow-input/axebow-select-input.d.ts.map +1 -1
- package/dist/index.js +19 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* Template-method base for every axebow-*-input control: owns the shared
|
|
4
|
-
* label/description/error wrapper markup and the disabled-aware value
|
|
5
|
-
* change plumbing. Concrete inputs only implement their own field markup
|
|
6
|
-
* via render().
|
|
7
|
-
*/
|
|
8
2
|
export declare abstract class AxebowInputBase extends LitElement {
|
|
9
3
|
static baseStyles: import('lit').CSSResult[];
|
|
10
4
|
value: string;
|
|
@@ -19,17 +13,6 @@ export declare abstract class AxebowInputBase extends LitElement {
|
|
|
19
13
|
callback?: (e: Event) => void;
|
|
20
14
|
compact: boolean;
|
|
21
15
|
protected handleChange(e: Event): void;
|
|
22
|
-
/**
|
|
23
|
-
* Every inter-element gap here is a single explicit margin (no
|
|
24
|
-
* contributing flex `gap` on the container) so each one is an
|
|
25
|
-
* independently overridable CSS custom property. Defaults reproduce
|
|
26
|
-
* the historical spacing (16px label->description, 12px
|
|
27
|
-
* description->content/content->error, 8px label->content when there's
|
|
28
|
-
* no description) - concrete inputs that need different spacing (e.g.
|
|
29
|
-
* the carousel's tighter label/description rhythm) just set
|
|
30
|
-
* `--axebow-input-label-gap` / `--axebow-input-description-gap` on
|
|
31
|
-
* their own :host.
|
|
32
|
-
*/
|
|
33
16
|
protected renderWrapper(content: TemplateResult): TemplateResult;
|
|
34
17
|
protected renderFixedField(content: TemplateResult): TemplateResult;
|
|
35
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axebow-input-base.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-input-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvE,OAAO,+BAA+B,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"axebow-input-base.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-input-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAIvE,OAAO,+BAA+B,CAAC;AAEvC,8BAAsB,eAAgB,SAAQ,UAAU;IACtD,MAAM,CAAC,UAAU,4BAyDf;IAE0B,KAAK,SAAM;IACX,WAAW,SAAM;IACjB,KAAK,SAAM;IACX,WAAW,SAAM;IAChB,QAAQ,UAAS;IACjB,QAAQ,UAAS;IACjB,QAAQ,UAAS;IAClB,YAAY,SAAM;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,UAAS;IAE7C,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,KAAK;IAO/B,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc;IA2ChE,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,cAAc;CA8BpE"}
|
|
@@ -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,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Y,EAAE,CAAM;IACf,QAAQ,UAAS;IAChC,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;IAC3D,YAAY,SAAM;IACjB,QAAQ,UAAS;IAClB,GAAG,SAA2B;IAC9B,GAAG,SAAK;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,UAAS;IACrB,WAAW,SAAkB;IAC7B,gBAAgB,SAAmB;IAClC,mBAAmB,UAAQ;IAC3B,SAAS,UAAQ;IACd,QAAQ,CAAC,EAAE,CAAC,OAAO,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;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,UAAQ;IACpB,UAAU,SAAK;IAE3C,MAAM;CAkJP"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { AxebowInputBase } from './axebow-input-base.js';
|
|
3
3
|
export interface SelectOption {
|
|
4
4
|
value: string;
|
|
5
5
|
label: string | TemplateResult;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* Copy for the built-in "add new option" dialog. Grouped into one object
|
|
9
|
-
* (rather than flat props) since it's a single cohesive sub-feature only
|
|
10
|
-
* relevant when allowAddNew is set; the host app supplies its own
|
|
11
|
-
* translated strings, this component holds no i18n dependency of its own.
|
|
12
|
-
*/
|
|
13
7
|
export interface AddDialogLabels {
|
|
14
8
|
title: string;
|
|
15
9
|
intro: string;
|
|
@@ -23,6 +17,7 @@ export interface AddDialogLabels {
|
|
|
23
17
|
export declare const DEFAULT_ADD_DIALOG_LABELS: AddDialogLabels;
|
|
24
18
|
export declare class AxebowSelectInput extends AxebowInputBase {
|
|
25
19
|
static styles: import('lit').CSSResult[];
|
|
20
|
+
minWidth?: string;
|
|
26
21
|
options: SelectOption[];
|
|
27
22
|
allowAddNew: boolean;
|
|
28
23
|
addNewLabel: string;
|
|
@@ -38,6 +33,7 @@ export declare class AxebowSelectInput extends AxebowInputBase {
|
|
|
38
33
|
private showAddDialog;
|
|
39
34
|
private newItemName;
|
|
40
35
|
private newItemDescription;
|
|
36
|
+
updated(changed: PropertyValues): void;
|
|
41
37
|
private handleSelectChange;
|
|
42
38
|
private createSlug;
|
|
43
39
|
private saveNewItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axebow-select-input.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-select-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"axebow-select-input.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-input/axebow-select-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,2DAA2D,CAAC;AACnE,OAAO,2DAA2D,CAAC;AACnE,OAAO,2DAA2D,CAAC;AACnE,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,yBAAyB,EAAE,eASvC,CAAC;AAEF,qBACa,iBAAkB,SAAQ,eAAe;IACpD,MAAM,CAAC,MAAM,4BAoBX;IAE0B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,EAAE,YAAY,EAAE,CAAM;IAC3B,WAAW,UAAS;IACrB,WAAW,SAAkB;IAC7B,gBAAgB,SAAmB;IAClC,mBAAmB,UAAQ;IAC3B,SAAS,UAAQ;IACd,QAAQ,CAAC,EAAE,CAAC,OAAO,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;IAEpF,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,kBAAkB,CAAM;IAEzC,OAAO,CAAC,OAAO,EAAE,cAAc;IAa/B,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,WAAW;IAuBnB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,mBAAmB;IAO3B,MAAM;CA8DP"}
|
package/dist/index.js
CHANGED
|
@@ -1332,12 +1332,6 @@ __decorate([property({ type: String })], AxebowSearch.prototype, "width", void 0
|
|
|
1332
1332
|
AxebowSearch = __decorate([customElement("axebow-search")], AxebowSearch);
|
|
1333
1333
|
//#endregion
|
|
1334
1334
|
//#region src/components/axebow-input/axebow-input-base.ts
|
|
1335
|
-
/**
|
|
1336
|
-
* Template-method base for every axebow-*-input control: owns the shared
|
|
1337
|
-
* label/description/error wrapper markup and the disabled-aware value
|
|
1338
|
-
* change plumbing. Concrete inputs only implement their own field markup
|
|
1339
|
-
* via render().
|
|
1340
|
-
*/
|
|
1341
1335
|
var AxebowInputBase = class extends LitElement {
|
|
1342
1336
|
constructor(..._args) {
|
|
1343
1337
|
super(..._args);
|
|
@@ -1417,17 +1411,6 @@ var AxebowInputBase = class extends LitElement {
|
|
|
1417
1411
|
this.value = target.value;
|
|
1418
1412
|
this.callback?.(e);
|
|
1419
1413
|
}
|
|
1420
|
-
/**
|
|
1421
|
-
* Every inter-element gap here is a single explicit margin (no
|
|
1422
|
-
* contributing flex `gap` on the container) so each one is an
|
|
1423
|
-
* independently overridable CSS custom property. Defaults reproduce
|
|
1424
|
-
* the historical spacing (16px label->description, 12px
|
|
1425
|
-
* description->content/content->error, 8px label->content when there's
|
|
1426
|
-
* no description) - concrete inputs that need different spacing (e.g.
|
|
1427
|
-
* the carousel's tighter label/description rhythm) just set
|
|
1428
|
-
* `--axebow-input-label-gap` / `--axebow-input-description-gap` on
|
|
1429
|
-
* their own :host.
|
|
1430
|
-
*/
|
|
1431
1414
|
renderWrapper(content) {
|
|
1432
1415
|
return html`
|
|
1433
1416
|
<div class="flex flex-col justify-end w-full relative">
|
|
@@ -1466,12 +1449,12 @@ var AxebowInputBase = class extends LitElement {
|
|
|
1466
1449
|
return html`
|
|
1467
1450
|
<div class="fixed-field">
|
|
1468
1451
|
${this.label ? html`<div class="flex items-baseline gap-2 field-label">
|
|
1469
|
-
${this.required ? html`<p class="text-(--axebow-error) text-base leading-
|
|
1470
|
-
<h4 class="font-semibold text-base leading-
|
|
1452
|
+
${this.required ? html`<p class="text-(--axebow-error) text-base leading-4.25 m-0">*</p>` : ""}
|
|
1453
|
+
<h4 class="font-semibold text-base leading-4.25 m-0 overflow-hidden text-ellipsis">
|
|
1471
1454
|
${this.label}
|
|
1472
1455
|
</h4>
|
|
1473
1456
|
</div>` : ""}
|
|
1474
|
-
${this.description ? html`<p class="field-description text-base leading-
|
|
1457
|
+
${this.description ? html`<p class="field-description text-base leading-4.25 m-0" title="${this.description}">
|
|
1475
1458
|
${this.description}
|
|
1476
1459
|
</p>` : ""}
|
|
1477
1460
|
${content}
|
|
@@ -1922,8 +1905,21 @@ var AxebowSelectInput = class AxebowSelectInput extends AxebowInputBase {
|
|
|
1922
1905
|
.fixed-field sl-select::part(display-input) {
|
|
1923
1906
|
font-size: 0.875rem;
|
|
1924
1907
|
}
|
|
1908
|
+
:host(.axebow-fixed-min-width) .fixed-field {
|
|
1909
|
+
min-width: var(--axebow-input-min-width) !important;
|
|
1910
|
+
}
|
|
1925
1911
|
`];
|
|
1926
1912
|
}
|
|
1913
|
+
updated(changed) {
|
|
1914
|
+
super.updated(changed);
|
|
1915
|
+
if (changed.has("minWidth")) if (this.minWidth) {
|
|
1916
|
+
this.style.setProperty("--axebow-input-min-width", this.minWidth);
|
|
1917
|
+
this.classList.add("axebow-fixed-min-width");
|
|
1918
|
+
} else {
|
|
1919
|
+
this.style.removeProperty("--axebow-input-min-width");
|
|
1920
|
+
this.classList.remove("axebow-fixed-min-width");
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1927
1923
|
handleSelectChange(e) {
|
|
1928
1924
|
if (this.disabled) return;
|
|
1929
1925
|
const target = e.target;
|
|
@@ -2039,6 +2035,7 @@ var AxebowSelectInput = class AxebowSelectInput extends AxebowInputBase {
|
|
|
2039
2035
|
return this.compact ? this.renderWrapper(content) : this.renderFixedField(content);
|
|
2040
2036
|
}
|
|
2041
2037
|
};
|
|
2038
|
+
__decorate([property({ type: String })], AxebowSelectInput.prototype, "minWidth", void 0);
|
|
2042
2039
|
__decorate([property({ type: Array })], AxebowSelectInput.prototype, "options", void 0);
|
|
2043
2040
|
__decorate([property({ type: Boolean })], AxebowSelectInput.prototype, "allowAddNew", void 0);
|
|
2044
2041
|
__decorate([property({ type: String })], AxebowSelectInput.prototype, "addNewLabel", void 0);
|
|
@@ -2168,6 +2165,7 @@ var AxebowInput = class AxebowInput extends LitElement {
|
|
|
2168
2165
|
.clearable=${this.clearable}
|
|
2169
2166
|
.onAddNew=${this.onAddNew}
|
|
2170
2167
|
.addDialogLabels=${this.addDialogLabels}
|
|
2168
|
+
.minWidth=${this.minWidth}
|
|
2171
2169
|
></axebow-select-input>
|
|
2172
2170
|
`;
|
|
2173
2171
|
case "checkbox": return html`
|
|
@@ -2258,6 +2256,7 @@ __decorate([property({ attribute: false })], AxebowInput.prototype, "addDialogLa
|
|
|
2258
2256
|
__decorate([property({ type: Boolean })], AxebowInput.prototype, "compact", void 0);
|
|
2259
2257
|
__decorate([property({ type: String })], AxebowInput.prototype, "fixedWidth", void 0);
|
|
2260
2258
|
__decorate([property({ type: String })], AxebowInput.prototype, "fixedHeight", void 0);
|
|
2259
|
+
__decorate([property({ type: String })], AxebowInput.prototype, "minWidth", void 0);
|
|
2261
2260
|
__decorate([property({ type: Boolean })], AxebowInput.prototype, "showStepper", void 0);
|
|
2262
2261
|
__decorate([property({ type: Number })], AxebowInput.prototype, "stepAmount", void 0);
|
|
2263
2262
|
AxebowInput = __decorate([customElement("axebow-input")], AxebowInput);
|