@jetbrains/ring-ui 5.0.0-beta.3 → 5.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -1
- package/babel.config.js +1 -12
- package/components/alert/alert.css +3 -14
- package/components/alert/alert.d.ts +3 -0
- package/components/alert/alert.js +8 -7
- package/components/alert/container.css +0 -2
- package/components/alert-service/alert-service.examples.css +5 -3
- package/components/auth/auth__core.d.ts +3 -1
- package/components/auth/auth__core.js +42 -15
- package/components/auth/down-notification.css +1 -1
- package/components/auth-dialog/auth-dialog.d.ts +11 -0
- package/components/auth-dialog/auth-dialog.js +33 -2
- package/components/autofocus-ng/autofocus-ng.js +1 -1
- package/components/autofocus-ng/autofocus-ng.test.js +1 -1
- package/components/button/button.css +93 -204
- package/components/button/button.d.ts +7 -8
- package/components/button/button.js +6 -8
- package/components/button/button__classes.d.ts +1 -1
- package/components/button/button__classes.js +4 -7
- package/components/button-group/button-group.css +136 -19
- package/components/button-group/button-group.d.ts +4 -1
- package/components/button-group/button-group.js +3 -3
- package/components/button-group-ng/button-group-ng.css +1 -0
- package/components/button-group-ng/button-group-ng.examples.js +1 -1
- package/components/button-ng/button-ng.examples.js +6 -7
- package/components/button-ng/button-ng.js +6 -25
- package/components/button-set/button-set.css +1 -0
- package/components/button-toolbar/button-toolbar.css +2 -0
- package/components/checkbox/checkbox.css +10 -4
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.css +2 -1
- package/components/dialog/dialog.css +10 -3
- package/components/dialog-ng/dialog-ng__template.js +1 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/global/controls-height.d.ts +7 -0
- package/components/global/controls-height.js +8 -0
- package/components/global/theme.d.ts +7 -20
- package/components/global/theme.js +26 -32
- package/components/global/variables.css +30 -25
- package/components/global/variables.d.ts +10 -8
- package/components/global/variables_dark.css +68 -0
- package/components/header/header.css +19 -10
- package/components/header/header.d.ts +7 -69
- package/components/header/header.js +10 -9
- package/components/header/services.css +3 -3
- package/components/header/services.d.ts +5 -0
- package/components/header/services.js +8 -2
- package/components/header/tray-icon.d.ts +18 -575
- package/components/heading/heading.css +4 -1
- package/components/icon/icon.css +1 -1
- package/components/input/input.css +81 -151
- package/components/input/input.d.ts +13 -17
- package/components/input/input.js +28 -32
- package/components/input-ng/input-ng.examples.js +1 -1
- package/components/input-ng/input-ng.js +45 -49
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +2 -2
- package/components/island/content.js +2 -7
- package/components/island/header.js +7 -4
- package/components/island/island.css +8 -5
- package/components/island/island.d.ts +2 -2
- package/components/island-legacy/island-legacy.css +1 -1
- package/components/list/list.d.ts +1 -1
- package/components/loader-inline/loader-inline.css +14 -0
- package/components/loader-inline/loader-inline.d.ts +4 -41
- package/components/loader-inline/loader-inline.js +3 -11
- package/components/loader-inline-ng/loader-inline-ng.js +1 -17
- package/components/loader-inline-ng/loader-inline-ng.test.js +0 -11
- package/components/markdown/code.d.ts +6 -13
- package/components/markdown/code.js +2 -2
- package/components/markdown/heading.d.ts +5 -9
- package/components/markdown/heading.js +2 -2
- package/components/markdown/link.d.ts +4 -8
- package/components/markdown/link.js +1 -1
- package/components/markdown/markdown.d.ts +2 -3
- package/components/markdown/markdown.js +14 -11
- package/components/message/message.css +7 -3
- package/components/message/message.d.ts +3 -0
- package/components/message/message.js +16 -9
- package/components/pager/pager.js +2 -8
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.target.d.ts +1 -0
- package/components/progress-bar/progress-bar.css +8 -12
- package/components/progress-bar/progress-bar.d.ts +0 -4
- package/components/progress-bar/progress-bar.js +1 -6
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -2
- package/components/query-assist/query-assist.css +48 -64
- package/components/query-assist/query-assist.d.ts +0 -5
- package/components/query-assist/query-assist.js +4 -10
- package/components/radio/radio.css +10 -4
- package/components/select/select.css +19 -37
- package/components/select/select.d.ts +4 -6
- package/components/select/select.js +17 -30
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +1 -2
- package/components/select-ng/select-ng.examples.js +1 -0
- package/components/select-ng/select-ng.js +3 -1
- package/components/select-ng/select-ng.test.js +1 -1
- package/components/select-ng/select-ng__lazy.js +1 -2
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.examples.js +1 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/dumb-tabs.d.ts +4 -107
- package/components/tabs/dumb-tabs.js +5 -9
- package/components/tabs/tab.d.ts +2 -0
- package/components/tabs/tabs.css +8 -28
- package/components/tabs-ng/tabs-ng.examples.js +11 -3
- package/components/tabs-ng/tabs-ng.js +1 -4
- package/components/tabs-ng/tabs-ng__template.js +1 -1
- package/components/tag/tag.css +31 -8
- package/components/tag/tag.d.ts +1 -0
- package/components/tag/tag.js +1 -0
- package/components/tags-input/tags-input.css +10 -4
- package/components/toggle/toggle.css +61 -35
- package/components/toggle/toggle.d.ts +9 -89
- package/components/toggle/toggle.js +7 -7
- package/components/tooltip/tooltip.css +7 -0
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +3 -2
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/dist/_helpers/anchor.js +3 -3
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +1 -1
- package/dist/_helpers/button-set.js +1 -1
- package/dist/_helpers/button-toolbar.js +1 -1
- package/dist/_helpers/button__classes.js +5 -8
- package/dist/_helpers/card.js +1 -1
- package/dist/_helpers/checkbox.js +1 -1
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +1 -1
- package/dist/_helpers/error-message.js +1 -1
- package/dist/_helpers/footer.js +1 -1
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +1 -1
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +1 -1
- package/dist/_helpers/input.js +1 -1
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +1 -1
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-inline.js +3 -0
- package/dist/_helpers/loader-screen.js +1 -1
- package/dist/_helpers/panel.js +1 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +1 -1
- package/dist/_helpers/select__filter.js +5 -3
- package/dist/_helpers/services-link.js +1 -1
- package/dist/_helpers/sidebar.js +1 -1
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/theme.js +50 -0
- package/dist/_helpers/title.js +1 -1
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +21 -19
- package/dist/alert/container.js +1 -1
- package/dist/alert-service/alert-service.js +9 -7
- package/dist/auth/auth.js +9 -9
- package/dist/auth/auth__core.d.ts +3 -1
- package/dist/auth/auth__core.js +58 -26
- package/dist/auth/down-notification.js +8 -8
- package/dist/auth/iframe-flow.js +1 -1
- package/dist/auth/landing.js +9 -9
- package/dist/auth/storage.js +9 -7
- package/dist/auth-dialog/auth-dialog.d.ts +11 -0
- package/dist/auth-dialog/auth-dialog.js +52 -7
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +9 -9
- package/dist/autofocus-ng/autofocus-ng.js +1 -1
- package/dist/avatar/avatar.js +1 -1
- package/dist/avatar-editor-ng/avatar-editor-ng.js +9 -7
- package/dist/breadcrumb-ng/breadcrumb-ng.js +1 -1
- package/dist/button/button.d.ts +7 -8
- package/dist/button/button.js +6 -8
- package/dist/button/button__classes.d.ts +1 -1
- package/dist/button/button__classes.js +0 -3
- package/dist/button-group/button-group.d.ts +4 -1
- package/dist/button-group/button-group.js +5 -3
- package/dist/button-group-ng/button-group-ng.js +1 -1
- package/dist/button-ng/button-ng.js +6 -31
- package/dist/code/code.js +1 -1
- package/dist/confirm/confirm.js +5 -5
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/data-list/data-list.js +2 -7
- package/dist/data-list/item.js +8 -13
- package/dist/data-list-ng/data-list-ng.js +2 -7
- package/dist/date-picker/date-input.js +4 -3
- package/dist/date-picker/date-picker.js +1 -1
- package/dist/date-picker/date-popup.js +1 -1
- package/dist/dialog/dialog.js +3 -3
- package/dist/dialog-ng/dialog-ng.js +3 -3
- package/dist/dialog-ng/dialog-ng__template.js +1 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +1 -1
- package/dist/dropdown/anchor.js +1 -1
- package/dist/dropdown/dropdown.js +1 -1
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/error-bubble/error-bubble.js +1 -1
- package/dist/global/controls-height.d.ts +7 -0
- package/dist/global/controls-height.js +13 -0
- package/dist/global/theme.d.ts +7 -20
- package/dist/global/theme.js +7 -62
- package/dist/global/variables.d.ts +10 -8
- package/dist/header/header.d.ts +7 -69
- package/dist/header/header.js +13 -17
- package/dist/header/profile.js +3 -3
- package/dist/header/services.d.ts +5 -0
- package/dist/header/services.js +11 -3
- package/dist/header/smart-profile.js +10 -14
- package/dist/header/smart-services.js +9 -13
- package/dist/header/tray-icon.d.ts +18 -575
- package/dist/header/tray-icon.js +4 -4
- package/dist/heading/heading.js +1 -1
- package/dist/input/input.d.ts +13 -17
- package/dist/input/input.js +32 -41
- package/dist/input-ng/input-ng.js +46 -49
- package/dist/island/adaptive-island-hoc.d.ts +2 -2
- package/dist/island/adaptive-island-hoc.js +4 -2
- package/dist/island/content.js +2 -9
- package/dist/island/header.js +7 -4
- package/dist/island/island.d.ts +2 -2
- package/dist/list/list.d.ts +1 -1
- package/dist/loader/loader__core.js +1 -1
- package/dist/loader-inline/loader-inline.d.ts +4 -41
- package/dist/loader-inline/loader-inline.js +3 -21
- package/dist/loader-inline-ng/loader-inline-ng.js +2 -30
- package/dist/login-dialog/login-dialog.js +2 -2
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.d.ts +6 -13
- package/dist/markdown/code.js +3 -3
- package/dist/markdown/heading.d.ts +5 -9
- package/dist/markdown/heading.js +2 -2
- package/dist/markdown/link.d.ts +4 -8
- package/dist/markdown/link.js +1 -1
- package/dist/markdown/markdown.d.ts +2 -3
- package/dist/markdown/markdown.js +16 -16
- package/dist/message/message.d.ts +3 -0
- package/dist/message/message.js +18 -10
- package/dist/pager/pager.js +8 -12
- package/dist/pager-ng/pager-ng.js +3 -7
- package/dist/permissions-ng/permissions-ng.js +9 -9
- package/dist/popup/popup.js +1 -1
- package/dist/popup/popup.target.d.ts +1 -0
- package/dist/progress-bar/progress-bar.d.ts +0 -4
- package/dist/progress-bar/progress-bar.js +1 -7
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -1
- package/dist/promised-click-ng/promised-click-ng.js +2 -2
- package/dist/query-assist/query-assist.d.ts +0 -5
- package/dist/query-assist/query-assist.js +10 -26
- package/dist/query-assist-ng/query-assist-ng.js +2 -7
- package/dist/save-field-ng/save-field-ng.js +2 -9
- package/dist/select/select.d.ts +4 -6
- package/dist/select/select.js +35 -58
- package/dist/select/select__filter.js +1 -1
- package/dist/select/select__popup.js +7 -13
- package/dist/select-ng/select-ng.js +5 -9
- package/dist/select-ng/select-ng__lazy.js +7 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +2 -2
- package/dist/sidebar-ng/sidebar-ng.js +2 -2
- package/dist/storage/storage.js +9 -7
- package/dist/storage/storage__local.js +9 -7
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +1 -1
- package/dist/table/row-with-focus-sensor.js +1 -1
- package/dist/table/row.js +5 -5
- package/dist/table/smart-table.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng.js +3 -7
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +3 -7
- package/dist/table-ng/smart-table-ng.js +1 -1
- package/dist/table-ng/table-ng.js +1 -1
- package/dist/tabs/collapsible-more.js +1 -1
- package/dist/tabs/collapsible-tab.js +3 -2
- package/dist/tabs/collapsible-tabs.js +1 -1
- package/dist/tabs/dumb-tabs.d.ts +4 -107
- package/dist/tabs/dumb-tabs.js +6 -12
- package/dist/tabs/smart-tabs.js +3 -3
- package/dist/tabs/tab.d.ts +2 -0
- package/dist/tabs/tabs.js +1 -1
- package/dist/tabs-ng/tabs-ng.js +1 -6
- package/dist/tabs-ng/tabs-ng__template.js +1 -1
- package/dist/tag/tag.d.ts +1 -0
- package/dist/tag/tag.js +5 -4
- package/dist/tags-input/tags-input.js +5 -9
- package/dist/tags-input-ng/tags-input-ng.js +4 -8
- package/dist/tags-list/tags-list.js +1 -1
- package/dist/text/text.js +1 -1
- package/dist/toggle/toggle.d.ts +9 -89
- package/dist/toggle/toggle.js +7 -8
- package/dist/toggle-ng/toggle-ng.js +2 -3
- package/dist/tooltip/tooltip.d.ts +1 -0
- package/dist/tooltip/tooltip.js +6 -3
- package/dist/user-agreement/service.d.ts +2 -2
- package/dist/user-agreement/service.js +9 -13
- package/dist/user-agreement/user-agreement.js +8 -10
- package/dist/user-card/smart-user-card-tooltip.js +6 -11
- package/dist/user-card/tooltip.js +1 -1
- package/dist/user-card/user-card.js +2 -7
- package/dist/user-card-ng/user-card-ng.js +4 -9
- package/package.json +5 -5
- package/webpack.config.js +0 -11
- package/components/global/conic-gradient.d.ts +0 -796
- package/components/global/conic-gradient.js +0 -21
- package/components/global/radial-gradient-mask.d.ts +0 -9
- package/components/global/radial-gradient-mask.js +0 -39
- package/components/global/supports-css.d.ts +0 -2
- package/components/global/supports-css.js +0 -14
- package/components/global/variables_dark.d.ts +0 -3
- package/components/global/variables_dark.js +0 -53
- package/components/loader-inline/inject-styles.d.ts +0 -2
- package/components/loader-inline/inject-styles.js +0 -17
- package/dist/_helpers/inject-styles.js +0 -22
- package/dist/global/conic-gradient.d.ts +0 -796
- package/dist/global/conic-gradient.js +0 -35
- package/dist/global/radial-gradient-mask.d.ts +0 -9
- package/dist/global/radial-gradient-mask.js +0 -49
- package/dist/global/supports-css.d.ts +0 -2
- package/dist/global/supports-css.js +0 -20
- package/dist/global/variables_dark.d.ts +0 -3
- package/dist/global/variables_dark.js +0 -57
- package/dist/loader-inline/inject-styles.d.ts +0 -2
- package/dist/loader-inline/inject-styles.js +0 -11
|
@@ -8,7 +8,6 @@ import closeIcon from '@jetbrains/icons/close';
|
|
|
8
8
|
|
|
9
9
|
import RingAngularComponent from '../global/ring-angular-component';
|
|
10
10
|
import styles from '../input/input.css';
|
|
11
|
-
import Theme from '../global/theme';
|
|
12
11
|
import ButtonNg from '../button-ng/button-ng';
|
|
13
12
|
|
|
14
13
|
import styleOverrides from './input-ng.css';
|
|
@@ -33,7 +32,6 @@ class RingInputComponent extends RingAngularComponent {
|
|
|
33
32
|
label: '@',
|
|
34
33
|
hint: '@',
|
|
35
34
|
size: '@',
|
|
36
|
-
theme: '@',
|
|
37
35
|
disabled: '@',
|
|
38
36
|
active: '<',
|
|
39
37
|
error: '@',
|
|
@@ -84,9 +82,9 @@ class RingInputComponent extends RingAngularComponent {
|
|
|
84
82
|
|
|
85
83
|
getContainerClasses() {
|
|
86
84
|
return classNames(
|
|
87
|
-
styles.
|
|
88
|
-
styles[this.theme || Theme.LIGHT],
|
|
85
|
+
styles.outerContainer,
|
|
89
86
|
this.size ? [styles[`size${this.size}`]] : null,
|
|
87
|
+
styles.heightS,
|
|
90
88
|
{
|
|
91
89
|
[styles.active]: this.active,
|
|
92
90
|
[styles.error]: this.error != null,
|
|
@@ -103,56 +101,54 @@ class RingInputComponent extends RingAngularComponent {
|
|
|
103
101
|
data-test="ring-input-container"
|
|
104
102
|
ng-class="$ctrl.getContainerClasses()"
|
|
105
103
|
>
|
|
106
|
-
<input
|
|
107
|
-
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
108
|
-
type="text"
|
|
109
|
-
data-test="ring-input"
|
|
110
|
-
class="${styles.input}"
|
|
111
|
-
name="{{$ctrl.name}}"
|
|
112
|
-
ng-if="!$ctrl.multiline"
|
|
113
|
-
placeholder="{{$ctrl.placeholder}}"
|
|
114
|
-
ng-model="$ctrl.value"
|
|
115
|
-
ng-required="$ctrl.required"
|
|
116
|
-
ng-disabled="$ctrl.disabled"
|
|
117
|
-
ng-minlength="$ctrl.ngMinlength"
|
|
118
|
-
ng-maxlength="$ctrl.ngMaxlength"
|
|
119
|
-
ng-change="$ctrl.onInputChange()"
|
|
120
|
-
ng-keyup="$ctrl.onKeyUp()"
|
|
121
|
-
/>
|
|
122
|
-
|
|
123
|
-
<textarea
|
|
124
|
-
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
125
|
-
data-test="ring-input"
|
|
126
|
-
ng-if="$ctrl.multiline"
|
|
127
|
-
class="${styles.input}"
|
|
128
|
-
rows="1"
|
|
129
|
-
name="{{$ctrl.name}}"
|
|
130
|
-
placeholder="{{$ctrl.placeholder}}"
|
|
131
|
-
ng-model="$ctrl.value"
|
|
132
|
-
ng-required="$ctrl.required"
|
|
133
|
-
ng-disabled="$ctrl.disabled"
|
|
134
|
-
ng-minlength="$ctrl.ngMinlength"
|
|
135
|
-
ng-maxlength="$ctrl.ngMaxlength"
|
|
136
|
-
ng-change="$ctrl.onInputChange()"
|
|
137
|
-
ng-keyup="$ctrl.onKeyUp()"
|
|
138
|
-
></textarea>
|
|
139
|
-
|
|
140
|
-
<rg-button
|
|
141
|
-
ng-if="$ctrl.clearable"
|
|
142
|
-
data-test="ring-input-clear"
|
|
143
|
-
class="${styles.clear} ${styleOverrides.clear}"
|
|
144
|
-
icon="{{:: $ctrl.closeIcon}}"
|
|
145
|
-
ng-click="$ctrl.onClear()"
|
|
146
|
-
></rg-button>
|
|
147
|
-
|
|
148
104
|
<label
|
|
149
105
|
ng-if="!$ctrl.borderless"
|
|
150
106
|
class="${styles.label}"
|
|
151
107
|
>{{$ctrl.label}}</label>
|
|
108
|
+
<div class="${styles.container}">
|
|
109
|
+
<input
|
|
110
|
+
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
111
|
+
type="text"
|
|
112
|
+
data-test="ring-input"
|
|
113
|
+
class="${styles.input}"
|
|
114
|
+
name="{{$ctrl.name}}"
|
|
115
|
+
ng-if="!$ctrl.multiline"
|
|
116
|
+
placeholder="{{$ctrl.placeholder}}"
|
|
117
|
+
ng-model="$ctrl.value"
|
|
118
|
+
ng-required="$ctrl.required"
|
|
119
|
+
ng-disabled="$ctrl.disabled"
|
|
120
|
+
ng-minlength="$ctrl.ngMinlength"
|
|
121
|
+
ng-maxlength="$ctrl.ngMaxlength"
|
|
122
|
+
ng-change="$ctrl.onInputChange()"
|
|
123
|
+
ng-keyup="$ctrl.onKeyUp()"
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
<textarea
|
|
127
|
+
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
128
|
+
data-test="ring-input"
|
|
129
|
+
ng-if="$ctrl.multiline"
|
|
130
|
+
class="${styles.input}"
|
|
131
|
+
rows="1"
|
|
132
|
+
name="{{$ctrl.name}}"
|
|
133
|
+
placeholder="{{$ctrl.placeholder}}"
|
|
134
|
+
ng-model="$ctrl.value"
|
|
135
|
+
ng-required="$ctrl.required"
|
|
136
|
+
ng-disabled="$ctrl.disabled"
|
|
137
|
+
ng-minlength="$ctrl.ngMinlength"
|
|
138
|
+
ng-maxlength="$ctrl.ngMaxlength"
|
|
139
|
+
ng-change="$ctrl.onInputChange()"
|
|
140
|
+
ng-keyup="$ctrl.onKeyUp()"
|
|
141
|
+
></textarea>
|
|
142
|
+
|
|
143
|
+
<rg-button
|
|
144
|
+
ng-if="$ctrl.clearable"
|
|
145
|
+
data-test="ring-input-clear"
|
|
146
|
+
class="${styles.clear} ${styleOverrides.clear}"
|
|
147
|
+
icon="{{:: $ctrl.closeIcon}}"
|
|
148
|
+
ng-click="$ctrl.onClear()"
|
|
149
|
+
></rg-button>
|
|
150
|
+
</div>
|
|
152
151
|
|
|
153
|
-
<div ng-if="!$ctrl.borderless" class="${styles.underline}"></div>
|
|
154
|
-
<div ng-if="!$ctrl.borderless" class="${styles.focusUnderline}"></div>
|
|
155
|
-
<div ng-if="!$ctrl.borderless" class="${styles.errorUnderline}"></div>
|
|
156
152
|
<div ng-if="!$ctrl.borderless && $ctrl.error" class="${styles.errorText} ${styleOverrides.errorText}">{{$ctrl.error}}</div>
|
|
157
153
|
</div>
|
|
158
154
|
`;
|
|
@@ -5,7 +5,7 @@ export declare const ScrollHandlerContext: React.Context<ScrollHandler | null>;
|
|
|
5
5
|
export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>): {
|
|
6
6
|
new (props: P | Readonly<P>): {
|
|
7
7
|
state: {
|
|
8
|
-
phase:
|
|
8
|
+
phase: null;
|
|
9
9
|
};
|
|
10
10
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
11
11
|
render(): JSX.Element;
|
|
@@ -33,7 +33,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
|
|
|
33
33
|
};
|
|
34
34
|
new (props: P, context: any): {
|
|
35
35
|
state: {
|
|
36
|
-
phase:
|
|
36
|
+
phase: null;
|
|
37
37
|
};
|
|
38
38
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
39
39
|
render(): JSX.Element;
|
|
@@ -8,11 +8,11 @@ export default function adaptiveIslandHOC(ComposedComponent) {
|
|
|
8
8
|
return class AdaptiveIsland extends Component {
|
|
9
9
|
static propTypes = ComposedComponent.propTypes;
|
|
10
10
|
state = {
|
|
11
|
-
phase:
|
|
11
|
+
phase: null
|
|
12
12
|
};
|
|
13
13
|
onContentScroll = ({ scrollTop, scrollHeight, clientHeight }) => {
|
|
14
14
|
if (scrollHeight - clientHeight >=
|
|
15
|
-
interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, this.state.phase)) {
|
|
15
|
+
interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, this.state.phase ?? 0)) {
|
|
16
16
|
const phase = Math.min(1, scrollTop / TITLE_RESIZE_END);
|
|
17
17
|
this.setState({ phase });
|
|
18
18
|
}
|
|
@@ -49,6 +49,7 @@ class Content extends Component {
|
|
|
49
49
|
if (!scrollableNode) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
+
this.props.onScroll(scrollableNode);
|
|
52
53
|
const { scrollTop, scrollHeight, offsetHeight } = scrollableNode;
|
|
53
54
|
const scrolledToTop = scrollTop === 0;
|
|
54
55
|
const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
|
|
@@ -57,12 +58,6 @@ class Content extends Component {
|
|
|
57
58
|
}
|
|
58
59
|
this.setState({ scrolledToTop, scrolledToBottom });
|
|
59
60
|
});
|
|
60
|
-
onScroll = () => {
|
|
61
|
-
if (this.scrollableNode != null) {
|
|
62
|
-
this.props.onScroll(this.scrollableNode);
|
|
63
|
-
}
|
|
64
|
-
this.calculateScrollPosition();
|
|
65
|
-
};
|
|
66
61
|
scrollableNode;
|
|
67
62
|
setScrollableNodeAndCalculatePosition = (node) => {
|
|
68
63
|
if (!node) {
|
|
@@ -85,7 +80,7 @@ class Content extends Component {
|
|
|
85
80
|
<div
|
|
86
81
|
// it has to be focusable because it can be scrollable
|
|
87
82
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
88
|
-
tabIndex={0} data-scrollable-container className={scrollableWrapperClasses} ref={this.setScrollableNodeAndCalculatePosition} onScroll={fade ? this.
|
|
83
|
+
tabIndex={0} data-scrollable-container className={scrollableWrapperClasses} ref={this.setScrollableNodeAndCalculatePosition} onScroll={fade ? this.calculateScrollPosition : noop}>
|
|
89
84
|
{fade && (<div ref={this.setWrapper}>
|
|
90
85
|
{children}
|
|
91
86
|
</div>)}
|
|
@@ -7,15 +7,17 @@ import { PhaseContext } from './adaptive-island-hoc';
|
|
|
7
7
|
const Start = {
|
|
8
8
|
FONT_SIZE: 24,
|
|
9
9
|
LINE_HEIGHT: 28,
|
|
10
|
-
|
|
10
|
+
PADDING_TOP: 24,
|
|
11
|
+
PADDING_BOTTOM: 0,
|
|
11
12
|
X: 0,
|
|
12
13
|
Y: 0,
|
|
13
14
|
SPACING: 0
|
|
14
15
|
};
|
|
15
16
|
const End = {
|
|
16
17
|
FONT_SIZE: 13,
|
|
17
|
-
LINE_HEIGHT:
|
|
18
|
-
|
|
18
|
+
LINE_HEIGHT: 20,
|
|
19
|
+
PADDING_TOP: 16,
|
|
20
|
+
PADDING_BOTTOM: 8,
|
|
19
21
|
// Compensation
|
|
20
22
|
X: 0.4,
|
|
21
23
|
Y: 0.1,
|
|
@@ -44,7 +46,8 @@ class Header extends Component {
|
|
|
44
46
|
const headerStyle = phase != null
|
|
45
47
|
? {
|
|
46
48
|
lineHeight: `${this.style('LINE_HEIGHT')}px`,
|
|
47
|
-
paddingTop: this.style('
|
|
49
|
+
paddingTop: this.style('PADDING_TOP'),
|
|
50
|
+
paddingBottom: this.style('PADDING_BOTTOM')
|
|
48
51
|
}
|
|
49
52
|
: undefined;
|
|
50
53
|
const scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
|
|
@@ -22,13 +22,15 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.header {
|
|
25
|
-
composes: withTransparentBottomBorder;
|
|
26
|
-
|
|
27
25
|
box-sizing: border-box;
|
|
28
26
|
width: 100%;
|
|
29
|
-
padding:
|
|
27
|
+
padding: calc(unit * 2) calc(unit * 4) unit;
|
|
28
|
+
|
|
29
|
+
transition: border-bottom-color 0.1s;
|
|
30
|
+
|
|
31
|
+
border-bottom: 1px solid transparent;
|
|
30
32
|
|
|
31
|
-
line-height:
|
|
33
|
+
line-height: 24px;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
.withBottomBorder.withBottomBorder {
|
|
@@ -54,7 +56,8 @@
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.narrowIsland .header {
|
|
57
|
-
padding:
|
|
59
|
+
padding-right: calc(unit * 2);
|
|
60
|
+
padding-left: calc(unit * 2);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
.content {
|
|
@@ -21,7 +21,7 @@ export default class Island extends Component<IslandProps> {
|
|
|
21
21
|
export declare const AdaptiveIsland: {
|
|
22
22
|
new (props: IslandProps | Readonly<IslandProps>): {
|
|
23
23
|
state: {
|
|
24
|
-
phase:
|
|
24
|
+
phase: null;
|
|
25
25
|
};
|
|
26
26
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
27
27
|
render(): JSX.Element;
|
|
@@ -49,7 +49,7 @@ export declare const AdaptiveIsland: {
|
|
|
49
49
|
};
|
|
50
50
|
new (props: IslandProps, context: any): {
|
|
51
51
|
state: {
|
|
52
|
-
phase:
|
|
52
|
+
phase: null;
|
|
53
53
|
};
|
|
54
54
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
55
55
|
render(): JSX.Element;
|
|
@@ -9,6 +9,7 @@ import { WindowScrollerChildProps } from 'react-virtualized/dist/es/WindowScroll
|
|
|
9
9
|
import { ShortcutsMap } from '../shortcuts/core';
|
|
10
10
|
import ListHint from './list__hint';
|
|
11
11
|
import { Dimension, ListDataItem, ListDataItemProps, Type } from './consts';
|
|
12
|
+
export type { ListDataItem };
|
|
12
13
|
declare function noop(): void;
|
|
13
14
|
/**
|
|
14
15
|
* @param {Type} listItemType
|
|
@@ -188,4 +189,3 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
|
|
|
188
189
|
render(): JSX.Element;
|
|
189
190
|
}
|
|
190
191
|
export declare type ListAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
|
|
191
|
-
export {};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
+
@value dark from "../global/variables_dark.css";
|
|
3
4
|
@value unit from "../global/global.css";
|
|
4
5
|
|
|
6
|
+
:root {
|
|
7
|
+
/* stylelint-disable-next-line color-no-hex */
|
|
8
|
+
--ring-loader-inline-stops: #ff00eb, #bd3bff, #008eff, #58ba00, #f48700, #ff00eb;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dark {
|
|
12
|
+
/* stylelint-disable-next-line color-no-hex */
|
|
13
|
+
--ring-loader-inline-stops: #ff2eef, #d178ff, #289fff, #88d444, #ffe000, #ff2eef;
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
@keyframes spin {
|
|
6
17
|
0% {
|
|
7
18
|
transform: rotate(0);
|
|
@@ -51,6 +62,9 @@
|
|
|
51
62
|
|
|
52
63
|
content: "";
|
|
53
64
|
animation: pulse 0.85s cubic-bezier(0.68, 0, 0.74, 0.74) infinite alternate;
|
|
65
|
+
|
|
66
|
+
background-image: conic-gradient(var(--ring-loader-inline-stops));
|
|
67
|
+
mask-image: radial-gradient(unit, transparent 71.875%, var(--ring-content-background-color) 71.875%);
|
|
54
68
|
}
|
|
55
69
|
}
|
|
56
70
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes, PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
export interface LoaderInlineProps extends ThemeProps, HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
export interface LoaderInlineProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
4
|
'data-test'?: string | null | undefined;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
@@ -9,47 +8,11 @@ export interface LoaderInlineProps extends ThemeProps, HTMLAttributes<HTMLDivEle
|
|
|
9
8
|
*/
|
|
10
9
|
declare class LoaderInline extends PureComponent<LoaderInlineProps> {
|
|
11
10
|
static propTypes: {
|
|
12
|
-
theme: PropTypes.Requireable<Theme>;
|
|
13
11
|
className: PropTypes.Requireable<string>;
|
|
14
12
|
'data-test': PropTypes.Requireable<string>;
|
|
15
13
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
16
14
|
};
|
|
17
|
-
componentDidMount(): void;
|
|
18
|
-
static Theme: typeof Theme;
|
|
19
15
|
render(): JSX.Element;
|
|
20
16
|
}
|
|
21
|
-
declare
|
|
22
|
-
|
|
23
|
-
className: PropTypes.Requireable<string>;
|
|
24
|
-
'data-test': PropTypes.Requireable<string>;
|
|
25
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
|
-
}>, never> & Pick<LoaderInlineProps, "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dir" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">) | (Pick<LoaderInlineProps, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dir" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "theme" | "data-test"> & Pick<PropTypes.InferProps<React.WeakValidationMap<LoaderInlineProps> & {
|
|
27
|
-
theme: PropTypes.Requireable<Theme>;
|
|
28
|
-
className: PropTypes.Requireable<string>;
|
|
29
|
-
'data-test': PropTypes.Requireable<string>;
|
|
30
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
31
|
-
}>, "inlist"> & Pick<LoaderInlineProps, never>), "theme"> & import("../global/theme").ThemeOuterProps & React.RefAttributes<LoaderInline>> & {
|
|
32
|
-
readonly type: React.ForwardRefExoticComponent<Omit<(Pick<LoaderInlineProps, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dir" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "theme" | "data-test"> & Pick<PropTypes.InferProps<{
|
|
33
|
-
theme: PropTypes.Requireable<Theme>;
|
|
34
|
-
className: PropTypes.Requireable<string>;
|
|
35
|
-
'data-test': PropTypes.Requireable<string>;
|
|
36
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
37
|
-
}>, never> & Pick<LoaderInlineProps, "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dir" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is">) | (Pick<LoaderInlineProps, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "dir" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "theme" | "data-test"> & Pick<PropTypes.InferProps<React.WeakValidationMap<LoaderInlineProps> & {
|
|
38
|
-
theme: PropTypes.Requireable<Theme>;
|
|
39
|
-
className: PropTypes.Requireable<string>;
|
|
40
|
-
'data-test': PropTypes.Requireable<string>;
|
|
41
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
42
|
-
}>, "inlist"> & Pick<LoaderInlineProps, never>), "theme"> & import("../global/theme").ThemeOuterProps & React.RefAttributes<LoaderInline>>;
|
|
43
|
-
} & {
|
|
44
|
-
prototype: LoaderInline;
|
|
45
|
-
propTypes: {
|
|
46
|
-
theme: PropTypes.Requireable<Theme>;
|
|
47
|
-
className: PropTypes.Requireable<string>;
|
|
48
|
-
'data-test': PropTypes.Requireable<string>;
|
|
49
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
50
|
-
};
|
|
51
|
-
Theme: typeof Theme;
|
|
52
|
-
contextType?: React.Context<any> | undefined;
|
|
53
|
-
};
|
|
54
|
-
export declare type LoaderInlineAtrrs = ComponentPropsWithRef<typeof ThemedLoaderInline>;
|
|
55
|
-
export default ThemedLoaderInline;
|
|
17
|
+
export declare type LoaderInlineAtrrs = JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
|
|
18
|
+
export default LoaderInline;
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import Theme, { withTheme } from '../global/theme';
|
|
5
4
|
import dataTests from '../global/data-tests';
|
|
6
5
|
import styles from './loader-inline.css';
|
|
7
|
-
import injectStyles from './inject-styles';
|
|
8
6
|
/**
|
|
9
7
|
* @name Loader Inline
|
|
10
8
|
*/
|
|
11
9
|
class LoaderInline extends PureComponent {
|
|
12
10
|
static propTypes = {
|
|
13
|
-
theme: PropTypes.oneOf(Object.values(Theme)),
|
|
14
11
|
className: PropTypes.string,
|
|
15
12
|
'data-test': PropTypes.string,
|
|
16
13
|
children: PropTypes.node
|
|
17
14
|
};
|
|
18
|
-
componentDidMount() {
|
|
19
|
-
injectStyles();
|
|
20
|
-
}
|
|
21
|
-
static Theme = Theme;
|
|
22
15
|
render() {
|
|
23
|
-
const { className,
|
|
24
|
-
const classes = classNames(styles.loader, className
|
|
16
|
+
const { className, 'data-test': dataTest, children, ...restProps } = this.props;
|
|
17
|
+
const classes = classNames(styles.loader, className);
|
|
25
18
|
const loader = (<div {...restProps} data-test={dataTests('ring-loader-inline', dataTest)} className={classes}/>);
|
|
26
19
|
return children
|
|
27
20
|
? (<>
|
|
@@ -31,5 +24,4 @@ class LoaderInline extends PureComponent {
|
|
|
31
24
|
: loader;
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
|
-
|
|
35
|
-
export default ThemedLoaderInline;
|
|
27
|
+
export default LoaderInline;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
3
|
import styles from '../loader-inline/loader-inline.css';
|
|
4
|
-
import injectStyles from '../loader-inline/inject-styles';
|
|
5
|
-
import Theme from '../global/theme';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* @name Loader Inline Ng
|
|
@@ -11,23 +9,9 @@ import Theme from '../global/theme';
|
|
|
11
9
|
|
|
12
10
|
const angularModule = angular.module('Ring.loader-inline', []);
|
|
13
11
|
|
|
14
|
-
class LoaderController {
|
|
15
|
-
$onInit() {
|
|
16
|
-
injectStyles();
|
|
17
|
-
|
|
18
|
-
this.theme = this.theme || Theme.LIGHT;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getThemeClass = () => `${styles.loader}_${this.theme}`;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
12
|
angularModule.
|
|
25
13
|
component('rgLoaderInline', {
|
|
26
|
-
|
|
27
|
-
theme: '@?'
|
|
28
|
-
},
|
|
29
|
-
template: `<div data-test="ring-loader-inline-ng" class="${styles.loader}" ng-class="$ctrl.getThemeClass()"></div>`,
|
|
30
|
-
controller: LoaderController
|
|
14
|
+
template: `<div data-test="ring-loader-inline-ng" class="${styles.loader}"></div>`
|
|
31
15
|
});
|
|
32
16
|
|
|
33
17
|
export default angularModule.name;
|
|
@@ -22,18 +22,7 @@ describe('LoaderInline', () => {
|
|
|
22
22
|
|
|
23
23
|
it('should render loader markup', () => {
|
|
24
24
|
element.should.contain(`.${styles.loader}`);
|
|
25
|
-
element.should.contain(`.${styles.loader}_light`);
|
|
26
25
|
element.should.contain('[data-test="ring-loader-inline-ng"]');
|
|
27
26
|
});
|
|
28
27
|
|
|
29
|
-
it('should render light loader theme by default', () => {
|
|
30
|
-
element.should.contain(`.${styles.loader}_light`);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('should render dark loader theme if passed', () => {
|
|
34
|
-
element = $compile('<rg-loader-inline theme="dark"></rg-loader-inline>')(scope)[0];
|
|
35
|
-
scope.$digest();
|
|
36
|
-
element.should.contain(`.${styles.loader}_dark`);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
28
|
});
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { CodeProps } from 'react-markdown/lib/ast-to-react';
|
|
3
|
+
declare module 'react-markdown/lib/complex-types' {
|
|
4
|
+
interface ReactMarkdownProps {
|
|
5
|
+
language?: string;
|
|
6
|
+
}
|
|
7
7
|
}
|
|
8
|
-
declare const MarkdownCode: {
|
|
9
|
-
({ value, language, inline }: MarkdownCodeProps): JSX.Element;
|
|
10
|
-
propTypes: {
|
|
11
|
-
language: PropTypes.Requireable<string>;
|
|
12
|
-
value: PropTypes.Requireable<string>;
|
|
13
|
-
inline: PropTypes.Requireable<boolean>;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
8
|
+
declare const MarkdownCode: ({ children, language, inline }: CodeProps) => JSX.Element;
|
|
16
9
|
export default MarkdownCode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Code from '../code/code';
|
|
4
|
-
const MarkdownCode = ({
|
|
4
|
+
const MarkdownCode = ({ children, language, inline }) => (<Code language={language} code={children?.join('') || ''} inline={inline}/>);
|
|
5
5
|
MarkdownCode.propTypes = {
|
|
6
6
|
language: PropTypes.string,
|
|
7
|
-
|
|
7
|
+
children: PropTypes.array.isRequired,
|
|
8
8
|
inline: PropTypes.bool
|
|
9
9
|
};
|
|
10
10
|
export default MarkdownCode;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
export interface MarkdownHeadingProps {
|
|
5
|
-
level?: Levels | undefined;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
}
|
|
3
|
+
import { HeadingProps } from 'react-markdown/lib/ast-to-react';
|
|
8
4
|
declare const MarkdownHeading: {
|
|
9
|
-
({ level, children }:
|
|
5
|
+
({ level, children }: HeadingProps): JSX.Element;
|
|
10
6
|
propTypes: {
|
|
11
|
-
level: PropTypes.
|
|
12
|
-
children: PropTypes.
|
|
7
|
+
level: PropTypes.Validator<number>;
|
|
8
|
+
children: PropTypes.Validator<any[]>;
|
|
13
9
|
};
|
|
14
10
|
};
|
|
15
11
|
export default MarkdownHeading;
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import Heading from '../heading/heading';
|
|
4
4
|
const MarkdownHeading = ({ level, children }) => <Heading level={level}>{children}</Heading>;
|
|
5
5
|
MarkdownHeading.propTypes = {
|
|
6
|
-
level: PropTypes.number,
|
|
7
|
-
children: PropTypes.
|
|
6
|
+
level: PropTypes.number.isRequired,
|
|
7
|
+
children: PropTypes.array.isRequired
|
|
8
8
|
};
|
|
9
9
|
export default MarkdownHeading;
|