@frontile/buttons 0.18.0-alpha.2 → 0.18.0-alpha.20

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.
@@ -1,5 +1 @@
1
- export * from './components/button';
2
- export * from './components/close-button';
3
- export * from './components/toggle-button';
4
- export * from './components/button-group';
5
- export * from './components/chip';
1
+ export * from 'frontile/buttons';
@@ -1,8 +1 @@
1
- import type { Button, ButtonGroup, Chip, CloseButton, ToggleButton } from './index';
2
- export default interface Registry {
3
- Button: typeof Button;
4
- Chip: typeof Chip;
5
- ToggleButton: typeof ToggleButton;
6
- ButtonGroup: typeof ButtonGroup;
7
- CloseButton: typeof CloseButton;
8
- }
1
+ export type { default } from 'frontile/template-registry';
package/dist/index.js CHANGED
@@ -1,6 +1,14 @@
1
- export { Button } from './components/button.js';
2
- export { CloseButton } from './components/close-button.js';
3
- export { ToggleButton } from './components/toggle-button.js';
4
- export { ButtonGroup } from './components/button-group.js';
5
- export { Chip } from './components/chip.js';
1
+ import { deprecate } from '@ember/debug';
2
+ export * from 'frontile/buttons';
3
+
4
+ deprecate('Importing from "@frontile/buttons" is deprecated. ' + 'Import from "frontile" or "frontile/buttons" instead. ' + 'See https://frontile.dev/docs/migrations/v0.18/package-consolidation', false, {
5
+ id: 'frontile.import-from-buttons',
6
+ until: '0.19.0',
7
+ for: 'frontile',
8
+ since: {
9
+ available: '0.18.0',
10
+ enabled: '0.18.0'
11
+ },
12
+ url: 'https://frontile.dev/docs/migrations/v0.18/package-consolidation'
13
+ });
6
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { deprecate } from '@ember/debug';\n\ndeprecate(\n 'Importing from \"@frontile/buttons\" is deprecated. ' +\n 'Import from \"frontile\" or \"frontile/buttons\" instead. ' +\n 'See https://frontile.dev/docs/migrations/v0.18/package-consolidation',\n false,\n {\n id: 'frontile.import-from-buttons',\n until: '0.19.0',\n for: 'frontile',\n since: { available: '0.18.0', enabled: '0.18.0' },\n url: 'https://frontile.dev/docs/migrations/v0.18/package-consolidation'\n }\n);\n\nexport * from 'frontile/buttons';\n"],"names":["deprecate","id","until","for","since","available","enabled","url"],"mappings":";;;AAEAA,SAAS,CACP,oDAAoD,GAClD,wDAAwD,GACxD,sEAAsE,EACxE,KAAK,EACL;AACEC,EAAAA,EAAE,EAAE,8BAA8B;AAClCC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,GAAG,EAAE,UAAU;AACfC,EAAAA,KAAK,EAAE;AAAEC,IAAAA,SAAS,EAAE,QAAQ;AAAEC,IAAAA,OAAO,EAAE;GAAU;AACjDC,EAAAA,GAAG,EAAE;AACP,CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontile/buttons",
3
- "version": "0.18.0-alpha.2",
3
+ "version": "0.18.0-alpha.20",
4
4
  "description": "Component Library for Ember Octane apps: Buttons",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -52,29 +52,28 @@
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/theme": "0.18.0-alpha.2",
57
- "@frontile/utilities": "0.18.0-alpha.2"
55
+ "@embroider/addon-shim": "^1.10.3",
56
+ "frontile": "^0.18.0-alpha.20"
58
57
  },
59
58
  "devDependencies": {
60
59
  "@babel/core": "7.26.7",
61
60
  "@babel/plugin-transform-private-methods": "^7.23.3",
62
61
  "@babel/plugin-transform-typescript": "^7.26.7",
63
- "@embroider/addon-dev": "7.1.1",
64
- "@glimmer/component": "^2.0.0",
62
+ "@embroider/addon-dev": "8.3.1",
63
+ "@glimmer/component": "^2.1.1",
65
64
  "@glimmer/tracking": "^1.1.2",
66
65
  "@glint/core": "1.5.2",
67
66
  "@glint/environment-ember-loose": "1.5.2",
68
67
  "@glint/environment-ember-template-imports": "1.5.2",
69
- "@glint/template": "^1.7.4",
70
- "@rollup/plugin-babel": "^6.0.4",
71
- "@rollup/plugin-node-resolve": "^16.0.0",
72
- "@tsconfig/ember": "^3.0.9",
68
+ "@glint/template": "^1.8.0",
69
+ "@rollup/plugin-babel": "^7.1.0",
70
+ "@rollup/plugin-node-resolve": "^16.0.3",
71
+ "@tsconfig/ember": "^3.0.12",
73
72
  "babel-plugin-ember-template-compilation": "^2.2.1",
74
- "concurrently": "^9.1.0",
75
- "decorator-transforms": "^2.3.0",
73
+ "concurrently": "^10.0.4",
74
+ "decorator-transforms": "^2.4.0",
76
75
  "ember-source": "^6.1.0",
77
- "rollup": "^4.29.1",
76
+ "rollup": "^4.62.4",
78
77
  "rollup-plugin-copy": "^3.5.0",
79
78
  "tailwindcss": "^3.4.17",
80
79
  "typescript": "^5.7.3"
@@ -96,13 +95,7 @@
96
95
  "version": 2,
97
96
  "type": "addon",
98
97
  "main": "addon-main.js",
99
- "app-js": {
100
- "./components/button-group.js": "./dist/_app_/components/button-group.js",
101
- "./components/button.js": "./dist/_app_/components/button.js",
102
- "./components/chip.js": "./dist/_app_/components/chip.js",
103
- "./components/close-button.js": "./dist/_app_/components/close-button.js",
104
- "./components/toggle-button.js": "./dist/_app_/components/toggle-button.js"
105
- }
98
+ "app-js": {}
106
99
  },
