@oslokommune/punkt-react 14.1.0 → 14.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "14.1.0",
3
+ "version": "14.2.0",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -39,15 +39,15 @@
39
39
  "dependencies": {
40
40
  "@lit-labs/ssr-dom-shim": "^1.2.1",
41
41
  "@lit/react": "^1.0.7",
42
- "@oslokommune/punkt-elements": "^14.1.0",
42
+ "@oslokommune/punkt-elements": "^14.2.0",
43
43
  "classnames": "^2.5.1",
44
44
  "prettier": "^3.3.3",
45
45
  "react-hook-form": "^7.53.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/plugin-transform-private-property-in-object": "^7.25.9",
49
- "@oslokommune/punkt-assets": "^14.0.4",
50
- "@oslokommune/punkt-css": "^14.0.4",
49
+ "@oslokommune/punkt-assets": "^14.1.1",
50
+ "@oslokommune/punkt-css": "^14.1.1",
51
51
  "@testing-library/jest-dom": "^6.5.0",
52
52
  "@testing-library/react": "^16.0.1",
53
53
  "@testing-library/user-event": "^14.5.2",
@@ -103,5 +103,5 @@
103
103
  "url": "https://github.com/oslokommune/punkt/issues"
104
104
  },
105
105
  "license": "MIT",
106
- "gitHead": "5ddba3690f0af28db85f92bd7698af5b54ae8e0b"
106
+ "gitHead": "47682b6620c3d10622e5121814954fa294996b9b"
107
107
  }
@@ -1,8 +1,9 @@
1
1
  'use client'
2
2
 
3
3
  import { ReactNode, forwardRef, createContext, useContext } from 'react'
4
+ import type { TAccordionSkin } from 'shared-types'
4
5
 
5
- export type TPktAccordionSkin = 'borderless' | 'outlined' | 'beige' | 'blue'
6
+ export type TPktAccordionSkin = TAccordionSkin
6
7
 
7
8
  export interface IPktAccordion {
8
9
  compact?: boolean
@@ -4,8 +4,9 @@ import { ReactNode, useState, useEffect, forwardRef } from 'react'
4
4
  import type { MouseEvent, SyntheticEvent } from 'react'
5
5
  import { PktIcon } from '../icon/Icon'
6
6
  import { useAccordionContext } from './Accordion'
7
+ import type { TAccordionSkin } from 'shared-types'
7
8
 
8
- export type TPktAccordionSkin = 'borderless' | 'outlined' | 'beige' | 'blue'
9
+ export type TPktAccordionSkin = TAccordionSkin
9
10
 
10
11
  export interface IPktAccordionItem {
11
12
  defaultOpen?: boolean
@@ -4,10 +4,10 @@ import { ReactNode, useState } from 'react'
4
4
  import { FC, HTMLAttributes, ReactElement, useCallback } from 'react'
5
5
  import classNames from 'classnames'
6
6
  import { PktButton, PktIcon } from '..'
7
- import { TAlertRole, TAriaLive } from '@/types/aria'
7
+ import type { TAlertRole, TAriaLive, TAlertSkin } from 'shared-types'
8
8
 
9
9
  export interface IPktAlert extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
10
- skin?: 'error' | 'success' | 'warning' | 'info'
10
+ skin?: TAlertSkin
11
11
  closeAlert?: boolean
12
12
  title?: ReactNode
13
13
  date?: string
@@ -17,7 +17,7 @@ export interface IPktAlert extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
17
17
  onClose?: (e: CustomEvent) => void
18
18
  }
19
19
 
20
- export type TAlertSkin = 'error' | 'success' | 'warning' | 'info'
20
+ export type { TAlertSkin }
21
21
 
22
22
  export const PktAlert: FC<IPktAlert> = ({
23
23
  children,
@@ -5,9 +5,9 @@ import { createComponent } from '@lit/react'
5
5
  import { IPktHeading, PktCard as PktElCard } from '@oslokommune/punkt-elements'
6
6
  import type { PktElType, PktElConstructor } from '@/interfaces/IPktElements'
7
7
  import { IPktTag } from '../tag/Tag'
8
+ import type { TCardSkin, TLayout } from 'shared-types'
8
9
 
9
- type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue'
10
- type TLayout = 'vertical' | 'horizontal'
10
+ export type { TCardSkin, TLayout }
11
11
  type TCardPadding = 'none' | 'default'
12
12
  type TCardImageShape = 'square' | 'round'
13
13
  type TCardTagPosition = 'top' | 'bottom'
@@ -5,8 +5,7 @@ import React, { FC } from 'react'
5
5
  import { PktElConstructor, PktElType } from '@/interfaces/IPktElements'
6
6
  import { createComponent } from '@lit/react'
7
7
  import { PktIcon as PktEl } from '@oslokommune/punkt-elements'
8
-
9
- type Booleanish = boolean | 'true' | 'false'
8
+ import type { Booleanish } from 'shared-types'
10
9
 
11
10
  interface IPktIcon extends PktElType {
12
11
  name?: string
@@ -4,8 +4,9 @@ import classNames from 'classnames'
4
4
  import { createRef, FC, HTMLAttributes, ReactNode, useCallback, useState } from 'react'
5
5
 
6
6
  import { PktIcon } from '..'
7
+ import type { TMessageboxSkin } from 'shared-types'
7
8
 
8
- export type TMessageboxSkin = 'beige' | 'blue' | 'red' | 'green'
9
+ export type { TMessageboxSkin }
9
10
 
10
11
  export interface IPktMessagebox extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
11
12
  skin?: TMessageboxSkin