@odx/foundation 1.0.0-beta.259 → 1.0.0-beta.260

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/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 1.0.0-beta.260
2
+
3
+ ### Major Changes
4
+
5
+ - Remove generic from `FormAssociated` mixin due to issues with type inference in certain scenarios
6
+ - Remove `--_min-width` custom property from control elements, use `min-width` property instead
7
+
8
+ ### Minor Changes
9
+
10
+ - New `odx-input-number` component
11
+ - Improve `odx-input` component accessibility and flexibility
12
+ - Add input `loading` state
13
+ - Add auto sizing behavior for input controls
14
+ - Remove CSS parts from `odx-loading-overlay` component
15
+
16
+ ### Bug Fixes
17
+
18
+ - Fix positioning of clear action in `odx-input` and `odx-select` components
19
+ - Move `[loading]` styles into button control to prevent leakage to other components
20
+
21
+
1
22
  ## 1.0.0-beta.259
2
23
 
3
24
  ### Minor Changes
@@ -22,6 +22,7 @@ declare const ControlElement_base: import('../../utils/main.js').Constructor<Can
22
22
  export declare class ControlElement extends ControlElement_base {
23
23
  #private;
24
24
  static readonly styles: CSSResultGroup;
25
+ protected get nestedControlSize(): ControlSize;
25
26
  size: ControlSize;
26
27
  connectedCallback(): void;
27
28
  click(): void;
@@ -29,7 +30,7 @@ export declare class ControlElement extends ControlElement_base {
29
30
  protected renderContent(): TemplateResult;
30
31
  protected renderLabel(defaultContent?: TemplateResult | string): TemplateResult;
31
32
  protected renderSlot(name: 'prefix' | 'suffix', defaultContent?: TemplateResult | string): TemplateResult;
32
- protected updated(props: PropertyValues): void;
33
+ protected updated(props: PropertyValues<this>): void;
33
34
  }
34
35
  export {};
35
36
  //# sourceMappingURL=control-element.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { Alignment, FormAssociated } from '../../main.js';
2
+ import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
3
+ import { ControlElement } from './control-element.js';
4
+ declare const InputControlElement_base: import('../../utils/main.js').Constructor<FormAssociated> & typeof ControlElement;
5
+ /**
6
+ *
7
+ * @slot prefix - Prefix slot
8
+ * @slot suffix - Suffix slot
9
+ * @slot - Default slot
10
+ */
11
+ export declare class InputControlElement extends InputControlElement_base {
12
+ #private;
13
+ static readonly styles: CSSResultGroup;
14
+ static shadowRootOptions: ShadowRootInit;
15
+ private measureTarget;
16
+ focusTarget: HTMLInputElement;
17
+ autocomplete: HTMLInputElement['autocomplete'];
18
+ alignment: Alignment;
19
+ hideControls: boolean;
20
+ inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
21
+ placeholder: string;
22
+ unit?: string;
23
+ constructor();
24
+ disconnectedCallback(): void;
25
+ toFormValue(): string;
26
+ protected firstUpdated(props: PropertyValues): void;
27
+ protected updated(props: PropertyValues<this>): void;
28
+ protected render(): TemplateResult;
29
+ protected renderInput(): TemplateResult;
30
+ protected handleInput(event: InputEvent & {
31
+ target: HTMLInputElement;
32
+ }): void;
33
+ protected updateInputWidth(): void;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=input-control-element.d.ts.map
@@ -8,7 +8,7 @@ declare global {
8
8
  'odx-autocomplete': OdxAutocomplete;
9
9
  }
10
10
  }
11
- declare const OdxAutocomplete_base: import('../../utils/main.js').Constructor<FormAssociated<string>> & typeof CustomElement;
11
+ declare const OdxAutocomplete_base: import('../../utils/main.js').Constructor<FormAssociated> & typeof CustomElement;
12
12
  export declare class OdxAutocomplete extends OdxAutocomplete_base {
13
13
  #private;
14
14
  static shadowRootOptions: ShadowRootInit;
@@ -1,30 +1,37 @@
1
- import { FormAssociated } from '../../main.js';
2
- import { OdxIconName } from '@odx/icons';
3
- import { nothing, PropertyValues, TemplateResult } from 'lit';
4
- import { ControlElement } from '../abstract/control-element.js';
1
+ import { ValuesOf } from '../../utils/main.js';
2
+ import { PropertyValues, TemplateResult } from 'lit';
3
+ import { InputControlElement } from '../abstract/input-control-element.js';
5
4
  declare global {
6
5
  interface HTMLElementTagNameMap {
7
6
  'odx-input': OdxInput;
8
7
  }
9
8
  }
10
- declare const OdxInput_base: import('../../utils/main.js').Constructor<FormAssociated<string>> & typeof ControlElement;
11
- export declare class OdxInput extends OdxInput_base {
9
+ export type InputType = ValuesOf<typeof InputType>;
10
+ export declare const InputType: {
11
+ readonly TEXT: "text";
12
+ readonly EMAIL: "email";
13
+ readonly HIDDEN: "hidden";
14
+ readonly NUMBER: "number";
15
+ readonly PASSWORD: "password";
16
+ readonly SEARCH: "search";
17
+ readonly TEL: "tel";
18
+ readonly URL: "url";
19
+ readonly TIME: "time";
20
+ };
21
+ export declare class OdxInput extends InputControlElement {
12
22
  #private;
13
- static shadowRootOptions: ShadowRootInit;
14
- focusTarget: HTMLInputElement;
23
+ private passwordRevealed;
24
+ autocapitalize: string;
15
25
  clearable: boolean;
16
- hideControls: boolean;
17
- placeholder: string;
18
- min?: number;
19
- max?: number;
20
- step?: number;
21
- type: HTMLInputElement['type'];
26
+ loading: boolean;
27
+ minLength?: number;
28
+ maxLength?: number;
29
+ pattern?: string;
30
+ type: InputType;
22
31
  value: string;
23
- stepUp(): void;
24
- stepDown(): void;
32
+ protected firstUpdated(props: PropertyValues<this>): void;
25
33
  protected willUpdate(props: PropertyValues<this>): void;
26
- protected render(): TemplateResult;
27
- protected renderControl(type: string, icon: OdxIconName, listener: EventListener, disabled: boolean, slot?: string): TemplateResult | typeof nothing;
34
+ protected updated(props: PropertyValues<this>): void;
35
+ protected renderInput(): TemplateResult;
28
36
  }
29
- export {};
30
37
  //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { ValuesOf } from '../../utils/main.js';
2
+ import { OdxIconName } from '@odx/icons';
3
+ import { PropertyValues, TemplateResult } from 'lit';
4
+ import { InputControlElement } from '../abstract/input-control-element.js';
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ 'odx-input-number': OdxInputNumber;
8
+ }
9
+ }
10
+ export type InputNumberStepBehavior = ValuesOf<typeof InputNumberStepBehavior>;
11
+ export declare const InputNumberStepBehavior: {
12
+ readonly IGNORE: "ignore";
13
+ readonly ROUND: "round";
14
+ readonly CEIL: "ceil";
15
+ readonly FLOOR: "floor";
16
+ };
17
+ export declare class OdxInputNumber extends InputControlElement {
18
+ #private;
19
+ iconDecrement: OdxIconName;
20
+ iconIncrement: OdxIconName;
21
+ min: number;
22
+ max: number;
23
+ step: number;
24
+ stepBehavior: InputNumberStepBehavior;
25
+ value: number;
26
+ constructor();
27
+ stepUp(n?: number): void;
28
+ stepDown(n?: number): void;
29
+ toFormValue(): string;
30
+ protected firstUpdated(props: PropertyValues<this>): void;
31
+ protected willUpdate(props: PropertyValues<this>): void;
32
+ protected updated(props: PropertyValues<this>): void;
33
+ protected renderInput(): TemplateResult;
34
+ protected handleInput(_event: InputEvent & {
35
+ target: HTMLInputElement;
36
+ }): void;
37
+ }
38
+ //# sourceMappingURL=input-number.d.ts.map
@@ -7,7 +7,7 @@ declare global {
7
7
  'odx-listbox': OdxListbox;
8
8
  }
9
9
  }
