@ember-eui/core 3.0.0 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ### Master
4
4
 
5
+ ### 3.0.1
6
+ 💥 Breaking change
7
+ `@ember-eui/core`
8
+ 🚀 Enhancements
9
+ - No longer need to add icons from public icons in ember-eui/core
10
+
5
11
  ### 3.0.0
6
12
  💥 Breaking change
7
13
  `@ember-eui/*`
package/README.md CHANGED
@@ -15,7 +15,6 @@ var app = new EmberApp(defaults, {
15
15
  svgJar: {
16
16
  sourceDirs: [
17
17
  'public/assets',
18
- '../node_modules/@ember-eui/core/public',
19
18
  'node_modules/@elastic/eui/lib/components/icon',
20
19
  ],
21
20
  },
@@ -1,6 +1,23 @@
1
- {{#if this.icon.inner}}
1
+ {{#if this.icon.moduleName}}
2
2
  {{! has the shape of a curried component }}
3
- {{component this.icon}}
3
+ {{#let (component this.icon) as |IconComponent|}}
4
+ {{!template-lint-disable}}
5
+ <IconComponent
6
+ class={{class-names
7
+ this.optionalColorClass
8
+ (if this.isAppIcon "euiIcon--app")
9
+ componentName="EuiIcon"
10
+ size=this.size
11
+ }}
12
+ role="image"
13
+ aria-hidden={{if this.isAriaHidden "true"}}
14
+ aria-label={{if @aria-label @aria-label this.titleId}}
15
+ aria-labelledby={{if @aria-labelledby @aria-labelledby this.titleId}}
16
+ tabindex={{this.tabIndex}}
17
+ style={{this.optionalCustomStyles}}
18
+ ...attributes
19
+ />
20
+ {{/let}}
4
21
  {{else}}
5
22
  {{#if this.useImage}}
6
23
  <img
@@ -29,8 +29,6 @@ type IconColor = string | NamedColor;
29
29
 
30
30
  export type IconSize = keyof typeof sizeToClassNameMap;
31
31
 
32
- // const SVG_PREI : string | undefined = config['ember-eui'].svgPath || 'svg/assets';
33
-
34
32
  export type EuiIconArgs = CommonArgs & {
35
33
  /**
36
34
  * `Enum` is any of the named icons listed in the docs, `string` is usually a URL to an SVG file, and `elementType` is any Ember Icon SVG component
@@ -188,6 +188,7 @@ export default class EuiMarkdownEditorComponent extends Component<EuiMarkdownEdi
188
188
  };
189
189
 
190
190
  function identityCompiler(this: Processor) {
191
+ //eslint-disable-next-line
191
192
  this.Compiler = Compiler;
192
193
  }
193
194
  return unified().use(this.parsingPluginList).use(identityCompiler);
@@ -0,0 +1,4 @@
1
+ import templateOnlyComponent from '@ember/component/template-only';
2
+
3
+ export type EuiMarkdownEditorToolbarIconsMarkdownLogo =
4
+ typeof templateOnlyComponent;
@@ -0,0 +1,16 @@
1
+ <svg
2
+ xmlns="http://www.w3.org/2000/svg"
3
+ width="26"
4
+ height="16"
5
+ fill="none"
6
+ viewBox="0 0 26 16"
7
+ aria-labelledby={{@titleId}}
8
+ ...attributes
9
+ >
10
+ {{#if @title}}
11
+ <title id={{@titleId}}>{{@title}}</title>
12
+ {{/if}}
13
+ <path
14
+ d="M1.25 1.875c0-.345.28-.625.625-.625h22.25c.345 0 .625.28.625.625v12.25c0 .345-.28.625-.625.625H1.875a.625.625 0 01-.625-.625V1.875zM1.875 0C.839 0 0 .84 0 1.875v12.25C0 15.161.84 16 1.875 16h22.25C25.16 16 26 15.16 26 14.125V1.875C26 .839 25.16 0 24.125 0H1.875zM3.75 3.75v8.5h2.5V7.375l2.5 3.125 2.5-3.125v4.875h2.5v-8.5h-2.5l-2.5 3.125-2.5-3.125h-2.5zm11.875 4.375l3.75 4.125 3.75-4.125h-2.5V3.75h-2.5v4.375h-2.5z"
15
+ ></path>
16
+ </svg>
@@ -1,6 +1,6 @@
1
1
  import Component from '@glimmer/component';
2
2
  import { tracked } from '@glimmer/tracking';
3
- import { getOwner } from '@ember/application';
3
+ import MarkdownLogoComponent from './icons/markdown-logo';
4
4
 
5
5
  export interface EuiMarkdownEditorFooterArgs {}
6
6
 
@@ -8,14 +8,7 @@ export default class EuiMarkdownEditorFooterComponent extends Component<EuiMarkd
8
8
  @tracked isPopoverOpen = false;
9
9
  @tracked isShowingHelp = false;
10
10
 
11
- get svgPath() {
12
- //@ts-ignore
13
- const config = getOwner(this).resolveRegistration('config:environment');
14
- const svgPath = config?.['@ember-eui/core']?.svgPath || 'svg/';
15
- return svgPath;
16
- }
17
-
18
11
  get markdownLogo() {
19
- return `${this.svgPath}markdown-logo`;
12
+ return MarkdownLogoComponent;
20
13
  }
21
14
  }
@@ -0,0 +1,4 @@
1
+ import templateOnlyComponent from '@ember/component/template-only';
2
+
3
+ export type EuiMarkdownEditorToolbarIconsMarkdownCheckmark =
4
+ typeof templateOnlyComponent;
@@ -0,0 +1,16 @@
1
+ <svg
2
+ xmlns="http://www.w3.org/2000/svg"
3
+ width="16"
4
+ height="16"
5
+ fill="none"
6
+ viewBox="0 0 16 16"
7
+ aria-labelledby={{@titleId}}
8
+ ...attributes
9
+ >
10
+ {{#if @title}}
11
+ <title id={{@titleId}}>{{@title}}</title>
12
+ {{/if}}
13
+ <path
14
+ d="M11.828 13H4.172A1.173 1.173 0 013 11.828V4.172C3 3.526 3.526 3 4.172 3h7.656C12.474 3 13 3.526 13 4.172v7.656c0 .646-.526 1.172-1.172 1.172zM4.172 3.781a.391.391 0 00-.39.39v7.657c0 .216.175.39.39.39h7.656a.39.39 0 00.39-.39V4.172a.391.391 0 00-.39-.39H4.172zm7.244 2.175l-.582-.521L7.22 9.469 5.125 7.476l-.539.566 2.68 2.548 4.15-4.634z"
15
+ ></path>
16
+ </svg>
@@ -3,7 +3,8 @@ import { action } from '@ember/object';
3
3
  import type MarkdownActions from '../../utils/markdown/markdown-actions';
4
4
  import { MODE_VIEWING } from '../../utils/markdown/markdown-modes';
5
5
  import { cached } from '@glimmer/tracking';
6
- import { getOwner } from '@ember/application';
6
+ import MarkdownCheckmarkComponent from './icons/markdown-checkmark';
7
+
7
8
  import { Plugin } from 'unified';
8
9
 
9
10
  export interface EuiMarkdownEditorToolbarArgs {
@@ -29,13 +30,6 @@ export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMark
29
30
  }
30
31
  ];
31
32
 
32
- get svgPath() {
33
- //@ts-ignore
34
- const config = getOwner(this).resolveRegistration('config:environment');
35
- const svgPath = config?.['@ember-eui/core']?.svgPath || 'svg/';
36
- return svgPath;
37
- }
38
-
39
33
  @cached
40
34
  get listButtons() {
41
35
  return [
@@ -56,7 +50,7 @@ export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMark
56
50
  label: 'Task list',
57
51
  name: 'tl',
58
52
  useSvg: true,
59
- iconType: `${this.svgPath}markdown-checkmark`
53
+ iconType: MarkdownCheckmarkComponent
60
54
  }
61
55
  ];
62
56
  }
@@ -0,0 +1 @@
1
+ export { default } from '@ember-eui/core/components/eui-markdown-editor-footer/icons/markdown-logo';
@@ -0,0 +1 @@
1
+ export { default } from '@ember-eui/core/components/eui-markdown-editor-toolbar/icons/markdown-checkmark';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -172,5 +172,5 @@
172
172
  "volta": {
173
173
  "node": "12.22.1"
174
174
  },
175
- "gitHead": "24ca3b05bb2ffb838ab452bb5b2a9794fd8a993f"
175
+ "gitHead": "b8340ca971032258b196e04693f73b4b1c35b0e1"
176
176
  }
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16">
2
- <path d="M11.828 13H4.172A1.173 1.173 0 013 11.828V4.172C3 3.526 3.526 3 4.172 3h7.656C12.474 3 13 3.526 13 4.172v7.656c0 .646-.526 1.172-1.172 1.172zM4.172 3.781a.391.391 0 00-.39.39v7.657c0 .216.175.39.39.39h7.656a.39.39 0 00.39-.39V4.172a.391.391 0 00-.39-.39H4.172zm7.244 2.175l-.582-.521L7.22 9.469 5.125 7.476l-.539.566 2.68 2.548 4.15-4.634z" />
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="26" height="16" fill="none" viewBox="0 0 26 16">
2
- <path d="M1.25 1.875c0-.345.28-.625.625-.625h22.25c.345 0 .625.28.625.625v12.25c0 .345-.28.625-.625.625H1.875a.625.625 0 01-.625-.625V1.875zM1.875 0C.839 0 0 .84 0 1.875v12.25C0 15.161.84 16 1.875 16h22.25C25.16 16 26 15.16 26 14.125V1.875C26 .839 25.16 0 24.125 0H1.875zM3.75 3.75v8.5h2.5V7.375l2.5 3.125 2.5-3.125v4.875h2.5v-8.5h-2.5l-2.5 3.125-2.5-3.125h-2.5zm11.875 4.375l3.75 4.125 3.75-4.125h-2.5V3.75h-2.5v4.375h-2.5z" />
3
- </svg>