@pairbo/ui-kit 0.0.1 → 0.0.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.
- package/dist/pairbo.es.js +15027 -0
- package/dist/pairbo.umd.js +1633 -0
- package/dist/src/components/button/button.component.d.ts +32 -0
- package/dist/src/components/button/button.d.ts +8 -0
- package/dist/src/components/button/button.styles.d.ts +2 -0
- package/dist/src/components/button-group/button-group.component.d.ts +23 -0
- package/dist/src/components/button-group/button-group.d.ts +8 -0
- package/dist/src/components/button-group/button-group.styles.d.ts +2 -0
- package/dist/src/components/card-selection/card-selection.component.d.ts +23 -0
- package/dist/src/components/card-selection/card-selection.d.ts +8 -0
- package/dist/src/components/card-selection/card-selection.styles.d.ts +2 -0
- package/dist/src/components/category/category.component.d.ts +13 -0
- package/dist/src/components/category/category.d.ts +8 -0
- package/dist/src/components/category/category.styles.d.ts +2 -0
- package/dist/src/components/category-image/category-image.component.d.ts +23 -0
- package/dist/src/components/category-image/category-image.d.ts +8 -0
- package/dist/src/components/category-image/category-image.styles.d.ts +2 -0
- package/dist/src/components/drawer/drawer.component.d.ts +28 -0
- package/dist/src/components/drawer/drawer.d.ts +8 -0
- package/dist/src/components/drawer/drawer.styles.d.ts +2 -0
- package/dist/src/components/editor/editor.component.d.ts +24 -0
- package/dist/src/components/editor/editor.d.ts +8 -0
- package/dist/src/components/editor/editor.styles.d.ts +2 -0
- package/dist/src/components/fabric-example/fabric-example.component.d.ts +26 -0
- package/dist/src/components/fabric-example/fabric-example.d.ts +8 -0
- package/dist/src/components/fabric-example/fabric-example.styles.d.ts +2 -0
- package/dist/src/components/image-slider/editor-card-slider.component.d.ts +41 -0
- package/dist/src/components/image-slider/editor-card-slider.d.ts +8 -0
- package/dist/src/components/image-slider/editor-card-slider.styles.d.ts +2 -0
- package/dist/src/components/main.d.ts +15 -0
- package/dist/src/components/message-selector/message-selector.component.d.ts +38 -0
- package/dist/src/components/message-selector/message-selector.d.ts +8 -0
- package/dist/src/components/message-selector/message-selector.styles.d.ts +2 -0
- package/dist/src/components/message-selector/message-selector.test.d.ts +1 -0
- package/dist/src/components/page-manager/page-manager.component.d.ts +41 -0
- package/dist/src/components/page-manager/page-manager.d.ts +8 -0
- package/dist/src/components/page-manager/page-manager.styles.d.ts +2 -0
- package/dist/src/components/radio-button/radio-button.component.d.ts +37 -0
- package/dist/src/components/radio-button/radio-button.d.ts +8 -0
- package/dist/src/components/radio-button/radio-button.styles.d.ts +2 -0
- package/dist/src/components/radio-group/radio-group.component.d.ts +56 -0
- package/dist/src/components/radio-group/radio-group.d.ts +8 -0
- package/dist/src/components/radio-group/radio-group.styles.d.ts +2 -0
- package/dist/src/components/selector/selector.component.d.ts +18 -0
- package/dist/src/components/selector/selector.d.ts +8 -0
- package/dist/src/components/selector/selector.styles.d.ts +2 -0
- package/dist/src/components/textarea/textarea.component.d.ts +78 -0
- package/dist/src/components/textarea/textarea.d.ts +8 -0
- package/dist/src/components/textarea/textarea.styles.d.ts +2 -0
- package/dist/src/components/type-form/type-form.component.d.ts +48 -0
- package/dist/src/components/type-form/type-form.d.ts +8 -0
- package/dist/src/components/type-form/type-form.styles.d.ts +2 -0
- package/dist/src/events/events.d.ts +1 -0
- package/dist/src/events/pbo-category-card-select.d.ts +8 -0
- package/dist/src/internal/form.d.ts +43 -0
- package/{src/internal/pairbo-element.ts → dist/src/internal/pairbo-element.d.ts} +21 -46
- package/dist/src/internal/slots.d.ts +12 -0
- package/dist/src/internal/watch.d.ts +28 -0
- package/dist/src/styles/component.styles.d.ts +2 -0
- package/dist/src/styles/form-control.styles.d.ts +2 -0
- package/package.json +12 -8
- package/.husky/pre-commit +0 -1
- package/.prettierignore +0 -16
- package/.prettierrc.json +0 -17
- package/cspell.json +0 -9
- package/dev.html +0 -101
- package/docs/README.md +0 -1
- package/docs/_includes/component.njk +0 -16
- package/docs/_includes/default.njk +0 -39
- package/docs/_includes/sidebar.njk +0 -16
- package/docs/eleventy.config.mjs +0 -72
- package/docs/pages/components/message-selector.md +0 -17
- package/docs/pages/fabric-example.html +0 -46
- package/docs/pages/fabric-example.js +0 -28
- package/docs/pages/index.md +0 -76
- package/eslint.config.mjs +0 -32
- package/ignote_temp +0 -3
- package/index.html +0 -162
- package/lint-stage.confg.js +0 -6
- package/pages/card-selection.html +0 -65
- package/pages/drawer.html +0 -47
- package/pages/editor.html +0 -45
- package/pages/page-mgn.html +0 -51
- package/pages/test_build.html +0 -47
- package/scripts/plop/plopfile.js +0 -51
- package/scripts/plop/templates/components/component.hbs +0 -34
- package/scripts/plop/templates/components/define.hbs +0 -10
- package/scripts/plop/templates/components/styles.hbs +0 -7
- package/src/components/button/button.component.ts +0 -93
- package/src/components/button/button.styles.ts +0 -273
- package/src/components/button/button.ts +0 -10
- package/src/components/button-group/button-group.component.ts +0 -36
- package/src/components/button-group/button-group.styles.ts +0 -7
- package/src/components/button-group/button-group.ts +0 -10
- package/src/components/card-selection/card-selection.component.ts +0 -43
- package/src/components/card-selection/card-selection.styles.ts +0 -7
- package/src/components/card-selection/card-selection.ts +0 -10
- package/src/components/category/category.component.ts +0 -91
- package/src/components/category/category.styles.ts +0 -27
- package/src/components/category/category.ts +0 -10
- package/src/components/category-image/category-image.component.ts +0 -38
- package/src/components/category-image/category-image.styles.ts +0 -11
- package/src/components/category-image/category-image.ts +0 -10
- package/src/components/drawer/drawer.component.ts +0 -82
- package/src/components/drawer/drawer.styles.ts +0 -54
- package/src/components/drawer/drawer.ts +0 -10
- package/src/components/editor/editor.component.ts +0 -135
- package/src/components/editor/editor.styles.ts +0 -13
- package/src/components/editor/editor.ts +0 -10
- package/src/components/fabric-example/fabric-example.component.ts +0 -268
- package/src/components/fabric-example/fabric-example.styles.ts +0 -23
- package/src/components/fabric-example/fabric-example.ts +0 -12
- package/src/components/image-slider/editor-card-slider.component.ts +0 -136
- package/src/components/image-slider/editor-card-slider.styles.ts +0 -46
- package/src/components/image-slider/editor-card-slider.ts +0 -9
- package/src/components/main.ts +0 -17
- package/src/components/message-selector/message-selector.component.ts +0 -154
- package/src/components/message-selector/message-selector.styles.ts +0 -16
- package/src/components/message-selector/message-selector.test.ts +0 -64
- package/src/components/message-selector/message-selector.ts +0 -13
- package/src/components/page-manager/page-manager.component.ts +0 -228
- package/src/components/page-manager/page-manager.styles.ts +0 -9
- package/src/components/page-manager/page-manager.ts +0 -10
- package/src/components/radio-button/radio-button.component.ts +0 -118
- package/src/components/radio-button/radio-button.styles.ts +0 -13
- package/src/components/radio-button/radio-button.ts +0 -10
- package/src/components/radio-group/radio-group.component.ts +0 -203
- package/src/components/radio-group/radio-group.styles.ts +0 -19
- package/src/components/radio-group/radio-group.ts +0 -10
- package/src/components/selector/selector.component.ts +0 -115
- package/src/components/selector/selector.styles.ts +0 -9
- package/src/components/selector/selector.ts +0 -10
- package/src/components/textarea/textarea.component.ts +0 -234
- package/src/components/textarea/textarea.styles.ts +0 -178
- package/src/components/textarea/textarea.ts +0 -10
- package/src/components/type-form/type-form.component.ts +0 -121
- package/src/components/type-form/type-form.styles.ts +0 -7
- package/src/components/type-form/type-form.ts +0 -10
- package/src/declaration.d.ts +0 -44
- package/src/events/events.ts +0 -1
- package/src/events/pbo-category-card-select.ts +0 -7
- package/src/internal/form.ts +0 -376
- package/src/internal/slots.ts +0 -54
- package/src/internal/watch.ts +0 -79
- package/src/styles/component.styles.ts +0 -17
- package/src/styles/form-control.styles.ts +0 -59
- package/temp +0 -20
- package/tsconfig.json +0 -28
- package/vite.config.ts +0 -26
- /package/{public → dist}/Greeting Card from Pairbo.png +0 -0
- /package/{src/components/fabric-example/fabric-example.test.ts → dist/src/components/fabric-example/fabric-example.test.d.ts} +0 -0
- /package/{src → dist/src}/themes/default.css +0 -0
package/pages/test_build.html
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<title>Development</title>
|
|
6
|
-
|
|
7
|
-
<link rel="stylesheet" href="../src/themes/default.css">
|
|
8
|
-
<script src="https://cdn.jsdelivr.net/npm/@pairbo/ui-kit/dist/pairbo.umd.js"></script>
|
|
9
|
-
|
|
10
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
11
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
12
|
-
<link
|
|
13
|
-
href="https://fonts.googleapis.com/css2?family=Kablammo&family=Monsieur+La+Doulaise&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
|
|
14
|
-
rel="stylesheet">
|
|
15
|
-
|
|
16
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.0/cdn/themes/light.css" />
|
|
17
|
-
<script type="module"
|
|
18
|
-
src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.20.0/cdn/shoelace-autoloader.js"></script>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
(() => {
|
|
22
|
-
document.documentElement.classList.toggle('pbo-theme-default', true);
|
|
23
|
-
})();
|
|
24
|
-
</script>
|
|
25
|
-
</head>
|
|
26
|
-
|
|
27
|
-
<body>
|
|
28
|
-
<div class="container">
|
|
29
|
-
<pbo-drawer>
|
|
30
|
-
<div part="body">
|
|
31
|
-
<pbo-page-manager></pbo-page-manager>
|
|
32
|
-
</div>
|
|
33
|
-
</pbo-drawer>
|
|
34
|
-
</div>
|
|
35
|
-
<button>Toggle modal</button>
|
|
36
|
-
</body>
|
|
37
|
-
|
|
38
|
-
<script>
|
|
39
|
-
const buttonEl = document.querySelector('button');
|
|
40
|
-
const modalEl = document.querySelector('pbo-drawer');
|
|
41
|
-
buttonEl.addEventListener('click', () => {
|
|
42
|
-
modalEl.show();
|
|
43
|
-
});
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</html>
|
package/scripts/plop/plopfile.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export default function (plop) {
|
|
2
|
-
plop.setHelper("tagWithoutPrefix", tag => tag.replace(/^pbo-/, ""));
|
|
3
|
-
plop.setGenerator("controller", {
|
|
4
|
-
description: "application controller logic",
|
|
5
|
-
prompts: [
|
|
6
|
-
{
|
|
7
|
-
type: "input",
|
|
8
|
-
name: "tag",
|
|
9
|
-
message: "Tag name? (e.g. pbo-button)",
|
|
10
|
-
validate: value => {
|
|
11
|
-
if (!value || value.length === 0) {
|
|
12
|
-
return "Tag is required";
|
|
13
|
-
}
|
|
14
|
-
// start with pairbo- and include only a-z + dashes
|
|
15
|
-
if (!/^pbo-[a-z-]+$/.test(value)) {
|
|
16
|
-
return "Tag must start with 'pbo-' and contain only lowercase letters and dashes";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// No double dashes or ending dash
|
|
20
|
-
if (value.includes("--") || value.endsWith("-")) {
|
|
21
|
-
return "Tag cannot contain double dashes or end with a dash";
|
|
22
|
-
}
|
|
23
|
-
return true;
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
actions: [
|
|
28
|
-
{
|
|
29
|
-
type: "add",
|
|
30
|
-
path: "../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.ts",
|
|
31
|
-
templateFile: "templates/components/define.hbs",
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
type: "add",
|
|
35
|
-
path: "../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.styles.ts",
|
|
36
|
-
templateFile: "templates/components/styles.hbs",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
type: "add",
|
|
40
|
-
path: "../../src/components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.component.ts",
|
|
41
|
-
templateFile: "templates/components/component.hbs",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: "modify",
|
|
45
|
-
path: "../../src/components/main.ts",
|
|
46
|
-
pattern: /\/\* plop:component \*\//,
|
|
47
|
-
template: `export { default as {{ properCase tag }} } from './{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.js';\n/* plop:component */`,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { customElement, property } from "lit/decorators.js";
|
|
2
|
-
import { html, LitElement } from "lit";
|
|
3
|
-
import type { CSSResultGroup } from "lit";
|
|
4
|
-
import componentStyles from "../../styles/component.styles.js";
|
|
5
|
-
import PairboElement from "../../internal/pairbo-element.js";
|
|
6
|
-
import styles from "./{{ tagWithoutPrefix tag }}.styles.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @summary Short summary of the component's intended use.
|
|
10
|
-
* @status experimental
|
|
11
|
-
*
|
|
12
|
-
* @dependency pbo-example
|
|
13
|
-
*
|
|
14
|
-
* @event pbo-event-name - Emitted as an example.
|
|
15
|
-
*
|
|
16
|
-
* @slot - The default slot.
|
|
17
|
-
* @slot example - An example slot.
|
|
18
|
-
*
|
|
19
|
-
* @csspart base - The component's base wrapper.
|
|
20
|
-
*
|
|
21
|
-
* @cssproperty --example - An example CSS custom property.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
@customElement("{{ tag}}")
|
|
25
|
-
export default class {{ properCase tag }} extends PairboElement {
|
|
26
|
-
static styles: CSSResultGroup = [componentStyles, styles];
|
|
27
|
-
|
|
28
|
-
/** An example attribute. */
|
|
29
|
-
@property() attr = 'example';
|
|
30
|
-
|
|
31
|
-
render() {
|
|
32
|
-
return html` <slot></slot> `;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {{ properCase tag }} from "./{{ tagWithoutPrefix tag }}.component.js";
|
|
2
|
-
|
|
3
|
-
export * from "./{{ tagWithoutPrefix tag }}.component.js";
|
|
4
|
-
export default {{ properCase tag }};
|
|
5
|
-
|
|
6
|
-
declare global {
|
|
7
|
-
interface HTMLElementTagNameMap {
|
|
8
|
-
"{{ tag }}": {{ properCase tag }};
|
|
9
|
-
}
|
|
10
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { customElement, property } from "lit/decorators.js";
|
|
2
|
-
import { LitElement } from "lit";
|
|
3
|
-
import type { CSSResultGroup, PropertyValues } from "lit";
|
|
4
|
-
import componentStyles from "../../styles/component.styles.js";
|
|
5
|
-
import styles from "./button.styles.js";
|
|
6
|
-
import { html, literal } from "lit/static-html.js";
|
|
7
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
8
|
-
import { HasSlotController } from "../../internal/slots.js";
|
|
9
|
-
/**
|
|
10
|
-
* @summary Short summary of the component's intended use.
|
|
11
|
-
* @documentation https://shoelace.style/components/button
|
|
12
|
-
* @status experimental
|
|
13
|
-
*
|
|
14
|
-
* @dependency sl-example
|
|
15
|
-
*
|
|
16
|
-
* @event sl-event-name - Emitted as an example.
|
|
17
|
-
*
|
|
18
|
-
* @slot - The default slot.
|
|
19
|
-
* @slot example - An example slot.
|
|
20
|
-
*
|
|
21
|
-
* @csspart base - The component's base wrapper.
|
|
22
|
-
*
|
|
23
|
-
* @cssproperty --example - An example CSS custom property.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
@customElement("pbo-button")
|
|
27
|
-
export default class PboButton extends LitElement {
|
|
28
|
-
static styles: CSSResultGroup = [componentStyles, styles];
|
|
29
|
-
|
|
30
|
-
private readonly hasSlotController = new HasSlotController(this, "[prefix]", "prefix", "suffix");
|
|
31
|
-
|
|
32
|
-
@property() href = "";
|
|
33
|
-
@property() name = "";
|
|
34
|
-
@property() value = "";
|
|
35
|
-
/* ------------------------- Button's theme variant ------------------------- */
|
|
36
|
-
@property({ reflect: true }) variant: "default" | "primary" | "success" | "neutral" | "warning" | "danger" | "text" =
|
|
37
|
-
"default";
|
|
38
|
-
|
|
39
|
-
/* ----------------------------- Button outline ----------------------------- */
|
|
40
|
-
@property({ type: Boolean, reflect: true }) outline = false;
|
|
41
|
-
|
|
42
|
-
/* ------------------------------- Button size ------------------------------ */
|
|
43
|
-
@property({ reflect: true }) size: "small" | "medium" | "large" = "medium";
|
|
44
|
-
|
|
45
|
-
/* ----------------------------- Circular Button ---------------------------- */
|
|
46
|
-
@property({ type: Boolean, reflect: true }) circle = false;
|
|
47
|
-
|
|
48
|
-
private isButton() {
|
|
49
|
-
return this.href ? false : true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private isLink() {
|
|
53
|
-
return this.href ? true : false;
|
|
54
|
-
}
|
|
55
|
-
protected firstUpdated(_changedProperties: PropertyValues): void {
|
|
56
|
-
console.log({ componentStyles, styles });
|
|
57
|
-
console.log("Has default slot:", this.hasSlotController.test("[default]"));
|
|
58
|
-
console.log("Button classes:", this.shadowRoot?.querySelector(".button")?.classList);
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
const isLink = this.isLink();
|
|
62
|
-
const tag = isLink ? literal`a` : literal`button`;
|
|
63
|
-
return html`
|
|
64
|
-
<${tag}
|
|
65
|
-
part="base"
|
|
66
|
-
class= ${classMap({
|
|
67
|
-
button: true,
|
|
68
|
-
"button--default": this.variant === "default",
|
|
69
|
-
"button--primary": this.variant === "primary",
|
|
70
|
-
"button--success": this.variant === "success",
|
|
71
|
-
"button--neutral": this.variant === "neutral",
|
|
72
|
-
"button--warning": this.variant === "warning",
|
|
73
|
-
"button--danger": this.variant === "danger",
|
|
74
|
-
"button--text": this.variant === "text",
|
|
75
|
-
"button--small": this.size === "small",
|
|
76
|
-
"button--medium": this.size === "medium",
|
|
77
|
-
"button--large": this.size === "large",
|
|
78
|
-
"button--standard": !this.outline,
|
|
79
|
-
"button--outline": this.outline,
|
|
80
|
-
"button--has-label": this.hasSlotController.test("[default]"),
|
|
81
|
-
"button--has-prefix": this.hasSlotController.test("prefix"),
|
|
82
|
-
"button--has-suffix": this.hasSlotController.test("suffix"),
|
|
83
|
-
"button--circle": this.circle,
|
|
84
|
-
"button--disabled": false,
|
|
85
|
-
})}
|
|
86
|
-
href="${this.href}"
|
|
87
|
-
>
|
|
88
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
89
|
-
<slot part="label" class="button__label"></slot>
|
|
90
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
91
|
-
</${tag}>`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
/* --------------------------------- default -------------------------------- */
|
|
5
|
-
|
|
6
|
-
:host {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
position: relative;
|
|
9
|
-
width: auto;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.button {
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
align-items: stretch;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
width: 100%;
|
|
18
|
-
border-style: solid;
|
|
19
|
-
border-width: var(--pbo-input-border-width);
|
|
20
|
-
font-family: var(--pbo-input-font-family);
|
|
21
|
-
font-weight: var(--pbo-font-weight-semibold);
|
|
22
|
-
text-decoration: none;
|
|
23
|
-
user-select: none;
|
|
24
|
-
-webkit-user-select: none;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
vertical-align: middle;
|
|
27
|
-
padding: 0;
|
|
28
|
-
transition:
|
|
29
|
-
var(--pbo-transition-x-fast) background-color,
|
|
30
|
-
var(--pbo-transition-x-fast) color,
|
|
31
|
-
var(--pbo-transition-x-fast) border,
|
|
32
|
-
var(--pbo-transition-x-fast) box-shadow;
|
|
33
|
-
cursor: inherit;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.button::-moz-focus-inner {
|
|
37
|
-
border: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.button:focus {
|
|
41
|
-
outline: none;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.button:focus-visible {
|
|
45
|
-
outline: var(--pbo-focus-ring);
|
|
46
|
-
outline-offset: var(--pbo-focus-ring-offset);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* -------------------------------- disabled -------------------------------- */
|
|
50
|
-
.button--disabled * {
|
|
51
|
-
opacity: 0.5;
|
|
52
|
-
cursor: not-allowed;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* ------------------------------- pre/suf-fix ------------------------------ */
|
|
56
|
-
.button__prefix,
|
|
57
|
-
.button__suffix {
|
|
58
|
-
flex: 0 0 auto;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
pointer-events: none;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* ---------------------------------- label --------------------------------- */
|
|
65
|
-
.button__label {
|
|
66
|
-
display: inline-block;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.button__label::slotted(pbo-icon) {
|
|
70
|
-
vertical-align: -2px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* -------------------------------------------------------------------------- */
|
|
74
|
-
/* Standard buttons */
|
|
75
|
-
/* -------------------------------------------------------------------------- */
|
|
76
|
-
|
|
77
|
-
/* --------------------------------- default -------------------------------- */
|
|
78
|
-
.button--standard.button--default {
|
|
79
|
-
background-color: var(--pbo-color-neutral-0);
|
|
80
|
-
border-color: var(--pbo-input-border-color);
|
|
81
|
-
color: var(--pbo-color-neutral-700);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.button--standard.button--default:hover:not(.button--disabled) {
|
|
85
|
-
background-color: var(--pbo-color-primary-50);
|
|
86
|
-
border-color: var(--pbo-color-primary-300);
|
|
87
|
-
color: var(--pbo-color-primary-700);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.button--standard.button--default:active:not(.button--disabled) {
|
|
91
|
-
background-color: var(--pbo-color-primary-100);
|
|
92
|
-
border-color: var(--pbo-color-primary-400);
|
|
93
|
-
color: var(--pbo-color-primary-700);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* --------------------------------- primary -------------------------------- */
|
|
97
|
-
|
|
98
|
-
/* --------------------------------- success -------------------------------- */
|
|
99
|
-
|
|
100
|
-
/* --------------------------------- neutral -------------------------------- */
|
|
101
|
-
|
|
102
|
-
/* --------------------------------- warning -------------------------------- */
|
|
103
|
-
|
|
104
|
-
/* --------------------------------- danger --------------------------------- */
|
|
105
|
-
|
|
106
|
-
/* -------------------------------------------------------------------------- */
|
|
107
|
-
/* Outline buttons */
|
|
108
|
-
/* -------------------------------------------------------------------------- */
|
|
109
|
-
|
|
110
|
-
.button--outline {
|
|
111
|
-
background: none;
|
|
112
|
-
border: solid 1px;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/* --------------------------------- default -------------------------------- */
|
|
116
|
-
.button--outline.button--default {
|
|
117
|
-
border-color: var(--pbo-input-border-color);
|
|
118
|
-
color: var(--pbo-color-neutral-700);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.button--outline.button--default:hover:not(.button--disabled),
|
|
122
|
-
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
123
|
-
border-color: var(--pbo-color-primary-600);
|
|
124
|
-
background-color: var(--pbo-color-primary-600);
|
|
125
|
-
color: var(--pbo-color-neutral-0);
|
|
126
|
-
}
|
|
127
|
-
/*
|
|
128
|
-
* Size modifiers
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
.button--small {
|
|
132
|
-
height: auto;
|
|
133
|
-
min-height: var(--pbo-input-height-small);
|
|
134
|
-
font-size: var(--pbo-button-font-size-small);
|
|
135
|
-
line-height: calc(var(--pbo-input-height-small) - var(--pbo-input-border-width) * 2);
|
|
136
|
-
border-radius: var(--pbo-input-border-radius-small);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.button--medium {
|
|
140
|
-
height: auto;
|
|
141
|
-
min-height: var(--pbo-input-height-medium);
|
|
142
|
-
font-size: var(--pbo-button-font-size-medium);
|
|
143
|
-
line-height: calc(var(--pbo-input-height-medium) - var(--pbo-input-border-width) * 2);
|
|
144
|
-
border-radius: var(--pbo-input-border-radius-medium);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.button--large {
|
|
148
|
-
height: auto;
|
|
149
|
-
min-height: var(--pbo-input-height-large);
|
|
150
|
-
font-size: var(--pbo-button-font-size-large);
|
|
151
|
-
line-height: calc(var(--pbo-input-height-large) - var(--pbo-input-border-width) * 2);
|
|
152
|
-
border-radius: var(--pbo-input-border-radius-large);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/*
|
|
156
|
-
* Outline buttons
|
|
157
|
-
*/
|
|
158
|
-
|
|
159
|
-
.button--outline {
|
|
160
|
-
background: none;
|
|
161
|
-
border: solid 1px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* Default */
|
|
165
|
-
.button--outline.button--default {
|
|
166
|
-
border-color: var(--pbo-input-border-color);
|
|
167
|
-
color: var(--pbo-color-neutral-700);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.button--outline.button--default:hover:not(.button--disabled),
|
|
171
|
-
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
172
|
-
border-color: var(--pbo-color-primary-600);
|
|
173
|
-
background-color: var(--pbo-color-primary-600);
|
|
174
|
-
color: var(--pbo-color-neutral-0);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.button--outline.button--default:active:not(.button--disabled) {
|
|
178
|
-
border-color: var(--pbo-color-primary-700);
|
|
179
|
-
background-color: var(--pbo-color-primary-700);
|
|
180
|
-
color: var(--pbo-color-neutral-0);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/*
|
|
184
|
-
* Button spacing
|
|
185
|
-
*/
|
|
186
|
-
|
|
187
|
-
.button--has-label.button--small .button__label {
|
|
188
|
-
padding: 0 var(--pbo-spacing-s);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.button--has-label.button--medium .button__label {
|
|
192
|
-
padding: 0 var(--pbo-spacing-m);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.button--has-label.button--large .button__label {
|
|
196
|
-
padding: 0 var(--pbo-spacing-l);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.button--has-prefix.button--small {
|
|
200
|
-
padding-inline-start: var(--pbo-spacing-xs);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.button--has-prefix.button--small .button__label {
|
|
204
|
-
padding-inline-start: var(--pbo-spacing-xs);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.button--has-prefix.button--medium {
|
|
208
|
-
padding-inline-start: var(--pbo-spacing-s);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.button--has-prefix.button--medium .button__label {
|
|
212
|
-
padding-inline-start: var(--pbo-spacing-s);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.button--has-prefix.button--large {
|
|
216
|
-
padding-inline-start: var(--pbo-spacing-s);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.button--has-prefix.button--large .button__label {
|
|
220
|
-
padding-inline-start: var(--pbo-spacing-s);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.button--has-suffix.button--small,
|
|
224
|
-
.button--caret.button--small {
|
|
225
|
-
padding-inline-end: var(--pbo-spacing-xs);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.button--has-suffix.button--small .button__label,
|
|
229
|
-
.button--caret.button--small .button__label {
|
|
230
|
-
padding-inline-end: var(--pbo-spacing-xs);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.button--has-suffix.button--medium,
|
|
234
|
-
.button--caret.button--medium {
|
|
235
|
-
padding-inline-end: var(--pbo-spacing-s);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.button--has-suffix.button--medium .button__label,
|
|
239
|
-
.button--caret.button--medium .button__label {
|
|
240
|
-
padding-inline-end: var(--pbo-spacing-s);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.button--has-suffix.button--large,
|
|
244
|
-
.button--caret.button--large {
|
|
245
|
-
padding-inline-end: var(--pbo-spacing-s);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.button--has-suffix.button--large .button__label,
|
|
249
|
-
.button--caret.button--large .button__label {
|
|
250
|
-
padding-inline-end: var(--pbo-spacing-s);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/* ------------------------------ Circle Button ----------------------------- */
|
|
254
|
-
.button--circle {
|
|
255
|
-
padding-left: 0;
|
|
256
|
-
padding-right: 0;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.button--circle.button--small {
|
|
260
|
-
width: var(--sl-input-height-small);
|
|
261
|
-
border-radius: 50%;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.button--circle.button--medium {
|
|
265
|
-
width: var(--sl-input-height-medium);
|
|
266
|
-
border-radius: 50%;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.button--circle.button--large {
|
|
270
|
-
width: var(--sl-input-height-large);
|
|
271
|
-
border-radius: 50%;
|
|
272
|
-
}
|
|
273
|
-
`;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { customElement, property } from "lit/decorators.js";
|
|
2
|
-
import { html, LitElement } from "lit";
|
|
3
|
-
import type { CSSResultGroup } from "lit";
|
|
4
|
-
import componentStyles from "../../styles/component.styles.js";
|
|
5
|
-
import styles from "./button-group.styles.js";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @summary Short summary of the component's intended use.
|
|
9
|
-
* @documentation https://shoelace.style/components/button-group
|
|
10
|
-
* @status experimental
|
|
11
|
-
*
|
|
12
|
-
* @dependency sl-example
|
|
13
|
-
*
|
|
14
|
-
* @event sl-event-name - Emitted as an example.
|
|
15
|
-
*
|
|
16
|
-
* @slot - The default slot.
|
|
17
|
-
* @slot example - An example slot.
|
|
18
|
-
*
|
|
19
|
-
* @csspart base - The component's base wrapper.
|
|
20
|
-
*
|
|
21
|
-
* @cssproperty --example - An example CSS custom property.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
@customElement("pbo-button-group")
|
|
25
|
-
export default class PboButtonGroup extends LitElement {
|
|
26
|
-
static styles: CSSResultGroup = [componentStyles, styles];
|
|
27
|
-
|
|
28
|
-
/** An example attribute. */
|
|
29
|
-
@property() attr = "example";
|
|
30
|
-
|
|
31
|
-
render() {
|
|
32
|
-
return html`<div>
|
|
33
|
-
<slot></slot>
|
|
34
|
-
</div>`;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { customElement, property } from "lit/decorators.js";
|
|
2
|
-
import { html, LitElement } from "lit";
|
|
3
|
-
import type { CSSResultGroup, PropertyValues } from "lit";
|
|
4
|
-
import componentStyles from "../../styles/component.styles.js";
|
|
5
|
-
import PairboElement from "../../internal/pairbo-element.js";
|
|
6
|
-
import styles from "./card-selection.styles.js";
|
|
7
|
-
import { map } from "lit/directives/map.js";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @summary Short summary of the component's intended use.
|
|
11
|
-
* @status experimental
|
|
12
|
-
*
|
|
13
|
-
* @dependency pbo-example
|
|
14
|
-
*
|
|
15
|
-
* @event pbo-event-name - Emitted as an example.
|
|
16
|
-
*
|
|
17
|
-
* @slot - The default slot.
|
|
18
|
-
* @slot example - An example slot.
|
|
19
|
-
*
|
|
20
|
-
* @csspart base - The component's base wrapper.
|
|
21
|
-
*
|
|
22
|
-
* @cssproperty --example - An example CSS custom property.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
@customElement("pbo-card-selection")
|
|
26
|
-
export default class PboCardSelection extends PairboElement {
|
|
27
|
-
static styles: CSSResultGroup = [componentStyles, styles];
|
|
28
|
-
|
|
29
|
-
@property({ type: Array }) categories: Category[] = [];
|
|
30
|
-
|
|
31
|
-
protected firstUpdated(_changedProperties: PropertyValues): void {
|
|
32
|
-
console.log(this.categories);
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return html`
|
|
36
|
-
${map(this.categories, category => {
|
|
37
|
-
return html`<pbo-category .cards=${category.cards} .name=${category.name}>
|
|
38
|
-
<h3 slot="title">${category.name}</h3>
|
|
39
|
-
</pbo-category>`;
|
|
40
|
-
})}
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
}
|