10
- declare const OdxListbox_base: import('../../utils/main.js').Constructor<FormAssociated<string>> & typeof CustomElement;
10
+ declare const OdxListbox_base: import('../../utils/main.js').Constructor<FormAssociated> & typeof CustomElement;
11
11
  export declare class OdxListbox extends OdxListbox_base {
12
12
  #private;
13
13
  interactive: boolean;
@@ -7,7 +7,7 @@ declare global {
7
7
  }
8
8
  export declare class OdxLoadingOverlay extends CustomElement {
9
9
  #private;
10
- private readonly overlay;
10
+ private readonly backdrop;
11
11
  get loadingContainer(): HTMLElement;
12
12
  loading: boolean;
13
13
  disconnectedCallback(): void;
@@ -32,6 +32,7 @@ export * from './icon-button/icon-button.js';
32
32
  export * from './image/image.js';
33
33
  export * from './inline-message/inline-message.js';
34
34
  export * from './input/input.js';
35
+ export * from './input-number/input-number.js';
35
36
  export * from './key-value/key-value.js';
36
37
  export * from './key-value-list/key-value-list.js';
37
38
  export * from './label/label.js';
@@ -19,7 +19,6 @@ export declare class PopoverHost extends PopoverHost_base {
19
19
  set referenceElement(value: HTMLElement | null);
20
20
  get referenceElement(): HTMLElement | null;
21
21
  placement: Placement;
22
- fpsLimit: number;
23
22
  get popoverPlacementOptions(): PopoverPlacementOptions;
24
23
  constructor();
25
24
  connectedCallback(): void;
@@ -17,7 +17,6 @@ export declare class OdxSelect extends OdxSelect_base {
17
17
  protected readonly dropdown: OdxDropdown;
18
18
  clearable: boolean;
19
19
  constructor();
20
- clear(): void;
21
20
  connectedCallback(): void;
22
21
  firstUpdated(props: PropertyValues<this>): void;
23
22
  protected canSelect(option: OdxOption): boolean;
@@ -20,7 +20,7 @@ export declare const SliderHandleVariant: Pick<{
20
20
  readonly SUBTLE: "subtle";
21
21
  readonly GHOST: "ghost";
22
22
  }, "ACCENT" | "SUCCESS" | "WARNING" | "DANGER">;
23
- declare const OdxSliderHandle_base: import('../../utils/main.js').Constructor<FormAssociated<number>> & typeof CustomElement;
23
+ declare const OdxSliderHandle_base: import('../../utils/main.js').Constructor<FormAssociated> & typeof CustomElement;
24
24
  export declare class OdxSliderHandle extends OdxSliderHandle_base implements IsDraggable {
25
25
  #private;
26
26
  static shadowRootOptions: ShadowRootInit;
@@ -5,7 +5,7 @@ declare global {
5
5
  'odx-textarea': OdxTextArea;
6
6
  }
7
7
  }
8
- declare const OdxTextArea_base: import('../../utils/main.js').Constructor<FormAssociated<string>> & typeof CustomElement;
8
+ declare const OdxTextArea_base: import('../../utils/main.js').Constructor<FormAssociated> & typeof CustomElement;
9
9
  export declare class OdxTextArea extends OdxTextArea_base {
10
10
  #private;
11
11
  static shadowRootOptions: ShadowRootInit;