@frontile/buttons 0.17.0-alpha.3 → 0.17.0-alpha.6
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/declarations/components/button-group.d.ts +5 -3
- package/declarations/components/button-group.d.ts.map +1 -1
- package/declarations/components/button.d.ts +6 -3
- package/declarations/components/button.d.ts.map +1 -1
- package/declarations/components/chip.d.ts +41 -40
- package/declarations/components/chip.d.ts.map +1 -1
- package/declarations/components/close-button.d.ts +39 -0
- package/declarations/components/close-button.d.ts.map +1 -0
- package/declarations/components/divider.d.ts +12 -0
- package/declarations/components/divider.d.ts.map +1 -0
- package/declarations/components/dropdown.d.ts +0 -0
- package/declarations/components/dropdown.d.ts.map +1 -0
- package/declarations/components/listbox/index.d.ts +0 -0
- package/declarations/components/listbox/item.d.ts +59 -0
- package/declarations/components/listbox/item.d.ts.map +1 -0
- package/declarations/components/listbox/listManager.d.ts +47 -0
- package/declarations/components/listbox/listManager.d.ts.map +1 -0
- package/declarations/components/listbox/listbox.d.ts +53 -0
- package/declarations/components/listbox/listbox.d.ts.map +1 -0
- package/declarations/components/listbox/setupListItemModfier.d.ts +22 -0
- package/declarations/components/listbox/setupListItemModfier.d.ts.map +1 -0
- package/declarations/components/listbox.d.ts +2 -0
- package/declarations/components/listbox.d.ts.map +1 -0
- package/declarations/components/progress-bar.d.ts +91 -0
- package/declarations/components/progress-bar.d.ts.map +1 -0
- package/declarations/components/toggle-button.d.ts +5 -3
- package/declarations/components/toggle-button.d.ts.map +1 -1
- package/declarations/index-no8en1_n.d.ts +67 -0
- package/declarations/index.d.ts +5 -4
- package/declarations/index.d.ts.map +1 -1
- package/declarations/listbox-1cp2bD-x.d.ts +67 -0
- package/declarations/listbox-38xau2IA.d.ts +67 -0
- package/declarations/listbox-A_qc5w8r.d.ts +67 -0
- package/declarations/listbox-S1lgfwKX.d.ts +67 -0
- package/declarations/listbox-ZEReOm3F.d.ts +67 -0
- package/declarations/listbox-cAOcxqN8.d.ts +67 -0
- package/declarations/listbox-hhoUlBQR.d.ts +67 -0
- package/declarations/listbox-i1gEINAH.d.ts +67 -0
- package/declarations/listbox-lYENr0uH.d.ts +67 -0
- package/declarations/listbox-no8en1_n.d.ts +67 -0
- package/declarations/listbox-sAR1PFcv.d.ts +67 -0
- package/declarations/listbox-tZZ0yA07.d.ts +67 -0
- package/declarations/template-registry.d.ts +2 -4
- package/declarations/template-registry.d.ts.map +1 -1
- package/dist/_app_/components/close-button.js +1 -0
- package/dist/components/button-group.js +6 -8
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +4 -6
- package/dist/components/button.js.map +1 -1
- package/dist/components/chip.js +5 -7
- package/dist/components/chip.js.map +1 -1
- package/dist/components/close-button.js +43 -0
- package/dist/components/close-button.js.map +1 -0
- package/dist/components/toggle-button.js +4 -6
- package/dist/components/toggle-button.js.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +20 -17
|
@@ -3,9 +3,9 @@ import Button from './button';
|
|
|
3
3
|
import type { ButtonArgs } from './button';
|
|
4
4
|
import ToggleButton from './toggle-button';
|
|
5
5
|
import type { WithBoundArgs } from '@glint/template';
|
|
6
|
-
|
|
6
|
+
interface ButtonGroupArgs extends Pick<ButtonArgs, 'appearance' | 'intent' | 'size' | 'class'> {
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface ButtonGroupSignature {
|
|
9
9
|
Args: ButtonGroupArgs;
|
|
10
10
|
Blocks: {
|
|
11
11
|
default: [
|
|
@@ -17,7 +17,9 @@ export interface ButtonGroupSignature {
|
|
|
17
17
|
};
|
|
18
18
|
Element: HTMLDivElement;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
declare class ButtonGroup extends Component<ButtonGroupSignature> {
|
|
21
21
|
get classNames(): string;
|
|
22
22
|
}
|
|
23
|
+
export { ButtonGroup, type ButtonGroupSignature };
|
|
24
|
+
export default ButtonGroup;
|
|
23
25
|
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/components/button-group.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/components/button-group.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,UAAU,eACR,SAAQ,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;CAAG;AAEzE,UAAU,oBAAoB;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,EAAE,aAAa,CAAC,OAAO,MAAM,EAAE,WAAW,CAAC,CAAC;gBAClD,YAAY,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,WAAW,CAAC,CAAC;aAC/D;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,cAAM,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACvD,IAAI,UAAU,IAAI,MAAM,CAMvB;CAiBF;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -29,11 +29,12 @@ export interface ButtonArgs {
|
|
|
29
29
|
*/
|
|
30
30
|
class?: string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* If button is part of a group. Most of the time, this is automatically set
|
|
33
|
+
* when using the ButtonGroup component.
|
|
33
34
|
*/
|
|
34
35
|
isInGroup?: boolean;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
+
interface ButtonSignature {
|
|
37
38
|
Args: ButtonArgs;
|
|
38
39
|
Blocks: {
|
|
39
40
|
default: [{
|
|
@@ -42,8 +43,10 @@ export interface ButtonSignature {
|
|
|
42
43
|
};
|
|
43
44
|
Element: HTMLButtonElement;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
declare class Button extends Component<ButtonSignature> {
|
|
46
47
|
get type(): string;
|
|
47
48
|
get classNames(): string;
|
|
48
49
|
}
|
|
50
|
+
export { Button, type ButtonSignature };
|
|
51
|
+
export default Button;
|
|
49
52
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAElE;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAE3D;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAElE;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE;QACN,OAAO,EAAE,CAAC;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,cAAM,MAAO,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC7C,IAAI,IAAI,IAAI,MAAM,CAKjB;IAED,IAAI,UAAU,IAAI,MAAM,CAUvB;CAsBF;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,CAAC;AACxC,eAAe,MAAM,CAAC"}
|
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Args: ChipArgs;
|
|
2
|
+
interface ChipSignature {
|
|
3
|
+
Args: {
|
|
4
|
+
/**
|
|
5
|
+
* The chip appearance
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue 'default'
|
|
8
|
+
*/
|
|
9
|
+
appearance?: 'default' | 'outlined' | 'faded';
|
|
10
|
+
/**
|
|
11
|
+
* The intent of the chip
|
|
12
|
+
*/
|
|
13
|
+
intent?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
14
|
+
/**
|
|
15
|
+
* The size of the chip
|
|
16
|
+
*/
|
|
17
|
+
size?: 'sm' | 'md' | 'lg';
|
|
18
|
+
/**
|
|
19
|
+
* The radius the chip
|
|
20
|
+
*/
|
|
21
|
+
radius?: 'none' | 'sm' | 'lg' | 'full';
|
|
22
|
+
/**
|
|
23
|
+
* Option to add dot to the chip
|
|
24
|
+
*/
|
|
25
|
+
withDot?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Function to be called when clicking on the close button.
|
|
28
|
+
* If you pass this argument, the close button will be visible.
|
|
29
|
+
*/
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Disables the clip and disables the close button if any.
|
|
33
|
+
*/
|
|
34
|
+
isDisabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Custom class name, it will override the default ones using Tailwind Merge library.
|
|
37
|
+
*/
|
|
38
|
+
class?: string;
|
|
39
|
+
};
|
|
41
40
|
Blocks: {
|
|
42
41
|
default: [];
|
|
43
42
|
};
|
|
44
43
|
Element: HTMLDivElement;
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
declare class Chip extends Component<ChipSignature> {
|
|
47
46
|
get classNames(): {
|
|
48
47
|
base: string;
|
|
49
48
|
content: string;
|
|
@@ -51,4 +50,6 @@ export default class Chip extends Component<ChipSignature> {
|
|
|
51
50
|
closeButton: string;
|
|
52
51
|
};
|
|
53
52
|
}
|
|
53
|
+
export { Chip, type ChipSignature };
|
|
54
|
+
export default Chip;
|
|
54
55
|
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/components/chip.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/components/chip.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,UAAU,aAAa;IACrB,IAAI,EAAE;QACJ;;;;WAIG;QACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;QAE9C;;WAEG;QACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;QAElE;;WAEG;QACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;QAEvC;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QAErB;;WAEG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,cAAM,IAAK,SAAQ,SAAS,CAAC,aAAa,CAAC;IACzC,IAAI,UAAU;;;;;MAiBb;CAmCF;AAED,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,CAAC;AACpC,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
interface CloseButtonSignature {
|
|
3
|
+
Args: {
|
|
4
|
+
/**
|
|
5
|
+
* The title of the close button
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue 'Close'
|
|
8
|
+
*/
|
|
9
|
+
title?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The icon size
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue 'lg'
|
|
14
|
+
*/
|
|
15
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
16
|
+
/**
|
|
17
|
+
* The function to call when button is clicked
|
|
18
|
+
*/
|
|
19
|
+
onClick?: (event: Event) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Additional class for close button element
|
|
22
|
+
*/
|
|
23
|
+
class?: string;
|
|
24
|
+
};
|
|
25
|
+
Blocks: {
|
|
26
|
+
default: [string | null];
|
|
27
|
+
};
|
|
28
|
+
Element: HTMLButtonElement;
|
|
29
|
+
}
|
|
30
|
+
declare class CloseButton extends Component<CloseButtonSignature> {
|
|
31
|
+
get classes(): {
|
|
32
|
+
base: string;
|
|
33
|
+
icon: string;
|
|
34
|
+
};
|
|
35
|
+
handleClick(event: Event): void;
|
|
36
|
+
}
|
|
37
|
+
export { CloseButton, type CloseButtonSignature };
|
|
38
|
+
export default CloseButton;
|
|
39
|
+
//# sourceMappingURL=close-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close-button.d.ts","sourceRoot":"","sources":["../../src/components/close-button.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,UAAU,oBAAoB;IAC5B,IAAI,EAAE;QACJ;;;;WAIG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;;WAIG;QACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAExC;;WAEG;QACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;QAEjC;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;KAC1B,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,cAAM,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACvD,IAAI,OAAO;;;MAWV;IAEO,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAmDxC;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="ember-source/types/stable/@ember/component/template-only" />
|
|
2
|
+
import type { TOC } from '@ember/component/template-only';
|
|
3
|
+
declare const Divider: TOC<{
|
|
4
|
+
Args: {
|
|
5
|
+
orientation?: 'horizontal' | 'vertical';
|
|
6
|
+
as: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
};
|
|
9
|
+
Element: HTMLDivElement;
|
|
10
|
+
}>;
|
|
11
|
+
export default Divider;
|
|
12
|
+
//# sourceMappingURL=divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.d.ts","sourceRoot":"","sources":["../../src/components/divider.ts"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAkB1D,QAAA,MAAM,OAAO,EAAE,GAAG,CAAC;IACjB,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;QACxC,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB,CAmBC,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/components/dropdown.ts"],"names":[],"mappings":"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"}
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { ListManager, Node } from './listManager';
|
|
3
|
+
export interface ListboxItemSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
manager: ListManager;
|
|
6
|
+
key: string;
|
|
7
|
+
textValue?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
class?: string;
|
|
12
|
+
withDivider?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The appearance of each item
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue 'default'
|
|
17
|
+
*/
|
|
18
|
+
appearance?: 'default' | 'outlined' | 'faded';
|
|
19
|
+
/**
|
|
20
|
+
* The intent of each item
|
|
21
|
+
*/
|
|
22
|
+
intent?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
23
|
+
type?: 'menu' | 'listbox';
|
|
24
|
+
};
|
|
25
|
+
Element: HTMLLIElement;
|
|
26
|
+
Blocks: {
|
|
27
|
+
default: [];
|
|
28
|
+
selectedIcon: [];
|
|
29
|
+
start: [];
|
|
30
|
+
end: [];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
declare class ListboxItem extends Component<ListboxItemSignature> {
|
|
34
|
+
labelId: string;
|
|
35
|
+
el?: HTMLLIElement;
|
|
36
|
+
didInsert: import("ember-modifier").FunctionBasedModifier<{
|
|
37
|
+
Args: {
|
|
38
|
+
Positional: unknown[];
|
|
39
|
+
Named: import("ember-modifier/-private/signature.js").EmptyObject;
|
|
40
|
+
};
|
|
41
|
+
Element: HTMLElement;
|
|
42
|
+
}>;
|
|
43
|
+
get node(): Node | undefined;
|
|
44
|
+
get manager(): ListManager;
|
|
45
|
+
get key(): string;
|
|
46
|
+
onClick(): void;
|
|
47
|
+
get tabindex(): 0 | -1;
|
|
48
|
+
get classNames(): {
|
|
49
|
+
base: string;
|
|
50
|
+
descriptionWrapper: string;
|
|
51
|
+
label: string;
|
|
52
|
+
description: string;
|
|
53
|
+
selectedIcon: string;
|
|
54
|
+
shortcut: string;
|
|
55
|
+
};
|
|
56
|
+
get role(): "menuitem" | "option";
|
|
57
|
+
}
|
|
58
|
+
export { ListboxItem };
|
|
59
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../src/components/listbox/item.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAW3C,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEvD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW,CAAC;QACrB,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;WAIG;QACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;QAE9C;;WAEG;QACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;QAElE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;QACZ,YAAY,EAAE,EAAE,CAAC;QACjB,KAAK,EAAE,EAAE,CAAC;QACV,GAAG,EAAE,EAAE,CAAC;KACT,CAAC;CACH;AAED,cAAM,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACvD,OAAO,SAAiB;IACf,EAAE,CAAC,EAAE,aAAa,CAAC;IAE5B,SAAS;;;;;;OAMN;IAEH,IAAI,IAAI,IAAI,IAAI,GAAG,SAAS,CAK3B;IAED,IAAI,OAAO,IAAI,WAAW,CAOzB;IAED,IAAI,GAAG,IAAI,MAAM,CAOhB;IAGD,OAAO,IAAI,IAAI;IAYf,IAAI,QAAQ,WAKX;IAED,IAAI,UAAU;;;;;;;MA2Bb;IAED,IAAI,IAAI,0BAKP;CA+FF;AA2BD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type SelectionMode = 'none' | 'single' | 'multiple';
|
|
2
|
+
declare class Node {
|
|
3
|
+
el: HTMLLIElement;
|
|
4
|
+
key: string;
|
|
5
|
+
textValue: string;
|
|
6
|
+
isSelected: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
constructor(el: HTMLLIElement, args: Required<NodeArgs>);
|
|
10
|
+
}
|
|
11
|
+
interface NodeArgs {
|
|
12
|
+
key: string;
|
|
13
|
+
textValue?: string;
|
|
14
|
+
isSelected?: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
isActive?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface ListManagerOptions {
|
|
19
|
+
selectionMode?: SelectionMode;
|
|
20
|
+
selectedKeys?: string[];
|
|
21
|
+
disabledKeys?: string[];
|
|
22
|
+
allowEmpty?: boolean;
|
|
23
|
+
onAction?: (key: string) => void;
|
|
24
|
+
onSelectionChange?: (key: string[]) => void;
|
|
25
|
+
}
|
|
26
|
+
declare class ListManager {
|
|
27
|
+
#private;
|
|
28
|
+
searchKeys: string;
|
|
29
|
+
constructor(options?: ListManagerOptions);
|
|
30
|
+
register(el: HTMLLIElement, args: Required<NodeArgs>): void;
|
|
31
|
+
unregister(el: HTMLLIElement): void;
|
|
32
|
+
at(el?: HTMLLIElement): Node | undefined;
|
|
33
|
+
update(options: ListManagerOptions): void;
|
|
34
|
+
selectActiveNode(): void;
|
|
35
|
+
selectNode(node?: Node): void;
|
|
36
|
+
activateNode(node?: Node): void;
|
|
37
|
+
setNextOptionActive(): void;
|
|
38
|
+
setPreviousOptionActive(): void;
|
|
39
|
+
setFirstOptionActive(): void;
|
|
40
|
+
setLastOptionActive(): void;
|
|
41
|
+
search(key: string): void;
|
|
42
|
+
isKeyDisabled(key: string): boolean;
|
|
43
|
+
isKeySelected(key: string): boolean;
|
|
44
|
+
}
|
|
45
|
+
export type { Node, NodeArgs, SelectionMode };
|
|
46
|
+
export { ListManager };
|
|
47
|
+
//# sourceMappingURL=listManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listManager.d.ts","sourceRoot":"","sources":["../../../src/components/listbox/listManager.ts"],"names":[],"mappings":"AAIA,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEpD,cAAM,IAAI;IACR,EAAE,EAAE,aAAa,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAET,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;gBAEf,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAQxD;AAED,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC7C;AAED,cAAM,WAAW;;IACf,UAAU,EAAE,MAAM,CAAM;gBAUZ,OAAO,GAAE,kBAAuB;IAI5C,QAAQ,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI;IAI3D,UAAU,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;IAInC,EAAE,CAAC,EAAE,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS;IAIxC,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAqBzC,gBAAgB,IAAI,IAAI;IAOxB,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI;IAkB7B,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI;IAQ/B,mBAAmB,IAAI,IAAI;IAU3B,uBAAuB,IAAI,IAAI;IAU/B,oBAAoB,IAAI,IAAI;IAU5B,mBAAmB,IAAI,IAAI;IAU3B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAkBzB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAuEpC;AAED,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { ListManager, type SelectionMode } from './listManager';
|
|
3
|
+
import { ListboxItem } from './item';
|
|
4
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
5
|
+
type ItemCompBounded = WithBoundArgs<typeof ListboxItem, 'manager'>;
|
|
6
|
+
export interface ListboxSignature<T = unknown> {
|
|
7
|
+
Args: {
|
|
8
|
+
/**
|
|
9
|
+
* @default 'listbox'
|
|
10
|
+
*/
|
|
11
|
+
type?: 'menu' | 'listbox';
|
|
12
|
+
selectionMode?: SelectionMode;
|
|
13
|
+
selectedKeys?: string[];
|
|
14
|
+
disabledKeys?: string[];
|
|
15
|
+
allowEmpty?: boolean;
|
|
16
|
+
items?: T[];
|
|
17
|
+
class?: string;
|
|
18
|
+
isKeyboardEventsEnabled?: boolean;
|
|
19
|
+
onAction?: (key: string) => void;
|
|
20
|
+
onSelectionChange?: (key: string[]) => void;
|
|
21
|
+
/**
|
|
22
|
+
* The appearance of each item
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue 'default'
|
|
25
|
+
*/
|
|
26
|
+
appearance?: 'default' | 'outlined' | 'faded';
|
|
27
|
+
/**
|
|
28
|
+
* The intent of each item
|
|
29
|
+
*/
|
|
30
|
+
intent?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
31
|
+
};
|
|
32
|
+
Element: HTMLUListElement;
|
|
33
|
+
Blocks: {
|
|
34
|
+
item: [{
|
|
35
|
+
item: T;
|
|
36
|
+
Item: ItemCompBounded;
|
|
37
|
+
}];
|
|
38
|
+
default: [{
|
|
39
|
+
Item: ItemCompBounded;
|
|
40
|
+
}];
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export default class Listbox extends Component<ListboxSignature> {
|
|
44
|
+
listManager: ListManager;
|
|
45
|
+
handleKeyPress(event: KeyboardEvent): void;
|
|
46
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
47
|
+
handleKeyUp(event: KeyboardEvent): void;
|
|
48
|
+
get classNames(): string;
|
|
49
|
+
updateListManager(): void;
|
|
50
|
+
get role(): "menu" | "listbox";
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=listbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listbox.d.ts","sourceRoot":"","sources":["../../../src/components/listbox/listbox.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,KAAK,eAAe,GAAG,aAAa,CAAC,OAAO,WAAW,EAAE,SAAS,CAAC,CAAC;AAEpE,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC3C,IAAI,EAAE;QACJ;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAElC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QACjC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;QAE5C;;;;WAIG;QACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;QAE9C;;WAEG;QACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;KACnE,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;YAAE,IAAI,EAAE,CAAC,CAAC;YAAC,IAAI,EAAE,eAAe,CAAA;SAAE,CAAC,CAAC;QAC3C,OAAO,EAAE,CAAC;YAAE,IAAI,EAAE,eAAe,CAAA;SAAE,CAAC,CAAC;KACtC,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC9D,WAAW,cAOR;IAGH,cAAc,CAAC,KAAK,EAAE,aAAa;IAiBnC,aAAa,CAAC,KAAK,EAAE,aAAa;IAclC,WAAW,CAAC,KAAK,EAAE,aAAa;IAehC,IAAI,UAAU,WAGb;IAGD,iBAAiB;IASjB,IAAI,IAAI,uBAKP;CA+CF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Modifier, { type ArgsFor } from 'ember-modifier';
|
|
2
|
+
import { ListManager, type NodeArgs } from './listManager';
|
|
3
|
+
interface SetupListItemModifierSignature {
|
|
4
|
+
Args: {
|
|
5
|
+
Positional: [manager: ListManager];
|
|
6
|
+
Named: Pick<NodeArgs, 'key' | 'textValue'>;
|
|
7
|
+
};
|
|
8
|
+
Element: HTMLLIElement;
|
|
9
|
+
}
|
|
10
|
+
declare class SetupListItem extends Modifier<SetupListItemModifierSignature> {
|
|
11
|
+
element?: HTMLLIElement;
|
|
12
|
+
manager?: ListManager;
|
|
13
|
+
constructor(owner: any, args: ArgsFor<SetupListItemModifierSignature>);
|
|
14
|
+
modify(element: HTMLLIElement, [manager]: [ListManager], args: ArgsFor<SetupListItemModifierSignature>['named']): void;
|
|
15
|
+
update: (args: ArgsFor<SetupListItemModifierSignature>['named']) => void;
|
|
16
|
+
register: (el: HTMLLIElement, manager: ListManager, args: ArgsFor<SetupListItemModifierSignature>['named']) => void;
|
|
17
|
+
unregister: (instance: SetupListItem) => void;
|
|
18
|
+
mouseEnter: () => void;
|
|
19
|
+
mouseLeave: () => void;
|
|
20
|
+
}
|
|
21
|
+
export { SetupListItem };
|
|
22
|
+
//# sourceMappingURL=setupListItemModfier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupListItemModfier.d.ts","sourceRoot":"","sources":["../../../src/components/listbox/setupListItemModfier.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,EAAE,EAAE,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE3D,UAAU,8BAA8B;IACtC,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,GAAG,WAAW,CAAC,CAAC;KAC5C,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,cAAM,aAAc,SAAQ,QAAQ,CAAC,8BAA8B,CAAC;IAClE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,WAAW,CAAC;gBAGV,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,8BAA8B,CAAC;IAKrE,MAAM,CACJ,OAAO,EAAE,aAAa,EACtB,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,EACxB,IAAI,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAC,GACrD,IAAI;IAQP,MAAM,SAAU,QAAQ,8BAA8B,CAAC,CAAC,OAAO,CAAC,KAAG,IAAI,CAcrE;IAEF,QAAQ,OACF,aAAa,WACR,WAAW,QACd,QAAQ,8BAA8B,CAAC,CAAC,OAAO,CAAC,KACrD,IAAI,CAsBL;IAEF,UAAU,aAAc,aAAa,KAAG,IAAI,CAY1C;IAEF,UAAU,QAAO,IAAI,CAKnB;IAEF,UAAU,QAAO,IAAI,CAOnB;CACH;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listbox.d.ts","sourceRoot":"","sources":["../../src/components/listbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/// <reference types="ember-source/types/stable/@ember/template" />
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import type { SafeString } from '@ember/template';
|
|
4
|
+
interface ProgressBarSignature {
|
|
5
|
+
Args: {
|
|
6
|
+
/**
|
|
7
|
+
* The intent of the progress bar
|
|
8
|
+
*/
|
|
9
|
+
intent?: 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
10
|
+
/**
|
|
11
|
+
* The size of the progress bar
|
|
12
|
+
*/
|
|
13
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
14
|
+
/**
|
|
15
|
+
* The radius the progress bar
|
|
16
|
+
*/
|
|
17
|
+
radius?: 'none' | 'sm' | 'lg' | 'full';
|
|
18
|
+
/**
|
|
19
|
+
* The current progress value
|
|
20
|
+
*/
|
|
21
|
+
progress?: number;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* The smallest value allowed for the input
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue 0
|
|
27
|
+
*/
|
|
28
|
+
minValue?: number;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* The largest value allowed for the input
|
|
32
|
+
*
|
|
33
|
+
*@defaultValue 100
|
|
34
|
+
*/
|
|
35
|
+
maxValue?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Whether presentation is indeterminate when progress isn't known.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue false
|
|
40
|
+
*/
|
|
41
|
+
isIndeterminate?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The content to display as the label.
|
|
44
|
+
*/
|
|
45
|
+
label?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The content to display as the value's label (e.g. 1 of 4).
|
|
48
|
+
*/
|
|
49
|
+
valueLabel?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the value's label is displayed.
|
|
52
|
+
* True by default if there's a label, false by default if not.
|
|
53
|
+
*/
|
|
54
|
+
showValueLabel?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The display format of the value.
|
|
57
|
+
* Values are formatted as a percentage by default.
|
|
58
|
+
*/
|
|
59
|
+
formatOptions?: Intl.NumberFormatOptions;
|
|
60
|
+
/**
|
|
61
|
+
* The content to display as the hint.
|
|
62
|
+
*/
|
|
63
|
+
hint?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Custom class name, it will override the default ones using Tailwind Merge library.
|
|
66
|
+
*/
|
|
67
|
+
class?: string;
|
|
68
|
+
};
|
|
69
|
+
Blocks: {
|
|
70
|
+
default: [];
|
|
71
|
+
};
|
|
72
|
+
Element: HTMLDivElement;
|
|
73
|
+
}
|
|
74
|
+
declare class ProgressBar extends Component<ProgressBarSignature> {
|
|
75
|
+
id: string;
|
|
76
|
+
get classNames(): {
|
|
77
|
+
base: string;
|
|
78
|
+
progress: string;
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
81
|
+
get minValue(): number;
|
|
82
|
+
get maxValue(): number;
|
|
83
|
+
get progress(): number;
|
|
84
|
+
get percentage(): number;
|
|
85
|
+
get showValueLabel(): boolean;
|
|
86
|
+
get formattedValueLabel(): string;
|
|
87
|
+
get progressWidth(): SafeString;
|
|
88
|
+
}
|
|
89
|
+
export { ProgressBar, type ProgressBarSignature };
|
|
90
|
+
export default ProgressBar;
|
|
91
|
+
//# sourceMappingURL=progress-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../src/components/progress-bar.ts"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,UAAU,oBAAoB;IAC5B,IAAI,EAAE;QACJ;;WAEG;QACH,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;QAElE;;WAEG;QACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAEjC;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;QAEvC;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;;WAIG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;;WAGG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;QAEzB;;;WAGG;QACH,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;QAEzC;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,cAAM,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACvD,EAAE,SAAiB;IAEnB,IAAI,UAAU;;;;MAeb;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,UAAU,IAAI,MAAM,CAIvB;IAED,IAAI,cAAc,IAAI,OAAO,CAM5B;IAED,IAAI,mBAAmB,IAAI,MAAM,CAwBhC;IAED,IAAI,aAAa,IAAI,UAAU,CAM9B;CAiDF;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import type { ButtonArgs } from './button';
|
|
3
|
-
|
|
3
|
+
interface ToggleButtonArgs extends Pick<ButtonArgs, 'intent' | 'size' | 'class' | 'isInGroup'> {
|
|
4
4
|
/**
|
|
5
5
|
* If the button is currently selected
|
|
6
6
|
*
|
|
@@ -12,16 +12,18 @@ export interface ToggleButtonArgs extends Pick<ButtonArgs, 'intent' | 'size' | '
|
|
|
12
12
|
*/
|
|
13
13
|
onChange?: (isSelected: boolean) => void;
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
interface ToggleButtonSignature {
|
|
16
16
|
Args: ToggleButtonArgs;
|
|
17
17
|
Blocks: {
|
|
18
18
|
default: [];
|
|
19
19
|
};
|
|
20
20
|
Element: HTMLButtonElement;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
declare class ToggleButton extends Component<ToggleButtonSignature> {
|
|
23
23
|
get classNames(): string;
|
|
24
24
|
get isSelected(): boolean;
|
|
25
25
|
onChange: () => void;
|
|
26
26
|
}
|
|
27
|
+
export { ToggleButton, type ToggleButtonSignature };
|
|
28
|
+
export default ToggleButton;
|
|
27
29
|
//# sourceMappingURL=toggle-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../src/components/toggle-button.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,
|
|
1
|
+
{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../src/components/toggle-button.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,gBACR,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;IACnE;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,cAAM,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACzD,IAAI,UAAU,IAAI,MAAM,CAWvB;IAED,IAAI,UAAU,YAEb;IAED,QAAQ,aAIN;CAgBH;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,qBAAqB,EAAE,CAAC;AACpD,eAAe,YAAY,CAAC"}
|