@ks-digital/designsystem-react 0.0.1-alpha.0 → 0.0.1-alpha.1
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/package.json +17 -6
- package/eslint.config.mjs +0 -12
- package/project.json +0 -8
- package/src/components/Alert/Alert.tsx +0 -2
- package/src/components/Avatar/Avatar.tsx +0 -2
- package/src/components/Badge/Badge.tsx +0 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -5
- package/src/components/Button/Button.tsx +0 -2
- package/src/components/Card/Card.tsx +0 -2
- package/src/components/Checkbox/Checkbox.tsx +0 -2
- package/src/components/Chip/Chip.tsx +0 -23
- package/src/components/Details/Details.tsx +0 -2
- package/src/components/Dialog/Dialog.tsx +0 -2
- package/src/components/Divider/Divider.tsx +0 -2
- package/src/components/Dropdown/Dropdown.tsx +0 -2
- package/src/components/ErrorSummary/ErrorSummary.tsx +0 -5
- package/src/components/Field/Field.tsx +0 -2
- package/src/components/Fieldset/Fieldset.tsx +0 -2
- package/src/components/Heading/Heading.tsx +0 -2
- package/src/components/Input/Input.tsx +0 -2
- package/src/components/Label/Label.tsx +0 -2
- package/src/components/Link/Link.tsx +0 -2
- package/src/components/List/List.tsx +0 -19
- package/src/components/Loaders/index.tsx +0 -2
- package/src/components/Loaders/skeleton/Skeleton.tsx +0 -2
- package/src/components/Loaders/spinner/Spinner.tsx +0 -2
- package/src/components/MultiSuggestion/MultiSuggestion.tsx +0 -33
- package/src/components/Pagination/Pagination.tsx +0 -2
- package/src/components/Paragraph/Paragraph.tsx +0 -2
- package/src/components/Popover/Popover.tsx +0 -2
- package/src/components/Radio/Radio.tsx +0 -2
- package/src/components/Search/Search.tsx +0 -2
- package/src/components/Select/Select.tsx +0 -2
- package/src/components/SkipLink/SkipLink.tsx +0 -2
- package/src/components/Suggestion/Suggestion.tsx +0 -29
- package/src/components/Switch/Switch.tsx +0 -2
- package/src/components/Table/Table.tsx +0 -2
- package/src/components/Tabs/Tabs.tsx +0 -2
- package/src/components/Tag/Tag.tsx +0 -2
- package/src/components/Textarea/Textarea.tsx +0 -2
- package/src/components/Textfield/Textfield.tsx +0 -2
- package/src/components/ToggleGroup/ToggleGroup.tsx +0 -5
- package/src/components/Tooltip/Tooltip.tsx +0 -2
- package/src/components/ValidationMessage/ValidationMessage.tsx +0 -5
- package/src/index.ts +0 -42
- package/src/react-types.d.ts +0 -15
- package/tsconfig.json +0 -25
- package/tsconfig.lib.json +0 -23
- package/tsconfig.spec.json +0 -28
- package/vite.config.ts +0 -53
package/package.json
CHANGED
|
@@ -5,21 +5,32 @@
|
|
|
5
5
|
"url": "https://github.com/ks-no/designsystem.git",
|
|
6
6
|
"directory": "packages/react"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.0.1-alpha.
|
|
8
|
+
"version": "0.0.1-alpha.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"private": false,
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"type": "module",
|
|
15
|
-
"main": "./index.js",
|
|
16
|
-
"types": "./index.d.ts",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"require": "./dist/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"./dist"
|
|
26
|
+
],
|
|
17
27
|
"dependencies": {
|
|
18
28
|
"@digdir/designsystemet-css": "1.0.5",
|
|
19
|
-
"@digdir/designsystemet-react": "1.0.5"
|
|
29
|
+
"@digdir/designsystemet-react": "1.0.5",
|
|
30
|
+
"@navikt/aksel-icons": "^7.21.1"
|
|
20
31
|
},
|
|
21
32
|
"peerDependencies": {
|
|
22
|
-
"react": "
|
|
23
|
-
"react-dom": "
|
|
33
|
+
"react": ">=18.3.1",
|
|
34
|
+
"react-dom": ">=18.3.1"
|
|
24
35
|
}
|
|
25
36
|
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import nx from '@nx/eslint-plugin'
|
|
2
|
-
import baseConfig from '../../eslint.config.mjs'
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
...nx.configs['flat/react'],
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
9
|
-
// Override or add rules here
|
|
10
|
-
rules: {},
|
|
11
|
-
},
|
|
12
|
-
]
|
package/project.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Chip,
|
|
3
|
-
ChipButton,
|
|
4
|
-
type ChipButtonProps,
|
|
5
|
-
ChipCheckbox,
|
|
6
|
-
type ChipCheckboxProps,
|
|
7
|
-
ChipRadio,
|
|
8
|
-
type ChipRadioProps,
|
|
9
|
-
ChipRemovable,
|
|
10
|
-
type ChipRemovableProps,
|
|
11
|
-
} from '@digdir/designsystemet-react'
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
Chip,
|
|
15
|
-
ChipButton,
|
|
16
|
-
ChipButtonProps,
|
|
17
|
-
ChipCheckbox,
|
|
18
|
-
ChipCheckboxProps,
|
|
19
|
-
ChipRadio,
|
|
20
|
-
ChipRadioProps,
|
|
21
|
-
ChipRemovable,
|
|
22
|
-
ChipRemovableProps,
|
|
23
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
List,
|
|
3
|
-
ListOrdered,
|
|
4
|
-
type ListOrderedProps,
|
|
5
|
-
ListUnordered,
|
|
6
|
-
type ListUnorderedProps,
|
|
7
|
-
ListItem,
|
|
8
|
-
type ListItemProps,
|
|
9
|
-
} from '@digdir/designsystemet-react'
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
List,
|
|
13
|
-
ListOrdered,
|
|
14
|
-
ListOrderedProps,
|
|
15
|
-
ListUnordered,
|
|
16
|
-
ListUnorderedProps,
|
|
17
|
-
ListItem,
|
|
18
|
-
ListItemProps,
|
|
19
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EXPERIMENTAL_MultiSuggestion,
|
|
3
|
-
EXPERIMENTAL_MultiSuggestionInput,
|
|
4
|
-
EXPERIMENTAL_MultiSuggestionList,
|
|
5
|
-
EXPERIMENTAL_MultiSuggestionOption,
|
|
6
|
-
EXPERIMENTAL_MultiSuggestionChips,
|
|
7
|
-
EXPERIMENTAL_MultiSuggestionEmpty,
|
|
8
|
-
EXPERIMENTAL_MultiSuggestionClear,
|
|
9
|
-
type MultiSuggestionProps,
|
|
10
|
-
type MultiSuggestionInputProps,
|
|
11
|
-
type MultiSuggestionListProps,
|
|
12
|
-
type MultiSuggestionOptionProps,
|
|
13
|
-
type MultiSuggestionChipsProps,
|
|
14
|
-
type MultiSuggestionEmptyProps,
|
|
15
|
-
type MultiSuggestionClearProps,
|
|
16
|
-
} from '@digdir/designsystemet-react'
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
EXPERIMENTAL_MultiSuggestion,
|
|
20
|
-
EXPERIMENTAL_MultiSuggestionInput,
|
|
21
|
-
EXPERIMENTAL_MultiSuggestionList,
|
|
22
|
-
EXPERIMENTAL_MultiSuggestionOption,
|
|
23
|
-
EXPERIMENTAL_MultiSuggestionChips,
|
|
24
|
-
EXPERIMENTAL_MultiSuggestionEmpty,
|
|
25
|
-
EXPERIMENTAL_MultiSuggestionClear,
|
|
26
|
-
MultiSuggestionProps,
|
|
27
|
-
MultiSuggestionInputProps,
|
|
28
|
-
MultiSuggestionListProps,
|
|
29
|
-
MultiSuggestionOptionProps,
|
|
30
|
-
MultiSuggestionChipsProps,
|
|
31
|
-
MultiSuggestionEmptyProps,
|
|
32
|
-
MultiSuggestionClearProps,
|
|
33
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EXPERIMENTAL_Suggestion,
|
|
3
|
-
EXPERIMENTAL_SuggestionList,
|
|
4
|
-
EXPERIMENTAL_SuggestionInput,
|
|
5
|
-
EXPERIMENTAL_SuggestionEmpty,
|
|
6
|
-
EXPERIMENTAL_SuggestionOption,
|
|
7
|
-
EXPERIMENTAL_SuggestionClear,
|
|
8
|
-
type SuggestionProps,
|
|
9
|
-
type SuggestionListProps,
|
|
10
|
-
type SuggestionInputProps,
|
|
11
|
-
type SuggestionEmptyProps,
|
|
12
|
-
type SuggestionOptionProps,
|
|
13
|
-
type SuggestionClearProps,
|
|
14
|
-
} from '@digdir/designsystemet-react'
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
EXPERIMENTAL_Suggestion,
|
|
18
|
-
EXPERIMENTAL_SuggestionList,
|
|
19
|
-
EXPERIMENTAL_SuggestionInput,
|
|
20
|
-
EXPERIMENTAL_SuggestionEmpty,
|
|
21
|
-
EXPERIMENTAL_SuggestionOption,
|
|
22
|
-
EXPERIMENTAL_SuggestionClear,
|
|
23
|
-
SuggestionProps,
|
|
24
|
-
SuggestionListProps,
|
|
25
|
-
SuggestionInputProps,
|
|
26
|
-
SuggestionEmptyProps,
|
|
27
|
-
SuggestionOptionProps,
|
|
28
|
-
SuggestionClearProps,
|
|
29
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import '@digdir/designsystemet-css'
|
|
2
|
-
|
|
3
|
-
export * from './react-types.d'
|
|
4
|
-
export * from './components/Alert/Alert'
|
|
5
|
-
export * from './components/Avatar/Avatar'
|
|
6
|
-
export * from './components/Badge/Badge'
|
|
7
|
-
export * from './components/Breadcrumbs/Breadcrumbs'
|
|
8
|
-
export * from './components/Button/Button'
|
|
9
|
-
export * from './components/Card/Card'
|
|
10
|
-
export * from './components/Checkbox/Checkbox'
|
|
11
|
-
export * from './components/Chip/Chip'
|
|
12
|
-
export * from './components/Details/Details'
|
|
13
|
-
export * from './components/Dialog/Dialog'
|
|
14
|
-
export * from './components/Divider/Divider'
|
|
15
|
-
export * from './components/Dropdown/Dropdown'
|
|
16
|
-
export * from './components/ErrorSummary/ErrorSummary'
|
|
17
|
-
export * from './components/Field/Field'
|
|
18
|
-
export * from './components/Fieldset/Fieldset'
|
|
19
|
-
export * from './components/Input/Input'
|
|
20
|
-
export * from './components/Link/Link'
|
|
21
|
-
export * from './components/List/List'
|
|
22
|
-
export * from './components/Loaders'
|
|
23
|
-
export * from './components/MultiSuggestion/MultiSuggestion'
|
|
24
|
-
export * from './components/Pagination/Pagination'
|
|
25
|
-
export * from './components/Popover/Popover'
|
|
26
|
-
export * from './components/Radio/Radio'
|
|
27
|
-
export * from './components/Search/Search'
|
|
28
|
-
export * from './components/Select/Select'
|
|
29
|
-
export * from './components/SkipLink/SkipLink'
|
|
30
|
-
export * from './components/Suggestion/Suggestion'
|
|
31
|
-
export * from './components/Switch/Switch'
|
|
32
|
-
export * from './components/Table/Table'
|
|
33
|
-
export * from './components/Tabs/Tabs'
|
|
34
|
-
export * from './components/Tag/Tag'
|
|
35
|
-
export * from './components/Textarea/Textarea'
|
|
36
|
-
export * from './components/Textfield/Textfield'
|
|
37
|
-
export * from './components/ToggleGroup/ToggleGroup'
|
|
38
|
-
export * from './components/Tooltip/Tooltip'
|
|
39
|
-
export * from './components/Paragraph/Paragraph'
|
|
40
|
-
export * from './components/ValidationMessage/ValidationMessage'
|
|
41
|
-
export * from './components/Label/Label'
|
|
42
|
-
export * from './components/Heading/Heading'
|
package/src/react-types.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Size } from '@digdir/designsystemet-react'
|
|
2
|
-
import type { Color } from '@digdir/designsystemet-react/colors'
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
* Typing of data-size and data-color attributes in React components.
|
|
6
|
-
*/
|
|
7
|
-
declare global {
|
|
8
|
-
namespace React {
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
-
interface HTMLAttributes<T> {
|
|
11
|
-
'data-size'?: Size | (string & {})
|
|
12
|
-
'data-color'?: Color | (string & {})
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"forceConsistentCasingInFileNames": true,
|
|
5
|
-
"strict": true,
|
|
6
|
-
"importHelpers": true,
|
|
7
|
-
"noImplicitOverride": true,
|
|
8
|
-
"noImplicitReturns": true,
|
|
9
|
-
"noFallthroughCasesInSwitch": true,
|
|
10
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true
|
|
14
|
-
},
|
|
15
|
-
"files": [],
|
|
16
|
-
"include": [],
|
|
17
|
-
"references": [
|
|
18
|
-
{
|
|
19
|
-
"path": "./tsconfig.lib.json"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"path": "./tsconfig.spec.json"
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"types": ["node", "vite/client"]
|
|
7
|
-
},
|
|
8
|
-
"include": ["src/**/*.ts"],
|
|
9
|
-
"exclude": [
|
|
10
|
-
"vite.config.ts",
|
|
11
|
-
"vite.config.mts",
|
|
12
|
-
"vitest.config.ts",
|
|
13
|
-
"vitest.config.mts",
|
|
14
|
-
"src/**/*.test.ts",
|
|
15
|
-
"src/**/*.spec.ts",
|
|
16
|
-
"src/**/*.test.tsx",
|
|
17
|
-
"src/**/*.spec.tsx",
|
|
18
|
-
"src/**/*.test.js",
|
|
19
|
-
"src/**/*.spec.js",
|
|
20
|
-
"src/**/*.test.jsx",
|
|
21
|
-
"src/**/*.spec.jsx"
|
|
22
|
-
]
|
|
23
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"types": [
|
|
6
|
-
"vitest/globals",
|
|
7
|
-
"vitest/importMeta",
|
|
8
|
-
"vite/client",
|
|
9
|
-
"node",
|
|
10
|
-
"vitest"
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
"include": [
|
|
14
|
-
"vite.config.ts",
|
|
15
|
-
"vite.config.mts",
|
|
16
|
-
"vitest.config.ts",
|
|
17
|
-
"vitest.config.mts",
|
|
18
|
-
"src/**/*.test.ts",
|
|
19
|
-
"src/**/*.spec.ts",
|
|
20
|
-
"src/**/*.test.tsx",
|
|
21
|
-
"src/**/*.spec.tsx",
|
|
22
|
-
"src/**/*.test.js",
|
|
23
|
-
"src/**/*.spec.js",
|
|
24
|
-
"src/**/*.test.jsx",
|
|
25
|
-
"src/**/*.spec.jsx",
|
|
26
|
-
"src/**/*.d.ts"
|
|
27
|
-
]
|
|
28
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/// <reference types='vitest' />
|
|
2
|
-
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin'
|
|
3
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin'
|
|
4
|
-
import react from '@vitejs/plugin-react'
|
|
5
|
-
import * as path from 'path'
|
|
6
|
-
import { defineConfig } from 'vite'
|
|
7
|
-
import dts from 'vite-plugin-dts'
|
|
8
|
-
|
|
9
|
-
export default defineConfig(() => ({
|
|
10
|
-
root: __dirname,
|
|
11
|
-
cacheDir: '../../node_modules/.vite/packages/react',
|
|
12
|
-
plugins: [
|
|
13
|
-
react(),
|
|
14
|
-
nxViteTsPaths(),
|
|
15
|
-
nxCopyAssetsPlugin(['*.md']),
|
|
16
|
-
dts({
|
|
17
|
-
entryRoot: 'src',
|
|
18
|
-
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
19
|
-
}),
|
|
20
|
-
],
|
|
21
|
-
// Configuration for building your library.
|
|
22
|
-
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
23
|
-
build: {
|
|
24
|
-
outDir: '../../dist/packages/react',
|
|
25
|
-
emptyOutDir: true,
|
|
26
|
-
reportCompressedSize: true,
|
|
27
|
-
commonjsOptions: {
|
|
28
|
-
transformMixedEsModules: true,
|
|
29
|
-
},
|
|
30
|
-
lib: {
|
|
31
|
-
// Could also be a dictionary or array of multiple entry points.
|
|
32
|
-
entry: 'src/index.ts',
|
|
33
|
-
name: '@ks-digital/designsystem-react',
|
|
34
|
-
fileName: 'index',
|
|
35
|
-
formats: ['es' as const],
|
|
36
|
-
},
|
|
37
|
-
rollupOptions: {
|
|
38
|
-
// External packages that should not be bundled into your library.
|
|
39
|
-
external: ['react', 'react-dom'],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
test: {
|
|
43
|
-
watch: false,
|
|
44
|
-
globals: true,
|
|
45
|
-
environment: 'node',
|
|
46
|
-
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
47
|
-
reporters: ['default'],
|
|
48
|
-
coverage: {
|
|
49
|
-
reportsDirectory: '../../coverage/packages/react',
|
|
50
|
-
provider: 'v8' as const,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}))
|