@pictogrammers/components 0.5.20 → 0.5.21

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pictogrammers/components",
3
3
  "type": "module",
4
- "version": "0.5.20",
4
+ "version": "0.5.21",
5
5
  "license": "MIT",
6
6
  "author": "Austin Andrews",
7
7
  "scripts": {
@@ -1,11 +1,21 @@
1
1
  import { Component, Part, Prop } from '@pictogrammers/element';
2
2
  import PgModal from '../../modal';
3
3
 
4
+ import '../../../modalHeader/modalHeader';
5
+ import '../../../modalBody/modalBody';
6
+ import '../../../modalFooter/modalFooter';
7
+
4
8
  import template from './basic.html';
5
9
 
6
10
  @Component({
7
11
  selector: 'x-my-modal',
8
- template: `<main>Hello! <button part="close">Close</button></main>`
12
+ template: `
13
+ <pg-modal-header>My Modal</pg-modal-header>
14
+ <pg-modal-body>Hello!</pg-modal-body>
15
+ <pg-modal-footer>
16
+ <button part="close">Close</button>
17
+ </pg-modal-footer>
18
+ `
9
19
  })
10
20
  export class XMyModal extends PgModal {
11
21
 
@@ -0,0 +1,17 @@
1
+ # `<pg-modal-body>`
2
+
3
+ The `pg-modal-body` component is a presentational component for the body section of a `PgModal`.
4
+
5
+ ```typescript
6
+ import '@pictogrammers/components/pg/modalBody';
7
+ ```
8
+
9
+ ```html
10
+ <pg-modal-body>Content</pg-modal-body>
11
+ ```
12
+
13
+ ## CSS Variables
14
+
15
+ | CSS Variables | Default | Description |
16
+ | ------------------------- | --------------- | ----------- |
17
+ | `--pg-modal-body-padding` | `0.5rem 1rem` | Padding |
@@ -0,0 +1,3 @@
1
+ import PgModalBody from './modalBody';
2
+
3
+ export default PgModalBody;
@@ -0,0 +1,6 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+ [part="body"] {
5
+ padding: var(--pg-modal-body-padding, 0.5rem 1rem);
6
+ }
@@ -0,0 +1,3 @@
1
+ <main part="body">
2
+ <slot></slot>
3
+ </main>
@@ -0,0 +1,13 @@
1
+ import { Component } from '@pictogrammers/element';
2
+
3
+ import template from './modalBody.html';
4
+ import style from './modalBody.css';
5
+
6
+ @Component({
7
+ selector: 'pg-modal-body',
8
+ style,
9
+ template
10
+ })
11
+ export default class PgModalBody extends HTMLElement {
12
+
13
+ }
@@ -0,0 +1,23 @@
1
+ # `<pg-modal-footer>`
2
+
3
+ The `pg-modal-footer` component is a presentational component for the footer section of a `PgModal`.
4
+
5
+ ```typescript
6
+ import '@pictogrammers/components/pg/modalFooter';
7
+ ```
8
+
9
+ ```html
10
+ <pg-modal-footer>
11
+ <button>Close</button>
12
+ </pg-modal-footer>
13
+ ```
14
+
15
+ ## CSS Variables
16
+
17
+ | CSS Variables | Default | Description |
18
+ | ------------------------------------- | --------------- | --------------- |
19
+ | `--pg-modal-footer-background` | `#f1f1f1` | Background |
20
+ | `--pg-modal-footer-border-color` | `#ccc` | Border Color |
21
+ | `--pg-modal-footer-padding` | `0.75rem 1rem` | Padding |
22
+ | `--pg-modal-footer-justify-content` | `flex-end` | Justify Content |
23
+ | `--pg-modal-footer-gap` | `0.5rem` | Gap Between Items |
@@ -0,0 +1,3 @@
1
+ import PgModalFooter from './modalFooter';
2
+
3
+ export default PgModalFooter;
@@ -0,0 +1,12 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+ [part="footer"] {
5
+ display: flex;
6
+ flex-direction: row;
7
+ padding: var(--pg-modal-footer-padding, 0.75rem 1rem);
8
+ border-top: 1px solid var(--pg-modal-footer-border-color, #ccc);
9
+ background: var(--pg-modal-footer-background, #f1f1f1);
10
+ justify-content: var(--pg-modal-footer-justify-content, flex-end);
11
+ gap: var(--pg-modal-footer-gap, 0.5rem);
12
+ }
@@ -0,0 +1,3 @@
1
+ <footer part="footer">
2
+ <slot></slot>
3
+ </footer>
@@ -0,0 +1,13 @@
1
+ import { Component } from '@pictogrammers/element';
2
+
3
+ import template from './modalFooter.html';
4
+ import style from './modalFooter.css';
5
+
6
+ @Component({
7
+ selector: 'pg-modal-footer',
8
+ style,
9
+ template
10
+ })
11
+ export default class PgModalFooter extends HTMLElement {
12
+
13
+ }
@@ -0,0 +1,19 @@
1
+ # `<pg-modal-header>`
2
+
3
+ The `pg-modal-header` component is a presentational component for the header section of a `PgModal`.
4
+
5
+ ```typescript
6
+ import '@pictogrammers/components/pg/modalHeader';
7
+ ```
8
+
9
+ ```html
10
+ <pg-modal-header>Title</pg-modal-header>
11
+ ```
12
+
13
+ ## CSS Variables
14
+
15
+ | CSS Variables | Default | Description |
16
+ | ---------------------------------- | ----------- | ------------ |
17
+ | `--pg-modal-header-background` | `#f1f1f1` | Background |
18
+ | `--pg-modal-header-border-color` | `#ccc` | Border Color |
19
+ | `--pg-modal-header-padding` | `0.75rem 1rem` | Padding |
@@ -0,0 +1,3 @@
1
+ import PgModalHeader from './modalHeader';
2
+
3
+ export default PgModalHeader;
@@ -0,0 +1,9 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+ [part="header"] {
5
+ border-bottom: 1px solid var(--pg-modal-header-border-color, #ccc);
6
+ background: var(--pg-modal-header-background, #f1f1f1);
7
+ padding: var(--pg-modal-header-padding, 0.75rem 1rem);
8
+ font-size: 1.25rem;
9
+ }
@@ -0,0 +1,3 @@
1
+ <header part="header">
2
+ <slot></slot>
3
+ </header>
@@ -0,0 +1,13 @@
1
+ import { Component } from '@pictogrammers/element';
2
+
3
+ import template from './modalHeader.html';
4
+ import style from './modalHeader.css';
5
+
6
+ @Component({
7
+ selector: 'pg-modal-header',
8
+ style,
9
+ template
10
+ })
11
+ export default class PgModalHeader extends HTMLElement {
12
+
13
+ }