ember-primitives 0.26.0 → 0.27.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/declarations/-private.d.ts +5 -0
- package/declarations/-private.d.ts.map +1 -0
- package/declarations/components/zoetrope/index.d.ts +1 -56
- package/declarations/components/zoetrope/index.d.ts.map +1 -1
- package/declarations/components/zoetrope/types.d.ts +57 -0
- package/declarations/components/zoetrope/types.d.ts.map +1 -0
- package/declarations/components/zoetrope.d.ts +2 -0
- package/declarations/components/zoetrope.d.ts.map +1 -1
- package/declarations/index.d.ts +1 -2
- package/declarations/index.d.ts.map +1 -1
- package/declarations/tabster.d.ts +24 -0
- package/declarations/tabster.d.ts.map +1 -0
- package/declarations/test-support/a11y.d.ts +3 -6
- package/declarations/test-support/a11y.d.ts.map +1 -1
- package/declarations/test-support/index.d.ts +1 -0
- package/declarations/test-support/index.d.ts.map +1 -1
- package/dist/-private.js +7 -0
- package/dist/-private.js.map +1 -0
- package/dist/components/zoetrope/types.js +2 -0
- package/dist/components/zoetrope/types.js.map +1 -0
- package/dist/components/zoetrope.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tabster.js +38 -0
- package/dist/tabster.js.map +1 -0
- package/dist/test-support/a11y.js +11 -5
- package/dist/test-support/a11y.js.map +1 -1
- package/dist/test-support/index.js +1 -0
- package/dist/test-support/index.js.map +1 -1
- package/package.json +3 -5
- package/declarations/services/ember-primitives/setup.d.ts +0 -27
- package/declarations/services/ember-primitives/setup.d.ts.map +0 -1
- package/dist/_app_/services/ember-primitives/setup.js +0 -1
- package/dist/services/ember-primitives/setup.js +0 -36
- package/dist/services/ember-primitives/setup.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../src/-private.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,eAAyC,CAAC"}
|
|
@@ -1,61 +1,6 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
|
-
type ScrollBehavior
|
|
4
|
-
export interface Signature {
|
|
5
|
-
Args: {
|
|
6
|
-
/**
|
|
7
|
-
* The distance in pixels between each item in the slider.
|
|
8
|
-
*/
|
|
9
|
-
gap?: number;
|
|
10
|
-
/**
|
|
11
|
-
* The distance from the edge of the container to the first and last item, this allows
|
|
12
|
-
* the contents to visually overflow the container
|
|
13
|
-
*/
|
|
14
|
-
offset?: number;
|
|
15
|
-
/**
|
|
16
|
-
* The scroll behavior to use when scrolling the slider. Defaults to smooth.
|
|
17
|
-
*/
|
|
18
|
-
scrollBehavior?: ScrollBehavior;
|
|
19
|
-
};
|
|
20
|
-
Blocks: {
|
|
21
|
-
/**
|
|
22
|
-
* The header block is where the header content is placed.
|
|
23
|
-
*/
|
|
24
|
-
header: [];
|
|
25
|
-
/**
|
|
26
|
-
* The content block is where the items that will be scrolled are placed.
|
|
27
|
-
*/
|
|
28
|
-
content: [];
|
|
29
|
-
/**
|
|
30
|
-
* The controls block is where the left and right buttons are placed.
|
|
31
|
-
*/
|
|
32
|
-
controls: [
|
|
33
|
-
{
|
|
34
|
-
/**
|
|
35
|
-
* Whether the slider can scroll.
|
|
36
|
-
*/
|
|
37
|
-
canScroll: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the slider cannot scroll left.
|
|
40
|
-
*/
|
|
41
|
-
cannotScrollLeft: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether the slider cannot scroll right.
|
|
44
|
-
*/
|
|
45
|
-
cannotScrollRight: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* The function to scroll the slider left.
|
|
48
|
-
*/
|
|
49
|
-
scrollLeft: () => void;
|
|
50
|
-
/**
|
|
51
|
-
* The function to scroll the slider right.
|
|
52
|
-
*/
|
|
53
|
-
scrollRight: () => void;
|
|
54
|
-
}
|
|
55
|
-
];
|
|
56
|
-
};
|
|
57
|
-
Element: HTMLElement;
|
|
58
|
-
}
|
|
3
|
+
import type { ScrollBehavior, Signature } from './types.ts';
|
|
59
4
|
export declare class Zoetrope extends Component<Signature> {
|
|
60
5
|
scrollerElement: HTMLElement | null;
|
|
61
6
|
currentlyScrolled: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/zoetrope/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/zoetrope/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM5D,qBAAa,QAAS,SAAQ,SAAS,CAAC,SAAS,CAAC;IACvC,eAAe,EAAE,WAAW,GAAG,IAAI,CAAQ;IAC3C,iBAAiB,SAAK;IACtB,WAAW,SAAK;IAChB,WAAW,SAAK;IAEzB,OAAO,CAAC,eAAe,CAKrB;IAEF,cAAc,UAA2B;IACzC,cAAc,aAEZ;IAEF,OAAO,CAAC,iBAAiB,CAwBtB;IAEH,OAAO,CAAC,WAAW,CAyCjB;IAEF,OAAO,CAAC,cAAc,CAEpB;IAEF,IAAI,MAAM,WAET;IAED,IAAI,GAAG,WAEN;IAED,IAAI,SAAS,YAEZ;IAED,IAAI,gBAAgB,YAEnB;IAED,IAAI,iBAAiB,YAEpB;IAED,IAAI,cAAc,IAAI,cAAc,CAMnC;IAED,UAAU,aA0CR;IAEF,WAAW,aAgCT;IAEF,OAAO,CAAC,sBAAsB;CA0H/B;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type ScrollBehavior = 'auto' | 'smooth' | 'instant';
|
|
2
|
+
export interface Signature {
|
|
3
|
+
Args: {
|
|
4
|
+
/**
|
|
5
|
+
* The distance in pixels between each item in the slider.
|
|
6
|
+
*/
|
|
7
|
+
gap?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The distance from the edge of the container to the first and last item, this allows
|
|
10
|
+
* the contents to visually overflow the container
|
|
11
|
+
*/
|
|
12
|
+
offset?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The scroll behavior to use when scrolling the slider. Defaults to smooth.
|
|
15
|
+
*/
|
|
16
|
+
scrollBehavior?: ScrollBehavior;
|
|
17
|
+
};
|
|
18
|
+
Blocks: {
|
|
19
|
+
/**
|
|
20
|
+
* The header block is where the header content is placed.
|
|
21
|
+
*/
|
|
22
|
+
header: [];
|
|
23
|
+
/**
|
|
24
|
+
* The content block is where the items that will be scrolled are placed.
|
|
25
|
+
*/
|
|
26
|
+
content: [];
|
|
27
|
+
/**
|
|
28
|
+
* The controls block is where the left and right buttons are placed.
|
|
29
|
+
*/
|
|
30
|
+
controls: [
|
|
31
|
+
{
|
|
32
|
+
/**
|
|
33
|
+
* Whether the slider can scroll.
|
|
34
|
+
*/
|
|
35
|
+
canScroll: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the slider cannot scroll left.
|
|
38
|
+
*/
|
|
39
|
+
cannotScrollLeft: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the slider cannot scroll right.
|
|
42
|
+
*/
|
|
43
|
+
cannotScrollRight: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The function to scroll the slider left.
|
|
46
|
+
*/
|
|
47
|
+
scrollLeft: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* The function to scroll the slider right.
|
|
50
|
+
*/
|
|
51
|
+
scrollRight: () => void;
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
};
|
|
55
|
+
Element: HTMLElement;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/zoetrope/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE;QACJ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,cAAc,CAAC,EAAE,cAAc,CAAC;KACjC,CAAC;IACF,MAAM,EAAE;QACN;;WAEG;QACH,MAAM,EAAE,EAAE,CAAC;QAEX;;WAEG;QACH,OAAO,EAAE,EAAE,CAAC;QAEZ;;WAEG;QACH,QAAQ,EAAE;YACR;gBACE;;mBAEG;gBACH,SAAS,EAAE,OAAO,CAAC;gBAEnB;;mBAEG;gBACH,gBAAgB,EAAE,OAAO,CAAC;gBAE1B;;mBAEG;gBACH,iBAAiB,EAAE,OAAO,CAAC;gBAE3B;;mBAEG;gBACH,UAAU,EAAE,MAAM,IAAI,CAAC;gBAEvB;;mBAEG;gBACH,WAAW,EAAE,MAAM,IAAI,CAAC;aACzB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zoetrope.d.ts","sourceRoot":"","sources":["../../src/components/zoetrope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"zoetrope.d.ts","sourceRoot":"","sources":["../../src/components/zoetrope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC"}
|
package/declarations/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export { Shadowed } from "./components/shadowed";
|
|
|
18
18
|
export { Switch } from "./components/switch";
|
|
19
19
|
export { Toggle } from "./components/toggle";
|
|
20
20
|
export { ToggleGroup } from "./components/toggle-group";
|
|
21
|
-
export { Zoetrope } from
|
|
21
|
+
export { Zoetrope } from './components/zoetrope.ts';
|
|
22
22
|
export * from './helpers.ts';
|
|
23
|
-
export type { default as SetupService } from './services/ember-primitives/setup.ts';
|
|
24
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,iCAAiC,EACjC,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,GAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function setupTabster(
|
|
2
|
+
/**
|
|
3
|
+
* A destroyable object.
|
|
4
|
+
* This is needed so that when the app (or tests) or unmounted or ending,
|
|
5
|
+
* the tabster instance can be disposed of.
|
|
6
|
+
*/
|
|
7
|
+
context: object, { tabster, setTabsterRoot, }?: {
|
|
8
|
+
/**
|
|
9
|
+
* Let this setup function initalize tabster.
|
|
10
|
+
* https://tabster.io/docs/core
|
|
11
|
+
*
|
|
12
|
+
* This should be done only once per application as we don't want
|
|
13
|
+
* focus managers fighting with each other.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to `true`,
|
|
16
|
+
*
|
|
17
|
+
* Will fallback to an existing tabster instance automatically if `getTabster` returns a value.
|
|
18
|
+
*
|
|
19
|
+
* If `false` is explicitly passed here, you'll also be in charge of teardown.
|
|
20
|
+
*/
|
|
21
|
+
tabster?: boolean;
|
|
22
|
+
setTabsterRoot?: boolean;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
//# sourceMappingURL=tabster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabster.d.ts","sourceRoot":"","sources":["../src/tabster.ts"],"names":[],"mappings":"AAEA,wBAAsB,YAAY;AAChC;;;;GAIG;AACH,OAAO,EAAE,MAAM,EACf,EACE,OAAO,EACP,cAAc,GACf,GAAE;IACD;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CACrB,iBA0BP"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Including the tabster root.
|
|
5
|
-
*/
|
|
6
|
-
export declare function setup(owner: Owner): void;
|
|
1
|
+
export declare function setupTabster(hooks: {
|
|
2
|
+
beforeEach: (callback: () => void | Promise<void>) => unknown;
|
|
3
|
+
}): void;
|
|
7
4
|
//# sourceMappingURL=a11y.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/test-support/a11y.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/test-support/a11y.ts"],"names":[],"mappings":"AAgBA,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC;CAC/D,QAWA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-support/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/-private.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"-private.js","sources":["../src/-private.ts"],"sourcesContent":["/**\n * @internal\n */\nexport const PRIMITIVES = Symbol.for('ember-primitives-globals');\n"],"names":["PRIMITIVES","Symbol","for"],"mappings":"AAAA;AACA;AACA;AACO,MAAMA,UAAU,GAAGC,MAAM,CAACC,GAAG,CAAC,0BAA0B;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Zoetrope } from './zoetrope/index.js';
|
|
1
|
+
export { Zoetrope, Zoetrope as default } from './zoetrope/index.js';
|
|
2
2
|
//# sourceMappingURL=zoetrope.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * DANGER: this is a *barrel file*\n *\n * It forces the whole library to be loaded and all dependencies.\n *\n * If you have a small app, you probably don't want to import from here -- instead import from each sub-path.\n */\nimport { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';\n\nif (macroCondition(isDevelopingApp())) {\n importSync('./components/violations.css');\n}\n\nexport { Accordion } from './components/accordion.gts';\nexport type {\n AccordionContentExternalSignature,\n AccordionHeaderExternalSignature,\n AccordionItemExternalSignature,\n AccordionTriggerExternalSignature,\n} from './components/accordion/public.ts';\nexport { Avatar } from './components/avatar.gts';\nexport { Dialog, Dialog as Modal } from './components/dialog.gts';\nexport { ExternalLink } from './components/external-link.gts';\nexport { Form } from './components/form.gts';\nexport { StickyFooter } from './components/layout/sticky-footer.gts';\nexport { Link } from './components/link.gts';\nexport { Menu } from './components/menu.gts';\nexport { OTP, OTPInput } from './components/one-time-password/index.gts';\nexport { Popover } from './components/popover.gts';\nexport { Portal } from './components/portal.gts';\nexport { PortalTargets } from './components/portal-targets.gts';\nexport { TARGETS as PORTALS } from './components/portal-targets.gts';\nexport { Progress } from './components/progress.gts';\nexport { Scroller } from './components/scroller.gts';\nexport { Shadowed } from './components/shadowed.gts';\nexport { Switch } from './components/switch.gts';\nexport { Toggle } from './components/toggle.gts';\nexport { ToggleGroup } from './components/toggle-group.gts';\nexport { Zoetrope } from './components/zoetrope
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/**\n * DANGER: this is a *barrel file*\n *\n * It forces the whole library to be loaded and all dependencies.\n *\n * If you have a small app, you probably don't want to import from here -- instead import from each sub-path.\n */\nimport { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';\n\nif (macroCondition(isDevelopingApp())) {\n importSync('./components/violations.css');\n}\n\nexport { Accordion } from './components/accordion.gts';\nexport type {\n AccordionContentExternalSignature,\n AccordionHeaderExternalSignature,\n AccordionItemExternalSignature,\n AccordionTriggerExternalSignature,\n} from './components/accordion/public.ts';\nexport { Avatar } from './components/avatar.gts';\nexport { Dialog, Dialog as Modal } from './components/dialog.gts';\nexport { ExternalLink } from './components/external-link.gts';\nexport { Form } from './components/form.gts';\nexport { StickyFooter } from './components/layout/sticky-footer.gts';\nexport { Link } from './components/link.gts';\nexport { Menu } from './components/menu.gts';\nexport { OTP, OTPInput } from './components/one-time-password/index.gts';\nexport { Popover } from './components/popover.gts';\nexport { Portal } from './components/portal.gts';\nexport { PortalTargets } from './components/portal-targets.gts';\nexport { TARGETS as PORTALS } from './components/portal-targets.gts';\nexport { Progress } from './components/progress.gts';\nexport { Scroller } from './components/scroller.gts';\nexport { Shadowed } from './components/shadowed.gts';\nexport { Switch } from './components/switch.gts';\nexport { Toggle } from './components/toggle.gts';\nexport { ToggleGroup } from './components/toggle-group.gts';\nexport { Zoetrope } from './components/zoetrope.ts';\nexport * from './helpers.ts';\n"],"names":["macroCondition","isDevelopingApp","importSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA,IAAIA,cAAc,CAACC,eAAe,EAAE,CAAC,EAAE;EACrCC,UAAU,CAAC,6BAA6B,CAAC,CAAA;AAC3C"}
|
package/dist/tabster.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { registerDestructor } from '@ember/destroyable';
|
|
2
|
+
|
|
3
|
+
async function setupTabster(
|
|
4
|
+
/**
|
|
5
|
+
* A destroyable object.
|
|
6
|
+
* This is needed so that when the app (or tests) or unmounted or ending,
|
|
7
|
+
* the tabster instance can be disposed of.
|
|
8
|
+
*/
|
|
9
|
+
context, {
|
|
10
|
+
tabster,
|
|
11
|
+
setTabsterRoot
|
|
12
|
+
} = {}) {
|
|
13
|
+
const {
|
|
14
|
+
createTabster,
|
|
15
|
+
getDeloser,
|
|
16
|
+
getMover,
|
|
17
|
+
getTabster,
|
|
18
|
+
disposeTabster
|
|
19
|
+
} = await import('tabster');
|
|
20
|
+
tabster ??= true;
|
|
21
|
+
setTabsterRoot ??= true;
|
|
22
|
+
if (!tabster) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
let existing = getTabster(window);
|
|
26
|
+
let primitivesTabster = existing ?? createTabster(window);
|
|
27
|
+
getMover(primitivesTabster);
|
|
28
|
+
getDeloser(primitivesTabster);
|
|
29
|
+
if (setTabsterRoot) {
|
|
30
|
+
document.body.setAttribute('data-tabster', '{ "root": {} }');
|
|
31
|
+
}
|
|
32
|
+
registerDestructor(context, () => {
|
|
33
|
+
disposeTabster(primitivesTabster);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { setupTabster };
|
|
38
|
+
//# sourceMappingURL=tabster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabster.js","sources":["../src/tabster.ts"],"sourcesContent":["import { registerDestructor } from '@ember/destroyable';\n\nexport async function setupTabster(\n /**\n * A destroyable object.\n * This is needed so that when the app (or tests) or unmounted or ending,\n * the tabster instance can be disposed of.\n */\n context: object,\n {\n tabster,\n setTabsterRoot,\n }: {\n /**\n * Let this setup function initalize tabster.\n * https://tabster.io/docs/core\n *\n * This should be done only once per application as we don't want\n * focus managers fighting with each other.\n *\n * Defaults to `true`,\n *\n * Will fallback to an existing tabster instance automatically if `getTabster` returns a value.\n *\n * If `false` is explicitly passed here, you'll also be in charge of teardown.\n */\n tabster?: boolean;\n setTabsterRoot?: boolean;\n } = {}\n) {\n const { createTabster, getDeloser, getMover, getTabster, disposeTabster } = await import(\n 'tabster'\n );\n\n tabster ??= true;\n setTabsterRoot ??= true;\n\n if (!tabster) {\n return;\n }\n\n let existing = getTabster(window);\n let primitivesTabster = existing ?? createTabster(window);\n\n getMover(primitivesTabster);\n getDeloser(primitivesTabster);\n\n if (setTabsterRoot) {\n document.body.setAttribute('data-tabster', '{ \"root\": {} }');\n }\n\n registerDestructor(context, () => {\n disposeTabster(primitivesTabster);\n });\n}\n"],"names":["setupTabster","context","tabster","setTabsterRoot","createTabster","getDeloser","getMover","getTabster","disposeTabster","existing","window","primitivesTabster","document","body","setAttribute","registerDestructor"],"mappings":";;AAEO,eAAeA,YAAYA;AAChC;AACF;AACA;AACA;AACA;AACEC,OAAe,EACf;EACEC,OAAO;AACPC,EAAAA,cAAAA;AAiBF,CAAC,GAAG,EAAE,EACN;EACA,MAAM;IAAEC,aAAa;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,UAAU;AAAEC,IAAAA,cAAAA;AAAe,GAAC,GAAG,MAAM,OAChF,SACF,CAAC,CAAA;AAEDN,EAAAA,OAAO,KAAK,IAAI,CAAA;AAChBC,EAAAA,cAAc,KAAK,IAAI,CAAA;EAEvB,IAAI,CAACD,OAAO,EAAE;AACZ,IAAA,OAAA;AACF,GAAA;AAEA,EAAA,IAAIO,QAAQ,GAAGF,UAAU,CAACG,MAAM,CAAC,CAAA;AACjC,EAAA,IAAIC,iBAAiB,GAAGF,QAAQ,IAAIL,aAAa,CAACM,MAAM,CAAC,CAAA;EAEzDJ,QAAQ,CAACK,iBAAiB,CAAC,CAAA;EAC3BN,UAAU,CAACM,iBAAiB,CAAC,CAAA;AAE7B,EAAA,IAAIR,cAAc,EAAE;IAClBS,QAAQ,CAACC,IAAI,CAACC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC9D,GAAA;EAEAC,kBAAkB,CAACd,OAAO,EAAE,MAAM;IAChCO,cAAc,CAACG,iBAAiB,CAAC,CAAA;AACnC,GAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { assert } from '@ember/debug';
|
|
2
|
+
import { setupTabster as setupTabster$1 } from '../tabster.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Sets up all support utilities for primitive components.
|
|
5
6
|
* Including the tabster root.
|
|
6
7
|
*/
|
|
7
|
-
function setup(owner) {
|
|
8
|
-
|
|
9
|
-
assert('Could not find the ember-primitives service', service);
|
|
10
|
-
service.setup({
|
|
8
|
+
async function setup(owner) {
|
|
9
|
+
setupTabster$1(owner, {
|
|
11
10
|
setTabsterRoot: false
|
|
12
11
|
});
|
|
13
12
|
document.querySelector('#ember-testing')?.setAttribute('data-tabster', '{ "root": {} }');
|
|
14
13
|
}
|
|
14
|
+
function setupTabster(hooks) {
|
|
15
|
+
hooks.beforeEach(function () {
|
|
16
|
+
let owner = this.owner;
|
|
17
|
+
assert(`Test does not have an owner, be sure to use setupRenderingTest, setupTest, or setupApplicationTest (from ember-qunit (or similar))`, owner);
|
|
18
|
+
setup(this.owner);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
15
21
|
|
|
16
|
-
export {
|
|
22
|
+
export { setupTabster };
|
|
17
23
|
//# sourceMappingURL=a11y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.js","sources":["../../src/test-support/a11y.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport
|
|
1
|
+
{"version":3,"file":"a11y.js","sources":["../../src/test-support/a11y.ts"],"sourcesContent":["import { assert } from '@ember/debug';\n\nimport { setupTabster as _setupTabster } from '../tabster.ts';\n\nimport type Owner from '@ember/owner';\n\n/**\n * Sets up all support utilities for primitive components.\n * Including the tabster root.\n */\nasync function setup(owner: Owner) {\n _setupTabster(owner, { setTabsterRoot: false });\n\n document.querySelector('#ember-testing')?.setAttribute('data-tabster', '{ \"root\": {} }');\n}\n\nexport function setupTabster(hooks: {\n beforeEach: (callback: () => void | Promise<void>) => unknown;\n}) {\n hooks.beforeEach(function (this: { owner: object }) {\n let owner = this.owner;\n\n assert(\n `Test does not have an owner, be sure to use setupRenderingTest, setupTest, or setupApplicationTest (from ember-qunit (or similar))`,\n owner\n );\n\n setup(this.owner as Owner);\n });\n}\n"],"names":["setup","owner","_setupTabster","setTabsterRoot","document","querySelector","setAttribute","setupTabster","hooks","beforeEach","assert"],"mappings":";;;AAMA;AACA;AACA;AACA;AACA,eAAeA,KAAKA,CAACC,KAAY,EAAE;EACjCC,cAAa,CAACD,KAAK,EAAE;AAAEE,IAAAA,cAAc,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;EAE/CC,QAAQ,CAACC,aAAa,CAAC,gBAAgB,CAAC,EAAEC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC1F,CAAA;AAEO,SAASC,YAAYA,CAACC,KAE5B,EAAE;EACDA,KAAK,CAACC,UAAU,CAAC,YAAmC;AAClD,IAAA,IAAIR,KAAK,GAAG,IAAI,CAACA,KAAK,CAAA;AAEtBS,IAAAA,MAAM,CACJ,CAAA,kIAAA,CAAoI,EACpIT,KACF,CAAC,CAAA;AAEDD,IAAAA,KAAK,CAAC,IAAI,CAACC,KAAc,CAAC,CAAA;AAC5B,GAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Making apps easier to build",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
@@ -86,9 +86,7 @@
|
|
|
86
86
|
"version": 2,
|
|
87
87
|
"type": "addon",
|
|
88
88
|
"main": "addon-main.cjs",
|
|
89
|
-
"app-js": {
|
|
90
|
-
"./services/ember-primitives/setup.js": "./dist/_app_/services/ember-primitives/setup.js"
|
|
91
|
-
}
|
|
89
|
+
"app-js": {}
|
|
92
90
|
},
|
|
93
91
|
"exports": {
|
|
94
92
|
".": {
|
|
@@ -134,7 +132,7 @@
|
|
|
134
132
|
"@glint/template": ">= 1.0.0",
|
|
135
133
|
"ember-modifier": ">= 4.1.0",
|
|
136
134
|
"ember-resources": ">= 6.1.0",
|
|
137
|
-
"ember-source": "
|
|
135
|
+
"ember-source": ">= 4.12.0"
|
|
138
136
|
},
|
|
139
137
|
"peerDependenciesMeta": {
|
|
140
138
|
"@ember/test-helpers": {
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import Service from '@ember/service';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const PRIMITIVES: unique symbol;
|
|
6
|
-
export default class EmberPrimitivesSetup extends Service {
|
|
7
|
-
#private;
|
|
8
|
-
/**
|
|
9
|
-
* Sets up required features for accessibility.
|
|
10
|
-
*/
|
|
11
|
-
setup: ({ tabster, setTabsterRoot, }?: {
|
|
12
|
-
/**
|
|
13
|
-
* Let this setup function initalize tabster.
|
|
14
|
-
* https://tabster.io/docs/core
|
|
15
|
-
*
|
|
16
|
-
* This should be done only once per application as we don't want
|
|
17
|
-
* focus managers fighting with each other.
|
|
18
|
-
*
|
|
19
|
-
* Defaults to `true`,
|
|
20
|
-
*
|
|
21
|
-
* Will fallback to an existing tabster instance automatically if `getTabster` returns a value.
|
|
22
|
-
*/
|
|
23
|
-
tabster?: boolean;
|
|
24
|
-
setTabsterRoot?: boolean;
|
|
25
|
-
}) => void;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/services/ember-primitives/setup.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC;;GAEG;AACH,eAAO,MAAM,UAAU,eAAyC,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,OAAO;;IACvD;;OAEG;IACH,KAAK,kCAGF;QACD;;;;;;;;;;WAUG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,UAeC;CAMH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-primitives/services/ember-primitives/setup";
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import Service from '@ember/service';
|
|
2
|
-
import { getTabster, createTabster, getMover, getDeloser } from 'tabster';
|
|
3
|
-
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
const PRIMITIVES = Symbol.for('ember-primitives-globals');
|
|
10
|
-
class EmberPrimitivesSetup extends Service {
|
|
11
|
-
/**
|
|
12
|
-
* Sets up required features for accessibility.
|
|
13
|
-
*/
|
|
14
|
-
setup = ({
|
|
15
|
-
tabster,
|
|
16
|
-
setTabsterRoot
|
|
17
|
-
} = {}) => {
|
|
18
|
-
tabster ??= true;
|
|
19
|
-
setTabsterRoot ??= true;
|
|
20
|
-
if (!tabster) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
let existing = getTabster(window);
|
|
24
|
-
this.#setupTabster(existing ?? createTabster(window));
|
|
25
|
-
if (setTabsterRoot) {
|
|
26
|
-
document.body.setAttribute('data-tabster', '{ "root": {} }');
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
#setupTabster = tabster => {
|
|
30
|
-
getMover(tabster);
|
|
31
|
-
getDeloser(tabster);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { PRIMITIVES, EmberPrimitivesSetup as default };
|
|
36
|
-
//# sourceMappingURL=setup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sources":["../../../src/services/ember-primitives/setup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Service from '@ember/service';\n\nimport { createTabster, getDeloser, getMover, getTabster } from 'tabster';\n\n/**\n * @internal\n */\nexport const PRIMITIVES = Symbol.for('ember-primitives-globals');\n\nexport default class EmberPrimitivesSetup extends Service {\n /**\n * Sets up required features for accessibility.\n */\n setup = ({\n tabster,\n setTabsterRoot,\n }: {\n /**\n * Let this setup function initalize tabster.\n * https://tabster.io/docs/core\n *\n * This should be done only once per application as we don't want\n * focus managers fighting with each other.\n *\n * Defaults to `true`,\n *\n * Will fallback to an existing tabster instance automatically if `getTabster` returns a value.\n */\n tabster?: boolean;\n setTabsterRoot?: boolean;\n } = {}) => {\n tabster ??= true;\n setTabsterRoot ??= true;\n\n if (!tabster) {\n return;\n }\n\n let existing = getTabster(window);\n\n this.#setupTabster(existing ?? createTabster(window));\n\n if (setTabsterRoot) {\n document.body.setAttribute('data-tabster', '{ \"root\": {} }');\n }\n };\n\n #setupTabster = (tabster: ReturnType<typeof createTabster>) => {\n getMover(tabster);\n getDeloser(tabster);\n };\n}\n"],"names":["PRIMITIVES","Symbol","for","EmberPrimitivesSetup","Service","setup","tabster","setTabsterRoot","existing","getTabster","window","createTabster","document","body","setAttribute","getMover","getDeloser"],"mappings":";;;AAAA;;AAKA;AACA;AACA;AACO,MAAMA,UAAU,GAAGC,MAAM,CAACC,GAAG,CAAC,0BAA0B,EAAC;AAEjD,MAAMC,oBAAoB,SAASC,OAAO,CAAC;AACxD;AACF;AACA;AACEC,EAAAA,KAAK,GAAGA,CAAC;IACPC,OAAO;AACPC,IAAAA,cAAAA;GAeD,GAAG,EAAE,KAAK;AACTD,IAAAA,OAAO,KAAK,IAAI,CAAA;AAChBC,IAAAA,cAAc,KAAK,IAAI,CAAA;IAEvB,IAAI,CAACD,OAAO,EAAE;AACZ,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAIE,QAAQ,GAAGC,UAAU,CAACC,MAAM,CAAC,CAAA;IAEjC,IAAI,CAAC,aAAa,CAACF,QAAQ,IAAIG,aAAa,CAACD,MAAM,CAAC,CAAC,CAAA;AAErD,IAAA,IAAIH,cAAc,EAAE;MAClBK,QAAQ,CAACC,IAAI,CAACC,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAA;AAC9D,KAAA;GACD,CAAA;EAED,aAAa,GAAIR,OAAyC,IAAK;IAC7DS,QAAQ,CAACT,OAAO,CAAC,CAAA;IACjBU,UAAU,CAACV,OAAO,CAAC,CAAA;GACpB,CAAA;AACH;;;;"}
|