107
- "gitHead": "43e69f7d367baa0fc78b46bf11625a8b3979534a"
100
+ "gitHead": "4ad0d3245ae37878e92ab6452d8c4ebe07a5a403"
108
101
  }
@@ -1,24 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { type ButtonSignature } from './button';
3
- import type { ButtonArgs } from './button';
4
- import { type ToggleButtonSignature } from './toggle-button';
5
- import type { ComponentLike, WithBoundArgs } from '@glint/template';
6
- interface ButtonGroupArgs extends Pick<ButtonArgs, 'appearance' | 'intent' | 'size' | 'class'> {
7
- }
8
- interface ButtonGroupSignature {
9
- Args: ButtonGroupArgs;
10
- Blocks: {
11
- default: [
12
- {
13
- Button: WithBoundArgs<ComponentLike<ButtonSignature>, 'isInGroup'>;
14
- ToggleButton: WithBoundArgs<ComponentLike<ToggleButtonSignature>, 'isInGroup'>;
15
- }
16
- ];
17
- };
18
- Element: HTMLDivElement;
19
- }
20
- declare class ButtonGroup extends Component<ButtonGroupSignature> {
21
- get classNames(): string;
22
- }
23
- export { ButtonGroup, type ButtonGroupSignature };
24
- export default ButtonGroup;
@@ -1,59 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { type PressEvent } from '@frontile/utilities';
3
- export interface ButtonArgs {
4
- /**
5
- * The HTML type of the button
6
- *
7
- * @defaultValue 'button'
8
- */
9
- type?: 'button' | 'submit' | 'reset';
10
- /**
11
- * The button appearance
12
- *
13
- * @defaultValue 'default'
14
- */
15
- appearance?: 'default' | 'outlined' | 'minimal' | 'tonal' | 'custom';
16
- /**
17
- * The intent of the button
18
- */
19
- intent?: 'default' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';
20
- /**
21
- * The size of the button
22
- */
23
- size?: 'xs' | 'sm' | 'lg' | 'xl';
24
- /**
25
- * Disable rendering the button element. It yields an object with classNames instead.
26
- */
27
- isRenderless?: boolean;
28
- /**
29
- * Custom class name, it will override the default ones using Tailwind Merge library.
30
- */
31
- class?: string;
32
- /**
33
- * If button is part of a group. Most of the time, this is automatically set
34
- * when using the ButtonGroup component.
35
- */
36
- isInGroup?: boolean;
37
- /**
38
- * Callback for when the button is pressed.
39
- */
40
- onPress?: (event: PressEvent) => void;
41
- }
42
- interface ButtonSignature {
43
- Args: ButtonArgs;
44
- Blocks: {
45
- default: [{
46
- classNames: string;
47
- }];
48
- };
49
- Element: HTMLButtonElement;
50
- }
51
- declare class Button extends Component<ButtonSignature> {
52
- isPressed: boolean;
53
- get type(): string;
54
- get classNames(): string;
55
- handlePressChange: (isPressed: boolean) => void;
56
- onPress: (event: PressEvent) => void;
57
- }
58
- export { Button, type ButtonSignature };
59
- export default Button;
@@ -1,54 +0,0 @@
1
- import Component from '@glimmer/component';
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' | 'accent' | '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
- };
40
- Blocks: {
41
- default: [];
42
- };
43
- Element: HTMLDivElement;
44
- }
45
- declare class Chip extends Component<ChipSignature> {
46
- get classNames(): {
47
- base: string;
48
- content: string;
49
- dot: string;
50
- closeButton: string;
51
- };
52
- }
53
- export { Chip, type ChipSignature };
54
- export default Chip;
@@ -1,55 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { type PressEvent } from '@frontile/utilities';
3
- import { type CloseButtonVariants } from '@frontile/theme';
4
- import type Owner from '@ember/owner';
5
- interface CloseButtonSignature {
6
- Args: {
7
- /**
8
- * The title of the close button
9
- *
10
- * @defaultValue 'Close'
11
- */
12
- title?: string;
13
- /**
14
- * The icon size
15
- *
16
- * @defaultValue 'lg'
17
- */
18
- size?: CloseButtonVariants['size'];
19
- /**
20
- * @defaultValue 'transparent'
21
- */
22
- variant?: CloseButtonVariants['variant'];
23
- /**
24
- * The function to call when button is pressed
25
- */
26
- onPress?: (event: PressEvent) => void;
27
- /**
28
- * Deprecated: The function to call when button is clicked
29
- *
30
- * @deprecated Use onPress instead for better cross-platform support
31
- */
32
- onClick?: (event: Event) => void;
33
- /**
34
- * Additional class for close button element
35
- */
36
- class?: string;
37
- };
38
- Blocks: {
39
- default: [string | null];
40
- };
41
- Element: HTMLButtonElement;
42
- }
43
- declare class CloseButton extends Component<CloseButtonSignature> {
44
- isPressed: boolean;
45
- constructor(owner: Owner, args: CloseButtonSignature['Args']);
46
- get classes(): {
47
- base: string;
48
- icon: string;
49
- };
50
- handlePressChange: (isPressed: boolean) => void;
51
- handlePress(event: PressEvent): void;
52
- handleClick(event: Event): void;
53
- }
54
- export { CloseButton, type CloseButtonSignature };
55
- export default CloseButton;
@@ -1,28 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import type { ButtonArgs } from './button';
3
- interface ToggleButtonArgs extends Pick<ButtonArgs, 'intent' | 'size' | 'class' | 'isInGroup'> {
4
- /**
5
- * If the button is currently selected
6
- *
7
- * @defaultValue false
8
- */
9
- isSelected?: boolean;
10
- /**
11
- * Callback when the buttle is toggled
12
- */
13
- onChange?: (isSelected: boolean) => void;
14
- }
15
- interface ToggleButtonSignature {
16
- Args: ToggleButtonArgs;
17
- Blocks: {
18
- default: [];
19
- };
20
- Element: HTMLButtonElement;
21
- }
22
- declare class ToggleButton extends Component<ToggleButtonSignature> {
23
- get classNames(): string;
24
- get isSelected(): boolean;
25
- onChange: () => void;
26
- }
27
- export { ToggleButton, type ToggleButtonSignature };
28
- export default ToggleButton;
@@ -1 +0,0 @@
1
- export { default } from "@frontile/buttons/components/button-group";
@@ -1 +0,0 @@
1
- export { default } from "@frontile/buttons/components/button";
@@ -1 +0,0 @@
1
- export { default } from "@frontile/buttons/components/chip";
@@ -1 +0,0 @@
1
- export { default } from "@frontile/buttons/components/close-button";
@@ -1 +0,0 @@
1
- export { default } from "@frontile/buttons/components/toggle-button";
@@ -1,31 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { hash } from '@ember/helper';
3
- import { useStyles } from '@frontile/theme';
4
- import { Button } from './button.js';
5
- import { ToggleButton } from './toggle-button.js';
6
- import { precompileTemplate } from '@ember/template-compilation';
7
- import { setComponentTemplate } from '@ember/component';
8
-
9
- class ButtonGroup extends Component {
10
- get classNames() {
11
- const {
12
- buttonGroup
13
- } = useStyles();
14
- return buttonGroup({
15
- class: this.args.class
16
- });
17
- }
18
- static {
19
- setComponentTemplate(precompileTemplate("\n <div class={{this.classNames}} role=\"group\" ...attributes>\n {{yield (hash Button=(component Button isInGroup=true appearance=@appearance intent=@intent size=@size) ToggleButton=(component ToggleButton isInGroup=true intent=@intent size=@size))}}\n </div>\n ", {
20
- strictMode: true,
21
- scope: () => ({
22
- hash,
23
- Button,
24
- ToggleButton
25
- })
26
- }), this);
27
- }
28
- }
29
-
30
- export { ButtonGroup, ButtonGroup as default };
31
- //# sourceMappingURL=button-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-group.js","sources":["../../src/components/button-group.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport { useStyles } from '@frontile/theme';\nimport Button, { type ButtonSignature } from './button';\nimport type { ButtonArgs } from './button';\nimport ToggleButton, { type ToggleButtonSignature } from './toggle-button';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\n\ninterface ButtonGroupArgs\n extends Pick<ButtonArgs, 'appearance' | 'intent' | 'size' | 'class'> {}\n\ninterface ButtonGroupSignature {\n Args: ButtonGroupArgs;\n Blocks: {\n default: [\n {\n Button: WithBoundArgs<ComponentLike<ButtonSignature>, 'isInGroup'>;\n ToggleButton: WithBoundArgs<\n ComponentLike<ToggleButtonSignature>,\n 'isInGroup'\n >;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nclass ButtonGroup extends Component<ButtonGroupSignature> {\n get classNames(): string {\n const { buttonGroup } = useStyles();\n\n return buttonGroup({\n class: this.args.class\n });\n }\n\n <template>\n <div class={{this.classNames}} role=\"group\" ...attributes>\n {{yield\n (hash\n Button=(component\n Button\n isInGroup=true\n appearance=@appearance\n intent=@intent\n size=@size\n )\n ToggleButton=(component\n ToggleButton isInGroup=true intent=@intent size=@size\n )\n )\n }}\n </div>\n </template>\n}\n\nexport { ButtonGroup, type ButtonGroupSignature };\nexport default ButtonGroup;\n"],"names":["ButtonGroup","Component","classNames","buttonGroup","useStyles","class","args","setComponentTemplate","precompileTemplate","strictMode","scope","hash","Button","ToggleButton"],"mappings":";;;;;;;;AA2BA,MAAMA,oBAAoBC,SAAA,CAAU;EAClC,IAAIC,UAAAA,GAAqB;IACvB,MAAM;AAAEC,MAAAA;KAAa,GAAGC,SAAA,EAAA;AAExB,IAAA,OAAOD,WAAA,CAAY;AACjBE,MAAAA,KAAA,EAAO,IAAI,CAACC,IAAI,CAACD;AACnB,KAAA,CAAA;AACF,EAAA;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CAAA,qRAAA,EAiBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;QAAAC,MAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,55 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { hash } from '@ember/helper';
3
- import { tracked } from '@glimmer/tracking';
4
- import { useStyles } from '@frontile/theme';
5
- import { press } from '@frontile/utilities';
6
- import { precompileTemplate } from '@ember/template-compilation';
7
- import { setComponentTemplate } from '@ember/component';
8
- import { d as decorateFieldV2, i as initializeDeferredDecorator } from '../runtime-BPCpkOf1-B5Lbloj7.js';
9
-
10
- class Button extends Component {
11
- static {
12
- decorateFieldV2(this.prototype, "isPressed", [tracked], function () {
13
- return false;
14
- });
15
- }
16
- #isPressed = (initializeDeferredDecorator(this, "isPressed"), void 0);
17
- get type() {
18
- if (this.args.type) {
19
- return this.args.type;
20
- }
21
- return 'button';
22
- }
23
- get classNames() {
24
- const {
25
- button
26
- } = useStyles();
27
- return button({
28
- intent: this.args.intent || 'default',
29
- size: this.args.size,
30
- appearance: this.args.appearance || 'default',
31
- isInGroup: this.args.isInGroup,
32
- class: this.args.class
33
- });
34
- }
35
- handlePressChange = isPressed => {
36
- this.isPressed = isPressed;
37
- };
38
- onPress = event => {
39
- if (typeof this.args.onPress === 'function') {
40
- this.args.onPress(event);
41
- }
42
- };
43
- static {
44
- setComponentTemplate(precompileTemplate("\n {{#if @isRenderless}}\n {{yield (hash classNames=this.classNames)}}\n {{else}}\n <button type={{this.type}} class={{this.classNames}} data-pressed={{if this.isPressed \"true\"}} {{press this.onPress onPressChange=this.handlePressChange}} ...attributes>\n {{yield (hash classNames=this.classNames)}}\n </button>\n {{/if}}\n ", {
45
- strictMode: true,
46
- scope: () => ({
47
- hash,
48
- press
49
- })
50
- }), this);
51
- }
52
- }
53
-
54
- export { Button, Button as default };
55
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sources":["../../src/components/button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport { tracked } from '@glimmer/tracking';\nimport { useStyles } from '@frontile/theme';\nimport { press, type PressEvent } from '@frontile/utilities';\n\nexport interface ButtonArgs {\n /**\n * The HTML type of the button\n *\n * @defaultValue 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n\n /**\n * The button appearance\n *\n * @defaultValue 'default'\n */\n appearance?: 'default' | 'outlined' | 'minimal' | 'tonal' | 'custom';\n\n /**\n * The intent of the button\n */\n intent?: 'default' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';\n\n /**\n * The size of the button\n */\n size?: 'xs' | 'sm' | 'lg' | 'xl';\n\n /**\n * Disable rendering the button element. It yields an object with classNames instead.\n */\n isRenderless?: boolean;\n\n /**\n * Custom class name, it will override the default ones using Tailwind Merge library.\n */\n class?: string;\n\n /**\n * If button is part of a group. Most of the time, this is automatically set\n * when using the ButtonGroup component.\n */\n isInGroup?: boolean;\n\n /**\n * Callback for when the button is pressed.\n */\n onPress?: (event: PressEvent) => void;\n}\n\ninterface ButtonSignature {\n Args: ButtonArgs;\n Blocks: {\n default: [{ classNames: string }];\n };\n Element: HTMLButtonElement;\n}\n\nclass Button extends Component<ButtonSignature> {\n @tracked isPressed = false;\n\n get type(): string {\n if (this.args.type) {\n return this.args.type;\n }\n return 'button';\n }\n\n get classNames(): string {\n const { button } = useStyles();\n\n return button({\n intent: this.args.intent || 'default',\n size: this.args.size,\n appearance: this.args.appearance || 'default',\n isInGroup: this.args.isInGroup,\n class: this.args.class\n });\n }\n\n handlePressChange = (isPressed: boolean): void => {\n this.isPressed = isPressed;\n };\n\n onPress = (event: PressEvent) => {\n if (typeof this.args.onPress === 'function') {\n this.args.onPress(event);\n }\n };\n\n <template>\n {{#if @isRenderless}}\n {{yield (hash classNames=this.classNames)}}\n {{else}}\n <button\n type={{this.type}}\n class={{this.classNames}}\n data-pressed={{if this.isPressed \"true\"}}\n {{press this.onPress onPressChange=this.handlePressChange}}\n ...attributes\n >\n {{yield (hash classNames=this.classNames)}}\n </button>\n {{/if}}\n </template>\n}\n\nexport { Button, type ButtonSignature };\nexport default Button;\n"],"names":["Button","Component","g","prototype","tracked","i","void 0","type","args","classNames","button","useStyles","intent","size","appearance","isInGroup","class","handlePressChange","isPressed","onPress","event","setComponentTemplate","precompileTemplate","strictMode","scope","hash","press"],"mappings":";;;;;;;;;AA6DA,MAAMA,eAAeC,SAAA,CAAU;AAAA,EAAA;IAAAC,eAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CAC5BC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAoB,KAAA;AAAA,IAAA,CAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,2BAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA;EAErB,IAAIC,IAAAA,GAAe;AACjB,IAAA,IAAI,IAAI,CAACC,IAAI,CAACD,IAAI,EAAE;AAClB,MAAA,OAAO,IAAI,CAACC,IAAI,CAACD,IAAI;AACvB,IAAA;AACA,IAAA,OAAO,QAAA;AACT,EAAA;EAEA,IAAIE,UAAAA,GAAqB;IACvB,MAAM;AAAEC,MAAAA;KAAQ,GAAGC,SAAA,EAAA;AAEnB,IAAA,OAAOD,MAAA,CAAO;AACZE,MAAAA,MAAA,EAAQ,IAAI,CAACJ,IAAI,CAACI,MAAM,IAAI,SAAA;AAC5BC,MAAAA,IAAA,EAAM,IAAI,CAACL,IAAI,CAACK,IAAI;AACpBC,MAAAA,UAAA,EAAY,IAAI,CAACN,IAAI,CAACM,UAAU,IAAI,SAAA;AACpCC,MAAAA,SAAA,EAAW,IAAI,CAACP,IAAI,CAACO,SAAS;AAC9BC,MAAAA,KAAA,EAAO,IAAI,CAACR,IAAI,CAACQ;AACnB,KAAA,CAAA;AACF,EAAA;EAEAC,iBAAA,GAAqBC,SAAkB,IAAO;IAC5C,IAAI,CAACA,SAAS,GAAGA,SAAA;EACnB,CAAA;EAEAC,OAAA,GAAWC,KAAO,IAAA;IAChB,IAAI,OAAO,IAAI,CAACZ,IAAI,CAACW,OAAO,KAAK,UAAA,EAAY;AAC3C,MAAA,IAAI,CAACX,IAAI,CAACW,OAAO,CAACC,KAAA,CAAA;AACpB,IAAA;EACF,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,wWAAA,EAcA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,IAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,44 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { useStyles } from '@frontile/theme';
3
- import { CloseButton } from './close-button.js';
4
- import { precompileTemplate } from '@ember/template-compilation';
5
- import { setComponentTemplate } from '@ember/component';
6
-
7
- class Chip extends Component {
8
- get classNames() {
9
- const {
10
- chip
11
- } = useStyles();
12
- const {
13
- base,
14
- content,
15
- dot,
16
- closeButton
17
- } = chip({
18
- intent: this.args.intent || 'default',
19
- size: this.args.size,
20
- appearance: this.args.appearance || 'default',
21
- radius: this.args.radius,
22
- isDisabled: this.args.isDisabled
23
- });
24
- return {
25
- base: base({
26
- class: this.args.class
27
- }),
28
- content: content(),
29
- dot: dot(),
30
- closeButton: closeButton()
31
- };
32
- }
33
- static {
34
- setComponentTemplate(precompileTemplate("\n <div class={{this.classNames.base}} ...attributes>\n {{#if @withDot}}\n <span class={{this.classNames.dot}}></span>\n {{/if}}\n <span class={{this.classNames.content}}>\n {{yield}}\n </span>\n {{#if @onClose}}\n <CloseButton @class={{this.classNames.closeButton}} @onClick={{@onClose}} disabled={{@isDisabled}} />\n {{/if}}\n </div>\n ", {
35
- strictMode: true,
36
- scope: () => ({
37
- CloseButton
38
- })
39
- }), this);
40
- }
41
- }
42
-
43
- export { Chip, Chip as default };
44
- //# sourceMappingURL=chip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chip.js","sources":["../../src/components/chip.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles } from '@frontile/theme';\nimport { CloseButton } from './close-button';\n\ninterface ChipSignature {\n Args: {\n /**\n * The chip appearance\n *\n * @defaultValue 'default'\n */\n appearance?: 'default' | 'outlined' | 'faded';\n\n /**\n * The intent of the chip\n */\n intent?:\n | 'default'\n | 'primary'\n | 'accent'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * The size of the chip\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * The radius the chip\n */\n radius?: 'none' | 'sm' | 'lg' | 'full';\n\n /**\n * Option to add dot to the chip\n */\n withDot?: boolean;\n\n /**\n * Function to be called when clicking on the close button.\n * If you pass this argument, the close button will be visible.\n */\n onClose?: () => void;\n\n /**\n * Disables the clip and disables the close button if any.\n */\n isDisabled?: boolean;\n\n /**\n * Custom class name, it will override the default ones using Tailwind Merge library.\n */\n class?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nclass Chip extends Component<ChipSignature> {\n get classNames() {\n const { chip } = useStyles();\n\n const { base, content, dot, closeButton } = chip({\n intent: this.args.intent || 'default',\n size: this.args.size,\n appearance: this.args.appearance || 'default',\n radius: this.args.radius,\n isDisabled: this.args.isDisabled\n });\n\n return {\n base: base({ class: this.args.class }),\n content: content(),\n dot: dot(),\n closeButton: closeButton()\n };\n }\n\n <template>\n <div class={{this.classNames.base}} ...attributes>\n {{#if @withDot}}\n <span class={{this.classNames.dot}}></span>\n {{/if}}\n <span class={{this.classNames.content}}>\n {{yield}}\n </span>\n {{#if @onClose}}\n <CloseButton\n @class={{this.classNames.closeButton}}\n @onClick={{@onClose}}\n disabled={{@isDisabled}}\n />\n {{/if}}\n </div>\n </template>\n}\n\nexport { Chip, type ChipSignature };\nexport default Chip;\n"],"names":["Chip","Component","classNames","chip","useStyles","base","content","dot","closeButton","intent","args","size","appearance","radius","isDisabled","class","setComponentTemplate","precompileTemplate","strictMode","scope","CloseButton"],"mappings":";;;;;;AA6DA,MAAMA,aAAaC,SAAA,CAAU;EAC3B,IAAIC,UAAAA,GAAa;IACf,MAAM;AAAEC,MAAAA;KAAM,GAAGC,SAAA,EAAA;IAEjB,MAAM;MAAEC,IAAI;MAAEC,OAAO;MAAEC,GAAG;AAAEC,MAAAA;KAAa,GAAGL,IAAA,CAAK;AAC/CM,MAAAA,MAAA,EAAQ,IAAI,CAACC,IAAI,CAACD,MAAM,IAAI,SAAA;AAC5BE,MAAAA,IAAA,EAAM,IAAI,CAACD,IAAI,CAACC,IAAI;AACpBC,MAAAA,UAAA,EAAY,IAAI,CAACF,IAAI,CAACE,UAAU,IAAI,SAAA;AACpCC,MAAAA,MAAA,EAAQ,IAAI,CAACH,IAAI,CAACG,MAAM;AACxBC,MAAAA,UAAA,EAAY,IAAI,CAACJ,IAAI,CAACI;AACxB,KAAA,CAAA;IAEA,OAAO;MACLT,IAAA,EAAMA,IAAA,CAAK;AAAEU,QAAAA,KAAA,EAAO,IAAI,CAACL,IAAI,CAACK;AAAM,OAAA,CAAA;MACpCT,OAAA,EAASA,OAAA,EAAA;MACTC,GAAA,EAAKA,GAAA,EAAA;MACLC,WAAA,EAAaA,WAAA;KACf;AACF,EAAA;AAEA,EAAA;IAAAQ,oBAAA,CAAAC,kBAAA,CAAA,8YAAA,EAgBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,83 +0,0 @@
1
- import Component from '@glimmer/component';
2
- import { action } from '@ember/object';
3
- import { tracked } from '@glimmer/tracking';
4
- import { on } from '@ember/modifier';
5
- import { deprecate } from '@ember/debug';
6
- import { VisuallyHidden, press } from '@frontile/utilities';
7
- import { useStyles } from '@frontile/theme';
8
- import { precompileTemplate } from '@ember/template-compilation';
9
- import { setComponentTemplate } from '@ember/component';
10
- import { d as decorateFieldV2, i as initializeDeferredDecorator, a as decorateMethodV2 } from '../runtime-BPCpkOf1-B5Lbloj7.js';
11
-
12
- class CloseButton extends Component {
13
- static {
14
- decorateFieldV2(this.prototype, "isPressed", [tracked], function () {
15
- return false;
16
- });
17
- }
18
- #isPressed = (initializeDeferredDecorator(this, "isPressed"), void 0);
19
- constructor(owner, args) {
20
- super(owner, args);
21
- if (args.onClick) {
22
- deprecate('CloseButton: onClick is deprecated. Use onPress instead for better cross-platform support including touch, keyboard, and screen reader interactions.', false, {
23
- id: 'frontile.close-button.onClick',
24
- until: '0.18.0',
25
- for: '@frontile/buttons',
26
- since: {
27
- available: '0.17.0',
28
- enabled: '0.17.0'
29
- }
30
- });
31
- }
32
- }
33
- get classes() {
34
- const {
35
- closeButton
36
- } = useStyles();
37
- let {
38
- base,
39
- icon
40
- } = closeButton({
41
- size: this.args.size || 'md',
42
- variant: this.args.variant || 'transparent'
43
- });
44
- return {
45
- base: base({
46
- class: this.args.class
47
- }),
48
- icon: icon()
49
- };
50
- }
51
- handlePressChange = isPressed => {
52
- this.isPressed = isPressed;
53
- };
54
- handlePress(event) {
55
- if (typeof this.args.onPress === 'function') {
56
- this.args.onPress(event);
57
- }
58
- }
59
- static {
60
- decorateMethodV2(this.prototype, "handlePress", [action]);
61
- }
62
- handleClick(event) {
63
- if (typeof this.args.onClick === 'function') {
64
- this.args.onClick(event);
65
- }
66
- }
67
- static {
68
- decorateMethodV2(this.prototype, "handleClick", [action]);
69
- }
70
- static {
71
- setComponentTemplate(precompileTemplate("\n <button type=\"button\" class={{this.classes.base}} data-pressed={{if this.isPressed \"true\"}} ...attributes {{press this.handlePress onPressChange=this.handlePressChange}} {{on \"click\" this.handleClick}}>\n\n {{#if (has-block)}}\n {{yield this.classes.icon}}\n {{else}}\n <svg class={{this.classes.icon}} aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"></path>\n </svg>\n {{/if}}\n\n <VisuallyHidden>\n {{if @title @title \"Close\"}}\n </VisuallyHidden>\n </button>\n ", {
72
- strictMode: true,
73
- scope: () => ({
74
- press,
75
- on,
76
- VisuallyHidden
77
- })
78
- }), this);
79
- }
80
- }
81
-
82
- export { CloseButton, CloseButton as default };
83
- //# sourceMappingURL=close-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"close-button.js","sources":["../../src/components/close-button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport { on } from '@ember/modifier';\nimport { deprecate } from '@ember/debug';\nimport { VisuallyHidden, press, type PressEvent } from '@frontile/utilities';\nimport { useStyles, type CloseButtonVariants } from '@frontile/theme';\nimport type Owner from '@ember/owner';\n\ninterface CloseButtonSignature {\n Args: {\n /**\n * The title of the close button\n *\n * @defaultValue 'Close'\n */\n title?: string;\n\n /**\n * The icon size\n *\n * @defaultValue 'lg'\n */\n size?: CloseButtonVariants['size'];\n\n /**\n * @defaultValue 'transparent'\n */\n variant?: CloseButtonVariants['variant'];\n\n /**\n * The function to call when button is pressed\n */\n onPress?: (event: PressEvent) => void;\n\n /**\n * Deprecated: The function to call when button is clicked\n *\n * @deprecated Use onPress instead for better cross-platform support\n */\n onClick?: (event: Event) => void;\n\n /**\n * Additional class for close button element\n */\n class?: string;\n };\n Blocks: {\n default: [string | null];\n };\n Element: HTMLButtonElement;\n}\n\nclass CloseButton extends Component<CloseButtonSignature> {\n @tracked isPressed = false;\n\n constructor(owner: Owner, args: CloseButtonSignature['Args']) {\n super(owner, args);\n\n if (args.onClick) {\n deprecate(\n 'CloseButton: onClick is deprecated. Use onPress instead for better cross-platform support including touch, keyboard, and screen reader interactions.',\n false,\n {\n id: 'frontile.close-button.onClick',\n until: '0.18.0',\n for: '@frontile/buttons',\n since: { available: '0.17.0', enabled: '0.17.0' }\n }\n );\n }\n }\n\n get classes() {\n const { closeButton } = useStyles();\n\n let { base, icon } = closeButton({\n size: this.args.size || 'md',\n variant: this.args.variant || 'transparent'\n });\n\n return {\n base: base({ class: this.args.class }),\n icon: icon()\n };\n }\n\n handlePressChange = (isPressed: boolean): void => {\n this.isPressed = isPressed;\n };\n\n @action handlePress(event: PressEvent): void {\n if (typeof this.args.onPress === 'function') {\n this.args.onPress(event);\n }\n }\n\n @action handleClick(event: Event): void {\n if (typeof this.args.onClick === 'function') {\n this.args.onClick(event);\n }\n }\n\n <template>\n <button\n type=\"button\"\n class={{this.classes.base}}\n data-pressed={{if this.isPressed \"true\"}}\n ...attributes\n {{press this.handlePress onPressChange=this.handlePressChange}}\n {{on \"click\" this.handleClick}}\n >\n\n {{#if (has-block)}}\n {{yield this.classes.icon}}\n {{else}}\n <svg\n class={{this.classes.icon}}\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n ></path>\n </svg>\n {{/if}}\n\n <VisuallyHidden>\n {{if @title @title \"Close\"}}\n </VisuallyHidden>\n </button>\n </template>\n}\n\nexport { CloseButton, type CloseButtonSignature };\nexport default CloseButton;\n"],"names":["CloseButton","Component","g","prototype","tracked","i","void 0","constructor","owner","args","onClick","deprecate","id","until","for","since","available","enabled","classes","closeButton","useStyles","base","icon","size","variant","class","handlePressChange","isPressed","handlePress","event","onPress","n","action","handleClick","setComponentTemplate","precompileTemplate","strictMode","scope","press","on","VisuallyHidden"],"mappings":";;;;;;;;;;;AAqDA,MAAMA,oBAAoBC,SAAA,CAAU;AAAA,EAAA;IAAAC,eAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CACjCC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAoB,KAAA;AAAA,IAAA,CAAA,CAAA;AAAA;AAAA,EAAA,UAAA,IAAAC,2BAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAAC,MAAA;AAErBC,EAAAA,WAAAA,CAAYC,KAAY,EAAEC,IAAkC,EAAE;AAC5D,IAAA,KAAK,CAACD,KAAA,EAAOC,IAAA,CAAA;IAEb,IAAIA,IAAA,CAAKC,OAAO,EAAE;AAChBC,MAAAA,SAAA,CACE,wJACA,KAAA,EACA;AACEC,QAAAA,EAAA,EAAI,+BAAA;AACJC,QAAAA,KAAA,EAAO,QAAA;AACPC,QAAAA,GAAA,EAAK,mBAAA;AACLC,QAAAA,KAAA,EAAO;AAAEC,UAAAA,SAAA,EAAW,QAAA;AAAUC,UAAAA,OAAA,EAAS;AAAS;AAClD,OAAA,CAAA;AAEJ,IAAA;AACF,EAAA;EAEA,IAAIC,OAAAA,GAAU;IACZ,MAAM;AAAEC,MAAAA;KAAa,GAAGC,SAAA,EAAA;IAExB,IAAI;MAAEC,IAAI;AAAEC,MAAAA;KAAM,GAAGH,WAAA,CAAY;AA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@glimmer/component';
2
- import { useStyles } from '@frontile/theme';
3
- import { press } from '@frontile/utilities';
4
- import { precompileTemplate } from '@ember/template-compilation';
5
- import { setComponentTemplate } from '@ember/component';
6
-
7
- class ToggleButton extends Component {
8
- get classNames() {
9
- const {
10
- toggleButton
11
- } = useStyles();
12
- return toggleButton({
13
- intent: this.args.intent || 'default',
14
- size: this.args.size,
15
- appearance: 'outlined',
16
- isSelected: this.isSelected,
17
- isInGroup: this.args.isInGroup,
18
- class: this.args.class
19
- });
20
- }
21
- get isSelected() {
22
- return !!this.args.isSelected;
23
- }
24
- onChange = () => {
25
- if (typeof this.args.onChange === 'function') {
26
- this.args.onChange(!this.isSelected);
27
- }
28
- };
29
- static {
30
- setComponentTemplate(precompileTemplate("\n <button type=\"button\" {{press this.onChange}} class={{this.classNames}} aria-pressed=\"{{this.isSelected}}\" ...attributes>\n {{yield}}\n </button>\n ", {
31
- strictMode: true,
32
- scope: () => ({
33
- press
34
- })
35
- }), this);
36
- }
37
- }
38
-
39
- export { ToggleButton, ToggleButton as default };
40
- //# sourceMappingURL=toggle-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toggle-button.js","sources":["../../src/components/toggle-button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles } from '@frontile/theme';\nimport { press } from '@frontile/utilities';\nimport type { ButtonArgs } from './button';\n\ninterface ToggleButtonArgs\n extends Pick<ButtonArgs, 'intent' | 'size' | 'class' | 'isInGroup'> {\n /**\n * If the button is currently selected\n *\n * @defaultValue false\n */\n isSelected?: boolean;\n\n /**\n * Callback when the buttle is toggled\n */\n onChange?: (isSelected: boolean) => void;\n}\n\ninterface ToggleButtonSignature {\n Args: ToggleButtonArgs;\n Blocks: {\n default: [];\n };\n Element: HTMLButtonElement;\n}\n\nclass ToggleButton extends Component<ToggleButtonSignature> {\n get classNames(): string {\n const { toggleButton } = useStyles();\n\n return toggleButton({\n intent: this.args.intent || 'default',\n size: this.args.size,\n appearance: 'outlined',\n isSelected: this.isSelected,\n isInGroup: this.args.isInGroup,\n class: this.args.class\n });\n }\n\n get isSelected() {\n return !!this.args.isSelected;\n }\n\n onChange = () => {\n if (typeof this.args.onChange === 'function') {\n this.args.onChange(!this.isSelected);\n }\n };\n\n <template>\n <button\n type=\"button\"\n {{press this.onChange}}\n class={{this.classNames}}\n aria-pressed=\"{{this.isSelected}}\"\n ...attributes\n >\n {{yield}}\n </button>\n </template>\n}\n\nexport { ToggleButton, type ToggleButtonSignature };\nexport default ToggleButton;\n"],"names":["ToggleButton","Component","classNames","toggleButton","useStyles","intent","args","size","appearance","isSelected","isInGroup","class","onChange","setComponentTemplate","precompileTemplate","strictMode","scope","press"],"mappings":";;;;;;AA4BA,MAAMA,qBAAqBC,SAAA,CAAU;EACnC,IAAIC,UAAAA,GAAqB;IACvB,MAAM;AAAEC,MAAAA;KAAc,GAAGC,SAAA,EAAA;AAEzB,IAAA,OAAOD,YAAA,CAAa;AAClBE,MAAAA,MAAA,EAAQ,IAAI,CAACC,IAAI,CAACD,MAAM,IAAI,SAAA;AAC5BE,MAAAA,IAAA,EAAM,IAAI,CAACD,IAAI,CAACC,IAAI;AACpBC,MAAAA,UAAA,EAAY,UAAA;MACZC,UAAA,EAAY,IAAI,CAACA,UAAU;AAC3BC,MAAAA,SAAA,EAAW,IAAI,CAACJ,IAAI,CAACI,SAAS;AAC9BC,MAAAA,KAAA,EAAO,IAAI,CAACL,IAAI,CAACK;AACnB,KAAA,CAAA;AACF,EAAA;EAEA,IAAIF,UAAAA,GAAa;AACf,IAAA,OAAO,CAAC,CAAC,IAAI,CAACH,IAAI,CAACG,UAAU;AAC/B,EAAA;EAEAG,QAAA,GAAWA,MAAA;IACT,IAAI,OAAO,IAAI,CAACN,IAAI,CAACM,QAAQ,KAAK,UAAA,EAAY;MAC5C,IAAI,CAACN,IAAI,CAACM,QAAQ,CAAC,CAAC,IAAI,CAACH,UAAU,CAAA;AACrC,IAAA;EACF,CAAA;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,yKAAA,EAUA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -1,67 +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 decorateMethodV2(prototype, prop, decorators) {
41
- const origDesc = Object.getOwnPropertyDescriptor(prototype, prop);
42
- let desc = {
43
- ...origDesc
44
- };
45
- for (let decorator of decorators) {
46
- desc = decorator(prototype, prop, desc) || desc;
47
- }
48
- if (desc.initializer !== void 0) {
49
- desc.value = desc.initializer ? desc.initializer.call(prototype) : void 0;
50
- desc.initializer = void 0;
51
- }
52
- Object.defineProperty(prototype, prop, desc);
53
- }
54
- function initializeDeferredDecorator(target, prop) {
55
- let desc = findDeferredDecorator(target.constructor, prop);
56
- if (desc) {
57
- Object.defineProperty(target, prop, {
58
- enumerable: desc.enumerable,
59
- configurable: desc.configurable,
60
- writable: desc.writable,
61
- value: desc.initializer ? desc.initializer.call(target) : void 0
62
- });
63
- }
64
- }
65
-
66
- export { decorateMethodV2 as a, decorateFieldV2 as d, initializeDeferredDecorator as i };
67
- //# sourceMappingURL=runtime-BPCpkOf1-B5Lbloj7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-BPCpkOf1-B5Lbloj7.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","decorateMethodV2","origDesc","getOwnPropertyDescriptor","value","call","initializeDeferred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