@visitwonders/assembly 0.7.0 → 0.8.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.
@@ -1,9 +1,16 @@
1
- import type { TOC } from '@ember/component/template-only';
1
+ import Component from '@glimmer/component';
2
2
  export interface LinkSignature {
3
3
  Element: HTMLAnchorElement;
4
4
  Args: {
5
- route: string;
5
+ route?: string;
6
6
  model?: unknown;
7
+ models?: unknown[];
8
+ query?: Record<string, unknown>;
9
+ href?: string;
10
+ external?: boolean;
11
+ size?: 'sm' | 'md' | 'lg';
12
+ weight?: 'normal' | 'bold';
13
+ color?: 'accent' | 'neutral';
7
14
  isBlock?: boolean;
8
15
  variant?: 'default' | 'unstyled';
9
16
  underline?: 'always' | 'hover' | 'none';
@@ -12,6 +19,7 @@ export interface LinkSignature {
12
19
  default: [];
13
20
  };
14
21
  }
15
- declare const Link: TOC<LinkSignature>;
16
- export default Link;
22
+ export default class Link extends Component<LinkSignature> {
23
+ get query(): Record<string, unknown>;
24
+ }
17
25
  //# sourceMappingURL=link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/action/link.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QACjC,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,QAAA,MAAM,IAAI,EAAE,GAAG,CAAC,aAAa,CAuB3B,CAAC;AAEH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/action/link.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;QAC3B,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QACjC,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAS,CAAC,aAAa,CAAC;IACxD,IAAI,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnC;CA2FF"}
@@ -47,6 +47,6 @@ export default class Heading extends Component<HeadingSignature> {
47
47
  get tone(): "primary" | "secondary" | "muted" | "inherit";
48
48
  get align(): "left" | "center" | "right";
49
49
  get truncate(): boolean;
50
- get wrap(): "nowrap" | "normal" | "balance" | "pretty";
50
+ get wrap(): "normal" | "nowrap" | "balance" | "pretty";
51
51
  }
52
52
  //# sourceMappingURL=heading.d.ts.map
@@ -45,7 +45,7 @@ export default class Text extends Component<TextSignature> {
45
45
  get tone(): "primary" | "critical" | "success" | "warning" | "secondary" | "muted" | "inherit";
46
46
  get align(): "left" | "center" | "right";
47
47
  get truncate(): boolean;
48
- get wrap(): "nowrap" | "normal" | "balance" | "pretty";
48
+ get wrap(): "normal" | "nowrap" | "balance" | "pretty";
49
49
  get decoration(): "none" | "underline" | "line-through";
50
50
  get transform(): "none" | "uppercase" | "lowercase" | "capitalize";
51
51
  }
@@ -0,0 +1,92 @@
1
+ /* <inline>/src/action/link-css-3dee8e26ccdbd8e9a887e46971642cca.css */
2
+
3
+ .link_e4aeb20a2 {
4
+ color: var(--color-text-link);
5
+ text-decoration: underline;
6
+ text-decoration-color: transparent;
7
+ text-underline-offset: 2px;
8
+ transition:
9
+ color 150ms ease,
10
+ text-decoration-color 150ms ease;
11
+ cursor: pointer;
12
+ }
13
+
14
+ .link_e4aeb20a2:hover {
15
+ color: var(--color-text-link-hover);
16
+ text-decoration-color: currentColor;
17
+ }
18
+
19
+ .link_e4aeb20a2[data-underline="always"] {
20
+ text-decoration-color: currentColor;
21
+ }
22
+
23
+ .link_e4aeb20a2[data-underline="none"] {
24
+ text-decoration-color: transparent;
25
+ }
26
+
27
+ .link_e4aeb20a2[data-underline="none"]:hover {
28
+ text-decoration-color: transparent;
29
+ }
30
+
31
+ .link_e4aeb20a2:focus-visible {
32
+ outline: 2px solid transparent;
33
+ box-shadow: var(--focus-ring);
34
+ border-radius: var(--radius-sm);
35
+ text-decoration-color: currentColor;
36
+ }
37
+
38
+ .link_e4aeb20a2:visited {
39
+ color: var(--color-text-link-visited);
40
+ }
41
+
42
+ .link_e4aeb20a2[data-block] {
43
+ display: block;
44
+ }
45
+
46
+ /* Size */
47
+ .link_e4aeb20a2[data-size="sm"] {
48
+ font-size: var(--font-size-sm);
49
+ line-height: var(--line-height-tight);
50
+ }
51
+
52
+ .link_e4aeb20a2[data-size="md"] {
53
+ font-size: var(--font-size-md);
54
+ line-height: var(--line-height-normal);
55
+ }
56
+
57
+ .link_e4aeb20a2[data-size="lg"] {
58
+ font-size: var(--font-size-lg);
59
+ line-height: var(--line-height-normal);
60
+ }
61
+
62
+ /* Weight */
63
+ .link_e4aeb20a2[data-weight="bold"] {
64
+ font-weight: var(--font-weight-medium);
65
+ }
66
+
67
+ /* Color */
68
+ .link_e4aeb20a2[data-color="neutral"] {
69
+ color: var(--color-text);
70
+ }
71
+
72
+ .link_e4aeb20a2[data-color="neutral"]:hover {
73
+ color: var(--color-text-secondary);
74
+ }
75
+
76
+ .link_e4aeb20a2[data-color="neutral"]:visited {
77
+ color: var(--color-text);
78
+ }
79
+
80
+ .link_e4aeb20a2[data-variant="unstyled"] {
81
+ text-decoration: inherit;
82
+ color: inherit;
83
+ font-weight: inherit;
84
+ font-size: inherit;
85
+ line-height: inherit;
86
+ font-family: inherit;
87
+ font-style: inherit;
88
+ font-variant: inherit;
89
+ font-optical-sizing: inherit;
90
+ font-kerning: inherit;
91
+ font-feature-settings: inherit;
92
+ }
@@ -1,17 +1,24 @@
1
- import "./link-css-2cdcfb5b6eeb7da1db3223b891efa870.css"
1
+ import "./link-css-3dee8e26ccdbd8e9a887e46971642cca.css"
2
+ import Component from '@glimmer/component';
2
3
  import { LinkTo } from '@ember/routing';
3
4
  import { precompileTemplate } from '@ember/template-compilation';
4
5
  import { setComponentTemplate } from '@ember/component';
5
- import templateOnly from '@ember/component/template-only';
6
6
 
7
7
  ;
8
8
 
9
- const Link = setComponentTemplate(precompileTemplate("\n<LinkTo @route={{@route}} @model={{@model}} class=\"link_e4aeb20a2\" data-block={{if @isBlock \"true\"}} data-variant={{@variant}} data-underline={{@underline}} ...attributes>\n {{yield}}\n</LinkTo>", {
10
- strictMode: true,
11
- scope: () => ({
12
- LinkTo
13
- })
14
- }), templateOnly());
9
+ class Link extends Component {
10
+ get query() {
11
+ return this.args.query ?? {};
12
+ }
13
+ static {
14
+ setComponentTemplate(precompileTemplate("\n{{#if @href}}\n <a href={{@href}} target={{if @external \"_blank\"}} rel={{if @external \"noopener noreferrer\"}} class=\"link_e4aeb20a2\" data-size={{@size}} data-weight={{@weight}} data-color={{@color}} data-block={{if @isBlock \"true\"}} data-variant={{@variant}} data-underline={{@underline}} ...attributes>\n {{yield}}\n </a>\n{{else if @models}}\n <LinkTo @route={{@route}} @models={{@models}} @query={{this.query}} class=\"link_e4aeb20a2\" data-size={{@size}} data-weight={{@weight}} data-color={{@color}} data-block={{if @isBlock \"true\"}} data-variant={{@variant}} data-underline={{@underline}} ...attributes>\n {{yield}}\n </LinkTo>\n{{else if @model}}\n <LinkTo @route={{@route}} @model={{@model}} @query={{this.query}} class=\"link_e4aeb20a2\" data-size={{@size}} data-weight={{@weight}} data-color={{@color}} data-block={{if @isBlock \"true\"}} data-variant={{@variant}} data-underline={{@underline}} ...attributes>\n {{yield}}\n </LinkTo>\n{{else}}\n <LinkTo @route={{@route}} @query={{this.query}} class=\"link_e4aeb20a2\" data-size={{@size}} data-weight={{@weight}} data-color={{@color}} data-block={{if @isBlock \"true\"}} data-variant={{@variant}} data-underline={{@underline}} ...attributes>\n {{yield}}\n </LinkTo>\n{{/if}}", {
15
+ strictMode: true,
16
+ scope: () => ({
17
+ LinkTo
18
+ })
19
+ }), this);
20
+ }
21
+ }
15
22
 
16
23
  export { Link as default };
17
24
  //# sourceMappingURL=link.js.map
@@ -11,4 +11,5 @@
11
11
  --z-300: 300;
12
12
  --z-400: 400;
13
13
  --z-500: 500;
14
+ --z-600: 600;
14
15
  }
