@ks-digital/designsystem-react 0.0.1-alpha.0 → 0.0.1-alpha.10

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.
Files changed (97) hide show
  1. package/README.md +2 -5
  2. package/dist/README.md +46 -0
  3. package/dist/components/Alert/Alert.d.ts +2 -0
  4. package/dist/components/Avatar/Avatar.d.ts +2 -0
  5. package/dist/components/Badge/Badge.d.ts +2 -0
  6. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
  7. package/dist/components/Button/Button.d.ts +2 -0
  8. package/dist/components/Card/Card.d.ts +2 -0
  9. package/dist/components/Checkbox/Checkbox.d.ts +2 -0
  10. package/dist/components/Chip/Chip.d.ts +2 -0
  11. package/dist/components/Details/Details.d.ts +2 -0
  12. package/dist/components/Dialog/Dialog.d.ts +2 -0
  13. package/dist/components/Divider/Divider.d.ts +2 -0
  14. package/dist/components/Dropdown/Dropdown.d.ts +2 -0
  15. package/dist/components/ErrorSummary/ErrorSummary.d.ts +2 -0
  16. package/dist/components/Field/Field.d.ts +2 -0
  17. package/dist/components/Fieldset/Fieldset.d.ts +2 -0
  18. package/dist/components/Heading/Heading.d.ts +2 -0
  19. package/dist/components/Input/Input.d.ts +2 -0
  20. package/dist/components/Label/Label.d.ts +2 -0
  21. package/dist/components/Link/Link.d.ts +2 -0
  22. package/dist/components/List/List.d.ts +2 -0
  23. package/dist/components/Loaders/index.d.ts +2 -0
  24. package/dist/components/Loaders/skeleton/Skeleton.d.ts +2 -0
  25. package/dist/components/Loaders/spinner/Spinner.d.ts +2 -0
  26. package/dist/components/MultiSuggestion/MultiSuggestion.d.ts +2 -0
  27. package/dist/components/Pagination/Pagination.d.ts +2 -0
  28. package/dist/components/Paragraph/Paragraph.d.ts +2 -0
  29. package/dist/components/Popover/Popover.d.ts +2 -0
  30. package/dist/components/Radio/Radio.d.ts +2 -0
  31. package/dist/components/Search/Search.d.ts +2 -0
  32. package/dist/components/Select/Select.d.ts +2 -0
  33. package/dist/components/SkipLink/SkipLink.d.ts +2 -0
  34. package/dist/components/Suggestion/Suggestion.d.ts +2 -0
  35. package/dist/components/Switch/Switch.d.ts +2 -0
  36. package/dist/components/Table/Table.d.ts +2 -0
  37. package/dist/components/Tabs/Tabs.d.ts +2 -0
  38. package/dist/components/Tag/Tag.d.ts +2 -0
  39. package/dist/components/Textarea/Textarea.d.ts +2 -0
  40. package/dist/components/Textfield/Textfield.d.ts +2 -0
  41. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  42. package/dist/components/Tooltip/Tooltip.d.ts +2 -0
  43. package/dist/components/ValidationMessage/ValidationMessage.d.ts +2 -0
  44. package/dist/index.cjs +1 -0
  45. package/dist/index.d.ts +39 -0
  46. package/dist/index.js +63 -0
  47. package/dist/package.json +42 -0
  48. package/package.json +24 -7
  49. package/eslint.config.mjs +0 -12
  50. package/project.json +0 -8
  51. package/src/components/Alert/Alert.tsx +0 -2
  52. package/src/components/Avatar/Avatar.tsx +0 -2
  53. package/src/components/Badge/Badge.tsx +0 -2
  54. package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -5
  55. package/src/components/Button/Button.tsx +0 -2
  56. package/src/components/Card/Card.tsx +0 -2
  57. package/src/components/Checkbox/Checkbox.tsx +0 -2
  58. package/src/components/Chip/Chip.tsx +0 -23
  59. package/src/components/Details/Details.tsx +0 -2
  60. package/src/components/Dialog/Dialog.tsx +0 -2
  61. package/src/components/Divider/Divider.tsx +0 -2
  62. package/src/components/Dropdown/Dropdown.tsx +0 -2
  63. package/src/components/ErrorSummary/ErrorSummary.tsx +0 -5
  64. package/src/components/Field/Field.tsx +0 -2
  65. package/src/components/Fieldset/Fieldset.tsx +0 -2
  66. package/src/components/Heading/Heading.tsx +0 -2
  67. package/src/components/Input/Input.tsx +0 -2
  68. package/src/components/Label/Label.tsx +0 -2
  69. package/src/components/Link/Link.tsx +0 -2
  70. package/src/components/List/List.tsx +0 -19
  71. package/src/components/Loaders/index.tsx +0 -2
  72. package/src/components/Loaders/skeleton/Skeleton.tsx +0 -2
  73. package/src/components/Loaders/spinner/Spinner.tsx +0 -2
  74. package/src/components/MultiSuggestion/MultiSuggestion.tsx +0 -33
  75. package/src/components/Pagination/Pagination.tsx +0 -2
  76. package/src/components/Paragraph/Paragraph.tsx +0 -2
  77. package/src/components/Popover/Popover.tsx +0 -2
  78. package/src/components/Radio/Radio.tsx +0 -2
  79. package/src/components/Search/Search.tsx +0 -2
  80. package/src/components/Select/Select.tsx +0 -2
  81. package/src/components/SkipLink/SkipLink.tsx +0 -2
  82. package/src/components/Suggestion/Suggestion.tsx +0 -29
  83. package/src/components/Switch/Switch.tsx +0 -2
  84. package/src/components/Table/Table.tsx +0 -2
  85. package/src/components/Tabs/Tabs.tsx +0 -2
  86. package/src/components/Tag/Tag.tsx +0 -2
  87. package/src/components/Textarea/Textarea.tsx +0 -2
  88. package/src/components/Textfield/Textfield.tsx +0 -2
  89. package/src/components/ToggleGroup/ToggleGroup.tsx +0 -5
  90. package/src/components/Tooltip/Tooltip.tsx +0 -2
  91. package/src/components/ValidationMessage/ValidationMessage.tsx +0 -5
  92. package/src/index.ts +0 -42
  93. package/src/react-types.d.ts +0 -15
  94. package/tsconfig.json +0 -25
  95. package/tsconfig.lib.json +0 -23
  96. package/tsconfig.spec.json +0 -28
  97. package/vite.config.ts +0 -53
