canny-ui-react 6.3.2 → 6.4.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.
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface CspNonceProviderProps {
3
+ /**
4
+ * The per-request CSP nonce — the same value carried in the response's
5
+ * `Content-Security-Policy` header. Applied to every scoped `<style>` element
6
+ * the library emits. `undefined` renders those elements without a nonce
7
+ * attribute (identical to having no provider).
8
+ */
9
+ nonce: string | undefined;
10
+ children?: ReactNode;
11
+ }
@@ -0,0 +1,15 @@
1
+ import type { CspNonceProviderProps } from './CspNonce.types';
2
+ /**
3
+ * Supplies the page's CSP nonce to every scoped `<style>` element Canny-UI
4
+ * emits: responsive `sx` on `Box` and on `withSx`-based components (e.g.
5
+ * `Divider`), `CannyLoader`'s keyframes, and the styles Radix overlays inject
6
+ * (the `Select` viewport's scrollbar rule and the scroll lock of every
7
+ * overlay). Under a nonce-based `style-src` / `style-src-elem` policy the
8
+ * browser blocks those elements unless they carry the nonce. Mount once near
9
+ * the root, with the nonce from the response's Content-Security-Policy
10
+ * header. Without a provider the elements render exactly as before (no nonce
11
+ * attribute).
12
+ */
13
+ export declare function CspNonceProvider({ nonce, children }: CspNonceProviderProps): import("react/jsx-runtime").JSX.Element;
14
+ /** The nonce from the nearest `CspNonceProvider`, or `undefined` outside one. */
15
+ export declare function useCspNonce(): string | undefined;
@@ -0,0 +1,2 @@
1
+ export { CspNonceProvider, useCspNonce } from './CspNonceProvider';
2
+ export type { CspNonceProviderProps } from './CspNonce.types';
@@ -67,6 +67,28 @@ export interface DataTableProps<R = Record<string, unknown>> {
67
67
  disableColumnResize?: boolean;
68
68
  /** Row height. `'compact'` halves the vertical cell padding. */
69
69
  density?: DataTableDensity;
70
+ /**
71
+ * Width of the `checkboxSelection` column, in px. Defaults to 44.
72
+ *
73
+ * Worth a prop rather than a CSS override because the value is also what
74
+ * flex columns are sized against under `tableLayout="fixed"` — narrowing the
75
+ * column from a stylesheet leaves the rest of the table computing against
76
+ * the old width.
77
+ */
78
+ checkboxColumnWidth?: number;
79
+ /**
80
+ * Scroll the rows inside the grid, keeping the header row in place.
81
+ *
82
+ * `thead th` is already `position: sticky`, but that only engages when the
83
+ * scrollport is the grid's own scroll element; by default the grid is as tall
84
+ * as its rows and something further up the page scrolls, so the header
85
+ * scrolls away with them. This makes `.cny-dt-scroll` the scrollport.
86
+ *
87
+ * The grid does not give itself a height — bound it from the outside (a
88
+ * `height`/`maxHeight` in `sx`, or a flex parent), or there is nothing for
89
+ * the rows to scroll within.
90
+ */
91
+ stickyHeader?: boolean;
70
92
  /**
71
93
  * Column sizing model. `'auto'` (default) lets the browser size columns to
72
94
  * their content. `'fixed'` uses `table-layout: fixed` and a colgroup built
@@ -8,6 +8,15 @@ export interface PanelProps extends HTMLAttributes<HTMLDivElement> {
8
8
  minSize?: number;
9
9
  /** Maximum size in percent. Default 90. */
10
10
  maxSize?: number;
11
+ /**
12
+ * Style shorthand, as on Box: scalar values merge into inline style, a
13
+ * responsive value injects a scoped class.
14
+ *
15
+ * PanelGroup clones each panel with a style carrying its flex-basis, and
16
+ * withSx lets an explicit style win over sx — so sizing stays the group's
17
+ * to decide and a panel cannot pin its own width through sx.
18
+ */
19
+ sx?: SxProp;
11
20
  }
12
21
  export declare const Panel: import("react").ForwardRefExoticComponent<PanelProps & import("react").RefAttributes<HTMLDivElement>>;
13
22
  interface HandleInternal {