@vialiq/web-components 0.11.0 → 0.13.0
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/badge/vi-badge.d.ts +2 -2
- package/base/controllers/floating-controller.d.ts +44 -0
- package/base/controllers/floating-controller.d.ts.map +1 -0
- package/base/if-non-empty.d.ts +1 -1
- package/button/vi-button.d.ts +3 -3
- package/checkbox/vi-checkbox.d.ts +4 -4
- package/icons/vi-icon.d.ts +2 -2
- package/icons/vi-icon.js +1 -1
- package/index.js +3 -22
- package/input/vi-input.d.ts +4 -4
- package/package.json +3 -3
- package/radio/vi-radio-group.d.ts +5 -5
- package/radio/vi-radio.d.ts +3 -3
- package/tooltip/vi-tooltip.d.ts +3 -3
package/badge/vi-badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
2
|
import { ViElement } from '../base/vi-element.js';
|
|
3
3
|
export type BadgeVariant = 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
4
4
|
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
@@ -23,7 +23,7 @@ export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
|
23
23
|
* @csspart icon - Icon slot wrapper
|
|
24
24
|
*/
|
|
25
25
|
export declare class ViBadge extends ViElement {
|
|
26
|
-
static styles: import(
|
|
26
|
+
static styles: import('lit').CSSResult;
|
|
27
27
|
/** Colour semantic */
|
|
28
28
|
accessor variant: BadgeVariant;
|
|
29
29
|
/** Size */
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { Placement } from '@floating-ui/dom';
|
|
3
|
+
export interface FloatingControllerOptions {
|
|
4
|
+
/** Function returning the reference element (e.g. trigger/input). */
|
|
5
|
+
reference: () => HTMLElement | null;
|
|
6
|
+
/** Function returning the floating element (e.g. popover/listbox). */
|
|
7
|
+
floating: () => HTMLElement | null;
|
|
8
|
+
/** Function returning the desired placement. */
|
|
9
|
+
placement?: () => Placement;
|
|
10
|
+
/** Space in px between reference and floating. */
|
|
11
|
+
offset?: number;
|
|
12
|
+
/** Whether to use fixed positioning instead of absolute. */
|
|
13
|
+
hoist?: () => boolean;
|
|
14
|
+
/** Element or selector string to constrain flipping. */
|
|
15
|
+
boundary?: () => HTMLElement | string | null;
|
|
16
|
+
/** Whether the floating element should be forced to match the reference element's width. */
|
|
17
|
+
matchWidth?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A Reactive Controller that manages @floating-ui/dom positioning.
|
|
21
|
+
* Abstracts away the autoUpdate and positioning logic from complex components.
|
|
22
|
+
*/
|
|
23
|
+
export declare class FloatingController implements ReactiveController {
|
|
24
|
+
private host;
|
|
25
|
+
private options;
|
|
26
|
+
private _cleanup?;
|
|
27
|
+
constructor(host: ReactiveControllerHost, options: FloatingControllerOptions);
|
|
28
|
+
hostDisconnected(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Starts the floating UI auto-update listener.
|
|
31
|
+
* Call this when the popover opens.
|
|
32
|
+
*/
|
|
33
|
+
start(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Stops the floating UI auto-update listener.
|
|
36
|
+
* Call this when the popover closes.
|
|
37
|
+
*/
|
|
38
|
+
stop(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Imperatively update position.
|
|
41
|
+
*/
|
|
42
|
+
updatePosition(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=floating-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-controller.d.ts","sourceRoot":"","sources":["../../../../../libs/web-components/src/base/controllers/floating-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAmD,KAAK,SAAS,EAAmB,MAAM,kBAAkB,CAAC;AAEpH,MAAM,WAAW,yBAAyB;IACxC,qEAAqE;IACrE,SAAS,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACpC,sEAAsE;IACtE,QAAQ,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACnC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,SAAS,CAAC;IAC5B,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7C,4FAA4F;IAC5F,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,kBAAkB;IAIzD,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,QAAQ,CAAC,CAAa;gBAGpB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE,yBAAyB;IAK5C,gBAAgB;IAIhB;;;OAGG;IACH,KAAK;IAgBL;;;OAGG;IACH,IAAI;IAOJ;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CA+CtC"}
|
package/base/if-non-empty.d.ts
CHANGED
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
* - You need the attribute to literally be "" (rare, document when intentional)
|
|
59
59
|
* - The binding is to a custom element property — use .prop=${val} instead
|
|
60
60
|
*/
|
|
61
|
-
export declare const ifNonEmpty: (value: string | null | undefined) => string | typeof import(
|
|
61
|
+
export declare const ifNonEmpty: (value: string | null | undefined) => string | typeof import('lit-html').nothing;
|
|
62
62
|
//# sourceMappingURL=if-non-empty.d.ts.map
|
package/button/vi-button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { ViElement } from '../base/vi-element.js';
|
|
3
3
|
/**
|
|
4
4
|
* Button visual variant.
|
|
@@ -18,7 +18,7 @@ export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
|
18
18
|
* Controlled via CSS `order` — no extra wrapper elements needed.
|
|
19
19
|
*/
|
|
20
20
|
export type ButtonIconPlacement = 'start' | 'end';
|
|
21
|
-
declare const ViButton_base: typeof ViElement & (new (...args: any[]) => import(
|
|
21
|
+
declare const ViButton_base: typeof ViElement & (new (...args: any[]) => import('../base/focusable-mixin.js').FocusableInterface);
|
|
22
22
|
/**
|
|
23
23
|
* vi-button
|
|
24
24
|
* Self-styled button component using Flux UI token fallbacks.
|
|
@@ -39,7 +39,7 @@ declare const ViButton_base: typeof ViElement & (new (...args: any[]) => import(
|
|
|
39
39
|
* @csspart label - The label span
|
|
40
40
|
*/
|
|
41
41
|
export declare class ViButton extends ViButton_base {
|
|
42
|
-
static styles: import(
|
|
42
|
+
static styles: import('lit').CSSResult;
|
|
43
43
|
protected get _focusableElement(): HTMLButtonElement | null;
|
|
44
44
|
/** Visual variant. */
|
|
45
45
|
accessor variant: ButtonVariant;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { ControlStatus } from '../base/validity-mixin.js';
|
|
3
3
|
import { ViElement } from '../base/vi-element.js';
|
|
4
4
|
export type CheckboxSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
-
declare const ViCheckbox_base: typeof ViElement & (new (...args: any[]) => import(
|
|
5
|
+
declare const ViCheckbox_base: typeof ViElement & (new (...args: any[]) => import('../base/focusable-mixin.js').FocusableInterface) & (new (...args: any[]) => import('../base/validity-mixin.js').ValidityInterface<unknown>);
|
|
6
6
|
/**
|
|
7
7
|
* vi-checkbox
|
|
8
8
|
* Form-associated checkbox control using Flux UI tokens.
|
|
@@ -29,7 +29,7 @@ declare const ViCheckbox_base: typeof ViElement & (new (...args: any[]) => impor
|
|
|
29
29
|
* @csspart label - The label text wrapper.
|
|
30
30
|
*/
|
|
31
31
|
export declare class ViCheckbox extends ViCheckbox_base {
|
|
32
|
-
static styles: import(
|
|
32
|
+
static styles: import('lit').CSSResult;
|
|
33
33
|
private _initialChecked;
|
|
34
34
|
protected get _focusableElement(): HTMLInputElement | null;
|
|
35
35
|
accessor status: ControlStatus;
|
package/icons/vi-icon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { ViElement } from '../base/vi-element.js';
|
|
3
3
|
/**
|
|
4
4
|
* vi-icon
|
|
@@ -17,7 +17,7 @@ import { ViElement } from '../base/vi-element.js';
|
|
|
17
17
|
* @attr label - Accessible label; omit for decorative icons
|
|
18
18
|
*/
|
|
19
19
|
export declare class ViIcon extends ViElement {
|
|
20
|
-
static styles: import(
|
|
20
|
+
static styles: import('lit').CSSResult;
|
|
21
21
|
/**
|
|
22
22
|
* The registered icon name to render.
|
|
23
23
|
* @attr
|
package/icons/vi-icon.js
CHANGED
package/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { ViAccordion } from './accordion/vi-accordion.js';
|
|
|
13
13
|
export { ViAccordionItem } from './accordion/vi-accordion-item.js';
|
|
14
14
|
import { unsafeCSS, css, html } from 'lit';
|
|
15
15
|
import { customElement, property, state, queryAssignedElements } from 'lit/decorators.js';
|
|
16
|
+
import { checkCircleIcon, triangleWarningIcon, infoIcon, xIcon, lockIcon } from '@vialiq/icons';
|
|
16
17
|
import { F as FocusableMixin } from './focusable-mixin-CmxOyPX5.js';
|
|
17
18
|
import { V as ValidityMixin } from './validity-mixin-H4aOFJEr.js';
|
|
18
19
|
|
|
@@ -998,29 +999,9 @@ var _dec$3, _initClass$3, _ViElement$1, _dec1$3, _dec2$3, _dec3$3, _dec4$3, _dec
|
|
|
998
999
|
* Alias for auto-hide-duration in milliseconds.
|
|
999
1000
|
* Setting a positive duration enables auto-hiding automatically.
|
|
1000
1001
|
*/ _init_duration$1, /** Override the default status icon name */ _init_icon, /** Controls whether the alert is displayed */ _init_open$1, /** Position alert absolutely over parent container without pushing layout */ _init_floating, /** Hide the icon */ _init_noIcon, _init__hasTitleSlot, _init__hasActionsSlot, _initProto$3;
|
|
1001
|
-
const checkCircleIcon = {
|
|
1002
|
-
name: 'check-circle',
|
|
1003
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>`
|
|
1004
|
-
};
|
|
1005
|
-
const alertTriangleIcon = {
|
|
1006
|
-
name: 'alert-triangle',
|
|
1007
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>`
|
|
1008
|
-
};
|
|
1009
|
-
const infoIcon = {
|
|
1010
|
-
name: 'info',
|
|
1011
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>`
|
|
1012
|
-
};
|
|
1013
|
-
const xIcon = {
|
|
1014
|
-
name: 'x',
|
|
1015
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>`
|
|
1016
|
-
};
|
|
1017
|
-
const lockIcon = {
|
|
1018
|
-
name: 'lock',
|
|
1019
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>`
|
|
1020
|
-
};
|
|
1021
1002
|
registerIcons([
|
|
1022
1003
|
checkCircleIcon,
|
|
1023
|
-
|
|
1004
|
+
triangleWarningIcon,
|
|
1024
1005
|
infoIcon,
|
|
1025
1006
|
xIcon,
|
|
1026
1007
|
lockIcon
|
|
@@ -1289,7 +1270,7 @@ new class extends _identity$3 {
|
|
|
1289
1270
|
return 'check-circle';
|
|
1290
1271
|
case 'warning':
|
|
1291
1272
|
case 'danger':
|
|
1292
|
-
return '
|
|
1273
|
+
return 'triangle-warning';
|
|
1293
1274
|
case 'info':
|
|
1294
1275
|
default:
|
|
1295
1276
|
return 'info';
|
package/input/vi-input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { ControlStatus } from '../base/validity-mixin.js';
|
|
3
3
|
import { ViElement } from '../base/vi-element.js';
|
|
4
4
|
/**
|
|
5
5
|
* Supported input types.
|
|
@@ -9,7 +9,7 @@ import { ViElement } from '../base/vi-element.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export type InputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
11
11
|
export type InputSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
12
|
-
declare const ViInput_base: typeof ViElement & (new (...args: any[]) => import(
|
|
12
|
+
declare const ViInput_base: typeof ViElement & (new (...args: any[]) => import('../base/focusable-mixin.js').FocusableInterface) & (new (...args: any[]) => import('../base/validity-mixin.js').ValidityInterface<unknown>);
|
|
13
13
|
/**
|
|
14
14
|
* vi-input
|
|
15
15
|
* Form-associated single-line text input using Flux UI token fallbacks.
|
|
@@ -50,7 +50,7 @@ declare const ViInput_base: typeof ViElement & (new (...args: any[]) => import("
|
|
|
50
50
|
* @cssprop [--vi-input-typography-font-size] - Font size (default: `$font-size-base`)
|
|
51
51
|
*/
|
|
52
52
|
export declare class ViInput extends ViInput_base {
|
|
53
|
-
static styles: import(
|
|
53
|
+
static styles: import('lit').CSSResult;
|
|
54
54
|
protected get _focusableElement(): HTMLInputElement | null;
|
|
55
55
|
accessor status: ControlStatus;
|
|
56
56
|
accessor required: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vialiq/web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"@floating-ui/dom": ">=1.0.0",
|
|
106
|
-
"@vialiq/flux-ui": "^0.
|
|
107
|
-
"@vialiq/icons": "
|
|
106
|
+
"@vialiq/flux-ui": "^0.11.0",
|
|
107
|
+
"@vialiq/icons": "^0.1.1",
|
|
108
108
|
"lit": "^3.0.0"
|
|
109
109
|
},
|
|
110
110
|
"keywords": [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { ControlStatus } from '../base/validity-mixin.js';
|
|
3
3
|
import { ViElement } from '../base/vi-element.js';
|
|
4
|
-
import {
|
|
4
|
+
import { RadioSize } from './vi-radio.js';
|
|
5
5
|
export type RadioGroupOrientation = 'vertical' | 'horizontal';
|
|
6
|
-
declare const ViRadioGroup_base: typeof ViElement & (new (...args: any[]) => import(
|
|
6
|
+
declare const ViRadioGroup_base: typeof ViElement & (new (...args: any[]) => import('../base/validity-mixin.js').ValidityInterface<unknown>);
|
|
7
7
|
/**
|
|
8
8
|
* vi-radio-group
|
|
9
9
|
* Form-associated radio button group container.
|
|
@@ -27,7 +27,7 @@ declare const ViRadioGroup_base: typeof ViElement & (new (...args: any[]) => imp
|
|
|
27
27
|
* @fires {Event} invalid - Fired when validation check fails.
|
|
28
28
|
*/
|
|
29
29
|
export declare class ViRadioGroup extends ViRadioGroup_base {
|
|
30
|
-
static styles: import(
|
|
30
|
+
static styles: import('lit').CSSResult;
|
|
31
31
|
accessor status: ControlStatus;
|
|
32
32
|
accessor required: boolean;
|
|
33
33
|
accessor validityMessage: string;
|
package/radio/vi-radio.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { ViElement } from '../base/vi-element.js';
|
|
3
3
|
export type RadioSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
-
declare const ViRadio_base: typeof ViElement & (new (...args: any[]) => import(
|
|
4
|
+
declare const ViRadio_base: typeof ViElement & (new (...args: any[]) => import('../base/focusable-mixin.js').FocusableInterface);
|
|
5
5
|
/**
|
|
6
6
|
* vi-radio
|
|
7
7
|
* Individual radio option within a vi-radio-group.
|
|
@@ -18,7 +18,7 @@ declare const ViRadio_base: typeof ViElement & (new (...args: any[]) => import("
|
|
|
18
18
|
* @csspart label - The label text span.
|
|
19
19
|
*/
|
|
20
20
|
export declare class ViRadio extends ViRadio_base {
|
|
21
|
-
static styles: import(
|
|
21
|
+
static styles: import('lit').CSSResult;
|
|
22
22
|
protected get _focusableElement(): HTMLInputElement | null;
|
|
23
23
|
/** The value this radio represents. */
|
|
24
24
|
accessor value: string;
|
package/tooltip/vi-tooltip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { ViElement } from '../base/vi-element.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ComputePositionConfig } from '@floating-ui/dom';
|
|
4
4
|
export type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right';
|
|
5
5
|
export type TooltipTrigger = 'hover focus' | 'hover' | 'focus' | 'click';
|
|
6
6
|
/**
|
|
@@ -25,7 +25,7 @@ export type TooltipTrigger = 'hover focus' | 'hover' | 'focus' | 'click';
|
|
|
25
25
|
* @csspart arrow - Arrow pointer
|
|
26
26
|
*/
|
|
27
27
|
export declare class ViTooltip extends ViElement {
|
|
28
|
-
static styles: import(
|
|
28
|
+
static styles: import('lit').CSSResult;
|
|
29
29
|
accessor content: string;
|
|
30
30
|
accessor placement: TooltipPlacement;
|
|
31
31
|
accessor trigger: TooltipTrigger;
|