package/README.md CHANGED
@@ -17,10 +17,7 @@ pnpm add @ks-digital/designsystem-react @ks-digital/designsystem-themes
17
17
  Add the Inter font to your `index.html`. This API supports the same parameters as the Google Fonts API, allowing you to customize the font weights as needed:
18
18
 
19
19
  ```html
20
- <link
21
- href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap"
22
- rel="stylesheet"
23
- />
20
+ <link href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap" rel="stylesheet" />
24
21
  ```
25
22
 
26
23
  ### 2. Import Base Styles and Themes
@@ -46,4 +43,4 @@ function MyComponent() {
46
43
 
47
44
  ## Example
48
45
 
49
- A complete example setup is available in the `react-demo-app` located under the `apps` folder.
46
+ A complete example setup is available in the `react-demo` located under the `apps` folder.
package/dist/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # KS Digital Designsystem for React
2
+
3
+ This library provides React components for KS Digital, designed to align closely with the components from [Designsystemet.no](https://www.designsystemet.no/komponenter).
4
+
5
+ ## Installation (WIP)
6
+
7
+ Install the required packages using your preferred package manager:
8
+
9
+ ```bash
10
+ pnpm add @ks-digital/designsystem-react @ks-digital/designsystem-themes
11
+ ```
12
+
13
+ ## Setup
14
+
15
+ ### 1. Include the Inter Font
16
+
17
+ Add the Inter font to your `index.html`. This API supports the same parameters as the Google Fonts API, allowing you to customize the font weights as needed:
18
+
19
+ ```html
20
+ <link href="https://static.fiks.ks.no/googlefonts/googleapis/css2?family=Inter&display=swap" rel="stylesheet" />
21
+ ```
22
+
23
+ ### 2. Import Base Styles and Themes
24
+
25
+ Import the base styles and the theme you want to use in your application:
26
+
27
+ ```javascript
28
+ import '@ks-digital/designsystem-themes/base.css'
29
+ import '@ks-digital/designsystem-themes/ledsagerbevis.css'
30
+ ```
31
+
32
+ ### 3. Use Components
33
+
34
+ Import and use the components you need. You can explore the available components at [Designsystemet.no](https://www.designsystemet.no/komponenter):
35
+
36
+ ```javascript
37
+ import { Button } from '@ks-digital/designsystem-react'
38
+
39
+ function MyComponent() {
40
+ return <Button data-size="lg">My Button</Button>
41
+ }
42
+ ```
43
+
44
+ ## Example
45
+
46
+ A complete example setup is available in the `react-demo` located under the `apps` folder.
@@ -0,0 +1,2 @@
1
+ import { Alert, AlertProps } from '@digdir/designsystemet-react';
2
+ export { Alert, AlertProps };
@@ -0,0 +1,2 @@
1
+ import { Avatar, AvatarProps } from '@digdir/designsystemet-react';
2
+ export { Avatar, AvatarProps };
@@ -0,0 +1,2 @@
1
+ import { Badge, BadgeProps } from '@digdir/designsystemet-react';
2
+ export { Badge, BadgeProps };
@@ -0,0 +1,2 @@
1
+ import { Breadcrumbs, BreadcrumbsProps } from '@digdir/designsystemet-react';
2
+ export { Breadcrumbs, BreadcrumbsProps };
@@ -0,0 +1,2 @@
1
+ import { Button, ButtonProps } from '@digdir/designsystemet-react';
2
+ export { Button, ButtonProps };
@@ -0,0 +1,2 @@
1
+ import { Card, CardProps } from '@digdir/designsystemet-react';
2
+ export { Card, CardProps };
@@ -0,0 +1,2 @@
1
+ import { Checkbox, CheckboxProps } from '@digdir/designsystemet-react';
2
+ export { Checkbox, CheckboxProps };
@@ -0,0 +1,2 @@
1
+ import { Chip, ChipButton, ChipButtonProps, ChipCheckbox, ChipCheckboxProps, ChipRadio, ChipRadioProps, ChipRemovable, ChipRemovableProps } from '@digdir/designsystemet-react';
2
+ export { Chip, ChipButton, ChipButtonProps, ChipCheckbox, ChipCheckboxProps, ChipRadio, ChipRadioProps, ChipRemovable, ChipRemovableProps, };
@@ -0,0 +1,2 @@
1
+ import { Details, DetailsProps, DetailsContent, DetailsContentProps, DetailsSummary, DetailsSummaryProps } from '@digdir/designsystemet-react';
2
+ export { Details, DetailsProps, DetailsContent, DetailsContentProps, DetailsSummary, DetailsSummaryProps, };
@@ -0,0 +1,2 @@
1
+ import { Dialog, DialogProps } from '@digdir/designsystemet-react';
2
+ export { Dialog, DialogProps };
@@ -0,0 +1,2 @@
1
+ import { Divider, DividerProps } from '@digdir/designsystemet-react';
2
+ export { Divider, DividerProps };
@@ -0,0 +1,2 @@
1
+ import { Dropdown, DropdownProps } from '@digdir/designsystemet-react';
2
+ export { Dropdown, DropdownProps };
@@ -0,0 +1,2 @@
1
+ import { ErrorSummary, ErrorSummaryProps } from '@digdir/designsystemet-react';
2
+ export { ErrorSummary, ErrorSummaryProps };
@@ -0,0 +1,2 @@
1
+ import { Field, FieldProps } from '@digdir/designsystemet-react';
2
+ export { Field, FieldProps };
@@ -0,0 +1,2 @@
1
+ import { Fieldset, FieldsetProps } from '@digdir/designsystemet-react';
2
+ export { Fieldset, FieldsetProps };
@@ -0,0 +1,2 @@
1
+ import { Heading, HeadingProps } from '@digdir/designsystemet-react';
2
+ export { Heading, HeadingProps };
@@ -0,0 +1,2 @@
1
+ import { Input, InputProps } from '@digdir/designsystemet-react';
2
+ export { Input, InputProps };
@@ -0,0 +1,2 @@
1
+ import { Label, LabelProps } from '@digdir/designsystemet-react';
2
+ export { Label, LabelProps };
@@ -0,0 +1,2 @@
1
+ import { Link, LinkProps } from '@digdir/designsystemet-react';
2
+ export { Link, LinkProps };
@@ -0,0 +1,2 @@
1
+ import { List, ListOrdered, ListOrderedProps, ListUnordered, ListUnorderedProps, ListItem, ListItemProps } from '@digdir/designsystemet-react';
2
+ export { List, ListOrdered, ListOrderedProps, ListUnordered, ListUnorderedProps, ListItem, ListItemProps, };
@@ -0,0 +1,2 @@
1
+ export * from './spinner/Spinner';
2
+ export * from './skeleton/Skeleton';
@@ -0,0 +1,2 @@
1
+ import { Skeleton, SkeletonProps } from '@digdir/designsystemet-react';
2
+ export { Skeleton, SkeletonProps };
@@ -0,0 +1,2 @@
1
+ import { Spinner, SpinnerProps } from '@digdir/designsystemet-react';
2
+ export { Spinner, SpinnerProps };
@@ -0,0 +1,2 @@
1
+ import { EXPERIMENTAL_MultiSuggestion, EXPERIMENTAL_MultiSuggestionInput, EXPERIMENTAL_MultiSuggestionList, EXPERIMENTAL_MultiSuggestionOption, EXPERIMENTAL_MultiSuggestionChips, EXPERIMENTAL_MultiSuggestionEmpty, EXPERIMENTAL_MultiSuggestionClear, MultiSuggestionProps, MultiSuggestionInputProps, MultiSuggestionListProps, MultiSuggestionOptionProps, MultiSuggestionChipsProps, MultiSuggestionEmptyProps, MultiSuggestionClearProps } from '@digdir/designsystemet-react';
2
+ export { EXPERIMENTAL_MultiSuggestion, EXPERIMENTAL_MultiSuggestionInput, EXPERIMENTAL_MultiSuggestionList, EXPERIMENTAL_MultiSuggestionOption, EXPERIMENTAL_MultiSuggestionChips, EXPERIMENTAL_MultiSuggestionEmpty, EXPERIMENTAL_MultiSuggestionClear, MultiSuggestionProps, MultiSuggestionInputProps, MultiSuggestionListProps, MultiSuggestionOptionProps, MultiSuggestionChipsProps, MultiSuggestionEmptyProps, MultiSuggestionClearProps, };
@@ -0,0 +1,2 @@
1
+ import { Pagination, PaginationProps } from '@digdir/designsystemet-react';
2
+ export { Pagination, PaginationProps };
@@ -0,0 +1,2 @@
1
+ import { Paragraph, ParagraphProps } from '@digdir/designsystemet-react';
2
+ export { Paragraph, ParagraphProps };
@@ -0,0 +1,2 @@
1
+ import { Popover, PopoverProps } from '@digdir/designsystemet-react';
2
+ export { Popover, PopoverProps };
@@ -0,0 +1,2 @@
1
+ import { Radio, RadioProps } from '@digdir/designsystemet-react';
2
+ export { Radio, RadioProps };
@@ -0,0 +1,2 @@
1
+ import { Search, SearchProps } from '@digdir/designsystemet-react';
2
+ export { Search, SearchProps };
@@ -0,0 +1,2 @@
1
+ import { Select, SelectProps } from '@digdir/designsystemet-react';
2
+ export { Select, SelectProps };
@@ -0,0 +1,2 @@
1
+ import { SkipLink, SkipLinkProps } from '@digdir/designsystemet-react';
2
+ export { SkipLink, SkipLinkProps };
@@ -0,0 +1,2 @@
1
+ import { EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionOption, EXPERIMENTAL_SuggestionClear, SuggestionProps, SuggestionListProps, SuggestionInputProps, SuggestionEmptyProps, SuggestionOptionProps, SuggestionClearProps } from '@digdir/designsystemet-react';
2
+ export { EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionOption, EXPERIMENTAL_SuggestionClear, SuggestionProps, SuggestionListProps, SuggestionInputProps, SuggestionEmptyProps, SuggestionOptionProps, SuggestionClearProps, };
@@ -0,0 +1,2 @@
1
+ import { Switch, SwitchProps } from '@digdir/designsystemet-react';
2
+ export { Switch, SwitchProps };
@@ -0,0 +1,2 @@
1
+ import { Table, TableProps } from '@digdir/designsystemet-react';
2
+ export { Table, TableProps };
@@ -0,0 +1,2 @@
1
+ import { Tabs, TabsProps } from '@digdir/designsystemet-react';
2
+ export { Tabs, TabsProps };
@@ -0,0 +1,2 @@
1
+ import { Tag, TagProps } from '@digdir/designsystemet-react';
2
+ export { Tag, TagProps };
@@ -0,0 +1,2 @@
1
+ import { Textarea, TextareaProps } from '@digdir/designsystemet-react';
2
+ export { Textarea, TextareaProps };
@@ -0,0 +1,2 @@
1
+ import { Textfield, TextfieldProps } from '@digdir/designsystemet-react';
2
+ export { Textfield, TextfieldProps };
@@ -0,0 +1,2 @@
1
+ import { ToggleGroup, ToggleGroupProps } from '@digdir/designsystemet-react';
2
+ export { ToggleGroup, ToggleGroupProps };
@@ -0,0 +1,2 @@
1
+ import { Tooltip, TooltipProps } from '@digdir/designsystemet-react';
2
+ export { Tooltip, TooltipProps };
@@ -0,0 +1,2 @@
1
+ import { ValidationMessage, ValidationMessageProps } from '@digdir/designsystemet-react';
2
+ export { ValidationMessage, ValidationMessageProps };
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@digdir/designsystemet-react");Object.defineProperty(exports,"Alert",{enumerable:!0,get:()=>e.Alert});Object.defineProperty(exports,"Avatar",{enumerable:!0,get:()=>e.Avatar});Object.defineProperty(exports,"Badge",{enumerable:!0,get:()=>e.Badge});Object.defineProperty(exports,"Breadcrumbs",{enumerable:!0,get:()=>e.Breadcrumbs});Object.defineProperty(exports,"Button",{enumerable:!0,get:()=>e.Button});Object.defineProperty(exports,"Card",{enumerable:!0,get:()=>e.Card});Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:()=>e.Checkbox});Object.defineProperty(exports,"Chip",{enumerable:!0,get:()=>e.Chip});Object.defineProperty(exports,"ChipButton",{enumerable:!0,get:()=>e.ChipButton});Object.defineProperty(exports,"ChipCheckbox",{enumerable:!0,get:()=>e.ChipCheckbox});Object.defineProperty(exports,"ChipRadio",{enumerable:!0,get:()=>e.ChipRadio});Object.defineProperty(exports,"ChipRemovable",{enumerable:!0,get:()=>e.ChipRemovable});Object.defineProperty(exports,"Details",{enumerable:!0,get:()=>e.Details});Object.defineProperty(exports,"DetailsContent",{enumerable:!0,get:()=>e.DetailsContent});Object.defineProperty(exports,"DetailsSummary",{enumerable:!0,get:()=>e.DetailsSummary});Object.defineProperty(exports,"Dialog",{enumerable:!0,get:()=>e.Dialog});Object.defineProperty(exports,"Divider",{enumerable:!0,get:()=>e.Divider});Object.defineProperty(exports,"Dropdown",{enumerable:!0,get:()=>e.Dropdown});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestion",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestion});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionChips",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionChips});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionClear",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionClear});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionEmpty",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionEmpty});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionInput",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionInput});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionList",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionList});Object.defineProperty(exports,"EXPERIMENTAL_MultiSuggestionOption",{enumerable:!0,get:()=>e.EXPERIMENTAL_MultiSuggestionOption});Object.defineProperty(exports,"EXPERIMENTAL_Suggestion",{enumerable:!0,get:()=>e.EXPERIMENTAL_Suggestion});Object.defineProperty(exports,"EXPERIMENTAL_SuggestionClear",{enumerable:!0,get:()=>e.EXPERIMENTAL_SuggestionClear});Object.defineProperty(exports,"EXPERIMENTAL_SuggestionEmpty",{enumerable:!0,get:()=>e.EXPERIMENTAL_SuggestionEmpty});Object.defineProperty(exports,"EXPERIMENTAL_SuggestionInput",{enumerable:!0,get:()=>e.EXPERIMENTAL_SuggestionInput});Object.defineProperty(exports,"EXPERIMENTAL_SuggestionList",{enumerable:!0,get:()=>e.EXPERIMENTAL_SuggestionList});Object.defineProperty(exports,"EXPERIMENTAL_SuggestionOption",{enumerable:!0,get:()=>e.EXPERIMENTAL_SuggestionOption});Object.defineProperty(exports,"ErrorSummary",{enumerable:!0,get:()=>e.ErrorSummary});Object.defineProperty(exports,"Field",{enumerable:!0,get:()=>e.Field});Object.defineProperty(exports,"Fieldset",{enumerable:!0,get:()=>e.Fieldset});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>e.Heading});Object.defineProperty(exports,"Input",{enumerable:!0,get:()=>e.Input});Object.defineProperty(exports,"Label",{enumerable:!0,get:()=>e.Label});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>e.Link});Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List});Object.defineProperty(exports,"ListItem",{enumerable:!0,get:()=>e.ListItem});Object.defineProperty(exports,"ListOrdered",{enumerable:!0,get:()=>e.ListOrdered});Object.defineProperty(exports,"ListUnordered",{enumerable:!0,get:()=>e.ListUnordered});Object.defineProperty(exports,"Pagination",{enumerable:!0,get:()=>e.Pagination});Object.defineProperty(exports,"Paragraph",{enumerable:!0,get:()=>e.Paragraph});Object.defineProperty(exports,"Popover",{enumerable:!0,get:()=>e.Popover});Object.defineProperty(exports,"Radio",{enumerable:!0,get:()=>e.Radio});Object.defineProperty(exports,"Search",{enumerable:!0,get:()=>e.Search});Object.defineProperty(exports,"Select",{enumerable:!0,get:()=>e.Select});Object.defineProperty(exports,"Skeleton",{enumerable:!0,get:()=>e.Skeleton});Object.defineProperty(exports,"SkipLink",{enumerable:!0,get:()=>e.SkipLink});Object.defineProperty(exports,"Spinner",{enumerable:!0,get:()=>e.Spinner});Object.defineProperty(exports,"Switch",{enumerable:!0,get:()=>e.Switch});Object.defineProperty(exports,"Table",{enumerable:!0,get:()=>e.Table});Object.defineProperty(exports,"Tabs",{enumerable:!0,get:()=>e.Tabs});Object.defineProperty(exports,"Tag",{enumerable:!0,get:()=>e.Tag});Object.defineProperty(exports,"Textarea",{enumerable:!0,get:()=>e.Textarea});Object.defineProperty(exports,"Textfield",{enumerable:!0,get:()=>e.Textfield});Object.defineProperty(exports,"ToggleGroup",{enumerable:!0,get:()=>e.ToggleGroup});Object.defineProperty(exports,"Tooltip",{enumerable:!0,get:()=>e.Tooltip});Object.defineProperty(exports,"ValidationMessage",{enumerable:!0,get:()=>e.ValidationMessage});
@@ -0,0 +1,39 @@
1
+ export * from './components/Alert/Alert';
2
+ export * from './components/Avatar/Avatar';
3
+ export * from './components/Badge/Badge';
4
+ export * from './components/Breadcrumbs/Breadcrumbs';
5
+ export * from './components/Button/Button';
6
+ export * from './components/Card/Card';
7
+ export * from './components/Checkbox/Checkbox';
8
+ export * from './components/Chip/Chip';
9
+ export * from './components/Details/Details';
10
+ export * from './components/Dialog/Dialog';
11
+ export * from './components/Divider/Divider';
12
+ export * from './components/Dropdown/Dropdown';
13
+ export * from './components/ErrorSummary/ErrorSummary';
14
+ export * from './components/Field/Field';
15
+ export * from './components/Fieldset/Fieldset';
16
+ export * from './components/Heading/Heading';
17
+ export * from './components/Input/Input';
18
+ export * from './components/Label/Label';
19
+ export * from './components/Link/Link';
20
+ export * from './components/List/List';
21
+ export * from './components/Loaders';
22
+ export * from './components/MultiSuggestion/MultiSuggestion';
23
+ export * from './components/Pagination/Pagination';
24
+ export * from './components/Paragraph/Paragraph';
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/ValidationMessage/ValidationMessage';
package/dist/index.js ADDED
@@ -0,0 +1,63 @@
1
+ import { Alert as e, Avatar as E, Badge as o, Breadcrumbs as g, Button as n, Card as a, Checkbox as u, Chip as s, ChipButton as r, ChipCheckbox as l, ChipRadio as L, ChipRemovable as p, Details as M, DetailsContent as S, DetailsSummary as T, Dialog as I, Divider as d, Dropdown as P, EXPERIMENTAL_MultiSuggestion as R, EXPERIMENTAL_MultiSuggestionChips as A, EXPERIMENTAL_MultiSuggestionClear as N, EXPERIMENTAL_MultiSuggestionEmpty as X, EXPERIMENTAL_MultiSuggestionInput as _, EXPERIMENTAL_MultiSuggestionList as C, EXPERIMENTAL_MultiSuggestionOption as h, EXPERIMENTAL_Suggestion as m, EXPERIMENTAL_SuggestionClear as b, EXPERIMENTAL_SuggestionEmpty as c, EXPERIMENTAL_SuggestionInput as k, EXPERIMENTAL_SuggestionList as D, EXPERIMENTAL_SuggestionOption as x, ErrorSummary as v, Field as y, Fieldset as B, Heading as O, Input as f, Label as w, Link as F, List as G, ListItem as H, ListOrdered as U, ListUnordered as V, Pagination as j, Paragraph as q, Popover as z, Radio as J, Search as K, Select as Q, Skeleton as W, SkipLink as Y, Spinner as Z, Switch as $, Table as ii, Tabs as ti, Tag as ei, Textarea as Ei, Textfield as oi, ToggleGroup as gi, Tooltip as ni, ValidationMessage as ai } from "@digdir/designsystemet-react";
2
+ export {
3
+ e as Alert,
4
+ E as Avatar,
5
+ o as Badge,
6
+ g as Breadcrumbs,
7
+ n as Button,
8
+ a as Card,
9
+ u as Checkbox,
10
+ s as Chip,
11
+ r as ChipButton,
12
+ l as ChipCheckbox,
13
+ L as ChipRadio,
14
+ p as ChipRemovable,
15
+ M as Details,
16
+ S as DetailsContent,
17
+ T as DetailsSummary,
18
+ I as Dialog,
19
+ d as Divider,
20
+ P as Dropdown,
21
+ R as EXPERIMENTAL_MultiSuggestion,
22
+ A as EXPERIMENTAL_MultiSuggestionChips,
23
+ N as EXPERIMENTAL_MultiSuggestionClear,
24
+ X as EXPERIMENTAL_MultiSuggestionEmpty,
25
+ _ as EXPERIMENTAL_MultiSuggestionInput,
26
+ C as EXPERIMENTAL_MultiSuggestionList,
27
+ h as EXPERIMENTAL_MultiSuggestionOption,
28
+ m as EXPERIMENTAL_Suggestion,
29
+ b as EXPERIMENTAL_SuggestionClear,
30
+ c as EXPERIMENTAL_SuggestionEmpty,
31
+ k as EXPERIMENTAL_SuggestionInput,
32
+ D as EXPERIMENTAL_SuggestionList,
33
+ x as EXPERIMENTAL_SuggestionOption,
34
+ v as ErrorSummary,
35
+ y as Field,
36
+ B as Fieldset,
37
+ O as Heading,
38
+ f as Input,
39
+ w as Label,
40
+ F as Link,
41
+ G as List,
42
+ H as ListItem,
43
+ U as ListOrdered,
44
+ V as ListUnordered,
45
+ j as Pagination,
46
+ q as Paragraph,
47
+ z as Popover,
48
+ J as Radio,
49
+ K as Search,
50
+ Q as Select,
51
+ W as Skeleton,
52
+ Y as SkipLink,
53
+ Z as Spinner,
54
+ $ as Switch,
55
+ ii as Table,
56
+ ti as Tabs,
57
+ ei as Tag,
58
+ Ei as Textarea,
59
+ oi as Textfield,
60
+ gi as ToggleGroup,
61
+ ni as Tooltip,
62
+ ai as ValidationMessage
63
+ };
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@ks-digital/designsystem-react",
3
+ "repository": {
4
+ "type": "git",
5
+ "url": "https://github.com/ks-no/designsystem.git",
6
+ "directory": "packages/react"
7
+ },
8
+ "version": "0.0.1-alpha.10",
9
+ "license": "MIT",
10
+ "private": false,
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "type": "module",
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
+ ],
27
+ "dependencies": {
28
+ "@digdir/designsystemet-react": "1.0.5",
29
+ "@navikt/aksel-icons": "^7.21.1"
30
+ },
31
+ "devDependencies": {
32
+ "eslint-plugin-jsx-a11y": "6.10.1",
33
+ "eslint-plugin-react": "7.35.0",
34
+ "eslint-plugin-react-hooks": "5.0.0",
35
+ "@vitejs/plugin-react-swc": "^3.9.0",
36
+ "@testing-library/react": "16.1.0"
37
+ },
38
+ "peerDependencies": {
39
+ "react": ">=18.3.1",
40
+ "react-dom": ">=18.3.1"
41
+ }
42
+ }
package/package.json CHANGED
@@ -5,21 +5,38 @@
5
5
  "url": "https://github.com/ks-no/designsystem.git",
