@mtes-mct/monitor-ui 10.3.0 → 10.4.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 +14 -0
- package/index.js +55 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Message.d.ts +7 -0
- package/src/constants.d.ts +6 -0
- package/src/index.d.ts +7 -3
- package/src/symbols/ExclamationPoint.d.ts +9 -0
- /package/src/{components → elements}/SingleTag.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [10.3.1](https://github.com/MTES-MCT/monitor-ui/compare/v10.3.0...v10.3.1) (2023-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **theme:** update goldenPoppy25 ([bb4901f](https://github.com/MTES-MCT/monitor-ui/commit/bb4901ff2a4e19919975540c4be3f2f662969fe8))
|
|
7
|
+
|
|
8
|
+
## [10.3.0](https://github.com/MTES-MCT/monitor-ui/compare/v10.2.1...v10.3.0) (2023-10-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **theme:** add goldenPoppy25 ([ecc4220](https://github.com/MTES-MCT/monitor-ui/commit/ecc4220a383ddb9fd33372a7df16c625ae04f88e))
|
|
14
|
+
|
|
1
15
|
## [10.2.1](https://github.com/MTES-MCT/monitor-ui/compare/v10.2.0...v10.2.1) (2023-10-03)
|
|
2
16
|
|
|
3
17
|
|
package/index.js
CHANGED
|
@@ -81,6 +81,13 @@ var Accent;
|
|
|
81
81
|
Accent["SECONDARY"] = "SECONDARY";
|
|
82
82
|
Accent["TERTIARY"] = "TERTIARY";
|
|
83
83
|
})(Accent || (Accent = {}));
|
|
84
|
+
var Level;
|
|
85
|
+
(function (Level) {
|
|
86
|
+
Level["ERROR"] = "ERROR";
|
|
87
|
+
Level["INFO"] = "INFO";
|
|
88
|
+
Level["SUCCESS"] = "SUCCESS";
|
|
89
|
+
Level["WARNING"] = "WARNING";
|
|
90
|
+
})(Level || (Level = {}));
|
|
84
91
|
var CoordinatesFormat;
|
|
85
92
|
(function (CoordinatesFormat) {
|
|
86
93
|
CoordinatesFormat["DECIMAL_DEGREES"] = "DD";
|
|
@@ -260,7 +267,7 @@ const THEME = {
|
|
|
260
267
|
// Notification Colors
|
|
261
268
|
mediumSeaGreen: '#29B361',
|
|
262
269
|
goldenPoppy: '#FAC11A',
|
|
263
|
-
goldenPoppy25: '#
|
|
270
|
+
goldenPoppy25: '#FAC11A40',
|
|
264
271
|
/** CONTEXTUAL COLORS */
|
|
265
272
|
// Mission status
|
|
266
273
|
yellowGreen: '#8CC800',
|
|
@@ -2294,9 +2301,9 @@ function stopMouseEventPropagation(event) {
|
|
|
2294
2301
|
|
|
2295
2302
|
function RawDialog({ children, className, isAbsolute = false, ...nativeProps }) {
|
|
2296
2303
|
const controlledClassName = classnames('Component-Dialog', className);
|
|
2297
|
-
return (jsxs(Box$
|
|
2304
|
+
return (jsxs(Box$i, { "$isAbsolute": isAbsolute, className: controlledClassName, onClick: stopMouseEventPropagation, ...nativeProps, children: [jsx(Overlay, { "$isAbsolute": isAbsolute }), jsx(Window, { "$isAbsolute": isAbsolute, children: children })] }));
|
|
2298
2305
|
}
|
|
2299
|
-
const Box$
|
|
2306
|
+
const Box$i = styled.div `
|
|
2300
2307
|
position: ${p => (p.$isAbsolute ? 'absolute' : 'fixed')};
|
|
2301
2308
|
top: 0;
|
|
2302
2309
|
bottom: 0;
|
|
@@ -34439,12 +34446,12 @@ function SingleTag({ accent = Accent.PRIMARY, children, className, onDelete, ...
|
|
|
34439
34446
|
}, [onDelete]);
|
|
34440
34447
|
switch (accent) {
|
|
34441
34448
|
case Accent.SECONDARY:
|
|
34442
|
-
return (jsxs(Box$
|
|
34449
|
+
return (jsxs(Box$h, { className: controlledClassName, ...nativeProps, children: [jsx(SecondaryText, { children: children }), jsx(SecondaryIconButton, { accent: Accent.TERTIARY, Icon: Close, iconSize: 10, onClick: handleDelete })] }));
|
|
34443
34450
|
default:
|
|
34444
|
-
return (jsxs(Box$
|
|
34451
|
+
return (jsxs(Box$h, { className: controlledClassName, ...nativeProps, children: [jsx(PrimaryText, { children: children }), jsx(PrimaryIconButton, { accent: Accent.TERTIARY, Icon: Close, iconSize: 10, onClick: handleDelete })] }));
|
|
34445
34452
|
}
|
|
34446
34453
|
}
|
|
34447
|
-
const Box$
|
|
34454
|
+
const Box$h = styled.div `
|
|
34448
34455
|
align-items: center;
|
|
34449
34456
|
display: inline-flex;
|
|
34450
34457
|
max-width: 100%;
|
|
@@ -34558,6 +34565,47 @@ const MapMenuDialog = {
|
|
|
34558
34565
|
VisibilityButton
|
|
34559
34566
|
};
|
|
34560
34567
|
|
|
34568
|
+
const ExclamationPoint = styled.span `
|
|
34569
|
+
background: ${p => p.backgroundColor || p.theme.color.goldenPoppy};
|
|
34570
|
+
border-radius: 15px;
|
|
34571
|
+
color: ${p => p.color || p.theme.color.white};
|
|
34572
|
+
display: inline-block;
|
|
34573
|
+
font-size: 11px;
|
|
34574
|
+
font-weight: 700;
|
|
34575
|
+
line-height: 11px !important;
|
|
34576
|
+
height: 20px;
|
|
34577
|
+
padding: 3.25px 4px 5px 8.25px;
|
|
34578
|
+
width: 20px;
|
|
34579
|
+
box-sizing: border-box;
|
|
34580
|
+
|
|
34581
|
+
::after {
|
|
34582
|
+
content: '! ';
|
|
34583
|
+
}
|
|
34584
|
+
`;
|
|
34585
|
+
|
|
34586
|
+
function Message({ children, level = Level.WARNING, ...nativeProps }) {
|
|
34587
|
+
switch (level) {
|
|
34588
|
+
case Level.WARNING:
|
|
34589
|
+
return (jsxs(Box$g, { backgroundColor: THEME.color.goldenPoppy25, color: THEME.color.slateGray, ...nativeProps, children: [jsx(StyledExclamationPoint, { backgroundColor: THEME.color.goldenPoppy, color: THEME.color.white }), jsx(Text, { children: children })] }));
|
|
34590
|
+
default:
|
|
34591
|
+
return (jsxs(Box$g, { backgroundColor: THEME.color.goldenPoppy25, color: THEME.color.slateGray, ...nativeProps, children: [jsx(StyledExclamationPoint, { backgroundColor: THEME.color.goldenPoppy, color: THEME.color.white }), jsx(Text, { children: children })] }));
|
|
34592
|
+
}
|
|
34593
|
+
}
|
|
34594
|
+
const Text = styled.div `
|
|
34595
|
+
margin-left: 8px;
|
|
34596
|
+
`;
|
|
34597
|
+
const Box$g = styled.span `
|
|
34598
|
+
background: ${p => p.backgroundColor || p.theme.color.goldenPoppy25};
|
|
34599
|
+
color: ${p => p.color || p.theme.color.slateGray};
|
|
34600
|
+
padding: 8px 16px 16px 8px;
|
|
34601
|
+
display: flex;
|
|
34602
|
+
border-radius: 2px;
|
|
34603
|
+
font-size: 13px;
|
|
34604
|
+
`;
|
|
34605
|
+
const StyledExclamationPoint = styled(ExclamationPoint) `
|
|
34606
|
+
flex-shrink: 0;
|
|
34607
|
+
`;
|
|
34608
|
+
|
|
34561
34609
|
const Field$2 = styled.div.attrs(props => ({
|
|
34562
34610
|
className: classnames('Element-Field', props.className)
|
|
34563
34611
|
})) `
|
|
@@ -70954,5 +71002,5 @@ function undefine(value) {
|
|
|
70954
71002
|
return value;
|
|
70955
71003
|
}
|
|
70956
71004
|
|
|
70957
|
-
export { Accent, Button$1 as Button, Checkbox, CoordinatesFormat, CoordinatesInput, CustomSearch, DataTable, 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, MapMenuDialog, 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, cleanString, coordinatesAreDistinct, customDayjs, getCoordinates, getLocalizedDayjs, getOptionsFromIdAndName, getOptionsFromLabelledEnum, getPseudoRandomString, getUtcizedDayjs, isArray, isDefined, isNumeric, isObject, logSoftError, normalizeString, nullify, pluralize, stopMouseEventPropagation, undefine, useClickOutsideEffect, useFieldControl, useForceUpdate, useKey, useNewWindow, usePrevious };
|
|
71005
|
+
export { Accent, Button$1 as Button, Checkbox, CoordinatesFormat, CoordinatesInput, CustomSearch, DataTable, DatePicker, DateRangePicker, Dialog, Dropdown, ExclamationPoint, 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, Level, MapMenuDialog, Message, 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, cleanString, coordinatesAreDistinct, customDayjs, getCoordinates, getLocalizedDayjs, getOptionsFromIdAndName, getOptionsFromLabelledEnum, getPseudoRandomString, getUtcizedDayjs, isArray, isDefined, isNumeric, isObject, logSoftError, normalizeString, nullify, pluralize, stopMouseEventPropagation, undefine, useClickOutsideEffect, useFieldControl, useForceUpdate, useKey, useNewWindow, usePrevious };
|
|
70958
71006
|
//# sourceMappingURL=index.js.map
|