@hokulea/ember 0.14.0 → 0.15.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/components/actions/-button.d.ts +31 -0
- package/declarations/components/actions/-button.d.ts.map +1 -1
- package/declarations/components/actions/button-group.d.ts +10 -0
- package/declarations/components/actions/button-group.d.ts.map +1 -0
- package/declarations/components/actions/button.d.ts +7 -17
- package/declarations/components/actions/button.d.ts.map +1 -1
- package/declarations/components/actions/icon-button.d.ts +6 -13
- package/declarations/components/actions/icon-button.d.ts.map +1 -1
- package/declarations/components/actions/radio-button-group.d.ts +57 -0
- package/declarations/components/actions/radio-button-group.d.ts.map +1 -0
- package/declarations/components/button-group.d.ts +2 -0
- package/declarations/components/button-group.d.ts.map +1 -0
- package/declarations/components/radio-button-group.d.ts +2 -0
- package/declarations/components/radio-button-group.d.ts.map +1 -0
- package/declarations/index.d.ts +2 -0
- package/declarations/index.d.ts.map +1 -1
- package/declarations/template-registry.d.ts +4 -0
- package/declarations/template-registry.d.ts.map +1 -1
- package/declarations/test-support/index.d.ts +2 -0
- package/declarations/test-support/index.d.ts.map +1 -1
- package/declarations/test-support/page-objects/button-group.d.ts +9 -0
- package/declarations/test-support/page-objects/button-group.d.ts.map +1 -0
- package/declarations/test-support/page-objects/button.d.ts.map +1 -1
- package/declarations/test-support/page-objects/radio-button-group.d.ts +33 -0
- package/declarations/test-support/page-objects/radio-button-group.d.ts.map +1 -0
- package/dist/{-button-KUaJCQaB.js → -button-zstwNwHq.js} +8 -2
- package/dist/-button-zstwNwHq.js.map +1 -0
- package/dist/_app_/components/button-group.js +1 -0
- package/dist/_app_/components/radio-button-group.js +1 -0
- package/dist/{app-header-B9BWy4HI.js → app-header-zFoKDgm0.js} +2 -2
- package/dist/{app-header-B9BWy4HI.js.map → app-header-zFoKDgm0.js.map} +1 -1
- package/dist/button-DCEeKVJE.js +25 -0
- package/dist/button-DCEeKVJE.js.map +1 -0
- package/dist/button-group-L-yIZgQe.js +14 -0
- package/dist/button-group-L-yIZgQe.js.map +1 -0
- package/dist/components/app-header.js +1 -1
- package/dist/components/button-group.js +2 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/radio-button-group.js +2 -0
- package/dist/components/radio-button-group.js.map +1 -0
- package/dist/{icon-button-ClE5SC8Y.js → icon-button-C1YrOLFe.js} +7 -5
- package/dist/icon-button-C1YrOLFe.js.map +1 -0
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/{pagination-Mgv860Cf.js → pagination-CjkoHYcN.js} +2 -2
- package/dist/{pagination-Mgv860Cf.js.map → pagination-CjkoHYcN.js.map} +1 -1
- package/dist/radio-button-group-D7LjyINa.js +91 -0
- package/dist/radio-button-group-D7LjyINa.js.map +1 -0
- package/dist/test-support/index.js +22 -2
- package/dist/test-support/index.js.map +1 -1
- package/package.json +8 -7
- package/dist/-button-KUaJCQaB.js.map +0 -1
- package/dist/button-CRe5grz4.js +0 -24
- package/dist/button-CRe5grz4.js.map +0 -1
- package/dist/icon-button-ClE5SC8Y.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hokulea/ember",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Hokulea Design System for Ember",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"repository": "https://github.com/hokulea/hokulea",
|
|
11
11
|
"files": [
|
|
12
12
|
"addon-main.cjs",
|
|
13
|
-
"lib",
|
|
14
13
|
"dist",
|
|
15
14
|
"declarations"
|
|
16
15
|
],
|
|
@@ -46,12 +45,12 @@
|
|
|
46
45
|
"@embroider/addon-shim": "^1.10.0",
|
|
47
46
|
"@hokulea/ember-pahu": "^0.0.3",
|
|
48
47
|
"decorator-transforms": "^2.3.0",
|
|
49
|
-
"ember-aria-voyager": "^
|
|
48
|
+
"ember-aria-voyager": "^1.2.1",
|
|
50
49
|
"ember-stargate": "^1.0.1",
|
|
51
50
|
"ember-strict-application-resolver": "^0.1.0",
|
|
52
51
|
"tracked-built-ins": "^4.0.0",
|
|
53
|
-
"@hokulea/
|
|
54
|
-
"@hokulea/
|
|
52
|
+
"@hokulea/tokens": "0.2.0",
|
|
53
|
+
"@hokulea/core": "0.11.0"
|
|
55
54
|
},
|
|
56
55
|
"peerDependencies": {
|
|
57
56
|
"@ember/test-helpers": "^5.0.0",
|
|
@@ -102,7 +101,7 @@
|
|
|
102
101
|
"ember-cli-code-coverage": "3.1.0",
|
|
103
102
|
"ember-cli-htmlbars": "^6.3.0",
|
|
104
103
|
"ember-command": "2.0.8",
|
|
105
|
-
"ember-concurrency": "5.
|
|
104
|
+
"ember-concurrency": "5.2.0",
|
|
106
105
|
"ember-element-helper": "^0.8.8",
|
|
107
106
|
"ember-link": "3.5.0",
|
|
108
107
|
"ember-modifier": "4.2.2",
|
|
@@ -131,7 +130,7 @@
|
|
|
131
130
|
"unplugin-icons": "^22.5.0",
|
|
132
131
|
"valibot": "^1.2.0",
|
|
133
132
|
"vite": "^7.3.1",
|
|
134
|
-
"@hokulea/core": "0.
|
|
133
|
+
"@hokulea/core": "0.11.0",
|
|
135
134
|
"@hokulea/theme-moana": "0.4.0"
|
|
136
135
|
},
|
|
137
136
|
"ember": {
|
|
@@ -149,6 +148,7 @@
|
|
|
149
148
|
"./components/app-header.js": "./dist/_app_/components/app-header.js",
|
|
150
149
|
"./components/avatar.js": "./dist/_app_/components/avatar.js",
|
|
151
150
|
"./components/box.js": "./dist/_app_/components/box.js",
|
|
151
|
+
"./components/button-group.js": "./dist/_app_/components/button-group.js",
|
|
152
152
|
"./components/button.js": "./dist/_app_/components/button.js",
|
|
153
153
|
"./components/card.js": "./dist/_app_/components/card.js",
|
|
154
154
|
"./components/checkbox.js": "./dist/_app_/components/checkbox.js",
|
|
@@ -171,6 +171,7 @@
|
|
|
171
171
|
"./components/password-input.js": "./dist/_app_/components/password-input.js",
|
|
172
172
|
"./components/phone-input.js": "./dist/_app_/components/phone-input.js",
|
|
173
173
|
"./components/popover.js": "./dist/_app_/components/popover.js",
|
|
174
|
+
"./components/radio-button-group.js": "./dist/_app_/components/radio-button-group.js",
|
|
174
175
|
"./components/radio.js": "./dist/_app_/components/radio.js",
|
|
175
176
|
"./components/range-input.js": "./dist/_app_/components/range-input.js",
|
|
176
177
|
"./components/section.js": "./dist/_app_/components/section.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"-button-KUaJCQaB.js","sources":["../src/components/actions/-button.ts"],"sourcesContent":["import { Link } from 'ember-link';\n\nimport type { CommandAction } from 'ember-command';\n\nconst LINK_PROPERTIES = [\n 'active',\n 'activeWithoutModels',\n 'activeWithoutQueryParams',\n 'entering',\n 'exiting',\n // 'open', // as of `ember-link@3`\n 'transitionTo',\n 'replaceWith',\n 'qualifiedRouteName',\n 'url',\n 'models',\n 'queryParams'\n];\n\nfunction getAllPropertyNames(obj: object) {\n const names: string[] = [];\n\n do {\n names.push(...Object.getOwnPropertyNames(obj));\n obj = Object.getPrototypeOf(obj) as object;\n } while (obj !== Object.prototype);\n\n return names.filter((name) => name !== 'constructor');\n}\n\nexport function isLink(commandable?: CommandAction): commandable is Link {\n if (commandable === undefined) {\n return false;\n }\n\n // `instanceOf` is not a reliable check, only when the host app runs with\n // embroider. In classic mode, the ember-link instance in the host app and in\n // ember-command addon are different and the check will fail, so this performs\n // some duck-type check\n const props = getAllPropertyNames(commandable);\n\n // the first check should be sufficient enough, but isn't due to:\n // https://github.com/gossi/ember-command/issues/23\n // so, there is another duck-type check for the link\n return commandable instanceof Link || LINK_PROPERTIES.every((prop) => props.includes(prop));\n}\n"],"names":["LINK_PROPERTIES","getAllPropertyNames","obj","names","push","Object","getOwnPropertyNames","getPrototypeOf","prototype","filter","name","isLink","commandable","undefined","props","Link","every","prop","includes"],"mappings":";;AAIA,MAAMA,eAAe,GAAG,CACtB,QAAQ,EACR,qBAAqB,EACrB,0BAA0B,EAC1B,UAAU,EACV,SAAS;AACT;AACA,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,QAAQ,EACR,aAAa,CACd;AAED,SAASC,mBAAmBA,CAACC,GAAW,EAAE;EACxC,MAAMC,KAAe,GAAG,EAAE;EAE1B,GAAG;IACDA,KAAK,CAACC,IAAI,CAAC,GAAGC,MAAM,CAACC,mBAAmB,CAACJ,GAAG,CAAC,CAAC;AAC9CA,IAAAA,GAAG,GAAGG,MAAM,CAACE,cAAc,CAACL,GAAG,CAAW;AAC5C,EAAA,CAAC,QAAQA,GAAG,KAAKG,MAAM,CAACG,SAAS;EAEjC,OAAOL,KAAK,CAACM,MAAM,CAAEC,IAAI,IAAKA,IAAI,KAAK,aAAa,CAAC;AACvD;AAEO,SAASC,MAAMA,CAACC,WAA2B,EAAuB;EACvE,IAAIA,WAAW,KAAKC,SAAS,EAAE;AAC7B,IAAA,OAAO,KAAK;AACd,EAAA;;AAEA;AACA;AACA;AACA;AACA,EAAA,MAAMC,KAAK,GAAGb,mBAAmB,CAACW,WAAW,CAAC;;AAE9C;AACA;AACA;AACA,EAAA,OAAOA,WAAW,YAAYG,IAAI,IAAIf,eAAe,CAACgB,KAAK,CAAEC,IAAI,IAAKH,KAAK,CAACI,QAAQ,CAACD,IAAI,CAAC,CAAC;AAC7F;;;;"}
|
package/dist/button-CRe5grz4.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { element } from 'ember-element-helper';
|
|
2
|
-
import { b as asBoolean, n as not, a as and } from './helpers-D4So5-uK.js';
|
|
3
|
-
import { d as disabled } from './disabled-B_FQ0Z51.js';
|
|
4
|
-
import { P as PushElement } from './push-C8z1Qw41.js';
|
|
5
|
-
import { i as isLink } from './-button-KUaJCQaB.js';
|
|
6
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
|
-
import { setComponentTemplate } from '@ember/component';
|
|
8
|
-
import templateOnly from '@ember/component/template-only';
|
|
9
|
-
|
|
10
|
-
const Button = setComponentTemplate(precompileTemplate("<PushElement @push={{@push}} @href={{@href}} @element={{element \"button\"}} class=\"button\" type={{if (and (not (isLink @push)) (not (asBoolean @href))) \"button\"}} data-intent={{if @intent @intent \"action\"}} data-importance={{if @importance @importance \"supreme\"}} data-spacing={{@spacing}} {{disabled when=(if @disabled @disabled false)}} data-test-button ...attributes>\n {{#if (has-block \"before\")}}\n <span data-test-button=\"before\">\n {{yield to=\"before\"}}\n </span>\n {{/if}}\n\n <span data-test-button=\"label\">\n {{#if (has-block \"label\")}}\n {{yield to=\"label\"}}\n {{/if}}\n\n {{#if (has-block)}}\n {{yield}}\n {{/if}}\n </span>\n\n {{#if (has-block \"after\")}}\n <span data-test-button=\"after\">\n {{yield to=\"after\"}}\n </span>\n {{/if}}\n</PushElement>", {
|
|
11
|
-
strictMode: true,
|
|
12
|
-
scope: () => ({
|
|
13
|
-
PushElement,
|
|
14
|
-
element,
|
|
15
|
-
and,
|
|
16
|
-
not,
|
|
17
|
-
isLink,
|
|
18
|
-
asBoolean,
|
|
19
|
-
disabled
|
|
20
|
-
})
|
|
21
|
-
}), templateOnly());
|
|
22
|
-
|
|
23
|
-
export { Button as B };
|
|
24
|
-
//# sourceMappingURL=button-CRe5grz4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-CRe5grz4.js","sources":["../src/components/actions/button.gts"],"sourcesContent":["import { element } from 'ember-element-helper';\n\nimport { and, asBoolean, not } from '../../-private/helpers.ts';\nimport disabled from '../../-private/modifiers/disabled.ts';\nimport { type PushArgs, PushElement } from '../../-private/push.gts';\nimport { isLink } from './-button.ts';\n\nimport type { TOC } from '@ember/component/template-only';\nimport type { Importance, Intent, Spacing } from '@hokulea/tokens';\n\nexport interface ButtonSignature {\n Element: HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement;\n Args: PushArgs & {\n intent?: Intent;\n importance?: Importance;\n spacing?: Spacing;\n disabled?: boolean;\n };\n Blocks: {\n /** The label for the button */\n default: [];\n\n /** The label for the button */\n label: [];\n\n /** A slot in front of the label */\n before: [];\n\n /** A slot after the label */\n after: [];\n };\n}\n\nexport const Button: TOC<ButtonSignature> = <template>\n <PushElement\n @push={{@push}}\n @href={{@href}}\n @element={{element \"button\"}}\n class=\"button\"\n type={{if (and (not (isLink @push)) (not (asBoolean @href))) \"button\"}}\n data-intent={{if @intent @intent \"action\"}}\n data-importance={{if @importance @importance \"supreme\"}}\n data-spacing={{@spacing}}\n {{disabled when=(if @disabled @disabled false)}}\n data-test-button\n ...attributes\n >\n {{#if (has-block \"before\")}}\n <span data-test-button=\"before\">\n {{yield to=\"before\"}}\n </span>\n {{/if}}\n\n <span data-test-button=\"label\">\n {{#if (has-block \"label\")}}\n {{yield to=\"label\"}}\n {{/if}}\n\n {{#if (has-block)}}\n {{yield}}\n {{/if}}\n </span>\n\n {{#if (has-block \"after\")}}\n <span data-test-button=\"after\">\n {{yield to=\"after\"}}\n </span>\n {{/if}}\n </PushElement>\n</template>;\n"],"names":["Button","setComponentTemplate","precompileTemplate","strictMode","scope","PushElement","element","and","not","isLink","asBoolean","disabled","templateOnly"],"mappings":";;;;;;;;;MAiCaA,MAAY,GAAAC,oBAAA,CAAmBC,kBAAA,CAAA,u0BAAA,EAoC5C;EAAAC,UAAA,EAAA,IAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,WAAA;IAAAC,OAAA;IAAAC,GAAA;IAAAC,GAAA;IAAAC,MAAA;IAAAC,SAAA;AAAAC,IAAAA;AAAA,GAAA;AAAU,CAAA,CAAA,EAAAC,YAAA,EAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button-ClE5SC8Y.js","sources":["../src/components/actions/icon-button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport { element } from 'ember-element-helper';\n\nimport { and, asBoolean, not } from '../../-private/helpers.ts';\nimport disabled from '../../-private/modifiers/disabled.ts';\nimport { type PushArgs, PushElement } from '../../-private/push.gts';\nimport { Icon } from '../graphics/icon.gts';\nimport { isLink } from './-button.ts';\n\nimport type { Importance, Intent, Spacing } from '@hokulea/tokens';\n\nexport interface IconButtonSignature {\n Element: HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement;\n Args: PushArgs & {\n intent?: Intent;\n importance?: Importance;\n spacing?: Spacing;\n disabled?: boolean;\n label: string;\n /**\n * A string containing a `<svg>` element.\n * Make sure to use `currentColor` to comply with the styling\n */\n icon: string;\n };\n Blocks: {\n default: [];\n };\n}\n\nexport class IconButton extends Component<IconButtonSignature> {\n get label() {\n assert(\n 'Please provide a `@label` to `<IconButton>` for accessibility reasons.',\n\n this.args.label !== undefined\n );\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return this.args.label;\n }\n\n <template>\n <PushElement\n @push={{@push}}\n @href={{@href}}\n @element={{element \"button\"}}\n class=\"icon-button\"\n type={{if (and (not (isLink @push)) (not (asBoolean @href))) \"button\"}}\n data-intent={{if @intent @intent \"action\"}}\n data-importance={{if @importance @importance \"supreme\"}}\n data-spacing={{@spacing}}\n aria-label={{this.label}}\n {{disabled when=(if @disabled @disabled false)}}\n data-test-icon-button\n ...attributes\n >\n <Icon @icon={{@icon}} data-test-icon-button=\"icon\" />\n </PushElement>\n </template>\n}\n"],"names":["IconButton","Component","label","assert","args","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","PushElement","element","and","not","isLink","asBoolean","disabled","Icon"],"mappings":";;;;;;;;;;;AAgCO,MAAMA,mBAAmBC,SAAA,CAAU;EACxC,IAAIC,KAAAA,GAAQ;IACVC,MAAA,CACE,0EAEA,IAAI,CAACC,IAAI,CAACF,KAAK,KAAKG,SAAA,CAAA;AAGtB;AACA,IAAA,OAAO,IAAI,CAACD,IAAI,CAACF,KAAK;AACxB,EAAA;AAEA,EAAA;IAAAI,oBAAA,CAAAC,kBAAA,CAAA,4eAAA,EAiBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,WAAA;QAAAC,OAAA;QAAAC,GAAA;QAAAC,GAAA;QAAAC,MAAA;QAAAC,SAAA;QAAAC,QAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|