@oslokommune/punkt-elements 19.13.0 → 19.14.2
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.
|
@@ -52,6 +52,8 @@ export { COMBOBOX_TAG_SKINS, COMBOBOX_DISPLAY_VALUES, COMBOBOX_TAG_PLACEMENTS, C
|
|
|
52
52
|
export type { IPktComboboxOption, TPktComboboxTagSkin, TPktComboboxDisplayValue, TPktComboboxTagPlacement, IPktComboboxBase, IComboboxSpecProps, } from './combobox';
|
|
53
53
|
export { SELECT_DEFAULTS } from './select';
|
|
54
54
|
export type { IPktSelectOption, TSelectOption, IPktSelectBase, ISelectSpecProps } from './select';
|
|
55
|
+
export { TABLE_SKINS, TABLE_DEFAULTS } from './table';
|
|
56
|
+
export type { TPktTableSkin, IPktTableBase, ITableSpecProps, IPktTableDataCellBase, ITableDataCellSpecProps, ITableSectionSpecProps, } from './table';
|
|
55
57
|
export type { TPktSearchInputAppearance, TPktSearchInputMethod, IPktSearchInputSuggestion, IPktSearchInput, } from './searchinput';
|
|
56
58
|
export { UPLOAD_STRATEGIES, FILE_UPLOAD_ITEM_RENDERERS, PREVIEW_UPLOAD_STATUS } from './fileupload';
|
|
57
59
|
export type { TUploadStrategy as TFileUploadStrategy, TFileUploadItemRenderer, TPreviewUploadStatus, TFilesChangedReason, TFileValidator, TTransferProgress, IFileItem, IFileTransfer, IFileValidateDetail, ITransferCancelledDetail, IFilesChangedDetail, IFileUploadSpecProps, IPktFileUploadBase, } from './fileupload';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* table.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for pkt-table and its sub-components.
|
|
5
|
+
* Used by React and typed component specs. There is no Elements version —
|
|
6
|
+
* outside React the table is used as plain HTML with the `pkt-table` CSS classes.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Visual skins for pkt-table — shared runtime source for types, specs, and Preview.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TABLE_SKINS: readonly ['basic', 'zebra-blue'];
|
|
12
|
+
export type TPktTableSkin = (typeof TABLE_SKINS)[number];
|
|
13
|
+
/**
|
|
14
|
+
* Table props shared by React and typed component specs.
|
|
15
|
+
*/
|
|
16
|
+
export interface IPktTableBase {
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
skin?: TPktTableSkin;
|
|
19
|
+
responsiveView?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Documented Table props (subset of `IPktTableBase`).
|
|
23
|
+
* Used for typed component specs in documentation.
|
|
24
|
+
*/
|
|
25
|
+
export type ITableSpecProps = Pick<IPktTableBase, 'compact' | 'skin' | 'responsiveView'>;
|
|
26
|
+
/**
|
|
27
|
+
* Default values for pkt-table. Single source of truth.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TABLE_DEFAULTS: {
|
|
30
|
+
readonly compact: false;
|
|
31
|
+
readonly skin: 'basic';
|
|
32
|
+
readonly responsiveView: true;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Table data cell props shared by React and typed component specs.
|
|
36
|
+
*
|
|
37
|
+
* @remarks `dataLabel` is rendered as `data-label` and shown next to the cell content
|
|
38
|
+
* when the table is responsive. Without it, the cell has no label on small screens.
|
|
39
|
+
*/
|
|
40
|
+
export interface IPktTableDataCellBase {
|
|
41
|
+
dataLabel?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Documented TableDataCell props (subset of `IPktTableDataCellBase`).
|
|
45
|
+
* Used for typed component specs in documentation.
|
|
46
|
+
*/
|
|
47
|
+
export type ITableDataCellSpecProps = Pick<IPktTableDataCellBase, 'dataLabel'>;
|
|
48
|
+
/**
|
|
49
|
+
* Header, body, row and header cell have no props of their own beyond native HTML attributes.
|
|
50
|
+
*/
|
|
51
|
+
export type ITableSectionSpecProps = Record<never, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.14.2",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, designsystem for Oslo kommune",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo kommune",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@babel/plugin-transform-private-property-in-object": "^7.27.1",
|
|
43
43
|
"@babel/preset-env": "^7.28.3",
|
|
44
44
|
"@babel/preset-typescript": "^7.28.3",
|
|
45
|
-
"@oslokommune/punkt-assets": "^19.
|
|
45
|
+
"@oslokommune/punkt-assets": "^19.14.2",
|
|
46
46
|
"@testing-library/dom": "^10.4.1",
|
|
47
47
|
"@testing-library/jest-dom": "^6.9.1",
|
|
48
48
|
"@types/jest-axe": "^3.5.9",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": "^22.19.0 || ^24.0.0 || ^26.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "6d0937b0b2b5c9257079680b17248ad702419c53"
|
|
88
88
|
}
|