@oslokommune/punkt-react 19.18.2 → 19.18.3
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/CHANGELOG.md +5 -0
- package/dist/components/accordion/AccordionItem.js +1 -0
- package/dist/components/button/Button.js +1 -0
- package/dist/components/card/Card.js +1 -0
- package/dist/components/checkbox/Checkbox.js +1 -0
- package/dist/components/checkboxgroup/CheckboxGroup.js +1 -0
- package/dist/components/consent/Consent.js +1 -0
- package/dist/components/footer/Footer.js +1 -0
- package/dist/components/footerSimple/FooterSimple.js +1 -0
- package/dist/components/header/HeaderGlobal.js +1 -0
- package/dist/components/header/HeaderService.js +1 -0
- package/dist/components/header-menu/HeaderMenu.js +1 -0
- package/dist/components/icon/Icon.js +1 -0
- package/dist/components/inputwrapper/InputWrapper.js +1 -0
- package/dist/components/loader/Loader.d.ts +2 -1
- package/dist/components/loader/Loader.js +1 -0
- package/dist/components/messagebox/Messagebox.js +1 -0
- package/dist/components/modal/Modal.d.ts +2 -1
- package/dist/components/radio/RadioButton.js +1 -0
- package/dist/components/radiogroup/RadioGroup.js +1 -0
- package/dist/components/select/Select.js +1 -0
- package/dist/components/table/Table.js +1 -0
- package/dist/components/tag/Tag.d.ts +2 -2
- package/dist/components/textarea/Textarea.js +1 -0
- package/dist/components/timepicker/useTimepickerState.d.ts +1 -1
- package/dist/shared-types/heading.d.ts +2 -1
- package/dist/shared-types/index.d.ts +2 -2
- package/dist/shared-types/index.js +18 -0
- package/dist/shared-types/size.d.ts +4 -12
- package/dist/shared-types/size.js +9 -0
- package/package.json +2 -2
- package/src/components/loader/Loader.tsx +2 -2
- package/src/components/modal/Modal.tsx +2 -1
- package/src/components/tag/Tag.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [19.18.3](https://github.com/oslokommune/punkt/compare/19.18.2...19.18.3) (2026-10-20)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
## [19.18.2](https://github.com/oslokommune/punkt/compare/19.18.1...19.18.2) (2026-10-20)
|
|
9
14
|
|
|
10
15
|
### Bug Fixes
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useAccordionContext as e } from "./Accordion.js";
|
|
3
3
|
import { ACCORDION_LIGHT_ONLY_SKINS as t } from "../../shared-types/accordion.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { PktIcon as n } from "../icon/Icon.js";
|
|
5
6
|
import { forwardRef as r, useState as i } from "react";
|
|
6
7
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ANIMATION_DEFAULT_PATH as e } from "../../shared-types/icon.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { PktIcon as t } from "../icon/Icon.js";
|
|
4
5
|
import { forwardRef as n } from "react";
|
|
5
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { CARD_DEFAULTS as t } from "../../shared-types/card.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { plural as r } from "../../shared-strings/format.js";
|
|
6
7
|
import { usePktStrings as i } from "../../hooks/usePktStrings.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CHECKBOX_DEFAULTS as e } from "../../shared-types/checkbox.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { usePktStrings as t } from "../../hooks/usePktStrings.js";
|
|
4
5
|
import { useGeneratedId as n } from "../../hooks/useGeneratedId.js";
|
|
5
6
|
import { useCheckboxGroupContext as ee } from "../checkboxgroup/CheckboxGroupContext.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { OPTION_GROUP_DEFAULTS as e } from "../../shared-types/option-group.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { usePktStrings as t } from "../../hooks/usePktStrings.js";
|
|
4
5
|
import { useGeneratedId as n } from "../../hooks/useGeneratedId.js";
|
|
5
6
|
import { CheckboxGroupContext as r } from "./CheckboxGroupContext.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CONSENT_DEFAULTS as e } from "../../shared-types/consent.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { consentStrings as t } from "../../shared-strings/consent.js";
|
|
4
5
|
import { PktButton as n } from "../button/Button.js";
|
|
5
6
|
import { forwardRef as r, useEffect as i, useRef as a } from "react";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../shared-types/footer.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { PktIcon as e } from "../icon/Icon.js";
|
|
4
5
|
import { PktConsent as t } from "../consent/Consent.js";
|
|
5
6
|
import { getLinkDomainLabel as n } from "../../shared-utils/header-footer/external-domain.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../shared-types/footer.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { PktIcon as e } from "../icon/Icon.js";
|
|
4
5
|
import { PktConsent as t } from "../consent/Consent.js";
|
|
5
6
|
import { getLinkDomainLabel as n } from "../../shared-utils/header-footer/external-domain.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { DEFAULT_HEADER_LOGO_LINK as t } from "../../shared-types/header-footer.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { PktIcon as r } from "../icon/Icon.js";
|
|
6
7
|
import { PktButton as i } from "../button/Button.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { DEFAULT_HEADER_LOGO_LINK as t } from "../../shared-types/header-footer.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { PktIcon as r } from "../icon/Icon.js";
|
|
6
7
|
import { PktButton as i } from "../button/Button.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { PktAccordion as e } from "../accordion/Accordion.js";
|
|
3
3
|
import { DEFAULT_HEADER_FOOTER_URL as t } from "../../shared-types/header-footer.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { PktIcon as n } from "../icon/Icon.js";
|
|
5
6
|
import { PktAccordionItem as r } from "../accordion/AccordionItem.js";
|
|
6
7
|
import { usePktStrings as i } from "../../hooks/usePktStrings.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { ICON_DEFAULTS as t } from "../../shared-types/icon.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { forwardRef as r, useEffect as i, useLayoutEffect as a, useRef as o } from "react";
|
|
6
7
|
import { jsx as s } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { INPUT_WRAPPER_DEFAULTS as e } from "../../shared-types/input-wrapper.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { formatString as t } from "../../shared-strings/format.js";
|
|
4
5
|
import { usePktStrings as n } from "../../hooks/usePktStrings.js";
|
|
5
6
|
import { PktAlert as r } from "../alert/Alert.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TPktSizeBase } from '../../shared-types';
|
|
2
3
|
declare global {
|
|
3
4
|
interface Window {
|
|
4
5
|
pktAnimationPath?: string;
|
|
5
6
|
}
|
|
6
7
|
}
|
|
7
8
|
export type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes';
|
|
8
|
-
export type TPktLoaderSize =
|
|
9
|
+
export type TPktLoaderSize = TPktSizeBase;
|
|
9
10
|
export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
|
|
10
11
|
/**
|
|
11
12
|
* Tid i millisekunder før loader vises. Nyttig når lastetiden kan være
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { ANIMATION_DEFAULT_PATH as t } from "../../shared-types/icon.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { PktIcon as r } from "../icon/Icon.js";
|
|
6
7
|
import { forwardRef as i, useEffect as a, useState as o } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { MESSAGEBOX_DEFAULTS as t } from "../../shared-types/messagebox.js";
|
|
4
|
+
import "../../shared-types/index.js";
|
|
4
5
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
5
6
|
import { PktIcon as r } from "../icon/Icon.js";
|
|
6
7
|
import { usePktStrings as i } from "../../hooks/usePktStrings.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import { TPktSizeBase } from '../../shared-types';
|
|
2
3
|
import { IPktStringsProps } from '../../shared-strings';
|
|
3
4
|
export interface IPktModal extends Omit<HTMLAttributes<HTMLDialogElement>, 'onClose' | 'open'>, IPktStringsProps<'generic'> {
|
|
4
5
|
open?: boolean;
|
|
@@ -7,7 +8,7 @@ export interface IPktModal extends Omit<HTMLAttributes<HTMLDialogElement>, 'onCl
|
|
|
7
8
|
headingIconPath?: string;
|
|
8
9
|
hideCloseButton?: boolean;
|
|
9
10
|
closeOnBackdropClick?: boolean;
|
|
10
|
-
size?:
|
|
11
|
+
size?: TPktSizeBase | 'fit-content';
|
|
11
12
|
removePadding?: boolean;
|
|
12
13
|
closeButtonSkin?: 'blue' | 'yellow-filled';
|
|
13
14
|
variant?: 'dialog' | 'drawer';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { RADIOBUTTON_DEFAULTS as e } from "../../shared-types/radiobutton.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { usePktStrings as t } from "../../hooks/usePktStrings.js";
|
|
4
5
|
import { useGeneratedId as n } from "../../hooks/useGeneratedId.js";
|
|
5
6
|
import { useRadioGroupContext as r } from "../radiogroup/RadioGroupContext.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { OPTION_GROUP_DEFAULTS as e } from "../../shared-types/option-group.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { useGeneratedId as t } from "../../hooks/useGeneratedId.js";
|
|
4
5
|
import { useOptionGroupField as n } from "../../hooks/useOptionGroupField.js";
|
|
5
6
|
import { PktInputWrapper as r } from "../inputwrapper/InputWrapper.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { SELECT_DEFAULTS as e } from "../../shared-types/select.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { useGeneratedId as t } from "../../hooks/useGeneratedId.js";
|
|
4
5
|
import { describedByIds as n } from "../../shared-utils/forms/described-by.js";
|
|
5
6
|
import { PktInputWrapper as r } from "../inputwrapper/InputWrapper.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { TABLE_DEFAULTS as t } from "../../shared-types/table.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { require_classnames as n } from "../../node_modules/classnames/index.js";
|
|
4
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/table/Table.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { TTagSkin } from '../../shared-types';
|
|
2
|
+
import { TPktSizeBase, TTagSkin } from '../../shared-types';
|
|
3
3
|
import { IPktStringsProps } from '../../shared-strings';
|
|
4
4
|
interface BasePktTagProps extends IPktStringsProps<'tag'> {
|
|
5
5
|
skin?: TTagSkin;
|
|
6
6
|
textStyle?: 'normal-text' | 'thin-text';
|
|
7
|
-
size?:
|
|
7
|
+
size?: TPktSizeBase;
|
|
8
8
|
closeTag?: boolean;
|
|
9
9
|
iconName?: string;
|
|
10
10
|
ariaLabel?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { TEXTAREA_DEFAULTS as e } from "../../shared-types/textarea.js";
|
|
3
|
+
import "../../shared-types/index.js";
|
|
3
4
|
import { useGeneratedId as t } from "../../hooks/useGeneratedId.js";
|
|
4
5
|
import { describedByIds as n } from "../../shared-utils/forms/described-by.js";
|
|
5
6
|
import { PktInputWrapper as r } from "../inputwrapper/InputWrapper.js";
|
|
@@ -4,7 +4,7 @@ export declare function useTimepickerState(props: IPktTimepicker, ref: React.For
|
|
|
4
4
|
id: string;
|
|
5
5
|
containerRef: import('react').RefObject<HTMLDivElement | null>;
|
|
6
6
|
outerClasses: string;
|
|
7
|
-
inputSize: "
|
|
7
|
+
inputSize: "small" | "medium" | "xsmall";
|
|
8
8
|
strings: {
|
|
9
9
|
hours: string;
|
|
10
10
|
minutes: string;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Type definitions for heading-related types.
|
|
5
5
|
* These represent HTML heading semantics (h1-h6) and typography scales.
|
|
6
6
|
*/
|
|
7
|
+
import type { TPktSize } from './size';
|
|
7
8
|
export type THeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
-
export type THeadingSize =
|
|
9
|
+
export type THeadingSize = TPktSize;
|
|
9
10
|
export type THeadingWeight = 'light' | 'regular' | 'medium' | 'bold';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type { Booleanish } from './booleanish';
|
|
2
2
|
export { booleanishConverter, nullableBooleanishConverter } from './booleanish';
|
|
3
|
+
export { SIZES_BASE, SIZES, INPUT_SIZES } from './size';
|
|
4
|
+
export type { TPktSizeBase, TPktSize, TPktInputSize } from './size';
|
|
3
5
|
export { ARIA_LIVE_VALUES, type TAriaBoolean, type TAriaBooleanMixed, type TAriaCurrent, type TAriaHasPopup, type TAriaInvalid, type TAriaLive, type TAriaRelevant, type TAriaSort, type TAriaAutoComplete, type TAriaOrientation, type IAriaAttributes, type TAlertRole, } from './aria';
|
|
4
6
|
export { ALERT_SKINS, ALERT_SIZES, ALERT_DEFAULTS, type TAlertSkin, type TAlertSize, type IAlertSpecProps, } from './alert';
|
|
5
7
|
export type { THeadingLevel, THeadingSize, THeadingWeight } from './heading';
|
|
@@ -24,8 +26,6 @@ export type { TIconSizeClass, IPktIconBase, IIconSpecProps } from './icon';
|
|
|
24
26
|
export { LAYOUT_DIRECTIONS } from './layout';
|
|
25
27
|
export type { TLayout, TVerticalPosition, THorizontalPosition, TPosition, TPositionWithCenter, } from './layout';
|
|
26
28
|
export type { THTMLButtonType, TSelectionMode } from './form';
|
|
27
|
-
export { INPUT_SIZES } from './size';
|
|
28
|
-
export type { TPktInputSize, TSize3, TSize5, TSize7 } from './size';
|
|
29
29
|
export { ACCORDION_LIGHT_ONLY_SKINS, ACCORDION_SKINS } from './accordion';
|
|
30
30
|
export type { TAccordionSkin, IPktAccordionBase, IPktAccordionItemBase, IAccordionSpecProps, IAccordionItemSpecProps, IAccordionVisualProps, } from './accordion';
|
|
31
31
|
export { BUTTON_SIZES, BUTTON_SKINS, BUTTON_COLORS, BUTTON_VARIANTS, BUTTON_STATES } from './button';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./size.js";
|
|
2
|
+
import { DEFAULT_HEADER_FOOTER_URL as e, DEFAULT_HEADER_LOGO_LINK as t } from "./header-footer.js";
|
|
3
|
+
import { DEFAULT_FOOTER_PERSONVERN_URL as n, DEFAULT_FOOTER_TILGJENGELIGHET_URL as r } from "./footer.js";
|
|
4
|
+
import { CARD_DEFAULTS as i } from "./card.js";
|
|
5
|
+
import { CHECKBOX_DEFAULTS as a } from "./checkbox.js";
|
|
6
|
+
import { RADIOBUTTON_DEFAULTS as o } from "./radiobutton.js";
|
|
7
|
+
import { OPTION_GROUP_DEFAULTS as s } from "./option-group.js";
|
|
8
|
+
import { CONSENT_DEFAULTS as c } from "./consent.js";
|
|
9
|
+
import { ANIMATION_DEFAULT_PATH as l, ICON_DEFAULTS as u } from "./icon.js";
|
|
10
|
+
import { ACCORDION_LIGHT_ONLY_SKINS as d } from "./accordion.js";
|
|
11
|
+
import { INPUT_WRAPPER_DEFAULTS as f } from "./input-wrapper.js";
|
|
12
|
+
import { TEXTAREA_DEFAULTS as p } from "./textarea.js";
|
|
13
|
+
import { MESSAGEBOX_DEFAULTS as m } from "./messagebox.js";
|
|
14
|
+
import "./calendar.js";
|
|
15
|
+
import "./combobox.js";
|
|
16
|
+
import { SELECT_DEFAULTS as h } from "./select.js";
|
|
17
|
+
import { TABLE_DEFAULTS as g } from "./table.js";
|
|
18
|
+
export { d as ACCORDION_LIGHT_ONLY_SKINS, l as ANIMATION_DEFAULT_PATH, i as CARD_DEFAULTS, a as CHECKBOX_DEFAULTS, c as CONSENT_DEFAULTS, n as DEFAULT_FOOTER_PERSONVERN_URL, r as DEFAULT_FOOTER_TILGJENGELIGHET_URL, e as DEFAULT_HEADER_FOOTER_URL, t as DEFAULT_HEADER_LOGO_LINK, u as ICON_DEFAULTS, f as INPUT_WRAPPER_DEFAULTS, m as MESSAGEBOX_DEFAULTS, s as OPTION_GROUP_DEFAULTS, o as RADIOBUTTON_DEFAULTS, h as SELECT_DEFAULTS, g as TABLE_DEFAULTS, p as TEXTAREA_DEFAULTS };
|
|
@@ -4,18 +4,10 @@
|
|
|
4
4
|
* Type definitions for sizing scales.
|
|
5
5
|
* These represent common size scales used across the design system.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export type
|
|
11
|
-
/**
|
|
12
|
-
* Extended 5-level size scale
|
|
13
|
-
*/
|
|
14
|
-
export type TSize5 = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
15
|
-
/**
|
|
16
|
-
* Full 7-level size scale
|
|
17
|
-
*/
|
|
18
|
-
export type TSize7 = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
7
|
+
export declare const SIZES_BASE: readonly ['small', 'medium', 'large'];
|
|
8
|
+
export type TPktSizeBase = (typeof SIZES_BASE)[number];
|
|
9
|
+
export declare const SIZES: readonly ["xsmall", "small", "medium", "large", "xlarge"];
|
|
10
|
+
export type TPktSize = (typeof SIZES)[number];
|
|
19
11
|
/**
|
|
20
12
|
* Sizes used in our input components — shared runtime source for types, specs, and Preview.
|
|
21
13
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "19.18.
|
|
3
|
+
"version": "19.18.3",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, designsystem for Oslo kommune",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo kommune",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
104
104
|
},
|
|
105
105
|
"license": "MIT",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "f09029c699dc13de6b5a631caa1616e1a6f36e00"
|
|
107
107
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
import { forwardRef, HTMLAttributes, ReactNode, useEffect, useState } from 'react'
|
|
5
|
-
import { ANIMATION_DEFAULT_PATH } from 'shared-types'
|
|
5
|
+
import { ANIMATION_DEFAULT_PATH, type TPktSizeBase } from 'shared-types'
|
|
6
6
|
|
|
7
7
|
import { PktIcon } from '../icon/Icon'
|
|
8
8
|
|
|
@@ -17,7 +17,7 @@ if (typeof window !== 'undefined') {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes'
|
|
20
|
-
export type TPktLoaderSize =
|
|
20
|
+
export type TPktLoaderSize = TPktSizeBase
|
|
21
21
|
|
|
22
22
|
export interface IPktLoader extends HTMLAttributes<HTMLDivElement> {
|
|
23
23
|
/**
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useRef,
|
|
14
14
|
} from 'react'
|
|
15
15
|
|
|
16
|
+
import type { TPktSizeBase } from 'shared-types'
|
|
16
17
|
import type { IPktStringsProps } from 'shared-strings'
|
|
17
18
|
import { createScrollLockToken, setScrollLock } from 'shared-utils/scroll-lock'
|
|
18
19
|
|
|
@@ -29,7 +30,7 @@ export interface IPktModal
|
|
|
29
30
|
headingIconPath?: string
|
|
30
31
|
hideCloseButton?: boolean
|
|
31
32
|
closeOnBackdropClick?: boolean
|
|
32
|
-
size?:
|
|
33
|
+
size?: TPktSizeBase | 'fit-content'
|
|
33
34
|
removePadding?: boolean
|
|
34
35
|
closeButtonSkin?: 'blue' | 'yellow-filled'
|
|
35
36
|
variant?: 'dialog' | 'drawer'
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useState,
|
|
15
15
|
} from 'react'
|
|
16
16
|
|
|
17
|
-
import type { TTagSkin } from 'shared-types'
|
|
17
|
+
import type { TPktSizeBase, TTagSkin } from 'shared-types'
|
|
18
18
|
|
|
19
19
|
import { PktIcon } from '../icon/Icon'
|
|
20
20
|
import { usePktStrings } from '../../hooks/usePktStrings'
|
|
@@ -23,7 +23,7 @@ import { formatString, type IPktStringsProps } from 'shared-strings'
|
|
|
23
23
|
interface BasePktTagProps extends IPktStringsProps<'tag'> {
|
|
24
24
|
skin?: TTagSkin
|
|
25
25
|
textStyle?: 'normal-text' | 'thin-text'
|
|
26
|
-
size?:
|
|
26
|
+
size?: TPktSizeBase
|
|
27
27
|
closeTag?: boolean
|
|
28
28
|
iconName?: string
|
|
29
29
|
ariaLabel?: string
|