@exmg/exm-button 1.2.7 → 1.2.9

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,10 +1,12 @@
1
1
  import type { StoryObj } from '@storybook/web-components-vite';
2
2
  import { ExmFilledButton } from './exm-filled-button.js';
3
+ import { ExmTextButton } from './exm-text-button.js';
3
4
  import './exm-filled-button.js';
5
+ import './exm-text-button.js';
6
+ type Story = StoryObj<ExmFilledButton | ExmTextButton>;
4
7
  declare const meta: {
5
8
  title: string;
6
9
  tags: string[];
7
- render: (args: ExmFilledButton) => import("lit-html").TemplateResult<1>;
8
10
  argTypes: {
9
11
  disabled: {
10
12
  control: "boolean";
@@ -15,8 +17,12 @@ declare const meta: {
15
17
  loading: {
16
18
  control: "boolean";
17
19
  };
20
+ children: {
21
+ name: string;
22
+ control: "text";
23
+ };
18
24
  };
19
25
  };
20
26
  export default meta;
21
- type Story = StoryObj<ExmFilledButton>;
22
- export declare const Default: Story;
27
+ export declare const FilledButton: Story;
28
+ export declare const TextButton: Story;
@@ -1,23 +1,38 @@
1
- import './exm-filled-button.js';
1
+ import { faker } from '@faker-js/faker';
2
2
  import { html } from 'lit';
3
- // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
3
+ import './exm-filled-button.js';
4
+ import './exm-text-button.js';
4
5
  const meta = {
5
6
  title: 'Packages/Button',
6
7
  tags: ['autodocs'],
7
- render: (args) => html `<exm-filled-button .disabled=${args.disabled} .name=${args.name} .loading=${args.loading}>
8
- My Button
9
- </exm-filled-button>`,
10
8
  argTypes: {
11
9
  disabled: { control: 'boolean' },
12
10
  name: { control: 'text' },
13
11
  loading: { control: 'boolean' },
12
+ children: { name: 'Content label', control: 'text' },
14
13
  },
15
14
  };
16
15
  export default meta;
17
- export const Default = {
16
+ const FilledTemplate = (args) => html `<exm-filled-button .disabled=${args.disabled} .name=${args.name} .loading=${args.loading}>
17
+ ${args.children}
18
+ </exm-filled-button>`;
19
+ export const FilledButton = {
20
+ render: FilledTemplate,
21
+ args: {
22
+ disabled: false,
23
+ name: faker.lorem.word(),
24
+ children: faker.lorem.word(),
25
+ },
26
+ };
27
+ const TextTemplate = (args) => html `<exm-text-button .disabled=${args.disabled} .name=${args.name} .loading=${args.loading}>
28
+ ${args.children}
29
+ </exm-text-button>`;
30
+ export const TextButton = {
31
+ render: TextTemplate,
18
32
  args: {
19
33
  disabled: false,
20
- name: 'Radio Item',
34
+ name: faker.lorem.word(),
35
+ children: faker.lorem.word(),
21
36
  },
22
37
  };
23
38
  //# sourceMappingURL=exm-button.stories.js.map
@@ -26,5 +26,5 @@ export declare class ExmFilledButtonBase extends MdFilledButton {
26
26
  * form is reset.
27
27
  */
28
28
  type: FormSubmitterType;
29
- protected render(): import("lit-html").TemplateResult<1>;
29
+ protected render(): import("lit").TemplateResult<1>;
30
30
  }
@@ -26,5 +26,5 @@ export declare class ExmTextButtonBase extends MdTextButton {
26
26
  * form is reset.
27
27
  */
28
28
  type: FormSubmitterType;
29
- protected render(): import("lit-html").TemplateResult<1>;
29
+ protected render(): import("lit").TemplateResult<1>;
30
30
  }
@@ -1,10 +1,12 @@
1
1
  import type { StoryObj } from '@storybook/web-components-vite';
2
2
  import { ExmFilledButton } from './exm-filled-button.js';
3
+ import { ExmTextButton } from './exm-text-button.js';
3
4
  import './exm-filled-button.js';
5
+ import './exm-text-button.js';
6
+ type Story = StoryObj<ExmFilledButton | ExmTextButton>;
4
7
  declare const meta: {
5
8
  title: string;
6
9
  tags: string[];
7
- render: (args: ExmFilledButton) => import("lit-html").TemplateResult<1>;
8
10
  argTypes: {
9
11
  disabled: {
10
12
  control: "boolean";
@@ -15,8 +17,12 @@ declare const meta: {
15
17
  loading: {
16
18
  control: "boolean";
17
19
  };
20
+ children: {
21
+ name: string;
22
+ control: "text";
23
+ };
18
24
  };
19
25
  };
20
26
  export default meta;
21
- type Story = StoryObj<ExmFilledButton>;
22
- export declare const Default: Story;
27
+ export declare const FilledButton: Story;
28
+ export declare const TextButton: Story;
@@ -26,5 +26,5 @@ export declare class ExmFilledButtonBase extends MdFilledButton {
26
26
  * form is reset.
27
27
  */
28
28
  type: FormSubmitterType;
29
- protected render(): import("lit-html").TemplateResult<1>;
29
+ protected render(): import("lit").TemplateResult<1>;
30
30
  }
@@ -1,4 +1,4 @@
1
- import { __decorate } from 'tslib';
1
+ import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
2
2
  import { nothing, html } from 'lit';
3
3
  import { property } from 'lit/decorators/property.js';
4
4
  import { MdFilledButton } from '@material/web/button/filled-button.js';
@@ -1,4 +1,4 @@
1
- import { __decorate } from 'tslib';
1
+ import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
2
2
  import { customElement } from 'lit/decorators/custom-element.js';
3
3
  import '@material/web/progress/circular-progress.js';
4
4
  import { ExmFilledButtonBase } from './exm-filled-button-base.js';
@@ -26,5 +26,5 @@ export declare class ExmTextButtonBase extends MdTextButton {
26
26
  * form is reset.
27
27
  */
28
28
  type: FormSubmitterType;
29
- protected render(): import("lit-html").TemplateResult<1>;
29
+ protected render(): import("lit").TemplateResult<1>;
30
30
  }
@@ -1,4 +1,4 @@
1
- import { __decorate } from 'tslib';
1
+ import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
2
2
  import { nothing, html } from 'lit';
3
3
  import { property } from 'lit/decorators/property.js';
4
4
  import { MdTextButton } from '@material/web/button/text-button.js';
@@ -1,4 +1,4 @@
1
- import { __decorate } from 'tslib';
1
+ import { __decorate } from './node_modules/.bun/@rollup_plugin-typescript@12.3.0_8b7a8dd02ef2c96b/node_modules/tslib/tslib.es6.js';
2
2
  import { customElement } from 'lit/decorators/custom-element.js';
3
3
  import '@material/web/progress/circular-progress.js';
4
4
  import { ExmTextButtonBase } from './exm-text-button-base.js';
@@ -0,0 +1,31 @@
1
+ /******************************************************************************
2
+ Copyright (c) Microsoft Corporation.
3
+
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */
15
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
16
+
17
+
18
+ function __decorate(decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ }
24
+
25
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
26
+ var e = new Error(message);
27
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
28
+ };
29
+
30
+ export { __decorate };
31
+ //# sourceMappingURL=tslib.es6.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-button",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -39,5 +39,5 @@
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "20c45a5fb2f606723218a739897831c27a6f6790"
42
+ "gitHead": "c27c4ffabda0c6a509df58537017af65719d1e57"
43
43
  }