6
6
  "directory": "packages/react"
7
7
  },
8
- "version": "0.0.1-alpha.0",
8
+ "version": "0.0.1-alpha.10",
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
- "@digdir/designsystemet-css": "1.0.5",
19
- "@digdir/designsystemet-react": "1.0.5"
28
+ "@digdir/designsystemet-react": "1.0.5",
29
+ "@navikt/aksel-icons": "^7.21.1"
30
+ },
31
+ "devDependencies": {
32
+ "eslint-plugin-jsx-a11y": "6.10.1",
33
+ "eslint-plugin-react": "7.35.0",
34
+ "eslint-plugin-react-hooks": "5.0.0",
35
+ "@vitejs/plugin-react-swc": "^3.9.0",
36
+ "@testing-library/react": "16.1.0"
20
37
  },
21
38
  "peerDependencies": {
22
- "react": "^19.0.0",
23
- "react-dom": "^19.0.0"
39
+ "react": ">=18.3.1",
40
+ "react-dom": ">=18.3.1"
24
41
  }
25
42
  }
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,8 +0,0 @@
1
- {
2
- "name": "@ks-digital/designsystem-react",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/react/src",
5
- "projectType": "library",
6
- "tags": [],
7
- "targets": {}
8
- }
@@ -1,2 +0,0 @@
1
- import { Alert, type AlertProps } from '@digdir/designsystemet-react'
2
- export { Alert, AlertProps }
@@ -1,2 +0,0 @@
1
- import { Avatar, type AvatarProps } from '@digdir/designsystemet-react'
2
- export { Avatar, AvatarProps }
@@ -1,2 +0,0 @@
1
- import { Badge, type BadgeProps } from '@digdir/designsystemet-react'
2
- export { Badge, BadgeProps }
@@ -1,5 +0,0 @@
1
- import {
2
- Breadcrumbs,
3
- type BreadcrumbsProps,
4
- } from '@digdir/designsystemet-react'
5
- export { Breadcrumbs, BreadcrumbsProps }
@@ -1,2 +0,0 @@
1
- import { Button, type ButtonProps } from '@digdir/designsystemet-react'
2
- export { Button, ButtonProps }
@@ -1,2 +0,0 @@
1
- import { Card, type CardProps } from '@digdir/designsystemet-react'
2
- export { Card, CardProps }
@@ -1,2 +0,0 @@
1
- import { Checkbox, type CheckboxProps } from '@digdir/designsystemet-react'
2
- export { Checkbox, CheckboxProps }
@@ -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,2 +0,0 @@
1
- import { Details, type DetailsProps } from '@digdir/designsystemet-react'
2
- export { Details, DetailsProps }
@@ -1,2 +0,0 @@
1
- import { Dialog, type DialogProps } from '@digdir/designsystemet-react'
2
- export { Dialog, DialogProps }
@@ -1,2 +0,0 @@
1
- import { Divider, type DividerProps } from '@digdir/designsystemet-react'
2
- export { Divider, DividerProps }
@@ -1,2 +0,0 @@
1
- import { Dropdown, type DropdownProps } from '@digdir/designsystemet-react'
2
- export { Dropdown, DropdownProps }
@@ -1,5 +0,0 @@
1
- import {
2
- ErrorSummary,
3
- type ErrorSummaryProps,
4
- } from '@digdir/designsystemet-react'
5
- export { ErrorSummary, ErrorSummaryProps }
@@ -1,2 +0,0 @@
1
- import { Field, type FieldProps } from '@digdir/designsystemet-react'
2
- export { Field, FieldProps }
@@ -1,2 +0,0 @@
1
- import { Fieldset, type FieldsetProps } from '@digdir/designsystemet-react'
2
- export { Fieldset, FieldsetProps }
@@ -1,2 +0,0 @@
1
- import { Heading, type HeadingProps } from '@digdir/designsystemet-react'
2
- export { Heading, HeadingProps }
@@ -1,2 +0,0 @@
1
- import { Input, type InputProps } from '@digdir/designsystemet-react'
2
- export { Input, InputProps }
@@ -1,2 +0,0 @@
1
- import { Label, type LabelProps } from '@digdir/designsystemet-react'
2
- export { Label, LabelProps }
@@ -1,2 +0,0 @@
1
- import { Link, type LinkProps } from '@digdir/designsystemet-react'
2
- export { Link, LinkProps }
@@ -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,2 +0,0 @@
1
- export * from './spinner/Spinner'
2
- export * from './skeleton/Skeleton'
@@ -1,2 +0,0 @@
1
- import { Skeleton, type SkeletonProps } from '@digdir/designsystemet-react'
2
- export { Skeleton, SkeletonProps }
@@ -1,2 +0,0 @@
1
- import { Spinner, type SpinnerProps } from '@digdir/designsystemet-react'
2
- export { Spinner, SpinnerProps }
@@ -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,2 +0,0 @@
1
- import { Pagination, type PaginationProps } from '@digdir/designsystemet-react'
2
- export { Pagination, PaginationProps }
@@ -1,2 +0,0 @@
1
- import { Paragraph, type ParagraphProps } from '@digdir/designsystemet-react'
2
- export { Paragraph, ParagraphProps }
@@ -1,2 +0,0 @@
1
- import { Popover, type PopoverProps } from '@digdir/designsystemet-react'
2
- export { Popover, PopoverProps }
@@ -1,2 +0,0 @@
1
- import { Radio, type RadioProps } from '@digdir/designsystemet-react'
2
- export { Radio, RadioProps }
@@ -1,2 +0,0 @@
1
- import { Search, type SearchProps } from '@digdir/designsystemet-react'
2
- export { Search, SearchProps }
@@ -1,2 +0,0 @@
1
- import { Select, type SelectProps } from '@digdir/designsystemet-react'
2
- export { Select, SelectProps }
@@ -1,2 +0,0 @@
1
- import { SkipLink, type SkipLinkProps } from '@digdir/designsystemet-react'
2
- export { SkipLink, SkipLinkProps }
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import { Switch, type SwitchProps } from '@digdir/designsystemet-react'
2
- export { Switch, SwitchProps }
@@ -1,2 +0,0 @@
1
- import { Table, type TableProps } from '@digdir/designsystemet-react'
2
- export { Table, TableProps }
@@ -1,2 +0,0 @@
1
- import { Tabs, type TabsProps } from '@digdir/designsystemet-react'
2
- export { Tabs, TabsProps }
@@ -1,2 +0,0 @@
1
- import { Tag, type TagProps } from '@digdir/designsystemet-react'
2
- export { Tag, TagProps }
@@ -1,2 +0,0 @@
1
- import { Textarea, type TextareaProps } from '@digdir/designsystemet-react'
2
- export { Textarea, TextareaProps }
@@ -1,2 +0,0 @@
1
- import { Textfield, type TextfieldProps } from '@digdir/designsystemet-react'
2
- export { Textfield, TextfieldProps }
@@ -1,5 +0,0 @@
1
- import {
2
- ToggleGroup,
3
- type ToggleGroupProps,
4
- } from '@digdir/designsystemet-react'
5
- export { ToggleGroup, ToggleGroupProps }
@@ -1,2 +0,0 @@
1
- import { Tooltip, type TooltipProps } from '@digdir/designsystemet-react'
2
- export { Tooltip, TooltipProps }
@@ -1,5 +0,0 @@
1
- import {
2
- ValidationMessage,
3
- type ValidationMessageProps,
4
- } from '@digdir/designsystemet-react'
5
- export { ValidationMessage, ValidationMessageProps }
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'
@@ -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
- }
@@ -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
- }))