@frontile/buttons 0.18.0-alpha.0 → 0.18.0-alpha.1
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,8 +1,8 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import
|
|
2
|
+
import { type ButtonSignature } from './button';
|
|
3
3
|
import type { ButtonArgs } from './button';
|
|
4
|
-
import
|
|
5
|
-
import type { WithBoundArgs } from '@glint/template';
|
|
4
|
+
import { type ToggleButtonSignature } from './toggle-button';
|
|
5
|
+
import type { ComponentLike, WithBoundArgs } from '@glint/template';
|
|
6
6
|
interface ButtonGroupArgs extends Pick<ButtonArgs, 'appearance' | 'intent' | 'size' | 'class'> {
|
|
7
7
|
}
|
|
8
8
|
interface ButtonGroupSignature {
|
|
@@ -10,8 +10,8 @@ interface ButtonGroupSignature {
|
|
|
10
10
|
Blocks: {
|
|
11
11
|
default: [
|
|
12
12
|
{
|
|
13
|
-
Button: WithBoundArgs<
|
|
14
|
-
ToggleButton: WithBoundArgs<
|
|
13
|
+
Button: WithBoundArgs<ComponentLike<ButtonSignature>, 'isInGroup'>;
|
|
14
|
+
ToggleButton: WithBoundArgs<ComponentLike<ToggleButtonSignature>, 'isInGroup'>;
|
|
15
15
|
}
|
|
16
16
|
];
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
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 from './button';\nimport type { ButtonArgs } from './button';\nimport ToggleButton from './toggle-button';\nimport type { 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<
|
|
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<ComponentLike<ToggleButtonSignature>, 'isInGroup'>;\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":";;;;;;;;AAwBA,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontile/buttons",
|
|
3
|
-
"version": "0.18.0-alpha.
|
|
3
|
+
"version": "0.18.0-alpha.1",
|
|
4
4
|
"description": "Component Library for Ember Octane apps: Buttons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -36,10 +36,25 @@
|
|
|
36
36
|
"declarations",
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "rollup --config",
|
|
41
|
+
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
|
|
42
|
+
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
|
|
43
|
+
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
44
|
+
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
45
|
+
"lint:js": "eslint . --cache",
|
|
46
|
+
"lint:js:fix": "eslint . --fix",
|
|
47
|
+
"lint:types": "glint",
|
|
48
|
+
"prepack": "concurrently 'npm:build'",
|
|
49
|
+
"start": "concurrently 'npm:start:*'",
|
|
50
|
+
"start:js": "rollup --config --watch --no-watch.clearScreen",
|
|
51
|
+
"start:types": "glint -d --watch",
|
|
52
|
+
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
|
|
53
|
+
},
|
|
39
54
|
"dependencies": {
|
|
40
55
|
"@embroider/addon-shim": "^1.9.0",
|
|
41
|
-
"@frontile/theme": "0.18.0-alpha.
|
|
42
|
-
"@frontile/utilities": "0.18.0-alpha.
|
|
56
|
+
"@frontile/theme": "0.18.0-alpha.1",
|
|
57
|
+
"@frontile/utilities": "0.18.0-alpha.1"
|
|
43
58
|
},
|
|
44
59
|
"devDependencies": {
|
|
45
60
|
"@babel/core": "7.26.7",
|
|
@@ -89,18 +104,5 @@
|
|
|
89
104
|
"./components/toggle-button.js": "./dist/_app_/components/toggle-button.js"
|
|
90
105
|
}
|
|
91
106
|
},
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
|
|
95
|
-
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
|
|
96
|
-
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
97
|
-
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
98
|
-
"lint:js": "eslint . --cache",
|
|
99
|
-
"lint:js:fix": "eslint . --fix",
|
|
100
|
-
"lint:types": "glint",
|
|
101
|
-
"start": "concurrently 'npm:start:*'",
|
|
102
|
-
"start:js": "rollup --config --watch --no-watch.clearScreen",
|
|
103
|
-
"start:types": "glint -d --watch",
|
|
104
|
-
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
+
"gitHead": "fd97ba4f441882b1dd5cb07e57a8a0314d9990f6"
|
|
108
|
+
}
|