@norges-domstoler/dds-components 9.4.0 → 9.5.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/dist/assets/svg/openExternal.svg.js +4 -0
- package/dist/cjs/components/Grid/Grid.d.ts +1 -5
- package/dist/cjs/components/Grid/Grid.utils.d.ts +4 -0
- package/dist/cjs/components/Grid/GridChild.d.ts +2 -7
- package/dist/cjs/components/InlineEdit/InlineEdit.stories.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.styles.d.ts +11 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.tokens.d.ts +3 -1
- package/dist/cjs/components/InlineEdit/InlineEdit.types.d.ts +3 -1
- package/dist/cjs/components/InlineEdit/InlineEditInput.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditInput.stories.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.d.ts +1 -1
- package/dist/cjs/components/InlineEdit/InlineEditTextArea.stories.d.ts +1 -1
- package/dist/cjs/components/Search/AutocompleteSearch.context.d.ts +12 -0
- package/dist/cjs/components/Search/Search.stories.d.ts +15 -2
- package/dist/cjs/components/Search/Search.tokens.d.ts +8 -0
- package/dist/cjs/components/Search/SearchAutocompleteWrapper.d.ts +31 -0
- package/dist/cjs/components/Search/SearchSuggestions.d.ts +29 -0
- package/dist/cjs/components/Search/index.d.ts +10 -1
- package/dist/cjs/components/Select/Select.d.ts +0 -3
- package/dist/cjs/components/Select/Select.tokens.d.ts +2 -9
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +4 -1
- package/dist/cjs/icons/tsx/barChart.d.ts +2 -0
- package/dist/cjs/icons/tsx/barChartBoxed.d.ts +2 -0
- package/dist/cjs/icons/tsx/index.d.ts +6 -0
- package/dist/cjs/icons/tsx/libraryAdd.d.ts +2 -0
- package/dist/cjs/icons/tsx/lineChart.d.ts +2 -0
- package/dist/cjs/icons/tsx/trendingDown.d.ts +2 -0
- package/dist/cjs/icons/tsx/trendingUp.d.ts +2 -0
- package/dist/cjs/icons/utils/StyledSvg.d.ts +4 -1
- package/dist/cjs/icons/utils/SvgWrapper.d.ts +2 -0
- package/dist/cjs/index.js +3345 -4423
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/searchFilter.d.ts +2 -0
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +1 -1
- package/dist/components/Grid/Grid.d.ts +1 -5
- package/dist/components/Grid/Grid.utils.d.ts +4 -0
- package/dist/components/Grid/GridChild.d.ts +2 -7
- package/dist/components/Icon/Icon.js +0 -1
- package/dist/components/InlineEdit/InlineEdit.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEdit.styles.d.ts +11 -1
- package/dist/components/InlineEdit/InlineEdit.styles.js +27 -6
- package/dist/components/InlineEdit/InlineEdit.tokens.d.ts +3 -1
- package/dist/components/InlineEdit/InlineEdit.tokens.js +3 -1
- package/dist/components/InlineEdit/InlineEdit.types.d.ts +3 -1
- package/dist/components/InlineEdit/InlineEditInput.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditInput.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditTextArea.d.ts +1 -1
- package/dist/components/InlineEdit/InlineEditTextArea.stories.d.ts +1 -1
- package/dist/components/InlineEdit/InlineInput.js +19 -15
- package/dist/components/InlineEdit/InlineTextArea.js +19 -18
- package/dist/components/LocalMessage/LocalMessage.tokens.js +1 -1
- package/dist/components/Search/AutocompleteSearch.context.d.ts +12 -0
- package/dist/components/Search/AutocompleteSearch.context.js +8 -0
- package/dist/components/Search/Search.js +46 -7
- package/dist/components/Search/Search.stories.d.ts +15 -2
- package/dist/components/Search/Search.tokens.d.ts +8 -0
- package/dist/components/Search/Search.tokens.js +13 -2
- package/dist/components/Search/SearchAutocompleteWrapper.d.ts +31 -0
- package/dist/components/Search/SearchAutocompleteWrapper.js +113 -0
- package/dist/components/Search/SearchSuggestions.d.ts +29 -0
- package/dist/components/Search/SearchSuggestions.js +116 -0
- package/dist/components/Search/index.d.ts +10 -1
- package/dist/components/Search/index.js +9 -0
- package/dist/components/Select/Select.d.ts +0 -3
- package/dist/components/Select/Select.js +4 -10
- package/dist/components/Select/Select.styles.js +3 -3
- package/dist/components/Select/Select.tokens.d.ts +2 -9
- package/dist/components/Select/Select.tokens.js +2 -9
- package/dist/components/Typography/Link/Link.js +3 -9
- package/dist/components/Typography/Typography/Typography.js +3 -12
- package/dist/components/Typography/Typography.tokens.d.ts +4 -1
- package/dist/components/Typography/Typography.tokens.js +5 -2
- package/dist/components/Typography/Typography.utils.js +2 -1
- package/dist/hooks/useRoveFocus.js +10 -10
- package/dist/icons/tsx/apps.js +5 -17
- package/dist/icons/tsx/archive.js +3 -15
- package/dist/icons/tsx/arrowDown.js +5 -17
- package/dist/icons/tsx/arrowLeft.js +5 -17
- package/dist/icons/tsx/arrowRight.js +5 -17
- package/dist/icons/tsx/arrowUp.js +5 -17
- package/dist/icons/tsx/attachment.js +5 -17
- package/dist/icons/tsx/barChart.d.ts +2 -0
- package/dist/icons/tsx/barChart.js +12 -0
- package/dist/icons/tsx/barChartBoxed.d.ts +2 -0
- package/dist/icons/tsx/barChartBoxed.js +12 -0
- package/dist/icons/tsx/block.js +5 -17
- package/dist/icons/tsx/book.js +3 -15
- package/dist/icons/tsx/build.js +5 -17
- package/dist/icons/tsx/buildCircled.js +3 -15
- package/dist/icons/tsx/calendar.js +5 -17
- package/dist/icons/tsx/calendarMonth.js +5 -17
- package/dist/icons/tsx/calendarViewDay.js +5 -17
- package/dist/icons/tsx/calendarViewMonth.js +5 -17
- package/dist/icons/tsx/calendarViewWeek.js +5 -17
- package/dist/icons/tsx/call.js +5 -17
- package/dist/icons/tsx/chat.js +5 -17
- package/dist/icons/tsx/check.js +5 -17
- package/dist/icons/tsx/checkCircled.js +5 -17
- package/dist/icons/tsx/checklist.js +5 -17
- package/dist/icons/tsx/chevronDown.js +5 -17
- package/dist/icons/tsx/chevronFirst.js +5 -17
- package/dist/icons/tsx/chevronLargeLeft.js +5 -17
- package/dist/icons/tsx/chevronLargeRight.js +5 -17
- package/dist/icons/tsx/chevronLast.js +5 -17
- package/dist/icons/tsx/chevronLeft.js +5 -17
- package/dist/icons/tsx/chevronRight.js +5 -17
- package/dist/icons/tsx/chevronUp.js +5 -17
- package/dist/icons/tsx/close.js +5 -17
- package/dist/icons/tsx/closeCircled.js +5 -17
- package/dist/icons/tsx/closeSmall.js +5 -17
- package/dist/icons/tsx/cloud.js +5 -17
- package/dist/icons/tsx/collapse.js +5 -17
- package/dist/icons/tsx/comment.js +5 -17
- package/dist/icons/tsx/copy.js +5 -17
- package/dist/icons/tsx/court.js +5 -17
- package/dist/icons/tsx/dateRange.js +5 -17
- package/dist/icons/tsx/deaths.js +5 -17
- package/dist/icons/tsx/download.js +5 -17
- package/dist/icons/tsx/downloadDone.js +5 -17
- package/dist/icons/tsx/dragHandle.js +5 -17
- package/dist/icons/tsx/edit.js +5 -17
- package/dist/icons/tsx/error.js +5 -17
- package/dist/icons/tsx/exclaim.js +5 -17
- package/dist/icons/tsx/expand.js +5 -17
- package/dist/icons/tsx/facebook.js +5 -17
- package/dist/icons/tsx/family.js +5 -17
- package/dist/icons/tsx/feedback.js +5 -17
- package/dist/icons/tsx/file.js +5 -17
- package/dist/icons/tsx/fileAdd.js +5 -17
- package/dist/icons/tsx/fileText.js +5 -17
- package/dist/icons/tsx/filter.js +5 -17
- package/dist/icons/tsx/filterList.js +5 -17
- package/dist/icons/tsx/filterListOff.js +5 -17
- package/dist/icons/tsx/filterOff.js +5 -17
- package/dist/icons/tsx/findInPage.js +5 -17
- package/dist/icons/tsx/folder.js +5 -17
- package/dist/icons/tsx/folderAdd.js +5 -17
- package/dist/icons/tsx/fullsceenExit.js +5 -17
- package/dist/icons/tsx/fullscreen.js +5 -17
- package/dist/icons/tsx/gavel.js +3 -15
- package/dist/icons/tsx/help.js +5 -17
- package/dist/icons/tsx/helpFilled.js +5 -17
- package/dist/icons/tsx/home.js +5 -17
- package/dist/icons/tsx/image.js +5 -17
- package/dist/icons/tsx/index.d.ts +6 -0
- package/dist/icons/tsx/info.js +5 -17
- package/dist/icons/tsx/instagram.js +5 -17
- package/dist/icons/tsx/jordskifterett.js +2 -2
- package/dist/icons/tsx/key.js +5 -17
- package/dist/icons/tsx/lagmannsrett.js +5 -17
- package/dist/icons/tsx/language.js +5 -15
- package/dist/icons/tsx/libraryAdd.d.ts +2 -0
- package/dist/icons/tsx/libraryAdd.js +12 -0
- package/dist/icons/tsx/lineChart.d.ts +2 -0
- package/dist/icons/tsx/lineChart.js +12 -0
- package/dist/icons/tsx/link.js +5 -17
- package/dist/icons/tsx/linkOff.js +5 -17
- package/dist/icons/tsx/linkedIn.js +5 -17
- package/dist/icons/tsx/list.js +5 -17
- package/dist/icons/tsx/listAlt.js +5 -17
- package/dist/icons/tsx/location.js +5 -17
- package/dist/icons/tsx/lock.js +5 -17
- package/dist/icons/tsx/lockOpen.js +5 -17
- package/dist/icons/tsx/login.js +5 -17
- package/dist/icons/tsx/logout.js +5 -17
- package/dist/icons/tsx/mail.js +5 -17
- package/dist/icons/tsx/mailOpen.js +5 -17
- package/dist/icons/tsx/menu.js +5 -17
- package/dist/icons/tsx/minus.js +5 -17
- package/dist/icons/tsx/minusCircled.js +5 -17
- package/dist/icons/tsx/moreHorizontal.js +5 -17
- package/dist/icons/tsx/moreVertical.js +5 -17
- package/dist/icons/tsx/notarial.js +5 -17
- package/dist/icons/tsx/notifications.js +5 -17
- package/dist/icons/tsx/notificationsOff.js +5 -17
- package/dist/icons/tsx/onlineMeeting.js +5 -17
- package/dist/icons/tsx/openExternal.js +5 -17
- package/dist/icons/tsx/pdf.js +5 -17
- package/dist/icons/tsx/person.js +5 -17
- package/dist/icons/tsx/personAdd.js +5 -17
- package/dist/icons/tsx/pin.js +5 -17
- package/dist/icons/tsx/plus.js +5 -17
- package/dist/icons/tsx/plusCircled.js +5 -17
- package/dist/icons/tsx/print.js +3 -15
- package/dist/icons/tsx/property.js +3 -15
- package/dist/icons/tsx/publish.js +5 -17
- package/dist/icons/tsx/questionAnswer.js +5 -17
- package/dist/icons/tsx/receipt.js +5 -17
- package/dist/icons/tsx/redo.js +5 -17
- package/dist/icons/tsx/refresh.js +5 -17
- package/dist/icons/tsx/replay.js +5 -17
- package/dist/icons/tsx/search.js +5 -17
- package/dist/icons/tsx/settings.js +5 -17
- package/dist/icons/tsx/sms.js +5 -17
- package/dist/icons/tsx/star.js +5 -17
- package/dist/icons/tsx/starFilled.js +5 -17
- package/dist/icons/tsx/sync.js +5 -17
- package/dist/icons/tsx/time.js +5 -17
- package/dist/icons/tsx/tingrett.js +5 -17
- package/dist/icons/tsx/tip.js +5 -17
- package/dist/icons/tsx/trash.js +5 -17
- package/dist/icons/tsx/trendingDown.d.ts +2 -0
- package/dist/icons/tsx/trendingDown.js +12 -0
- package/dist/icons/tsx/trendingUp.d.ts +2 -0
- package/dist/icons/tsx/trendingUp.js +12 -0
- package/dist/icons/tsx/twitter.js +5 -17
- package/dist/icons/tsx/undo.js +5 -17
- package/dist/icons/tsx/unfoldLess.js +5 -17
- package/dist/icons/tsx/unfoldMore.js +5 -17
- package/dist/icons/tsx/upload.js +5 -17
- package/dist/icons/tsx/visibilityOff.js +5 -17
- package/dist/icons/tsx/visibilityOn.js +5 -17
- package/dist/icons/tsx/warning.js +3 -15
- package/dist/icons/tsx/zoomIn.js +5 -17
- package/dist/icons/tsx/zoomOut.js +5 -17
- package/dist/icons/utils/StyledSvg.d.ts +4 -1
- package/dist/icons/utils/StyledSvg.js +14 -1
- package/dist/icons/utils/SvgWrapper.d.ts +2 -0
- package/dist/icons/utils/SvgWrapper.js +16 -0
- package/dist/index.js +8 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/searchFilter.d.ts +2 -0
- package/dist/utils/searchFilter.js +10 -0
- package/package.json +2 -2
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var size = 24;
|
|
4
|
+
var sizePx = "".concat(size, "px");
|
|
5
|
+
var StyledSvg = styled.svg.attrs(function (_ref) {
|
|
6
|
+
var height = _ref.height,
|
|
7
|
+
width = _ref.width,
|
|
8
|
+
fill = _ref.fill;
|
|
9
|
+
return {
|
|
10
|
+
height: height ? height : sizePx,
|
|
11
|
+
width: width ? width : sizePx,
|
|
12
|
+
fill: fill ? fill : 'currentColor',
|
|
13
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
14
|
+
viewBox: "0 0 ".concat(size, " ").concat(size)
|
|
15
|
+
};
|
|
16
|
+
}).withConfig({
|
|
4
17
|
displayName: "StyledSvg",
|
|
5
18
|
componentId: "sc-ii8wrw-0"
|
|
6
19
|
})(["display:inline-block;transition:fill 0.2s;flex-shrink:0;"]);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { StyledSvg } from './StyledSvg.js';
|
|
4
|
+
|
|
5
|
+
function SvgWrapper(props) {
|
|
6
|
+
var title = props.title,
|
|
7
|
+
children = props.children,
|
|
8
|
+
rest = __rest(props, ["title", "children"]);
|
|
9
|
+
return jsxs(StyledSvg, Object.assign({}, rest, {
|
|
10
|
+
children: [title && jsx("title", {
|
|
11
|
+
children: title
|
|
12
|
+
}), children]
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SvgWrapper };
|
package/dist/index.js
CHANGED
|
@@ -5,10 +5,10 @@ export { Checkbox } from './components/Checkbox/Checkbox.js';
|
|
|
5
5
|
export { CheckboxGroup } from './components/Checkbox/CheckboxGroup.js';
|
|
6
6
|
export { Button } from './components/Button/Button.js';
|
|
7
7
|
export { TextInput } from './components/TextInput/TextInput.js';
|
|
8
|
-
export { Select, createSelectOptions
|
|
8
|
+
export { Select, createSelectOptions } from './components/Select/Select.js';
|
|
9
9
|
export { GlobalMessage } from './components/GlobalMessage/GlobalMessage.js';
|
|
10
10
|
export { LocalMessage } from './components/LocalMessage/LocalMessage.js';
|
|
11
|
-
export { Search } from './components/Search/
|
|
11
|
+
export { Search } from './components/Search/index.js';
|
|
12
12
|
export { Typography } from './components/Typography/Typography/Typography.js';
|
|
13
13
|
export { Label } from './components/Typography/Label/Label.js';
|
|
14
14
|
export { Paragraph } from './components/Typography/Paragraph/Paragraph.js';
|
|
@@ -196,6 +196,12 @@ export { VisibilityOnIcon } from './icons/tsx/visibilityOn.js';
|
|
|
196
196
|
export { WarningIcon } from './icons/tsx/warning.js';
|
|
197
197
|
export { ZoomInIcon } from './icons/tsx/zoomIn.js';
|
|
198
198
|
export { ZoomOutIcon } from './icons/tsx/zoomOut.js';
|
|
199
|
+
export { BarChartIcon } from './icons/tsx/barChart.js';
|
|
200
|
+
export { BarChartBoxedIcon } from './icons/tsx/barChartBoxed.js';
|
|
201
|
+
export { LineChartIcon } from './icons/tsx/lineChart.js';
|
|
202
|
+
export { TrendingUpIcon } from './icons/tsx/trendingUp.js';
|
|
203
|
+
export { TrendingDownIcon } from './icons/tsx/trendingDown.js';
|
|
204
|
+
export { LibraryAddIcon } from './icons/tsx/libraryAdd.js';
|
|
199
205
|
export { ToggleBar } from './components/ToggleBar/ToggleBar.js';
|
|
200
206
|
export { ToggleRadio } from './components/ToggleBar/ToggleRadio.js';
|
|
201
207
|
export { Grid } from './components/Grid/Grid.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function escapeRegexCharacters(text) {
|
|
2
|
+
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
3
|
+
}
|
|
4
|
+
function searchFilter(text, query) {
|
|
5
|
+
// Søkeordet er enten først i teksten, eller så har det mellomrom, bindestrek eller start-parentes før seg.
|
|
6
|
+
var searchFilterRegex = new RegExp("(?:^|[\\s-(])".concat(escapeRegexCharacters(query.toLowerCase())));
|
|
7
|
+
return searchFilterRegex.test(text.toLowerCase());
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { escapeRegexCharacters, searchFilter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@norges-domstoler/dds-components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"description": "React components used in Elsa - domstolenes designsystem",
|
|
5
5
|
"author": "Elsa team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"attr-accept": "^2.2.2",
|
|
120
120
|
"file-selector": "^0.6.0",
|
|
121
121
|
"focus-visible": "^5.2.0",
|
|
122
|
-
"react-select": "^5.
|
|
122
|
+
"react-select": "^5.6.0",
|
|
123
123
|
"tslib": "^2.4.0"
|
|
124
124
|
}
|
|
125
125
|
}
|