@esportsplus/ui 0.39.1 → 0.39.3

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.
@@ -88,10 +88,10 @@ const content = (attributes, { check, close, error }) => {
88
88
  <div class='--flex-fill --flex-column --gap-100 --padding-right --padding-800'>
89
89
  ${() => {
90
90
  let message = attributes.message;
91
- return state.type && [...state.messages].map((content, i) => {
91
+ return state.type && [...state.messages].map((content) => {
92
92
  if (typeof content === 'string') {
93
93
  return html `
94
- <p class='${i === 0 && '--text-crop-top'}' ${message}>
94
+ <p ${message}>
95
95
  ${content}
96
96
  </p>
97
97
  `;
@@ -1,7 +1,20 @@
1
- import { Attributes, Renderable } from '@esportsplus/template';
2
1
  import './scss/index.scss';
3
- declare const _default: ({ attributes, content }: {
4
- attributes?: Attributes;
5
- content?: Renderable<any>;
6
- }) => Node;
2
+ declare const _default: {
3
+ (): ReturnType<(this: {
4
+ attributes?: import("@esportsplus/template").Attributes | undefined;
5
+ content?: import("@esportsplus/template").Renderable<any>;
6
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
7
+ <T extends import("@esportsplus/template").Attributes>(attributes: T): ReturnType<(this: {
8
+ attributes?: import("@esportsplus/template").Attributes | undefined;
9
+ content?: import("@esportsplus/template").Renderable<any>;
10
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
11
+ <T extends import("@esportsplus/template").Renderable<any>>(content: T): ReturnType<(this: {
12
+ attributes?: import("@esportsplus/template").Attributes | undefined;
13
+ content?: import("@esportsplus/template").Renderable<any>;
14
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
15
+ (attributes: import("@esportsplus/template").Attributes, content: import("@esportsplus/template").Renderable<any>): ReturnType<(this: {
16
+ attributes?: import("@esportsplus/template").Attributes | undefined;
17
+ content?: import("@esportsplus/template").Renderable<any>;
18
+ }, attributes: Readonly<import("@esportsplus/template").Attributes>, content: import("@esportsplus/template").Renderable<any>) => import("@esportsplus/template").Renderable<any>>;
19
+ };
7
20
  export default _default;
@@ -1,9 +1,10 @@
1
1
  import { html } from '@esportsplus/template';
2
+ import template from '../../components/template/index.js';
2
3
  import './scss/index.scss';
3
- export default ({ attributes, content }) => {
4
+ export default template.factory((attributes, content) => {
4
5
  return html `
5
- <a class='back link --padding-0px --flex-vertical' ${attributes}>
6
- ${content}
7
- </a>
8
- `;
9
- };
6
+ <a class='back link --padding-0px --flex-vertical' ${attributes}>
7
+ ${content}
8
+ </a>
9
+ `;
10
+ });
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "private": false,
43
43
  "sideEffects": false,
44
44
  "type": "module",
45
- "version": "0.39.1",
45
+ "version": "0.39.3",
46
46
  "scripts": {
47
47
  "build": "run-s build:vite build:ts",
48
48
  "build:ts": "tsc && tsc-alias",
@@ -128,10 +128,10 @@ const content = (
128
128
  ${() => {
129
129
  let message = attributes.message;
130
130
 
131
- return state.type && [...state.messages].map((content, i) => {
131
+ return state.type && [...state.messages].map((content) => {
132
132
  if (typeof content === 'string') {
133
133
  return html`
134
- <p class='${i === 0 && '--text-crop-top'}' ${message}>
134
+ <p ${message}>
135
135
  ${content}
136
136
  </p>
137
137
  `;
@@ -1,11 +1,14 @@
1
- import { html, Attributes, Renderable } from '@esportsplus/template';
1
+ import { html } from '@esportsplus/template';
2
+ import template from '~/components/template';
2
3
  import './scss/index.scss';
3
4
 
4
5
 
5
- export default ({ attributes, content }: { attributes?: Attributes, content?: Renderable<any> }) => {
6
- return html`
7
- <a class='back link --padding-0px --flex-vertical' ${attributes}>
8
- ${content}
9
- </a>
10
- `;
11
- };
6
+ export default template.factory(
7
+ (attributes, content) => {
8
+ return html`
9
+ <a class='back link --padding-0px --flex-vertical' ${attributes}>
10
+ ${content}
11
+ </a>
12
+ `;
13
+ }
14
+ );