ember-primitives 0.5.0 → 0.7.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/dist/_app_/components/avatar.js +1 -0
- package/dist/components/-private/typed-elements.js +3 -1
- package/dist/components/-private/typed-elements.js.map +1 -1
- package/dist/components/avatar.js +149 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/form.js.map +1 -1
- package/dist/components/one-time-password/buttons.js +27 -0
- package/dist/components/one-time-password/buttons.js.map +1 -0
- package/dist/components/one-time-password/index.js +3 -0
- package/dist/components/one-time-password/index.js.map +1 -0
- package/dist/components/one-time-password/input.js +149 -0
- package/dist/components/one-time-password/input.js.map +1 -0
- package/dist/components/one-time-password/otp.js +69 -0
- package/dist/components/one-time-password/otp.js.map +1 -0
- package/dist/components/one-time-password/utils.js +102 -0
- package/dist/components/one-time-password/utils.js.map +1 -0
- package/dist/components/popover.js +4 -4
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal-targets.js.map +1 -1
- package/dist/components/portal.js +3 -3
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.js +13 -11
- package/dist/components/progress.js.map +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/violations.css +22 -5
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/test-support/index.js +1 -0
- package/dist/test-support/index.js.map +1 -1
- package/dist/test-support/otp.js +31 -0
- package/dist/test-support/otp.js.map +1 -0
- package/dist-types/components/-private/typed-elements.d.ts.map +1 -1
- package/dist-types/components/avatar.d.ts +72 -0
- package/dist-types/components/avatar.d.ts.map +1 -0
- package/dist-types/components/form.d.ts.map +1 -1
- package/dist-types/components/one-time-password/buttons.d.ts +14 -0
- package/dist-types/components/one-time-password/buttons.d.ts.map +1 -0
- package/dist-types/components/one-time-password/index.d.ts +3 -0
- package/dist-types/components/one-time-password/index.d.ts.map +1 -0
- package/dist-types/components/one-time-password/input.d.ts +76 -0
- package/dist-types/components/one-time-password/input.d.ts.map +1 -0
- package/dist-types/components/one-time-password/otp.d.ts +57 -0
- package/dist-types/components/one-time-password/otp.d.ts.map +1 -0
- package/dist-types/components/one-time-password/utils.d.ts +4 -0
- package/dist-types/components/one-time-password/utils.d.ts.map +1 -0
- package/dist-types/components/popover.d.ts +18 -18
- package/dist-types/components/popover.d.ts.map +1 -1
- package/dist-types/components/progress.d.ts +19 -19
- package/dist-types/components/progress.d.ts.map +1 -1
- package/dist-types/index.d.ts +2 -0
- package/dist-types/index.d.ts.map +1 -1
- package/dist-types/test-support/index.d.ts +1 -0
- package/dist-types/test-support/index.d.ts.map +1 -1
- package/dist-types/test-support/otp.d.ts +6 -0
- package/dist-types/test-support/otp.d.ts.map +1 -0
- package/package.json +40 -22
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import type { TOC } from '@ember/component/template-only';
|
|
3
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
4
|
+
declare const Fields: TOC<{
|
|
5
|
+
/**
|
|
6
|
+
* Any attributes passed to this component will be applied to each input.
|
|
7
|
+
*/
|
|
8
|
+
Element: HTMLInputElement;
|
|
9
|
+
Args: {
|
|
10
|
+
fields: unknown[];
|
|
11
|
+
labelFn: (index: number) => string;
|
|
12
|
+
handleChange: (event: Event) => void;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
export declare class OTPInput extends Component<{
|
|
16
|
+
/**
|
|
17
|
+
* The collection of individual OTP inputs are contained by a fieldset.
|
|
18
|
+
* Applying the `disabled` attribute to this fieldset will disable
|
|
19
|
+
* all of the inputs, if that's desired.
|
|
20
|
+
*/
|
|
21
|
+
Element: HTMLFieldSetElement;
|
|
22
|
+
Args: {
|
|
23
|
+
/**
|
|
24
|
+
* How many characters the one-time-password field should be
|
|
25
|
+
* Defaults to 6
|
|
26
|
+
*/
|
|
27
|
+
length?: number;
|
|
28
|
+
/**
|
|
29
|
+
* To Customize the label of the input fields, you may pass a function.
|
|
30
|
+
* By default, this is `Please enter OTP character ${index + 1}`.
|
|
31
|
+
*/
|
|
32
|
+
labelFn?: (index: number) => string;
|
|
33
|
+
/**
|
|
34
|
+
* If passed, this function will be called when the <Input> changes.
|
|
35
|
+
* All fields are considered one input.
|
|
36
|
+
*/
|
|
37
|
+
onChange?: (data: {
|
|
38
|
+
/**
|
|
39
|
+
* The text from the collective <Input>
|
|
40
|
+
*
|
|
41
|
+
* `code` _may_ be shorter than `length`
|
|
42
|
+
* if the user has not finished typing / pasting their code
|
|
43
|
+
*/
|
|
44
|
+
code: string;
|
|
45
|
+
/**
|
|
46
|
+
* will be `true` if `code`'s length matches the passed `@length` or the default of 6
|
|
47
|
+
*/
|
|
48
|
+
complete: boolean;
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* The last input event received
|
|
52
|
+
*/
|
|
53
|
+
event: Event) => void;
|
|
54
|
+
};
|
|
55
|
+
Blocks: {
|
|
56
|
+
/**
|
|
57
|
+
* Optionally, you may control how the Fields are rendered, with proceeding text,
|
|
58
|
+
* additional attributes added, etc.
|
|
59
|
+
*
|
|
60
|
+
* This is how you can add custom validation to each input field.
|
|
61
|
+
*/
|
|
62
|
+
default?: [fields: WithBoundArgs<typeof Fields, 'fields' | 'handleChange' | 'labelFn'>];
|
|
63
|
+
};
|
|
64
|
+
}> {
|
|
65
|
+
#private;
|
|
66
|
+
/**
|
|
67
|
+
* This is debounced, because we bind to each input,
|
|
68
|
+
* but only want to emit one change event if someone pastes
|
|
69
|
+
* multiple characters
|
|
70
|
+
*/
|
|
71
|
+
handleChange: (event: Event) => void;
|
|
72
|
+
get length(): number;
|
|
73
|
+
get fields(): any[];
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components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|
1
|
+
import { Reset, Submit } from './buttons';
|
|
2
|
+
import { OTPInput } from './input';
|
|
3
|
+
import type { TOC } from '@ember/component/template-only';
|
|
4
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
5
|
+
export declare const OTP: TOC<{
|
|
6
|
+
/**
|
|
7
|
+
* The overall OTP Input is in its own form.
|
|
8
|
+
* Modern UI/UX Patterns usually have this sort of field
|
|
9
|
+
* as its own page, thus within its own form.
|
|
10
|
+
*
|
|
11
|
+
* By default, only the 'submit' event is bound, and is
|
|
12
|
+
* what calls the `@onSubmit` argument.
|
|
13
|
+
*/
|
|
14
|
+
Element: HTMLFormElement;
|
|
15
|
+
Args: {
|
|
16
|
+
/**
|
|
17
|
+
* How many characters the one-time-password field should be
|
|
18
|
+
* Defaults to 6
|
|
19
|
+
*/
|
|
20
|
+
length?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The on submit callback will give you the entered
|
|
23
|
+
* one-time-password code.
|
|
24
|
+
*
|
|
25
|
+
* It will be called when the user manually clicks the 'submit'
|
|
26
|
+
* button or when the full code is pasted and meats the validation
|
|
27
|
+
* criteria.
|
|
28
|
+
*/
|
|
29
|
+
onSubmit: (data: {
|
|
30
|
+
code: string;
|
|
31
|
+
}) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether or not to auto-submit after the code has been pasted
|
|
34
|
+
* in to the collective "field". Default is true
|
|
35
|
+
*/
|
|
36
|
+
autoSubmit?: boolean;
|
|
37
|
+
};
|
|
38
|
+
Blocks: {
|
|
39
|
+
default: [
|
|
40
|
+
{
|
|
41
|
+
/**
|
|
42
|
+
* The collective input field that the OTP code will be typed/pasted in to
|
|
43
|
+
*/
|
|
44
|
+
Input: WithBoundArgs<typeof OTPInput, 'length' | 'onChange'>;
|
|
45
|
+
/**
|
|
46
|
+
* Button with `type="submit"` to submit the form
|
|
47
|
+
*/
|
|
48
|
+
Submit: typeof Submit;
|
|
49
|
+
/**
|
|
50
|
+
* Pre-wired button to reset the form
|
|
51
|
+
*/
|
|
52
|
+
Reset: typeof Reset;
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
};
|
|
56
|
+
}>;
|
|
57
|
+
//# sourceMappingURL=otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.d.ts","sourceRoot":"","sources":["../../../src/components/one-time-password/otp.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAwDrD,eAAO,MAAM,GAAG,EAAE,GAAG,CAAC;IACpB;;;;;;;OAOG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB,IAAI,EAAE;QACJ;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;;;;;;WAOG;QACH,QAAQ,EAAE,CAAC,IAAI,EAAE;YAAE,IAAI,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI,CAAC;QAE3C;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE;;mBAEG;gBACH,KAAK,EAAE,aAAa,CAAC,OAAO,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAC,CAAC;gBAC7D;;mBAEG;gBACH,MAAM,EAAE,OAAO,MAAM,CAAC;gBACtB;;mBAEG;gBACH,KAAK,EAAE,OAAO,KAAK,CAAC;aACrB;SACF,CAAC;KACH,CAAC;CACH,CAYC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function handleNavigation(event: KeyboardEvent): void;
|
|
2
|
+
export declare const autoAdvance: (event: Event) => void;
|
|
3
|
+
export declare function getCollectiveValue(elementTarget: EventTarget | null, length: number): string | undefined;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/one-time-password/utils.ts"],"names":[],"mappings":"AAiBA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,QASpD;AA6CD,eAAO,MAAM,WAAW,UAAW,KAAK,SA0BvC,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,WAAW,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,sBA0CnF"}
|
|
@@ -52,12 +52,12 @@ export interface Signature {
|
|
|
52
52
|
*/
|
|
53
53
|
strategy?: HookSignature['Args']['Named']['strategy'];
|
|
54
54
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
* By default, the popover is portaled.
|
|
56
|
+
* If you don't control your CSS, and the positioning of the popover content
|
|
57
|
+
* is misbehaving, you may pass "@inline={{true}}" to opt out of portalling.
|
|
58
|
+
*
|
|
59
|
+
* Inline may also be useful in nested menus, where you know exactly how the nesting occurs
|
|
60
|
+
*/
|
|
61
61
|
inline?: boolean;
|
|
62
62
|
};
|
|
63
63
|
Blocks: {
|
|
@@ -83,18 +83,18 @@ declare const Content: TOC<{
|
|
|
83
83
|
}>;
|
|
84
84
|
inline?: boolean;
|
|
85
85
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
* By default the popover content is wrapped in a div.
|
|
87
|
+
* You may change this by supplying the name of an element here.
|
|
88
|
+
*
|
|
89
|
+
* For example:
|
|
90
|
+
* ```gjs
|
|
91
|
+
* <Popover as |p|>
|
|
92
|
+
* <p.Content @as="dialog">
|
|
93
|
+
* this is now focus trapped
|
|
94
|
+
* </p.Content>
|
|
95
|
+
* </Popover>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
98
|
as?: string;
|
|
99
99
|
};
|
|
100
100
|
Blocks: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAMvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEhF,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QACJ;;;;WAIG;QACH,WAAW,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC;QAC5D;;;;WAIG;QACH,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;QAC1D;;;;WAIG;QACH,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC;QAChE;;;;;;;;;;;;WAYG;QACH,SAAS,CAAC,EAAE,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,EAAE,GAAG,QAAQ,GAAG,MAAM,EAAE,CAAC;QAC9E;;;;WAIG;QACH,YAAY,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC;QAC9D;;;;;;WAMG;QACH,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC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SAAS,CAuBjC,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -5,39 +5,39 @@ export interface Signature {
|
|
|
5
5
|
Element: HTMLDivElement;
|
|
6
6
|
Args: {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
* The current progress
|
|
9
|
+
* This may be less than 0 or more than `max`,
|
|
10
|
+
* but the resolved value (managed internally, and yielded out)
|
|
11
|
+
* does not exceed the range [0, max]
|
|
12
|
+
*/
|
|
13
13
|
value: number;
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* The max value, defaults to 100
|
|
16
|
+
*/
|
|
17
17
|
max?: number;
|
|
18
18
|
};
|
|
19
19
|
Blocks: {
|
|
20
20
|
default: [
|
|
21
21
|
{
|
|
22
22
|
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
* The indicator element with some state applied.
|
|
24
|
+
* This can be used to style the progress of bar.
|
|
25
|
+
*/
|
|
26
26
|
Indicator: WithBoundArgs<typeof Indicator, 'value' | 'max' | 'percent'>;
|
|
27
27
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
* The value as a percent of how far along the indicator should be
|
|
29
|
+
* positioned, between 0 and 100.
|
|
30
|
+
* Will be rounded to two decimal places.
|
|
31
|
+
*/
|
|
32
32
|
percent: number;
|
|
33
33
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
* The value as a percent of how far along the indicator should be positioned,
|
|
35
|
+
* between 0 and 1
|
|
36
|
+
*/
|
|
37
37
|
decimal: number;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
* The resolved value within the limits of the progress bar.
|
|
40
|
+
*/
|
|
41
41
|
value: number;
|
|
42
42
|
}
|
|
43
43
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ;;;;;
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ;;;;;WAKG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE;;;mBAGG;gBACH,SAAS,EAAE,aAAa,CAAC,OAAO,SAAS,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC,CAAC;gBACxE;;;;mBAIG;gBACH,OAAO,EAAE,MAAM,CAAC;gBAChB;;;mBAGG;gBACH,OAAO,EAAE,MAAM,CAAC;gBAChB;;mBAEG;gBACH,KAAK,EAAE,MAAM,CAAC;aACf;SACF,CAAC;KACH,CAAC;CACH;AA0CD,QAAA,MAAM,SAAS,EAAE,GAAG,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAC;CACzB,CAaC,CAAC;AAEH,qBAAa,QAAS,SAAQ,SAAS,CAAC,SAAS,CAAC;IAChD,IAAI,GAAG,WAEN;IAED,IAAI,KAAK,WAER;IAED,IAAI,UAAU,WAEb;IAED,IAAI,OAAO,WAEV;IAED,IAAI,OAAO,WAEV;CA4BF;AAED,eAAe,QAAQ,CAAC"}
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { Avatar } from './components/avatar';
|
|
1
2
|
export { Dialog, Dialog as Modal } from './components/dialog';
|
|
2
3
|
export { ExternalLink } from './components/external-link';
|
|
3
4
|
export { Form } from './components/form';
|
|
4
5
|
export { Link } from './components/link';
|
|
6
|
+
export { OTP, OTPInput } from './components/one-time-password/index';
|
|
5
7
|
export { Popover } from './components/popover';
|
|
6
8
|
export { Portal } from './components/portal';
|
|
7
9
|
export { PortalTargets } from './components/portal-targets';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} code the code to fill the input(s) with.
|
|
3
|
+
* @param {string} [ selector ] if there are multiple OTP components on a page, this can be used to select one of them.
|
|
4
|
+
*/
|
|
5
|
+
export declare function fillOTP(code: string, selector?: string): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otp.d.ts","sourceRoot":"","sources":["../../src/test-support/otp.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,iBAmC5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Making apps easier to build",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -18,21 +18,23 @@
|
|
|
18
18
|
"@embroider/addon-shim": "^1.8.6",
|
|
19
19
|
"@embroider/macros": "1.13.1",
|
|
20
20
|
"@floating-ui/dom": "^1.5.1",
|
|
21
|
-
"ember-element-helper": "^0.8.
|
|
21
|
+
"ember-element-helper": "^0.8.4",
|
|
22
22
|
"ember-velcro": "^2.1.3",
|
|
23
23
|
"tracked-toolbox": "^2.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@arethetypeswrong/cli": "^0.
|
|
27
|
-
"@babel/core": "^7.22.
|
|
28
|
-
"@babel/eslint-parser": "^7.22.
|
|
26
|
+
"@arethetypeswrong/cli": "^0.10.1",
|
|
27
|
+
"@babel/core": "^7.22.15",
|
|
28
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
29
29
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
30
|
-
"@babel/plugin-proposal-decorators": "^7.22.
|
|
30
|
+
"@babel/plugin-proposal-decorators": "^7.22.15",
|
|
31
31
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
32
32
|
"@babel/plugin-syntax-decorators": "^7.22.10",
|
|
33
|
-
"@babel/plugin-transform-class-static-block": "^7.22.
|
|
33
|
+
"@babel/plugin-transform-class-static-block": "^7.22.11",
|
|
34
34
|
"@babel/plugin-transform-private-methods": "^7.22.5",
|
|
35
|
-
"@babel/preset-typescript": "^7.22.
|
|
35
|
+
"@babel/preset-typescript": "^7.22.15",
|
|
36
|
+
"@ember/test-helpers": "^3.2.0",
|
|
37
|
+
"@ember/test-waiters": "^3.0.2",
|
|
36
38
|
"@embroider/addon-dev": "4.1.0",
|
|
37
39
|
"@glimmer/component": "^1.1.2",
|
|
38
40
|
"@glimmer/tracking": "^1.1.2",
|
|
@@ -42,30 +44,30 @@
|
|
|
42
44
|
"@glint/template": "^1.1.0",
|
|
43
45
|
"@nullvoxpopuli/eslint-configs": "^3.2.2",
|
|
44
46
|
"@rollup/plugin-babel": "^6.0.3",
|
|
45
|
-
"@rollup/plugin-node-resolve": "^15.1
|
|
46
|
-
"@rollup/plugin-typescript": "^11.1.
|
|
47
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
48
|
+
"@rollup/plugin-typescript": "^11.1.3",
|
|
47
49
|
"@tsconfig/ember": "^3.0.0",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
49
|
-
"@typescript-eslint/parser": "^6.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^6.6.0",
|
|
51
|
+
"@typescript-eslint/parser": "^6.6.0",
|
|
50
52
|
"babel-plugin-ember-template-compilation": "^2.2.0",
|
|
51
|
-
"concurrently": "^8.2.
|
|
53
|
+
"concurrently": "^8.2.1",
|
|
52
54
|
"ember-modifier": "^4.1.0",
|
|
53
55
|
"ember-resources": "^6.4.0",
|
|
54
|
-
"ember-source": "~5.
|
|
56
|
+
"ember-source": "~5.3.0",
|
|
55
57
|
"ember-template-imports": "^3.4.2",
|
|
56
58
|
"ember-template-lint": "^5.11.2",
|
|
57
|
-
"eslint": "^8.
|
|
59
|
+
"eslint": "^8.48.0",
|
|
58
60
|
"eslint-config-prettier": "^9.0.0",
|
|
59
|
-
"eslint-plugin-ember": "^11.
|
|
61
|
+
"eslint-plugin-ember": "^11.11.1",
|
|
60
62
|
"eslint-plugin-node": "^11.1.0",
|
|
61
63
|
"eslint-plugin-prettier": "^5.0.0",
|
|
62
|
-
"prettier": "^3.0.
|
|
63
|
-
"prettier-plugin-ember-template-tag": "^1.0
|
|
64
|
-
"publint": "^0.2.
|
|
65
|
-
"rollup": "~3.
|
|
66
|
-
"rollup-plugin-copy": "^3.
|
|
64
|
+
"prettier": "^3.0.3",
|
|
65
|
+
"prettier-plugin-ember-template-tag": "^1.1.0",
|
|
66
|
+
"publint": "^0.2.2",
|
|
67
|
+
"rollup": "~3.29.0",
|
|
68
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
67
69
|
"rollup-plugin-glimmer-template-tag": "^0.4.1",
|
|
68
|
-
"typescript": "^5.
|
|
70
|
+
"typescript": "^5.2.2"
|
|
69
71
|
},
|
|
70
72
|
"publishConfig": {
|
|
71
73
|
"registry": "https://registry.npmjs.org"
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
"type": "addon",
|
|
79
81
|
"main": "addon-main.cjs",
|
|
80
82
|
"app-js": {
|
|
83
|
+
"./components/avatar.js": "./dist/_app_/components/avatar.js",
|
|
81
84
|
"./components/dialog.js": "./dist/_app_/components/dialog.js",
|
|
82
85
|
"./components/external-link.js": "./dist/_app_/components/external-link.js",
|
|
83
86
|
"./components/form.js": "./dist/_app_/components/form.js",
|
|
@@ -97,6 +100,10 @@
|
|
|
97
100
|
"types": "./dist-types/index.d.ts",
|
|
98
101
|
"default": "./dist/index.js"
|
|
99
102
|
},
|
|
103
|
+
"./one-time-password": {
|
|
104
|
+
"types": "./dist-types/components/one-time-password/index.d.ts",
|
|
105
|
+
"default": "./dist/components/one-time-password/index.js"
|
|
106
|
+
},
|
|
100
107
|
"./*": {
|
|
101
108
|
"types": "./dist-types/*.d.ts",
|
|
102
109
|
"default": "./dist/*.js"
|
|
@@ -121,12 +128,23 @@
|
|
|
121
128
|
"extends": "../package.json"
|
|
122
129
|
},
|
|
123
130
|
"peerDependencies": {
|
|
131
|
+
"@ember/test-helpers": "^3.2.0",
|
|
132
|
+
"@ember/test-waiters": "^3.0.2",
|
|
124
133
|
"@glimmer/component": ">= 1.1.2",
|
|
125
134
|
"@glimmer/tracking": ">= 1.1.2",
|
|
135
|
+
"@glint/template": ">= 1.0.0",
|
|
126
136
|
"ember-modifier": ">= 4.1.0",
|
|
127
137
|
"ember-resources": ">= 6.1.0",
|
|
128
138
|
"ember-source": ">= 4.12.0"
|
|
129
139
|
},
|
|
140
|
+
"peerDependenciesMeta": {
|
|
141
|
+
"@ember/test-helpers": {
|
|
142
|
+
"optional": true
|
|
143
|
+
},
|
|
144
|
+
"@glint/template": {
|
|
145
|
+
"optional": true
|
|
146
|
+
}
|
|
147
|
+
},
|
|
130
148
|
"scripts": {
|
|
131
149
|
"build": "concurrently 'npm:build:*'",
|
|
132
150
|
"build:js": "rollup --config ./rollup.config.mjs",
|