@osrd-project/ui-core 0.0.58 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/ComboBox/ComboBox.d.ts +12 -7
- package/dist/components/inputs/ComboBox/index.d.ts +2 -1
- package/dist/components/inputs/ComboBox/useDefaultComboBox.d.ts +6 -0
- package/dist/components/inputs/FieldWrapper.d.ts +2 -1
- package/dist/components/inputs/Slider.d.ts +2 -1
- package/dist/components/inputs/StatusMessage.d.ts +4 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/stories/ComboBox.stories.d.ts +8 -3
- package/dist/stories/ComboBoxCustom.stories.d.ts +10 -0
- package/dist/stories/Input.stories.d.ts +3 -0
- package/dist/theme.css +117 -37
- package/dist/theme.css.map +1 -1
- package/package.json +2 -2
- package/dist/components/inputs/ComboBox/utils.d.ts +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StoryObj, type Meta } from '@storybook/react';
|
|
3
|
+
import '@osrd-project/ui-core/dist/theme.css';
|
|
4
|
+
import './stories.css';
|
|
5
|
+
import ComboBox from '../components/inputs/ComboBox';
|
|
6
|
+
declare const ComboBoxStory: () => React.JSX.Element;
|
|
7
|
+
declare const meta: Meta<typeof ComboBoxStory>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof ComboBox>;
|
|
10
|
+
export declare const CustomBehavior: Story;
|
|
@@ -17,6 +17,9 @@ export declare const InformationInput: Story;
|
|
|
17
17
|
export declare const WarningInput: Story;
|
|
18
18
|
export declare const WarningWithoutMessageInput: Story;
|
|
19
19
|
export declare const ErrorInput: Story;
|
|
20
|
+
export declare const TooltipErrorInput: Story;
|
|
21
|
+
export declare const TooltipInfoInput: Story;
|
|
22
|
+
export declare const TwoTooltipErrorInput: Story;
|
|
20
23
|
export declare const ErrorWithoutMessageInput: Story;
|
|
21
24
|
export declare const InputWithChevronButton: Story;
|
|
22
25
|
export declare const InputWithClearButton: Story;
|
package/dist/theme.css
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
--tw-contain-paint: ;
|
|
106
106
|
--tw-contain-style: ;
|
|
107
107
|
}/*
|
|
108
|
-
! tailwindcss v3.4.
|
|
108
|
+
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
|
|
109
109
|
*//*
|
|
110
110
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
111
111
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
@@ -1018,20 +1018,20 @@ video {
|
|
|
1018
1018
|
0px 1px 0px rgba(235, 235, 234, 1) inset,
|
|
1019
1019
|
0px -1px 0px rgba(182, 178, 175, 1) inset;
|
|
1020
1020
|
}
|
|
1021
|
-
.combo-box .suggestion-item.
|
|
1021
|
+
.combo-box .suggestion-item.selected {
|
|
1022
1022
|
--tw-bg-opacity: 1;
|
|
1023
1023
|
background-color: rgba(255, 242, 179, 1);
|
|
1024
1024
|
background-color: rgba(255, 242, 179, var(--tw-bg-opacity, 1));
|
|
1025
1025
|
}
|
|
1026
|
+
.combo-box .suggestion-item.active {
|
|
1027
|
+
--tw-bg-opacity: 1;
|
|
1028
|
+
background-color: rgba(227, 237, 252, 1);
|
|
1029
|
+
background-color: rgba(227, 237, 252, var(--tw-bg-opacity, 1));
|
|
1030
|
+
}
|
|
1026
1031
|
.combo-box .suggestion-item.small {
|
|
1027
1032
|
font-size: 0.75rem;
|
|
1028
1033
|
padding: 0.563rem 0.5rem 0.688rem;
|
|
1029
1034
|
}
|
|
1030
|
-
.combo-box .suggestion-item:hover {
|
|
1031
|
-
--tw-bg-opacity: 1;
|
|
1032
|
-
background-color: rgba(255, 242, 179, 1);
|
|
1033
|
-
background-color: rgba(255, 242, 179, var(--tw-bg-opacity, 1));
|
|
1034
|
-
}
|
|
1035
1035
|
.date-picker .date-picker-input .trailing-content-wrapper .trailing-content {
|
|
1036
1036
|
--tw-text-opacity: 1;
|
|
1037
1037
|
color: rgba(24, 68, 239, 1);
|
|
@@ -1284,21 +1284,30 @@ video {
|
|
|
1284
1284
|
background-color: rgba(92, 89, 85, var(--tw-bg-opacity, 1));
|
|
1285
1285
|
}
|
|
1286
1286
|
.feed-back {
|
|
1287
|
+
--input-wrapper-padding: 3px;
|
|
1288
|
+
--field-wrapper-padding-bottom: 16px;
|
|
1289
|
+
--status-message-wrapper-tooltip--offset: 4px;
|
|
1290
|
+
|
|
1287
1291
|
border-radius: 0.5rem;
|
|
1288
1292
|
position: relative;
|
|
1289
1293
|
padding: 0.625rem 0.813rem 1rem 1rem;
|
|
1290
1294
|
}
|
|
1291
|
-
.feed-back.
|
|
1295
|
+
.feed-back.success:not(:has(.status-message-wrapper-tooltip)) {
|
|
1296
|
+
--tw-bg-opacity: 1;
|
|
1297
|
+
background-color: rgba(230, 247, 238, 1);
|
|
1298
|
+
background-color: rgba(230, 247, 238, var(--tw-bg-opacity, 1));
|
|
1299
|
+
}
|
|
1300
|
+
.feed-back.info:not(:has(.status-message-wrapper-tooltip)) {
|
|
1292
1301
|
--tw-bg-opacity: 1;
|
|
1293
1302
|
background-color: rgba(230, 247, 255, 1);
|
|
1294
1303
|
background-color: rgba(230, 247, 255, var(--tw-bg-opacity, 1));
|
|
1295
1304
|
}
|
|
1296
|
-
.feed-back.warning {
|
|
1305
|
+
.feed-back.warning:not(:has(.status-message-wrapper-tooltip)) {
|
|
1297
1306
|
--tw-bg-opacity: 1;
|
|
1298
1307
|
background-color: rgba(253, 245, 225, 1);
|
|
1299
1308
|
background-color: rgba(253, 245, 225, var(--tw-bg-opacity, 1));
|
|
1300
1309
|
}
|
|
1301
|
-
.feed-back.error {
|
|
1310
|
+
.feed-back.error:not(:has(.status-message-wrapper-tooltip)) {
|
|
1302
1311
|
--tw-bg-opacity: 1;
|
|
1303
1312
|
background-color: rgba(255, 238, 237, 1);
|
|
1304
1313
|
background-color: rgba(255, 238, 237, var(--tw-bg-opacity, 1));
|
|
@@ -1368,8 +1377,8 @@ video {
|
|
|
1368
1377
|
}
|
|
1369
1378
|
.input-wrapper .input-icons .clear-icon {
|
|
1370
1379
|
--tw-text-opacity: 1;
|
|
1371
|
-
color: rgba(
|
|
1372
|
-
color: rgba(
|
|
1380
|
+
color: rgba(121, 118, 113, 1);
|
|
1381
|
+
color: rgba(121, 118, 113, var(--tw-text-opacity, 1));
|
|
1373
1382
|
cursor: pointer;
|
|
1374
1383
|
}
|
|
1375
1384
|
.input-wrapper .input-icons .chevron-icon.disabled {
|
|
@@ -1961,6 +1970,7 @@ video {
|
|
|
1961
1970
|
-webkit-appearance: none;
|
|
1962
1971
|
-moz-appearance: none;
|
|
1963
1972
|
appearance: none;
|
|
1973
|
+
background-color: inherit;
|
|
1964
1974
|
height: 10px;
|
|
1965
1975
|
width: 100%;
|
|
1966
1976
|
}
|
|
@@ -2213,6 +2223,76 @@ video {
|
|
|
2213
2223
|
color: rgba(217, 28, 28, 1);
|
|
2214
2224
|
color: rgba(217, 28, 28, var(--tw-text-opacity, 1));
|
|
2215
2225
|
}
|
|
2226
|
+
.status-message-wrapper-tooltip {
|
|
2227
|
+
position: absolute;
|
|
2228
|
+
display: flex;
|
|
2229
|
+
align-items: center;
|
|
2230
|
+
width: 320px;
|
|
2231
|
+
top: calc(
|
|
2232
|
+
100% - var(--input-wrapper-padding) - var(--field-wrapper-padding-bottom) -
|
|
2233
|
+
var(--status-message-wrapper-tooltip--offset)
|
|
2234
|
+
);
|
|
2235
|
+
gap: 12px;
|
|
2236
|
+
border-radius: 8px;
|
|
2237
|
+
box-shadow:
|
|
2238
|
+
0 10px 20px 0 rgba(0, 0, 0, 0.2),
|
|
2239
|
+
0 1px 0 rgba(255, 255, 255, 0.6) inset;
|
|
2240
|
+
padding-left: 12px;
|
|
2241
|
+
padding-right: 12px;
|
|
2242
|
+
z-index: 10;
|
|
2243
|
+
}
|
|
2244
|
+
.status-message-wrapper-tooltip .status-close {
|
|
2245
|
+
display: flex;
|
|
2246
|
+
align-items: center;
|
|
2247
|
+
justify-content: center;
|
|
2248
|
+
position: absolute;
|
|
2249
|
+
top: 8px;
|
|
2250
|
+
right: 8px;
|
|
2251
|
+
color: #70C1E5;
|
|
2252
|
+
}
|
|
2253
|
+
.status-message-wrapper-tooltip .status-close:hover {
|
|
2254
|
+
color: #053348;
|
|
2255
|
+
}
|
|
2256
|
+
.status-message-wrapper-tooltip.loading {
|
|
2257
|
+
background-color: #FFFFFF;
|
|
2258
|
+
}
|
|
2259
|
+
.status-message-wrapper-tooltip.success {
|
|
2260
|
+
background-color: #E6F7EE;
|
|
2261
|
+
}
|
|
2262
|
+
.status-message-wrapper-tooltip.error {
|
|
2263
|
+
background-color: #FFEEED;
|
|
2264
|
+
}
|
|
2265
|
+
.status-message-wrapper-tooltip.info {
|
|
2266
|
+
background-color: #E6F7FF;
|
|
2267
|
+
padding-left: 12px;
|
|
2268
|
+
padding-right: 32px;
|
|
2269
|
+
}
|
|
2270
|
+
.status-message-wrapper-tooltip.warning {
|
|
2271
|
+
background-color: #FDF5E1;
|
|
2272
|
+
}
|
|
2273
|
+
.status-message-wrapper-tooltip.tooltip-left {
|
|
2274
|
+
left: 8px;
|
|
2275
|
+
}
|
|
2276
|
+
.status-message-wrapper-tooltip.tooltip-right {
|
|
2277
|
+
right: 8px;
|
|
2278
|
+
}
|
|
2279
|
+
.status-message-wrapper-tooltip .status-message {
|
|
2280
|
+
font-weight: 600;
|
|
2281
|
+
padding-top: 6px;
|
|
2282
|
+
padding-bottom: 10px;
|
|
2283
|
+
}
|
|
2284
|
+
.status-message-wrapper-tooltip .status-message.success {
|
|
2285
|
+
color: #0B723C;
|
|
2286
|
+
}
|
|
2287
|
+
.status-message-wrapper-tooltip .status-message.error {
|
|
2288
|
+
color: #D91C1C;
|
|
2289
|
+
}
|
|
2290
|
+
.status-message-wrapper-tooltip .status-message.info {
|
|
2291
|
+
color: #216482;
|
|
2292
|
+
}
|
|
2293
|
+
.status-message-wrapper-tooltip .status-message.warning {
|
|
2294
|
+
color: #7D521E;
|
|
2295
|
+
}
|
|
2216
2296
|
.text-area-field-wrapper .field-and-status-icon {
|
|
2217
2297
|
align-items: flex-start !important;
|
|
2218
2298
|
}
|
|
@@ -2343,7 +2423,7 @@ video {
|
|
|
2343
2423
|
background: none;
|
|
2344
2424
|
display: none;
|
|
2345
2425
|
}
|
|
2346
|
-
.time-picker .modal-content {
|
|
2426
|
+
.time-picker .modal-ui-content {
|
|
2347
2427
|
padding: 4.563rem;
|
|
2348
2428
|
}
|
|
2349
2429
|
.time-picker .time-picker-container {
|
|
@@ -2517,12 +2597,12 @@ video {
|
|
|
2517
2597
|
.tolerance-picker .time-input {
|
|
2518
2598
|
cursor: pointer;
|
|
2519
2599
|
}
|
|
2520
|
-
.tolerance-picker .modal-overlay .tolerance-picker-section {
|
|
2600
|
+
.tolerance-picker .modal-ui-overlay .tolerance-picker-section {
|
|
2521
2601
|
display: flex;
|
|
2522
2602
|
gap: 1rem;
|
|
2523
2603
|
align-items: center;
|
|
2524
2604
|
}
|
|
2525
|
-
.tolerance-picker .modal-overlay .tolerance-picker-section .tolerance-grid {
|
|
2605
|
+
.tolerance-picker .modal-ui-overlay .tolerance-picker-section .tolerance-grid {
|
|
2526
2606
|
display: grid;
|
|
2527
2607
|
grid-template-columns: repeat(6, 1fr);
|
|
2528
2608
|
grid-template-areas:
|
|
@@ -2534,13 +2614,13 @@ video {
|
|
|
2534
2614
|
grid-auto-rows: 40px;
|
|
2535
2615
|
grid-gap: 10px;
|
|
2536
2616
|
}
|
|
2537
|
-
.tolerance-picker .modal-overlay .tolerance-picker-section .tolerance-grid.minus-tolerance {
|
|
2617
|
+
.tolerance-picker .modal-ui-overlay .tolerance-picker-section .tolerance-grid.minus-tolerance {
|
|
2538
2618
|
direction: rtl;
|
|
2539
2619
|
}
|
|
2540
|
-
.tolerance-picker .modal-overlay .tolerance-picker-section .tolerance-grid.plus-tolerance {
|
|
2620
|
+
.tolerance-picker .modal-ui-overlay .tolerance-picker-section .tolerance-grid.plus-tolerance {
|
|
2541
2621
|
direction: ltr;
|
|
2542
2622
|
}
|
|
2543
|
-
.tolerance-picker .modal-content {
|
|
2623
|
+
.tolerance-picker .modal-ui-content {
|
|
2544
2624
|
padding: 1.25rem;
|
|
2545
2625
|
}
|
|
2546
2626
|
.tolerance-picker .time-picker-container {
|
|
@@ -2619,7 +2699,7 @@ video {
|
|
|
2619
2699
|
cursor: pointer;
|
|
2620
2700
|
caret-color: transparent;
|
|
2621
2701
|
}
|
|
2622
|
-
.modal-overlay {
|
|
2702
|
+
.modal-ui-overlay {
|
|
2623
2703
|
position: fixed;
|
|
2624
2704
|
top: 0;
|
|
2625
2705
|
left: 0;
|
|
@@ -2627,27 +2707,27 @@ video {
|
|
|
2627
2707
|
bottom: 0;
|
|
2628
2708
|
z-index: 1000;
|
|
2629
2709
|
}
|
|
2630
|
-
.modal-content {
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
position: absolute;
|
|
2638
|
-
}
|
|
2639
|
-
.modal-content .close-button {
|
|
2710
|
+
.modal-ui-overlay .modal-ui-content {
|
|
2711
|
+
background-color: #FFFFFF;
|
|
2712
|
+
border-radius: 0.5rem;
|
|
2713
|
+
box-shadow:
|
|
2714
|
+
0px 1px 0px rgba(255, 255, 255, 1) inset,
|
|
2715
|
+
0px 4px 7px -3px rgba(24, 68, 239, 0.19),
|
|
2716
|
+
0px 1px 3px rgba(49, 46, 43, 0.2);
|
|
2640
2717
|
position: absolute;
|
|
2641
|
-
top: 16px;
|
|
2642
|
-
right: 16px;
|
|
2643
|
-
color: #797671;
|
|
2644
2718
|
}
|
|
2645
|
-
.modal-content .close-button
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
color: #
|
|
2719
|
+
.modal-ui-overlay .modal-ui-content .close-button {
|
|
2720
|
+
position: absolute;
|
|
2721
|
+
top: 16px;
|
|
2722
|
+
right: 16px;
|
|
2723
|
+
color: #797671;
|
|
2650
2724
|
}
|
|
2725
|
+
.modal-ui-overlay .modal-ui-content .close-button:hover {
|
|
2726
|
+
color: #1F1B17;
|
|
2727
|
+
}
|
|
2728
|
+
.modal-ui-overlay .modal-ui-content .close-button:active {
|
|
2729
|
+
color: #D3D1CF;
|
|
2730
|
+
}
|
|
2651
2731
|
.osrd-ui-custom-select {
|
|
2652
2732
|
border-radius: 4px;
|
|
2653
2733
|
border: 1px solid rgba(148, 145, 142, 1);
|