@frontile/utilities 0.18.0-alpha.11 → 0.18.0-alpha.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontile/utilities",
3
- "version": "0.18.0-alpha.11",
3
+ "version": "0.18.0-alpha.12",
4
4
  "description": "Component Library for Ember Octane apps: Utilities",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -52,27 +52,27 @@
52
52
  "test": "echo 'A v2 addon does not have tests, run tests in test-app'"
53
53
  },
54
54
  "dependencies": {
55
- "@embroider/addon-shim": "^1.9.0",
56
- "frontile": "^0.18.0-alpha.11"
55
+ "@embroider/addon-shim": "^1.10.3",
56
+ "frontile": "^0.18.0-alpha.12"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@babel/core": "7.26.7",
60
60
  "@babel/plugin-transform-typescript": "^7.26.7",
61
- "@embroider/addon-dev": "7.1.1",
62
- "@glimmer/component": "^2.0.0",
61
+ "@embroider/addon-dev": "8.3.1",
62
+ "@glimmer/component": "^2.1.1",
63
63
  "@glimmer/tracking": "^1.1.2",
64
64
  "@glint/core": "1.5.2",
65
65
  "@glint/environment-ember-loose": "1.5.2",
66
66
  "@glint/environment-ember-template-imports": "1.5.2",
67
- "@glint/template": "^1.7.4",
68
- "@rollup/plugin-babel": "^6.0.4",
69
- "@rollup/plugin-node-resolve": "^16.0.0",
70
- "@tsconfig/ember": "^3.0.9",
67
+ "@glint/template": "^1.8.0",
68
+ "@rollup/plugin-babel": "^7.1.0",
69
+ "@rollup/plugin-node-resolve": "^16.0.3",
70
+ "@tsconfig/ember": "^3.0.12",
71
71
  "babel-plugin-ember-template-compilation": "^2.2.1",
72
- "concurrently": "^9.1.0",
73
- "decorator-transforms": "^2.3.0",
72
+ "concurrently": "^10.0.4",
73
+ "decorator-transforms": "^2.4.0",
74
74
  "ember-source": "^6.1.0",
75
- "rollup": "^4.29.1",
75
+ "rollup": "^4.62.4",
76
76
  "rollup-plugin-copy": "^3.5.0",
77
77
  "tailwindcss": "^3.4.17",
78
78
  "typescript": "^5.7.3"
@@ -96,5 +96,5 @@
96
96
  "main": "addon-main.js",
97
97
  "app-js": {}
98
98
  },
99
- "gitHead": "740a78a92f68c5bd48e1d793ca1ad1d24f2de77a"
99
+ "gitHead": "6f037f1d9836b7236db1601b377a33e6fc833f35"
100
100
  }