package/dist/styles.css CHANGED
@@ -253,6 +253,7 @@
253
253
  --z-300: 300;
254
254
  --z-400: 400;
255
255
  --z-500: 500;
256
+ --z-600: 600;
256
257
  }
257
258
 
258
259
  :root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visitwonders/assembly",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "The default blueprint for Embroider v2 addons.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -1,49 +0,0 @@
1
- /* <inline>/src/action/link-css-2cdcfb5b6eeb7da1db3223b891efa870.css */
2
-
3
- .link_e4aeb20a2 {
4
- color: var(--color-text-link);
5
- text-decoration: underline;
6
- text-decoration-color: transparent;
7
- text-underline-offset: 2px;
8
- transition: color 150ms ease, text-decoration-color 150ms ease;
9
- cursor: pointer;
10
- }
11
-
12
- .link_e4aeb20a2:hover {
13
- color: var(--color-text-link-hover);
14
- text-decoration-color: currentColor;
15
- }
16
-
17
- .link_e4aeb20a2[data-underline="always"] {
18
- text-decoration-color: currentColor;
19
- }
20
-
21
- .link_e4aeb20a2[data-underline="none"] {
22
- text-decoration-color: transparent;
23
- }
24
-
25
- .link_e4aeb20a2[data-underline="none"]:hover {
26
- text-decoration-color: transparent;
27
- }
28
-
29
- .link_e4aeb20a2:visited {
30
- color: var(--color-text-link-visited);
31
- }
32
-
33
- .link_e4aeb20a2[data-block] {
34
- display: block;
35
- }
36
-
37
- .link_e4aeb20a2[data-variant="unstyled"] {
38
- text-decoration: inherit;
39
- color: inherit;
40
- font-weight: inherit;
41
- font-size: inherit;
42
- line-height: inherit;
43
- font-family: inherit;
44
- font-style: inherit;
45
- font-variant: inherit;
46
- font-optical-sizing: inherit;
47
- font-kerning: inherit;
48
- font-feature-settings: inherit;
49
- }