@jetbrains/ring-ui 7.0.72 → 7.0.74
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/babel.config.js +14 -8
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/{alert.js → alert.jsx} +14 -8
- package/components/alert/{container.js → container.jsx} +4 -3
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/{alert-service.js → alert-service.jsx} +8 -5
- package/components/auth/auth-core.js +6 -7
- package/components/auth/{down-notification.js → down-notification.jsx} +12 -4
- package/components/auth/{iframe-flow.js → iframe-flow.jsx} +6 -5
- package/components/auth/storage.js +1 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/{auth-dialog.js → auth-dialog.jsx} +18 -2
- package/components/auth-dialog-service/{auth-dialog-service.js → auth-dialog-service.jsx} +3 -2
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/{avatar-info.js → avatar-info.jsx} +4 -3
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/{avatar.js → avatar.jsx} +11 -6
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/{fallback-avatar.js → fallback-avatar.jsx} +16 -2
- package/components/avatar-stack/avatar-stack.d.ts +1 -1
- package/components/avatar-stack/avatar-stack.jsx +24 -0
- package/components/banner/banner.d.ts +1 -1
- package/components/banner/{banner.js → banner.jsx} +15 -3
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/{breadcrumbs.js → breadcrumbs.jsx} +4 -2
- package/components/button/button.d.ts +1 -1
- package/components/button/{button.js → button.jsx} +13 -5
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/{button-group.js → button-group.jsx} +5 -2
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/{caption.js → caption.jsx} +1 -2
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/{button-set.js → button-set.jsx} +3 -2
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/{button-toolbar.js → button-toolbar.jsx} +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/{checkbox.js → checkbox.jsx} +13 -2
- package/components/code/code.d.ts +1 -1
- package/components/code/{code.js → code.jsx} +8 -5
- package/components/collapse/collapse-content.jsx +65 -0
- package/components/collapse/{collapse-control.js → collapse-control.jsx} +6 -3
- package/components/collapse/{collapse.js → collapse.jsx} +12 -8
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/{confirm.js → confirm.jsx} +13 -2
- package/components/confirm-service/{confirm-service.js → confirm-service.jsx} +3 -2
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/{content-layout.js → content-layout.jsx} +6 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/{sidebar.js → sidebar.jsx} +11 -2
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/{contenteditable.js → contenteditable.jsx} +5 -6
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/{control-help.js → control-help.jsx} +1 -2
- package/components/control-label/{control-label.js → control-label.jsx} +5 -3
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/{data-list.js → data-list.jsx} +17 -8
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.jsx +215 -0
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/{item.js → item.jsx} +23 -7
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/{title.js → title.jsx} +11 -2
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/{date-input.js → date-input.jsx} +1 -2
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/{date-picker.js → date-picker.jsx} +24 -12
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/{date-popup.js → date-popup.jsx} +20 -9
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/{day.js → day.jsx} +4 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/{month-names.js → month-names.jsx} +12 -7
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/{month-slider.js → month-slider.jsx} +4 -3
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/{month.js → month.jsx} +4 -3
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/{months.js → months.jsx} +9 -6
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/{weekdays.js → weekdays.jsx} +6 -3
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/{years.js → years.jsx} +9 -6
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/{dialog.js → dialog.jsx} +39 -16
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.jsx +8 -0
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/{dropdown.js → dropdown.jsx} +10 -7
- package/components/dropdown-menu/{dropdown-menu.js → dropdown-menu.jsx} +10 -5
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/{editable-heading.js → editable-heading.jsx} +31 -3
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.jsx +23 -0
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.jsx +25 -0
- package/components/footer/{footer.js → footer.jsx} +14 -7
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/{create-stateful-context.js → create-stateful-context.jsx} +3 -2
- package/components/global/{focus-sensor-hoc.js → focus-sensor-hoc.jsx} +1 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/{react-dom-renderer.js → react-dom-renderer.jsx} +1 -2
- package/components/global/{rerender-hoc.js → rerender-hoc.jsx} +2 -3
- package/components/global/{theme.js → theme.jsx} +12 -4
- package/components/grid/col.d.ts +1 -1
- package/components/grid/{col.js → col.jsx} +3 -2
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/{grid.js → grid.jsx} +3 -2
- package/components/grid/row.d.ts +1 -1
- package/components/grid/{row.js → row.jsx} +3 -2
- package/components/group/group.d.ts +1 -1
- package/components/group/{group.js → group.jsx} +3 -2
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/{header-icon.js → header-icon.jsx} +1 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/{header.js → header.jsx} +4 -3
- package/components/header/links.d.ts +1 -1
- package/components/header/{links.js → links.jsx} +1 -2
- package/components/header/logo.d.ts +1 -1
- package/components/header/{logo.js → logo.jsx} +3 -2
- package/components/header/{profile.js → profile.jsx} +19 -6
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.jsx +16 -0
- package/components/header/services.d.ts +1 -1
- package/components/header/{services.js → services.jsx} +17 -12
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/{smart-profile.js → smart-profile.jsx} +1 -2
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/{smart-services.js → smart-services.jsx} +1 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/{tray.js → tray.jsx} +4 -3
- package/components/heading/{heading.js → heading.jsx} +16 -9
- package/components/i18n/{i18n-context.js → i18n-context.jsx} +1 -2
- package/components/icon/icon-svg.d.ts +1 -1
- package/components/icon/{icon-svg.js → icon-svg.jsx} +2 -3
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/{icon.js → icon.jsx} +4 -3
- package/components/input/input.d.ts +1 -1
- package/components/input/{input.js → input.jsx} +16 -2
- package/components/island/{adaptive-island-hoc.js → adaptive-island-hoc.jsx} +5 -2
- package/components/island/content.d.ts +1 -1
- package/components/island/{content.js → content.jsx} +13 -6
- package/components/island/header.d.ts +1 -1
- package/components/island/{header.js → header.jsx} +13 -6
- package/components/island/island.d.ts +1 -1
- package/components/island/{island.js → island.jsx} +3 -2
- package/components/link/clickable-link.d.ts +1 -1
- package/components/link/{clickable-link.js → clickable-link.jsx} +4 -2
- package/components/link/{link.js → link.jsx} +6 -3
- package/components/list/list-custom.d.ts +1 -1
- package/components/list/{list-custom.js → list-custom.jsx} +4 -2
- package/components/list/list-hint.d.ts +1 -1
- package/components/list/{list-hint.js → list-hint.jsx} +3 -2
- package/components/list/list-item.d.ts +1 -1
- package/components/list/{list-item.js → list-item.jsx} +33 -5
- package/components/list/list-separator.d.ts +1 -1
- package/components/list/{list-separator.js → list-separator.jsx} +3 -2
- package/components/list/list-title.d.ts +1 -1
- package/components/list/list-title.jsx +19 -0
- package/components/list/list-users-groups-source.js +1 -1
- package/components/list/list.classes.js +1 -1
- package/components/list/list.d.ts +6 -6
- package/components/list/{list.js → list.jsx} +45 -23
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/{loader.js → loader.jsx} +12 -6
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/{loader-inline.js → loader-inline.jsx} +5 -3
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/{loader-screen.js → loader-screen.jsx} +3 -2
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/{login-dialog.js → login-dialog.jsx} +9 -2
- package/components/login-dialog/{service.js → service.jsx} +3 -2
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/{markdown.js → markdown.jsx} +3 -2
- package/components/message/message.d.ts +1 -1
- package/components/message/{message.js → message.jsx} +21 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/{pager.js → pager.jsx} +56 -12
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/{panel.js → panel.jsx} +3 -2
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/{popup.js → popup.jsx} +26 -14
- package/components/popup/popup.target.jsx +10 -0
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/{popup-menu.js → popup-menu.jsx} +3 -2
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/{progress-bar.js → progress-bar.jsx} +3 -2
- package/components/query-assist/query-assist-suggestions.d.ts +1 -1
- package/components/query-assist/{query-assist-suggestions.js → query-assist-suggestions.jsx} +10 -5
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/{query-assist.js → query-assist.jsx} +46 -8
- package/components/radio/radio-item.d.ts +1 -1
- package/components/radio/{radio-item.js → radio-item.jsx} +11 -3
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/{radio.js → radio.jsx} +1 -2
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/{scrollable-section.js → scrollable-section.jsx} +2 -3
- package/components/select/select-filter.d.ts +1 -1
- package/components/select/{select-filter.js → select-filter.jsx} +5 -2
- package/components/select/select-popup.d.ts +7 -7
- package/components/select/{select-popup.js → select-popup.jsx} +43 -13
- package/components/select/select.d.ts +3 -3
- package/components/select/{select.js → select.jsx} +92 -44
- package/components/shortcuts/{shortcuts-hoc.js → shortcuts-hoc.jsx} +3 -2
- package/components/slider/{slider.js → slider.jsx} +50 -32
- package/components/tab-trap/{tab-trap.js → tab-trap.jsx} +39 -33
- package/components/table/cell.d.ts +1 -1
- package/components/table/{cell.js → cell.jsx} +3 -2
- package/components/table/{disable-hover-hoc.js → disable-hover-hoc.jsx} +2 -3
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/{header-cell.js → header-cell.jsx} +12 -2
- package/components/table/header.d.ts +2 -2
- package/components/table/{header.js → header.jsx} +19 -6
- package/components/table/multitable.d.ts +1 -1
- package/components/table/{multitable.js → multitable.jsx} +4 -3
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/{row-with-focus-sensor.js → row-with-focus-sensor.jsx} +1 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/{row.js → row.jsx} +24 -5
- package/components/table/{selection-shortcuts-hoc.js → selection-shortcuts-hoc.jsx} +1 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/{simple-table.js → simple-table.jsx} +2 -3
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/{smart-table.js → smart-table.jsx} +1 -2
- package/components/table/table.d.ts +2 -2
- package/components/table/{table.js → table.jsx} +30 -9
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/{collapsible-more.js → collapsible-more.jsx} +14 -7
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/{collapsible-tab.js → collapsible-tab.jsx} +3 -4
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/{collapsible-tabs.js → collapsible-tabs.jsx} +11 -3
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/{dumb-tabs.js → dumb-tabs.jsx} +10 -4
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/{smart-tabs.js → smart-tabs.jsx} +3 -2
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.jsx +16 -0
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/{tab.js → tab.jsx} +3 -2
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/{tag.js → tag.jsx} +24 -16
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/{tags-input.js → tags-input.jsx} +13 -5
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/{tags-list.js → tags-list.jsx} +8 -4
- package/components/text/text.d.ts +1 -1
- package/components/text/{text.js → text.jsx} +3 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.jsx +37 -0
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/{tooltip.js → tooltip.jsx} +12 -3
- package/components/upload/{upload.js → upload.jsx} +7 -4
- package/components/user-agreement/{service.js → service.jsx} +13 -4
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.jsx +61 -0
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.jsx +64 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/{smart-user-card-tooltip.js → smart-user-card-tooltip.jsx} +6 -3
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/{tooltip.js → tooltip.jsx} +12 -9
- package/package.json +28 -33
- package/components/avatar-stack/avatar-stack.js +0 -18
- package/components/collapse/collapse-content.js +0 -76
- package/components/data-list/data-list.mock.js +0 -170
- package/components/dropdown/anchor.js +0 -7
- package/components/error-bubble/error-bubble.js +0 -17
- package/components/error-message/error-message.js +0 -17
- package/components/header/services-link.js +0 -15
- package/components/list/list-title.js +0 -13
- package/components/popup/popup.target.js +0 -7
- package/components/tabs/tab-link.js +0 -9
- package/components/toggle/toggle.js +0 -22
- package/components/user-agreement/user-agreement.js +0 -33
- package/components/user-card/card.js +0 -31
- /package/components/global/{controls-height.js → controls-height.jsx} +0 -0
- /package/components/link/{clickableLink.js → clickableLink.jsx} +0 -0
- /package/components/tabs/{custom-item.js → custom-item.jsx} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import Link from '../link/link';
|
|
2
|
+
import Tag from '../tag/tag';
|
|
3
|
+
const items = [
|
|
4
|
+
{
|
|
5
|
+
id: 1,
|
|
6
|
+
title: (<span>
|
|
7
|
+
<strong>Assigner</strong> in 60 projects
|
|
8
|
+
</span>),
|
|
9
|
+
collapsible: true,
|
|
10
|
+
selectable: true,
|
|
11
|
+
items: [
|
|
12
|
+
{
|
|
13
|
+
id: 11,
|
|
14
|
+
title: '6 projects: as a member of jetbrains-team',
|
|
15
|
+
collapsible: true,
|
|
16
|
+
selectable: true,
|
|
17
|
+
items: [
|
|
18
|
+
{
|
|
19
|
+
id: 111,
|
|
20
|
+
selectable: true,
|
|
21
|
+
title: <Link href='#'>TeamCity</Link>,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 112,
|
|
25
|
+
selectable: true,
|
|
26
|
+
title: <Link href='#'>YouTrack</Link>,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 113,
|
|
30
|
+
selectable: true,
|
|
31
|
+
title: <Link href='#'>Sandbox</Link>,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 114,
|
|
35
|
+
selectable: true,
|
|
36
|
+
title: <Link href='#'>Exception Analyzer</Link>,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 115,
|
|
40
|
+
selectable: true,
|
|
41
|
+
title: <Link href='#'>MPS</Link>,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 2,
|
|
49
|
+
title: (<span>
|
|
50
|
+
<strong>Code Reviewer</strong> in 5 projects
|
|
51
|
+
</span>),
|
|
52
|
+
selectable: true,
|
|
53
|
+
collapsible: true,
|
|
54
|
+
items: [
|
|
55
|
+
{
|
|
56
|
+
id: 21,
|
|
57
|
+
selectable: true,
|
|
58
|
+
title: (<span>
|
|
59
|
+
<Link href='#'>JetProfile</Link>
|
|
60
|
+
<span> </span>
|
|
61
|
+
<Tag>duplicate</Tag>
|
|
62
|
+
</span>),
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 22,
|
|
66
|
+
title: '6 projects: as a member of jetbrains-team',
|
|
67
|
+
collapsible: true,
|
|
68
|
+
items: [
|
|
69
|
+
{
|
|
70
|
+
id: 221,
|
|
71
|
+
collapsible: true,
|
|
72
|
+
title: <Link href='#'>TeamCity</Link>,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 222,
|
|
76
|
+
collapsible: true,
|
|
77
|
+
title: <Link href='#'>YouTrack</Link>,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 223,
|
|
81
|
+
collapsible: true,
|
|
82
|
+
title: <Link href='#'>Sandbox</Link>,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 224,
|
|
86
|
+
collapsible: true,
|
|
87
|
+
title: <Link href='#'>Exception Analyzer</Link>,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 225,
|
|
91
|
+
collapsible: true,
|
|
92
|
+
title: <Link href='#'>MPS</Link>,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 23,
|
|
98
|
+
collapsible: true,
|
|
99
|
+
title: (<span>
|
|
100
|
+
<Link href='#'>CustomJDK</Link>
|
|
101
|
+
<span>: as a member of ide-developers</span>
|
|
102
|
+
</span>),
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 3,
|
|
108
|
+
title: (<span>
|
|
109
|
+
<strong>Code Viewer</strong> in 5 projects
|
|
110
|
+
</span>),
|
|
111
|
+
selectable: true,
|
|
112
|
+
collapsible: true,
|
|
113
|
+
items: [
|
|
114
|
+
{
|
|
115
|
+
id: 31,
|
|
116
|
+
collapsible: true,
|
|
117
|
+
title: (<span>
|
|
118
|
+
<Link href='#'>ide-frontend</Link>
|
|
119
|
+
<span>: as a member of ide-developers</span>
|
|
120
|
+
</span>),
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 32,
|
|
124
|
+
collapsible: true,
|
|
125
|
+
title: (<span>
|
|
126
|
+
<Link href='#'>ide-frontend</Link>
|
|
127
|
+
<span>: as a member of ide-frontend Code Viewers</span>
|
|
128
|
+
</span>),
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 4,
|
|
134
|
+
title: (<span>
|
|
135
|
+
<strong>Commenter</strong> in 12 projects
|
|
136
|
+
</span>),
|
|
137
|
+
collapsible: true,
|
|
138
|
+
items: [
|
|
139
|
+
{
|
|
140
|
+
id: 41,
|
|
141
|
+
collapsible: true,
|
|
142
|
+
title: (<span>
|
|
143
|
+
<Link href='#'>Intellij IDEA</Link>
|
|
144
|
+
<span>: as a member of Registered Users</span>
|
|
145
|
+
</span>),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 42,
|
|
149
|
+
collapsible: true,
|
|
150
|
+
title: (<span>
|
|
151
|
+
<Link href='#'>YouTrack Backlog</Link>
|
|
152
|
+
<span>: as a member of jetbrains-team</span>
|
|
153
|
+
</span>),
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 5,
|
|
159
|
+
collapsible: true,
|
|
160
|
+
title: (<span>
|
|
161
|
+
<strong>Developer</strong>
|
|
162
|
+
<span> in 57 projects </span>
|
|
163
|
+
<Tag>team role</Tag>
|
|
164
|
+
</span>),
|
|
165
|
+
items: [
|
|
166
|
+
{
|
|
167
|
+
id: 51,
|
|
168
|
+
selectable: true,
|
|
169
|
+
collapsible: true,
|
|
170
|
+
title: <Link href='#'>Wasabi</Link>,
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: 6,
|
|
176
|
+
collapsible: true,
|
|
177
|
+
title: (<span>
|
|
178
|
+
<strong>Git Hosting Admin</strong>
|
|
179
|
+
<span> in project </span>
|
|
180
|
+
<Link href='#'>Hackathon 2016</Link>
|
|
181
|
+
<span>: as a member of jetbrains-team</span>
|
|
182
|
+
</span>),
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: 7,
|
|
186
|
+
title: (<span>
|
|
187
|
+
<strong>Git Hosting Checkout</strong> in 7 projects
|
|
188
|
+
</span>),
|
|
189
|
+
selectable: true,
|
|
190
|
+
collapsible: true,
|
|
191
|
+
},
|
|
192
|
+
];
|
|
193
|
+
export const moreItems = [
|
|
194
|
+
{
|
|
195
|
+
id: 91,
|
|
196
|
+
selectable: true,
|
|
197
|
+
collapsible: true,
|
|
198
|
+
title: (<span>
|
|
199
|
+
<Link href='#'>More item 1</Link>
|
|
200
|
+
<span> </span>
|
|
201
|
+
<Tag>duplicate</Tag>
|
|
202
|
+
</span>),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 92,
|
|
206
|
+
selectable: true,
|
|
207
|
+
collapsible: true,
|
|
208
|
+
title: (<span>
|
|
209
|
+
<Link href='#'>More item 2</Link>
|
|
210
|
+
<span> </span>
|
|
211
|
+
<Tag>duplicate</Tag>
|
|
212
|
+
</span>),
|
|
213
|
+
},
|
|
214
|
+
];
|
|
215
|
+
export default items;
|
|
@@ -47,6 +47,6 @@ export default class Item<T extends SelectionItem> extends PureComponent<ItemPro
|
|
|
47
47
|
onShowLess: () => void;
|
|
48
48
|
onFocus: () => void;
|
|
49
49
|
onSelect: (selected: boolean) => void;
|
|
50
|
-
renderItem: (model: T, parentShift: number) => import("react
|
|
51
|
-
render(): import("react
|
|
50
|
+
renderItem: (model: T, parentShift: number) => import("react").JSX.Element;
|
|
51
|
+
render(): import("react").JSX.Element;
|
|
52
52
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import chevronRightIcon from '@jetbrains/icons/chevron-right';
|
|
4
3
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
|
@@ -44,28 +43,45 @@ export default class Item extends PureComponent {
|
|
|
44
43
|
renderItem = (model, parentShift) => {
|
|
45
44
|
const { onFocus, onSelect, selection, level, itemFormatter } = this.props;
|
|
46
45
|
const item = itemFormatter(model);
|
|
47
|
-
return (
|
|
46
|
+
return (<Item key={item.key || item.id} item={model} title={item.title} items={item.items} level={level + 1} parentShift={parentShift} itemFormatter={itemFormatter} collapsible={item.collapsible} collapsed={item.collapsed} onCollapse={item.onCollapse} onExpand={item.onExpand} showFocus={selection.isFocused(model)} onFocus={onFocus} selection={selection} selectable={item.selectable} selected={selection.isSelected(model)} partialSelected={selection.isPartialSelected(model)} onSelect={onSelect}/>);
|
|
48
47
|
};
|
|
49
48
|
render() {
|
|
50
49
|
const { title, items, showMoreLessButton, level, parentShift, showFocus, selectable, selected, partialSelected, collapsible, collapsed, onCollapse, onExpand, } = this.props;
|
|
51
50
|
let moreLessButton;
|
|
52
51
|
if (showMoreLessButton === moreLessButtonStates.MORE || showMoreLessButton === moreLessButtonStates.MORE_LOADING) {
|
|
53
|
-
moreLessButton = (
|
|
52
|
+
moreLessButton = (<Text info size={Text.Size.S}>
|
|
53
|
+
<Link inherit pseudo onClick={this.onShowMore}>
|
|
54
|
+
{'Show more'}
|
|
55
|
+
</Link>
|
|
56
|
+
{showMoreLessButton === moreLessButtonStates.MORE_LOADING && (<LoaderInline className={styles.showMoreLoader}/>)}
|
|
57
|
+
</Text>);
|
|
54
58
|
}
|
|
55
59
|
else if (showMoreLessButton === moreLessButtonStates.LESS) {
|
|
56
|
-
moreLessButton = (
|
|
60
|
+
moreLessButton = (<Text info size={Text.Size.S}>
|
|
61
|
+
<Link inherit pseudo onClick={this.onShowLess}>
|
|
62
|
+
{'Show less'}
|
|
63
|
+
</Link>
|
|
64
|
+
</Text>);
|
|
57
65
|
}
|
|
58
66
|
let collapserExpander = null;
|
|
59
67
|
if (collapsible) {
|
|
60
68
|
if (collapsed) {
|
|
61
|
-
collapserExpander = (
|
|
69
|
+
collapserExpander = (<Button title='Expand' onClick={onExpand} icon={chevronRightIcon} className={styles.collapseButton} iconClassName={styles.collapseIcon} data-test='ring-data-list-expand'/>);
|
|
62
70
|
}
|
|
63
71
|
else {
|
|
64
|
-
collapserExpander = (
|
|
72
|
+
collapserExpander = (<Button title='Collapse' onClick={onCollapse} icon={chevronDownIcon} className={styles.collapseButton} iconClassName={styles.collapseIcon} data-test='ring-data-list-collapse'/>);
|
|
65
73
|
}
|
|
66
74
|
}
|
|
67
75
|
const itemIsEmpty = !items?.length || (collapsible && collapsed);
|
|
68
76
|
const offset = level * LIST_LEFT_OFFSET + ITEM_LEFT_OFFSET + parentShift;
|
|
69
|
-
return (
|
|
77
|
+
return (<li>
|
|
78
|
+
<Title title={title} focused={showFocus} showFocus={showFocus} selectable={selectable} selected={selected} partialSelected={partialSelected} collapserExpander={collapserExpander} onFocus={this.onFocus} onSelect={this.onSelect} offset={offset}/>
|
|
79
|
+
|
|
80
|
+
{!itemIsEmpty ? (<ul className={styles.itemContent}>
|
|
81
|
+
{items.map(model => this.renderItem(model, parentShift))}
|
|
82
|
+
|
|
83
|
+
{showMoreLessButton !== moreLessButtonStates.UNUSED ? (<li className={styles.showMore}>{moreLessButton}</li>) : null}
|
|
84
|
+
</ul>) : null}
|
|
85
|
+
</li>);
|
|
70
86
|
}
|
|
71
87
|
}
|
|
@@ -21,7 +21,7 @@ declare class Title extends PureComponent<TitleProps> {
|
|
|
21
21
|
onCheckboxFocus: () => void;
|
|
22
22
|
onCheckboxChange: () => void;
|
|
23
23
|
toggleSelection(): void;
|
|
24
|
-
render(): import("react
|
|
24
|
+
render(): import("react").JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
declare const _default: import("react").ComponentClass<import("../global/focus-sensor-hoc").FocusSensorProps<TitleProps, HTMLDivElement, typeof Title>, any>;
|
|
27
27
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import focusSensorHOC from '../global/focus-sensor-hoc';
|
|
@@ -31,7 +30,17 @@ class Title extends PureComponent {
|
|
|
31
30
|
[styles.titleFocused]: showFocus,
|
|
32
31
|
[styles.titleSelected]: selected,
|
|
33
32
|
});
|
|
34
|
-
return (
|
|
33
|
+
return (<div id={this.id} className={classes} style={{ paddingLeft: offset }} ref={innerRef}>
|
|
34
|
+
<div className={styles.boxes}>
|
|
35
|
+
{selectable && (<div className={styles.checkboxBox}>
|
|
36
|
+
<Checkbox aria-labelledby={this.id} className={showFocus ? 'ring-checkbox_focus' : ''} checked={selected} indeterminate={partialSelected} onFocus={this.onCheckboxFocus} onChange={this.onCheckboxChange} tabIndex={-1}/>
|
|
37
|
+
</div>)}
|
|
38
|
+
|
|
39
|
+
{collapserExpander}
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{title}
|
|
43
|
+
</div>);
|
|
35
44
|
}
|
|
36
45
|
}
|
|
37
46
|
export default focusSensorHOC(Title);
|
|
@@ -24,5 +24,5 @@ export default class DateInput extends React.PureComponent<DateInputProps> {
|
|
|
24
24
|
updateInput({ text, active }: UpdateInputConfig): void;
|
|
25
25
|
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
26
|
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
27
|
-
render():
|
|
27
|
+
render(): React.JSX.Element;
|
|
28
28
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import Input from '../input/input';
|
|
@@ -77,6 +76,6 @@ export default class DateInput extends React.PureComponent {
|
|
|
77
76
|
}
|
|
78
77
|
})();
|
|
79
78
|
const classes = classNames(styles.filter, styles[`${name}Input`], divider && styles[`${name}InputWithDivider`], 'ring-js-shortcuts');
|
|
80
|
-
return (
|
|
79
|
+
return (<Input autoComplete='off' borderless height={ControlsHeight.L} data-name={name} inputRef={this.inputRef} className={classes} value={displayText} onChange={this.handleChange} onFocus={onActivate} onKeyDown={this.handleKeyDown} onClear={onClear} placeholder={placeholder}/>);
|
|
81
80
|
}
|
|
82
81
|
}
|
|
@@ -45,6 +45,6 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
|
|
|
45
45
|
parse: (arg: string | number | Date | null | undefined) => Date | null;
|
|
46
46
|
formatTime(): string | null;
|
|
47
47
|
getAnchorText: () => string;
|
|
48
|
-
render():
|
|
48
|
+
render(): React.JSX.Element;
|
|
49
49
|
}
|
|
50
50
|
export type DatePickerAttrs = React.JSX.LibraryManagedAttributes<typeof DatePicker, DatePickerProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { format as formatDate } from 'date-fns/format';
|
|
5
5
|
import { isSameDay } from 'date-fns/isSameDay';
|
|
@@ -19,14 +19,16 @@ import Link from '../link/link';
|
|
|
19
19
|
import { Size } from '../input/input';
|
|
20
20
|
import { I18nContext } from '../i18n/i18n-context';
|
|
21
21
|
import DatePopup from './date-popup';
|
|
22
|
-
import styles from './date-picker.css';
|
|
23
22
|
import formats from './formats';
|
|
24
|
-
|
|
23
|
+
import styles from './date-picker.css';
|
|
24
|
+
const PopupComponent = ({ hidden = false, className, popupRef, onClear, datePopupProps, onComplete, ...restProps }) => (<Popup hidden={hidden} className={className} ref={popupRef} directions={[
|
|
25
25
|
Popup.PopupProps.Directions.BOTTOM_RIGHT,
|
|
26
26
|
Popup.PopupProps.Directions.BOTTOM_LEFT,
|
|
27
27
|
Popup.PopupProps.Directions.TOP_LEFT,
|
|
28
28
|
Popup.PopupProps.Directions.TOP_RIGHT,
|
|
29
|
-
]
|
|
29
|
+
]} {...restProps} trapFocus>
|
|
30
|
+
<DatePopup onClear={onClear} {...datePopupProps} onComplete={onComplete}/>
|
|
31
|
+
</Popup>);
|
|
30
32
|
/**
|
|
31
33
|
* @name Date Picker
|
|
32
34
|
*/
|
|
@@ -143,17 +145,27 @@ export default class DatePicker extends PureComponent {
|
|
|
143
145
|
return rangePlaceholder ?? translations?.setPeriod ?? translate('setPeriod');
|
|
144
146
|
};
|
|
145
147
|
render() {
|
|
146
|
-
const anchorContent = (
|
|
148
|
+
const anchorContent = (<div className={styles.anchorContent}>
|
|
149
|
+
<Icon glyph={calendarIcon} className={styles.calendarIcon}/>
|
|
150
|
+
{this.getAnchorText()}
|
|
151
|
+
<Icon glyph={chevronDownIcon} className={styles.chevronDownIcon}/>
|
|
152
|
+
</div>);
|
|
147
153
|
const { className, popupClassName, clear, inline, dropdownProps, translations, ...datePopupProps } = this.props;
|
|
148
154
|
const classes = classNames(styles.datePicker, className, styles[`size${this.props.size}`], {
|
|
149
155
|
[styles.inline]: inline,
|
|
150
156
|
});
|
|
151
|
-
return (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
return (<Dropdown className={classes} disabled={this.props.disabled} data-test='ring-date-picker' anchor={inline ? (<Link data-test-ring-dropdown-anchor className={styles.anchor} disabled={this.props.disabled ?? false} pseudo>
|
|
158
|
+
{this.getAnchorText()}
|
|
159
|
+
</Link>) : (<Button data-test-ring-dropdown-anchor className={styles.anchor} inline={false} disabled={this.props.disabled ?? false} {...this.props.buttonAttributes}>
|
|
160
|
+
{anchorContent}
|
|
161
|
+
</Button>)} {...dropdownProps}>
|
|
162
|
+
<PopupComponent className={popupClassName} popupRef={this.popupRef} onClear={clear ? this.clear : null} datePopupProps={{
|
|
163
|
+
...datePopupProps,
|
|
164
|
+
translations,
|
|
165
|
+
onChange: this.handleChange,
|
|
166
|
+
parseDateInput: this.parse,
|
|
167
|
+
time: this.formatTime(),
|
|
168
|
+
}} onComplete={this.closePopup}/>
|
|
169
|
+
</Dropdown>);
|
|
158
170
|
}
|
|
159
171
|
}
|
|
@@ -30,5 +30,5 @@ export default class DatePopup extends Component<DatePopupProps, DatePopupState>
|
|
|
30
30
|
selectHandler: (date: Date) => void;
|
|
31
31
|
handleScroll: (scrollDate: number) => void;
|
|
32
32
|
onClear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
33
|
-
render():
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as _createElement } from "react";
|
|
3
1
|
/* eslint-disable max-lines */
|
|
4
2
|
import { Component } from 'react';
|
|
5
3
|
import * as React from 'react';
|
|
@@ -300,12 +298,25 @@ export default class DatePopup extends Component {
|
|
|
300
298
|
onScrollChange: this.scrollTo,
|
|
301
299
|
};
|
|
302
300
|
const clearable = Boolean(this.props.onClear);
|
|
303
|
-
return (
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
301
|
+
return (<div className={styles.datePopup} data-test='ring-date-popup' ref={this.componentRef}>
|
|
302
|
+
<div className={styles.filterWrapper}>
|
|
303
|
+
{names.map(name => {
|
|
304
|
+
let onClear;
|
|
305
|
+
if (clearable && name !== 'from' && !this.isInTimeMode()) {
|
|
306
|
+
onClear = this.onClear.bind(this);
|
|
307
|
+
}
|
|
308
|
+
return (<DateInput {...this.props} {...this.state} divider={name === 'from' && (!!dates[name] || !!parsedTo)} name={name} key={name} date={dates[name]} active={this.state.active === name} onActivate={this.handleActivate(name)} onInput={this.handleInput} onConfirm={this.handleConfirm(name)} onClear={onClear} locale={locale}/>);
|
|
309
|
+
})}
|
|
310
|
+
|
|
311
|
+
{this.isInTimeMode() ? (<DateInput {...this.props} text={this.state.text} divider={!!parsedDate} hoverDate={null} name={'time'} key={'time'} date={null} time={time} active={this.state.active === 'time'} onActivate={this.handleActivate('time')} onInput={this.handleInput} onConfirm={this.handleConfirm('time')} onClear={(clearable && this.onClear) || undefined} locale={locale}/>) : ('')}
|
|
312
|
+
</div>
|
|
313
|
+
<Weekdays locale={locale}/>
|
|
314
|
+
<div className={styles.calendar}>
|
|
315
|
+
<Months {...calendarProps} onHover={this.hoverHandler} onSelect={this.selectHandler} locale={locale}/>
|
|
316
|
+
<Years {...calendarProps}/>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
{this.props.renderAfterCalendar && this.props.renderAfterCalendar(this.state)}
|
|
320
|
+
</div>);
|
|
310
321
|
}
|
|
311
322
|
}
|
|
@@ -13,5 +13,5 @@ export default class Day extends Component<DayProps> {
|
|
|
13
13
|
inRange: (range: [Date, Date] | null) => boolean | null;
|
|
14
14
|
isDisabled: (date: Date) => boolean;
|
|
15
15
|
parse(text: string | null | undefined): Date | null;
|
|
16
|
-
render(): import("react
|
|
16
|
+
render(): import("react").JSX.Element;
|
|
17
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { addDays } from 'date-fns/addDays';
|
|
@@ -53,7 +52,7 @@ export default class Day extends Component {
|
|
|
53
52
|
const activeSpreadRange = makeSpreadRange(activeRange);
|
|
54
53
|
return (
|
|
55
54
|
// TODO make keyboard navigation actually work
|
|
56
|
-
|
|
55
|
+
<button type='button' className={classNames(styles.day, styles[`Day${dayInWeek}`], {
|
|
57
56
|
[styles.current]: ['date', 'from', 'to'].some(this.is),
|
|
58
57
|
[styles.active]: !disabled && this.is('activeDate'),
|
|
59
58
|
[styles.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
|
|
@@ -66,6 +65,8 @@ export default class Day extends Component {
|
|
|
66
65
|
[styles.spread]: this.inRange(spreadRange),
|
|
67
66
|
[styles.activeSpread]: !disabled && this.inRange(activeSpreadRange),
|
|
68
67
|
[styles.disabled]: disabled,
|
|
69
|
-
})
|
|
68
|
+
})} onClick={this.handleClick} onMouseOver={this.handleMouseOver} onFocus={this.handleMouseOver} onMouseOut={this.handleMouseOut} onBlur={this.handleMouseOut} disabled={disabled}>
|
|
69
|
+
{empty || <span className={classNames({ [styles.today]: isToday(day) })}>{format(day, 'd')}</span>}
|
|
70
|
+
</button>);
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type MonthsProps } from './consts';
|
|
2
|
-
export default function MonthNames(props: MonthsProps): import("react
|
|
2
|
+
export default function MonthNames(props: MonthsProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
@@ -18,9 +17,11 @@ class MonthName extends PureComponent {
|
|
|
18
17
|
};
|
|
19
18
|
render() {
|
|
20
19
|
const { month, locale } = this.props;
|
|
21
|
-
return (
|
|
20
|
+
return (<button type='button' className={classNames(styles.monthName, {
|
|
22
21
|
[styles.today]: isThisMonth(month),
|
|
23
|
-
})
|
|
22
|
+
})} onClick={this.handleClick}>
|
|
23
|
+
{format(month, 'LLL', { locale })}
|
|
24
|
+
</button>);
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
export default function MonthNames(props) {
|
|
@@ -36,8 +37,12 @@ export default function MonthNames(props) {
|
|
|
36
37
|
if (props.currentRange) {
|
|
37
38
|
[top, bottom] = props.currentRange.map(date => Math.floor(pxToDate.x(Number(date))));
|
|
38
39
|
}
|
|
39
|
-
return (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
return (<div className={styles.monthNames}>
|
|
41
|
+
{months.map(month => (<MonthName key={+month} month={month} onScrollChange={props.onScrollChange} locale={locale}/>))}
|
|
42
|
+
{props.currentRange && (<div className={styles.range} style={{
|
|
43
|
+
top: top - 1,
|
|
44
|
+
height: bottom + 1 - (top - 1),
|
|
45
|
+
}}/>)}
|
|
46
|
+
<MonthSlider {...props} pxToDate={pxToDate}/>
|
|
47
|
+
</div>);
|
|
43
48
|
}
|
|
@@ -15,6 +15,6 @@ export default class MonthSlider extends PureComponent<MonthSliderProps> {
|
|
|
15
15
|
onMouseDown: () => void;
|
|
16
16
|
onMouseUp: () => void;
|
|
17
17
|
onMouseMove: (e: MouseEvent) => void;
|
|
18
|
-
render(): import("react
|
|
18
|
+
render(): import("react").JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { addYears } from 'date-fns/addYears';
|
|
@@ -39,8 +38,10 @@ export default class MonthSlider extends PureComponent {
|
|
|
39
38
|
years.push(year);
|
|
40
39
|
}
|
|
41
40
|
const classes = classNames(styles.monthSlider, { [styles.dragging]: this.state.dragging });
|
|
42
|
-
return (
|
|
41
|
+
return (<div>
|
|
42
|
+
{years.map(date => (<button type='button' key={+date} className={classes} style={{
|
|
43
43
|
top: Math.floor(this.props.pxToDate.x(Number(date)) - units.cellSize),
|
|
44
|
-
}
|
|
44
|
+
}} onMouseDown={this.onMouseDown}/>))}
|
|
45
|
+
</div>);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -2,4 +2,4 @@ import { type MonthsProps } from './consts';
|
|
|
2
2
|
export interface MonthProps extends MonthsProps {
|
|
3
3
|
month: Date;
|
|
4
4
|
}
|
|
5
|
-
export default function Month(props: MonthProps): import("react
|
|
5
|
+
export default function Month(props: MonthProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { createElement as _createElement } from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
1
|
import { addDays } from 'date-fns/addDays';
|
|
4
2
|
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
5
3
|
import { format } from 'date-fns/format';
|
|
@@ -22,5 +20,8 @@ export default function Month(props) {
|
|
|
22
20
|
days.push(day);
|
|
23
21
|
day = addDays(day, 1);
|
|
24
22
|
}
|
|
25
|
-
return (
|
|
23
|
+
return (<div className={styles.month}>
|
|
24
|
+
<span className={styles.monthTitle}>{format(props.month, 'LLLL', { locale })}</span>
|
|
25
|
+
{days.map(date => (<Day {...props} day={date} empty={date < start} key={+date}/>))}
|
|
26
|
+
</div>);
|
|
26
27
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type MonthsProps } from './consts';
|
|
2
|
-
export default function Months(props: MonthsProps): import("react
|
|
2
|
+
export default function Months(props: MonthsProps): import("react").JSX.Element;
|