@wonderflow/react-components 10.7.1 → 10.9.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/dist/components/accordion/accordion-context.d.ts +12 -0
- package/dist/components/accordion/accordion-context.d.ts.map +1 -0
- package/dist/components/accordion/accordion-context.js +13 -0
- package/dist/components/accordion/accordion-item.d.ts +10 -0
- package/dist/components/accordion/accordion-item.d.ts.map +1 -0
- package/dist/components/accordion/accordion-item.js +9 -0
- package/dist/components/accordion/accordion.d.ts +18 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +8 -0
- package/dist/components/accordion/accordion.module.css +1 -0
- package/dist/components/accordion/accordion.stories.d.ts +12 -0
- package/dist/components/accordion/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion/accordion.stories.js +17 -0
- package/dist/components/accordion/index.d.ts +5 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts +6 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.js +12 -0
- package/dist/components/autocomplete/autocomplete.js +1 -1
- package/dist/components/autocomplete/autocomplete.stories.d.ts +15 -0
- package/dist/components/autocomplete/autocomplete.stories.d.ts.map +1 -0
- package/dist/components/autocomplete/autocomplete.stories.js +19 -0
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/avatar.stories.d.ts +10 -0
- package/dist/components/avatar/avatar.stories.d.ts.map +1 -0
- package/dist/components/avatar/avatar.stories.js +19 -0
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/button.module.css +1 -1
- package/dist/components/button/button.stories.d.ts +9 -0
- package/dist/components/button/button.stories.d.ts.map +1 -0
- package/dist/components/button/button.stories.js +55 -0
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/card.module.css +1 -1
- package/dist/components/card/card.stories.d.ts +10 -0
- package/dist/components/card/card.stories.d.ts.map +1 -0
- package/dist/components/card/card.stories.js +47 -0
- package/dist/components/chip/chip.js +1 -1
- package/dist/components/chip/chip.stories.d.ts +6 -0
- package/dist/components/chip/chip.stories.d.ts.map +1 -0
- package/dist/components/chip/chip.stories.js +30 -0
- package/dist/components/circular-progress/circular-progress.js +1 -1
- package/dist/components/circular-progress/circular-progress.stories.d.ts +10 -0
- package/dist/components/circular-progress/circular-progress.stories.d.ts.map +1 -0
- package/dist/components/circular-progress/circular-progress.stories.js +30 -0
- package/dist/components/clamp-text/clamp-text.d.ts.map +1 -1
- package/dist/components/clamp-text/clamp-text.js +2 -1
- package/dist/components/clamp-text/clamp-text.module.css +1 -1
- package/dist/components/clamp-text/clamp-text.stories.d.ts +7 -0
- package/dist/components/clamp-text/clamp-text.stories.d.ts.map +1 -0
- package/dist/components/clamp-text/clamp-text.stories.js +25 -0
- package/dist/components/container/container.js +1 -1
- package/dist/components/container/container.stories.d.ts +10 -0
- package/dist/components/container/container.stories.d.ts.map +1 -0
- package/dist/components/container/container.stories.js +48 -0
- package/dist/components/datetime/datetime.stories.d.ts +7 -0
- package/dist/components/datetime/datetime.stories.d.ts.map +1 -0
- package/dist/components/datetime/datetime.stories.js +22 -0
- package/dist/components/disclosure/disclosure.d.ts +1 -1
- package/dist/components/disclosure/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure/disclosure.js +9 -8
- package/dist/components/disclosure/disclosure.stories.d.ts +24 -0
- package/dist/components/disclosure/disclosure.stories.d.ts.map +1 -0
- package/dist/components/disclosure/disclosure.stories.js +32 -0
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/drawer/drawer.stories.d.ts +7 -0
- package/dist/components/drawer/drawer.stories.d.ts.map +1 -0
- package/dist/components/drawer/drawer.stories.js +36 -0
- package/dist/components/elevator/elevator.stories.d.ts +7 -0
- package/dist/components/elevator/elevator.stories.d.ts.map +1 -0
- package/dist/components/elevator/elevator.stories.js +17 -0
- package/dist/components/grid/grid.js +1 -1
- package/dist/components/grid/grid.stories.d.ts +9 -0
- package/dist/components/grid/grid.stories.d.ts.map +1 -0
- package/dist/components/grid/grid.stories.js +11 -0
- package/dist/components/grid/item/grid-item.js +1 -1
- package/dist/components/icon-button/icon-button.js +1 -1
- package/dist/components/icon-button/icon-button.stories.d.ts +6 -0
- package/dist/components/icon-button/icon-button.stories.d.ts.map +1 -0
- package/dist/components/icon-button/icon-button.stories.js +33 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/info-state/info-state.js +1 -1
- package/dist/components/info-state/info-state.stories.d.ts +71 -0
- package/dist/components/info-state/info-state.stories.d.ts.map +1 -0
- package/dist/components/info-state/info-state.stories.js +40 -0
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/input-group/input-group.stories.d.ts +10 -0
- package/dist/components/input-group/input-group.stories.d.ts.map +1 -0
- package/dist/components/input-group/input-group.stories.js +13 -0
- package/dist/components/linear-progress/linear-progress.d.ts +1 -1
- package/dist/components/linear-progress/linear-progress.js +1 -1
- package/dist/components/linear-progress/linear-progress.stories.d.ts +18 -0
- package/dist/components/linear-progress/linear-progress.stories.d.ts.map +1 -0
- package/dist/components/linear-progress/linear-progress.stories.js +27 -0
- package/dist/components/list/list-item.js +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/list/list.stories.d.ts +15 -0
- package/dist/components/list/list.stories.d.ts.map +1 -0
- package/dist/components/list/list.stories.js +27 -0
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/masonry/masonry.stories.d.ts +7 -0
- package/dist/components/masonry/masonry.stories.d.ts.map +1 -0
- package/dist/components/masonry/masonry.stories.js +24 -0
- package/dist/components/menu/menu-item/menu-item.js +2 -2
- package/dist/components/menu/menu-item/menu-item.stories.d.ts +10 -0
- package/dist/components/menu/menu-item/menu-item.stories.d.ts.map +1 -0
- package/dist/components/menu/menu-item/menu-item.stories.js +33 -0
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/menu/menu.stories.d.ts +41 -0
- package/dist/components/menu/menu.stories.d.ts.map +1 -0
- package/dist/components/menu/menu.stories.js +24 -0
- package/dist/components/modal/content/modal-content.d.ts +4 -0
- package/dist/components/modal/content/modal-content.d.ts.map +1 -1
- package/dist/components/modal/content/modal-content.js +1 -1
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/modal/modal.stories.d.ts +12 -0
- package/dist/components/modal/modal.stories.d.ts.map +1 -0
- package/dist/components/modal/modal.stories.js +23 -0
- package/dist/components/overlay-container/overlay-container.js +1 -1
- package/dist/components/overlay-container/overlay-container.stories.d.ts +6 -0
- package/dist/components/overlay-container/overlay-container.stories.d.ts.map +1 -0
- package/dist/components/overlay-container/overlay-container.stories.js +17 -0
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/pagination/pagination.stories.d.ts +6 -0
- package/dist/components/pagination/pagination.stories.d.ts.map +1 -0
- package/dist/components/pagination/pagination.stories.js +421 -0
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/popover/popover.stories.d.ts +22 -0
- package/dist/components/popover/popover.stories.d.ts.map +1 -0
- package/dist/components/popover/popover.stories.js +45 -0
- package/dist/components/prose/prose.js +1 -1
- package/dist/components/prose/prose.stories.d.ts +7 -0
- package/dist/components/prose/prose.stories.d.ts.map +1 -0
- package/dist/components/prose/prose.stories.js +12 -0
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/select.stories.d.ts +33 -0
- package/dist/components/select/select.stories.d.ts.map +1 -0
- package/dist/components/select/select.stories.js +47 -0
- package/dist/components/selection-controls/checkbox.js +1 -1
- package/dist/components/selection-controls/checkbox.stories.d.ts +30 -0
- package/dist/components/selection-controls/checkbox.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/checkbox.stories.js +34 -0
- package/dist/components/selection-controls/radio.js +1 -1
- package/dist/components/selection-controls/radio.stories.d.ts +21 -0
- package/dist/components/selection-controls/radio.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/radio.stories.js +30 -0
- package/dist/components/selection-controls/toggle.js +1 -1
- package/dist/components/selection-controls/toggle.stories.d.ts +8 -0
- package/dist/components/selection-controls/toggle.stories.d.ts.map +1 -0
- package/dist/components/selection-controls/toggle.stories.js +22 -0
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/separator/separator.stories.d.ts +6 -0
- package/dist/components/separator/separator.stories.d.ts.map +1 -0
- package/dist/components/separator/separator.stories.js +8 -0
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/skeleton.stories.d.ts +9 -0
- package/dist/components/skeleton/skeleton.stories.d.ts.map +1 -0
- package/dist/components/skeleton/skeleton.stories.js +38 -0
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/slider.stories.d.ts +39 -0
- package/dist/components/slider/slider.stories.d.ts.map +1 -0
- package/dist/components/slider/slider.stories.js +33 -0
- package/dist/components/snackbar/snackbar.js +1 -1
- package/dist/components/snackbar/snackbar.module.css +1 -1
- package/dist/components/snackbar/snackbar.stories.d.ts +7 -0
- package/dist/components/snackbar/snackbar.stories.d.ts.map +1 -0
- package/dist/components/snackbar/snackbar.stories.js +22 -0
- package/dist/components/spinner/spinner.d.ts +1 -1
- package/dist/components/spinner/spinner.stories.d.ts +10 -0
- package/dist/components/spinner/spinner.stories.d.ts.map +1 -0
- package/dist/components/spinner/spinner.stories.js +19 -0
- package/dist/components/split-button/split-button.js +1 -1
- package/dist/components/split-button/split-button.stories.d.ts +8 -0
- package/dist/components/split-button/split-button.stories.d.ts.map +1 -0
- package/dist/components/split-button/split-button.stories.js +36 -0
- package/dist/components/stack/stack.js +2 -2
- package/dist/components/stack/stack.stories.d.ts +6 -0
- package/dist/components/stack/stack.stories.d.ts.map +1 -0
- package/dist/components/stack/stack.stories.js +40 -0
- package/dist/components/star-meter/star-meter.js +1 -1
- package/dist/components/star-meter/star-meter.stories.d.ts +7 -0
- package/dist/components/star-meter/star-meter.stories.d.ts.map +1 -0
- package/dist/components/star-meter/star-meter.stories.js +24 -0
- package/dist/components/symbol/symbol.js +1 -1
- package/dist/components/symbol/symbol.stories.d.ts +16 -0
- package/dist/components/symbol/symbol.stories.d.ts.map +1 -0
- package/dist/components/symbol/symbol.stories.js +30 -0
- package/dist/components/tab/tab.js +1 -1
- package/dist/components/tab/tab.stories.d.ts +21 -0
- package/dist/components/tab/tab.stories.d.ts.map +1 -0
- package/dist/components/tab/tab.stories.js +46 -0
- package/dist/components/tab/tabs-panel.d.ts +1 -0
- package/dist/components/tab/tabs-panel.d.ts.map +1 -1
- package/dist/components/tab/tabs-panel.js +1 -1
- package/dist/components/table/table-cell/table-cell.js +1 -1
- package/dist/components/table/table-checkbox/table-checkbox.js +1 -1
- package/dist/components/table/table-expand/table-expand.js +1 -1
- package/dist/components/table/table-header/table-header.js +1 -1
- package/dist/components/table/table-row/table-row.js +1 -1
- package/dist/components/table/table.js +2 -2
- package/dist/components/table/table.stories.d.ts +22 -0
- package/dist/components/table/table.stories.d.ts.map +1 -0
- package/dist/components/table/table.stories.js +1187 -0
- package/dist/components/text/text.js +1 -1
- package/dist/components/text/text.stories.d.ts +7 -0
- package/dist/components/text/text.stories.d.ts.map +1 -0
- package/dist/components/text/text.stories.js +39 -0
- package/dist/components/textfield/base-field/base-field.js +1 -1
- package/dist/components/textfield/textfield.d.ts +1 -1
- package/dist/components/textfield/textfield.js +1 -1
- package/dist/components/textfield/textfield.stories.d.ts +62 -0
- package/dist/components/textfield/textfield.stories.d.ts.map +1 -0
- package/dist/components/textfield/textfield.stories.js +83 -0
- package/dist/components/title/title.d.ts.map +1 -1
- package/dist/components/title/title.js +4 -2
- package/dist/components/title/title.stories.d.ts +7 -0
- package/dist/components/title/title.stories.d.ts.map +1 -0
- package/dist/components/title/title.stories.js +38 -0
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/toggle-button/toggle-button.stories.d.ts +16 -0
- package/dist/components/toggle-button/toggle-button.stories.d.ts.map +1 -0
- package/dist/components/toggle-button/toggle-button.stories.js +29 -0
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/components/tooltip/tooltip.stories.d.ts +7 -0
- package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.stories.js +22 -0
- package/package.json +11 -7
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Pagination } from './pagination';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Navigation/Pagination',
|
|
6
|
+
component: Pagination,
|
|
7
|
+
args: {
|
|
8
|
+
itemsPerPage: 3,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default story;
|
|
12
|
+
export const Default = ({ itemsPerPage, ...args }) => {
|
|
13
|
+
const items = useMemo(() => [
|
|
14
|
+
{
|
|
15
|
+
ip: '212.5.90.2',
|
|
16
|
+
os: 'MacOS Sierra',
|
|
17
|
+
date: '11/01/2017 @ 07:16:59',
|
|
18
|
+
status: 'ok',
|
|
19
|
+
browser: 'Mozilla Firefox',
|
|
20
|
+
position: 'Dana',
|
|
21
|
+
application: 'Contactdata',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
ip: '213.177.67.223',
|
|
25
|
+
os: 'Windows 7',
|
|
26
|
+
date: '01/01/2017 @ 05:07:22',
|
|
27
|
+
status: 'ok',
|
|
28
|
+
browser: 'Google Chrome 56',
|
|
29
|
+
position: 'Crawfordsville',
|
|
30
|
+
application: 'Engagement marketing',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
ip: '134.208.149.245',
|
|
34
|
+
os: 'Windows 7',
|
|
35
|
+
date: '24/01/2017 @ 03:35:37',
|
|
36
|
+
status: 'ok',
|
|
37
|
+
browser: 'Internet Explorer 11',
|
|
38
|
+
position: 'Summerset',
|
|
39
|
+
application: 'Engagement marketing',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
ip: '39.235.115.34',
|
|
43
|
+
os: 'OSX Mavericks',
|
|
44
|
+
date: '16/02/2017 @ 08:39:05',
|
|
45
|
+
status: 'error',
|
|
46
|
+
browser: 'Google Chrome 56',
|
|
47
|
+
position: 'Ribera',
|
|
48
|
+
application: 'Contacthub',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
ip: '20.48.229.177',
|
|
52
|
+
os: 'Windows 7',
|
|
53
|
+
date: '10/01/2017 @ 08:37:03',
|
|
54
|
+
status: 'ok',
|
|
55
|
+
browser: 'Mozilla Firefox',
|
|
56
|
+
position: 'Dragoon',
|
|
57
|
+
application: 'Contacthub',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
ip: '159.121.81.234',
|
|
61
|
+
os: 'Windows 7',
|
|
62
|
+
date: '19/02/2017 @ 02:59:23',
|
|
63
|
+
status: 'ok',
|
|
64
|
+
browser: 'Google Chrome 56',
|
|
65
|
+
position: 'Manila',
|
|
66
|
+
application: 'Contacthub',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
ip: '219.133.21.227',
|
|
70
|
+
os: 'Windows 7',
|
|
71
|
+
date: '27/01/2017 @ 07:41:17',
|
|
72
|
+
status: 'ok',
|
|
73
|
+
browser: 'Mozilla Firefox',
|
|
74
|
+
position: 'Nogal',
|
|
75
|
+
application: 'Contactdata',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
ip: '30.93.233.36',
|
|
79
|
+
os: 'OSX Mavericks',
|
|
80
|
+
date: '03/02/2017 @ 12:41:08',
|
|
81
|
+
status: 'error',
|
|
82
|
+
browser: 'Mozilla Firefox',
|
|
83
|
+
position: 'Trexlertown',
|
|
84
|
+
application: 'Engagement marketing',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
ip: '241.144.240.107',
|
|
88
|
+
os: 'Windows 10',
|
|
89
|
+
date: '28/01/2017 @ 02:04:30',
|
|
90
|
+
status: 'ok',
|
|
91
|
+
browser: 'Microsoft Edge',
|
|
92
|
+
position: 'Yettem',
|
|
93
|
+
application: 'Contacthub',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
ip: '186.8.3.194',
|
|
97
|
+
os: 'OSX Mavericks',
|
|
98
|
+
date: '04/02/2017 @ 08:17:19',
|
|
99
|
+
status: 'error',
|
|
100
|
+
browser: 'Microsoft Edge',
|
|
101
|
+
position: 'Collins',
|
|
102
|
+
application: 'Contacthub',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
ip: '187.75.121.92',
|
|
106
|
+
os: 'Windows 7',
|
|
107
|
+
date: '17/02/2017 @ 04:06:22',
|
|
108
|
+
status: 'error',
|
|
109
|
+
browser: 'Microsoft Edge',
|
|
110
|
+
position: 'Bascom',
|
|
111
|
+
application: 'Contactsend',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
ip: '161.197.46.151',
|
|
115
|
+
os: 'Windows 7',
|
|
116
|
+
date: '09/01/2017 @ 02:44:20',
|
|
117
|
+
status: 'ok',
|
|
118
|
+
browser: 'Internet Explorer 11',
|
|
119
|
+
position: 'Manchester',
|
|
120
|
+
application: 'Contactsend',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
ip: '131.151.132.175',
|
|
124
|
+
os: 'MacOS Sierra',
|
|
125
|
+
date: '07/02/2017 @ 12:38:21',
|
|
126
|
+
status: 'error',
|
|
127
|
+
browser: 'Google Chrome 56',
|
|
128
|
+
position: 'Silkworth',
|
|
129
|
+
application: 'Engagement marketing',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
ip: '58.255.154.169',
|
|
133
|
+
os: 'Windows 10',
|
|
134
|
+
date: '10/02/2017 @ 05:54:32',
|
|
135
|
+
status: 'ok',
|
|
136
|
+
browser: 'Google Chrome 56',
|
|
137
|
+
position: 'Mansfield',
|
|
138
|
+
application: 'Engagement marketing',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
ip: '203.10.238.46',
|
|
142
|
+
os: 'OSX Mavericks',
|
|
143
|
+
date: '06/01/2017 @ 06:14:43',
|
|
144
|
+
status: 'error',
|
|
145
|
+
browser: 'Microsoft Edge',
|
|
146
|
+
position: 'Barstow',
|
|
147
|
+
application: 'Engagement marketing',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
ip: '135.247.125.72',
|
|
151
|
+
os: 'OSX Mavericks',
|
|
152
|
+
date: '18/02/2017 @ 05:48:51',
|
|
153
|
+
status: 'error',
|
|
154
|
+
browser: 'Google Chrome 56',
|
|
155
|
+
position: 'Titanic',
|
|
156
|
+
application: 'Contactdata',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
ip: '5.112.149.5',
|
|
160
|
+
os: 'Windows 7',
|
|
161
|
+
date: '10/02/2017 @ 03:32:51',
|
|
162
|
+
status: 'ok',
|
|
163
|
+
browser: 'Google Chrome 56',
|
|
164
|
+
position: 'Bagtown',
|
|
165
|
+
application: 'Contactplan',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
ip: '122.200.149.137',
|
|
169
|
+
os: 'Windows 7',
|
|
170
|
+
date: '04/01/2017 @ 12:23:37',
|
|
171
|
+
status: 'ok',
|
|
172
|
+
browser: 'Mozilla Firefox',
|
|
173
|
+
position: 'Fivepointville',
|
|
174
|
+
application: 'Contacthub',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
ip: '212.5.90.2',
|
|
178
|
+
os: 'MacOS Sierra',
|
|
179
|
+
date: '11/01/2017 @ 07:16:59',
|
|
180
|
+
status: 'ok',
|
|
181
|
+
browser: 'Mozilla Firefox',
|
|
182
|
+
position: 'Dana',
|
|
183
|
+
application: 'Contactdata',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
ip: '213.177.67.223',
|
|
187
|
+
os: 'Windows 7',
|
|
188
|
+
date: '01/01/2017 @ 05:07:22',
|
|
189
|
+
status: 'ok',
|
|
190
|
+
browser: 'Google Chrome 56',
|
|
191
|
+
position: 'Crawfordsville',
|
|
192
|
+
application: 'Engagement marketing',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
ip: '134.208.149.245',
|
|
196
|
+
os: 'Windows 7',
|
|
197
|
+
date: '24/01/2017 @ 03:35:37',
|
|
198
|
+
status: 'ok',
|
|
199
|
+
browser: 'Internet Explorer 11',
|
|
200
|
+
position: 'Summerset',
|
|
201
|
+
application: 'Engagement marketing',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
ip: '39.235.115.34',
|
|
205
|
+
os: 'OSX Mavericks',
|
|
206
|
+
date: '16/02/2017 @ 08:39:05',
|
|
207
|
+
status: 'error',
|
|
208
|
+
browser: 'Google Chrome 56',
|
|
209
|
+
position: 'Ribera',
|
|
210
|
+
application: 'Contacthub',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
ip: '20.48.229.177',
|
|
214
|
+
os: 'Windows 7',
|
|
215
|
+
date: '10/01/2017 @ 08:37:03',
|
|
216
|
+
status: 'ok',
|
|
217
|
+
browser: 'Mozilla Firefox',
|
|
218
|
+
position: 'Dragoon',
|
|
219
|
+
application: 'Contacthub',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
ip: '159.121.81.234',
|
|
223
|
+
os: 'Windows 7',
|
|
224
|
+
date: '19/02/2017 @ 02:59:23',
|
|
225
|
+
status: 'ok',
|
|
226
|
+
browser: 'Google Chrome 56',
|
|
227
|
+
position: 'Manila',
|
|
228
|
+
application: 'Contacthub',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
ip: '219.133.21.227',
|
|
232
|
+
os: 'Windows 7',
|
|
233
|
+
date: '27/01/2017 @ 07:41:17',
|
|
234
|
+
status: 'ok',
|
|
235
|
+
browser: 'Mozilla Firefox',
|
|
236
|
+
position: 'Nogal',
|
|
237
|
+
application: 'Contactdata',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
ip: '30.93.233.36',
|
|
241
|
+
os: 'OSX Mavericks',
|
|
242
|
+
date: '03/02/2017 @ 12:41:08',
|
|
243
|
+
status: 'error',
|
|
244
|
+
browser: 'Mozilla Firefox',
|
|
245
|
+
position: 'Trexlertown',
|
|
246
|
+
application: 'Engagement marketing',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
ip: '241.144.240.107',
|
|
250
|
+
os: 'Windows 10',
|
|
251
|
+
date: '28/01/2017 @ 02:04:30',
|
|
252
|
+
status: 'ok',
|
|
253
|
+
browser: 'Microsoft Edge',
|
|
254
|
+
position: 'Yettem',
|
|
255
|
+
application: 'Contacthub',
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
ip: '186.8.3.194',
|
|
259
|
+
os: 'OSX Mavericks',
|
|
260
|
+
date: '04/02/2017 @ 08:17:19',
|
|
261
|
+
status: 'error',
|
|
262
|
+
browser: 'Microsoft Edge',
|
|
263
|
+
position: 'Collins',
|
|
264
|
+
application: 'Contacthub',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
ip: '187.75.121.92',
|
|
268
|
+
os: 'Windows 7',
|
|
269
|
+
date: '17/02/2017 @ 04:06:22',
|
|
270
|
+
status: 'error',
|
|
271
|
+
browser: 'Microsoft Edge',
|
|
272
|
+
position: 'Bascom',
|
|
273
|
+
application: 'Contactsend',
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
ip: '161.197.46.151',
|
|
277
|
+
os: 'Windows 7',
|
|
278
|
+
date: '09/01/2017 @ 02:44:20',
|
|
279
|
+
status: 'ok',
|
|
280
|
+
browser: 'Internet Explorer 11',
|
|
281
|
+
position: 'Manchester',
|
|
282
|
+
application: 'Contactsend',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
ip: '131.151.132.175',
|
|
286
|
+
os: 'MacOS Sierra',
|
|
287
|
+
date: '07/02/2017 @ 12:38:21',
|
|
288
|
+
status: 'error',
|
|
289
|
+
browser: 'Google Chrome 56',
|
|
290
|
+
position: 'Silkworth',
|
|
291
|
+
application: 'Engagement marketing',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
ip: '58.255.154.169',
|
|
295
|
+
os: 'Windows 10',
|
|
296
|
+
date: '10/02/2017 @ 05:54:32',
|
|
297
|
+
status: 'ok',
|
|
298
|
+
browser: 'Google Chrome 56',
|
|
299
|
+
position: 'Mansfield',
|
|
300
|
+
application: 'Engagement marketing',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
ip: '203.10.238.46',
|
|
304
|
+
os: 'OSX Mavericks',
|
|
305
|
+
date: '06/01/2017 @ 06:14:43',
|
|
306
|
+
status: 'error',
|
|
307
|
+
browser: 'Microsoft Edge',
|
|
308
|
+
position: 'Barstow',
|
|
309
|
+
application: 'Engagement marketing',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
ip: '135.247.125.72',
|
|
313
|
+
os: 'OSX Mavericks',
|
|
314
|
+
date: '18/02/2017 @ 05:48:51',
|
|
315
|
+
status: 'error',
|
|
316
|
+
browser: 'Google Chrome 56',
|
|
317
|
+
position: 'Titanic',
|
|
318
|
+
application: 'Contactdata',
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
ip: '5.112.149.5',
|
|
322
|
+
os: 'Windows 7',
|
|
323
|
+
date: '10/02/2017 @ 03:32:51',
|
|
324
|
+
status: 'ok',
|
|
325
|
+
browser: 'Google Chrome 56',
|
|
326
|
+
position: 'Bagtown',
|
|
327
|
+
application: 'Contactplan',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
ip: '122.200.149.137',
|
|
331
|
+
os: 'Windows 7',
|
|
332
|
+
date: '04/01/2017 @ 12:23:37',
|
|
333
|
+
status: 'ok',
|
|
334
|
+
browser: 'Mozilla Firefox',
|
|
335
|
+
position: 'Fivepointville',
|
|
336
|
+
application: 'Contacthub',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
ip: '213.177.67.223',
|
|
340
|
+
os: 'Windows 7',
|
|
341
|
+
date: '01/01/2017 @ 05:07:22',
|
|
342
|
+
status: 'ok',
|
|
343
|
+
browser: 'Google Chrome 56',
|
|
344
|
+
position: 'Crawfordsville',
|
|
345
|
+
application: 'Engagement marketing',
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
ip: '134.208.149.245',
|
|
349
|
+
os: 'Windows 7',
|
|
350
|
+
date: '24/01/2017 @ 03:35:37',
|
|
351
|
+
status: 'ok',
|
|
352
|
+
browser: 'Internet Explorer 11',
|
|
353
|
+
position: 'Summerset',
|
|
354
|
+
application: 'Engagement marketing',
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
ip: '39.235.115.34',
|
|
358
|
+
os: 'OSX Mavericks',
|
|
359
|
+
date: '16/02/2017 @ 08:39:05',
|
|
360
|
+
status: 'error',
|
|
361
|
+
browser: 'Google Chrome 56',
|
|
362
|
+
position: 'Ribera',
|
|
363
|
+
application: 'Contacthub',
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
ip: '20.48.229.177',
|
|
367
|
+
os: 'Windows 7',
|
|
368
|
+
date: '10/01/2017 @ 08:37:03',
|
|
369
|
+
status: 'ok',
|
|
370
|
+
browser: 'Mozilla Firefox',
|
|
371
|
+
position: 'Dragoon',
|
|
372
|
+
application: 'Contacthub',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
ip: '159.121.81.234',
|
|
376
|
+
os: 'Windows 7',
|
|
377
|
+
date: '19/02/2017 @ 02:59:23',
|
|
378
|
+
status: 'ok',
|
|
379
|
+
browser: 'Google Chrome 56',
|
|
380
|
+
position: 'Manila',
|
|
381
|
+
application: 'Contacthub',
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
ip: '219.133.21.227',
|
|
385
|
+
os: 'Windows 7',
|
|
386
|
+
date: '27/01/2017 @ 07:41:17',
|
|
387
|
+
status: 'ok',
|
|
388
|
+
browser: 'Mozilla Firefox',
|
|
389
|
+
position: 'Nogal',
|
|
390
|
+
application: 'Contactdata',
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
ip: '30.93.233.36',
|
|
394
|
+
os: 'OSX Mavericks',
|
|
395
|
+
date: '03/02/2017 @ 12:41:08',
|
|
396
|
+
status: 'error',
|
|
397
|
+
browser: 'Mozilla Firefox',
|
|
398
|
+
position: 'Trexlertown',
|
|
399
|
+
application: 'Engagement marketing',
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
ip: '241.144.240.107',
|
|
403
|
+
os: 'Windows 10',
|
|
404
|
+
date: '28/01/2017 @ 02:04:30',
|
|
405
|
+
status: 'ok',
|
|
406
|
+
browser: 'Microsoft Edge',
|
|
407
|
+
position: 'Yettem',
|
|
408
|
+
application: 'Contacthub',
|
|
409
|
+
},
|
|
410
|
+
], []);
|
|
411
|
+
const [currentItems, setCurrentItems] = useState(null);
|
|
412
|
+
const [itemOffset, setItemOffset] = useState(0);
|
|
413
|
+
useEffect(() => {
|
|
414
|
+
const endOffset = itemOffset + (itemsPerPage ?? 10);
|
|
415
|
+
setCurrentItems(items.slice(itemOffset, endOffset));
|
|
416
|
+
}, [itemOffset, items, itemsPerPage]);
|
|
417
|
+
const handlePageClick = (data) => {
|
|
418
|
+
setItemOffset(data.offset);
|
|
419
|
+
};
|
|
420
|
+
return (_jsxs(_Fragment, { children: [currentItems?.map((item) => (_jsx("h3", { children: item.ip }, item.ip))), _jsx(Pagination, { ...args, itemsCount: items.length, onPageClick: data => handlePageClick(data) })] }));
|
|
421
|
+
};
|
|
@@ -7,7 +7,7 @@ import { Children, cloneElement, forwardRef, isValidElement, useEffect, useMemo,
|
|
|
7
7
|
import { mergeRefs } from 'react-merge-refs';
|
|
8
8
|
import { usePopperTooltip } from 'react-popper-tooltip';
|
|
9
9
|
import { useUIDSeed } from 'react-uid';
|
|
10
|
-
import styles from './popover.module.css';
|
|
10
|
+
import * as styles from './popover.module.css';
|
|
11
11
|
const cssEasingToArray = (cssEasing) => {
|
|
12
12
|
const [x1, y1, x2, y2] = cssEasing.replace(/[^0-9.,]+/g, '').split(',').map(i => parseFloat(i));
|
|
13
13
|
return [x1, y1, x2, y2];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Popover } from './popover';
|
|
4
|
+
declare const story: ComponentMeta<typeof Popover>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<{
|
|
7
|
+
style?: Record<string, any> | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
} & import("./popover").PopoverProps & React.RefAttributes<HTMLDivElement>>>;
|
|
10
|
+
export declare const CustomElement: ComponentStory<React.ForwardRefExoticComponent<{
|
|
11
|
+
style?: Record<string, any> | undefined;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
} & import("./popover").PopoverProps & React.RefAttributes<HTMLDivElement>>>;
|
|
14
|
+
export declare const WithField: ComponentStory<React.ForwardRefExoticComponent<{
|
|
15
|
+
style?: Record<string, any> | undefined;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
} & import("./popover").PopoverProps & React.RefAttributes<HTMLDivElement>>>;
|
|
18
|
+
export declare const Controlled: ComponentStory<React.ForwardRefExoticComponent<{
|
|
19
|
+
style?: Record<string, any> | undefined;
|
|
20
|
+
className?: string | undefined;
|
|
21
|
+
} & import("./popover").PopoverProps & React.RefAttributes<HTMLDivElement>>>;
|
|
22
|
+
//# sourceMappingURL=popover.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,OAAO,CAOxC,CAAC;AAEF,eAAe,KAAK,CAAC;AA6CrB,eAAO,MAAM,OAAO;;;4EAA2B,CAAC;AAyBhD,eAAO,MAAM,aAAa;;;4EAA0B,CAAC;AAuBrD,eAAO,MAAM,SAAS;;;4EAA6B,CAAC;AAoCpD,eAAO,MAAM,UAAU;;;4EAA8B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Button, Menu, Textfield, Title, } from '../..';
|
|
4
|
+
import { Popover } from './popover';
|
|
5
|
+
const story = {
|
|
6
|
+
title: 'Components/Dialogs/Popover',
|
|
7
|
+
component: Popover,
|
|
8
|
+
args: {
|
|
9
|
+
placement: 'auto-start',
|
|
10
|
+
trigger: _jsx(Button, { children: "Open Popover" }),
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export default story;
|
|
14
|
+
const DefaultTemplate = (args) => {
|
|
15
|
+
const [checked, setChecked] = useState(false);
|
|
16
|
+
return (_jsx(Popover, { ...args, children: _jsxs(Menu, { children: [_jsx(Menu.Item, { autoFocus: true, icon: "arrow-right", description: _jsx(_Fragment, { children: "Description for this item" }), value: "1", children: "Sample long menu item" }), _jsx(Menu.ItemCheckbox, { onClick: () => setChecked(val => !val), checked: checked, icon: checked ? 'check' : undefined, value: "2", children: "Checkbox item" }), _jsx(Menu.Item, { icon: "user", value: "3", description: (_jsxs(_Fragment, { children: [_jsx(Title, { as: "h2", level: "5", children: "Sample H2 Title longlonglonglonglonglonglonglonglonglonglong" }), _jsx("p", { children: "long text content placeholder to test wrapping and sizes" }), _jsx("img", { style: { width: '100%' }, alt: "", src: "https://images.unsplash.com/photo-1593963171957-d87a6279226d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" })] })), children: "Short menu label" }), _jsx(Menu.Separator, {}), _jsx(Menu.Item, { value: "4", icon: "arrow-down-to-bracket", children: "Even shorter" }), _jsx(Menu.Item, { value: "5", disabled: true, children: "Really?" })] }) }));
|
|
17
|
+
};
|
|
18
|
+
export const Default = DefaultTemplate.bind({});
|
|
19
|
+
const CustomTemplate = args => (_jsxs(_Fragment, { children: [_jsx(Popover, { ...args, children: _jsx("div", { style: {
|
|
20
|
+
background: 'var(--global-vibrancy-background)', backdropFilter: 'blur(10px)', border: '2px solid black', padding: 24,
|
|
21
|
+
}, children: "Lorem." }) }), _jsx(Popover, { ...args, children: _jsx("div", { style: {
|
|
22
|
+
background: 'var(--global-vibrancy-background)', backdropFilter: 'blur(10px)', border: '2px solid black', padding: 24,
|
|
23
|
+
}, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni error unde sapiente beatae! Nostrum praesentium similique veniam non ut nulla, incidunt velit et, placeat cupiditate, aliquid saepe. Atque, provident perferendis?" }) })] }));
|
|
24
|
+
export const CustomElement = CustomTemplate.bind({});
|
|
25
|
+
CustomElement.args = {
|
|
26
|
+
matchTriggerWidth: true,
|
|
27
|
+
placement: 'bottom-start',
|
|
28
|
+
};
|
|
29
|
+
const WithFieldTemplate = args => (_jsx(_Fragment, { children: _jsx(Popover, { ...args, children: _jsx("div", { style: {
|
|
30
|
+
background: 'var(--global-vibrancy-background)', backdropFilter: 'blur(10px)', border: '2px solid black', padding: 24,
|
|
31
|
+
}, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni error unde sapiente beatae! Nostrum praesentium similique veniam non ut nulla, incidunt velit et, placeat cupiditate, aliquid saepe. Atque, provident perferendis?" }) }) }));
|
|
32
|
+
export const WithField = WithFieldTemplate.bind({});
|
|
33
|
+
WithField.args = {
|
|
34
|
+
trigger: _jsx(Textfield, { type: "search", icon: "magnifying-glass" }),
|
|
35
|
+
matchTriggerWidth: true,
|
|
36
|
+
placement: 'bottom-start',
|
|
37
|
+
};
|
|
38
|
+
const ControlledTemplate = (args) => {
|
|
39
|
+
const [open, setOpen] = useState(false);
|
|
40
|
+
return (_jsx(Popover, { ...args, trigger: (_jsx(Button, { onClick: () => setOpen(val => !val), children: `${open ? 'Close' : 'Open'} Popover` })), onOpenChange: state => setOpen(state), open: open, children: _jsxs("div", { style: {
|
|
41
|
+
background: 'var(--global-vibrancy-background)', backdropFilter: 'blur(10px)', border: '2px solid black', padding: 24,
|
|
42
|
+
}, children: ["Lorem ipsum dolor, sit amet consectetur adipisicing elit. Magni error unde sapiente beatae! Nostrum praesentium similique veniam non ut nulla, incidunt velit et, placeat cupiditate, aliquid saepe. Atque, provident perferendis?", _jsx("button", { type: "button", onClick: () => setOpen(val => !val), children: "Close popover" })] }) }));
|
|
43
|
+
};
|
|
44
|
+
export const Controlled = ControlledTemplate.bind({});
|
|
45
|
+
Controlled.args = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import styles from './prose.module.css';
|
|
4
|
+
import * as styles from './prose.module.css';
|
|
5
5
|
export const Prose = forwardRef(({ children, className, as: Wrapper = 'div', ...otherProps }, forwardedRef) => (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Prose, className), ...otherProps, children: children })));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentStory, Meta } from '@storybook/react';
|
|
2
|
+
import { Polymorphic } from '../..';
|
|
3
|
+
import { Prose } from './prose';
|
|
4
|
+
declare const story: Meta<Polymorphic.OwnProps<typeof Prose>>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Default: ComponentStory<typeof Prose>;
|
|
7
|
+
//# sourceMappingURL=prose.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.stories.d.ts","sourceRoot":"","sources":["../../../src/components/prose/prose.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,EACM,WAAW,EAEvB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,CAMnD,CAAC;AAEF,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,OAAO,KAAK,CAiDhD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Container, Separator, Text, Title, } from '../..';
|
|
3
|
+
import { Prose } from './prose';
|
|
4
|
+
const story = {
|
|
5
|
+
title: 'Components/Typography/Prose',
|
|
6
|
+
component: Prose,
|
|
7
|
+
args: {
|
|
8
|
+
as: 'section',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default story;
|
|
12
|
+
export const Default = args => (_jsx(Container, { dimension: "medium", children: _jsxs(Prose, { ...args, children: [_jsx(Title, { as: "h1", level: "display", children: "Title" }), _jsx(Text, { size: 28, children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium." }), _jsx(Title, { as: "h2", level: "2", children: "Sample H2 Title" }), _jsx("img", { style: { width: '100%' }, alt: "", src: "https://images.unsplash.com/photo-1593963171957-d87a6279226d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" }), _jsx(Separator, {}), _jsx(Title, { as: "h2", level: "2", children: "Sample H2 Title" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" }), _jsx("img", { style: { width: '100%' }, alt: "", src: "https://images.unsplash.com/photo-1593963171957-d87a6279226d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" }), _jsx(Title, { as: "h3", level: "3", children: "Sample H3 Title" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" }), _jsx(Title, { as: "h4", level: "4", children: "Sample H4 Title" }), _jsx(Text, { children: "Lorem ipsum dolor sit, amet consectetur adipisicing elit. Eius dolores, tempore quas labore officiis praesentium. Porro sed dolorem, numquam temporibus consequuntur quam doloremque ducimus error tempora illo aliquam nesciunt nostrum!" })] }) }));
|
|
@@ -50,7 +50,7 @@ export declare const Select: import("react").ForwardRefExoticComponent<SelectHTM
|
|
|
50
50
|
/**
|
|
51
51
|
* Set the size of the select. This affects alsosize and style of the icon.
|
|
52
52
|
*/
|
|
53
|
-
dimension?: "
|
|
53
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
54
54
|
/**
|
|
55
55
|
* Set disabled state. The select is not interactive and grayed out.
|
|
56
56
|
*/
|
|
@@ -3,7 +3,7 @@ import clsx from 'clsx';
|
|
|
3
3
|
import { forwardRef, } from 'react';
|
|
4
4
|
import { useUIDSeed } from 'react-uid';
|
|
5
5
|
import { Stack, Symbol, Text, } from '../..';
|
|
6
|
-
import styles from './select.module.css';
|
|
6
|
+
import * as styles from './select.module.css';
|
|
7
7
|
export const Select = forwardRef(({ children, className, disabled = false, icon = 'sort-alt', label, kind = 'single', dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
|
|
8
8
|
const seedID = useUIDSeed();
|
|
9
9
|
const iconSizes = {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Select } from './select';
|
|
4
|
+
declare const story: ComponentMeta<typeof Select>;
|
|
5
|
+
export default story;
|
|
6
|
+
export declare const Single: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
kind?: "multiple" | "single" | undefined;
|
|
11
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
onChange?: ((event: React.ChangeEvent<HTMLSelectElement>) => void) | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLSelectElement>>>;
|
|
15
|
+
export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
18
|
+
label?: React.ReactNode;
|
|
19
|
+
kind?: "multiple" | "single" | undefined;
|
|
20
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
|
+
onChange?: ((event: React.ChangeEvent<HTMLSelectElement>) => void) | undefined;
|
|
23
|
+
} & React.RefAttributes<HTMLSelectElement>>>;
|
|
24
|
+
export declare const Multiple: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
|
|
27
|
+
label?: React.ReactNode;
|
|
28
|
+
kind?: "multiple" | "single" | undefined;
|
|
29
|
+
dimension?: "small" | "regular" | "big" | undefined;
|
|
30
|
+
disabled?: boolean | undefined;
|
|
31
|
+
onChange?: ((event: React.ChangeEvent<HTMLSelectElement>) => void) | undefined;
|
|
32
|
+
} & React.RefAttributes<HTMLSelectElement>>>;
|
|
33
|
+
//# sourceMappingURL=select.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CA0BvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM;;;;;;;;4CAA0B,CAAC;AAM9C,eAAO,MAAM,SAAS;;;;;;;;4CAA0B,CAAC;AAOjD,eAAO,MAAM,QAAQ;;;;;;;;4CAA4B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Select } from './select';
|
|
3
|
+
const story = {
|
|
4
|
+
title: 'Components/Inputs/Select',
|
|
5
|
+
component: Select,
|
|
6
|
+
argTypes: {
|
|
7
|
+
onChange: {
|
|
8
|
+
action: 'changed',
|
|
9
|
+
table: {
|
|
10
|
+
disable: true,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
kind: {
|
|
14
|
+
options: ['single', 'multiple'],
|
|
15
|
+
control: { type: 'radio' },
|
|
16
|
+
},
|
|
17
|
+
dimension: {
|
|
18
|
+
options: ['small', 'regular', 'big'],
|
|
19
|
+
control: { type: 'radio' },
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
options: [true, false],
|
|
23
|
+
control: { type: 'inline-radio' },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
dimension: 'regular',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export default story;
|
|
31
|
+
const SingleTemplate = args => (_jsxs(Select, { defaultValue: "placeholder", ...args, children: [_jsx("option", { value: "placeholder", hidden: true, disabled: true, children: "Pick an option" }), _jsxs("optgroup", { label: "Option Group One", children: [_jsx("option", { value: "1", children: "This is a very long option selected" }), _jsx("option", { value: "2", children: "Option 2" })] }), _jsxs("optgroup", { label: "Option Group Two", children: [_jsx("option", { value: "3", children: "Option 1" }), _jsx("option", { value: "4", children: "Option 2" }), _jsx("option", { value: "5", children: "Option 3" })] })] }));
|
|
32
|
+
const MultipleTemplate = args => (_jsxs(Select, { ...args, kind: "multiple", children: [_jsxs("optgroup", { label: "Option Group", children: [_jsx("option", { children: "Option 1" }), _jsx("option", { children: "Option 2" }), _jsx("option", { children: "Option 3" })] }), _jsxs("optgroup", { label: "Option Group 2", children: [_jsx("option", { children: "Option 4" }), _jsx("option", { children: "Option 5" }), _jsx("option", { children: "Option 6" })] })] }));
|
|
33
|
+
export const Single = SingleTemplate.bind({});
|
|
34
|
+
Single.args = {
|
|
35
|
+
disabled: false,
|
|
36
|
+
kind: 'single',
|
|
37
|
+
};
|
|
38
|
+
export const WithLabel = SingleTemplate.bind({});
|
|
39
|
+
WithLabel.args = {
|
|
40
|
+
disabled: false,
|
|
41
|
+
kind: 'single',
|
|
42
|
+
label: 'Label',
|
|
43
|
+
};
|
|
44
|
+
export const Multiple = MultipleTemplate.bind({});
|
|
45
|
+
Multiple.args = {
|
|
46
|
+
kind: 'multiple',
|
|
47
|
+
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { domAnimation, LazyMotion, m } from 'framer-motion';
|
|
4
4
|
import { forwardRef, useEffect, useRef, } from 'react';
|
|
5
|
-
import styles from './selection-controls.module.css';
|
|
5
|
+
import * as styles from './selection-controls.module.css';
|
|
6
6
|
export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular', onChange, indeterminate, hidden, ...otherProps }, forwardedRef) => {
|
|
7
7
|
const ref = useRef(forwardedRef);
|
|
8
8
|
useEffect(() => {
|