@datarobot/design-system 29.6.0 → 29.7.1
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/cjs/index.d.ts +1 -0
- package/cjs/index.js +11 -0
- package/cjs/text-merge-view/index.d.ts +2 -0
- package/cjs/text-merge-view/index.js +12 -0
- package/cjs/text-merge-view/text-merge-view.d.ts +21 -0
- package/cjs/text-merge-view/text-merge-view.js +109 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/text-merge-view/index.d.ts +2 -0
- package/esm/text-merge-view/index.js +2 -0
- package/esm/text-merge-view/text-merge-view.d.ts +21 -0
- package/esm/text-merge-view/text-merge-view.js +101 -0
- package/js/bundle/bundle.js +248 -51
- package/js/bundle/bundle.min.js +1 -1
- package/js/bundle/index.d.ts +24 -0
- package/package.json +4 -1
- package/styles/index.css +50 -14
- package/styles/index.min.css +1 -1
- package/styles/themes/alpine-light.css +8 -0
- package/styles/themes/alpine-light.min.css +1 -1
- package/styles/themes/light.css +8 -0
- package/styles/themes/light.min.css +1 -1
- package/styles/themes/midnight-gray.css +8 -0
- package/styles/themes/midnight-gray.min.css +1 -1
- package/text-merge-view/package.json +7 -0
package/js/bundle/index.d.ts
CHANGED
|
@@ -236,6 +236,8 @@ export { Tabs, TAB_GROUP_SIZE, TABS_ACCENT_TYPES };
|
|
|
236
236
|
export type { TextEditorProps, TextEditorValue, TextEditorValueChild, MarkType, BlockType, TextEditorTool, };
|
|
237
237
|
export { TextEditor, EditedText, InlineTextEditor, isEmptyTextEditorValue, isLongerTextEditorValueThan, hasGreaterTextEditorLinesThan, convertTextToTextEditorValue, TEXT_EDITOR_DEFAULT_VALUE, TEXT_EDITOR_DEFAULT_TOOLS, TEXT_EDITOR_TOOLS, INLINE_EDITOR_TYPES, BLOCK_TYPES, MARK_TYPES, TOOLBAR_POSITION, };
|
|
238
238
|
|
|
239
|
+
export { TextMergeView, type TextMergeProps };
|
|
240
|
+
|
|
239
241
|
export type { TextAreaProps, TextAreaResizeValues };
|
|
240
242
|
export { TextArea, TEXTAREA_RESIZE_VALUES };
|
|
241
243
|
|
|
@@ -6671,6 +6673,28 @@ export function hasGreaterTextEditorLinesThan(value: TextEditorValue[], maxTextL
|
|
|
6671
6673
|
*/
|
|
6672
6674
|
export function convertTextToTextEditorValue(text: string): TextEditorValue[];
|
|
6673
6675
|
|
|
6676
|
+
import './text-merge-view.less';
|
|
6677
|
+
export type TextMergeProps = {
|
|
6678
|
+
className?: string;
|
|
6679
|
+
testId?: string;
|
|
6680
|
+
isDarkTheme?: boolean;
|
|
6681
|
+
values: {
|
|
6682
|
+
left: string;
|
|
6683
|
+
right: string;
|
|
6684
|
+
};
|
|
6685
|
+
viewSettings?: {
|
|
6686
|
+
showLineNumbers: boolean;
|
|
6687
|
+
highlightActiveLine: boolean;
|
|
6688
|
+
};
|
|
6689
|
+
};
|
|
6690
|
+
/**
|
|
6691
|
+
* Merge view for 2 text versions
|
|
6692
|
+
* Limited to read-only view.
|
|
6693
|
+
* @midnight-gray-supported
|
|
6694
|
+
* @alpine-light-supported
|
|
6695
|
+
*/
|
|
6696
|
+
export function TextMergeView({ className, testId, isDarkTheme, values, viewSettings, }: TextMergeProps): import("react/jsx-runtime").JSX.Element;
|
|
6697
|
+
|
|
6674
6698
|
import './text-with-hyperlinks.less';
|
|
6675
6699
|
export type TextWithHyperlinksProps = {
|
|
6676
6700
|
value?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datarobot/design-system",
|
|
3
|
-
"version": "29.
|
|
3
|
+
"version": "29.7.1",
|
|
4
4
|
"description": "DataRobot react components library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node ../../tools/build-lib.js",
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
"rheostat": "4.1.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
+
"@codemirror/merge": "6.11.2",
|
|
55
|
+
"@codemirror/state": "^6.0.0",
|
|
56
|
+
"@codemirror/view": "^6.17.0",
|
|
54
57
|
"@fortawesome/fontawesome-svg-core": "6.7.1",
|
|
55
58
|
"@fortawesome/free-brands-svg-icons": "6.7.1",
|
|
56
59
|
"@fortawesome/free-regular-svg-icons": "6.7.1",
|
package/styles/index.css
CHANGED
|
@@ -859,6 +859,14 @@
|
|
|
859
859
|
--text-editor-background-hover-color: #20262A;
|
|
860
860
|
--text-editor-active-color: transparent;
|
|
861
861
|
/*#endregion */
|
|
862
|
+
/*#region TextMergeView component */
|
|
863
|
+
--deleted-main-color: #E64D4D;
|
|
864
|
+
--deleted-with-opacity-color: rgba(230, 77, 77, 0.5);
|
|
865
|
+
--deleted-line-color: rgba(230, 77, 77, 0.08);
|
|
866
|
+
--changed-main-color: #1FFF9A;
|
|
867
|
+
--changed-with-opacity-color: rgba(31, 255, 154, 0.5);
|
|
868
|
+
--changed-line-color: rgba(31, 255, 154, 0.08);
|
|
869
|
+
/*#endregion */
|
|
862
870
|
/*#region ToggleSwitch */
|
|
863
871
|
--toggle-bg: transparent;
|
|
864
872
|
--toggle-area-border-color: #81868A;
|
|
@@ -3148,7 +3156,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3148
3156
|
border: none;
|
|
3149
3157
|
-webkit-text-fill-color: var(--input-color);
|
|
3150
3158
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
3151
|
-
transition
|
|
3159
|
+
transition: background-color calc(infinity * 1s);
|
|
3152
3160
|
}
|
|
3153
3161
|
.dr-form-field textarea:-webkit-autofill:hover,
|
|
3154
3162
|
.dr-form-field textarea[data-com-onepassword-filled]:hover {
|
|
@@ -3158,7 +3166,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3158
3166
|
.dr-form-field textarea[data-com-onepassword-filled]:focus {
|
|
3159
3167
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
3160
3168
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
3161
|
-
transition
|
|
3169
|
+
transition: background-color calc(infinity * 1s);
|
|
3162
3170
|
}
|
|
3163
3171
|
.dr-form-field.sm input {
|
|
3164
3172
|
/* stylelint-disable-next-line dr-custom/no-unexpected-spacing-definitions */
|
|
@@ -3212,7 +3220,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3212
3220
|
border: none;
|
|
3213
3221
|
-webkit-text-fill-color: var(--input-color);
|
|
3214
3222
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
3215
|
-
transition
|
|
3223
|
+
transition: background-color calc(infinity * 1s);
|
|
3216
3224
|
}
|
|
3217
3225
|
.dr-form-field.sm input:-webkit-autofill:hover,
|
|
3218
3226
|
.dr-form-field.sm input[data-com-onepassword-filled]:hover {
|
|
@@ -3222,7 +3230,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3222
3230
|
.dr-form-field.sm input[data-com-onepassword-filled]:focus {
|
|
3223
3231
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
3224
3232
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
3225
|
-
transition
|
|
3233
|
+
transition: background-color calc(infinity * 1s);
|
|
3226
3234
|
}
|
|
3227
3235
|
.dr-form-field.md input {
|
|
3228
3236
|
/* stylelint-disable-next-line dr-custom/no-unexpected-spacing-definitions */
|
|
@@ -3276,7 +3284,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3276
3284
|
border: none;
|
|
3277
3285
|
-webkit-text-fill-color: var(--input-color);
|
|
3278
3286
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
3279
|
-
transition
|
|
3287
|
+
transition: background-color calc(infinity * 1s);
|
|
3280
3288
|
}
|
|
3281
3289
|
.dr-form-field.md input:-webkit-autofill:hover,
|
|
3282
3290
|
.dr-form-field.md input[data-com-onepassword-filled]:hover {
|
|
@@ -3286,7 +3294,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3286
3294
|
.dr-form-field.md input[data-com-onepassword-filled]:focus {
|
|
3287
3295
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
3288
3296
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
3289
|
-
transition
|
|
3297
|
+
transition: background-color calc(infinity * 1s);
|
|
3290
3298
|
}
|
|
3291
3299
|
.dr-form-field.lg input {
|
|
3292
3300
|
/* stylelint-disable-next-line dr-custom/no-unexpected-spacing-definitions */
|
|
@@ -3340,7 +3348,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3340
3348
|
border: none;
|
|
3341
3349
|
-webkit-text-fill-color: var(--input-color);
|
|
3342
3350
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
3343
|
-
transition
|
|
3351
|
+
transition: background-color calc(infinity * 1s);
|
|
3344
3352
|
}
|
|
3345
3353
|
.dr-form-field.lg input:-webkit-autofill:hover,
|
|
3346
3354
|
.dr-form-field.lg input[data-com-onepassword-filled]:hover {
|
|
@@ -3350,7 +3358,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3350
3358
|
.dr-form-field.lg input[data-com-onepassword-filled]:focus {
|
|
3351
3359
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
3352
3360
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
3353
|
-
transition
|
|
3361
|
+
transition: background-color calc(infinity * 1s);
|
|
3354
3362
|
}
|
|
3355
3363
|
.dr-form-field.xl input {
|
|
3356
3364
|
height: 3.125rem;
|
|
@@ -3406,7 +3414,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3406
3414
|
border: none;
|
|
3407
3415
|
-webkit-text-fill-color: var(--input-color);
|
|
3408
3416
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.875rem var(--input-bg) inset;
|
|
3409
|
-
transition
|
|
3417
|
+
transition: background-color calc(infinity * 1s);
|
|
3410
3418
|
}
|
|
3411
3419
|
.dr-form-field.xl input:-webkit-autofill:hover,
|
|
3412
3420
|
.dr-form-field.xl input[data-com-onepassword-filled]:hover {
|
|
@@ -3416,7 +3424,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
3416
3424
|
.dr-form-field.xl input[data-com-onepassword-filled]:focus {
|
|
3417
3425
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
3418
3426
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.875rem var(--input-bg-focused-autofill) inset;
|
|
3419
|
-
transition
|
|
3427
|
+
transition: background-color calc(infinity * 1s);
|
|
3420
3428
|
}
|
|
3421
3429
|
.dr-form-field textarea {
|
|
3422
3430
|
font-family: inherit;
|
|
@@ -4168,7 +4176,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
4168
4176
|
border: none;
|
|
4169
4177
|
-webkit-text-fill-color: var(--input-color);
|
|
4170
4178
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
4171
|
-
transition
|
|
4179
|
+
transition: background-color calc(infinity * 1s);
|
|
4172
4180
|
}
|
|
4173
4181
|
.dropdown-selectbox-trigger:-webkit-autofill:hover,
|
|
4174
4182
|
.dropdown-selectbox-trigger[data-com-onepassword-filled]:hover {
|
|
@@ -4178,7 +4186,7 @@ popout[data-popper-placement^='right']::after,
|
|
|
4178
4186
|
.dropdown-selectbox-trigger[data-com-onepassword-filled]:focus {
|
|
4179
4187
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
4180
4188
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
4181
|
-
transition
|
|
4189
|
+
transition: background-color calc(infinity * 1s);
|
|
4182
4190
|
}
|
|
4183
4191
|
.dropdown-selectbox-trigger:hover {
|
|
4184
4192
|
border: var(--dropdown-selectbox-trigger-border);
|
|
@@ -8830,7 +8838,7 @@ td.rdtYear {
|
|
|
8830
8838
|
border: none;
|
|
8831
8839
|
-webkit-text-fill-color: var(--input-color);
|
|
8832
8840
|
-webkit-box-shadow: 0 0 0px 0.0625rem var(--input-border-color) inset, 0 0 0px 1.25rem var(--input-bg) inset;
|
|
8833
|
-
transition
|
|
8841
|
+
transition: background-color calc(infinity * 1s);
|
|
8834
8842
|
}
|
|
8835
8843
|
.file-upload-input .file-input-group:-webkit-autofill:hover,
|
|
8836
8844
|
.file-upload-input .file-input-group[data-com-onepassword-filled]:hover {
|
|
@@ -8840,7 +8848,7 @@ td.rdtYear {
|
|
|
8840
8848
|
.file-upload-input .file-input-group[data-com-onepassword-filled]:focus {
|
|
8841
8849
|
-webkit-text-fill-color: var(--input-color-focused);
|
|
8842
8850
|
-webkit-box-shadow: 0 0 0px var(--input-border-width) var(--input-focused-border-color) inset, 0 0 0px 1.25rem var(--input-bg-focused-autofill) inset;
|
|
8843
|
-
transition
|
|
8851
|
+
transition: background-color calc(infinity * 1s);
|
|
8844
8852
|
}
|
|
8845
8853
|
.file-upload-input .file-input-group > label {
|
|
8846
8854
|
flex: 1;
|
|
@@ -13387,6 +13395,34 @@ table.simple-table.sublevel tr td {
|
|
|
13387
13395
|
padding: 0.5rem 0;
|
|
13388
13396
|
}
|
|
13389
13397
|
|
|
13398
|
+
/*!************************************************************************************************************************************************************************************************************************************************************!*\
|
|
13399
|
+
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/text-merge-view/text-merge-view.less ***!
|
|
13400
|
+
\************************************************************************************************************************************************************************************************************************************************************/
|
|
13401
|
+
/* stylelint-disable dr-custom/only-kebab-case-class-names */
|
|
13402
|
+
.text-merge-view {
|
|
13403
|
+
width: 100%;
|
|
13404
|
+
}
|
|
13405
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-changedLineGutter {
|
|
13406
|
+
background: var(--deleted-main-color);
|
|
13407
|
+
}
|
|
13408
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-deletedLine .cm-changedText {
|
|
13409
|
+
background: linear-gradient(var(--deleted-with-opacity-color), var(--deleted-with-opacity-color)) bottom / 100% 0.125rem no-repeat;
|
|
13410
|
+
}
|
|
13411
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-changedLine,
|
|
13412
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-a .cm-deletedChunk {
|
|
13413
|
+
background-color: var(--deleted-line-color);
|
|
13414
|
+
}
|
|
13415
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-changedLineGutter {
|
|
13416
|
+
background: var(--changed-main-color);
|
|
13417
|
+
}
|
|
13418
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-changedLine {
|
|
13419
|
+
background-color: var(--changed-line-color);
|
|
13420
|
+
}
|
|
13421
|
+
.text-merge-view .cm-mergeViewEditor .cm-merge-b .cm-insertedLine .cm-changedText {
|
|
13422
|
+
background: linear-gradient(var(--changed-with-opacity-color), var(--changed-with-opacity-color)) bottom / 100% 0.125rem no-repeat;
|
|
13423
|
+
}
|
|
13424
|
+
/* stylelint-enable dr-custom/only-kebab-case-class-names */
|
|
13425
|
+
|
|
13390
13426
|
/*!**********************************************************************************************************************************************************************************************************************************************************!*\
|
|
13391
13427
|
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/toggler-switch/toggler-switch.less ***!
|
|
13392
13428
|
\**********************************************************************************************************************************************************************************************************************************************************/
|