@konce-pt/react 0.14.0 → 0.15.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.
@@ -1,7 +1,10 @@
1
1
  import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
3
- /** Szerokość okna. `md` to wartość domyślna i zarazem jedyna, jaką okno miało wcześniej. */
4
- export type KptDialogSize = 'sm' | 'md' | 'lg';
3
+ /**
4
+ * Szerokość okna. `md` to wartość domyślna i zarazem jedyna, jaką okno miało wcześniej;
5
+ * `full` to cały ekran (bez ramki, zaokrągleń i marginesów).
6
+ */
7
+ export type KptDialogSize = 'sm' | 'md' | 'lg' | 'full';
5
8
  export interface KptDialogProps extends Omit<ComponentPropsWithRef<'dialog'>, 'open' | 'onClose'>, KptI18nOverrides {
6
9
  open: boolean;
7
10
  onOpenChange: (open: boolean) => void;
@@ -9,7 +12,9 @@ export interface KptDialogProps extends Omit<ComponentPropsWithRef<'dialog'>, 'o
9
12
  /**
10
13
  * Szerokość okna: `sm` 24rem, `md` 32rem (domyślna), `lg` 48rem - zawsze przycięta do szerokości
11
14
  * okna przeglądarki. `lg` jest dla treści, której nie da się sensownie zwęzić: kodu, tabeli,
12
- * porównania dwóch kolumn.
15
+ * porównania dwóch kolumn. `full` zajmuje cały ekran, a treść rośnie na całą wysokość - dla
16
+ * podglądu kamery, edytora albo okna, które na telefonie ma być osobnym ekranem
17
+ * (`[size]="phone() ? 'full' : 'md'"`).
13
18
  */
14
19
  size?: KptDialogSize;
15
20
  /** Pozwala zamknąć klawiszem Esc i przyciskiem x. */
@@ -18,6 +18,9 @@ platform, not from our code. Import: `import { KptDialog } from '@konce-pt/react
18
18
  on its own (Escape, the `close` event), and the state has to follow
19
19
  - `header`: string - the title; with no header there is no header row and no x button
20
20
  - `dismissible`: boolean (default true) - allows Escape and shows x
21
+ - `size`: 'sm' | 'md' | 'lg' | 'full' (default 'md') - 24rem / 32rem / 48rem, capped at the viewport;
22
+ `full` covers the whole screen (no border, radius or margin) and the body grows to the full height -
23
+ e.g. `size={phone ? 'full' : 'md'}` for a window that is its own screen on a phone
21
24
  - `className`, `ref` and every other `<dialog>` prop go to the dialog
22
25
 
23
26
  ## Sub-components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konce-pt/react",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Open-source React 19 component library on the Koncept UI design system - the same kpt-* CSS layer and --kpt-* tokens as the Angular port. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "author": "konce.pt",
@@ -65,19 +65,19 @@
65
65
  "leaflet": "^1.9.0"
66
66
  },
67
67
  "dependencies": {
68
- "@konce-pt/chart": "0.14.0",
69
- "@konce-pt/chat": "0.14.0",
70
- "@konce-pt/mention": "0.14.0",
71
- "@konce-pt/i18n": "0.14.0",
72
- "@konce-pt/backdrop": "0.14.0",
73
- "@konce-pt/motion": "0.14.0",
74
- "@konce-pt/icons": "0.14.0",
75
- "@konce-pt/datetime": "0.14.0",
76
- "@konce-pt/table": "0.14.0",
77
- "@konce-pt/speech": "0.14.0",
78
- "@konce-pt/tokens": "0.14.0",
79
- "@konce-pt/roadmap": "0.14.0",
80
- "@konce-pt/map": "0.14.0"
68
+ "@konce-pt/backdrop": "0.15.0",
69
+ "@konce-pt/motion": "0.15.0",
70
+ "@konce-pt/chart": "0.15.0",
71
+ "@konce-pt/icons": "0.15.0",
72
+ "@konce-pt/mention": "0.15.0",
73
+ "@konce-pt/datetime": "0.15.0",
74
+ "@konce-pt/roadmap": "0.15.0",
75
+ "@konce-pt/i18n": "0.15.0",
76
+ "@konce-pt/table": "0.15.0",
77
+ "@konce-pt/tokens": "0.15.0",
78
+ "@konce-pt/chat": "0.15.0",
79
+ "@konce-pt/map": "0.15.0",
80
+ "@konce-pt/speech": "0.15.0"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@types/react": "^19.2.0",