@loadsmart/miranda-wc 1.8.0 → 1.10.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.
Files changed (44) hide show
  1. package/dist/components/button/base-button.styles.d.ts +3 -0
  2. package/dist/components/button/base-button.styles.d.ts.map +1 -0
  3. package/dist/components/button/button.d.ts +7 -6
  4. package/dist/components/button/button.d.ts.map +1 -1
  5. package/dist/components/button/button.styles.d.ts +1 -1
  6. package/dist/components/button/button.styles.d.ts.map +1 -1
  7. package/dist/components/card/card-body.d.ts +1 -1
  8. package/dist/components/card/card-subtitle.d.ts +1 -1
  9. package/dist/components/card/card-title.d.ts +1 -1
  10. package/dist/components/card/card.d.ts +1 -1
  11. package/dist/components/divider/divider.d.ts +1 -1
  12. package/dist/components/layout/box/box.d.ts +1 -1
  13. package/dist/components/layout/grid/grid.d.ts +1 -1
  14. package/dist/components/layout/group/group.d.ts +1 -1
  15. package/dist/components/layout/layout.types.d.ts +1 -1
  16. package/dist/components/layout/layout.types.d.ts.map +1 -1
  17. package/dist/components/layout/sidebar/sidebar.d.ts +1 -1
  18. package/dist/components/layout/stack/stack.d.ts +1 -1
  19. package/dist/components/progress-bar/progress-bar.d.ts +1 -1
  20. package/dist/components/text/text.d.ts +2 -2
  21. package/dist/components/text/text.d.ts.map +1 -1
  22. package/dist/components/toggle-group/index.d.ts +5 -0
  23. package/dist/components/toggle-group/index.d.ts.map +1 -0
  24. package/dist/components/toggle-group/toggle-group.constants.d.ts +2 -0
  25. package/dist/components/toggle-group/toggle-group.constants.d.ts.map +1 -0
  26. package/dist/components/toggle-group/toggle-group.cy.d.ts +3 -0
  27. package/dist/components/toggle-group/toggle-group.cy.d.ts.map +1 -0
  28. package/dist/components/toggle-group/toggle-group.d.ts +88 -0
  29. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
  30. package/dist/components/toggle-group/toggle-group.styles.d.ts +3 -0
  31. package/dist/components/toggle-group/toggle-group.styles.d.ts.map +1 -0
  32. package/dist/components/toggle-group/toggle.d.ts +56 -0
  33. package/dist/components/toggle-group/toggle.d.ts.map +1 -0
  34. package/dist/components/toggle-group/toggle.styles.d.ts +3 -0
  35. package/dist/components/toggle-group/toggle.styles.d.ts.map +1 -0
  36. package/dist/controllers/selection/index.d.ts +3 -0
  37. package/dist/controllers/selection/index.d.ts.map +1 -0
  38. package/dist/controllers/selection/selection.controller.d.ts +41 -0
  39. package/dist/controllers/selection/selection.controller.d.ts.map +1 -0
  40. package/dist/index.d.ts +4 -3
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +579 -459
  43. package/dist/index.js.map +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ declare function styles(): import("lit").CSSResult;
2
+ export default styles;
3
+ //# sourceMappingURL=base-button.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/base-button.styles.ts"],"names":[],"mappings":"AAMA,iBAAS,MAAM,4BAqFd;AAED,eAAe,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
- import { LitElement } from 'lit';
1
+ import { LitElement, type PropertyValues } from 'lit';
2
2
  export declare type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger' | 'icon' | 'icon-secondary';
3
3
  export declare type ButtonSize = 'small' | 'default' | 'large';
4
4
  export declare type ButtonType = 'button' | 'reset' | 'submit';
@@ -6,12 +6,11 @@ export interface ButtonProps {
6
6
  disabled?: boolean;
7
7
  loading?: boolean;
8
8
  size?: ButtonSize;
9
- type?: ButtonType;
10
- variant?: ButtonVariant;
11
- click?: (e: MouseEvent) => void;
9
+ type: ButtonType;
10
+ variant: ButtonVariant;
12
11
  }
