@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/docs/eleventy.config.mjs
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import markdownIt from "markdown-it";
|
|
5
|
-
import markdownItAttrs from "markdown-it-attrs";
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = path.dirname(__filename);
|
|
9
|
-
|
|
10
|
-
export default function (eleventyConfig) {
|
|
11
|
-
eleventyConfig.addGlobalData("meta", {
|
|
12
|
-
title: "Shoelace",
|
|
13
|
-
description: "A forward-thinking library of web components.",
|
|
14
|
-
});
|
|
15
|
-
eleventyConfig.addGlobalData("layout", "default"); // make 'default' the default layout
|
|
16
|
-
|
|
17
|
-
// Add directories for component demos and source files
|
|
18
|
-
eleventyConfig.addPassthroughCopy({ "../src/components": "components" });
|
|
19
|
-
eleventyConfig.addPassthroughCopy({
|
|
20
|
-
[path.join(__dirname, "../src")]: "src",
|
|
21
|
-
});
|
|
22
|
-
eleventyConfig.addPassthroughCopy({
|
|
23
|
-
[path.join(__dirname, "../dist")]: "dist",
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Add a collection for components
|
|
27
|
-
eleventyConfig.addCollection("components", () => {
|
|
28
|
-
const componentsDir = path.join(__dirname, "../src/components");
|
|
29
|
-
return fs.readdirSync(componentsDir).filter(file => file.endsWith(".ts"));
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Generate a page for each component
|
|
33
|
-
eleventyConfig.addCollection("componentPages", () => {
|
|
34
|
-
const componentsDir = path.join(__dirname, "../src/components");
|
|
35
|
-
return fs
|
|
36
|
-
.readdirSync(componentsDir)
|
|
37
|
-
.filter(file => file.endsWith(".ts"))
|
|
38
|
-
.map(file => {
|
|
39
|
-
const componentName = path.basename(file, ".ts");
|
|
40
|
-
return {
|
|
41
|
-
inputPath: path.join(componentsDir, file),
|
|
42
|
-
outputPath: path.join(__dirname, "../_site/components", `${componentName}.html`),
|
|
43
|
-
data: {
|
|
44
|
-
title: `${componentName} Component`,
|
|
45
|
-
layout: "component",
|
|
46
|
-
componentName,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// Configure markdown-it with markdown-it-attrs
|
|
53
|
-
const markdownLib = markdownIt({
|
|
54
|
-
html: true,
|
|
55
|
-
breaks: true,
|
|
56
|
-
linkify: true,
|
|
57
|
-
}).use(markdownItAttrs);
|
|
58
|
-
|
|
59
|
-
eleventyConfig.setLibrary("md", markdownLib);
|
|
60
|
-
eleventyConfig.addPassthroughCopy({ "docs/pages/fabric-example.js": "fabric-example.js" });
|
|
61
|
-
// Configure Eleventy
|
|
62
|
-
return {
|
|
63
|
-
dir: {
|
|
64
|
-
input: "docs/pages",
|
|
65
|
-
output: "_site",
|
|
66
|
-
includes: "../_includes",
|
|
67
|
-
data: "_data",
|
|
68
|
-
},
|
|
69
|
-
markdownTemplateEngine: "njk",
|
|
70
|
-
templateEngineOverride: ["njk"],
|
|
71
|
-
};
|
|
72
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Message Selector Component
|
|
3
|
-
layout: component
|
|
4
|
-
componentName: message-selector
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Message Selector Component
|
|
8
|
-
|
|
9
|
-
This is a demo page for the `message-selector` component.
|
|
10
|
-
|
|
11
|
-
```js
|
|
12
|
-
console.log("hello");
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
<pairbo-message-selector id="custom" giftLabel="This is a custom label🎁" premiumLabel="Let's have a premium card" premiumDescription="TL;DR" freeMessageSelected="Oh? How about a free message?">
|
|
16
|
-
</pairbo-message-selector>
|
|
17
|
-
<fabric-example></fabric-example>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<script src="https://cdn.jsdelivr.net/npm/fabric@latest/dist/fabric.min.js"></script>
|
|
2
|
-
<h1>Fabric Example</h1>
|
|
3
|
-
<div id="content">
|
|
4
|
-
<canvas id="fabric-canvas" width="500" height="500"></canvas>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
const canvas = new fabric.Canvas("fabric-canvas");
|
|
9
|
-
const helloWorld = new fabric.Textbox("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12", {
|
|
10
|
-
fontSize: 16,
|
|
11
|
-
left: 100,
|
|
12
|
-
top: 100,
|
|
13
|
-
width: 200,
|
|
14
|
-
height: 200,
|
|
15
|
-
fixedWidth: 200,
|
|
16
|
-
lockScalingX: true,
|
|
17
|
-
lockScalingY: true,
|
|
18
|
-
lockScalingZ: true,
|
|
19
|
-
});
|
|
20
|
-
helloWorld.on("", function (e) {
|
|
21
|
-
console.log("selection:changed", e);
|
|
22
|
-
});
|
|
23
|
-
console.log("Available Fabric events:", helloWorld.__eventListeners);
|
|
24
|
-
helloWorld.on("changed", function () {
|
|
25
|
-
console.log("The text has changed", helloWorld);
|
|
26
|
-
let lines = helloWorld.textLines;
|
|
27
|
-
if (lines.length > 12) {
|
|
28
|
-
lines = lines.slice(0, 12);
|
|
29
|
-
helloWorld.text = lines.join("\n");
|
|
30
|
-
helloWorld.setSelectionStart(helloWorld.text.length);
|
|
31
|
-
helloWorld.setSelectionEnd(helloWorld.text.length);
|
|
32
|
-
}
|
|
33
|
-
console.log(lines);
|
|
34
|
-
console.log("Hello World was clicked");
|
|
35
|
-
});
|
|
36
|
-
console.log({ helloWorld });
|
|
37
|
-
canvas.add(helloWorld);
|
|
38
|
-
canvas.centerObject(helloWorld);
|
|
39
|
-
canvas.renderAll();
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<style>
|
|
43
|
-
#fabric-canvas {
|
|
44
|
-
border: 1px solid black;
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Canvas, Textbox } from "fabric";
|
|
2
|
-
const canvas = new Canvas("fabric-canvas");
|
|
3
|
-
const helloWorld = new Textbox("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12", {
|
|
4
|
-
fontSize: 16,
|
|
5
|
-
left: 100,
|
|
6
|
-
top: 100,
|
|
7
|
-
width: 200,
|
|
8
|
-
height: 200,
|
|
9
|
-
lockScalingX: true,
|
|
10
|
-
lockScalingY: true,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
helloWorld.on("changed", function () {
|
|
14
|
-
console.log("The text has changed", helloWorld);
|
|
15
|
-
let lines = helloWorld.textLines;
|
|
16
|
-
if (lines.length > 12) {
|
|
17
|
-
lines = lines.slice(0, 12);
|
|
18
|
-
helloWorld.text = lines.join("\n");
|
|
19
|
-
helloWorld.setSelectionStart(helloWorld.text.length);
|
|
20
|
-
helloWorld.setSelectionEnd(helloWorld.text.length);
|
|
21
|
-
}
|
|
22
|
-
console.log(lines);
|
|
23
|
-
console.log("Hello World was clicked");
|
|
24
|
-
});
|
|
25
|
-
console.log({ helloWorld });
|
|
26
|
-
canvas.add(helloWorld);
|
|
27
|
-
canvas.centerObject(helloWorld);
|
|
28
|
-
canvas.renderAll();
|
package/docs/pages/index.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Pairbo Custom Integration
|
|
2
|
-
|
|
3
|
-
Welcome to Pairbo Custom Integration - a suite of customizable web components designed to enhance e-commerce platforms with personalized card selection and messaging capabilities.
|
|
4
|
-
|
|
5
|
-
## Project Overview
|
|
6
|
-
|
|
7
|
-
This project provides a collection of framework-agnostic web components that enable online stores to integrate personalized card selection and messaging features. Built with TypeScript and modern web standards, these components are designed to be lightweight, performant, and easily customizable.
|
|
8
|
-
|
|
9
|
-
## Core Features
|
|
10
|
-
|
|
11
|
-
### Custom Components
|
|
12
|
-
|
|
13
|
-
- **Enhanced Checkbox Components**: Custom-styled, accessible checkbox elements
|
|
14
|
-
- **Card Selection Module**: Interactive popup interface for browsing and selecting greeting cards
|
|
15
|
-
- **Message Editor Modules**:
|
|
16
|
-
- Text-based message editor for typed greetings
|
|
17
|
-
- Handwriting-enabled editor for personal notes
|
|
18
|
-
|
|
19
|
-
### Technical Benefits
|
|
20
|
-
|
|
21
|
-
- Framework-agnostic implementation using Web Components
|
|
22
|
-
- TypeScript for type safety and better developer experience
|
|
23
|
-
- Comprehensive test coverage
|
|
24
|
-
- Detailed documentation with live examples
|
|
25
|
-
- Optional framework wrappers (React/Vue)
|
|
26
|
-
|
|
27
|
-
## Project Timeline
|
|
28
|
-
|
|
29
|
-
### Phase 1: Foundation (Week 1)
|
|
30
|
-
|
|
31
|
-
- Development environment setup
|
|
32
|
-
- Tool configuration (ESLint, Prettier, TypeScript)
|
|
33
|
-
- Documentation framework implementation
|
|
34
|
-
|
|
35
|
-
### Phase 2: Core Development (Weeks 2-3)
|
|
36
|
-
|
|
37
|
-
- Component development
|
|
38
|
-
- Automated testing implementation
|
|
39
|
-
- Integration testing
|
|
40
|
-
|
|
41
|
-
### Phase 3: Documentation (Weeks 3-4)
|
|
42
|
-
|
|
43
|
-
- API documentation
|
|
44
|
-
- Integration guides
|
|
45
|
-
- Usage examples
|
|
46
|
-
|
|
47
|
-
### Phase 4: Delivery (Week 4)
|
|
48
|
-
|
|
49
|
-
- Build optimization
|
|
50
|
-
- CDN configuration
|
|
51
|
-
- Production deployment
|
|
52
|
-
|
|
53
|
-
### Phase 5: Extensions (Week 5)
|
|
54
|
-
|
|
55
|
-
- Framework wrapper development
|
|
56
|
-
- Demo integration implementation
|
|
57
|
-
- Final testing and refinement
|
|
58
|
-
|
|
59
|
-
For detailed timeline and milestones, please refer to our [Roadmap](./roadmap.md) section.
|
|
60
|
-
|
|
61
|
-
## Getting Started
|
|
62
|
-
|
|
63
|
-
- [Issue Tracker](https://github.com/pairbo/custom-integration/issues)
|
|
64
|
-
- [GitHub Repository](https://github.com/pairbo/custom-integration)
|
|
65
|
-
|
|
66
|
-
For technical support and contributions, please visit our:
|
|
67
|
-
|
|
68
|
-
## Support
|
|
69
|
-
|
|
70
|
-
- [Integration Examples](./examples/index.md)
|
|
71
|
-
- [Component Documentation](./components/index.md)
|
|
72
|
-
- [Installation Guide](./installation.md)
|
|
73
|
-
|
|
74
|
-
To begin integrating Pairbo components into your e-commerce platform, please refer to our:
|
|
75
|
-
|
|
76
|
-
For integration guides and detailed documentation, please navigate to the respective sections using the sidebar navigation.
|
package/eslint.config.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import globals from 'globals';
|
|
2
|
-
import tseslint, { parser } from 'typescript-eslint';
|
|
3
|
-
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
|
|
4
|
-
import {configs as litConfigs} from 'eslint-plugin-lit'
|
|
5
|
-
import {fileURLToPath} from 'url';
|
|
6
|
-
|
|
7
|
-
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
|
8
|
-
console.log(`${__dirname}/tsconfig.json`)
|
|
9
|
-
export default [
|
|
10
|
-
{
|
|
11
|
-
files: ['src'],
|
|
12
|
-
ignores: ['**/node_modules/**', '**/dist/**', '**/build/**', 'scripts/plop/plopfile.js']
|
|
13
|
-
},
|
|
14
|
-
// TODO: Try to override the parserOptions.project with the tsconfig.json in the root
|
|
15
|
-
{
|
|
16
|
-
files: ['scr/**/*.ts'],
|
|
17
|
-
languageOptions:{globals: globals.browser},
|
|
18
|
-
parser: "@typescript-eslint/parser",
|
|
19
|
-
parserOptions: {
|
|
20
|
-
project: `${__dirname}/tsconfig.json`,
|
|
21
|
-
tsconfigRootDir: __dirname,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
{ languageOptions: { globals: globals.browser } },
|
|
25
|
-
{
|
|
26
|
-
rules: {
|
|
27
|
-
"no-unused-vars": "warn",
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
eslintPluginPrettier,
|
|
31
|
-
litConfigs['flat/recommended'],
|
|
32
|
-
];
|
package/ignote_temp
DELETED
package/index.html
DELETED
|
@@ -1,162 +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 type="module" src="src/components/main.ts"></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
|
-
<a href="/index.html">Home</a>
|
|
29
|
-
<a href="/pages/editor.html">Editor</a>
|
|
30
|
-
<a href="/pages/card-selection.html">Card Selection</a>
|
|
31
|
-
<div style="
|
|
32
|
-
height: 100vh;
|
|
33
|
-
width: 100vw;
|
|
34
|
-
padding-left: auto;
|
|
35
|
-
padding-right: auto;
|
|
36
|
-
margin-left: auto;
|
|
37
|
-
margin-right: auto;
|
|
38
|
-
">
|
|
39
|
-
<div style="
|
|
40
|
-
height: 60%;
|
|
41
|
-
width: 60%;
|
|
42
|
-
position: absolute;
|
|
43
|
-
top: 50%;
|
|
44
|
-
left: 50%;
|
|
45
|
-
transform: translate(-50%, -50%);
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
align-items: center;
|
|
49
|
-
">
|
|
50
|
-
<fabric-example backgroundUrl="./public/Greeting Card from Pairbo.png" alignment="right"></fabric-example>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<textarea id="message"></textarea>
|
|
54
|
-
<input type="color" id="color" value="#000000" />
|
|
55
|
-
<select name="alignment" id="alignment">
|
|
56
|
-
<option value="left">Left</option>
|
|
57
|
-
<option value="center">Center</option>
|
|
58
|
-
<option value="right">Right</option>
|
|
59
|
-
</select>
|
|
60
|
-
<!-- Example usage -->
|
|
61
|
-
<pbo-selector .fonts='${[
|
|
62
|
-
{ value: "helvetica", label: "Helvetica", font: "Helvetica, Arial, sans-serif" },
|
|
63
|
-
{ value: "georgia", label: "Georgia", font: "Georgia, serif" }
|
|
64
|
-
]}'></pbo-selector>
|
|
65
|
-
|
|
66
|
-
<div style="display: inline-flex; flex-direction: column; gap:1rem">
|
|
67
|
-
<pbo-button outline>
|
|
68
|
-
<div>Click me</div>
|
|
69
|
-
</pbo-button>
|
|
70
|
-
|
|
71
|
-
<pbo-button-group>
|
|
72
|
-
<pbo-button outline>
|
|
73
|
-
left
|
|
74
|
-
</pbo-button>
|
|
75
|
-
<pbo-button outline>
|
|
76
|
-
center
|
|
77
|
-
</pbo-button>
|
|
78
|
-
<pbo-button>
|
|
79
|
-
right
|
|
80
|
-
</pbo-button>
|
|
81
|
-
</pbo-button-group>
|
|
82
|
-
|
|
83
|
-
<pbo-radio-button aria-disabled="true" disabled>
|
|
84
|
-
disabled
|
|
85
|
-
</pbo-radio-button>
|
|
86
|
-
|
|
87
|
-
<pbo-radio-button checked>
|
|
88
|
-
focused
|
|
89
|
-
</pbo-radio-button>
|
|
90
|
-
|
|
91
|
-
<form>
|
|
92
|
-
<input type="text" name="name" />
|
|
93
|
-
<input type="email" name="email" />
|
|
94
|
-
|
|
95
|
-
<input type="radio" name="align" />
|
|
96
|
-
<input type="radio" name="align" />
|
|
97
|
-
<input type="radio" name="align" />
|
|
98
|
-
<pbo-radio-group required id="alignment-group">
|
|
99
|
-
<pbo-radio-button value="left" size="small" circle>Left</pbo-radio-button>
|
|
100
|
-
<pbo-radio-button value="center">Center</pbo-radio-button>
|
|
101
|
-
<pbo-radio-button value="right">Right</pbo-radio-button>
|
|
102
|
-
</pbo-radio-group>
|
|
103
|
-
|
|
104
|
-
<pbo-radio-group required id="color-group">
|
|
105
|
-
<pbo-radio-button value="white" size="small" circle>White</pbo-radio-button>
|
|
106
|
-
<pbo-radio-button value="black">Black</pbo-radio-button>
|
|
107
|
-
</pbo-radio-group>
|
|
108
|
-
<pbo-textarea required rows="12" resize="none"></pbo-textarea>
|
|
109
|
-
<sl-radio-group required>
|
|
110
|
-
<sl-radio value="left">Left</sl-radio>
|
|
111
|
-
<sl-radio value="center">Center</sl-radio>
|
|
112
|
-
<sl-radio value="right">Right</sl-radio>
|
|
113
|
-
</sl-radio-group>
|
|
114
|
-
<button type="submit">Submit</button>
|
|
115
|
-
</form>
|
|
116
|
-
<pbo-button circle>Circle</pbo-button>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<script>
|
|
121
|
-
const textareaEl = document.querySelector("pbo-textarea");
|
|
122
|
-
textareaEl.addEventListener("pbo-input", () => {
|
|
123
|
-
fabricExample.message = textareaEl.value;
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
const message = document.getElementById("message");
|
|
127
|
-
const fabricExample = document.querySelector("fabric-example");
|
|
128
|
-
message.addEventListener("input", e => {
|
|
129
|
-
fabricExample.message = message.value;
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
const color = document.getElementById("color");
|
|
133
|
-
color.addEventListener("input", e => {
|
|
134
|
-
fabricExample.color = color.value;
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
const element = document.getElementById("alignment");
|
|
138
|
-
element.addEventListener("pbo-change", e => {
|
|
139
|
-
fabricExample.alignment = element.value;
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
const alignmentGroup = document.getElementById("alignment-group");
|
|
143
|
-
alignmentGroup.addEventListener("pbo-change", e => {
|
|
144
|
-
console.log(alignmentGroup.value);
|
|
145
|
-
fabricExample.alignment = alignmentGroup.value;
|
|
146
|
-
fabricExample.setAttribute("alignment", alignmentGroup.value);
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
const colorGroup = document.getElementById("color-group");
|
|
150
|
-
colorGroup.addEventListener("pbo-change", e => {
|
|
151
|
-
console.log(colorGroup.value);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
const slGroupEl = document.querySelector("sl-radio-group");
|
|
155
|
-
slGroupEl.addEventListener("sl-change", e => {
|
|
156
|
-
console.log({ e })
|
|
157
|
-
console.log(slGroupEl.value);
|
|
158
|
-
});
|
|
159
|
-
</script>
|
|
160
|
-
</body>
|
|
161
|
-
|
|
162
|
-
</html>
|
package/lint-stage.confg.js
DELETED
|
@@ -1,65 +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 type="module" src="../src/components/main.ts"></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-category>
|
|
30
|
-
<h1 slot="title">Title</h1>
|
|
31
|
-
</pbo-category>
|
|
32
|
-
</div>
|
|
33
|
-
</body>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
const categoryEl = document.querySelector('pbo-category');
|
|
37
|
-
|
|
38
|
-
categoryEl.cards = [
|
|
39
|
-
{ cover_url: "https://picsum.photos/id/1/300/400", id: "1" },
|
|
40
|
-
{ cover_url: "https://picsum.photos/id/10/300/400", id: "10" },
|
|
41
|
-
{ cover_url: "https://picsum.photos/id/14/300/400", id: "10" },
|
|
42
|
-
{ cover_url: "https://picsum.photos/id/20/300/400", id: "10" },
|
|
43
|
-
{ cover_url: "https://picsum.photos/id/30/300/400", id: "10" },
|
|
44
|
-
{ cover_url: "https://picsum.photos/id/40/300/400", id: "10" },
|
|
45
|
-
{ cover_url: "https://picsum.photos/id/100/300/400", id: "100" },
|
|
46
|
-
]
|
|
47
|
-
</script>
|
|
48
|
-
|
|
49
|
-
<style>
|
|
50
|
-
body {
|
|
51
|
-
height: 100vh;
|
|
52
|
-
width: 100vw;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.container {
|
|
56
|
-
height: 100%;
|
|
57
|
-
width: 100%;
|
|
58
|
-
padding-left: auto;
|
|
59
|
-
padding-right: auto;
|
|
60
|
-
margin-left: auto;
|
|
61
|
-
margin-right: auto;
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
64
|
-
|
|
65
|
-
</html>
|
package/pages/drawer.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 type="module" src="../src/components/main.ts"></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/pages/editor.html
DELETED
|
@@ -1,45 +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 type="module" src="../src/components/main.ts"></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-editor></pbo-editor>
|
|
30
|
-
</div>
|
|
31
|
-
</body>
|
|
32
|
-
|
|
33
|
-
<style>
|
|
34
|
-
.container {
|
|
35
|
-
height: 100%;
|
|
36
|
-
width: 100%;
|
|
37
|
-
padding-left: auto;
|
|
38
|
-
padding-right: auto;
|
|
39
|
-
margin-left: auto;
|
|
40
|
-
margin-right: auto;
|
|
41
|
-
}
|
|
42
|
-
</style>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</html>
|
package/pages/page-mgn.html
DELETED
|
@@ -1,51 +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 type="module" src="../src/components/main.ts"></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-page-manager></pbo-page-manager>
|
|
30
|
-
</div>
|
|
31
|
-
</body>
|
|
32
|
-
|
|
33
|
-
<style>
|
|
34
|
-
html,
|
|
35
|
-
body {
|
|
36
|
-
height: 100vh;
|
|
37
|
-
width: 100wh;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.container {
|
|
41
|
-
height: 100%;
|
|
42
|
-
width: 100%;
|
|
43
|
-
padding-left: auto;
|
|
44
|
-
padding-right: auto;
|
|
45
|
-
margin-left: auto;
|
|
46
|
-
margin-right: auto;
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</html>
|