@3t-transform/threeteeui 0.0.6 → 0.0.7
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/cjs/{index-8a7479e4.js → index-253ca97c.js} +239 -415
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/tttx-button.cjs.entry.js +28 -0
- package/dist/cjs/tttx-checkbox.cjs.entry.js +28 -0
- package/dist/cjs/tttx-form.cjs.entry.js +58 -0
- package/dist/cjs/tttx-single-input.cjs.entry.js +44 -0
- package/dist/cjs/tttx-text-box.cjs.entry.js +38 -0
- package/dist/cjs/tttx.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +7 -5
- package/dist/collection/components/atoms/tttx-button/tttx-button.css +61 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +93 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +30 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.css +142 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.js +259 -0
- package/dist/collection/components/atoms/tttx-single-input/tttx-single-input.stories.js +92 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.css +142 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.js +150 -0
- package/dist/collection/components/atoms/tttx-text-box/tttx-text-box.stories.js +17 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.css +138 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.js +101 -0
- package/dist/collection/components/atoms/ttx-checkbox/tttx-checkbox.stories.js +13 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +109 -0
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +37 -0
- package/dist/collection/icons.js +2838 -0
- package/dist/components/index.d.ts +14 -3
- package/dist/components/index.js +6 -4
- package/dist/components/{tttx-page.d.ts → tttx-button.d.ts} +4 -4
- package/dist/components/tttx-button.js +45 -0
- package/dist/components/{tttx-worksheet.d.ts → tttx-checkbox.d.ts} +4 -4
- package/dist/components/tttx-checkbox.js +46 -0
- package/dist/components/{tttx-icon.d.ts → tttx-form.d.ts} +4 -4
- package/dist/components/tttx-form.js +75 -0
- package/dist/components/tttx-single-input.d.ts +11 -0
- package/dist/components/tttx-single-input.js +71 -0
- package/dist/components/tttx-text-box.d.ts +11 -0
- package/dist/components/tttx-text-box.js +59 -0
- package/dist/esm/{index-854ff56f.js → index-fcca6c58.js} +237 -416
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/tttx-button.entry.js +24 -0
- package/dist/esm/tttx-checkbox.entry.js +24 -0
- package/dist/esm/tttx-form.entry.js +54 -0
- package/dist/esm/tttx-single-input.entry.js +40 -0
- package/dist/esm/tttx-text-box.entry.js +34 -0
- package/dist/esm/tttx.js +4 -3
- package/dist/tttx/p-05d7d002.entry.js +1 -0
- package/dist/tttx/p-40709c59.entry.js +1 -0
- package/dist/tttx/p-64703252.entry.js +1 -0
- package/dist/tttx/p-8d1f2e5c.entry.js +1 -0
- package/dist/tttx/p-9bf836ed.entry.js +1 -0
- package/dist/tttx/p-a7b95fd2.js +2 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +9 -0
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +20 -0
- package/dist/types/components/atoms/tttx-single-input/tttx-single-input.d.ts +20 -0
- package/dist/types/components/atoms/tttx-single-input/tttx-single-input.stories.d.ts +27 -0
- package/dist/types/components/atoms/tttx-text-box/tttx-text-box.d.ts +14 -0
- package/dist/types/components/atoms/tttx-text-box/tttx-text-box.stories.d.ts +6 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.d.ts +9 -0
- package/dist/types/components/atoms/ttx-checkbox/tttx-checkbox.stories.d.ts +6 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +11 -0
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +6 -0
- package/dist/types/components.d.ts +128 -51
- package/dist/types/icons.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/loader/index.d.ts +9 -0
- package/package.json +58 -59
- package/readme.md +1 -6
- package/dist/cjs/toolbar-656be6e6.js +0 -34259
- package/dist/cjs/tttx-icon.cjs.entry.js +0 -21
- package/dist/cjs/tttx-page.cjs.entry.js +0 -927
- package/dist/cjs/tttx-worksheet.cjs.entry.js +0 -47
- package/dist/collection/components/components/tttx-icon/tttx-icon.css +0 -89
- package/dist/collection/components/components/tttx-icon/tttx-icon.js +0 -59
- package/dist/collection/components/components/tttx-icon/tttx-icon.stories.js +0 -40
- package/dist/collection/components/patterns/tttx-page/tttx-page.css +0 -162
- package/dist/collection/components/patterns/tttx-page/tttx-page.js +0 -213
- package/dist/collection/components/patterns/tttx-page/tttx-page.stories.js +0 -80
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.css +0 -134
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.js +0 -70
- package/dist/collection/components/patterns/tttx-worksheet/tttx-worksheet.stories.js +0 -44
- package/dist/components/tttx-icon.js +0 -37
- package/dist/components/tttx-page.js +0 -953
- package/dist/components/tttx-worksheet.js +0 -6
- package/dist/components/tttx-worksheet2.js +0 -34288
- package/dist/esm/toolbar-cede4385.js +0 -34231
- package/dist/esm/tttx-icon.entry.js +0 -17
- package/dist/esm/tttx-page.entry.js +0 -923
- package/dist/esm/tttx-worksheet.entry.js +0 -43
- package/dist/tttx/p-4b57de2e.entry.js +0 -1
- package/dist/tttx/p-61f78304.entry.js +0 -1
- package/dist/tttx/p-7244abd4.entry.js +0 -1
- package/dist/tttx/p-d038fe18.js +0 -1
- package/dist/tttx/p-ddfeb0ba.js +0 -2
- package/dist/tttx/tttx.css +0 -1
- package/dist/types/components/components/tttx-icon/tttx-icon.d.ts +0 -5
- package/dist/types/components/components/tttx-icon/tttx-icon.stories.d.ts +0 -24
- package/dist/types/components/patterns/tttx-page/tttx-page.d.ts +0 -21
- package/dist/types/components/patterns/tttx-page/tttx-page.stories.d.ts +0 -48
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.d.ts +0 -9
- package/dist/types/components/patterns/tttx-worksheet/tttx-worksheet.stories.d.ts +0 -23
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-8a7479e4.js');
|
|
6
|
-
const toolbar = require('./toolbar-656be6e6.js');
|
|
7
|
-
|
|
8
|
-
const tttxWorksheetCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto&display=swap\");*{box-sizing:border-box}.flex-start{justify-content:start}.flex-end{justify-content:end}.flex-centre{justify-content:center}[class^=col-]{display:flex;padding-left:8px !important;padding-right:8px !important}h1,h2,h3,h4,h5,h6,p,label,small{margin:0;padding:0}h1,h2,h3,h4,h5,h6,p,label{display:block}*{font-family:\"Roboto\", sans-serif}html,body{font-weight:normal;font-size:16px}h1{font-weight:700;font-size:24px}h2{font-weight:700;font-size:20px}h3{font-weight:700;font-size:18px}h4{font-weight:normal;font-size:14px;text-transform:uppercase}button{font-weight:500;font-size:14px;text-transform:uppercase}small{font-weight:normal;font-size:14px}label{font-weight:700;font-size:16px}:host{display:block}.worksheet__container,.worksheet__container--large,.worksheet__container--medium,.worksheet__container--small{position:absolute;top:104px;bottom:8px;left:0px;right:0px;overflow:auto;background-color:#ffffff;clear:both}.worksheet__container,.worksheet__container--medium,.worksheet__container--small,.worksheet__footer--medium,.worksheet__footer--small{margin:0px auto}.worksheet__container--large{margin:0px 16px}.worksheet__container--medium{width:900px}.worksheet__container--small{width:600px}.worksheet__footer--medium.dx-toolbar,.worksheet__footer--small.dx-toolbar{position:fixed;bottom:0px;left:0px;right:0px;padding:0 8px}.worksheet__footer--medium.dx-toolbar{width:900px}.worksheet__footer--small.dx-toolbar{width:600px}";
|
|
9
|
-
|
|
10
|
-
const TttxWorksheet = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.pageSize = 'large';
|
|
14
|
-
}
|
|
15
|
-
componentDidLoad() {
|
|
16
|
-
this.footer();
|
|
17
|
-
}
|
|
18
|
-
pageSizeIsNumeric() {
|
|
19
|
-
return /^\d+$/.test(this.pageSize);
|
|
20
|
-
}
|
|
21
|
-
pageSizeClasses(baseClassName) {
|
|
22
|
-
return this.pageSizeIsNumeric() ? baseClassName : `${baseClassName}--${this.pageSize}`;
|
|
23
|
-
}
|
|
24
|
-
footer() {
|
|
25
|
-
if (!['medium', 'small'].includes(this.pageSize)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
new toolbar.Toolbar(this.footerBar, {
|
|
29
|
-
items: [
|
|
30
|
-
{
|
|
31
|
-
location: 'after',
|
|
32
|
-
widget: toolbar.Button,
|
|
33
|
-
options: {
|
|
34
|
-
text: 'save'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
const customPageWidth = this.pageSizeIsNumeric() ? { width: `${this.pageSize}px` } : {};
|
|
42
|
-
return (index.h(index.Host, null, index.h("div", { class: this.pageSizeClasses('worksheet__container'), style: Object.assign({}, customPageWidth) }, index.h("slot", null), index.h("div", { class: `worksheet__footer--${this.pageSize}`, ref: el => (this.footerBar = el) }))));
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
TttxWorksheet.style = tttxWorksheetCss;
|
|
46
|
-
|
|
47
|
-
exports.tttx_worksheet = TttxWorksheet;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
|
|
2
|
-
@import url("https://fonts.googleapis.com/css2?family=Material+Icons+Round");
|
|
3
|
-
* {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.flex-start {
|
|
8
|
-
justify-content: start;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.flex-end {
|
|
12
|
-
justify-content: end;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.flex-centre {
|
|
16
|
-
justify-content: center;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[class^=col-] {
|
|
20
|
-
display: flex;
|
|
21
|
-
/* we need to overright bootstrap to get the buttering we want */
|
|
22
|
-
padding-left: 8px !important;
|
|
23
|
-
padding-right: 8px !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h1, h2, h3, h4, h5, h6, p, label, small {
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
h1, h2, h3, h4, h5, h6, p, label {
|
|
32
|
-
display: block;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
* {
|
|
36
|
-
font-family: "Roboto", sans-serif;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
html,
|
|
40
|
-
body {
|
|
41
|
-
font-weight: normal;
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
h1 {
|
|
46
|
-
font-weight: 700;
|
|
47
|
-
font-size: 24px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
h2 {
|
|
51
|
-
font-weight: 700;
|
|
52
|
-
font-size: 20px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
h3 {
|
|
56
|
-
font-weight: 700;
|
|
57
|
-
font-size: 18px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
h4 {
|
|
61
|
-
font-weight: normal;
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
text-transform: uppercase;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
button {
|
|
67
|
-
font-weight: 500;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
text-transform: uppercase;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
small {
|
|
73
|
-
font-weight: normal;
|
|
74
|
-
font-size: 14px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
label {
|
|
78
|
-
font-weight: 700;
|
|
79
|
-
font-size: 16px;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
:host {
|
|
83
|
-
display: block;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.material-icons-round {
|
|
87
|
-
vertical-align: -6px;
|
|
88
|
-
color: var(--ui-color-lt);
|
|
89
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
export class TttxIcon {
|
|
3
|
-
constructor() {
|
|
4
|
-
this.name = undefined;
|
|
5
|
-
this.color = undefined;
|
|
6
|
-
}
|
|
7
|
-
render() {
|
|
8
|
-
return (h("span", { class: "material-icons-round", style: { color: this.color } }, this.name));
|
|
9
|
-
}
|
|
10
|
-
static get is() { return "tttx-icon"; }
|
|
11
|
-
static get originalStyleUrls() {
|
|
12
|
-
return {
|
|
13
|
-
"$": ["tttx-icon.scss"]
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
static get styleUrls() {
|
|
17
|
-
return {
|
|
18
|
-
"$": ["tttx-icon.css"]
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
static get properties() {
|
|
22
|
-
return {
|
|
23
|
-
"name": {
|
|
24
|
-
"type": "string",
|
|
25
|
-
"mutable": false,
|
|
26
|
-
"complexType": {
|
|
27
|
-
"original": "string",
|
|
28
|
-
"resolved": "string",
|
|
29
|
-
"references": {}
|
|
30
|
-
},
|
|
31
|
-
"required": false,
|
|
32
|
-
"optional": false,
|
|
33
|
-
"docs": {
|
|
34
|
-
"tags": [],
|
|
35
|
-
"text": ""
|
|
36
|
-
},
|
|
37
|
-
"attribute": "name",
|
|
38
|
-
"reflect": false
|
|
39
|
-
},
|
|
40
|
-
"color": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"mutable": false,
|
|
43
|
-
"complexType": {
|
|
44
|
-
"original": "string",
|
|
45
|
-
"resolved": "string",
|
|
46
|
-
"references": {}
|
|
47
|
-
},
|
|
48
|
-
"required": false,
|
|
49
|
-
"optional": true,
|
|
50
|
-
"docs": {
|
|
51
|
-
"tags": [],
|
|
52
|
-
"text": ""
|
|
53
|
-
},
|
|
54
|
-
"attribute": "color",
|
|
55
|
-
"reflect": false
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import './icon-button.css';
|
|
2
|
-
export default {
|
|
3
|
-
title: 'Components/Icon',
|
|
4
|
-
argTypes: {
|
|
5
|
-
name: {
|
|
6
|
-
options: [
|
|
7
|
-
'check_circle',
|
|
8
|
-
'report_problem',
|
|
9
|
-
'report',
|
|
10
|
-
'menu',
|
|
11
|
-
'thumb_up'
|
|
12
|
-
],
|
|
13
|
-
control: {
|
|
14
|
-
type: 'select'
|
|
15
|
-
},
|
|
16
|
-
defaultValue: 'check_circle',
|
|
17
|
-
description: 'The name of the icon. Exhaustive list can be found in the [Google Material Icons guide](https://fonts.google.com/icons?icon.style=Rounded&icon.set=Material+Icons)'
|
|
18
|
-
},
|
|
19
|
-
color: {
|
|
20
|
-
control: {
|
|
21
|
-
type: 'color'
|
|
22
|
-
},
|
|
23
|
-
description: 'The colour to apply to the icon. Accepts any CSS color attribute.'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
const Template = (args) => `
|
|
28
|
-
<tttx-icon name='${args.name}' ${args.color ? `color='${args.color}' ` : ''}/>
|
|
29
|
-
`;
|
|
30
|
-
export const Default = Template.bind({});
|
|
31
|
-
export const WithElements = (args) => `
|
|
32
|
-
<tttx-icon name='${args.name}'${args.color ? ` color='${args.color}'` : ''}></tttx-icon>
|
|
33
|
-
<div style='display: inline'>Inline element beside icon</div>
|
|
34
|
-
<div>Block element below Icon</div>
|
|
35
|
-
`;
|
|
36
|
-
export const Button = (args) => `
|
|
37
|
-
<button class='icon-example__button'>
|
|
38
|
-
<tttx-icon name='${args.name}' ${args.color ? `color='${args.color}' ` : ''}/>
|
|
39
|
-
</button>
|
|
40
|
-
`;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css?family=Roboto&display=swap");
|
|
2
|
-
* {
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.flex-start {
|
|
7
|
-
justify-content: start;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.flex-end {
|
|
11
|
-
justify-content: end;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.flex-centre {
|
|
15
|
-
justify-content: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
[class^=col-] {
|
|
19
|
-
display: flex;
|
|
20
|
-
/* we need to overright bootstrap to get the buttering we want */
|
|
21
|
-
padding-left: 8px !important;
|
|
22
|
-
padding-right: 8px !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
h1, h2, h3, h4, h5, h6, p, label, small {
|
|
26
|
-
margin: 0;
|
|
27
|
-
padding: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h1, h2, h3, h4, h5, h6, p, label {
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
* {
|
|
35
|
-
font-family: "Roboto", sans-serif;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
html,
|
|
39
|
-
body {
|
|
40
|
-
font-weight: normal;
|
|
41
|
-
font-size: 16px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
h1 {
|
|
45
|
-
font-weight: 700;
|
|
46
|
-
font-size: 24px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
h2 {
|
|
50
|
-
font-weight: 700;
|
|
51
|
-
font-size: 20px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
h3 {
|
|
55
|
-
font-weight: 700;
|
|
56
|
-
font-size: 18px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
h4 {
|
|
60
|
-
font-weight: normal;
|
|
61
|
-
font-size: 14px;
|
|
62
|
-
text-transform: uppercase;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
button {
|
|
66
|
-
font-weight: 500;
|
|
67
|
-
font-size: 14px;
|
|
68
|
-
text-transform: uppercase;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
small {
|
|
72
|
-
font-weight: normal;
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
label {
|
|
77
|
-
font-weight: 700;
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host {
|
|
82
|
-
display: block;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.page {
|
|
86
|
-
background-color: #F0F0F0;
|
|
87
|
-
width: 100%;
|
|
88
|
-
height: 100%;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.page__platform-bar.dx-toolbar {
|
|
92
|
-
position: fixed;
|
|
93
|
-
top: 0px;
|
|
94
|
-
left: 0px;
|
|
95
|
-
right: 0px;
|
|
96
|
-
background-color: #142748;
|
|
97
|
-
color: #ffffff;
|
|
98
|
-
font-size: 24px;
|
|
99
|
-
padding: 0 8px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.page__title-bar__container,
|
|
103
|
-
.page__title-bar__container--large,
|
|
104
|
-
.page__title-bar__container--medium,
|
|
105
|
-
.page__title-bar__container--small {
|
|
106
|
-
position: fixed;
|
|
107
|
-
top: 52px;
|
|
108
|
-
left: 0px;
|
|
109
|
-
right: 0px;
|
|
110
|
-
}
|
|
111
|
-
.page__title-bar__container .dx-toolbar,
|
|
112
|
-
.page__title-bar__container--large .dx-toolbar,
|
|
113
|
-
.page__title-bar__container--medium .dx-toolbar,
|
|
114
|
-
.page__title-bar__container--small .dx-toolbar {
|
|
115
|
-
color: #212121;
|
|
116
|
-
background-color: #F0F0F0;
|
|
117
|
-
font-size: 24px;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.page__title-bar__container,
|
|
121
|
-
.page__title-bar__container--medium,
|
|
122
|
-
.page__title-bar__container--small {
|
|
123
|
-
margin: 0px auto;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.page__title-bar__container--large {
|
|
127
|
-
margin: 0px 16px;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.page__title-bar__container--medium {
|
|
131
|
-
width: 900px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.page__title-bar__container--small {
|
|
135
|
-
width: 600px;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.page__title-bar__after-container__label {
|
|
139
|
-
font-size: 14px;
|
|
140
|
-
color: #757575;
|
|
141
|
-
font-weight: 300;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.page__title-bar__after-container__value {
|
|
145
|
-
font-size: 14px;
|
|
146
|
-
color: #111111;
|
|
147
|
-
font-weight: 400;
|
|
148
|
-
margin: 0 10px 0 0;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.page__platform-bar__button .dx-button-mode-text .dx-icon {
|
|
152
|
-
color: white;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.page__platform-bar__button__dropdown-options .dx-dropdownbutton-content .dx-list .dx-list-item:last-of-type::before {
|
|
156
|
-
width: 90%;
|
|
157
|
-
margin: auto 5%;
|
|
158
|
-
height: 1px;
|
|
159
|
-
content: "";
|
|
160
|
-
position: absolute;
|
|
161
|
-
background: grey;
|
|
162
|
-
}
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
import dxToolbar from 'devextreme/esm/ui/toolbar';
|
|
3
|
-
import dxDropDownButton from 'devextreme/esm/ui/drop_down_button';
|
|
4
|
-
import dxButton from 'devextreme/esm/ui/button';
|
|
5
|
-
export class TttxPage {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.appName = undefined;
|
|
8
|
-
this.pageTitle = undefined;
|
|
9
|
-
this.lastUpdated = undefined;
|
|
10
|
-
this.manageAccountsUrl = undefined;
|
|
11
|
-
this.logoutUrl = undefined;
|
|
12
|
-
this.pageSize = 'large';
|
|
13
|
-
this.helpUrl = undefined;
|
|
14
|
-
}
|
|
15
|
-
componentDidLoad() {
|
|
16
|
-
new dxToolbar(this.platformBar, {
|
|
17
|
-
items: [
|
|
18
|
-
{
|
|
19
|
-
location: 'before',
|
|
20
|
-
locateInMenu: 'never',
|
|
21
|
-
text: this.appName
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
location: 'after',
|
|
25
|
-
widget: dxDropDownButton,
|
|
26
|
-
cssClass: 'page__platform-bar__button',
|
|
27
|
-
options: {
|
|
28
|
-
icon: 'overflow',
|
|
29
|
-
keyExpr: 'id',
|
|
30
|
-
displayExpr: 'text',
|
|
31
|
-
stylingMode: 'text',
|
|
32
|
-
showArrowIcon: false,
|
|
33
|
-
dropDownOptions: { width: '200', wrapperAttr: { class: 'page__platform-bar__button__dropdown-options' } },
|
|
34
|
-
items: this.platformBarButtonItems()
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
});
|
|
39
|
-
new dxToolbar(this.pageTitleBar, {
|
|
40
|
-
items: [
|
|
41
|
-
{
|
|
42
|
-
location: 'before',
|
|
43
|
-
text: this.pageTitle
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
location: 'after',
|
|
47
|
-
html: `<span class='page__title-bar__after-container__label'>Last updated</span> <span class='page__title-bar__after-container__value'>${this.lastUpdated}</span>`
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
location: 'after',
|
|
51
|
-
widget: dxButton,
|
|
52
|
-
options: {
|
|
53
|
-
text: 'help',
|
|
54
|
-
icon: 'help',
|
|
55
|
-
stylingMode: 'outlined',
|
|
56
|
-
onClick: () => { window.open(this.helpUrl, '_blank'); }
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
platformBarButtonItems() {
|
|
63
|
-
return [
|
|
64
|
-
{ id: 1, text: 'Manage Accounts', icon: "user", onClick: () => { window.open(this.manageAccountsUrl, '_blank'); } },
|
|
65
|
-
{ id: 2, text: 'Logout', icon: "runner", onClick: () => { window.location.href = this.logoutUrl; } }
|
|
66
|
-
];
|
|
67
|
-
}
|
|
68
|
-
pageSizeIsNumeric() {
|
|
69
|
-
return /^\d+$/.test(this.pageSize);
|
|
70
|
-
}
|
|
71
|
-
pageSizeClasses(baseClassName) {
|
|
72
|
-
return this.pageSizeIsNumeric() ? baseClassName : `${baseClassName}--${this.pageSize}`;
|
|
73
|
-
}
|
|
74
|
-
render() {
|
|
75
|
-
const customPageWidth = this.pageSizeIsNumeric ? { width: `${this.pageSize}px` } : {};
|
|
76
|
-
return (h(Host, { style: { margin: '0px', overflow: 'hidden' } }, h("div", { class: "page" }, h("div", { class: 'page__platform-bar', ref: el => (this.platformBar = el) }), h("div", { class: this.pageSizeClasses('page__title-bar__container'), style: Object.assign({}, customPageWidth) }, h("div", { ref: el => (this.pageTitleBar = el) })), h("tttx-worksheet", { pageSize: this.pageSize }, h("slot", null)))));
|
|
77
|
-
}
|
|
78
|
-
static get is() { return "tttx-page"; }
|
|
79
|
-
static get originalStyleUrls() {
|
|
80
|
-
return {
|
|
81
|
-
"$": ["tttx-page.scss"]
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
static get styleUrls() {
|
|
85
|
-
return {
|
|
86
|
-
"$": ["tttx-page.css"]
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
static get properties() {
|
|
90
|
-
return {
|
|
91
|
-
"appName": {
|
|
92
|
-
"type": "string",
|
|
93
|
-
"mutable": false,
|
|
94
|
-
"complexType": {
|
|
95
|
-
"original": "string",
|
|
96
|
-
"resolved": "string",
|
|
97
|
-
"references": {}
|
|
98
|
-
},
|
|
99
|
-
"required": false,
|
|
100
|
-
"optional": false,
|
|
101
|
-
"docs": {
|
|
102
|
-
"tags": [],
|
|
103
|
-
"text": ""
|
|
104
|
-
},
|
|
105
|
-
"attribute": "app-name",
|
|
106
|
-
"reflect": false
|
|
107
|
-
},
|
|
108
|
-
"pageTitle": {
|
|
109
|
-
"type": "string",
|
|
110
|
-
"mutable": false,
|
|
111
|
-
"complexType": {
|
|
112
|
-
"original": "string",
|
|
113
|
-
"resolved": "string",
|
|
114
|
-
"references": {}
|
|
115
|
-
},
|
|
116
|
-
"required": false,
|
|
117
|
-
"optional": false,
|
|
118
|
-
"docs": {
|
|
119
|
-
"tags": [],
|
|
120
|
-
"text": ""
|
|
121
|
-
},
|
|
122
|
-
"attribute": "page-title",
|
|
123
|
-
"reflect": false
|
|
124
|
-
},
|
|
125
|
-
"lastUpdated": {
|
|
126
|
-
"type": "string",
|
|
127
|
-
"mutable": false,
|
|
128
|
-
"complexType": {
|
|
129
|
-
"original": "string",
|
|
130
|
-
"resolved": "string",
|
|
131
|
-
"references": {}
|
|
132
|
-
},
|
|
133
|
-
"required": false,
|
|
134
|
-
"optional": false,
|
|
135
|
-
"docs": {
|
|
136
|
-
"tags": [],
|
|
137
|
-
"text": ""
|
|
138
|
-
},
|
|
139
|
-
"attribute": "last-updated",
|
|
140
|
-
"reflect": false
|
|
141
|
-
},
|
|
142
|
-
"manageAccountsUrl": {
|
|
143
|
-
"type": "string",
|
|
144
|
-
"mutable": false,
|
|
145
|
-
"complexType": {
|
|
146
|
-
"original": "string",
|
|
147
|
-
"resolved": "string",
|
|
148
|
-
"references": {}
|
|
149
|
-
},
|
|
150
|
-
"required": false,
|
|
151
|
-
"optional": false,
|
|
152
|
-
"docs": {
|
|
153
|
-
"tags": [],
|
|
154
|
-
"text": ""
|
|
155
|
-
},
|
|
156
|
-
"attribute": "manage-accounts-url",
|
|
157
|
-
"reflect": false
|
|
158
|
-
},
|
|
159
|
-
"logoutUrl": {
|
|
160
|
-
"type": "string",
|
|
161
|
-
"mutable": false,
|
|
162
|
-
"complexType": {
|
|
163
|
-
"original": "string",
|
|
164
|
-
"resolved": "string",
|
|
165
|
-
"references": {}
|
|
166
|
-
},
|
|
167
|
-
"required": false,
|
|
168
|
-
"optional": false,
|
|
169
|
-
"docs": {
|
|
170
|
-
"tags": [],
|
|
171
|
-
"text": ""
|
|
172
|
-
},
|
|
173
|
-
"attribute": "logout-url",
|
|
174
|
-
"reflect": false
|
|
175
|
-
},
|
|
176
|
-
"pageSize": {
|
|
177
|
-
"type": "string",
|
|
178
|
-
"mutable": false,
|
|
179
|
-
"complexType": {
|
|
180
|
-
"original": "'large' | 'medium' | 'small' | string",
|
|
181
|
-
"resolved": "string",
|
|
182
|
-
"references": {}
|
|
183
|
-
},
|
|
184
|
-
"required": false,
|
|
185
|
-
"optional": false,
|
|
186
|
-
"docs": {
|
|
187
|
-
"tags": [],
|
|
188
|
-
"text": ""
|
|
189
|
-
},
|
|
190
|
-
"attribute": "page-size",
|
|
191
|
-
"reflect": false,
|
|
192
|
-
"defaultValue": "'large'"
|
|
193
|
-
},
|
|
194
|
-
"helpUrl": {
|
|
195
|
-
"type": "string",
|
|
196
|
-
"mutable": false,
|
|
197
|
-
"complexType": {
|
|
198
|
-
"original": "string",
|
|
199
|
-
"resolved": "string",
|
|
200
|
-
"references": {}
|
|
201
|
-
},
|
|
202
|
-
"required": false,
|
|
203
|
-
"optional": false,
|
|
204
|
-
"docs": {
|
|
205
|
-
"tags": [],
|
|
206
|
-
"text": ""
|
|
207
|
-
},
|
|
208
|
-
"attribute": "help-url",
|
|
209
|
-
"reflect": false
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
title: 'Patterns/Page Layout',
|
|
3
|
-
argTypes: {
|
|
4
|
-
appName: {
|
|
5
|
-
control: {
|
|
6
|
-
type: 'text',
|
|
7
|
-
},
|
|
8
|
-
defaultValue: 'Application Name',
|
|
9
|
-
description: 'The name of the application to be displayed at the top of the page'
|
|
10
|
-
},
|
|
11
|
-
pageTitle: {
|
|
12
|
-
control: {
|
|
13
|
-
type: 'text',
|
|
14
|
-
},
|
|
15
|
-
defaultValue: 'Page Title',
|
|
16
|
-
description: 'The page title to be displayed below the application name'
|
|
17
|
-
},
|
|
18
|
-
lastUpdated: {
|
|
19
|
-
control: {
|
|
20
|
-
type: 'text',
|
|
21
|
-
},
|
|
22
|
-
defaultValue: '09 Dec 2022',
|
|
23
|
-
description: 'The date the page was last updated'
|
|
24
|
-
},
|
|
25
|
-
manageAccountsUrl: {
|
|
26
|
-
defaultValue: 'example.com.',
|
|
27
|
-
description: "A link to the management page for the user's account"
|
|
28
|
-
},
|
|
29
|
-
logoutUrl: {
|
|
30
|
-
defaultValue: 'example.com.',
|
|
31
|
-
description: 'A url to logout of the app'
|
|
32
|
-
},
|
|
33
|
-
pageSize: {
|
|
34
|
-
options: [
|
|
35
|
-
'large',
|
|
36
|
-
'medium',
|
|
37
|
-
'small',
|
|
38
|
-
'800'
|
|
39
|
-
],
|
|
40
|
-
control: {
|
|
41
|
-
type: 'select'
|
|
42
|
-
},
|
|
43
|
-
description: 'A control on the width of the page. Accepts three preset sizes (large, medium and small), as well as a number of pixels'
|
|
44
|
-
},
|
|
45
|
-
helpUrl: {
|
|
46
|
-
defaultValue: 'example.com.',
|
|
47
|
-
description: 'A link to a help page'
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
decorators: [
|
|
51
|
-
(Story) => `
|
|
52
|
-
<div style="height: 500px; transform: translateZ(0)">
|
|
53
|
-
<span decorator-start />
|
|
54
|
-
${Story()}
|
|
55
|
-
<span decorator-end />
|
|
56
|
-
</div>
|
|
57
|
-
`
|
|
58
|
-
]
|
|
59
|
-
};
|
|
60
|
-
const Template = (args) => `
|
|
61
|
-
<tttx-page
|
|
62
|
-
app-name="${args.appName || ''}"
|
|
63
|
-
page-title="${args.pageTitle || ''}"
|
|
64
|
-
last-updated="${args.lastUpdated || ''}"
|
|
65
|
-
manage-accounts-url=${args.manageAccountsUrl}
|
|
66
|
-
logout-url=${args.logoutUrl}
|
|
67
|
-
${args.pageSize ? `page-size=${args.pageSize}` : ''}
|
|
68
|
-
help-url=${args.helpUrl}>
|
|
69
|
-
</tttx-page>
|
|
70
|
-
`;
|
|
71
|
-
export const Default = Template.bind({});
|
|
72
|
-
Default.parameters = {
|
|
73
|
-
docs: {
|
|
74
|
-
transformSource: source => {
|
|
75
|
-
var _a;
|
|
76
|
-
const [, output] = (_a = source.match(/<span decorator-start \/>([\s\S]*?)<span decorator-end \/>/)) !== null && _a !== void 0 ? _a : [];
|
|
77
|
-
return output;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|