@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 +1 -1
- package/pg/modal/__examples__/basic/basic.ts +11 -1
- package/pg/modalBody/README.md +17 -0
- package/pg/modalBody/index.ts +3 -0
- package/pg/modalBody/modalBody.css +6 -0
- package/pg/modalBody/modalBody.html +3 -0
- package/pg/modalBody/modalBody.ts +13 -0
- package/pg/modalFooter/README.md +23 -0
- package/pg/modalFooter/index.ts +3 -0
- package/pg/modalFooter/modalFooter.css +12 -0
- package/pg/modalFooter/modalFooter.html +3 -0
- package/pg/modalFooter/modalFooter.ts +13 -0
- package/pg/modalHeader/README.md +19 -0
- package/pg/modalHeader/index.ts +3 -0
- package/pg/modalHeader/modalHeader.css +9 -0
- package/pg/modalHeader/modalHeader.html +3 -0
- package/pg/modalHeader/modalHeader.ts +13 -0
package/package.json
CHANGED
|
@@ -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:
|
|
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,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,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,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,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
|
+
}
|