@mtes-mct/monitor-ui 8.2.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/index.js +96 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MapMenuModal/index.d.ts +10 -0
- package/src/components/SingleTag.d.ts +3 -1
- package/src/index.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [8.2.0](https://github.com/MTES-MCT/monitor-ui/compare/v8.1.1...v8.2.0) (2023-08-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **components:** create primary and secondary accent for dropdown component ([7e29c6a](https://github.com/MTES-MCT/monitor-ui/commit/7e29c6a6d81a610b5a97c2fc4271adfd6504d8f1))
|
|
7
|
+
* **elements:** add buttonsGroup component in TableWithSelectableRows component ([4a144d6](https://github.com/MTES-MCT/monitor-ui/commit/4a144d6571ac365339d89f20e792ea3f72217bf4))
|
|
8
|
+
|
|
1
9
|
## [8.1.1](https://github.com/MTES-MCT/monitor-ui/compare/v8.1.0...v8.1.1) (2023-08-09)
|
|
2
10
|
|
|
3
11
|
|
package/index.js
CHANGED
|
@@ -2188,7 +2188,7 @@ const Action = styled.div `
|
|
|
2188
2188
|
}
|
|
2189
2189
|
`;
|
|
2190
2190
|
|
|
2191
|
-
const Body = styled.div `
|
|
2191
|
+
const Body$1 = styled.div `
|
|
2192
2192
|
background-color: ${p => p.theme.color.white};
|
|
2193
2193
|
border-top-left-radius: 2px;
|
|
2194
2194
|
border-top-right-radius: 2px;
|
|
@@ -2207,7 +2207,7 @@ const Body = styled.div `
|
|
|
2207
2207
|
}
|
|
2208
2208
|
`;
|
|
2209
2209
|
|
|
2210
|
-
const Title = styled.h4 `
|
|
2210
|
+
const Title$1 = styled.h4 `
|
|
2211
2211
|
font-size: 125%;
|
|
2212
2212
|
font-weight: 500;
|
|
2213
2213
|
line-height: 48px;
|
|
@@ -2264,8 +2264,8 @@ const Window = styled.div `
|
|
|
2264
2264
|
RawDialog.displayName = 'Dialog';
|
|
2265
2265
|
const Dialog = Object.assign(RawDialog, {
|
|
2266
2266
|
Action,
|
|
2267
|
-
Body,
|
|
2268
|
-
Title
|
|
2267
|
+
Body: Body$1,
|
|
2268
|
+
Title: Title$1
|
|
2269
2269
|
});
|
|
2270
2270
|
|
|
2271
2271
|
function Item({ accent, Icon, ...originalProps }) {
|
|
@@ -3377,27 +3377,35 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
3377
3377
|
Vms: Vms
|
|
3378
3378
|
});
|
|
3379
3379
|
|
|
3380
|
-
function SingleTag({ children, className, onDelete, ...nativeProps }) {
|
|
3380
|
+
function SingleTag({ accent = Accent.PRIMARY, children, className, onDelete, ...nativeProps }) {
|
|
3381
3381
|
const controlledClassName = classnames('Component-SingleTag', className);
|
|
3382
3382
|
const handleDelete = useCallback(() => {
|
|
3383
3383
|
if (onDelete) {
|
|
3384
3384
|
onDelete();
|
|
3385
3385
|
}
|
|
3386
3386
|
}, [onDelete]);
|
|
3387
|
-
|
|
3387
|
+
switch (accent) {
|
|
3388
|
+
case Accent.SECONDARY:
|
|
3389
|
+
return (jsxs(Box$g, { className: controlledClassName, ...nativeProps, children: [jsx(SecondaryText, { children: children }), jsx(SecondaryIconButton, { accent: Accent.TERTIARY, Icon: Close, iconSize: 10, onClick: handleDelete })] }));
|
|
3390
|
+
default:
|
|
3391
|
+
return (jsxs(Box$g, { className: controlledClassName, ...nativeProps, children: [jsx(PrimaryText, { children: children }), jsx(PrimaryIconButton, { accent: Accent.TERTIARY, Icon: Close, iconSize: 10, onClick: handleDelete })] }));
|
|
3392
|
+
}
|
|
3388
3393
|
}
|
|
3389
3394
|
const Box$g = styled.div `
|
|
3390
3395
|
align-items: center;
|
|
3391
3396
|
display: inline-flex;
|
|
3392
3397
|
`;
|
|
3393
|
-
const
|
|
3398
|
+
const PrimaryText = styled.span `
|
|
3394
3399
|
background-color: ${p => p.theme.color.lightGray};
|
|
3395
3400
|
color: ${p => p.theme.color.gunMetal};
|
|
3396
3401
|
font-size: 13px;
|
|
3397
3402
|
line-height: 1.3846;
|
|
3398
3403
|
padding: 3px 8px 5px;
|
|
3404
|
+
overflow: hidden;
|
|
3405
|
+
text-overflow: ellipsis;
|
|
3406
|
+
white-space: nowrap;
|
|
3399
3407
|
`;
|
|
3400
|
-
const
|
|
3408
|
+
const PrimaryIconButton = styled(IconButton) `
|
|
3401
3409
|
background-color: ${p => p.theme.color.lightGray};
|
|
3402
3410
|
margin-left: 1px;
|
|
3403
3411
|
padding: 7px;
|
|
@@ -3417,6 +3425,85 @@ const StyledIconButton = styled(IconButton) `
|
|
|
3417
3425
|
background-color: ${p => p.theme.color.lightGray};
|
|
3418
3426
|
}
|
|
3419
3427
|
`;
|
|
3428
|
+
const SecondaryText = styled(PrimaryText) `
|
|
3429
|
+
background-color: ${p => p.theme.color.blueYonder[100]};
|
|
3430
|
+
color: ${p => p.theme.color.white};
|
|
3431
|
+
`;
|
|
3432
|
+
const SecondaryIconButton = styled(PrimaryIconButton) `
|
|
3433
|
+
background-color: ${p => p.theme.color.blueYonder[100]};
|
|
3434
|
+
color: ${p => p.theme.color.white};
|
|
3435
|
+
|
|
3436
|
+
:hover,
|
|
3437
|
+
&._hover {
|
|
3438
|
+
background-color: ${p => p.theme.color.blueYonder[100]};
|
|
3439
|
+
color: ${p => p.theme.color.blueYonder[25]};
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
:active,
|
|
3443
|
+
&._active {
|
|
3444
|
+
background-color: ${p => p.theme.color.blueYonder[100]};
|
|
3445
|
+
color: ${p => p.theme.color.blueYonder[25]};
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
:disabled,
|
|
3449
|
+
&._disabled {
|
|
3450
|
+
background-color: ${p => p.theme.color.blueYonder[100]};
|
|
3451
|
+
color: ${p => p.theme.color.blueYonder[25]};
|
|
3452
|
+
}
|
|
3453
|
+
`;
|
|
3454
|
+
|
|
3455
|
+
const Container = styled.div `
|
|
3456
|
+
width: 320px;
|
|
3457
|
+
max-height: 520px;
|
|
3458
|
+
margin-right: 6px;
|
|
3459
|
+
background-color: ${p => p.theme.color.white};
|
|
3460
|
+
box-shadow: 0px 3px 6px ${p => p.theme.color.slateGray};
|
|
3461
|
+
position: relative;
|
|
3462
|
+
`;
|
|
3463
|
+
const Header = styled.div `
|
|
3464
|
+
height: 40px;
|
|
3465
|
+
background-color: ${p => p.theme.color.charcoal};
|
|
3466
|
+
display: flex;
|
|
3467
|
+
justify-content: space-between;
|
|
3468
|
+
padding-right: 4px;
|
|
3469
|
+
padding-left: 10px;
|
|
3470
|
+
align-items: center;
|
|
3471
|
+
`;
|
|
3472
|
+
const Title = styled.span `
|
|
3473
|
+
font-size: 16px;
|
|
3474
|
+
line-height: 22px;
|
|
3475
|
+
color: ${p => p.theme.color.white};
|
|
3476
|
+
`;
|
|
3477
|
+
const Body = styled.div `
|
|
3478
|
+
height: calc(100% - 40px);
|
|
3479
|
+
overflow-y: auto;
|
|
3480
|
+
padding: 12px;
|
|
3481
|
+
`;
|
|
3482
|
+
const VisibilityButton = styled(IconButton) `
|
|
3483
|
+
background-color: ${p => p.theme.color.gainsboro};
|
|
3484
|
+
`;
|
|
3485
|
+
const CloseButton = styled(IconButton) `
|
|
3486
|
+
color: white;
|
|
3487
|
+
`;
|
|
3488
|
+
const Footer = styled.div `
|
|
3489
|
+
background: ${p => p.theme.color.white};
|
|
3490
|
+
display: flex;
|
|
3491
|
+
flex-direction: column;
|
|
3492
|
+
gap: 8px;
|
|
3493
|
+
padding: 12px;
|
|
3494
|
+
position: absolute;
|
|
3495
|
+
bottom: 0;
|
|
3496
|
+
width: 100%;
|
|
3497
|
+
`;
|
|
3498
|
+
const MapMenuModal = {
|
|
3499
|
+
Body,
|
|
3500
|
+
CloseButton,
|
|
3501
|
+
Container,
|
|
3502
|
+
Footer,
|
|
3503
|
+
Header,
|
|
3504
|
+
Title,
|
|
3505
|
+
VisibilityButton
|
|
3506
|
+
};
|
|
3420
3507
|
|
|
3421
3508
|
const Field$2 = styled.div.attrs(props => ({
|
|
3422
3509
|
className: classnames('Element-Field', props.className)
|
|
@@ -36474,5 +36561,5 @@ function logSoftError({ context = {}, isSideWindowError = false, message, origin
|
|
|
36474
36561
|
}
|
|
36475
36562
|
}
|
|
36476
36563
|
|
|
36477
|
-
export { Accent, Button$1 as Button, Checkbox, CoordinatesFormat, CoordinatesInput, CustomSearch, DatePicker, DateRangePicker, Dialog, Dropdown, Field$2 as Field, FieldError, Fieldset, FormikCheckbox, FormikCoordinatesInput, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSearch, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NewWindow, NewWindowContext, NotificationEvent, Notifier, NumberInput, OPENLAYERS_PROJECTION, OnlyFontGlobalStyle, Search, Select, SideMenu, SimpleTable, SingleTag, Size, THEME, TableWithSelectableRows, Tag, TagBullet, TagGroup, TextInput, Textarea, ThemeProvider, WSG84_PROJECTION, coordinatesAreDistinct, customDayjs, getCoordinates, getLocalizedDayjs, getPseudoRandomString, getUtcizedDayjs, isNumeric, logSoftError, stopMouseEventPropagation, useClickOutsideEffect, useFieldControl, useForceUpdate, useKey, useNewWindow, usePrevious };
|
|
36564
|
+
export { Accent, Button$1 as Button, Checkbox, CoordinatesFormat, CoordinatesInput, CustomSearch, DatePicker, DateRangePicker, Dialog, Dropdown, Field$2 as Field, FieldError, Fieldset, FormikCheckbox, FormikCoordinatesInput, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikNumberInput, FormikSearch, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MapMenuModal, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, NewWindow, NewWindowContext, NotificationEvent, Notifier, NumberInput, OPENLAYERS_PROJECTION, OnlyFontGlobalStyle, Search, Select, SideMenu, SimpleTable, SingleTag, Size, THEME, TableWithSelectableRows, Tag, TagBullet, TagGroup, TextInput, Textarea, ThemeProvider, WSG84_PROJECTION, coordinatesAreDistinct, customDayjs, getCoordinates, getLocalizedDayjs, getPseudoRandomString, getUtcizedDayjs, isNumeric, logSoftError, stopMouseEventPropagation, useClickOutsideEffect, useFieldControl, useForceUpdate, useKey, useNewWindow, usePrevious };
|
|
36478
36565
|
//# sourceMappingURL=index.js.map
|