@norges-domstoler/dds-components 13.1.1 → 13.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/dist/cjs/components/Table/Table.stories.d.ts +1 -0
- package/dist/cjs/components/Table/Table.tokens.d.ts +9 -0
- package/dist/cjs/components/Table/Table.types.d.ts +1 -1
- package/dist/cjs/icons/tsx/hourglassBottom.d.ts +3 -0
- package/dist/cjs/icons/tsx/hourglassDisabled.d.ts +3 -0
- package/dist/cjs/icons/tsx/hourglassEmpty.d.ts +3 -0
- package/dist/cjs/icons/tsx/hourglassFull.d.ts +3 -0
- package/dist/cjs/icons/tsx/hourglassTop.d.ts +3 -0
- package/dist/cjs/icons/tsx/index.d.ts +10 -0
- package/dist/cjs/icons/tsx/starHalfFilled.d.ts +3 -0
- package/dist/cjs/icons/tsx/thumbdown.d.ts +3 -0
- package/dist/cjs/icons/tsx/thumbdownFilled.d.ts +3 -0
- package/dist/cjs/icons/tsx/thumbup.d.ts +3 -0
- package/dist/cjs/icons/tsx/thumbupFilled.d.ts +3 -0
- package/dist/cjs/index.js +110 -7
- package/dist/components/Table/Table.js +7 -4
- package/dist/components/Table/Table.stories.d.ts +1 -0
- package/dist/components/Table/Table.tokens.d.ts +9 -0
- package/dist/components/Table/Table.tokens.js +11 -1
- package/dist/components/Table/Table.types.d.ts +1 -1
- package/dist/icons/tsx/hourglassBottom.d.ts +3 -0
- package/dist/icons/tsx/hourglassBottom.js +12 -0
- package/dist/icons/tsx/hourglassDisabled.d.ts +3 -0
- package/dist/icons/tsx/hourglassDisabled.js +12 -0
- package/dist/icons/tsx/hourglassEmpty.d.ts +3 -0
- package/dist/icons/tsx/hourglassEmpty.js +12 -0
- package/dist/icons/tsx/hourglassFull.d.ts +3 -0
- package/dist/icons/tsx/hourglassFull.js +12 -0
- package/dist/icons/tsx/hourglassTop.d.ts +3 -0
- package/dist/icons/tsx/hourglassTop.js +12 -0
- package/dist/icons/tsx/index.d.ts +10 -0
- package/dist/icons/tsx/starHalfFilled.d.ts +3 -0
- package/dist/icons/tsx/starHalfFilled.js +12 -0
- package/dist/icons/tsx/thumbdown.d.ts +3 -0
- package/dist/icons/tsx/thumbdown.js +12 -0
- package/dist/icons/tsx/thumbdownFilled.d.ts +3 -0
- package/dist/icons/tsx/thumbdownFilled.js +12 -0
- package/dist/icons/tsx/thumbup.d.ts +3 -0
- package/dist/icons/tsx/thumbup.js +12 -0
- package/dist/icons/tsx/thumbupFilled.d.ts +3 -0
- package/dist/icons/tsx/thumbupFilled.js +12 -0
- package/dist/index.js +10 -0
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare const Default: (args: TableProps) => JSX.Element;
|
|
|
41
41
|
export declare const WithDividers: (args: TableProps) => JSX.Element;
|
|
42
42
|
export declare const Focusable: (args: TableProps) => JSX.Element;
|
|
43
43
|
export declare const Compact: (args: TableProps) => JSX.Element;
|
|
44
|
+
export declare const ExtraCompact: (args: TableProps) => JSX.Element;
|
|
44
45
|
export declare const StickyHeader: (args: TableProps) => JSX.Element;
|
|
45
46
|
export declare const Hoverable: (args: TableProps) => JSX.Element;
|
|
46
47
|
export declare const WithButtonAndIcons: (args: TableProps) => JSX.Element;
|
|
@@ -24,6 +24,12 @@ export declare const tableTokens: {
|
|
|
24
24
|
borderBottom: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
head: {
|
|
28
|
+
extraCompact: {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
27
33
|
};
|
|
28
34
|
cell: {
|
|
29
35
|
density: {
|
|
@@ -33,6 +39,9 @@ export declare const tableTokens: {
|
|
|
33
39
|
compact: {
|
|
34
40
|
padding: string;
|
|
35
41
|
};
|
|
42
|
+
extraCompact: {
|
|
43
|
+
padding: string;
|
|
44
|
+
};
|
|
36
45
|
};
|
|
37
46
|
head: {
|
|
38
47
|
backgroundColor: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type TableDensity = 'normal' | 'compact';
|
|
2
|
+
export type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
3
3
|
export type TableProps = {
|
|
4
4
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
5
5
|
density?: TableDensity;
|
|
@@ -65,6 +65,11 @@ export * from './gavel';
|
|
|
65
65
|
export * from './help';
|
|
66
66
|
export * from './helpFilled';
|
|
67
67
|
export * from './home';
|
|
68
|
+
export * from './hourglassBottom';
|
|
69
|
+
export * from './hourglassDisabled';
|
|
70
|
+
export * from './hourglassEmpty';
|
|
71
|
+
export * from './hourglassFull';
|
|
72
|
+
export * from './hourglassTop';
|
|
68
73
|
export * from './image';
|
|
69
74
|
export * from './info';
|
|
70
75
|
export * from './instagram';
|
|
@@ -113,7 +118,12 @@ export * from './settings';
|
|
|
113
118
|
export * from './sms';
|
|
114
119
|
export * from './star';
|
|
115
120
|
export * from './starFilled';
|
|
121
|
+
export * from './starHalfFilled';
|
|
116
122
|
export * from './sync';
|
|
123
|
+
export * from './thumbdown';
|
|
124
|
+
export * from './thumbdownFilled';
|
|
125
|
+
export * from './thumbup';
|
|
126
|
+
export * from './thumbupFilled';
|
|
117
127
|
export * from './time';
|
|
118
128
|
export * from './tingrett';
|
|
119
129
|
export * from './tip';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1507,6 +1507,46 @@ function HomeIcon(props) {
|
|
|
1507
1507
|
}));
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
1510
|
+
function HourglassBottom(props) {
|
|
1511
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1512
|
+
children: jsxRuntime.jsx("path", {
|
|
1513
|
+
d: "m18 22-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"
|
|
1514
|
+
})
|
|
1515
|
+
}));
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
function HourglassDisabled(props) {
|
|
1519
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1520
|
+
children: jsxRuntime.jsx("path", {
|
|
1521
|
+
d: "M8 4h8v3.5l-2.84 2.84 1.25 1.25L18 8.01 17.99 8H18V2H6v1.17l2 2zM2.1 2.1.69 3.51l8.9 8.9L6 16l.01.01H6V22h12v-1.17l2.49 2.49 1.41-1.41L2.1 2.1zM16 20H8v-3.5l2.84-2.84L16 18.83V20z"
|
|
1522
|
+
})
|
|
1523
|
+
}));
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
function HourglassEmpty(props) {
|
|
1527
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1528
|
+
children: jsxRuntime.jsx("path", {
|
|
1529
|
+
d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5-4-4V4h8v3.5l-4 4z"
|
|
1530
|
+
})
|
|
1531
|
+
}));
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
function HourglassFull(props) {
|
|
1535
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1536
|
+
children: jsxRuntime.jsx("path", {
|
|
1537
|
+
d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"
|
|
1538
|
+
})
|
|
1539
|
+
}));
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
function HourglassTop(props) {
|
|
1543
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1544
|
+
children: jsxRuntime.jsx("path", {
|
|
1545
|
+
d: "m6 2 .01 6L10 12l-3.99 4.01L6 22h12v-6l-4-4 4-3.99V2H6zm10 14.5V20H8v-3.5l4-4 4 4z"
|
|
1546
|
+
})
|
|
1547
|
+
}));
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1510
1550
|
function ImageIcon(props) {
|
|
1511
1551
|
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1512
1552
|
children: jsxRuntime.jsx("path", {
|
|
@@ -1909,6 +1949,14 @@ function StarFilledIcon(props) {
|
|
|
1909
1949
|
}));
|
|
1910
1950
|
}
|
|
1911
1951
|
|
|
1952
|
+
function StarHalfFilled(props) {
|
|
1953
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1954
|
+
children: jsxRuntime.jsx("path", {
|
|
1955
|
+
d: "m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"
|
|
1956
|
+
})
|
|
1957
|
+
}));
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1912
1960
|
function SyncIcon(props) {
|
|
1913
1961
|
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1914
1962
|
children: jsxRuntime.jsx("path", {
|
|
@@ -1917,6 +1965,38 @@ function SyncIcon(props) {
|
|
|
1917
1965
|
}));
|
|
1918
1966
|
}
|
|
1919
1967
|
|
|
1968
|
+
function Thumbdown(props) {
|
|
1969
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1970
|
+
children: jsxRuntime.jsx("path", {
|
|
1971
|
+
d: "m10.89 18.28.57-2.89c.12-.59-.04-1.2-.42-1.66-.38-.46-.94-.73-1.54-.73H4v-1.08L6.57 6h8.09c.18 0 .34.16.34.34v7.84l-4.11 4.1M10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22zm10-7h2V4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1z"
|
|
1972
|
+
})
|
|
1973
|
+
}));
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
function ThumbdownFilled(props) {
|
|
1977
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1978
|
+
children: jsxRuntime.jsx("path", {
|
|
1979
|
+
d: "M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15z"
|
|
1980
|
+
})
|
|
1981
|
+
}));
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
function Thumbup(props) {
|
|
1985
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1986
|
+
children: jsxRuntime.jsx("path", {
|
|
1987
|
+
d: "m13.11 5.72-.57 2.89c-.12.59.04 1.2.42 1.66.38.46.94.73 1.54.73H20v1.08L17.43 18H9.34c-.18 0-.34-.16-.34-.34V9.82l4.11-4.1M14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.83C7 18.95 8.05 20 9.34 20h8.1c.71 0 1.36-.37 1.72-.97l2.67-6.15c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2zM4 9H2v11h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1z"
|
|
1988
|
+
})
|
|
1989
|
+
}));
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
function ThumbupFilled(props) {
|
|
1993
|
+
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1994
|
+
children: jsxRuntime.jsx("path", {
|
|
1995
|
+
d: "M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"
|
|
1996
|
+
})
|
|
1997
|
+
}));
|
|
1998
|
+
}
|
|
1999
|
+
|
|
1920
2000
|
function TimeIcon(props) {
|
|
1921
2001
|
return jsxRuntime.jsx(SvgWrapper, Object.assign({}, props, {
|
|
1922
2002
|
children: jsxRuntime.jsx("path", {
|
|
@@ -2148,11 +2228,11 @@ var renderInputMessage = function renderInputMessage(tip, tipId, errorMessage, e
|
|
|
2148
2228
|
|
|
2149
2229
|
var colors$r = ddsDesignTokens.ddsBaseTokens.colors,
|
|
2150
2230
|
borderRadius$9 = ddsDesignTokens.ddsBaseTokens.borderRadius,
|
|
2151
|
-
font = ddsDesignTokens.ddsBaseTokens.font;
|
|
2231
|
+
font$1 = ddsDesignTokens.ddsBaseTokens.font;
|
|
2152
2232
|
var paper = {
|
|
2153
2233
|
backgroundColor: colors$r.DdsColorNeutralsWhite,
|
|
2154
2234
|
borderRadius: borderRadius$9.RadiiDdsBorderRadius1Radius,
|
|
2155
|
-
fontFamily: font.DdsFontBodySans01FontFamily
|
|
2235
|
+
fontFamily: font$1.DdsFontBodySans01FontFamily
|
|
2156
2236
|
};
|
|
2157
2237
|
var paperTokens = {
|
|
2158
2238
|
paper: paper
|
|
@@ -6290,7 +6370,8 @@ var Search = Search$1;
|
|
|
6290
6370
|
Search.AutocompleteWrapper = SearchAutocompleteWrapper;
|
|
6291
6371
|
Search.Suggestions = SearchSuggestions;
|
|
6292
6372
|
|
|
6293
|
-
var
|
|
6373
|
+
var font = ddsDesignTokens.ddsBaseTokens.font,
|
|
6374
|
+
colors$h = ddsDesignTokens.ddsBaseTokens.colors,
|
|
6294
6375
|
border$7 = ddsDesignTokens.ddsBaseTokens.border,
|
|
6295
6376
|
spacing$q = ddsDesignTokens.ddsBaseTokens.spacing,
|
|
6296
6377
|
iconSizes$2 = ddsDesignTokens.ddsBaseTokens.iconSizes,
|
|
@@ -6319,6 +6400,12 @@ var row$2 = {
|
|
|
6319
6400
|
withDividers: {
|
|
6320
6401
|
borderBottom: "1px solid ".concat(colors$h.DdsColorNeutralsGray4)
|
|
6321
6402
|
}
|
|
6403
|
+
},
|
|
6404
|
+
head: {
|
|
6405
|
+
extraCompact: {
|
|
6406
|
+
backgroundColor: colors$h.DdsColorNeutralsWhite,
|
|
6407
|
+
fontSize: font.DdsFontBodySans01FontSize
|
|
6408
|
+
}
|
|
6322
6409
|
}
|
|
6323
6410
|
};
|
|
6324
6411
|
var cell$3 = {
|
|
@@ -6328,6 +6415,9 @@ var cell$3 = {
|
|
|
6328
6415
|
},
|
|
6329
6416
|
compact: {
|
|
6330
6417
|
padding: "".concat(spacing$q.SizesDdsSpacingLocalX075)
|
|
6418
|
+
},
|
|
6419
|
+
extraCompact: {
|
|
6420
|
+
padding: "".concat(spacing$q.SizesDdsSpacingLocalX025, " ").concat(spacing$q.SizesDdsSpacingLocalX05)
|
|
6331
6421
|
}
|
|
6332
6422
|
},
|
|
6333
6423
|
head: {
|
|
@@ -6362,14 +6452,17 @@ var cell$2 = tableTokens.cell,
|
|
|
6362
6452
|
var StyledTable$1 = styled__default.default.table.withConfig({
|
|
6363
6453
|
displayName: "Table__StyledTable",
|
|
6364
6454
|
componentId: "sc-bw0w0a-0"
|
|
6365
|
-
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
6455
|
+
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
6366
6456
|
var density = _ref.density;
|
|
6367
6457
|
return styled.css(["td,th{padding:", ";}"], cell$2.density[density].padding);
|
|
6368
6458
|
}, function (_ref2) {
|
|
6369
|
-
var
|
|
6370
|
-
return
|
|
6459
|
+
var density = _ref2.density;
|
|
6460
|
+
return density === 'extraCompact' && styled.css(["th{background-color:", ";font-size:", ";}tr[type='body']{&:nth-of-type(even){background-color:", ";}&:nth-of-type(odd){background-color:", ";}}"], row$1.head.extraCompact.backgroundColor, row$1.head.extraCompact.fontSize, row$1.body.odd.backgroundColor, row$1.body.even.backgroundColor);
|
|
6371
6461
|
}, function (_ref3) {
|
|
6372
|
-
var
|
|
6462
|
+
var stickyHeader = _ref3.stickyHeader;
|
|
6463
|
+
return stickyHeader && styled.css(["tr[type='head']{th[type='head']{position:sticky;top:0;z-index:50;}}"]);
|
|
6464
|
+
}, function (_ref4) {
|
|
6465
|
+
var withDividers = _ref4.withDividers;
|
|
6373
6466
|
return withDividers && styled.css(["tr[type='body']{border-bottom:", ";}"], row$1.body.withDividers.borderBottom);
|
|
6374
6467
|
});
|
|
6375
6468
|
var Table$1 = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
@@ -11509,6 +11602,11 @@ exports.Heading = Heading;
|
|
|
11509
11602
|
exports.HelpFilledIcon = HelpFilledIcon;
|
|
11510
11603
|
exports.HelpIcon = HelpIcon;
|
|
11511
11604
|
exports.HomeIcon = HomeIcon;
|
|
11605
|
+
exports.HourglassBottom = HourglassBottom;
|
|
11606
|
+
exports.HourglassDisabled = HourglassDisabled;
|
|
11607
|
+
exports.HourglassEmpty = HourglassEmpty;
|
|
11608
|
+
exports.HourglassFull = HourglassFull;
|
|
11609
|
+
exports.HourglassTop = HourglassTop;
|
|
11512
11610
|
exports.Icon = Icon;
|
|
11513
11611
|
exports.ImageIcon = ImageIcon;
|
|
11514
11612
|
exports.InfoIcon = InfoIcon;
|
|
@@ -11589,6 +11687,7 @@ exports.SmsIcon = SmsIcon;
|
|
|
11589
11687
|
exports.Spinner = Spinner;
|
|
11590
11688
|
exports.SplitButton = SplitButton;
|
|
11591
11689
|
exports.StarFilledIcon = StarFilledIcon;
|
|
11690
|
+
exports.StarHalfFilled = StarHalfFilled;
|
|
11592
11691
|
exports.StarIcon = StarIcon;
|
|
11593
11692
|
exports.StyledTextArea = StyledTextArea;
|
|
11594
11693
|
exports.SyncIcon = SyncIcon;
|
|
@@ -11601,6 +11700,10 @@ exports.Tabs = Tabs;
|
|
|
11601
11700
|
exports.Tag = Tag;
|
|
11602
11701
|
exports.TextArea = TextArea;
|
|
11603
11702
|
exports.TextInput = TextInput;
|
|
11703
|
+
exports.Thumbdown = Thumbdown;
|
|
11704
|
+
exports.ThumbdownFilled = ThumbdownFilled;
|
|
11705
|
+
exports.Thumbup = Thumbup;
|
|
11706
|
+
exports.ThumbupFilled = ThumbupFilled;
|
|
11604
11707
|
exports.TimeIcon = TimeIcon;
|
|
11605
11708
|
exports.TingrettIcon = TingrettIcon;
|
|
11606
11709
|
exports.TipIcon = TipIcon;
|
|
@@ -17,14 +17,17 @@ var cell = tableTokens.cell,
|
|
|
17
17
|
var StyledTable = styled.table.withConfig({
|
|
18
18
|
displayName: "Table__StyledTable",
|
|
19
19
|
componentId: "sc-bw0w0a-0"
|
|
20
|
-
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
20
|
+
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
21
21
|
var density = _ref.density;
|
|
22
22
|
return css(["td,th{padding:", ";}"], cell.density[density].padding);
|
|
23
23
|
}, function (_ref2) {
|
|
24
|
-
var
|
|
25
|
-
return
|
|
24
|
+
var density = _ref2.density;
|
|
25
|
+
return density === 'extraCompact' && css(["th{background-color:", ";font-size:", ";}tr[type='body']{&:nth-of-type(even){background-color:", ";}&:nth-of-type(odd){background-color:", ";}}"], row.head.extraCompact.backgroundColor, row.head.extraCompact.fontSize, row.body.odd.backgroundColor, row.body.even.backgroundColor);
|
|
26
26
|
}, function (_ref3) {
|
|
27
|
-
var
|
|
27
|
+
var stickyHeader = _ref3.stickyHeader;
|
|
28
|
+
return stickyHeader && css(["tr[type='head']{th[type='head']{position:sticky;top:0;z-index:50;}}"]);
|
|
29
|
+
}, function (_ref4) {
|
|
30
|
+
var withDividers = _ref4.withDividers;
|
|
28
31
|
return withDividers && css(["tr[type='body']{border-bottom:", ";}"], row.body.withDividers.borderBottom);
|
|
29
32
|
});
|
|
30
33
|
var Table = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
@@ -41,6 +41,7 @@ export declare const Default: (args: TableProps) => JSX.Element;
|
|
|
41
41
|
export declare const WithDividers: (args: TableProps) => JSX.Element;
|
|
42
42
|
export declare const Focusable: (args: TableProps) => JSX.Element;
|
|
43
43
|
export declare const Compact: (args: TableProps) => JSX.Element;
|
|
44
|
+
export declare const ExtraCompact: (args: TableProps) => JSX.Element;
|
|
44
45
|
export declare const StickyHeader: (args: TableProps) => JSX.Element;
|
|
45
46
|
export declare const Hoverable: (args: TableProps) => JSX.Element;
|
|
46
47
|
export declare const WithButtonAndIcons: (args: TableProps) => JSX.Element;
|
|
@@ -24,6 +24,12 @@ export declare const tableTokens: {
|
|
|
24
24
|
borderBottom: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
head: {
|
|
28
|
+
extraCompact: {
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
27
33
|
};
|
|
28
34
|
cell: {
|
|
29
35
|
density: {
|
|
@@ -33,6 +39,9 @@ export declare const tableTokens: {
|
|
|
33
39
|
compact: {
|
|
34
40
|
padding: string;
|
|
35
41
|
};
|
|
42
|
+
extraCompact: {
|
|
43
|
+
padding: string;
|
|
44
|
+
};
|
|
36
45
|
};
|
|
37
46
|
head: {
|
|
38
47
|
backgroundColor: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var font = ddsBaseTokens.font,
|
|
4
|
+
colors = ddsBaseTokens.colors,
|
|
4
5
|
border = ddsBaseTokens.border,
|
|
5
6
|
spacing = ddsBaseTokens.spacing,
|
|
6
7
|
iconSizes = ddsBaseTokens.iconSizes,
|
|
@@ -29,6 +30,12 @@ var row = {
|
|
|
29
30
|
withDividers: {
|
|
30
31
|
borderBottom: "1px solid ".concat(colors.DdsColorNeutralsGray4)
|
|
31
32
|
}
|
|
33
|
+
},
|
|
34
|
+
head: {
|
|
35
|
+
extraCompact: {
|
|
36
|
+
backgroundColor: colors.DdsColorNeutralsWhite,
|
|
37
|
+
fontSize: font.DdsFontBodySans01FontSize
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
};
|
|
34
41
|
var cell = {
|
|
@@ -38,6 +45,9 @@ var cell = {
|
|
|
38
45
|
},
|
|
39
46
|
compact: {
|
|
40
47
|
padding: "".concat(spacing.SizesDdsSpacingLocalX075)
|
|
48
|
+
},
|
|
49
|
+
extraCompact: {
|
|
50
|
+
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX05)
|
|
41
51
|
}
|
|
42
52
|
},
|
|
43
53
|
head: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type TableDensity = 'normal' | 'compact';
|
|
2
|
+
export type TableDensity = 'normal' | 'compact' | 'extraCompact';
|
|
3
3
|
export type TableProps = {
|
|
4
4
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
5
5
|
density?: TableDensity;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function HourglassBottom(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "m18 22-.01-6L14 12l3.99-4.01L18 2H6v6l4 4-4 3.99V22h12zM8 7.5V4h8v3.5l-4 4-4-4z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { HourglassBottom };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function HourglassDisabled(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M8 4h8v3.5l-2.84 2.84 1.25 1.25L18 8.01 17.99 8H18V2H6v1.17l2 2zM2.1 2.1.69 3.51l8.9 8.9L6 16l.01.01H6V22h12v-1.17l2.49 2.49 1.41-1.41L2.1 2.1zM16 20H8v-3.5l2.84-2.84L16 18.83V20z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { HourglassDisabled };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function HourglassEmpty(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5-4-4V4h8v3.5l-4 4z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { HourglassEmpty };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function HourglassFull(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { HourglassFull };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function HourglassTop(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "m6 2 .01 6L10 12l-3.99 4.01L6 22h12v-6l-4-4 4-3.99V2H6zm10 14.5V20H8v-3.5l4-4 4 4z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { HourglassTop };
|
|
@@ -65,6 +65,11 @@ export * from './gavel';
|
|
|
65
65
|
export * from './help';
|
|
66
66
|
export * from './helpFilled';
|
|
67
67
|
export * from './home';
|
|
68
|
+
export * from './hourglassBottom';
|
|
69
|
+
export * from './hourglassDisabled';
|
|
70
|
+
export * from './hourglassEmpty';
|
|
71
|
+
export * from './hourglassFull';
|
|
72
|
+
export * from './hourglassTop';
|
|
68
73
|
export * from './image';
|
|
69
74
|
export * from './info';
|
|
70
75
|
export * from './instagram';
|
|
@@ -113,7 +118,12 @@ export * from './settings';
|
|
|
113
118
|
export * from './sms';
|
|
114
119
|
export * from './star';
|
|
115
120
|
export * from './starFilled';
|
|
121
|
+
export * from './starHalfFilled';
|
|
116
122
|
export * from './sync';
|
|
123
|
+
export * from './thumbdown';
|
|
124
|
+
export * from './thumbdownFilled';
|
|
125
|
+
export * from './thumbup';
|
|
126
|
+
export * from './thumbupFilled';
|
|
117
127
|
export * from './time';
|
|
118
128
|
export * from './tingrett';
|
|
119
129
|
export * from './tip';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function StarHalfFilled(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { StarHalfFilled };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function Thumbdown(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "m10.89 18.28.57-2.89c.12-.59-.04-1.2-.42-1.66-.38-.46-.94-.73-1.54-.73H4v-1.08L6.57 6h8.09c.18 0 .34.16.34.34v7.84l-4.11 4.1M10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22zm10-7h2V4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Thumbdown };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function ThumbdownFilled(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { ThumbdownFilled };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function Thumbup(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "m13.11 5.72-.57 2.89c-.12.59.04 1.2.42 1.66.38.46.94.73 1.54.73H20v1.08L17.43 18H9.34c-.18 0-.34-.16-.34-.34V9.82l4.11-4.1M14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.83C7 18.95 8.05 20 9.34 20h8.1c.71 0 1.36-.37 1.72-.97l2.67-6.15c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2zM4 9H2v11h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Thumbup };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { SvgWrapper } from '../utils/SvgWrapper.js';
|
|
3
|
+
|
|
4
|
+
function ThumbupFilled(props) {
|
|
5
|
+
return jsx(SvgWrapper, Object.assign({}, props, {
|
|
6
|
+
children: jsx("path", {
|
|
7
|
+
d: "M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"
|
|
8
|
+
})
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { ThumbupFilled };
|
package/dist/index.js
CHANGED
|
@@ -128,6 +128,11 @@ export { GavelIcon } from './icons/tsx/gavel.js';
|
|
|
128
128
|
export { HelpIcon } from './icons/tsx/help.js';
|
|
129
129
|
export { HelpFilledIcon } from './icons/tsx/helpFilled.js';
|
|
130
130
|
export { HomeIcon } from './icons/tsx/home.js';
|
|
131
|
+
export { HourglassBottom } from './icons/tsx/hourglassBottom.js';
|
|
132
|
+
export { HourglassDisabled } from './icons/tsx/hourglassDisabled.js';
|
|
133
|
+
export { HourglassEmpty } from './icons/tsx/hourglassEmpty.js';
|
|
134
|
+
export { HourglassFull } from './icons/tsx/hourglassFull.js';
|
|
135
|
+
export { HourglassTop } from './icons/tsx/hourglassTop.js';
|
|
131
136
|
export { ImageIcon } from './icons/tsx/image.js';
|
|
132
137
|
export { InfoIcon } from './icons/tsx/info.js';
|
|
133
138
|
export { InstagramIcon } from './icons/tsx/instagram.js';
|
|
@@ -176,7 +181,12 @@ export { SettingsIcon } from './icons/tsx/settings.js';
|
|
|
176
181
|
export { SmsIcon } from './icons/tsx/sms.js';
|
|
177
182
|
export { StarIcon } from './icons/tsx/star.js';
|
|
178
183
|
export { StarFilledIcon } from './icons/tsx/starFilled.js';
|
|
184
|
+
export { StarHalfFilled } from './icons/tsx/starHalfFilled.js';
|
|
179
185
|
export { SyncIcon } from './icons/tsx/sync.js';
|
|
186
|
+
export { Thumbdown } from './icons/tsx/thumbdown.js';
|
|
187
|
+
export { ThumbdownFilled } from './icons/tsx/thumbdownFilled.js';
|
|
188
|
+
export { Thumbup } from './icons/tsx/thumbup.js';
|
|
189
|
+
export { ThumbupFilled } from './icons/tsx/thumbupFilled.js';
|
|
180
190
|
export { TimeIcon } from './icons/tsx/time.js';
|
|
181
191
|
export { TingrettIcon } from './icons/tsx/tingrett.js';
|
|
182
192
|
export { TipIcon } from './icons/tsx/tip.js';
|