@cratis/components 4.7.0 → 4.9.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/dist/esm/Common/Breadcrumbs.d.ts +48 -0
- package/dist/esm/Common/Breadcrumbs.d.ts.map +1 -0
- package/dist/esm/Common/Breadcrumbs.js +11 -0
- package/dist/esm/Common/Breadcrumbs.js.map +1 -0
- package/dist/esm/Common/ErrorBoundary.d.ts +44 -38
- package/dist/esm/Common/ErrorBoundary.d.ts.map +1 -1
- package/dist/esm/Common/ErrorBoundary.js +23 -11
- package/dist/esm/Common/ErrorBoundary.js.map +1 -1
- package/dist/esm/Common/Tabs.d.ts +59 -0
- package/dist/esm/Common/Tabs.d.ts.map +1 -0
- package/dist/esm/Common/Tabs.js +8 -0
- package/dist/esm/Common/Tabs.js.map +1 -0
- package/dist/esm/Common/TagGroup.d.ts +68 -0
- package/dist/esm/Common/TagGroup.d.ts.map +1 -0
- package/dist/esm/Common/TagGroup.js +53 -0
- package/dist/esm/Common/TagGroup.js.map +1 -0
- package/dist/esm/Common/ToggleGroup.d.ts +62 -0
- package/dist/esm/Common/ToggleGroup.d.ts.map +1 -0
- package/dist/esm/Common/ToggleGroup.js +12 -0
- package/dist/esm/Common/ToggleGroup.js.map +1 -0
- package/dist/esm/Common/index.d.ts +4 -0
- package/dist/esm/Common/index.js +4 -0
- package/dist/esm/Common/index.js.map +1 -1
- package/dist/esm/Dropdown/DropdownImplementation.js +22 -8
- package/dist/esm/Dropdown/DropdownImplementation.js.map +1 -1
- package/dist/esm/Dropdown/observeLabelAssociations.d.ts +9 -0
- package/dist/esm/Dropdown/observeLabelAssociations.d.ts.map +1 -0
- package/dist/esm/Dropdown/observeLabelAssociations.js +43 -0
- package/dist/esm/Dropdown/observeLabelAssociations.js.map +1 -0
- package/dist/esm/Dropdown/useExternalLabel.d.ts +6 -0
- package/dist/esm/Dropdown/useExternalLabel.d.ts.map +1 -0
- package/dist/esm/Dropdown/useExternalLabel.js +30 -0
- package/dist/esm/Dropdown/useExternalLabel.js.map +1 -0
- package/dist/esm/renderer/RendererContext.js +3 -20
- package/dist/esm/renderer/RendererContext.js.map +1 -1
- package/dist/esm/styles.css +201 -9
- package/dist/esm/types/parts.d.ts +29 -0
- package/dist/esm/types/parts.d.ts.map +1 -1
- package/dist/esm/types/parts.js +29 -0
- package/dist/esm/types/parts.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/** Attributes a consumer may hand to one {@link Breadcrumbs} part: class, style, title and data attributes. */
|
|
3
|
+
export type BreadcrumbsPartAttributes = Pick<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'title'> & {
|
|
4
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** One segment of a {@link Breadcrumbs} trail. */
|
|
7
|
+
export interface BreadcrumbItem {
|
|
8
|
+
/** Visible label. */
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
/** Destination. A segment without one is text rather than a link — as the last segment is. */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** Called instead of navigating, for a router that owns navigation. */
|
|
13
|
+
onNavigate?: () => void;
|
|
14
|
+
}
|
|
15
|
+
/** Stable Cratis-owned parts for styling a {@link Breadcrumbs} trail. */
|
|
16
|
+
export interface BreadcrumbsParts {
|
|
17
|
+
/** The navigation landmark wrapping the trail. */
|
|
18
|
+
root?: BreadcrumbsPartAttributes;
|
|
19
|
+
/** One segment. */
|
|
20
|
+
item?: BreadcrumbsPartAttributes;
|
|
21
|
+
/** A segment's link, rendered for every segment that is not the current page. */
|
|
22
|
+
link?: BreadcrumbsPartAttributes;
|
|
23
|
+
/** The separator between two segments. */
|
|
24
|
+
separator?: BreadcrumbsPartAttributes;
|
|
25
|
+
}
|
|
26
|
+
/** Props for {@link Breadcrumbs}. */
|
|
27
|
+
export interface BreadcrumbsProps {
|
|
28
|
+
/** The trail, outermost first. The last item is the current page. */
|
|
29
|
+
items: BreadcrumbItem[];
|
|
30
|
+
/** Separator rendered between segments. Defaults to a slash; decorative either way. */
|
|
31
|
+
separator?: ReactNode;
|
|
32
|
+
/** Accessible name for the landmark. Name it when a page carries more than one trail. */
|
|
33
|
+
'aria-label'?: string;
|
|
34
|
+
/** Extra class name for the root element. */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Cratis-owned per-part attributes. */
|
|
37
|
+
pt?: BreadcrumbsParts;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A breadcrumb trail.
|
|
41
|
+
*
|
|
42
|
+
* The last segment is the current page: it carries `aria-current="page"` and is never a link, which
|
|
43
|
+
* is what tells a screen-reader user where the trail ends. Earlier segments are links when they have
|
|
44
|
+
* a destination. The trail is an ordered list inside a navigation landmark, so it can be jumped to
|
|
45
|
+
* and its length announced.
|
|
46
|
+
*/
|
|
47
|
+
export declare const Breadcrumbs: ({ items, separator, 'aria-label': ariaLabel, className, pt, }: BreadcrumbsProps) => import("react").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=Breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../../Common/Breadcrumbs.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS5D,+GAA+G;AAC/G,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,cAAc,CAAC,WAAW,CAAC,EAC3B,WAAW,GAAG,OAAO,GAAG,OAAO,CAClC,GAAG;IACA,CAAC,aAAa,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC3B,qBAAqB;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,yEAAyE;AACzE,MAAM,WAAW,gBAAgB;IAC7B,kDAAkD;IAClD,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,mBAAmB;IACnB,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,iFAAiF;IACjF,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACzC;AAQD,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC7B,qEAAqE;IACrE,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,uFAAuF;IACvF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAKD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,kEAMrB,gBAAgB,gCAuDlB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link } from 'react-aria-components/Breadcrumbs';
|
|
3
|
+
|
|
4
|
+
const classNames = (...values) => values.filter(Boolean).join(' ');
|
|
5
|
+
const Breadcrumbs = ({ items, separator = '/', 'aria-label': ariaLabel, className, pt, }) => (jsx("nav", { "aria-label": ariaLabel, children: jsx(Breadcrumbs$1, { ...pt?.root, className: classNames('cratis-breadcrumbs', pt?.root?.className, className), "data-cratis-part": 'root', children: items.map((item, index) => {
|
|
6
|
+
const current = index === items.length - 1;
|
|
7
|
+
return (jsxs(Breadcrumb, { ...pt?.item, className: classNames('cratis-breadcrumbs__item', pt?.item?.className), "data-cratis-part": 'item', "data-selected": current || undefined, children: [jsx(Link, { ...pt?.link, href: current ? undefined : item.href, onPress: current ? undefined : item.onNavigate, className: classNames('cratis-breadcrumbs__link', pt?.link?.className), "data-cratis-part": 'link', "data-selected": current || undefined, children: item.label }), !current && (jsx("span", { ...pt?.separator, "aria-hidden": 'true', className: classNames('cratis-breadcrumbs__separator', pt?.separator?.className), "data-cratis-part": 'separator', children: separator }))] }, `${index}-${String(item.href ?? '')}`));
|
|
8
|
+
}) }) }));
|
|
9
|
+
|
|
10
|
+
export { Breadcrumbs };
|
|
11
|
+
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../../../Common/Breadcrumbs.tsx"],"sourcesContent":[null],"names":["_jsx","AriaBreadcrumbs","_jsxs","AriaBreadcrumb","AriaLink"],"mappings":";;;AA8DA,MAAM,UAAU,GAAG,CAAC,GAAG,MAAiC,KACpD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAU7B,MAAM,WAAW,GAAG,CAAC,EACxB,KAAK,EACL,SAAS,GAAG,GAAG,EACf,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,EAAE,GACa,MAGfA,GAAA,CAAA,KAAA,EAAA,EAAA,YAAA,EAAiB,SAAS,EAAA,QAAA,EACtBA,GAAA,CAACC,aAAe,EAAA,EAAA,GACR,EAAE,EAAE,IAAI,EACZ,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,EAAA,kBAAA,EAC1D,MAAM,EAAA,QAAA,EAE1B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;YACvB,MAAM,OAAO,GAAG,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC;AAC1C,YAAA,QACIC,IAAA,CAACC,UAAc,EAAA,EAAA,GAEP,EAAE,EAAE,IAAI,EACZ,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC,EAAA,kBAAA,EACrD,MAAM,EAAA,eAAA,EACR,OAAO,IAAI,SAAS,EAAA,QAAA,EAAA,CAOnCH,GAAA,CAACI,IAAQ,EAAA,EAAA,GACD,EAAE,EAAE,IAAI,EACZ,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,IAAI,EACrC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,UAAU,EAC9C,SAAS,EAAE,UAAU,CACjB,0BAA0B,EAC1B,EAAE,EAAE,IAAI,EAAE,SAAS,CACtB,EAAA,kBAAA,EACgB,MAAM,EAAA,eAAA,EACR,OAAO,IAAI,SAAS,EAAA,QAAA,EAElC,IAAI,CAAC,KAAK,EAAA,CACJ,EACV,CAAC,OAAO,KACLJ,GAAA,CAAA,MAAA,EAAA,EAAA,GACQ,EAAE,EAAE,SAAS,EAAA,aAAA,EACL,MAAM,EAClB,SAAS,EAAE,UAAU,CACjB,+BAA+B,EAC/B,EAAE,EAAE,SAAS,EAAE,SAAS,CAC3B,EAAA,kBAAA,EACgB,WAAW,EAAA,QAAA,EAE3B,SAAS,EAAA,CACP,CACV,CAAA,EAAA,EApCI,CAAA,EAAG,KAAK,CAAA,CAAA,EAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA,CAAE,CAqC7B;AAErB,QAAA,CAAC,CAAC,EAAA,CACY,EAAA,CAChB;;"}
|
|
@@ -1,61 +1,67 @@
|
|
|
1
|
-
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
interface Props {
|
|
6
|
-
/** The subtree the boundary protects. Rendered as-is when no error is caught. */
|
|
1
|
+
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
2
|
+
/** Props for {@link ErrorBoundary}. */
|
|
3
|
+
export interface ErrorBoundaryProps {
|
|
4
|
+
/** The subtree to protect. Rendered unchanged until a descendant fails. */
|
|
7
5
|
children: ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Replaces the default message and retry button. A render callback receives only a reset
|
|
8
|
+
* action, not error diagnostics. Use it for localized content and application-specific
|
|
9
|
+
* recovery. An explicit `null` renders nothing; omission uses the default fallback.
|
|
10
|
+
*/
|
|
11
|
+
fallback?: ReactNode | ((reset: () => void) => ReactNode);
|
|
12
|
+
/**
|
|
13
|
+
* Receives the thrown value and React component stack for application-controlled reporting.
|
|
14
|
+
* Replaces this boundary's default console reporter, but not React's own error reporting.
|
|
15
|
+
* Diagnostics may contain sensitive data; do not display them in the fallback.
|
|
16
|
+
*/
|
|
17
|
+
onError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Runs synchronously before a user-requested retry so the host can clear the cause of the
|
|
20
|
+
* failure. Retry remounts only this boundary's children; it does not reload the page.
|
|
21
|
+
*/
|
|
22
|
+
onReset?: () => void;
|
|
8
23
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Internal state captured when a child throws during render or commit.
|
|
11
|
-
*/
|
|
24
|
+
/** Internal render state for the boundary; error diagnostics never enter its fallback state. */
|
|
12
25
|
interface State {
|
|
13
|
-
/**
|
|
26
|
+
/** Whether to show the fallback instead of the protected subtree. */
|
|
14
27
|
hasError: boolean;
|
|
15
|
-
/** The thrown error. Held so the fallback UI can show message and stack. */
|
|
16
|
-
error: Error;
|
|
17
28
|
}
|
|
18
29
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* working instead of crashing the whole tree.
|
|
30
|
+
* Isolates descendant render/lifecycle errors behind a safe message and a user-triggered retry.
|
|
31
|
+
* The default fallback never displays the thrown value or its stack. Diagnostics go to
|
|
32
|
+
* {@link ErrorBoundaryProps.onError}, or the console when no reporter is supplied.
|
|
23
33
|
*
|
|
24
|
-
*
|
|
34
|
+
* Retry remounts children, discarding their local state but preserving the surrounding app.
|
|
35
|
+
* A persistent failure returns to the fallback; there is no automatic retry loop. Errors in
|
|
36
|
+
* event handlers, asynchronous work, server rendering, or this boundary itself are not caught.
|
|
25
37
|
*
|
|
38
|
+
* @example
|
|
26
39
|
* ```tsx
|
|
27
40
|
* <ErrorBoundary>
|
|
28
41
|
* <RiskyFeature />
|
|
29
42
|
* </ErrorBoundary>
|
|
30
43
|
* ```
|
|
31
|
-
*
|
|
32
|
-
* Use one boundary per logical UI region rather than a single root-level one,
|
|
33
|
-
* so failures stay scoped to the feature that caused them.
|
|
34
44
|
*/
|
|
35
|
-
export declare class ErrorBoundary extends Component<
|
|
36
|
-
/**
|
|
45
|
+
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, State> {
|
|
46
|
+
/** Starts with the protected content visible. */
|
|
37
47
|
state: State;
|
|
38
48
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* @param error - The error thrown by the descendant.
|
|
49
|
+
* Switches to the fallback without inspecting or retaining the thrown value.
|
|
50
|
+
* @param _error - The value thrown by a descendant, which need not be an Error instance.
|
|
51
|
+
* @returns The render state used for the safe fallback.
|
|
43
52
|
*/
|
|
44
|
-
static getDerivedStateFromError(
|
|
53
|
+
static getDerivedStateFromError(_error: unknown): State;
|
|
45
54
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* @param error - The error thrown by the descendant.
|
|
51
|
-
* @param errorInfo - React-supplied metadata including the component stack.
|
|
55
|
+
* Reports a caught failure without placing diagnostics in the rendered markup.
|
|
56
|
+
* @param error - The value thrown by a descendant.
|
|
57
|
+
* @param errorInfo - React's component stack information.
|
|
52
58
|
*/
|
|
53
|
-
componentDidCatch(error:
|
|
59
|
+
componentDidCatch(error: unknown, errorInfo: ErrorInfo): void;
|
|
60
|
+
private reset;
|
|
54
61
|
/**
|
|
55
|
-
* Renders the
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @returns The protected subtree or the fallback error content.
|
|
62
|
+
* Renders the children or the safe recovery UI. Native fallback markup deliberately avoids
|
|
63
|
+
* depending on a renderer/provider that may itself have caused the descendant failure.
|
|
64
|
+
* @returns The protected content or the configured fallback.
|
|
59
65
|
*/
|
|
60
66
|
render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
61
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../Common/ErrorBoundary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IAC/B,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC,CAAC;IAC1D;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACzD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,gGAAgG;AAChG,UAAU,KAAK;IACX,qEAAqE;IACrE,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC;IACnE,iDAAiD;IAC1C,KAAK,EAAE,KAAK,CAAuB;IAE1C;;;;OAIG;IACH,OAAc,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAE7D;IAED;;;;OAIG;IACI,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,QAM5D;IAED,OAAO,CAAC,KAAK,CAIX;IAEF;;;;OAIG;IACI,MAAM,gUAeZ;CACJ"}
|
|
@@ -2,21 +2,33 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
|
|
4
4
|
class ErrorBoundary extends Component {
|
|
5
|
-
state = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
static getDerivedStateFromError(error) {
|
|
10
|
-
return { hasError: true, error: error };
|
|
5
|
+
state = { hasError: false };
|
|
6
|
+
static getDerivedStateFromError(_error) {
|
|
7
|
+
return { hasError: true };
|
|
11
8
|
}
|
|
12
9
|
componentDidCatch(error, errorInfo) {
|
|
13
|
-
|
|
10
|
+
if (this.props.onError) {
|
|
11
|
+
this.props.onError(error, errorInfo);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
console.error('Uncaught error:', error, errorInfo);
|
|
15
|
+
}
|
|
14
16
|
}
|
|
17
|
+
reset = () => {
|
|
18
|
+
if (!this.state.hasError)
|
|
19
|
+
return;
|
|
20
|
+
this.props.onReset?.();
|
|
21
|
+
this.setState({ hasError: false });
|
|
22
|
+
};
|
|
15
23
|
render() {
|
|
16
|
-
if (this.state.hasError)
|
|
17
|
-
return
|
|
18
|
-
}
|
|
19
|
-
|
|
24
|
+
if (!this.state.hasError)
|
|
25
|
+
return this.props.children;
|
|
26
|
+
const { fallback } = this.props;
|
|
27
|
+
if (typeof fallback === 'function')
|
|
28
|
+
return fallback(this.reset);
|
|
29
|
+
if (fallback !== undefined)
|
|
30
|
+
return fallback;
|
|
31
|
+
return (jsxs("div", { className: 'cratis:p-4', role: 'alert', children: [jsx("p", { children: "Something went wrong. Please try again." }), jsx("button", { type: 'button', className: 'cratis-button', onClick: this.reset, children: "Try again" })] }));
|
|
20
32
|
}
|
|
21
33
|
}
|
|
22
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":["../../../Common/ErrorBoundary.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":["../../../Common/ErrorBoundary.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;AAkDM,MAAO,aAAc,SAAQ,SAAoC,CAAA;AAE5D,IAAA,KAAK,GAAU,EAAE,QAAQ,EAAE,KAAK,EAAE;IAOlC,OAAO,wBAAwB,CAAC,MAAe,EAAA;AAClD,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7B;IAOO,iBAAiB,CAAC,KAAc,EAAE,SAAoB,EAAA;AACzD,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YACpB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC;QACxC;aAAO;YACH,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC;QACtD;IACJ;IAEQ,KAAK,GAAG,MAAK;AACjB,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE;AAC1B,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI;QACtB,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACtC,IAAA,CAAC;IAOM,MAAM,GAAA;AACT,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;AAAE,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;AAEpD,QAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,KAAK;QAC/B,IAAI,OAAO,QAAQ,KAAK,UAAU;AAAE,YAAA,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC/D,IAAI,QAAQ,KAAK,SAAS;AAAE,YAAA,OAAO,QAAQ;AAE3C,QAAA,QACIA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,EAAA,QAAA,EAAA,CACpCC,GAAA,CAAA,GAAA,EAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,CAA8C,EAC9CA,GAAA,CAAA,QAAA,EAAA,EAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAA,QAAA,EAAA,WAAA,EAAA,CAE1D,CAAA,EAAA,CACP;IAEd;AACH;;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/** Attributes a consumer may hand to one {@link Tabs} part: class, style, title and data attributes. */
|
|
3
|
+
export type TabsPartAttributes = Pick<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'title'> & {
|
|
4
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** One tab in a {@link Tabs} set. */
|
|
7
|
+
export interface TabItem {
|
|
8
|
+
/** Value identifying this tab. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Visible label. */
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
/** Content revealed when this tab is selected. */
|
|
13
|
+
content: ReactNode;
|
|
14
|
+
/** Whether the tab cannot be selected. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Stable Cratis-owned parts for styling a {@link Tabs} set. */
|
|
18
|
+
export interface TabsParts {
|
|
19
|
+
/** The element wrapping list and panels. */
|
|
20
|
+
root?: TabsPartAttributes;
|
|
21
|
+
/** The tab list. */
|
|
22
|
+
list?: TabsPartAttributes;
|
|
23
|
+
/** One tab. */
|
|
24
|
+
tab?: TabsPartAttributes;
|
|
25
|
+
/** One panel. */
|
|
26
|
+
panel?: TabsPartAttributes;
|
|
27
|
+
}
|
|
28
|
+
/** Props for {@link Tabs}. */
|
|
29
|
+
export interface TabsProps {
|
|
30
|
+
/** The tabs, in display order. */
|
|
31
|
+
tabs: TabItem[];
|
|
32
|
+
/** Id of the selected tab. */
|
|
33
|
+
value: string;
|
|
34
|
+
/** Called with the newly selected tab's id. */
|
|
35
|
+
onChange: (value: string) => void;
|
|
36
|
+
/** Whether every tab is disabled. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/** Accessible name for the tab list, when no visible heading names it. */
|
|
39
|
+
'aria-label'?: string;
|
|
40
|
+
/** Id of the element naming the tab list. */
|
|
41
|
+
'aria-labelledby'?: string;
|
|
42
|
+
/** Extra class name for the root element. */
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Cratis-owned per-part attributes. */
|
|
45
|
+
pt?: TabsParts;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A tab set: a list of tabs, each optionally revealing a panel.
|
|
49
|
+
*
|
|
50
|
+
* Arrow keys move between tabs and Home/End jump to the ends, with one tab stop for the whole list,
|
|
51
|
+
* which is what the `tablist` role promises and a row of ordinary buttons does not keep. Each tab is
|
|
52
|
+
* wired to its panel through `aria-controls`.
|
|
53
|
+
*
|
|
54
|
+
* Every tab owns a panel: the selected tab points at one, so a tab set without panels would name an
|
|
55
|
+
* element that is not there. When the choice drives a view rendered elsewhere it is a *value* rather
|
|
56
|
+
* than a panel — reach for `ToggleGroup`, which says so to assistive technology.
|
|
57
|
+
*/
|
|
58
|
+
export declare const Tabs: ({ tabs, value, onChange, disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, className, pt, }: TabsProps) => import("react").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A0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,SAAS,CAAC;CAClB;AAKD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,oHASd,SAAS,gCA6CX,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Tabs as Tabs$1, TabList, Tab, TabPanel } from 'react-aria-components/Tabs';
|
|
3
|
+
|
|
4
|
+
const classNames = (...values) => values.filter(Boolean).join(' ');
|
|
5
|
+
const Tabs = ({ tabs, value, onChange, disabled = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, className, pt, }) => (jsxs(Tabs$1, { ...pt?.root, selectedKey: value, onSelectionChange: (key) => onChange(String(key)), isDisabled: disabled, className: classNames('cratis-tabs', pt?.root?.className, className), "data-cratis-part": 'root', "data-disabled": disabled || undefined, children: [jsx(TabList, { ...pt?.list, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: classNames('cratis-tabs__list', pt?.list?.className), "data-cratis-part": 'list', children: tabs.map((tab) => (jsx(Tab, { ...pt?.tab, id: tab.id, isDisabled: tab.disabled, className: classNames('cratis-tabs__tab', pt?.tab?.className), "data-cratis-part": 'tab', "data-selected": tab.id === value || undefined, "data-disabled": disabled || tab.disabled || undefined, children: tab.label }, tab.id))) }), tabs.map((tab) => (jsx(TabPanel, { ...pt?.panel, id: tab.id, className: classNames('cratis-tabs__panel', pt?.panel?.className), "data-cratis-part": 'panel', "data-selected": tab.id === value || undefined, children: tab.content }, tab.id)))] }));
|
|
6
|
+
|
|
7
|
+
export { Tabs };
|
|
8
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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,SAAS,CAAC,EAAA,kBAAA,EAC5C,KAAK,EAAA,eAAA,EACP,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,SAAS,EAAA,eAAA,EAC7B,QAAQ,IAAI,GAAG,CAAC,QAAQ,IAAI,SAAS,EAAA,QAAA,EAEnD,GAAG,CAAC,KAAK,EAAA,EATL,GAAG,CAAC,EAAE,CAUL,CACb,CAAC,EAAA,CACQ,EACb,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,MACVF,GAAA,CAACG,QAAY,EAAA,EAAA,GAEL,EAAE,EAAE,KAAK,EACb,EAAE,EAAE,GAAG,CAAC,EAAE,EACV,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAA,kBAAA,EAChD,OAAO,EAAA,eAAA,EACT,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,SAAS,EAAA,QAAA,EAE3C,GAAG,CAAC,OAAO,EAAA,EAPP,GAAG,CAAC,EAAE,CAQA,CAClB,CAAC,CAAA,EAAA,CACK;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type HTMLAttributes, type InputHTMLAttributes } from 'react';
|
|
2
|
+
/** Attributes a consumer may hand to one {@link TagGroup} part: class, style, title and data attributes. */
|
|
3
|
+
export type TagGroupPartAttributes = Pick<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'title'> & {
|
|
4
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** Stable Cratis-owned parts for styling a {@link TagGroup}. */
|
|
7
|
+
export interface TagGroupParts {
|
|
8
|
+
/** The element wrapping the tags and the entry. */
|
|
9
|
+
root?: TagGroupPartAttributes;
|
|
10
|
+
/** The tag list. */
|
|
11
|
+
list?: TagGroupPartAttributes;
|
|
12
|
+
/** One tag. */
|
|
13
|
+
tag?: TagGroupPartAttributes;
|
|
14
|
+
/** A tag's remove button. */
|
|
15
|
+
remove?: TagGroupPartAttributes;
|
|
16
|
+
/** The text entry that adds a value. */
|
|
17
|
+
input?: InputHTMLAttributes<HTMLInputElement>;
|
|
18
|
+
}
|
|
19
|
+
/** Props for {@link TagGroup}. */
|
|
20
|
+
export interface TagGroupProps {
|
|
21
|
+
/** Current values, in display order. */
|
|
22
|
+
value: string[];
|
|
23
|
+
/** Called with the next list whenever a value is added or removed. */
|
|
24
|
+
onChange: (value: string[]) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Whether a text entry is offered for adding values. A group without one is a read-only display
|
|
27
|
+
* of removable tags.
|
|
28
|
+
*/
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
/** Placeholder for the text entry. */
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Characters that commit the typed value in addition to Enter. Defaults to a comma. A pasted
|
|
34
|
+
* string is split on the same separators, so pasting a comma-separated list adds each value.
|
|
35
|
+
*/
|
|
36
|
+
separators?: string[];
|
|
37
|
+
/** Whether a duplicate of an existing value is accepted. Defaults to `false`. */
|
|
38
|
+
allowDuplicates?: boolean;
|
|
39
|
+
/** Whether the whole control is disabled. */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/** Accessible name for the group. */
|
|
42
|
+
'aria-label'?: string;
|
|
43
|
+
/** Id of the element naming the group. */
|
|
44
|
+
'aria-labelledby'?: string;
|
|
45
|
+
/** Id of the element describing the control — typically a field's error or hint text. */
|
|
46
|
+
'aria-describedby'?: string;
|
|
47
|
+
/** Marks the text entry invalid for assistive technology. */
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
/** Id forwarded to the text entry so an external `<label htmlFor>` associates with it. */
|
|
50
|
+
id?: string;
|
|
51
|
+
/** Accessible label for a tag's remove button. Receives the tag's value. */
|
|
52
|
+
removeLabel?: (value: string) => string;
|
|
53
|
+
/** Extra class name for the root element. */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Cratis-owned per-part attributes. */
|
|
56
|
+
pt?: TagGroupParts;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A group of removable values with an optional text entry — the control behind a tag or chips field.
|
|
60
|
+
*
|
|
61
|
+
* Every tag is reachable with the arrow keys and removable with Backspace or Delete, which is what
|
|
62
|
+
* the `grid`/`row` semantics React Aria gives a tag group promise; a row of `<span>`s with a close
|
|
63
|
+
* button cannot be operated from the keyboard at all. In the entry, Enter and each configured
|
|
64
|
+
* separator commit the typed value, Backspace on an empty entry removes the last tag, and a pasted
|
|
65
|
+
* string is split on the separators.
|
|
66
|
+
*/
|
|
67
|
+
export declare const TagGroup: ({ value, onChange, editable, placeholder, separators, allowDuplicates, disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, invalid, id, removeLabel, className, pt, }: TagGroupProps) => import("react").JSX.Element;
|
|
68
|
+
//# sourceMappingURL=TagGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagGroup.d.ts","sourceRoot":"","sources":["../../../Common/TagGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAE3B,MAAM,OAAO,CAAC;AAUf,4GAA4G;AAC5G,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACrC,cAAc,CAAC,WAAW,CAAC,EAC3B,WAAW,GAAG,OAAO,GAAG,OAAO,CAClC,GAAG;IACA,CAAC,aAAa,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,oBAAoB;IACpB,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,eAAe;IACf,GAAG,CAAC,EAAE,sBAAsB,CAAC;IAC7B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,wCAAwC;IACxC,KAAK,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACjD;AAKD,kCAAkC;AAClC,MAAM,WAAW,aAAa;IAC1B,wCAAwC;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iFAAiF;IACjF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0FAA0F;IAC1F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4EAA4E;IAC5E,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,aAAa,CAAC;CACtB;AAKD;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,iOAgBlB,aAAa,gCAkHf,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useId, useState } from 'react';
|
|
3
|
+
import { TagGroup as TagGroup$1, TagList, Tag } from 'react-aria-components/TagGroup';
|
|
4
|
+
import { Button } from 'react-aria-components/Button';
|
|
5
|
+
|
|
6
|
+
const classNames = (...values) => values.filter(Boolean).join(' ');
|
|
7
|
+
const TagGroup = ({ value, onChange, editable = true, placeholder, separators = [','], allowDuplicates = false, disabled = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, invalid = false, id, removeLabel, className, pt, }) => {
|
|
8
|
+
const generatedId = useId();
|
|
9
|
+
const inputId = id ?? `cratis-tag-group-${generatedId}`;
|
|
10
|
+
const [draft, setDraft] = useState('');
|
|
11
|
+
const add = (candidates) => {
|
|
12
|
+
const next = [...value];
|
|
13
|
+
for (const candidate of candidates) {
|
|
14
|
+
const trimmed = candidate.trim();
|
|
15
|
+
if (!trimmed)
|
|
16
|
+
continue;
|
|
17
|
+
if (!allowDuplicates && next.includes(trimmed))
|
|
18
|
+
continue;
|
|
19
|
+
next.push(trimmed);
|
|
20
|
+
}
|
|
21
|
+
if (next.length !== value.length)
|
|
22
|
+
onChange(next);
|
|
23
|
+
setDraft('');
|
|
24
|
+
};
|
|
25
|
+
const remove = (keys) => onChange(value.filter((entry) => !keys.has(entry)));
|
|
26
|
+
const splitOn = (text) => separators.length === 0
|
|
27
|
+
? [text]
|
|
28
|
+
: text.split(new RegExp(`[${separators.map(escapeForClass).join('')}]`));
|
|
29
|
+
return (jsxs("div", { ...pt?.root, className: classNames('cratis-tag-group', pt?.root?.className, className), "data-cratis-part": 'root', "data-disabled": disabled || undefined, "data-invalid": invalid || undefined, children: [jsx(TagGroup$1, { selectionMode: 'none', onRemove: remove, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children: jsx(TagList, { ...pt?.list, items: value.map((entry) => ({ id: entry })), className: classNames('cratis-tag-group__list', pt?.list?.className), "data-cratis-part": 'list', children: (item) => (jsxs(Tag, { ...pt?.tag, id: item.id, textValue: item.id, className: classNames('cratis-tag-group__tag', pt?.tag?.className), "data-cratis-part": 'tag', "data-disabled": disabled || undefined, children: [jsx("span", { className: 'cratis-tag-group__tag-label', children: item.id }), !disabled && (jsx(Button, { ...pt?.remove, slot: 'remove', "aria-label": removeLabel?.(item.id), className: classNames('cratis-tag-group__remove', pt?.remove?.className), "data-cratis-part": 'remove', children: jsx("span", { "aria-hidden": 'true', children: "\u00D7" }) }))] })) }) }), editable && (jsx("input", { ...pt?.input, id: inputId, type: 'text', value: draft, disabled: disabled, placeholder: placeholder, "aria-label": ariaLabelledBy ? undefined : ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": invalid || undefined, className: classNames('cratis-tag-group__input', pt?.input?.className), "data-cratis-part": 'input', "data-invalid": invalid || undefined, onChange: (event) => setDraft(event.currentTarget.value), onKeyDown: (event) => {
|
|
30
|
+
if (event.key === 'Enter' || separators.includes(event.key)) {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
add([draft]);
|
|
33
|
+
}
|
|
34
|
+
else if (event.key === 'Backspace' &&
|
|
35
|
+
draft === '' &&
|
|
36
|
+
value.length > 0) {
|
|
37
|
+
onChange(value.slice(0, -1));
|
|
38
|
+
}
|
|
39
|
+
}, onPaste: (event) => {
|
|
40
|
+
const text = event.clipboardData.getData('text');
|
|
41
|
+
if (!separators.some((separator) => text.includes(separator)))
|
|
42
|
+
return;
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
add(splitOn(text));
|
|
45
|
+
}, onBlur: () => {
|
|
46
|
+
if (draft.trim())
|
|
47
|
+
add([draft]);
|
|
48
|
+
} }))] }));
|
|
49
|
+
};
|
|
50
|
+
const escapeForClass = (separator) => separator.replace(/[\\\]^-]/gu, '\\$&');
|
|
51
|
+
|
|
52
|
+
export { TagGroup };
|
|
53
|
+
//# sourceMappingURL=TagGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagGroup.js","sources":["../../../Common/TagGroup.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx","AriaTagGroup","AriaTagList","AriaTag","AriaButton"],"mappings":";;;;;AAoFA,MAAM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O,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;wBACzD,KAAK,CAAC,cAAc,EAAE;AACtB,wBAAA,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;oBAChB;AAAO,yBAAA,IACH,KAAK,CAAC,GAAG,KAAK,WAAW;AACzB,wBAAA,KAAK,KAAK,EAAE;AACZ,wBAAA,KAAK,CAAC,MAAM,GAAG,CAAC,EAClB;wBACE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBAChC;AACJ,gBAAA,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,KAAI;oBACf,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;AAChD,oBAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;wBAAE;oBAC/D,KAAK,CAAC,cAAc,EAAE;AACtB,oBAAA,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,gBAAA,CAAC,EACD,MAAM,EAAE,MAAK;oBACT,IAAI,KAAK,CAAC,IAAI,EAAE;AAAE,wBAAA,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AAClC,gBAAA,CAAC,EAAA,CACH,CACL,CAAA,EAAA,CACC;AAEd;AAGA,MAAM,cAAc,GAAG,CAAC,SAAiB,KAAK,SAAS,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/** Attributes a consumer may hand to one {@link ToggleGroup} part: class, style, title and data attributes. */
|
|
3
|
+
export type ToggleGroupPartAttributes = Pick<HTMLAttributes<HTMLElement>, 'className' | 'style' | 'title'> & {
|
|
4
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** One choice in a {@link ToggleGroup}. */
|
|
7
|
+
export interface ToggleGroupOption {
|
|
8
|
+
/** Value this option selects. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Visible label. */
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
/** Content rendered before the label — an icon, a swatch. Decorative. */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** Whether this option cannot be chosen. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Stable Cratis-owned parts for styling a {@link ToggleGroup}. */
|
|
18
|
+
export interface ToggleGroupParts {
|
|
19
|
+
/** The group element. */
|
|
20
|
+
root?: ToggleGroupPartAttributes;
|
|
21
|
+
/** One selectable option. */
|
|
22
|
+
option?: ToggleGroupPartAttributes;
|
|
23
|
+
/** An option's leading icon wrapper, rendered only for an option that has one. */
|
|
24
|
+
icon?: ToggleGroupPartAttributes;
|
|
25
|
+
/** An option's label. */
|
|
26
|
+
label?: ToggleGroupPartAttributes;
|
|
27
|
+
}
|
|
28
|
+
/** Props for {@link ToggleGroup}. */
|
|
29
|
+
export interface ToggleGroupProps {
|
|
30
|
+
/** The choices, in display order. Two to four is the shape this control is for. */
|
|
31
|
+
options: ToggleGroupOption[];
|
|
32
|
+
/** Currently selected value. */
|
|
33
|
+
value: string;
|
|
34
|
+
/** Called with the newly selected value. A click on the selected option is ignored. */
|
|
35
|
+
onChange: (value: string) => void;
|
|
36
|
+
/** Whether every option is disabled. */
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Id of the element naming this control. A group has no single labelable element, so an external
|
|
40
|
+
* `<label>` associates by id rather than `htmlFor`.
|
|
41
|
+
*/
|
|
42
|
+
'aria-labelledby'?: string;
|
|
43
|
+
/** Accessible name, when no visible label names the control. */
|
|
44
|
+
'aria-label'?: string;
|
|
45
|
+
/** Id of the element describing the control — typically a field's error or hint text. */
|
|
46
|
+
'aria-describedby'?: string;
|
|
47
|
+
/** Marks the control invalid for assistive technology. */
|
|
48
|
+
invalid?: boolean;
|
|
49
|
+
/** Extra class name for the group element. */
|
|
50
|
+
className?: string;
|
|
51
|
+
/** Cratis-owned per-part attributes. */
|
|
52
|
+
pt?: ToggleGroupParts;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A single-selection group of exclusive choices — a segmented control.
|
|
56
|
+
*
|
|
57
|
+
* This is a *value* choice, not a panel switcher: it carries `radiogroup`/`radio` semantics from
|
|
58
|
+
* React Aria's `ToggleButtonGroup`, not `tablist`/`tab`, and the arrow keys those semantics promise
|
|
59
|
+
* move the selection. Reach for `Tabs` when the choice reveals a panel of content instead.
|
|
60
|
+
*/
|
|
61
|
+
export declare const ToggleGroup: ({ options, value, onChange, disabled, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, invalid, className, pt, }: ToggleGroupProps) => import("react").JSX.Element;
|
|
62
|
+
//# sourceMappingURL=ToggleGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleGroup.d.ts","sourceRoot":"","sources":["../../../Common/ToggleGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,+GAA+G;AAC/G,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,cAAc,CAAC,WAAW,CAAC,EAC3B,WAAW,GAAG,OAAO,GAAG,OAAO,CAClC,GAAG;IACA,CAAC,aAAa,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAC9B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,yEAAyE;IACzE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC7B,yBAAyB;IACzB,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,6BAA6B;IAC7B,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,kFAAkF;IAClF,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC,yBAAyB;IACzB,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACrC;AAQD,qCAAqC;AACrC,MAAM,WAAW,gBAAgB;IAC7B,mFAAmF;IACnF,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,EAAE,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAKD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,qKAWrB,gBAAgB,gCAwDlB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { ToggleButtonGroup, ToggleButton } from 'react-aria-components/ToggleButtonGroup';
|
|
3
|
+
|
|
4
|
+
const classNames = (...values) => values.filter(Boolean).join(' ');
|
|
5
|
+
const ToggleGroup = ({ options, value, onChange, disabled = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, invalid = false, className, pt, }) => (jsx(ToggleButtonGroup, { ...pt?.root, selectionMode: 'single', disallowEmptySelection: true, selectedKeys: [value], isDisabled: disabled, onSelectionChange: (keys) => {
|
|
6
|
+
const [selected] = [...keys];
|
|
7
|
+
if (selected !== undefined && selected !== value)
|
|
8
|
+
onChange(String(selected));
|
|
9
|
+
}, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className: classNames('cratis-toggle-group', pt?.root?.className, className), "data-cratis-part": 'root', "data-disabled": disabled || undefined, "data-invalid": invalid || undefined, children: options.map((option) => (jsxs(ToggleButton, { ...pt?.option, id: option.value, isDisabled: disabled || option.disabled, className: classNames('cratis-toggle-group__option', pt?.option?.className), "data-cratis-part": 'option', "data-selected": option.value === value || undefined, "data-disabled": disabled || option.disabled || undefined, "data-invalid": invalid || undefined, children: [option.icon !== undefined && (jsx("span", { ...pt?.icon, "aria-hidden": 'true', className: classNames('cratis-toggle-group__icon', pt?.icon?.className), "data-cratis-part": 'icon', children: option.icon })), jsx("span", { ...pt?.label, className: classNames('cratis-toggle-group__label', pt?.label?.className), "data-cratis-part": 'label', children: option.label })] }, option.value))) }));
|
|
10
|
+
|
|
11
|
+
export { ToggleGroup };
|
|
12
|
+
//# sourceMappingURL=ToggleGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleGroup.js","sources":["../../../Common/ToggleGroup.tsx"],"sourcesContent":[null],"names":["_jsx","AriaToggleButtonGroup","_jsxs","AriaToggleButton"],"mappings":";;;AA4EA,MAAM,UAAU,GAAG,CAAC,GAAG,MAAiC,KACpD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAS7B,MAAM,WAAW,GAAG,CAAC,EACxB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,Y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C,IAAI,KAAK,SAAS,KACtBH,GAAA,CAAA,MAAA,EAAA,EAAA,GACQ,EAAE,EAAE,IAAI,EAAA,aAAA,EACA,MAAM,EAClB,SAAS,EAAE,UAAU,CACjB,2BAA2B,EAC3B,EAAE,EAAE,IAAI,EAAE,SAAS,CACtB,EAAA,kBAAA,EACgB,MAAM,EAAA,QAAA,EAEtB,MAAM,CAAC,IAAI,EAAA,CACT,CACV,EACDA,GAAA,CAAA,MAAA,EAAA,EAAA,GACQ,EAAE,EAAE,KAAK,EACb,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAA,kBAAA,EACxD,OAAO,EAAA,QAAA,EAEvB,MAAM,CAAC,KAAK,EAAA,CACV,CAAA,EAAA,EA7BF,MAAM,CAAC,KAAK,CA8BF,CACtB,CAAC,EAAA,CACkB;;"}
|
|
@@ -5,6 +5,10 @@ export * from './ErrorBoundary.js';
|
|
|
5
5
|
export * from './Icon.js';
|
|
6
6
|
export * from './normalizeIconClass.js';
|
|
7
7
|
export * from './ComboBox.js';
|
|
8
|
+
export * from './ToggleGroup.js';
|
|
9
|
+
export * from './Tabs.js';
|
|
10
|
+
export * from './TagGroup.js';
|
|
11
|
+
export * from './Breadcrumbs.js';
|
|
8
12
|
export * from './NumberInput.js';
|
|
9
13
|
export * from './NumberInputCommitReason.js';
|
|
10
14
|
export * from './NumberInputPartAttributes.js';
|
package/dist/esm/Common/index.js
CHANGED
|
@@ -5,6 +5,10 @@ export { ErrorBoundary } from './ErrorBoundary.js';
|
|
|
5
5
|
export { IconDisplay } from './Icon.js';
|
|
6
6
|
export { normalizeIconClass } from './normalizeIconClass.js';
|
|
7
7
|
export { ComboBox } from './ComboBox.js';
|
|
8
|
+
export { ToggleGroup } from './ToggleGroup.js';
|
|
9
|
+
export { Tabs } from './Tabs.js';
|
|
10
|
+
export { TagGroup } from './TagGroup.js';
|
|
11
|
+
export { Breadcrumbs } from './Breadcrumbs.js';
|
|
8
12
|
export { NumberInput } from './NumberInput.js';
|
|
9
13
|
export { NumberInputCommitReason } from './NumberInputCommitReason.js';
|
|
10
14
|
export { Page } from './Page.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|