@@ -1,90 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { type AvatarVariants, type AvatarSlots, type SlotsToClasses } from '@frontile/theme';
3
- interface AvatarSignature {
4
- Args: {
5
- /**
6
- * Controls the size of the avatar.
7
- *
8
- * @defaultValue 'md'
9
- */
10
- size?: AvatarVariants['size'];
11
- /**
12
- * Defines the shape of the avatar.
13
- *
14
- * @defaultValue 'circle'
15
- */
16
- shape?: AvatarVariants['shape'];
17
- /**
18
- * URL of the image to be displayed in the avatar.
19
- * If provided, the image will be used instead of initials.
20
- *
21
- */
22
- src?: string | null;
23
- /**
24
- * Full name of the user, used to generate initials.
25
- * If `@firstName` and `@lastName` are not provided, initials will be
26
- * derived from this property.
27
- */
28
- name?: string;
29
- /**
30
- * First name of the user, used to generate initials.
31
- * If `@name` is not provided, initials will be generated from
32
- * `@firstName` and `@lastName`.
33
- */
34
- firstName?: string;
35
- /**
36
- * Last name of the user, used to generate initials.
37
- * If `@name` is not provided, initials will be generated from
38
- * `@firstName` and `@lastName`.
39
- */
40
- lastName?: string;
41
- /**
42
- * Alternative text for accessibility.
43
- * If `@src` is provided, this text will be used as the `alt`
44
- * attribute for the image.
45
- * If only initials are displayed, this text will be read by screen readers.
46
- */
47
- alt?: string;
48
- /**
49
- * Custom CSS classes for styling different slots within the avatar component.
50
- */
51
- classes?: SlotsToClasses<AvatarSlots>;
52
- };
53
- /**
54
- * The root element of the avatar component, which is an HTML `<span>` tag.
55
- */
56
- Element: HTMLSpanElement;
57
- }
58
- declare class Avatar extends Component<AvatarSignature> {
59
- get classes(): {
60
- base: (slotProps?: ({
61
- shape?: "square" | "circle" | undefined;
62
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
63
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
64
- img: (slotProps?: ({
65
- shape?: "square" | "circle" | undefined;
66
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
67
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
68
- name: (slotProps?: ({
69
- shape?: "square" | "circle" | undefined;
70
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
71
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
72
- } & {
73
- base: (slotProps?: ({
74
- shape?: "square" | "circle" | undefined;
75
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
76
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
77
- img: (slotProps?: ({
78
- shape?: "square" | "circle" | undefined;
79
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
80
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
81
- name: (slotProps?: ({
82
- shape?: "square" | "circle" | undefined;
83
- size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
84
- } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
85
- } & {};
86
- get initials(): string;
87
- get shouldShowInitials(): boolean;
88
- }
89
- export { Avatar };
90
- export default Avatar;
@@ -1,45 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import safeStyles from '../utils/safe-styles';
3
- import type Owner from '@ember/owner';
4
- interface CollapsibleArgs {
5
- /**
6
- * If true, the content will be visible
7
- */
8
- isOpen: boolean;
9
- /**
10
- * The height for the content in it's collapsed state.
11
- * The unit of the value should be included, eg. '10px'.
12
- *
13
- * @defaultValue 0
14
- */
15
- initialHeight?: string;
16
- }
17
- interface CollapsibleSignature {
18
- Args: CollapsibleArgs;
19
- Element: HTMLDivElement;
20
- Blocks: {
21
- default: [];
22
- };
23
- }
24
- declare class Collapsible extends Component<CollapsibleSignature> {
25
- isInitiallyOpen: boolean;
26
- waiterToken?: unknown;
27
- isCurrentlyOpen: boolean;
28
- constructor(owner: Owner, args: CollapsibleArgs);
29
- get styles(): ReturnType<typeof safeStyles>;
30
- hasSetupUpdate: boolean;
31
- update: import("ember-modifier").FunctionBasedModifier<{
32
- Args: {
33
- Positional: boolean[];
34
- Named: import("ember-modifier/-private/signature").EmptyObject;
35
- };
36
- Element: HTMLElement;
37
- }>;
38
- onTransitionEnd: (event: TransitionEvent) => void;
39
- heightTransition(duration: number): string;
40
- opacityTransition(duration: number): string;
41
- expand(element: HTMLElement): void;
42
- contract(element: HTMLElement): void;
43
- }
44
- export { Collapsible, type CollapsibleSignature };
45
- export default Collapsible;
@@ -1,11 +0,0 @@
1
- import type { TOC } from '@ember/component/template-only';
2
- declare const Divider: TOC<{
3
- Args: {
4
- orientation?: 'horizontal' | 'vertical';
5
- as?: string;
6
- class?: string;
7
- };
8
- Element: Element;
9
- }>;
10
- export { Divider };
11
- export default Divider;
@@ -1,18 +0,0 @@
1
- import type { TOC } from '@ember/component/template-only';
2
- import { type SpinnerVariants } from '@frontile/theme';
3
- declare const Spinner: TOC<{
4
- Args: {
5
- class?: string;
6
- /**
7
- * @defaultValue 'md'
8
- */
9
- size?: SpinnerVariants['size'];
10
- /**
11
- * @defaultValue 'default'
12
- */
13
- intent?: SpinnerVariants['intent'];
14
- };
15
- Element: SVGElement;
16
- }>;
17
- export { Spinner };
18
- export default Spinner;
@@ -1,9 +0,0 @@
1
- import type { TOC } from '@ember/component/template-only';
2
- declare const VisuallyHidden: TOC<{
3
- Element: HTMLDivElement;
4
- Blocks: {
5
- default: [];
6
- };
7
- }>;
8
- export { VisuallyHidden };
9
- export default VisuallyHidden;
@@ -1,55 +0,0 @@
1
- export type PressType = 'pressstart' | 'pressend' | 'pressup' | 'press';
2
- export type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
3
- export declare class PressEvent {
4
- /** The type of press event. */
5
- type: PressType;
6
- /** The pointer type that triggered the press event. */
7
- pointerType: PointerType;
8
- /** The target element of the press event. */
9
- target: Element;
10
- /** Whether the shift keyboard modifier was held during the press event. */
11
- shiftKey: boolean;
12
- /** Whether the ctrl keyboard modifier was held during the press event. */
13
- ctrlKey: boolean;
14
- /** Whether the meta keyboard modifier was held during the press event. */
15
- metaKey: boolean;
16
- /** Whether the alt keyboard modifier was held during the press event. */
17
- altKey: boolean;
18
- /** The x position of the event relative to the target element. */
19
- x: number;
20
- /** The y position of the event relative to the target element. */
21
- y: number;
22
- private shouldContinuePropagation;
23
- private originalEvent;
24
- constructor(type: PressType, pointerType: PointerType, originalEvent: Event, target: Element);
25
- /** By default, press events stop propagation to parent elements. */
26
- continuePropagation(): void;
27
- /** Prevents the default browser behavior for this event. */
28
- preventDefault(): void;
29
- get shouldPropagate(): boolean;
30
- private getModifierState;
31
- private getCoordinates;
32
- }
33
- export interface PressOptions {
34
- onPressStart?: (event: PressEvent) => void;
35
- onPressEnd?: (event: PressEvent) => void;
36
- onPress?: (event: PressEvent) => void;
37
- onPressUp?: (event: PressEvent) => void;
38
- onPressChange?: (isPressed: boolean) => void;
39
- }
40
- export interface PressSignature {
41
- Element: HTMLElement;
42
- Args: {
43
- Positional: [(event: PressEvent) => void] | [];
44
- Named: PressOptions;
45
- };
46
- }
47
- declare const press: import("ember-modifier").FunctionBasedModifier<{
48
- Element: HTMLElement;
49
- Args: {
50
- Named: PressOptions;
51
- Positional: [] | [(event: PressEvent) => void];
52
- };
53
- }>;
54
- export { press };
55
- export default press;
@@ -1,14 +0,0 @@
1
- declare class Ref<T extends Element = Element> {
2
- #private;
3
- current: T | undefined;
4
- constructor(onChange?: (el: T | undefined) => void);
5
- setup: import("ember-modifier").FunctionBasedModifier<{
6
- Args: {
7
- Positional: unknown[];
8
- Named: import("ember-modifier/-private/signature").EmptyObject;
9
- };
10
- Element: T;
11
- }>;
12
- }
13
- declare function ref<T extends Element = Element>(onChange?: (el: T | undefined) => void): Ref<T>;
14
- export { ref };
@@ -1,9 +0,0 @@
1
- import type { PressEvent } from '../modifiers/press';
2
- declare class ToggleState {
3
- #private;
4
- current: boolean;
5
- constructor(initialValue?: boolean, onChange?: (val: boolean) => void);
6
- toggle: (input?: boolean | Event | PressEvent) => void;
7
- }
8
- declare function toggleState(initialValue?: boolean, onChange?: (val: boolean) => void): ToggleState;
9
- export { toggleState };
@@ -1,53 +0,0 @@
1
- const deferred = /* @__PURE__ */new WeakMap();
2
- function deferDecorator(proto, prop, desc) {
3
- let map = deferred.get(proto);
4
- if (!map) {
5
- map = /* @__PURE__ */new Map();
6
- deferred.set(proto, map);
7
- }
8
- map.set(prop, desc);
9
- }
10
- function findDeferredDecorator(target, prop) {
11
- var _a;
12
- let cursor = target.prototype;
13
- while (cursor) {
14
- let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);
15
- if (desc) {
16
- return desc;
17
- }
18
- cursor = cursor.prototype;
19
- }
20
- }
21
- function decorateFieldV2(prototype, prop, decorators, initializer) {
22
- let desc = {
23
- configurable: true,
24
- enumerable: true,
25
- writable: true,
26
- initializer: null
27
- };
28
- if (initializer) {
29
- desc.initializer = initializer;
30
- }
31
- for (let decorator of decorators) {
32
- desc = decorator(prototype, prop, desc) || desc;
33
- }
34
- if (desc.initializer === void 0) {
35
- Object.defineProperty(prototype, prop, desc);
36
- } else {
37
- deferDecorator(prototype, prop, desc);
38
- }
39
- }
40
- function initializeDeferredDecorator(target, prop) {
41
- let desc = findDeferredDecorator(target.constructor, prop);
42
- if (desc) {
43
- Object.defineProperty(target, prop, {
44
- enumerable: desc.enumerable,
45
- configurable: desc.configurable,
46
- writable: desc.writable,
47
- value: desc.initializer ? desc.initializer.call(target) : void 0
48
- });
49
- }
50
- }
51
-
52
- export { decorateFieldV2 as d, initializeDeferredDecorator as i };
53
- //# sourceMappingURL=runtime-BPCpkOf1-CZp_hUYO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-BPCpkOf1-CZp_hUYO.js","sources":["../../../node_modules/.pnpm/decorator-transforms@2.3.0_@babel+core@7.26.7/node_modules/decorator-transforms/dist/runtime-BPCpkOf1.js"],"sourcesContent":["const deferred = /* @__PURE__ */ new WeakMap();\nfunction deferDecorator(proto, prop, desc) {\n let map = deferred.get(proto);\n if (!map) {\n map = /* @__PURE__ */ new Map();\n deferred.set(proto, map);\n }\n map.set(prop, desc);\n}\nfunction findDeferredDecorator(target, prop) {\n var _a;\n let cursor = target.prototype;\n while (cursor) {\n let desc = (_a = deferred.get(cursor)) == null ? void 0 : _a.get(prop);\n if (desc) {\n return desc;\n }\n cursor = cursor.prototype;\n }\n}\nfunction decorateFieldV1(target, prop, decorators, initializer) {\n return decorateFieldV2(target.prototype, prop, decorators, initializer);\n}\nfunction decorateFieldV2(prototype, prop, decorators, initializer) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n };\n if (initializer) {\n desc.initializer = initializer;\n }\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer === void 0) {\n Object.defineProperty(prototype, prop, desc);\n } else {\n deferDecorator(prototype, prop, desc);\n }\n}\nfunction decorateMethodV1({ prototype }, prop, decorators) {\n return decorateMethodV2(prototype, prop, decorators);\n}\nfunction decorateMethodV2(prototype, prop, decorators) {\n const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);\n let desc = { ...origDesc };\n for (let decorator of decorators) {\n desc = decorator(prototype, prop, desc) || desc;\n }\n if (desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;\n desc.initializer = void 0;\n }\n Object.defineProperty(prototype, prop, desc);\n}\nfunction initializeDeferredDecorator(target, prop) {\n let desc = findDeferredDecorator(target.constructor, prop);\n if (desc) {\n Object.defineProperty(target, prop, {\n enumerable: desc.enumerable,\n configurable: desc.configurable,\n writable: desc.writable,\n value: desc.initializer ? desc.initializer.call(target) : void 0\n });\n }\n}\nfunction decorateClass(target, decorators) {\n return decorators.reduce(\n (accum, decorator) => decorator(accum) || accum,\n target\n );\n}\nfunction decoratePOJO(pojo, decorated) {\n for (let [type, prop, decorators] of decorated) {\n if (type === \"field\") {\n decoratePojoField(pojo, prop, decorators);\n } else {\n decorateMethodV2(pojo, prop, decorators);\n }\n }\n return pojo;\n}\nfunction decoratePojoField(pojo, prop, decorators) {\n let desc = {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: () => {\n var _a;\n return (_a = Object.getOwnPropertyDescriptor(pojo, prop)) == null ? void 0 : _a.value;\n }\n };\n for (let decorator of decorators) {\n desc = decorator(pojo, prop, desc) || desc;\n }\n if (desc.initializer) {\n desc.value = desc.initializer.call(pojo);\n delete desc.initializer;\n }\n Object.defineProperty(pojo, prop, desc);\n}\nconst runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n c: decorateClass,\n f: decorateFieldV1,\n g: decorateFieldV2,\n i: initializeDeferredDecorator,\n m: decorateMethodV1,\n n: decorateMethodV2,\n p: decoratePOJO\n}, Symbol.toStringTag, { value: \"Module\" }));\nexport {\n decorateFieldV2 as a,\n decorateMethodV1 as b,\n decorateMethodV2 as c,\n decorateFieldV1 as d,\n decorateClass as e,\n decoratePOJO as f,\n initializeDeferredDecorator as i,\n runtime as r\n};\n//# sourceMappingURL=runtime-BPCpkOf1.js.map\n"],"names":["deferred","WeakMap","deferDecorator","proto","prop","desc","map","get","Map","set","findDeferredDecorator","target","_a","cursor","prototype","decorateFieldV2","decorators","initializer","configurable","enumerable","writable","decorator","Object","defineProperty","initializeDeferredDecorator","constructor","value","call"],"mappings":"AAuBA,MAAMA,QAAA,sBAGEC,OAAA,EAAA;AAER,SAASC,eACPC,KAAA,EACAC,IAAA,EACAC,IAAA,EACM;AACF,EAAA,IAAAC,GAAA,GAAMN,QAAA,CAASO,GAAA,CAAIJ,KA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