@bolio-ui/core 1.1.6 → 1.1.8
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/README.md +0 -4
- package/dist/Popover/Popover.d.ts +8 -9
- package/dist/Popover/index.js +35 -18
- package/dist/index.js +54 -37
- package/esm/Popover/Popover.d.ts +8 -9
- package/esm/Popover/Popover.js +32 -15
- package/package.json +26 -24
- package/esm/Avatar/stories.js +0 -113
- package/esm/Badge/stories.js +0 -92
- package/esm/Breadcrumbs/stories.js +0 -51
- package/esm/Button/stories.js +0 -221
- package/esm/ButtonDropdown/stories.js +0 -92
- package/esm/ButtonGroup/stories.js +0 -66
- package/esm/Capacity/stories.js +0 -85
- package/esm/Card/stories.js +0 -175
- package/esm/Checkbox/stories.js +0 -84
- package/esm/Code/stories.js +0 -53
- package/esm/Collapse/stories.js +0 -48
- package/esm/Description/stories.js +0 -23
- package/esm/Divider/stories.js +0 -41
- package/esm/Dot/stories.js +0 -40
- package/esm/Drawer/stories.js +0 -79
- package/esm/Fieldset/stories.js +0 -72
- package/esm/Grid/stories.js +0 -212
- package/esm/Icon/stories.js +0 -36
- package/esm/Image/stories.js +0 -73
- package/esm/Input/stories.js +0 -145
- package/esm/Keyboard/stories.js +0 -43
- package/esm/Link/stories.js +0 -59
- package/esm/Loading/stories.js +0 -75
- package/esm/Modal/stories.js +0 -165
- package/esm/Note/stories.js +0 -68
- package/esm/Page/stories.js +0 -54
- package/esm/Pagination/stories.js +0 -49
- package/esm/Popover/stories.js +0 -84
- package/esm/Progress/stories.js +0 -114
- package/esm/Radio/stories.js +0 -98
- package/esm/Rating/stories.js +0 -72
- package/esm/Select/stories.js +0 -239
- package/esm/Slider/stories.js +0 -134
- package/esm/Snippet/stories.js +0 -177
- package/esm/Spacer/stories.js +0 -54
- package/esm/Spinner/stories.js +0 -13
- package/esm/Table/stories.js +0 -269
- package/esm/Tabs/stories.js +0 -92
- package/esm/Tag/stories.js +0 -58
- package/esm/Text/stories.js +0 -104
- package/esm/Textarea/stories.js +0 -104
- package/esm/Toggle/stories.js +0 -55
- package/esm/Tooltip/stories.js +0 -183
- package/examples/create-redwoodjs/.redwood/README.md +0 -44
package/esm/Snippet/stories.js
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import Snippet from '.';
|
|
2
|
-
import Grid from '../Grid';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Others/Snippet',
|
|
5
|
-
component: Snippet
|
|
6
|
-
};
|
|
7
|
-
export var Default = function Default() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
9
|
-
gap: 2
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
11
|
-
text: "yarn add @bolio-ui/core",
|
|
12
|
-
width: "300px"
|
|
13
|
-
})));
|
|
14
|
-
};
|
|
15
|
-
export var Width = function Width() {
|
|
16
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
17
|
-
gap: 2
|
|
18
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
19
|
-
text: "yarn add @bolio-ui/core",
|
|
20
|
-
width: "100%"
|
|
21
|
-
})));
|
|
22
|
-
};
|
|
23
|
-
export var Types = function Types() {
|
|
24
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
25
|
-
gap: 2
|
|
26
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
27
|
-
text: "yarn add @bolio-ui/core",
|
|
28
|
-
width: "300px"
|
|
29
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
30
|
-
text: "yarn add @bolio-ui/core",
|
|
31
|
-
type: "primary",
|
|
32
|
-
width: "300px"
|
|
33
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
34
|
-
text: "yarn add @bolio-ui/core",
|
|
35
|
-
type: "secondary",
|
|
36
|
-
width: "300px"
|
|
37
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
38
|
-
text: "yarn add @bolio-ui/core",
|
|
39
|
-
type: "success",
|
|
40
|
-
width: "300px"
|
|
41
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
42
|
-
text: "yarn add @bolio-ui/core",
|
|
43
|
-
type: "warning",
|
|
44
|
-
width: "300px"
|
|
45
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
46
|
-
text: "yarn add @bolio-ui/core",
|
|
47
|
-
type: "error",
|
|
48
|
-
width: "300px"
|
|
49
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
50
|
-
text: "yarn add @bolio-ui/core",
|
|
51
|
-
type: "secondary",
|
|
52
|
-
width: "300px"
|
|
53
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
54
|
-
text: "yarn add @bolio-ui/core",
|
|
55
|
-
type: "lite",
|
|
56
|
-
width: "300px"
|
|
57
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
58
|
-
text: "yarn add @bolio-ui/core",
|
|
59
|
-
type: "dark",
|
|
60
|
-
width: "300px"
|
|
61
|
-
})));
|
|
62
|
-
};
|
|
63
|
-
export var Rounded = function Rounded() {
|
|
64
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
65
|
-
gap: 2
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
67
|
-
text: "yarn add @bolio-ui/core",
|
|
68
|
-
width: "300px",
|
|
69
|
-
rounded: true
|
|
70
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
71
|
-
text: "yarn add @bolio-ui/core",
|
|
72
|
-
type: "primary",
|
|
73
|
-
width: "300px",
|
|
74
|
-
rounded: true
|
|
75
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
76
|
-
text: "yarn add @bolio-ui/core",
|
|
77
|
-
type: "secondary",
|
|
78
|
-
width: "300px",
|
|
79
|
-
rounded: true
|
|
80
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
81
|
-
text: "yarn add @bolio-ui/core",
|
|
82
|
-
type: "success",
|
|
83
|
-
width: "300px",
|
|
84
|
-
rounded: true
|
|
85
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
86
|
-
text: "yarn add @bolio-ui/core",
|
|
87
|
-
type: "warning",
|
|
88
|
-
width: "300px",
|
|
89
|
-
rounded: true
|
|
90
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
91
|
-
text: "yarn add @bolio-ui/core",
|
|
92
|
-
type: "error",
|
|
93
|
-
width: "300px",
|
|
94
|
-
rounded: true
|
|
95
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
96
|
-
text: "yarn add @bolio-ui/core",
|
|
97
|
-
type: "lite",
|
|
98
|
-
width: "300px",
|
|
99
|
-
rounded: true
|
|
100
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
101
|
-
text: "yarn add @bolio-ui/core",
|
|
102
|
-
type: "dark",
|
|
103
|
-
width: "300px",
|
|
104
|
-
rounded: true
|
|
105
|
-
})));
|
|
106
|
-
};
|
|
107
|
-
export var Multiline = function Multiline() {
|
|
108
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
109
|
-
gap: 2
|
|
110
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
111
|
-
text: ['cd project', 'now'],
|
|
112
|
-
width: "300px"
|
|
113
|
-
})));
|
|
114
|
-
};
|
|
115
|
-
export var DisabledCopy = function DisabledCopy() {
|
|
116
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
117
|
-
gap: 2
|
|
118
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
119
|
-
copy: "prevent",
|
|
120
|
-
text: "yarn add @bolio-ui/core",
|
|
121
|
-
width: "300px"
|
|
122
|
-
})));
|
|
123
|
-
};
|
|
124
|
-
export var CustomSymbol = function CustomSymbol() {
|
|
125
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
126
|
-
gap: 2
|
|
127
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
128
|
-
symbol: ">",
|
|
129
|
-
text: "yarn add @bolio-ui/core",
|
|
130
|
-
width: "300px"
|
|
131
|
-
})));
|
|
132
|
-
};
|
|
133
|
-
export var CustomToast = function CustomToast() {
|
|
134
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
135
|
-
gap: 2
|
|
136
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
137
|
-
toastText: "Code copied!",
|
|
138
|
-
toastType: "secondary",
|
|
139
|
-
text: "yarn add @bolio-ui/core",
|
|
140
|
-
width: "300px"
|
|
141
|
-
})));
|
|
142
|
-
};
|
|
143
|
-
export var Filled = function Filled() {
|
|
144
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
145
|
-
gap: 2
|
|
146
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
147
|
-
text: "yarn add @bolio-ui/core",
|
|
148
|
-
type: "primary",
|
|
149
|
-
filled: true,
|
|
150
|
-
width: "300px"
|
|
151
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
152
|
-
text: "yarn add @bolio-ui/core",
|
|
153
|
-
type: "secondary",
|
|
154
|
-
filled: true,
|
|
155
|
-
width: "300px"
|
|
156
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
157
|
-
text: "yarn add @bolio-ui/core",
|
|
158
|
-
type: "success",
|
|
159
|
-
filled: true,
|
|
160
|
-
width: "300px"
|
|
161
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
162
|
-
text: "yarn add @bolio-ui/core",
|
|
163
|
-
type: "warning",
|
|
164
|
-
filled: true,
|
|
165
|
-
width: "300px"
|
|
166
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
167
|
-
text: "yarn add @bolio-ui/core",
|
|
168
|
-
type: "error",
|
|
169
|
-
filled: true,
|
|
170
|
-
width: "300px"
|
|
171
|
-
})), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Snippet, {
|
|
172
|
-
text: "yarn add @bolio-ui/core",
|
|
173
|
-
type: "info",
|
|
174
|
-
filled: true,
|
|
175
|
-
width: "300px"
|
|
176
|
-
})));
|
|
177
|
-
};
|
package/esm/Spacer/stories.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import Spacer from '.';
|
|
2
|
-
import Grid from '../Grid';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Layout/Spacer',
|
|
5
|
-
component: Spacer
|
|
6
|
-
};
|
|
7
|
-
export var Vertical = function Vertical() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(Grid.Container, null, /*#__PURE__*/React.createElement(Grid, {
|
|
9
|
-
xs: 12,
|
|
10
|
-
style: {
|
|
11
|
-
background: '#444',
|
|
12
|
-
borderRadius: '15px'
|
|
13
|
-
}
|
|
14
|
-
}, /*#__PURE__*/React.createElement(Spacer, {
|
|
15
|
-
h: 2
|
|
16
|
-
})), /*#__PURE__*/React.createElement(Spacer, {
|
|
17
|
-
h: 2
|
|
18
|
-
}), /*#__PURE__*/React.createElement(Grid, {
|
|
19
|
-
xs: 12,
|
|
20
|
-
style: {
|
|
21
|
-
background: '#666',
|
|
22
|
-
borderRadius: '15px'
|
|
23
|
-
}
|
|
24
|
-
}, /*#__PURE__*/React.createElement(Spacer, {
|
|
25
|
-
h: 3
|
|
26
|
-
})), /*#__PURE__*/React.createElement(Spacer, {
|
|
27
|
-
h: 3
|
|
28
|
-
}), /*#__PURE__*/React.createElement(Grid, {
|
|
29
|
-
xs: 12,
|
|
30
|
-
style: {
|
|
31
|
-
background: '#999',
|
|
32
|
-
borderRadius: '15px'
|
|
33
|
-
}
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Spacer, {
|
|
35
|
-
h: 4
|
|
36
|
-
})));
|
|
37
|
-
};
|
|
38
|
-
export var Horizontal = function Horizontal() {
|
|
39
|
-
return /*#__PURE__*/React.createElement(Grid.Container, null, /*#__PURE__*/React.createElement(Grid, {
|
|
40
|
-
xs: 4,
|
|
41
|
-
style: {
|
|
42
|
-
background: '#444',
|
|
43
|
-
borderRadius: '15px'
|
|
44
|
-
}
|
|
45
|
-
}), /*#__PURE__*/React.createElement(Spacer, {
|
|
46
|
-
w: 5
|
|
47
|
-
}), /*#__PURE__*/React.createElement(Grid, {
|
|
48
|
-
xs: 4,
|
|
49
|
-
style: {
|
|
50
|
-
background: '#444',
|
|
51
|
-
borderRadius: '15px'
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
};
|
package/esm/Spinner/stories.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Spinner from '.';
|
|
2
|
-
import Grid from '../Grid';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Feedback/Spinner',
|
|
5
|
-
component: Spinner
|
|
6
|
-
};
|
|
7
|
-
export var Default = function Default() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
9
|
-
gap: 2
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Spinner, {
|
|
11
|
-
scale: 2
|
|
12
|
-
})));
|
|
13
|
-
};
|
package/esm/Table/stories.js
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import Table from '.';
|
|
5
|
-
import Code from '../Code';
|
|
6
|
-
import Text from '../Text';
|
|
7
|
-
import Button from '../Button';
|
|
8
|
-
export default {
|
|
9
|
-
title: 'Data Display/Table',
|
|
10
|
-
component: Table
|
|
11
|
-
};
|
|
12
|
-
export var Default = function Default() {
|
|
13
|
-
var data = [{
|
|
14
|
-
property: 'type',
|
|
15
|
-
description: 'Content type',
|
|
16
|
-
type: 'secondary | warning',
|
|
17
|
-
"default": '-'
|
|
18
|
-
}, {
|
|
19
|
-
property: 'Component',
|
|
20
|
-
description: 'DOM element to use',
|
|
21
|
-
type: 'string',
|
|
22
|
-
"default": '-'
|
|
23
|
-
}, {
|
|
24
|
-
property: 'bold',
|
|
25
|
-
description: 'Bold style',
|
|
26
|
-
type: 'boolean',
|
|
27
|
-
"default": 'true'
|
|
28
|
-
}];
|
|
29
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
30
|
-
data: data
|
|
31
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
32
|
-
prop: "property",
|
|
33
|
-
label: "property"
|
|
34
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
35
|
-
prop: "description",
|
|
36
|
-
label: "description"
|
|
37
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
38
|
-
prop: "type",
|
|
39
|
-
label: "type"
|
|
40
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
41
|
-
prop: "default",
|
|
42
|
-
label: "default"
|
|
43
|
-
}));
|
|
44
|
-
};
|
|
45
|
-
export var Compose = function Compose() {
|
|
46
|
-
var data = [{
|
|
47
|
-
property: 'type',
|
|
48
|
-
description: 'Content type',
|
|
49
|
-
type: 'secondary | warning',
|
|
50
|
-
"default": '-'
|
|
51
|
-
}, {
|
|
52
|
-
property: 'Component',
|
|
53
|
-
description: 'DOM element to use',
|
|
54
|
-
type: /*#__PURE__*/React.createElement(Code, null, "string"),
|
|
55
|
-
"default": '-'
|
|
56
|
-
}, {
|
|
57
|
-
property: /*#__PURE__*/React.createElement(Text, {
|
|
58
|
-
b: true
|
|
59
|
-
}, "bold"),
|
|
60
|
-
description: 'Bold style',
|
|
61
|
-
type: /*#__PURE__*/React.createElement(Code, null, "boolean"),
|
|
62
|
-
"default": /*#__PURE__*/React.createElement(Code, null, "true")
|
|
63
|
-
}];
|
|
64
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
65
|
-
data: data
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
67
|
-
prop: "property",
|
|
68
|
-
label: "property"
|
|
69
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
70
|
-
prop: "description",
|
|
71
|
-
label: "description"
|
|
72
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
73
|
-
prop: "type",
|
|
74
|
-
label: "type"
|
|
75
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
76
|
-
prop: "default",
|
|
77
|
-
label: "default"
|
|
78
|
-
}));
|
|
79
|
-
};
|
|
80
|
-
export var Width = function Width() {
|
|
81
|
-
var data = [{
|
|
82
|
-
property: 'type',
|
|
83
|
-
description: 'Content type',
|
|
84
|
-
type: 'secondary | warning',
|
|
85
|
-
"default": '-'
|
|
86
|
-
}, {
|
|
87
|
-
property: 'Component',
|
|
88
|
-
description: 'DOM element to use',
|
|
89
|
-
type: /*#__PURE__*/React.createElement(Code, null, "string"),
|
|
90
|
-
"default": '-'
|
|
91
|
-
}, {
|
|
92
|
-
property: /*#__PURE__*/React.createElement(Text, {
|
|
93
|
-
b: true
|
|
94
|
-
}, "bold"),
|
|
95
|
-
description: 'Bold style',
|
|
96
|
-
type: /*#__PURE__*/React.createElement(Code, null, "boolean"),
|
|
97
|
-
"default": /*#__PURE__*/React.createElement(Code, null, "true")
|
|
98
|
-
}];
|
|
99
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
100
|
-
data: data
|
|
101
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
102
|
-
prop: "property",
|
|
103
|
-
label: "property",
|
|
104
|
-
width: 50
|
|
105
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
106
|
-
prop: "description",
|
|
107
|
-
label: "description"
|
|
108
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
109
|
-
prop: "type",
|
|
110
|
-
label: "type"
|
|
111
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
112
|
-
prop: "default",
|
|
113
|
-
label: "default"
|
|
114
|
-
}));
|
|
115
|
-
};
|
|
116
|
-
export var Actions = function Actions() {
|
|
117
|
-
var dataSource = [{
|
|
118
|
-
property: 'type',
|
|
119
|
-
description: 'Content type',
|
|
120
|
-
operation: ''
|
|
121
|
-
}, {
|
|
122
|
-
property: 'Component',
|
|
123
|
-
description: 'DOM element to use',
|
|
124
|
-
operation: ''
|
|
125
|
-
}, {
|
|
126
|
-
property: /*#__PURE__*/React.createElement(Text, {
|
|
127
|
-
b: true
|
|
128
|
-
}, "bold"),
|
|
129
|
-
description: 'Bold style',
|
|
130
|
-
operation: ''
|
|
131
|
-
}];
|
|
132
|
-
|
|
133
|
-
var _useState = useState(dataSource),
|
|
134
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
135
|
-
data = _useState2[0],
|
|
136
|
-
setData = _useState2[1];
|
|
137
|
-
|
|
138
|
-
var renderAction = function renderAction(value, rowData, index) {
|
|
139
|
-
var removeHandler = function removeHandler() {
|
|
140
|
-
setData(function (last) {
|
|
141
|
-
return last.filter(function (_, dataIndex) {
|
|
142
|
-
return dataIndex !== index;
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
148
|
-
type: "error",
|
|
149
|
-
auto: true,
|
|
150
|
-
scale: 1 / 3,
|
|
151
|
-
font: "12px",
|
|
152
|
-
onClick: removeHandler
|
|
153
|
-
}, "Remove");
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
157
|
-
data: data,
|
|
158
|
-
onChange: function onChange(value) {
|
|
159
|
-
return setData(value);
|
|
160
|
-
}
|
|
161
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
162
|
-
prop: "property",
|
|
163
|
-
label: "property"
|
|
164
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
165
|
-
prop: "description",
|
|
166
|
-
label: "description"
|
|
167
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
168
|
-
prop: "operation",
|
|
169
|
-
label: "operation",
|
|
170
|
-
width: 150,
|
|
171
|
-
render: renderAction
|
|
172
|
-
}));
|
|
173
|
-
};
|
|
174
|
-
export var UpdateRow = function UpdateRow() {
|
|
175
|
-
var dataSource = [{
|
|
176
|
-
property: 'type',
|
|
177
|
-
description: 'Content type',
|
|
178
|
-
operation: ''
|
|
179
|
-
}, {
|
|
180
|
-
property: 'Component',
|
|
181
|
-
description: 'DOM element to use',
|
|
182
|
-
operation: ''
|
|
183
|
-
}, {
|
|
184
|
-
property: /*#__PURE__*/React.createElement(Text, {
|
|
185
|
-
b: true
|
|
186
|
-
}, "bold"),
|
|
187
|
-
description: 'Bold style',
|
|
188
|
-
operation: ''
|
|
189
|
-
}];
|
|
190
|
-
|
|
191
|
-
var _React$useState = React.useState(dataSource),
|
|
192
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
193
|
-
data = _React$useState2[0],
|
|
194
|
-
setData = _React$useState2[1];
|
|
195
|
-
|
|
196
|
-
var renderAction = function renderAction(value, rowData, rowIndex) {
|
|
197
|
-
var updateHandler = function updateHandler() {
|
|
198
|
-
setData(function (last) {
|
|
199
|
-
return last.map(function (item, dataIndex) {
|
|
200
|
-
if (dataIndex !== rowIndex) return item;
|
|
201
|
-
return _extends({}, item, {
|
|
202
|
-
property: Math.random().toString(16).slice(-5)
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
209
|
-
type: "secondary",
|
|
210
|
-
auto: true,
|
|
211
|
-
scale: 1 / 3,
|
|
212
|
-
font: "12px",
|
|
213
|
-
onClick: updateHandler
|
|
214
|
-
}, "Update");
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
218
|
-
data: data,
|
|
219
|
-
onChange: function onChange(value) {
|
|
220
|
-
return setData(value);
|
|
221
|
-
}
|
|
222
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
223
|
-
prop: "property",
|
|
224
|
-
label: "property"
|
|
225
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
226
|
-
prop: "description",
|
|
227
|
-
label: "description"
|
|
228
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
229
|
-
prop: "operation",
|
|
230
|
-
label: "operation",
|
|
231
|
-
width: 150,
|
|
232
|
-
render: renderAction
|
|
233
|
-
}));
|
|
234
|
-
};
|
|
235
|
-
export var CustomHead = function CustomHead() {
|
|
236
|
-
var data = [{
|
|
237
|
-
property: 'type',
|
|
238
|
-
description: 'Content type',
|
|
239
|
-
type: 'secondary | warning',
|
|
240
|
-
"default": '-'
|
|
241
|
-
}, {
|
|
242
|
-
property: 'Component',
|
|
243
|
-
description: 'DOM element to use',
|
|
244
|
-
type: /*#__PURE__*/React.createElement(Code, null, "string"),
|
|
245
|
-
"default": '-'
|
|
246
|
-
}, {
|
|
247
|
-
property: /*#__PURE__*/React.createElement(Text, {
|
|
248
|
-
b: true
|
|
249
|
-
}, "bold"),
|
|
250
|
-
description: 'Bold style',
|
|
251
|
-
type: /*#__PURE__*/React.createElement(Code, null, "boolean"),
|
|
252
|
-
"default": /*#__PURE__*/React.createElement(Code, null, "true")
|
|
253
|
-
}];
|
|
254
|
-
return /*#__PURE__*/React.createElement(Table, {
|
|
255
|
-
data: data
|
|
256
|
-
}, /*#__PURE__*/React.createElement(Table.Column, {
|
|
257
|
-
prop: "property",
|
|
258
|
-
label: "property"
|
|
259
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
260
|
-
prop: "description",
|
|
261
|
-
label: "description"
|
|
262
|
-
}), /*#__PURE__*/React.createElement(Table.Column, {
|
|
263
|
-
prop: "type"
|
|
264
|
-
}, /*#__PURE__*/React.createElement(Code, null, "type")), /*#__PURE__*/React.createElement(Table.Column, {
|
|
265
|
-
prop: "default"
|
|
266
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
267
|
-
b: true
|
|
268
|
-
}, "default")));
|
|
269
|
-
};
|
package/esm/Tabs/stories.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import Tabs from '.';
|
|
2
|
-
import Text from '../Text';
|
|
3
|
-
import Grid from '../Grid';
|
|
4
|
-
import { Instagram, Facebook } from '@bolio-ui/icons';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Navigation/Tabs',
|
|
7
|
-
component: Tabs
|
|
8
|
-
};
|
|
9
|
-
export var Default = function Default() {
|
|
10
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
11
|
-
gap: 2
|
|
12
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
13
|
-
initialValue: "1"
|
|
14
|
-
}, /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
15
|
-
label: "Declarative",
|
|
16
|
-
value: "1"
|
|
17
|
-
}, "React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes."), /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
18
|
-
label: "Component-Based",
|
|
19
|
-
value: "2"
|
|
20
|
-
}, "Build encapsulated components that manage their own state, then compose them to make complex UIs."))));
|
|
21
|
-
};
|
|
22
|
-
export var Disabled = function Disabled() {
|
|
23
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
24
|
-
gap: 2
|
|
25
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
26
|
-
initialValue: "1"
|
|
27
|
-
}, /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
28
|
-
label: "Declarative",
|
|
29
|
-
value: "1"
|
|
30
|
-
}, "React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes."), /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
31
|
-
label: "Component-Based",
|
|
32
|
-
value: "2",
|
|
33
|
-
disabled: true
|
|
34
|
-
}))));
|
|
35
|
-
};
|
|
36
|
-
export var HideDivider = function HideDivider() {
|
|
37
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
38
|
-
gap: 2
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
40
|
-
initialValue: "react",
|
|
41
|
-
hideDivider: true
|
|
42
|
-
}, /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
43
|
-
label: "Declarative",
|
|
44
|
-
value: "react"
|
|
45
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
46
|
-
mt: 0
|
|
47
|
-
}, "React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.")), /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
48
|
-
label: "Component-Based",
|
|
49
|
-
value: "component-based"
|
|
50
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
51
|
-
mt: 0
|
|
52
|
-
}, "Build encapsulated components that manage their own state, then compose them to make complex UIs.")))));
|
|
53
|
-
};
|
|
54
|
-
export var HideBorder = function HideBorder() {
|
|
55
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
56
|
-
gap: 2
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
58
|
-
initialValue: "react",
|
|
59
|
-
hideDivider: true,
|
|
60
|
-
hideBorder: true,
|
|
61
|
-
leftSpace: 0
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
63
|
-
label: "Declarative",
|
|
64
|
-
value: "react"
|
|
65
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
66
|
-
mt: 0
|
|
67
|
-
}, "React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.")), /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
68
|
-
label: "Component-Based",
|
|
69
|
-
value: "component-based"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
71
|
-
mt: 0
|
|
72
|
-
}, "Build encapsulated components that manage their own state, then compose them to make complex UIs.")))));
|
|
73
|
-
};
|
|
74
|
-
export var WithIcon = function WithIcon() {
|
|
75
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
76
|
-
gap: 2
|
|
77
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tabs, {
|
|
78
|
-
initialValue: "1",
|
|
79
|
-
align: "center",
|
|
80
|
-
leftSpace: 0
|
|
81
|
-
}, /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
82
|
-
label: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Instagram, null), " Instagram"),
|
|
83
|
-
value: "1"
|
|
84
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
85
|
-
mt: 0
|
|
86
|
-
}, "Hello, this is my profile.")), /*#__PURE__*/React.createElement(Tabs.Item, {
|
|
87
|
-
label: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Facebook, null), " Facebook"),
|
|
88
|
-
value: "2"
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
90
|
-
mt: 0
|
|
91
|
-
}, "Hi, this is my page.")))));
|
|
92
|
-
};
|
package/esm/Tag/stories.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import Tag from '.';
|
|
2
|
-
import Grid from '../Grid';
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Data Display/Tag',
|
|
5
|
-
component: Tag
|
|
6
|
-
};
|
|
7
|
-
export var Default = function Default() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
9
|
-
gap: 2
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, null, "Status: Unstable")));
|
|
11
|
-
};
|
|
12
|
-
export var Types = function Types() {
|
|
13
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
14
|
-
gap: 2
|
|
15
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, null, "Default")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
16
|
-
type: "primary"
|
|
17
|
-
}, "Primary")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
18
|
-
type: "secondary"
|
|
19
|
-
}, "Secondary")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
20
|
-
type: "success"
|
|
21
|
-
}, "Success")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
22
|
-
type: "warning"
|
|
23
|
-
}, "Warning")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
24
|
-
type: "error"
|
|
25
|
-
}, "Error")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
26
|
-
type: "dark"
|
|
27
|
-
}, "Dark")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
28
|
-
type: "lite"
|
|
29
|
-
}, "Lite")));
|
|
30
|
-
};
|
|
31
|
-
export var TypesInvert = function TypesInvert() {
|
|
32
|
-
return /*#__PURE__*/React.createElement(Grid.Container, {
|
|
33
|
-
gap: 2
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
35
|
-
invert: true
|
|
36
|
-
}, "Default")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
37
|
-
type: "primary",
|
|
38
|
-
invert: true
|
|
39
|
-
}, "Primary")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
40
|
-
type: "secondary",
|
|
41
|
-
invert: true
|
|
42
|
-
}, "Secondary")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
43
|
-
type: "success",
|
|
44
|
-
invert: true
|
|
45
|
-
}, "Success")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
46
|
-
type: "warning",
|
|
47
|
-
invert: true
|
|
48
|
-
}, "Warning")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
49
|
-
type: "error",
|
|
50
|
-
invert: true
|
|
51
|
-
}, "Error")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
52
|
-
type: "dark",
|
|
53
|
-
invert: true
|
|
54
|
-
}, "Dark")), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Tag, {
|
|
55
|
-
type: "lite",
|
|
56
|
-
invert: true
|
|
57
|
-
}, "Lite")));
|
|
58
|
-
};
|