@xplortech/apollo-core 0.5.3 → 1.0.0-beta.0
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/build/style.css +758 -383
- package/dist/apollo-core/apollo-core.css +9 -5468
- package/dist/apollo-core/apollo-core.esm.js +1 -125
- package/dist/apollo-core/index.esm.js +0 -1
- package/dist/apollo-core/p-09b2f746.entry.js +1 -0
- package/dist/apollo-core/p-0bc956c6.entry.js +1 -0
- package/dist/apollo-core/p-1b1e7207.entry.js +1 -0
- package/dist/apollo-core/p-20389bb6.entry.js +1 -0
- package/dist/apollo-core/p-25983fde.entry.js +1 -0
- package/dist/apollo-core/p-2f90296c.js +10 -0
- package/dist/apollo-core/p-4a348764.entry.js +1 -0
- package/dist/apollo-core/p-4e2b69e8.entry.js +1 -0
- package/dist/apollo-core/p-84bf6b2d.entry.js +1 -0
- package/dist/apollo-core/p-880c0359.entry.js +1 -0
- package/dist/apollo-core/p-8e47a5be.entry.js +1 -0
- package/dist/apollo-core/p-93958292.entry.js +1 -0
- package/dist/apollo-core/p-93c27db5.entry.js +1 -0
- package/dist/apollo-core/p-ad90fe4d.js +1 -0
- package/dist/apollo-core/p-b2327e2c.entry.js +1 -0
- package/dist/apollo-core/p-c55b5d9c.entry.js +1 -0
- package/dist/apollo-core/p-e369d7af.entry.js +1 -0
- package/dist/apollo-core/p-e60ecaef.entry.js +1 -0
- package/dist/apollo-core/p-f929c958.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +19 -0
- package/dist/cjs/index-54ba5804.js +1623 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/{apollo-core/regular-133c23b5.js → cjs/regular-872f5226.js} +3 -12
- package/dist/cjs/v4-14140ff3.js +77 -0
- package/dist/cjs/xpl-application-shell.cjs.entry.js +58 -0
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +299 -0
- package/dist/cjs/xpl-backdrop.cjs.entry.js +25 -0
- package/dist/cjs/xpl-button-row.cjs.entry.js +22 -0
- package/dist/cjs/xpl-choicelist.cjs.entry.js +43 -0
- package/dist/cjs/xpl-divider.cjs.entry.js +18 -0
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +104 -0
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +123 -0
- package/dist/cjs/xpl-grid-item.cjs.entry.js +25 -0
- package/dist/cjs/xpl-grid.cjs.entry.js +35 -0
- package/dist/cjs/xpl-input.cjs.entry.js +2534 -0
- package/dist/cjs/xpl-list.cjs.entry.js +61 -0
- package/dist/cjs/xpl-main-nav.cjs.entry.js +30 -0
- package/dist/cjs/xpl-pagination.cjs.entry.js +76 -0
- package/dist/cjs/xpl-select.cjs.entry.js +625 -0
- package/dist/cjs/xpl-toggle.cjs.entry.js +34 -0
- package/dist/collection/collection-manifest.json +41 -0
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +147 -0
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +158 -0
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +41 -0
- package/dist/collection/components/xpl-badge/xpl-badge.js +50 -0
- package/dist/{apollo-core/xpl-breadcrumb-item.entry.js → collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js} +12 -11
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +13 -0
- package/dist/collection/components/xpl-button/xpl-button.js +211 -0
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +117 -0
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +185 -0
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +150 -0
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +39 -0
- package/dist/collection/components/xpl-divider/xpl-divider.js +30 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +66 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +27 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +110 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +260 -0
- package/dist/collection/components/xpl-grid/xpl-grid.js +26 -0
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +93 -0
- package/dist/collection/components/xpl-input/xpl-input.js +478 -0
- package/dist/collection/components/xpl-list/xpl-list.js +91 -0
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +72 -0
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +67 -0
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +190 -0
- package/dist/collection/components/xpl-radio/xpl-radio.js +168 -0
- package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +9 -0
- package/dist/collection/components/xpl-select/xpl-select.js +344 -0
- package/dist/collection/components/xpl-table/xpl-table.js +200 -0
- package/dist/collection/components/xpl-tag/xpl-tag.js +30 -0
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +157 -0
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +66 -0
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/custom-elements/index.js +20201 -0
- package/dist/esm/apollo-core.js +17 -0
- package/dist/esm/index-3df6db84.js +1594 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/regular-86225e9d.js +16041 -0
- package/dist/esm/v4-929670b7.js +75 -0
- package/dist/{apollo-core → esm}/xpl-application-shell.entry.js +12 -8
- package/dist/esm/xpl-avatar_12.entry.js +284 -0
- package/dist/{apollo-core → esm}/xpl-backdrop.entry.js +2 -2
- package/dist/{apollo-core → esm}/xpl-button-row.entry.js +2 -4
- package/dist/esm/xpl-choicelist.entry.js +39 -0
- package/dist/{apollo-core → esm}/xpl-divider.entry.js +2 -2
- package/dist/esm/xpl-dropdown-group_3.entry.js +98 -0
- package/dist/esm/xpl-dropdown_2.entry.js +118 -0
- package/dist/{apollo-core → esm}/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +31 -0
- package/dist/{apollo-core → esm}/xpl-input.entry.js +35 -45
- package/dist/{apollo-core → esm}/xpl-list.entry.js +18 -20
- package/dist/{apollo-core → esm}/xpl-main-nav.entry.js +2 -2
- package/dist/{apollo-core → esm}/xpl-pagination.entry.js +8 -8
- package/dist/{apollo-core → esm}/xpl-select.entry.js +88 -126
- package/dist/esm/xpl-toggle.entry.js +30 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stories/application-shell.stories.js +767 -0
- package/dist/stories/avatar.stories.js +173 -0
- package/dist/stories/backdrop.stories.js +18 -0
- package/dist/stories/badge.stories.js +48 -0
- package/dist/stories/breadcrumbs.stories.js +117 -0
- package/dist/stories/button-row.stories.js +68 -0
- package/dist/stories/button.stories.js +110 -0
- package/dist/stories/checkbox.stories.js +78 -0
- package/dist/stories/choicelist.stories.js +112 -0
- package/dist/stories/content-area.stories.js +53 -0
- package/dist/stories/divider.stories.js +34 -0
- package/dist/stories/dropdown.stories.js +377 -0
- package/dist/stories/grid.stories.js +100 -0
- package/dist/stories/input.stories.js +268 -0
- package/dist/stories/list.stories.js +154 -0
- package/dist/stories/main-nav.stories.js +308 -0
- package/dist/stories/pagination.stories.js +84 -0
- package/dist/stories/radio.stories.js +68 -0
- package/dist/stories/secondary-nav.stories.js +76 -0
- package/dist/stories/select.stories.js +119 -0
- package/dist/stories/table.stories.js +107 -0
- package/dist/stories/tabs.stories.js +24 -0
- package/dist/stories/toggle.stories.js +84 -0
- package/dist/stories/utility-bar.stories.js +94 -0
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/application-shell.stories.d.ts +4 -4
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/avatar.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/backdrop.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/badge.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/button-row.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/button.stories.d.ts +19 -10
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/checkbox.stories.d.ts +2 -2
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/choicelist.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/content-area.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/divider.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/dropdown.stories.d.ts +134 -0
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/grid.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/input.stories.d.ts +5 -5
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/list.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/main-nav.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/radio.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/secondary-nav.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/select.stories.d.ts +2 -2
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/table.stories.d.ts +1 -1
- package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/toggle.stories.d.ts +2 -2
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +2 -2
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +3 -3
- package/dist/types/components/xpl-badge/xpl-badge.d.ts +1 -1
- package/dist/types/components/xpl-button/xpl-button.d.ts +32 -8
- package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +3 -3
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +1 -1
- package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +0 -1
- package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +3 -3
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +7 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +5 -0
- package/dist/types/components/xpl-input/xpl-input.d.ts +4 -4
- package/dist/types/components/xpl-list/xpl-list.d.ts +2 -3
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +1 -1
- package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +1 -1
- package/dist/types/components/xpl-radio/xpl-radio.d.ts +1 -1
- package/dist/types/components/xpl-select/xpl-select.d.ts +6 -3
- package/dist/types/components/xpl-table/xpl-table.d.ts +1 -1
- package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +1 -1
- package/dist/types/components.d.ts +264 -43
- package/package.json +10 -4
- package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
- package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
- package/dist/apollo-core/dom-1f98a75f.js +0 -73
- package/dist/apollo-core/index-3c9f25ef.js +0 -2938
- package/dist/apollo-core/index-912d1a21.js +0 -584
- package/dist/apollo-core/shadow-css-67b66845.js +0 -389
- package/dist/apollo-core/xpl-avatar.entry.js +0 -19
- package/dist/apollo-core/xpl-badge.entry.js +0 -17
- package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -14
- package/dist/apollo-core/xpl-button.entry.js +0 -34
- package/dist/apollo-core/xpl-checkbox.entry.js +0 -25
- package/dist/apollo-core/xpl-choicelist.entry.js +0 -32
- package/dist/apollo-core/xpl-content-area.entry.js +0 -16
- package/dist/apollo-core/xpl-grid.entry.js +0 -31
- package/dist/apollo-core/xpl-nav-item.entry.js +0 -12
- package/dist/apollo-core/xpl-radio.entry.js +0 -25
- package/dist/apollo-core/xpl-secondary-nav.entry.js +0 -12
- package/dist/apollo-core/xpl-table.entry.js +0 -85
- package/dist/apollo-core/xpl-tag.entry.js +0 -17
- package/dist/apollo-core/xpl-toggle.entry.js +0 -30
- package/dist/apollo-core/xpl-utility-bar.entry.js +0 -25
- package/dist/types/components/xpl-choicelist/choice.d.ts +0 -6
- package/dist/types/components/xpl-dropdown/dropdownchoice.d.ts +0 -6
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +0 -11
- package/dist/types/components/xpl-list/listitem.d.ts +0 -16
- /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- /package/dist/types/Users/{roc/Sites → fernandogelin/Projects}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { v4 as uuid } from 'uuid';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Choicelist',
|
|
4
|
+
argTypes: {
|
|
5
|
+
multi: {
|
|
6
|
+
control: {
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
styled: {
|
|
11
|
+
control: {
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
const data = [
|
|
18
|
+
{
|
|
19
|
+
label: 'Label #1',
|
|
20
|
+
description: 'Lorem ipsum dolor sit amet',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: 'Label #2',
|
|
24
|
+
description: 'Lorem ipsum dolor sit amet',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Label #3',
|
|
28
|
+
description: 'Lorem ipsum dolor sit amet',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
const script = ({ id, multi, styled }) => `
|
|
32
|
+
(function() {
|
|
33
|
+
const choicelist = document.getElementById("${id}");
|
|
34
|
+
choicelist.choices = ${JSON.stringify(data)};
|
|
35
|
+
choicelist.multi = ${multi ? 'true' : 'false'};
|
|
36
|
+
choicelist.styled = ${styled ? 'true' : 'false'};
|
|
37
|
+
})();
|
|
38
|
+
`;
|
|
39
|
+
export const Choicelist = ({ multi, styled }) => {
|
|
40
|
+
const id = uuid();
|
|
41
|
+
return `<xpl-choicelist id="${id}" name="choicelist"></xpl-choicelist><script>${script({
|
|
42
|
+
id,
|
|
43
|
+
multi,
|
|
44
|
+
styled,
|
|
45
|
+
})}</script>`;
|
|
46
|
+
};
|
|
47
|
+
Choicelist.parameters = {
|
|
48
|
+
layout: 'centered',
|
|
49
|
+
'web-component': {
|
|
50
|
+
render({ multi, styled }) {
|
|
51
|
+
let attrs = '';
|
|
52
|
+
if (multi)
|
|
53
|
+
attrs += ' multi';
|
|
54
|
+
if (styled)
|
|
55
|
+
attrs += ' styled';
|
|
56
|
+
return [
|
|
57
|
+
`<xpl-choicelist${attrs} name="choicelist-name"></xpl-choicelist>`,
|
|
58
|
+
`choicelist.choices = [
|
|
59
|
+
{
|
|
60
|
+
label: "Label #1",
|
|
61
|
+
description: "Lorem ipsum dolor sit amet"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: "Label #2",
|
|
65
|
+
description: "Lorem ipsum dolor sit amet"
|
|
66
|
+
},
|
|
67
|
+
...
|
|
68
|
+
];`,
|
|
69
|
+
];
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
html: {
|
|
73
|
+
render({ multi, styled }) {
|
|
74
|
+
let className = 'xpl-choicelist';
|
|
75
|
+
if (styled)
|
|
76
|
+
className += ' xpl-choicelist--styled';
|
|
77
|
+
const output = [];
|
|
78
|
+
if (styled)
|
|
79
|
+
output.push(`WARNING: For \`styled\` choicelists, there is
|
|
80
|
+
JS interactivity that is only provided by the web component
|
|
81
|
+
(specifically highlighting the background of a choice). The
|
|
82
|
+
code shown below does not reflect the additional \`styled\`
|
|
83
|
+
choicelist markup and interactivity.`);
|
|
84
|
+
output.push(`<ul class="${className}">
|
|
85
|
+
<li>
|
|
86
|
+
<div class="xpl-${multi ? 'checkbox' : 'radio'}-container">
|
|
87
|
+
<input class="xpl-${multi ? 'checkbox' : 'radio'}" id="choice-1" name="choicelist-name" type="${multi ? 'checkbox' : 'radio'}" value="choice-1"></input>
|
|
88
|
+
<label for="choice-1">
|
|
89
|
+
Label #1
|
|
90
|
+
<small>Lorem ipsum dolor sit amet</small>
|
|
91
|
+
</label>
|
|
92
|
+
</div>
|
|
93
|
+
</li>
|
|
94
|
+
<li>
|
|
95
|
+
<div class="xpl-${multi ? 'checkbox' : 'radio'}-container">
|
|
96
|
+
<input class="xpl-${multi ? 'checkbox' : 'radio'}" id="choice-2" name="choicelist-name" type="${multi ? 'checkbox' : 'radio'}" value="choice-2"></input>
|
|
97
|
+
<label for="choice-2">
|
|
98
|
+
Label #2
|
|
99
|
+
<small>Lorem ipsum dolor sit amet</small>
|
|
100
|
+
</label>
|
|
101
|
+
</div>
|
|
102
|
+
</li>
|
|
103
|
+
...
|
|
104
|
+
</ul>`);
|
|
105
|
+
return output;
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
Choicelist.args = {
|
|
110
|
+
multi: false,
|
|
111
|
+
styled: false,
|
|
112
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Content Area',
|
|
3
|
+
argTypes: {
|
|
4
|
+
size: {
|
|
5
|
+
options: ['wide', 'narrow', 'full'],
|
|
6
|
+
control: {
|
|
7
|
+
type: 'select',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export const ContentArea = ({ size }) => `<xpl-content-area size="${size}">
|
|
13
|
+
<div>
|
|
14
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
|
|
15
|
+
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
|
|
16
|
+
ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
|
|
17
|
+
explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
|
|
18
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro
|
|
19
|
+
quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia
|
|
20
|
+
non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
|
|
21
|
+
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi
|
|
22
|
+
ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate
|
|
23
|
+
velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla
|
|
24
|
+
pariatur?
|
|
25
|
+
</div>
|
|
26
|
+
</xpl-content-area>`;
|
|
27
|
+
ContentArea.parameters = {
|
|
28
|
+
'web-component': {
|
|
29
|
+
render: ContentArea,
|
|
30
|
+
},
|
|
31
|
+
html: {
|
|
32
|
+
render: ({ size }) => `
|
|
33
|
+
<main class="xpl-content-area-wrapper xpl-content-area-wrapper__${size}">
|
|
34
|
+
<div class="xpl-content-area">
|
|
35
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem
|
|
36
|
+
accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae
|
|
37
|
+
ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
|
|
38
|
+
explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit,
|
|
39
|
+
sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro
|
|
40
|
+
quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia
|
|
41
|
+
non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.
|
|
42
|
+
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi
|
|
43
|
+
ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate
|
|
44
|
+
velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla
|
|
45
|
+
pariatur?
|
|
46
|
+
</div>
|
|
47
|
+
</main>
|
|
48
|
+
`,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
ContentArea.args = {
|
|
52
|
+
size: 'wide',
|
|
53
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Divider',
|
|
3
|
+
argTypes: {
|
|
4
|
+
tier: {
|
|
5
|
+
options: [3, 2, 1, 0],
|
|
6
|
+
control: {
|
|
7
|
+
type: 'select',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
text: {
|
|
11
|
+
type: { name: 'string', required: false },
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export const Divider = ({ tier, text }) => {
|
|
16
|
+
let attrs = '';
|
|
17
|
+
attrs += ` tier="${tier}"`;
|
|
18
|
+
return `<xpl-divider${attrs}>${text}</xpl-divider>`;
|
|
19
|
+
};
|
|
20
|
+
Divider.parameters = {
|
|
21
|
+
layout: 'centered',
|
|
22
|
+
'web-component': {
|
|
23
|
+
render: Divider,
|
|
24
|
+
},
|
|
25
|
+
html: {
|
|
26
|
+
render({ tier, text }) {
|
|
27
|
+
return `<div class="xpl-divider xpl-divider--${tier.toString()}">${text}</div>`;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
Divider.args = {
|
|
32
|
+
tier: 3,
|
|
33
|
+
text: 'Lorem Ipsum',
|
|
34
|
+
};
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Dropdown',
|
|
3
|
+
};
|
|
4
|
+
export const Simple = ({ closeOnSelect, isOpen: open, mode, selectOnFocus, }) => {
|
|
5
|
+
const attributes = {
|
|
6
|
+
'close-on-select': closeOnSelect,
|
|
7
|
+
mode,
|
|
8
|
+
open,
|
|
9
|
+
'select-on-focus': selectOnFocus,
|
|
10
|
+
};
|
|
11
|
+
const options = [
|
|
12
|
+
{
|
|
13
|
+
label: 'Choice 1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'Choice 2',
|
|
17
|
+
isSelected: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: 'Choice 3 (disabled example)',
|
|
21
|
+
isDisabled: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: 'Choice 4',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Choice 5',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Choice 6',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: 'Choice 7',
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
return `
|
|
37
|
+
<div style="width:75vw">
|
|
38
|
+
<div style="position: relative; min-width: 200px; width: 100%">
|
|
39
|
+
<xpl-dropdown
|
|
40
|
+
id="xpl-dropdown-simple"
|
|
41
|
+
${Object.keys(attributes).reduce((acc, curr) => `${acc} ${curr}="${attributes[curr]}"`, '')}
|
|
42
|
+
>
|
|
43
|
+
</xpl-dropdown>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<script>
|
|
47
|
+
element = document.querySelector("#xpl-dropdown-simple");
|
|
48
|
+
element.options = ${JSON.stringify(options)}
|
|
49
|
+
</script>
|
|
50
|
+
`;
|
|
51
|
+
};
|
|
52
|
+
Simple.parameters = {
|
|
53
|
+
layout: 'centered',
|
|
54
|
+
'web-component': {
|
|
55
|
+
render: Simple,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
Simple.argTypes = {
|
|
59
|
+
mode: {
|
|
60
|
+
options: ['single', 'multi'],
|
|
61
|
+
control: {
|
|
62
|
+
type: 'select',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
Simple.args = {
|
|
67
|
+
closeOnSelect: true,
|
|
68
|
+
isOpen: true,
|
|
69
|
+
mode: 'single',
|
|
70
|
+
selectOnFocus: false,
|
|
71
|
+
};
|
|
72
|
+
export const SimpleWithChildren = ({ closeOnSelect, isOpen: open, mode, selectOnFocus, }) => {
|
|
73
|
+
const attributes = {
|
|
74
|
+
'close-on-select': closeOnSelect,
|
|
75
|
+
mode,
|
|
76
|
+
open,
|
|
77
|
+
'select-on-focus': selectOnFocus,
|
|
78
|
+
};
|
|
79
|
+
return `
|
|
80
|
+
<div style="width:75vw">
|
|
81
|
+
<div style="position: relative; min-width: 200px; width: 100%">
|
|
82
|
+
<xpl-dropdown
|
|
83
|
+
id="xpl-dropdown-simple"
|
|
84
|
+
${Object.keys(attributes).reduce((acc, curr) => `${acc} ${curr}="${attributes[curr]}"`, '')}
|
|
85
|
+
>
|
|
86
|
+
<xpl-dropdown-option
|
|
87
|
+
selected
|
|
88
|
+
slot="options"
|
|
89
|
+
>
|
|
90
|
+
<label slot="option">
|
|
91
|
+
<input type="radio" name="animal" value="dog"/>
|
|
92
|
+
dog
|
|
93
|
+
</label>
|
|
94
|
+
</xpl-dropdown-option>
|
|
95
|
+
<xpl-dropdown-option
|
|
96
|
+
disabled
|
|
97
|
+
slot="options"
|
|
98
|
+
>
|
|
99
|
+
<label slot="option">
|
|
100
|
+
<input disabled type="radio" name="animal" value="cat"/>
|
|
101
|
+
cat (disabled)
|
|
102
|
+
</label>
|
|
103
|
+
</xpl-dropdown-option>
|
|
104
|
+
<xpl-dropdown-option
|
|
105
|
+
slot="options"
|
|
106
|
+
>
|
|
107
|
+
<label slot="option">
|
|
108
|
+
<input type="radio" name="animal" value="fish"/>
|
|
109
|
+
fish (selected)
|
|
110
|
+
</label>
|
|
111
|
+
</xpl-dropdown-option>
|
|
112
|
+
</xpl-dropdown>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
`;
|
|
116
|
+
};
|
|
117
|
+
SimpleWithChildren.parameters = {
|
|
118
|
+
layout: 'centered',
|
|
119
|
+
'web-component': {
|
|
120
|
+
render: SimpleWithChildren,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
SimpleWithChildren.argTypes = {
|
|
124
|
+
mode: {
|
|
125
|
+
options: ['single', 'multi'],
|
|
126
|
+
control: {
|
|
127
|
+
type: 'select',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
SimpleWithChildren.args = {
|
|
132
|
+
closeOnSelect: false,
|
|
133
|
+
isOpen: true,
|
|
134
|
+
mode: 'single',
|
|
135
|
+
selectOnFocus: false,
|
|
136
|
+
};
|
|
137
|
+
export const Groups = ({ closeOnSelect, isOpen: open, mode, selectOnFocus, }) => {
|
|
138
|
+
const attributes = {
|
|
139
|
+
'close-on-select': closeOnSelect,
|
|
140
|
+
mode,
|
|
141
|
+
open,
|
|
142
|
+
'select-on-focus': selectOnFocus,
|
|
143
|
+
};
|
|
144
|
+
const options = [
|
|
145
|
+
{
|
|
146
|
+
label: 'Choice 1',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Choice 2',
|
|
150
|
+
isSelected: mode === 'multi' ? true : false,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
groupName: 'Group 1',
|
|
154
|
+
options: [
|
|
155
|
+
{
|
|
156
|
+
label: 'Choice 3',
|
|
157
|
+
isSelected: true,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: 'Choice 4',
|
|
161
|
+
isSelected: false,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
label: 'Choice 5',
|
|
165
|
+
isSelected: mode === 'multi' ? true : false,
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
groupName: 'Group 2',
|
|
171
|
+
options: [
|
|
172
|
+
{
|
|
173
|
+
label: 'Choice 6',
|
|
174
|
+
isSelected: mode === 'multi' ? true : false,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
label: 'Choice 7',
|
|
178
|
+
isSelected: mode === 'multi' ? true : false,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
label: 'Choice 8',
|
|
182
|
+
isSelected: false,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
];
|
|
187
|
+
return `
|
|
188
|
+
<div style="width:75vw">
|
|
189
|
+
<div style="position: relative; min-width: 200px; width: 100%">
|
|
190
|
+
<xpl-dropdown
|
|
191
|
+
id="xpl-dropdown-groups"
|
|
192
|
+
${Object.keys(attributes).reduce((acc, curr) => `${acc} ${curr}="${attributes[curr]}"`, '')}
|
|
193
|
+
>
|
|
194
|
+
</xpl-dropdown>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<script>
|
|
198
|
+
element = document.querySelector("#xpl-dropdown-groups");
|
|
199
|
+
element.options = ${JSON.stringify(options)}
|
|
200
|
+
</script>
|
|
201
|
+
`;
|
|
202
|
+
};
|
|
203
|
+
Groups.parameters = {
|
|
204
|
+
layout: 'centered',
|
|
205
|
+
'web-component': {
|
|
206
|
+
render: Groups,
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
Groups.argTypes = {
|
|
210
|
+
mode: {
|
|
211
|
+
options: ['single', 'multi'],
|
|
212
|
+
control: {
|
|
213
|
+
type: 'select',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
Groups.args = {
|
|
218
|
+
closeOnSelect: true,
|
|
219
|
+
isOpen: true,
|
|
220
|
+
mode: 'single',
|
|
221
|
+
selectOnFocus: false,
|
|
222
|
+
};
|
|
223
|
+
export const GroupsWithChildren = ({ closeOnSelect, isOpen: open, mode, selectOnFocus, }) => {
|
|
224
|
+
const attributes = {
|
|
225
|
+
'close-on-select': closeOnSelect,
|
|
226
|
+
mode,
|
|
227
|
+
open,
|
|
228
|
+
'select-on-focus': selectOnFocus,
|
|
229
|
+
};
|
|
230
|
+
return `
|
|
231
|
+
<div style="width:75vw">
|
|
232
|
+
<div style="position: relative; min-width: 200px; width: 100%">
|
|
233
|
+
<xpl-dropdown
|
|
234
|
+
id="xpl-dropdown-groups"
|
|
235
|
+
${Object.keys(attributes).reduce((acc, curr) => `${acc} ${curr}="${attributes[curr]}"`, '')}
|
|
236
|
+
>
|
|
237
|
+
<xpl-dropdown-group
|
|
238
|
+
label="Group Component Heading A"
|
|
239
|
+
slot="options"
|
|
240
|
+
>
|
|
241
|
+
<xpl-dropdown-option
|
|
242
|
+
label="Choice 1"
|
|
243
|
+
slot="options"
|
|
244
|
+
></xpl-dropdown-option>
|
|
245
|
+
<xpl-dropdown-option
|
|
246
|
+
label="Choice 2 (disabled)"
|
|
247
|
+
disabled
|
|
248
|
+
slot="options"
|
|
249
|
+
></xpl-dropdown-option>
|
|
250
|
+
<xpl-dropdown-heading
|
|
251
|
+
slot="options"
|
|
252
|
+
>
|
|
253
|
+
Sub Heading B
|
|
254
|
+
<svg
|
|
255
|
+
viewBox="0 0 16 16"
|
|
256
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
257
|
+
fill="black"
|
|
258
|
+
height="16"
|
|
259
|
+
>
|
|
260
|
+
<path
|
|
261
|
+
d="M10.7 5.3a.3.3 0 1 0 0 .7.3.3 0 0 0 0-.7Zm2.7-2.5a1 1 0 0 0-1 .1l-.9.8h-.3l-.9-.8a1 1 0 0 0-1.6.8V6.3l-1 .1c-1.4.2-2.6 1-3.4 2V6.5c0-1-.8-1.8-1.8-1.8a.5.5 0 1 0 0 1c.5 0 .8.4.8.9V11c0 1.5.9 2.3 1.9 2.3H9c.2 0 .3-.1.3-.3 0-.4-.3-.7-.6-.7h-.4V12l1.7-1v1.8c0 .3.3.6.7.6H12c.4 0 .7-.3.7-.6V8.3C13.5 7.8 14 7 14 6V3.7a1 1 0 0 0-.6-1Zm-1.7 9.5H11v-2a.7.7 0 0 0-1-.6L8 11c-.3-.5-.6-1-1.1-1.3-.2-.1-.4 0-.5.1l-.1.3c-.1.1-.1.3 0 .4.6.5 1 1.2 1 2H5.2a.8.8 0 0 1-.9-.9c0-2 1.5-3.8 3.6-4.1l1-.2c.5.9 1.4 1.5 2.4 1.5h.4v3.6ZM13 6a1.7 1.7 0 0 1-3.3 0V3.7l1 1H12l1.1-1V6Zm-1.3-.3a.3.3 0 1 0 .6 0 .3.3 0 0 0-.6 0Z"
|
|
262
|
+
/>
|
|
263
|
+
</svg>
|
|
264
|
+
</xpl-dropdown-heading>
|
|
265
|
+
<xpl-dropdown-option
|
|
266
|
+
label="Choice 3 (selected)"
|
|
267
|
+
selected
|
|
268
|
+
slot="options"
|
|
269
|
+
></xpl-dropdown-option>
|
|
270
|
+
</xpl-dropdown-group>
|
|
271
|
+
</xpl-dropdown>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
`;
|
|
275
|
+
};
|
|
276
|
+
GroupsWithChildren.parameters = {
|
|
277
|
+
layout: 'centered',
|
|
278
|
+
'web-component': {
|
|
279
|
+
render: GroupsWithChildren,
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
GroupsWithChildren.argTypes = {
|
|
283
|
+
mode: {
|
|
284
|
+
options: ['single', 'multi'],
|
|
285
|
+
control: {
|
|
286
|
+
type: 'select',
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
GroupsWithChildren.args = {
|
|
291
|
+
closeOnSelect: true,
|
|
292
|
+
isOpen: true,
|
|
293
|
+
mode: 'single',
|
|
294
|
+
selectOnFocus: false,
|
|
295
|
+
};
|
|
296
|
+
export const OptionSubcomponent = ({ isDisabled: disabled, label, isSelected: selected, }) => {
|
|
297
|
+
const attributes = { disabled, selected };
|
|
298
|
+
return `
|
|
299
|
+
<xpl-dropdown-option
|
|
300
|
+
label="${label}"
|
|
301
|
+
${Object.keys(attributes).reduce((acc, curr) => `${acc} ${curr}="${attributes[curr]}"`, '')}
|
|
302
|
+
></xpl-dropdown-option>
|
|
303
|
+
`;
|
|
304
|
+
};
|
|
305
|
+
OptionSubcomponent.parameters = {
|
|
306
|
+
layout: 'centered',
|
|
307
|
+
'web-component': {
|
|
308
|
+
render: OptionSubcomponent,
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
OptionSubcomponent.args = {
|
|
312
|
+
isSelected: false,
|
|
313
|
+
isDisabled: false,
|
|
314
|
+
label: 'Choice 1',
|
|
315
|
+
};
|
|
316
|
+
export const HeadingSubcomponent = ({ label, }) => {
|
|
317
|
+
return `
|
|
318
|
+
<xpl-dropdown-heading
|
|
319
|
+
label="${label}"
|
|
320
|
+
></xpl-dropdown-heading>
|
|
321
|
+
`;
|
|
322
|
+
};
|
|
323
|
+
HeadingSubcomponent.parameters = {
|
|
324
|
+
layout: 'centered',
|
|
325
|
+
'web-component': {
|
|
326
|
+
render: HeadingSubcomponent,
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
HeadingSubcomponent.args = {
|
|
330
|
+
label: 'Choice 1',
|
|
331
|
+
};
|
|
332
|
+
export const GroupSubComponent = ({ groupName, }) => {
|
|
333
|
+
const options = [
|
|
334
|
+
{
|
|
335
|
+
label: 'Choice 1',
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
label: 'Choice 2',
|
|
339
|
+
isSelected: true,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
label: 'Choice 3 (disabled example)',
|
|
343
|
+
isDisabled: true,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
label: 'Choice 4',
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
label: 'Choice 5',
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
label: 'Choice 6',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
label: 'Choice 7',
|
|
356
|
+
},
|
|
357
|
+
];
|
|
358
|
+
return `
|
|
359
|
+
<xpl-dropdown-group
|
|
360
|
+
id="xpl-option-group"
|
|
361
|
+
label="${groupName}"
|
|
362
|
+
></xpl-dropdown-group>
|
|
363
|
+
<script>
|
|
364
|
+
element = document.querySelector("#xpl-option-group");
|
|
365
|
+
element.options = ${JSON.stringify(options)}
|
|
366
|
+
</script>
|
|
367
|
+
`;
|
|
368
|
+
};
|
|
369
|
+
GroupSubComponent.parameters = {
|
|
370
|
+
layout: 'centered',
|
|
371
|
+
'web-component': {
|
|
372
|
+
render: GroupSubComponent,
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
GroupSubComponent.args = {
|
|
376
|
+
groupName: 'Choice 1',
|
|
377
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Grid',
|
|
3
|
+
argTypes: {
|
|
4
|
+
unit1Lg: { control: { type: 'number' } },
|
|
5
|
+
unit1Md: { control: { type: 'number' } },
|
|
6
|
+
unit1Sm: { control: { type: 'number' } },
|
|
7
|
+
unit1Xs: { control: { type: 'number' } },
|
|
8
|
+
unit2Lg: { control: { type: 'number' } },
|
|
9
|
+
unit2Md: { control: { type: 'number' } },
|
|
10
|
+
unit2Sm: { control: { type: 'number' } },
|
|
11
|
+
unit2Xs: { control: { type: 'number' } },
|
|
12
|
+
unit3Lg: { control: { type: 'number' } },
|
|
13
|
+
unit3Md: { control: { type: 'number' } },
|
|
14
|
+
unit3Sm: { control: { type: 'number' } },
|
|
15
|
+
unit3Xs: { control: { type: 'number' } },
|
|
16
|
+
unit4Lg: { control: { type: 'number' } },
|
|
17
|
+
unit4Md: { control: { type: 'number' } },
|
|
18
|
+
unit4Sm: { control: { type: 'number' } },
|
|
19
|
+
unit4Xs: { control: { type: 'number' } },
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export const Grid = ({ unit1Lg, unit1Md, unit1Sm, unit1Xs, unit2Lg, unit2Md, unit2Sm, unit2Xs, unit3Lg, unit3Md, unit3Sm, unit3Xs, unit4Lg, unit4Md, unit4Sm, unit4Xs, }) => {
|
|
23
|
+
return `<xpl-grid>
|
|
24
|
+
<xpl-grid-item lg="${unit1Lg}" md="${unit1Md}" sm="${unit1Sm}" xs="${unit1Xs}" style="border: 1px solid red;">
|
|
25
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut scelerisque, diam non vulputate pretium, metus lectus vulputate purus, nec laoreet lectus enim vitae ipsum. Phasellus molestie luctus egestas.
|
|
26
|
+
</xpl-grid-item>
|
|
27
|
+
<xpl-grid-item lg="${unit2Lg}" md="${unit2Md}" sm="${unit2Sm}" xs="${unit2Xs}" style="border: 1px solid red;">
|
|
28
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut scelerisque, diam non vulputate pretium, metus lectus vulputate purus, nec laoreet lectus enim vitae ipsum. Phasellus molestie luctus egestas.
|
|
29
|
+
</xpl-grid-item>
|
|
30
|
+
<xpl-grid-item lg="${unit3Lg}" md="${unit3Md}" sm="${unit3Sm}" xs="${unit3Xs}" style="border: 1px solid red;">
|
|
31
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut scelerisque, diam non vulputate pretium, metus lectus vulputate purus, nec laoreet lectus enim vitae ipsum. Phasellus molestie luctus egestas.
|
|
32
|
+
</xpl-grid-item>
|
|
33
|
+
<xpl-grid-item lg="${unit4Lg}" md="${unit4Md}" sm="${unit4Sm}" xs="${unit4Xs}" style="border: 1px solid red;">
|
|
34
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut scelerisque, diam non vulputate pretium, metus lectus vulputate purus, nec laoreet lectus enim vitae ipsum. Phasellus molestie luctus egestas.
|
|
35
|
+
</xpl-grid-item>
|
|
36
|
+
</xpl-grid>`;
|
|
37
|
+
};
|
|
38
|
+
Grid.parameters = {
|
|
39
|
+
layout: 'centered',
|
|
40
|
+
'web-component': {
|
|
41
|
+
render({ unit1Lg, unit1Md, unit1Sm, unit1Xs, unit2Lg, unit2Md, unit2Sm, unit2Xs, unit3Lg, unit3Md, unit3Sm, unit3Xs, unit4Lg, unit4Md, unit4Sm, unit4Xs, }) {
|
|
42
|
+
return `<xpl-grid>
|
|
43
|
+
<xpl-grid-item lg="${unit1Lg}" md="${unit1Md}" sm="${unit1Sm}" xs="${unit1Xs}">
|
|
44
|
+
Lorem ipsum...
|
|
45
|
+
</xpl-grid-item>
|
|
46
|
+
<xpl-grid-item lg="${unit2Lg}" md="${unit2Md}" sm="${unit2Sm}" xs="${unit2Xs}">
|
|
47
|
+
Lorem ipsum...
|
|
48
|
+
</xpl-grid-item>
|
|
49
|
+
<xpl-grid-item lg="${unit3Lg}" md="${unit3Md}" sm="${unit3Sm}" xs="${unit3Xs}">
|
|
50
|
+
Lorem ipsum...
|
|
51
|
+
</xpl-grid-item>
|
|
52
|
+
<xpl-grid-item lg="${unit4Lg}" md="${unit4Md}" sm="${unit4Sm}" xs="${unit4Xs}">
|
|
53
|
+
Lorem ipsum...
|
|
54
|
+
</xpl-grid-item>
|
|
55
|
+
</xpl-grid>`;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
html: {
|
|
59
|
+
render() {
|
|
60
|
+
// const columns = layout.split(",").map(c => +c);
|
|
61
|
+
// return `<div class="xpl-grid" id="grid-id">
|
|
62
|
+
// <style>
|
|
63
|
+
// @media screen and (max-width: ${breakpoint}px) {
|
|
64
|
+
// #grid-id {
|
|
65
|
+
// display: block;
|
|
66
|
+
// }
|
|
67
|
+
// #grid-id [class^="xpl-grid__col"] {
|
|
68
|
+
// margin-bottom: 1.5rem;
|
|
69
|
+
// margin-right: 0;
|
|
70
|
+
// width: 100%;
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
// </style>${columns.map(c => {
|
|
74
|
+
// return `
|
|
75
|
+
// <div class="xpl-grid__col-${c}">
|
|
76
|
+
// Lorem ipsum...
|
|
77
|
+
// </div>`;
|
|
78
|
+
// }).join("")}
|
|
79
|
+
// </div>`
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
Grid.args = {
|
|
84
|
+
unit1Lg: 4,
|
|
85
|
+
unit1Md: 3,
|
|
86
|
+
unit1Sm: 3,
|
|
87
|
+
unit1Xs: 6,
|
|
88
|
+
unit2Lg: 2,
|
|
89
|
+
unit2Md: 3,
|
|
90
|
+
unit2Sm: 3,
|
|
91
|
+
unit2Xs: 6,
|
|
92
|
+
unit3Lg: 2,
|
|
93
|
+
unit3Md: 3,
|
|
94
|
+
unit3Sm: 6,
|
|
95
|
+
unit3Xs: 6,
|
|
96
|
+
unit4Lg: 4,
|
|
97
|
+
unit4Md: 3,
|
|
98
|
+
unit4Sm: 6,
|
|
99
|
+
unit4Xs: 6,
|
|
100
|
+
};
|