13
12
  export declare class Button extends LitElement {
14
- static styles: import("lit").CSSResult[];
13
+ static styles: import("lit").CSSResult[][];
15
14
  static get properties(): {
16
15
  loading: {
17
16
  type: BooleanConstructor;
@@ -52,8 +51,10 @@ export declare class Button extends LitElement {
52
51
  type: ButtonType;
53
52
  constructor();
54
53
  connectedCallback(): void;
55
- render(): import("lit-html").TemplateResult<1>;
54
+ protected updated(changedProperties: PropertyValues<this>): void;
55
+ render(): import("lit").TemplateResult<1>;
56
56
  _isDisabled(): boolean;
57
+ _setDisabled(): void;
57
58
  }
58
59
  declare global {
59
60
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAKhD,oBAAY,aAAa,GACtB,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,QAAQ,GACR,MAAM,GACN,gBAAgB,CAAC;AAEpB,oBAAY,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,CAAE,CAAC,EAAE,UAAU,KAAM,IAAI,CAAC;CAClC;AAED,qBAAa,MAAO,SAAQ,UAAU;IACrC,OAAgB,MAAM,4BAAgB;IAEtC,WAAoB,UAAU;;;;;;;;;;;;;;;;;MAQ7B;IAED;;OAEG;IACK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACK,OAAO,EAAE,aAAa,CAAC;IAE/B;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;;IAYhB,iBAAiB,IAAI,IAAI;IAMzB,MAAM;IAoCf,WAAW;CAGX;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,MAAM,CAAC;KACnB;CACD"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAKrE,oBAAY,aAAa,GACtB,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,QAAQ,GACR,MAAM,GACN,gBAAgB,CAAC;AAEpB,oBAAY,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvD,oBAAY,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;CACvB;AAED,qBAAa,MAAO,SAAQ,UAAU;IACrC,OAAgB,MAAM,8BAAgB;IAEtC,WAAoB,UAAU;;;;;;;;;;;;;;;;;MAQ7B;IAED;;OAEG;IACK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACK,OAAO,EAAE,aAAa,CAAC;IAE/B;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;;IAYhB,iBAAiB,IAAI,IAAI;cAMf,OAAO,CACzB,iBAAiB,EAAE,cAAc,CAAE,IAAI,CAAE,GACvC,IAAI;IAWE,MAAM;IAmCf,WAAW;IAIX,YAAY;CAKZ;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,MAAM,CAAC;KACnB;CACD"}
@@ -1,3 +1,3 @@
1
- declare function styles(): import("lit").CSSResult;
1
+ declare function styles(): import("lit").CSSResult[];
2
2
  export default styles;
3
3
  //# sourceMappingURL=button.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":"AAMA,iBAAS,MAAM,4BAkVd;AAED,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":"AAOA,iBAAS,MAAM,8BAoQd;AAED,eAAe,MAAM,CAAC"}
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export declare class CardBody extends LitElement {
3
3
  static styles: import("lit").CSSResult[];
4
4
  constructor();
5
- render(): import("lit-html").TemplateResult<1>;
5
+ render(): import("lit").TemplateResult<1>;
6
6
  }
7
7
  declare global {
8
8
  interface HTMLElementTagNameMap {
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export declare class CardSubtitle extends LitElement {
3
3
  static styles: import("lit").CSSResult[];
4
4
  constructor();
5
- render(): import("lit-html").TemplateResult<1>;
5
+ render(): import("lit").TemplateResult<1>;
6
6
  }
7
7
  declare global {
8
8
  interface HTMLElementTagNameMap {
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export declare class CardTitle extends LitElement {
3
3
  static styles: import("lit").CSSResult[];
4
4
  constructor();
5
- render(): import("lit-html").TemplateResult<1>;
5
+ render(): import("lit").TemplateResult<1>;
6
6
  }
7
7
  declare global {
8
8
  interface HTMLElementTagNameMap {
@@ -26,7 +26,7 @@ export declare class Card extends LitElement {
26
26
  */
27
27
  flagColor: CardProps['flag-color'];
28
28
  constructor();
29
- render(): import("lit-html").TemplateResult<1>;
29
+ render(): import("lit").TemplateResult<1>;
30
30
  }
31
31
  declare global {
32
32
  interface HTMLElementTagNameMap {
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class Divider extends LitElement {
3
3
  static styles: import("lit").CSSResult[];
4
- render(): import("lit-html").TemplateResult<1>;
4
+ render(): import("lit").TemplateResult<1>;
5
5
  }
6
6
  declare global {
7
7
  interface HTMLElementTagNameMap {
@@ -35,7 +35,7 @@ export declare class Box extends LitElement {
35
35
  textAlign: BoxProps['textAlign'];
36
36
  constructor();
37
37
  protected update(changedProperties: PropertyValues<BoxProps>): void;
38
- render(): import("lit-html").TemplateResult<1>;
38
+ render(): import("lit").TemplateResult<1>;
39
39
  }
40
40
  declare global {
41
41
  interface HTMLElementTagNameMap {
@@ -25,7 +25,7 @@ export declare class Grid extends LitElement {
25
25
  minColumnWidth: GridProps['minColumnWidth'];
26
26
  constructor();
27
27
  protected update(changedProperties: PropertyValues<GridProps>): void;
28
- render(): import("lit-html").TemplateResult<1>;
28
+ render(): import("lit").TemplateResult<1>;
29
29
  }
30
30
  declare global {
31
31
  interface HTMLElementTagNameMap {
@@ -18,7 +18,7 @@ export declare class Group extends LitElement {
18
18
  justify: GroupProps['justify'];
19
19
  constructor();
20
20
  protected update(changedProperties: PropertyValues<GroupProps>): void;
21
- render(): import("lit-html").TemplateResult<1>;
21
+ render(): import("lit").TemplateResult<1>;
22
22
  }
23
23
  declare global {
24
24
  interface HTMLElementTagNameMap {
@@ -1,4 +1,4 @@
1
- import { ALIGN_ITEMS_VALUES, JUSTIFY_CONTENT_VALUES } from './layout.constants';
1
+ import type { ALIGN_ITEMS_VALUES, JUSTIFY_CONTENT_VALUES } from './layout.constants';
2
2
  export declare type AlignItemsValue = typeof ALIGN_ITEMS_VALUES[number];
3
3
  export declare type JustifyContentValue = typeof JUSTIFY_CONTENT_VALUES[number];
4
4
  //# sourceMappingURL=layout.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.types.d.ts","sourceRoot":"","sources":["../../../src/components/layout/layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,oBAAY,eAAe,GAAG,OAAO,kBAAkB,CAAE,MAAM,CAAE,CAAC;AAElE,oBAAY,mBAAmB,GAAG,OAAO,sBAAsB,CAAE,MAAM,CAAE,CAAC"}
1
+ {"version":3,"file":"layout.types.d.ts","sourceRoot":"","sources":["../../../src/components/layout/layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,sBAAsB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,oBAAY,eAAe,GAAG,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAEhE,oBAAY,mBAAmB,GAAG,OAAO,sBAAsB,CAAC,MAAM,CAAC,CAAC"}
@@ -24,7 +24,7 @@ export declare class Sidebar extends LitElement {
24
24
  reversed: SidebarProps['reversed'];
25
25
  constructor();
26
26
  protected update(changedProperties: PropertyValues<SidebarProps>): void;
27
- render(): import("lit-html").TemplateResult<1>;
27
+ render(): import("lit").TemplateResult<1>;
28
28
  }
29
29
  declare global {
30
30
  interface HTMLElementTagNameMap {
@@ -18,7 +18,7 @@ export declare class Stack extends LitElement {
18
18
  justify: StackProps['justify'];
19
19
  constructor();
20
20
  protected update(changedProperties: PropertyValues<StackProps>): void;
21
- render(): import("lit-html").TemplateResult<1>;
21
+ render(): import("lit").TemplateResult<1>;
22
22
  }
23
23
  declare global {
24
24
  interface HTMLElementTagNameMap {
@@ -33,7 +33,7 @@ export declare class ProgressBar extends LitElement {
33
33
  connectedCallback(): void;
34
34
  protected updated(): void;
35
35
  _getWidth(): number;
36
- render(): import("lit-html").TemplateResult<1>;
36
+ render(): import("lit").TemplateResult<1>;
37
37
  }
38
38
  declare global {
39
39
  interface HTMLElementTagNameMap {
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { type ColorToken } from '@loadsmart/miranda-tokens';
3
- import { type TypographyVariant } from '../../styles/typography';
3
+ import type { TypographyVariant } from '../../styles/typography';
4
4
  export interface TextProps {
5
5
  variant?: TypographyVariant;
6
6
  color?: ColorToken;
@@ -27,7 +27,7 @@ export declare class Text extends LitElement {
27
27
  */
28
28
  color: ColorToken;
29
29
  constructor();
30
- render(): import("lit-html").TemplateResult<1>;
30
+ render(): import("lit").TemplateResult<1>;
31
31
  }
32
32
  declare global {
33
33
  interface HTMLElementTagNameMap {
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,MAAM,WAAW,SAAS;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,qBAAa,IAAK,SAAQ,UAAU;IACnC,OAAgB,MAAM,4BAAgB;IAEtC,WAAoB,UAAU;;;;;;;;MAK7B;IAED;;;OAGG;IACK,OAAO,EAAE,iBAAiB,CAAC;IAEnC;;;OAGG;IACK,KAAK,EAAE,UAAU,CAAC;;IASjB,MAAM;CAoCf;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,QAAQ,EAAE,IAAI,CAAC;KACf;CACD"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/components/text/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,MAAM,WAAW,SAAS;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,qBAAa,IAAK,SAAQ,UAAU;IACnC,OAAgB,MAAM,4BAAc;IAEpC,WAAoB,UAAU;;;;;;;;MAK7B;IAED;;;OAGG;IACK,OAAO,EAAE,iBAAiB,CAAC;IAEnC;;;OAGG;IACK,KAAK,EAAE,UAAU,CAAC;;IASjB,MAAM;CAoCf;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,QAAQ,EAAE,IAAI,CAAC;KACf;CACD"}
@@ -0,0 +1,5 @@
1
+ export { ToggleGroup } from './toggle-group';
2
+ export { Toggle } from './toggle';
3
+ export type { ToggleGroupProps, ToggleSize, ToggleGroupChangeEventDetail, } from './toggle-group';
4
+ export type { ToggleProps } from './toggle';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,YAAY,EACX,gBAAgB,EAChB,UAAU,EACV,4BAA4B,GAC5B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const TOGGLE_EVENT = "m-toggle";
2
+ //# sourceMappingURL=toggle-group.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-group.constants.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import './toggle-group';
2
+ import './toggle';
3
+ //# sourceMappingURL=toggle-group.cy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-group.cy.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group.cy.ts"],"names":[],"mappings":"AAGA,OAAO,gBAAgB,CAAC;AACxB,OAAO,UAAU,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ import type { AcceptedType, SelectionType, SelectionState } from '../../controllers/selection';
3
+ import type { Toggle } from './toggle';
4
+ import '../layout/group';
5
+ export declare type ToggleSize = 'small' | 'default';
6
+ export declare type ToggleGroupChangeEventDetail = {
7
+ type: SelectionType;
8
+ value: SelectionState;
9
+ };
10
+ export interface ToggleGroupProps {
11
+ disabled?: boolean;
12
+ showCheck?: boolean;
13
+ size?: ToggleSize;
14
+ type: SelectionType;
15
+ value?: AcceptedType | AcceptedType[];
16
+ 'm-change'?: (event: CustomEvent<ToggleGroupChangeEventDetail>) => void;
17
+ }
18
+ export declare class ToggleGroup extends LitElement {
19
+ static styles: import("lit").CSSResult[][];
20
+ private _selectionController;
21
+ private _defaultSlot;
22
+ static get properties(): {
23
+ disabled: {
24
+ type: BooleanConstructor;
25
+ };
26
+ role: {
27
+ type: StringConstructor;
28
+ reflect: boolean;
29
+ };
30
+ showCheck: {
31
+ type: BooleanConstructor;
32
+ attribute: string;
33
+ };
34
+ size: {
35
+ type: StringConstructor;
36
+ };
37
+ type: {
38
+ type: StringConstructor;
39
+ };
40
+ value: {};
41
+ selection: {
42
+ state: boolean;
43
+ };
44
+ };
45
+ /**
46
+ * Should the toggle group be disabled.
47
+ */
48
+ disabled: boolean;
49
+ /**
50
+ * Aria role
51
+ */
52
+ role: 'group' | 'radiogroup';
53
+ /**
54
+ * Should show the check icon when selected.
55
+ * The check icon is the default content for the `leading` slot.
56
+ */
57
+ showCheck: boolean;
58
+ /**
59
+ * Strategy for toggling.
60
+ */
61
+ type: SelectionType;
62
+ /**
63
+ * Toggle group value.
64
+ */
65
+ value?: AcceptedType | AcceptedType[];
66
+ /**
67
+ * Button size.
68
+ */
69
+ size: ToggleSize;
70
+ /**
71
+ * Inner toggle selection state.
72
+ */
73
+ selection: SelectionState;
74
+ constructor();
75
+ protected update(changedProperties: PropertyValues<this>): void;
76
+ protected updated(changedProperties: PropertyValues<this>): void;
77
+ render(): import("lit").TemplateResult<1>;
78
+ _getToggles(): Toggle[];
79
+ _setToggleRole(toggle: Toggle): void;
80
+ _setToggleChecked(toggle: Toggle): void;
81
+ _setToggleDisabled(toggle: Toggle): void;
82
+ }
83
+ declare global {
84
+ interface HTMLElementTagNameMap {
85
+ 'm-toggle-group': ToggleGroup;
86
+ }
87
+ }
88
+ //# sourceMappingURL=toggle-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAO5D,OAAO,KAAK,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,iBAAiB,CAAC;AAEzB,oBAAY,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAE7C,oBAAY,4BAA4B,GAAG;IAC1C,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACtC,UAAU,CAAC,EAAE,CAAE,KAAK,EAAE,WAAW,CAAE,4BAA4B,CAAE,KAAM,IAAI,CAAC;CAC5E;AAED,qBAAa,WAAY,SAAQ,UAAU;IAC1C,OAAgB,MAAM,8BAAgB;IAEtC,OAAO,CAAC,oBAAoB,CAAoC;IAChE,OAAO,CAAC,YAAY,CAAgC;IAEpD,WAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;MAU7B;IAED;;OAEG;IACK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACK,IAAI,EAAE,OAAO,GAAG,YAAY,CAAC;IAErC;;;OAGG;IACK,SAAS,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACK,IAAI,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACK,KAAK,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAE9C;;OAEG;IACK,IAAI,EAAE,UAAU,CAAC;IAEzB;;OAEG;IACK,SAAS,EAAE,cAAc,CAAC;;cAWf,MAAM,CAAE,iBAAiB,EAAE,cAAc,CAAE,IAAI,CAAE,GAAI,IAAI;cA6BzD,OAAO,CACzB,iBAAiB,EAAE,cAAc,CAAE,IAAI,CAAE,GACvC,IAAI;IAsBE,MAAM;IAoBf,WAAW,IAAI,MAAM,EAAE;IAYvB,cAAc,CAAE,MAAM,EAAE,MAAM;IAO9B,iBAAiB,CAAE,MAAM,EAAE,MAAM;IAIjC,kBAAkB,CAAE,MAAM,EAAE,MAAM;CAGlC;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,WAAW,CAAC;KAC9B;CACD"}
@@ -0,0 +1,3 @@
1
+ declare function styles(): import("lit").CSSResult[];
2
+ export default styles;
3
+ //# sourceMappingURL=toggle-group.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle-group.styles.ts"],"names":[],"mappings":"AAKA,iBAAS,MAAM,8BA8Bd;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { LitElement, type PropertyValues } from 'lit';
2
+ export interface ToggleProps {
3
+ checked?: boolean;
4
+ disabled?: boolean;
5
+ value: string;
6
+ }
7
+ export declare class Toggle extends LitElement {
8
+ static styles: import("lit").CSSResult[][];
9
+ static get properties(): {
10
+ checked: {
11
+ type: BooleanConstructor;
12
+ };
13
+ disabled: {
14
+ type: BooleanConstructor;
15
+ reflect: boolean;
16
+ };
17
+ role: {
18
+ type: StringConstructor;
19
+ reflect: boolean;
20
+ };
21
+ value: {
22
+ type: StringConstructor;
23
+ };
24
+ };
25
+ /**
26
+ * Should the button be disabled.
27
+ * @type {Boolean}
28
+ */
29
+ disabled: boolean;
30
+ /**
31
+ * Aria role
32
+ */
33
+ role: 'group' | 'radiogroup';
34
+ /**
35
+ * Should the toggle be selected.
36
+ */
37
+ checked: boolean;
38
+ /**
39
+ * Value represented by this toggle.
40
+ */
41
+ value: string;
42
+ constructor();
43
+ connectedCallback(): void;
44
+ disconnectedCallback(): void;
45
+ protected updated(changedProperties: PropertyValues<this>): void;
46
+ render(): import("lit").TemplateResult<1>;
47
+ _handleClick(): void;
48
+ _setDisabled(): void;
49
+ _setChecked(): void;
50
+ }
51
+ declare global {
52
+ interface HTMLElementTagNameMap {
53
+ 'm-toggle': Toggle;
54
+ }
55
+ }
56
+ //# sourceMappingURL=toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAM5D,MAAM,WAAW,WAAW;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,MAAO,SAAQ,UAAU;IACrC,OAAgB,MAAM,8BAAgB;IAEtC,WAAoB,UAAU;;;;;;;;;;;;;;;MAO7B;IAED;;;OAGG;IACK,QAAQ,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACK,IAAI,EAAE,OAAO,GAAG,YAAY,CAAC;IAErC;;OAEG;IACK,OAAO,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACK,KAAK,EAAE,MAAM,CAAC;;IASb,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;cAMlB,OAAO,CACzB,iBAAiB,EAAE,cAAc,CAAE,IAAI,CAAE,GACvC,IAAI;IAYE,MAAM;IAgCf,YAAY;IAgBZ,YAAY;IAIZ,WAAW;CAGX;AAID,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,MAAM,CAAC;KACnB;CACD"}
@@ -0,0 +1,3 @@
1
+ declare function styles(): import("lit").CSSResult[];
2
+ export default styles;
3
+ //# sourceMappingURL=toggle.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.styles.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-group/toggle.styles.ts"],"names":[],"mappings":"AAOA,iBAAS,MAAM,8BAmDd;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './selection.controller';
2
+ export type { SelectionType, SelectionState, AcceptedType, } from '@loadsmart/miranda-toolset/dist/selection';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controllers/selection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EACX,aAAa,EACb,cAAc,EACd,YAAY,GACZ,MAAM,2CAA2C,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { ReactiveControllerHost, ReactiveController } from 'lit';
2
+ import type { AcceptedType, SelectionState, SelectionStrategy, SelectionType } from '@loadsmart/miranda-toolset/dist/selection';
3
+ declare type SelectionHost = ReactiveControllerHost & HTMLElement & {
4
+ selection: SelectionState;
5
+ type: SelectionType;
6
+ };
7
+ /**
8
+ * Manage selection through the SelectionStrategy.
9
+ * `host` is expected to have a `selection` and a `type` (`SelectionType`) properties/state.
10
+ */
11
+ declare class SelectionController implements ReactiveController {
12
+ disabled: boolean;
13
+ event: string;
14
+ host: SelectionHost;
15
+ strategy: SelectionStrategy;
16
+ type: SelectionType;
17
+ /**
18
+ *
19
+ * @param {SelectionHost} host
20
+ * @param {SelectionType} type - Type of selection to be managed.
21
+ * @param {string} event - Name of the event that should be listened to.
22
+ */
23
+ constructor(host: SelectionHost, type: SelectionType, event: string);
24
+ hostConnected(): void;
25
+ hostDisconnected(): void;
26
+ hostUpdate(): void;
27
+ /**
28
+ * using arrow function so we keep the lexical context this is necessary
29
+ * because the event itself will happen in the context of the host element.
30
+ */
31
+ _handleSelectionEvent: (e: Event) => void;
32
+ _publish(): void;
33
+ init: (values: AcceptedType[]) => void;
34
+ select: (values: AcceptedType[]) => void;
35
+ unselect: (values: AcceptedType[]) => void;
36
+ toggle: (values: AcceptedType[]) => void;
37
+ subscribe: () => void;
38
+ unsubscribe: () => void;
39
+ }
40
+ export default SelectionController;
41
+ //# sourceMappingURL=selection.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection.controller.d.ts","sourceRoot":"","sources":["../../../src/controllers/selection/selection.controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,MAAM,2CAA2C,CAAC;AAGnD,aAAK,aAAa,GAAG,sBAAsB,GAC1C,WAAW,GAAG;IAAE,SAAS,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAElE;;;GAGG;AACH,cAAM,mBAAoB,YAAW,kBAAkB;IACtD,QAAQ,UAAS;IACjB,KAAK,SAAc;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC;IAEpB;;;;;OAKG;gBACU,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM;IAUpE,aAAa;IAIb,gBAAgB;IAIhB,UAAU;IAWV;;;OAGG;IACH,qBAAqB,MAAQ,KAAK,UA2BhC;IAEF,QAAQ;IAaR,IAAI,WAAa,YAAY,EAAE,UAE7B;IAEF,MAAM,WAAa,YAAY,EAAE,UAI/B;IAEF,QAAQ,WAAa,YAAY,EAAE,UAIjC;IAEF,MAAM,WAAa,YAAY,EAAE,UAI/B;IAEF,SAAS,aAEP;IAEF,WAAW,aAET;CACF;AAED,eAAe,mBAAmB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- export * from './components/text';
1
+ export * from './components/button';
2
2
  export * from './components/card';
3
3
  export * from './components/divider';
4
- export * from './components/progress-bar';
5
4
  export * from './components/layout';
6
- export * from './components/button';
5
+ export * from './components/progress-bar';
6
+ export * from './components/text';
7
+ export * from './components/toggle-group';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}