@graphty/compact-mantine 0.9.14 → 0.9.16
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/dist/index.cjs +42 -42
- package/dist/index.d.cts +43 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +1729 -1716
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ import { JSX } from 'react';
|
|
|
9
9
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
10
10
|
import { MantineColorShade } from '@mantine/core';
|
|
11
11
|
import { MantineColorsTuple } from '@mantine/core';
|
|
12
|
+
import { MantineComponent } from '@mantine/core';
|
|
12
13
|
import { MantineRadius } from '@mantine/core';
|
|
13
14
|
import { MantineTheme } from '@mantine/core';
|
|
14
15
|
import { MantineThemeOverride } from '@mantine/core';
|
|
@@ -22,6 +23,10 @@ import { ReactNode } from 'react';
|
|
|
22
23
|
import { ReactPortal } from 'react';
|
|
23
24
|
import { RefAttributes } from 'react';
|
|
24
25
|
import { RefObject } from 'react';
|
|
26
|
+
import { ScrollAreaAutosizeProps } from '@mantine/core';
|
|
27
|
+
import { ScrollAreaCssVariables } from '@mantine/core';
|
|
28
|
+
import { ScrollAreaProps as ScrollAreaProps_2 } from '@mantine/core';
|
|
29
|
+
import { ScrollAreaStylesNames } from '@mantine/core';
|
|
25
30
|
import { SegmentedControl as SegmentedControl_2 } from '@mantine/core';
|
|
26
31
|
import { SyntheticEvent } from 'react';
|
|
27
32
|
import { TextInputProps } from '@mantine/core';
|
|
@@ -1146,6 +1151,23 @@ export declare interface CompactMantineLabels {
|
|
|
1146
1151
|
ordinal: (value: string, rule: Intl.LDMLPluralRule) => string;
|
|
1147
1152
|
}
|
|
1148
1153
|
|
|
1154
|
+
/**
|
|
1155
|
+
* Mantine's ScrollArea with an opt-in keyboard stop on its viewport (`focusableViewport`). Without
|
|
1156
|
+
* that prop it is exactly Mantine's component, themed by this package. `ScrollArea.Autosize` is
|
|
1157
|
+
* Mantine's.
|
|
1158
|
+
* @param props - Mantine's ScrollArea props, plus `focusableViewport`
|
|
1159
|
+
* @param props.focusableViewport - make the viewport a Tab stop (default false)
|
|
1160
|
+
* @param props.viewportProps - Mantine's viewport props; a `tabIndex` here wins
|
|
1161
|
+
* @returns The scroll area
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```tsx
|
|
1164
|
+
* <ScrollArea h={240} focusableViewport>
|
|
1165
|
+
* {rows}
|
|
1166
|
+
* </ScrollArea>
|
|
1167
|
+
* ```
|
|
1168
|
+
*/
|
|
1169
|
+
declare function CompactScrollArea({ focusableViewport, viewportProps, ...props }: Readonly<ScrollAreaProps>): default_2.JSX.Element;
|
|
1170
|
+
|
|
1149
1171
|
/**
|
|
1150
1172
|
* The full Mantine theme at Figma defaults, merged with DEFAULT_THEME.
|
|
1151
1173
|
* @example
|
|
@@ -5457,6 +5479,27 @@ export declare interface ResultRowProps extends Omit<default_2.HTMLAttributes<HT
|
|
|
5457
5479
|
/** The rows and columns of the matrix, top to bottom and left to right. */
|
|
5458
5480
|
declare const ROWS: readonly ["top", "middle", "bottom"];
|
|
5459
5481
|
|
|
5482
|
+
export declare const ScrollArea: typeof CompactScrollArea & {
|
|
5483
|
+
Autosize: MantineComponent< {
|
|
5484
|
+
props: ScrollAreaAutosizeProps;
|
|
5485
|
+
ref: HTMLDivElement;
|
|
5486
|
+
stylesNames: ScrollAreaStylesNames;
|
|
5487
|
+
vars: ScrollAreaCssVariables;
|
|
5488
|
+
}>;
|
|
5489
|
+
};
|
|
5490
|
+
|
|
5491
|
+
/** Mantine's ScrollArea props, plus `focusableViewport`. */
|
|
5492
|
+
export declare interface ScrollAreaProps extends ScrollAreaProps_2 {
|
|
5493
|
+
/**
|
|
5494
|
+
* Make the viewport a Tab stop (`tabIndex={0}`), so a reader can scroll it with the arrow and
|
|
5495
|
+
* page keys. Turn it on when nothing inside the scroller can take focus: otherwise a keyboard
|
|
5496
|
+
* reader cannot reach the content below the fold (WCAG 2.1.1). Keyboard focus draws a 1px ring
|
|
5497
|
+
* inside the viewport and shows the thumb. Off by default, so the viewport stays out of the
|
|
5498
|
+
* Tab order exactly as in Mantine. A `tabIndex` passed in `viewportProps` wins.
|
|
5499
|
+
*/
|
|
5500
|
+
focusableViewport?: boolean;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5460
5503
|
/**
|
|
5461
5504
|
* A search field (design/figma-spec.md 6.2): a filled 24px field with a leading magnifier, a clear
|
|
5462
5505
|
* button once there is text, and a focus ring drawn flush with the field that lingers 100ms after
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { JSX } from 'react';
|
|
|
9
9
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
10
10
|
import { MantineColorShade } from '@mantine/core';
|
|
11
11
|
import { MantineColorsTuple } from '@mantine/core';
|
|
12
|
+
import { MantineComponent } from '@mantine/core';
|
|
12
13
|
import { MantineRadius } from '@mantine/core';
|
|
13
14
|
import { MantineTheme } from '@mantine/core';
|
|
14
15
|
import { MantineThemeOverride } from '@mantine/core';
|
|
@@ -22,6 +23,10 @@ import { ReactNode } from 'react';
|
|
|
22
23
|
import { ReactPortal } from 'react';
|
|
23
24
|
import { RefAttributes } from 'react';
|
|
24
25
|
import { RefObject } from 'react';
|
|
26
|
+
import { ScrollAreaAutosizeProps } from '@mantine/core';
|
|
27
|
+
import { ScrollAreaCssVariables } from '@mantine/core';
|
|
28
|
+
import { ScrollAreaProps as ScrollAreaProps_2 } from '@mantine/core';
|
|
29
|
+
import { ScrollAreaStylesNames } from '@mantine/core';
|
|
25
30
|
import { SegmentedControl as SegmentedControl_2 } from '@mantine/core';
|
|
26
31
|
import { SyntheticEvent } from 'react';
|
|
27
32
|
import { TextInputProps } from '@mantine/core';
|
|
@@ -1146,6 +1151,23 @@ export declare interface CompactMantineLabels {
|
|
|
1146
1151
|
ordinal: (value: string, rule: Intl.LDMLPluralRule) => string;
|
|
1147
1152
|
}
|
|
1148
1153
|
|
|
1154
|
+
/**
|
|
1155
|
+
* Mantine's ScrollArea with an opt-in keyboard stop on its viewport (`focusableViewport`). Without
|
|
1156
|
+
* that prop it is exactly Mantine's component, themed by this package. `ScrollArea.Autosize` is
|
|
1157
|
+
* Mantine's.
|
|
1158
|
+
* @param props - Mantine's ScrollArea props, plus `focusableViewport`
|
|
1159
|
+
* @param props.focusableViewport - make the viewport a Tab stop (default false)
|
|
1160
|
+
* @param props.viewportProps - Mantine's viewport props; a `tabIndex` here wins
|
|
1161
|
+
* @returns The scroll area
|
|
1162
|
+
* @example
|
|
1163
|
+
* ```tsx
|
|
1164
|
+
* <ScrollArea h={240} focusableViewport>
|
|
1165
|
+
* {rows}
|
|
1166
|
+
* </ScrollArea>
|
|
1167
|
+
* ```
|
|
1168
|
+
*/
|
|
1169
|
+
declare function CompactScrollArea({ focusableViewport, viewportProps, ...props }: Readonly<ScrollAreaProps>): default_2.JSX.Element;
|
|
1170
|
+
|
|
1149
1171
|
/**
|
|
1150
1172
|
* The full Mantine theme at Figma defaults, merged with DEFAULT_THEME.
|
|
1151
1173
|
* @example
|
|
@@ -5457,6 +5479,27 @@ export declare interface ResultRowProps extends Omit<default_2.HTMLAttributes<HT
|
|
|
5457
5479
|
/** The rows and columns of the matrix, top to bottom and left to right. */
|
|
5458
5480
|
declare const ROWS: readonly ["top", "middle", "bottom"];
|
|
5459
5481
|
|
|
5482
|
+
export declare const ScrollArea: typeof CompactScrollArea & {
|
|
5483
|
+
Autosize: MantineComponent< {
|
|
5484
|
+
props: ScrollAreaAutosizeProps;
|
|
5485
|
+
ref: HTMLDivElement;
|
|
5486
|
+
stylesNames: ScrollAreaStylesNames;
|
|
5487
|
+
vars: ScrollAreaCssVariables;
|
|
5488
|
+
}>;
|
|
5489
|
+
};
|
|
5490
|
+
|
|
5491
|
+
/** Mantine's ScrollArea props, plus `focusableViewport`. */
|
|
5492
|
+
export declare interface ScrollAreaProps extends ScrollAreaProps_2 {
|
|
5493
|
+
/**
|
|
5494
|
+
* Make the viewport a Tab stop (`tabIndex={0}`), so a reader can scroll it with the arrow and
|
|
5495
|
+
* page keys. Turn it on when nothing inside the scroller can take focus: otherwise a keyboard
|
|
5496
|
+
* reader cannot reach the content below the fold (WCAG 2.1.1). Keyboard focus draws a 1px ring
|
|
5497
|
+
* inside the viewport and shows the thumb. Off by default, so the viewport stays out of the
|
|
5498
|
+
* Tab order exactly as in Mantine. A `tabIndex` passed in `viewportProps` wins.
|
|
5499
|
+
*/
|
|
5500
|
+
focusableViewport?: boolean;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5460
5503
|
/**
|
|
5461
5504
|
* A search field (design/figma-spec.md 6.2): a filled 24px field with a leading magnifier, a clear
|
|
5462
5505
|
* button once there is text, and a focus ring drawn flush with the field that lingers 100ms after
|