@mittwald/flow-react-components 1.6.0-next.8 → 1.6.0-next.9
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/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +3 -2
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +3 -2
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Alert/Alert.mjs +3 -2
- package/dist/js/packages/components/src/components/Alert/Alert.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs +23 -5
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useTickLabelWidth.mjs +67 -0
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useTickLabelWidth.mjs.map +1 -0
- package/dist/js/packages/components/src/components/Heading/Heading.mjs +2 -0
- package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
- package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs +3 -2
- package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Label/Label.mjs +0 -4
- package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/views/GridList/GridList.mjs +3 -0
- package/dist/js/packages/components/src/components/List/components/Items/views/GridList/GridList.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs +2 -1
- package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs +4 -2
- package/dist/js/packages/components/src/components/Popover/components/PopoverContent/PopoverContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/Section.mjs +9 -5
- package/dist/js/packages/components/src/components/Section/Section.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +0 -4
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/context.mjs +47 -0
- package/dist/js/packages/components/src/components/Section/context.mjs.map +1 -0
- package/dist/js/packages/components/src/components/Table/Table.mjs +3 -0
- package/dist/js/packages/components/src/components/Table/Table.mjs.map +1 -1
- package/dist/types/components/CartesianChart/hooks/useTickLabelWidth.d.ts +1 -0
- package/dist/types/components/Section/context.d.ts +28 -0
- package/package.json +10 -10
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import AccentBox_module_default from "./AccentBox.module.mjs";
|
|
4
4
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
5
5
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
6
|
+
import { SectionHeadingReset } from "../Section/context.mjs";
|
|
6
7
|
import clsx from "clsx";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/AccentBox/AccentBox.tsx
|
|
@@ -46,10 +47,10 @@ var AccentBox = flowComponent("AccentBox", (props) => {
|
|
|
46
47
|
return /* @__PURE__ */ jsx(Element, {
|
|
47
48
|
className: rootClassName,
|
|
48
49
|
style,
|
|
49
|
-
children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
50
|
+
children: /* @__PURE__ */ jsx(SectionHeadingReset, { children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
50
51
|
props: propsContext,
|
|
51
52
|
children
|
|
52
|
-
})
|
|
53
|
+
}) })
|
|
53
54
|
});
|
|
54
55
|
});
|
|
55
56
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentBox.mjs","names":["anyAccentBoxBackgroundColors","styles"],"sources":["../../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport type {\n AlphaColor,\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nconst accentBoxBackgroundColors = [\n \"neutral\",\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"navy\",\n \"gradient\",\n] as const;\n\ntype AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];\ntype AccentBoxWithCustomBackgroundColor =\n AccentBoxBackgroundColor | (string & {});\n\nfunction isFlowColor(\n something: unknown,\n): something is AccentBoxBackgroundColor {\n const anyAccentBoxBackgroundColors =\n accentBoxBackgroundColors as readonly string[];\n return (\n typeof something === \"string\" &&\n anyAccentBoxBackgroundColors.includes(something)\n );\n}\n\nexport interface AccentBoxProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n /** The background color of the accent box. @default \"neutral\" */\n backgroundColor?: AccentBoxWithCustomBackgroundColor;\n /** The content color of the accent box. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The background image of the accent box. */\n backgroundImage?: string;\n /** The aspect ratio of the accent box. */\n aspectRatio?: CSSProperties[\"aspectRatio\"];\n}\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const AccentBox = flowComponent(\"AccentBox\", (props) => {\n const {\n color: colorFromProps,\n backgroundColor = \"neutral\",\n backgroundImage,\n children,\n elementType = \"div\",\n className,\n style: styleFromProps,\n aspectRatio,\n } = props;\n\n const defaultColor =\n (colorFromProps as unknown as string) === \"gradient\" ||\n backgroundColor === \"gradient\"\n ? \"dark\"\n : \"default\";\n\n const color = colorFromProps ?? defaultColor;\n\n const isAFlowColor = isFlowColor(backgroundColor);\n\n // backwards compatibility\n const backgroundColorFromColor =\n (colorFromProps as unknown as string) === \"neutral\" ||\n (colorFromProps as unknown as string) === \"gradient\" ||\n (colorFromProps as unknown as string) === \"green\"\n ? (colorFromProps as unknown as AccentBoxBackgroundColor)\n : undefined;\n\n const style = {\n backgroundColor: isAFlowColor ? undefined : backgroundColor,\n backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,\n aspectRatio,\n ...styleFromProps,\n };\n\n const rootClassName = clsx(\n styles.accentBox,\n backgroundColorFromColor\n ? styles[backgroundColorFromColor]\n : isAFlowColor\n ? styles[backgroundColor]\n : undefined,\n className,\n );\n\n const Element = elementType;\n\n const contentColor = color === \"default\" ? undefined : color;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <Element className={rootClassName} style={style}>\n <PropsContextProvider props={propsContext}>\n
|
|
1
|
+
{"version":3,"file":"AccentBox.mjs","names":["anyAccentBoxBackgroundColors","styles"],"sources":["../../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport type {\n AlphaColor,\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\n\nconst accentBoxBackgroundColors = [\n \"neutral\",\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n \"green\",\n \"navy\",\n \"gradient\",\n] as const;\n\ntype AccentBoxBackgroundColor = (typeof accentBoxBackgroundColors)[number];\ntype AccentBoxWithCustomBackgroundColor =\n AccentBoxBackgroundColor | (string & {});\n\nfunction isFlowColor(\n something: unknown,\n): something is AccentBoxBackgroundColor {\n const anyAccentBoxBackgroundColors =\n accentBoxBackgroundColors as readonly string[];\n return (\n typeof something === \"string\" &&\n anyAccentBoxBackgroundColors.includes(something)\n );\n}\n\nexport interface AccentBoxProps\n extends\n PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n /** The background color of the accent box. @default \"neutral\" */\n backgroundColor?: AccentBoxWithCustomBackgroundColor;\n /** The content color of the accent box. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The background image of the accent box. */\n backgroundImage?: string;\n /** The aspect ratio of the accent box. */\n aspectRatio?: CSSProperties[\"aspectRatio\"];\n}\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const AccentBox = flowComponent(\"AccentBox\", (props) => {\n const {\n color: colorFromProps,\n backgroundColor = \"neutral\",\n backgroundImage,\n children,\n elementType = \"div\",\n className,\n style: styleFromProps,\n aspectRatio,\n } = props;\n\n const defaultColor =\n (colorFromProps as unknown as string) === \"gradient\" ||\n backgroundColor === \"gradient\"\n ? \"dark\"\n : \"default\";\n\n const color = colorFromProps ?? defaultColor;\n\n const isAFlowColor = isFlowColor(backgroundColor);\n\n // backwards compatibility\n const backgroundColorFromColor =\n (colorFromProps as unknown as string) === \"neutral\" ||\n (colorFromProps as unknown as string) === \"gradient\" ||\n (colorFromProps as unknown as string) === \"green\"\n ? (colorFromProps as unknown as AccentBoxBackgroundColor)\n : undefined;\n\n const style = {\n backgroundColor: isAFlowColor ? undefined : backgroundColor,\n backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,\n aspectRatio,\n ...styleFromProps,\n };\n\n const rootClassName = clsx(\n styles.accentBox,\n backgroundColorFromColor\n ? styles[backgroundColorFromColor]\n : isAFlowColor\n ? styles[backgroundColor]\n : undefined,\n className,\n );\n\n const Element = elementType;\n\n const contentColor = color === \"default\" ? undefined : color;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <Element className={rootClassName} style={style}>\n <SectionHeadingReset>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </SectionHeadingReset>\n </Element>\n );\n});\n\nexport default AccentBox;\n"],"mappings":";;;;;;;;;AAeA,IAAM,4BAA4B;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,SAAS,YACP,WACuC;CAGvC,OACE,OAAO,cAAc,YACrBA,0BAA6B,SAAS,SAAS;AAEnD;;;;;AAsBA,IAAa,YAAY,cAAc,cAAc,UAAU;CAC7D,MAAM,EACJ,OAAO,gBACP,kBAAkB,WAClB,iBACA,UACA,cAAc,OACd,WACA,OAAO,gBACP,gBACE;CAQJ,MAAM,QAAQ,mBALX,mBAAyC,cAC1C,oBAAoB,aAChB,SACA;CAIN,MAAM,eAAe,YAAY,eAAe;CAGhD,MAAM,2BACH,mBAAyC,aACzC,mBAAyC,cACzC,mBAAyC,UACrC,iBACD,KAAA;CAEN,MAAM,QAAQ;EACZ,iBAAiB,eAAe,KAAA,IAAY;EAC5C,iBAAiB,kBAAkB,OAAO,gBAAgB,KAAK,KAAA;EAC/D;EACA,GAAG;CACL;CAEA,MAAM,gBAAgB,KACpBC,yBAAO,WACP,2BACIA,yBAAO,4BACP,eACEA,yBAAO,mBACP,KAAA,GACN,SACF;CAEA,MAAM,UAAU;CAEhB,MAAM,eAAe,UAAU,YAAY,KAAA,IAAY;CAEvD,MAAM,eAA6B;EACjC,MAAM,EACJ,OAAO,aACT;EACA,MAAM,EACJ,OAAO,aACT;EACA,SAAS,EACP,OAAO,aACT;EACA,MAAM,EACJ,WAAWA,yBAAO,KACpB;CACF;CAEA,OACE,oBAAC,SAAD;EAAS,WAAW;EAAsB;EACxC,UAAA,oBAAC,qBAAD,EAAA,UACE,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA,EACH,CAAA;CACd,CAAA;AAEb,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
4
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
5
5
|
import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
|
|
6
|
+
import { SectionHeadingReset } from "../Section/context.mjs";
|
|
6
7
|
import Accordion_module_default from "./Accordion.module.mjs";
|
|
7
8
|
import { useWarnDeprecation } from "../DeprecationWarningProvider/DeprecationWarningProvider.mjs";
|
|
8
9
|
import { IconChevronDown } from "../Icon/components/icons/IconChevronDown.mjs";
|
|
@@ -101,7 +102,7 @@ var Accordion = flowComponent("Accordion", (props) => {
|
|
|
101
102
|
...rest,
|
|
102
103
|
id,
|
|
103
104
|
className: rootClassName,
|
|
104
|
-
children: /* @__PURE__ */ jsx(TriggerContext, {
|
|
105
|
+
children: /* @__PURE__ */ jsx(SectionHeadingReset, { children: /* @__PURE__ */ jsx(TriggerContext, {
|
|
105
106
|
value: triggerProps,
|
|
106
107
|
children: /* @__PURE__ */ jsxs(PropsContextProvider, {
|
|
107
108
|
props: propsContext,
|
|
@@ -118,7 +119,7 @@ var Accordion = flowComponent("Accordion", (props) => {
|
|
|
118
119
|
})
|
|
119
120
|
})]
|
|
120
121
|
})
|
|
121
|
-
})
|
|
122
|
+
}) })
|
|
122
123
|
});
|
|
123
124
|
}, { type: "layout" });
|
|
124
125
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.mjs","names":["styles"],"sources":["../../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useEffect, useId, useRef } from \"react\";\nimport { useDisclosure } from \"react-aria\";\nimport { useDisclosureState } from \"react-stately\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button, type ButtonProps } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\nimport {\n AccordionGroupContext,\n useAccordionGroupContext,\n} from \"@/components/AccordionGroup/context\";\n\nexport interface AccordionProps extends PropsWithChildren<\n ComponentProps<\"div\">\n> {\n /**\n * The key of the accordion inside an `AccordionGroup`, used by its\n * `expandedKeys`. Also set as the DOM id.\n */\n id?: string;\n /** Whether the accordion should be initially expanded. */\n defaultExpanded?: boolean;\n /**\n * The visual variant of the accordion. Has no effect.\n *\n * @deprecated Use `AccordionGroup` or a `LayoutCard` to set accordions apart.\n */\n variant?: \"default\" | \"outline\";\n}\n\n/*\n * The header button is rendered by the `Heading`, `Text` or `Label` the\n * consumer wrote, through a memoized props context. It reads the disclosure\n * state from a React context instead, so it always gets the current one.\n */\ntype TriggerProps = Pick<\n ButtonProps,\n \"id\" | \"aria-expanded\" | \"aria-controls\" | \"onPress\" | \"onPressStart\"\n>;\n\nconst TriggerContext = createContext<TriggerProps | null>(null);\n\ninterface HeaderButtonProps extends PropsWithChildren {\n /** Text and label headers are smaller than headings, so is their chevron. */\n isCompact?: boolean;\n}\n\n/*\n * Declared here and not inside the accordion: a component defined in a render\n * body gets a new identity on every render, so React unmounts and remounts it —\n * and the toggle loses the focus it just received on its own press.\n */\nconst HeaderButton: FC<HeaderButtonProps> = (props) => {\n const { children, isCompact } = props;\n const buttonProps = useContext(TriggerContext);\n\n return (\n <Button\n tunnel={null}\n unstyled\n className={styles.headerButton}\n {...buttonProps}\n >\n <span className={styles.headerContent}>{children}</span>\n <IconChevronDown\n className={styles.chevron}\n size={isCompact ? \"s\" : \"m\"}\n />\n </Button>\n );\n};\n\n/* Text and label headers render the same compact toggle. */\nconst compactHeader = {\n className: clsx(styles.header, styles.textHeader),\n children: dynamic((props: PropsWithChildren) => (\n <HeaderButton isCompact>{props.children}</HeaderButton>\n )),\n};\n\nconst propsContext: PropsContext = {\n Content: {\n className: styles.contentInner,\n tunnel: {\n id: \"content\",\n component: \"Accordion\",\n },\n },\n Heading: {\n className: styles.header,\n level: 3,\n children: dynamic((props) => <HeaderButton>{props.children}</HeaderButton>),\n Button: { size: \"m\" },\n },\n Text: {\n ...compactHeader,\n elementType: \"div\",\n },\n Label: {\n ...compactHeader,\n /*\n * A <label> names the first labelable element below it — here the toggle,\n * whose own text is the label's only content. The name computation walks\n * into the label, meets the button it started from and stops, so the\n * toggle ends up with an empty name. A <span> names nothing and the name\n * comes from the toggle's content again.\n */\n elementType: \"span\",\n },\n};\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const Accordion: FC<AccordionProps> = flowComponent(\n \"Accordion\",\n (props) => {\n const {\n children,\n className,\n id,\n defaultExpanded = false,\n variant,\n ...rest\n } = props;\n\n const warnDeprecation = useWarnDeprecation();\n if (variant !== undefined) {\n warnDeprecation(\n \"The 'variant' prop of the 'Accordion' component is deprecated and will be removed in a future release. Use 'AccordionGroup' or a 'LayoutCard' to set accordions apart instead.\",\n );\n }\n\n const generatedKey = useId();\n const key = id ?? generatedKey;\n const group = useAccordionGroupContext();\n const register = group?.register;\n\n /* `onExpandedChange` reports only keys the consumer gave. */\n useEffect(\n () => (id === undefined ? undefined : register?.(id, defaultExpanded)),\n [register, id, defaultExpanded],\n );\n\n const state = useDisclosureState({\n defaultExpanded,\n ...(group && {\n isExpanded: group.isExpanded(key, defaultExpanded),\n onExpandedChange: (isExpanded) => group.setExpanded(key, isExpanded),\n }),\n });\n\n const panelRef = useRef<HTMLDivElement>(null);\n const { buttonProps, panelProps } = useDisclosure({}, state, panelRef);\n const triggerProps: TriggerProps = {\n id: buttonProps.id,\n \"aria-expanded\": state.isExpanded,\n \"aria-controls\": buttonProps[\"aria-controls\"],\n onPress: buttonProps.onPress,\n onPressStart: buttonProps.onPressStart,\n };\n\n const rootClassName = clsx(\n styles.accordion,\n state.isExpanded && styles.expanded,\n group && styles.grouped,\n className,\n );\n\n return (\n <div {...rest} id={id} className={rootClassName}>\n <TriggerContext value={triggerProps}>\n
|
|
1
|
+
{"version":3,"file":"Accordion.mjs","names":["styles"],"sources":["../../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useEffect, useId, useRef } from \"react\";\nimport { useDisclosure } from \"react-aria\";\nimport { useDisclosureState } from \"react-stately\";\nimport clsx from \"clsx\";\nimport styles from \"./Accordion.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button, type ButtonProps } from \"@/components/Button\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\nimport {\n AccordionGroupContext,\n useAccordionGroupContext,\n} from \"@/components/AccordionGroup/context\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\n\nexport interface AccordionProps extends PropsWithChildren<\n ComponentProps<\"div\">\n> {\n /**\n * The key of the accordion inside an `AccordionGroup`, used by its\n * `expandedKeys`. Also set as the DOM id.\n */\n id?: string;\n /** Whether the accordion should be initially expanded. */\n defaultExpanded?: boolean;\n /**\n * The visual variant of the accordion. Has no effect.\n *\n * @deprecated Use `AccordionGroup` or a `LayoutCard` to set accordions apart.\n */\n variant?: \"default\" | \"outline\";\n}\n\n/*\n * The header button is rendered by the `Heading`, `Text` or `Label` the\n * consumer wrote, through a memoized props context. It reads the disclosure\n * state from a React context instead, so it always gets the current one.\n */\ntype TriggerProps = Pick<\n ButtonProps,\n \"id\" | \"aria-expanded\" | \"aria-controls\" | \"onPress\" | \"onPressStart\"\n>;\n\nconst TriggerContext = createContext<TriggerProps | null>(null);\n\ninterface HeaderButtonProps extends PropsWithChildren {\n /** Text and label headers are smaller than headings, so is their chevron. */\n isCompact?: boolean;\n}\n\n/*\n * Declared here and not inside the accordion: a component defined in a render\n * body gets a new identity on every render, so React unmounts and remounts it —\n * and the toggle loses the focus it just received on its own press.\n */\nconst HeaderButton: FC<HeaderButtonProps> = (props) => {\n const { children, isCompact } = props;\n const buttonProps = useContext(TriggerContext);\n\n return (\n <Button\n tunnel={null}\n unstyled\n className={styles.headerButton}\n {...buttonProps}\n >\n <span className={styles.headerContent}>{children}</span>\n <IconChevronDown\n className={styles.chevron}\n size={isCompact ? \"s\" : \"m\"}\n />\n </Button>\n );\n};\n\n/* Text and label headers render the same compact toggle. */\nconst compactHeader = {\n className: clsx(styles.header, styles.textHeader),\n children: dynamic((props: PropsWithChildren) => (\n <HeaderButton isCompact>{props.children}</HeaderButton>\n )),\n};\n\nconst propsContext: PropsContext = {\n Content: {\n className: styles.contentInner,\n tunnel: {\n id: \"content\",\n component: \"Accordion\",\n },\n },\n Heading: {\n className: styles.header,\n level: 3,\n children: dynamic((props) => <HeaderButton>{props.children}</HeaderButton>),\n Button: { size: \"m\" },\n },\n Text: {\n ...compactHeader,\n elementType: \"div\",\n },\n Label: {\n ...compactHeader,\n /*\n * A <label> names the first labelable element below it — here the toggle,\n * whose own text is the label's only content. The name computation walks\n * into the label, meets the button it started from and stops, so the\n * toggle ends up with an empty name. A <span> names nothing and the name\n * comes from the toggle's content again.\n */\n elementType: \"span\",\n },\n};\n\n/**\n * @flr-generate all\n * @flowStatus beta\n */\nexport const Accordion: FC<AccordionProps> = flowComponent(\n \"Accordion\",\n (props) => {\n const {\n children,\n className,\n id,\n defaultExpanded = false,\n variant,\n ...rest\n } = props;\n\n const warnDeprecation = useWarnDeprecation();\n if (variant !== undefined) {\n warnDeprecation(\n \"The 'variant' prop of the 'Accordion' component is deprecated and will be removed in a future release. Use 'AccordionGroup' or a 'LayoutCard' to set accordions apart instead.\",\n );\n }\n\n const generatedKey = useId();\n const key = id ?? generatedKey;\n const group = useAccordionGroupContext();\n const register = group?.register;\n\n /* `onExpandedChange` reports only keys the consumer gave. */\n useEffect(\n () => (id === undefined ? undefined : register?.(id, defaultExpanded)),\n [register, id, defaultExpanded],\n );\n\n const state = useDisclosureState({\n defaultExpanded,\n ...(group && {\n isExpanded: group.isExpanded(key, defaultExpanded),\n onExpandedChange: (isExpanded) => group.setExpanded(key, isExpanded),\n }),\n });\n\n const panelRef = useRef<HTMLDivElement>(null);\n const { buttonProps, panelProps } = useDisclosure({}, state, panelRef);\n const triggerProps: TriggerProps = {\n id: buttonProps.id,\n \"aria-expanded\": state.isExpanded,\n \"aria-controls\": buttonProps[\"aria-controls\"],\n onPress: buttonProps.onPress,\n onPressStart: buttonProps.onPressStart,\n };\n\n const rootClassName = clsx(\n styles.accordion,\n state.isExpanded && styles.expanded,\n group && styles.grouped,\n className,\n );\n\n return (\n <div {...rest} id={id} className={rootClassName}>\n <SectionHeadingReset>\n <TriggerContext value={triggerProps}>\n <PropsContextProvider props={propsContext}>\n {children}\n <div {...panelProps} ref={panelRef} className={styles.content}>\n {/* An accordion inside the content is not part of this group. */}\n <AccordionGroupContext value={null}>\n <UiComponentTunnelExit id=\"content\" component=\"Accordion\" />\n </AccordionGroupContext>\n </div>\n </PropsContextProvider>\n </TriggerContext>\n </SectionHeadingReset>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Accordion;\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+CA,IAAM,iBAAiB,cAAmC,IAAI;AAY9D,IAAM,gBAAuC,UAAU;CACrD,MAAM,EAAE,UAAU,cAAc;CAChC,MAAM,cAAc,WAAW,cAAc;CAE7C,OACE,qBAAC,QAAD;EACE,QAAQ;EACR,UAAA;EACA,WAAWA,yBAAO;EAClB,GAAI;EAJN,UAAA,CAME,oBAAC,QAAD;GAAM,WAAWA,yBAAO;GAAgB;EAAe,CAAA,GACvD,oBAAC,iBAAD;GACE,WAAWA,yBAAO;GAClB,MAAM,YAAY,MAAM;EACzB,CAAA,CACK;;AAEZ;AAGA,IAAM,gBAAgB;CACpB,WAAW,KAAKA,yBAAO,QAAQA,yBAAO,UAAU;CAChD,UAAU,SAAS,UACjB,oBAAC,cAAD;EAAc,WAAA;EAAW,UAAA,MAAM;CAAuB,CAAA,CACvD;AACH;AAEA,IAAM,eAA6B;CACjC,SAAS;EACP,WAAWA,yBAAO;EAClB,QAAQ;GACN,IAAI;GACJ,WAAW;EACb;CACF;CACA,SAAS;EACP,WAAWA,yBAAO;EAClB,OAAO;EACP,UAAU,SAAS,UAAU,oBAAC,cAAD,EAAA,UAAe,MAAM,SAAuB,CAAA,CAAC;EAC1E,QAAQ,EAAE,MAAM,IAAI;CACtB;CACA,MAAM;EACJ,GAAG;EACH,aAAa;CACf;CACA,OAAO;EACL,GAAG;EAQH,aAAa;CACf;AACF;;;;;AAMA,IAAa,YAAgC,cAC3C,cACC,UAAU;CACT,MAAM,EACJ,UACA,WACA,IACA,kBAAkB,OAClB,SACA,GAAG,SACD;CAEJ,MAAM,kBAAkB,mBAAmB;CAC3C,IAAI,YAAY,KAAA,GACd,gBACE,gLACF;CAGF,MAAM,eAAe,MAAM;CAC3B,MAAM,MAAM,MAAM;CAClB,MAAM,QAAQ,yBAAyB;CACvC,MAAM,WAAW,OAAO;CAGxB,gBACS,OAAO,KAAA,IAAY,KAAA,IAAY,WAAW,IAAI,eAAe,GACpE;EAAC;EAAU;EAAI;CAAe,CAChC;CAEA,MAAM,QAAQ,mBAAmB;EAC/B;EACA,GAAI,SAAS;GACX,YAAY,MAAM,WAAW,KAAK,eAAe;GACjD,mBAAmB,eAAe,MAAM,YAAY,KAAK,UAAU;EACrE;CACF,CAAC;CAED,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,EAAE,aAAa,eAAe,cAAc,CAAC,GAAG,OAAO,QAAQ;CACrE,MAAM,eAA6B;EACjC,IAAI,YAAY;EAChB,iBAAiB,MAAM;EACvB,iBAAiB,YAAY;EAC7B,SAAS,YAAY;EACrB,cAAc,YAAY;CAC5B;CAEA,MAAM,gBAAgB,KACpBA,yBAAO,WACP,MAAM,cAAcA,yBAAO,UAC3B,SAASA,yBAAO,SAChB,SACF;CAEA,OACE,oBAAC,OAAD;EAAK,GAAI;EAAU;EAAI,WAAW;EAChC,UAAA,oBAAC,qBAAD,EAAA,UACE,oBAAC,gBAAD;GAAgB,OAAO;GACrB,UAAA,qBAAC,sBAAD;IAAsB,OAAO;IAA7B,UAAA,CACG,UACD,oBAAC,OAAD;KAAK,GAAI;KAAY,KAAK;KAAU,WAAWA,yBAAO;KAEpD,UAAA,oBAAC,uBAAD;MAAuB,OAAO;MAC5B,UAAA,oBAAC,uBAAD;OAAuB,IAAG;OAAU,WAAU;MAAa,CAAA;KACtC,CAAA;IACpB,CAAA,CACe;;EACR,CAAA,EACG,CAAA;CAClB,CAAA;AAET,GACA,EACE,MAAM,SACR,CACF"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
4
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
5
5
|
import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
|
|
6
|
+
import { SectionHeadingReset } from "../Section/context.mjs";
|
|
6
7
|
import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
|
|
7
8
|
import { AlertIcon } from "../AlertIcon/AlertIcon.mjs";
|
|
8
9
|
import Alert_module_default from "./Alert.module.mjs";
|
|
@@ -37,11 +38,11 @@ var Alert = flowComponent("Alert", (props) => {
|
|
|
37
38
|
...rest,
|
|
38
39
|
className: rootClassName,
|
|
39
40
|
ref,
|
|
40
|
-
children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
41
|
+
children: /* @__PURE__ */ jsx(SectionHeadingReset, { children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
41
42
|
props: propsContext,
|
|
42
43
|
dependencies: [status],
|
|
43
44
|
children
|
|
44
|
-
})
|
|
45
|
+
}) })
|
|
45
46
|
});
|
|
46
47
|
});
|
|
47
48
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\nexport interface AlertProps\n extends\n PropsWithChildren<ComponentProps<\"aside\">>,\n PropsWithStatus,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Alert = flowComponent(\"Alert\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = clsx(\n styles.alert,\n styles[status],\n isSkeleton && styles.skeleton,\n className,\n );\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 3,\n size: \"s\",\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Content: {\n className: styles.content,\n Button: {\n size: \"s\",\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n },\n },\n };\n\n return (\n <aside {...rest} className={rootClassName} ref={ref}>\n <PropsContextProvider props={propsContext} dependencies={[status]}>\n
|
|
1
|
+
{"version":3,"file":"Alert.mjs","names":["styles","_Fragment"],"sources":["../../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import { AlertIcon } from \"@/components/AlertIcon\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithStatus } from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Alert.module.scss\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\n\nexport interface AlertProps\n extends\n PropsWithChildren<ComponentProps<\"aside\">>,\n PropsWithStatus,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Alert = flowComponent(\"Alert\", (props) => {\n const { children, className, status = \"info\", ref, ...rest } = props;\n\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = clsx(\n styles.alert,\n styles[status],\n isSkeleton && styles.skeleton,\n className,\n );\n\n const propsContext: PropsContext = {\n Heading: {\n className: styles.heading,\n level: 3,\n size: \"s\",\n children: dynamic((props) => (\n <>\n <AlertIcon status={status} className={styles.icon} />\n {props.children}\n </>\n )),\n },\n Content: {\n className: styles.content,\n Button: {\n size: \"s\",\n },\n ActionGroup: {\n preserveOrder: true,\n size: \"s\",\n },\n },\n };\n\n return (\n <aside {...rest} className={rootClassName} ref={ref}>\n <SectionHeadingReset>\n <PropsContextProvider props={propsContext} dependencies={[status]}>\n {children}\n </PropsContextProvider>\n </SectionHeadingReset>\n </aside>\n );\n});\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EAAE,UAAU,WAAW,SAAS,QAAQ,KAAK,GAAG,SAAS;CAE/D,MAAM,aAAa,gBAAgB;CAEnC,MAAM,gBAAgB,KACpBA,qBAAO,OACPA,qBAAO,SACP,cAAcA,qBAAO,UACrB,SACF;CAEA,MAAM,eAA6B;EACjC,SAAS;GACP,WAAWA,qBAAO;GAClB,OAAO;GACP,MAAM;GACN,UAAU,SAAS,UACjB,qBAAAC,UAAA,EAAA,UAAA,CACE,oBAAC,WAAD;IAAmB;IAAQ,WAAWD,qBAAO;GAAO,CAAA,GACnD,MAAM,QACP,EAAA,CAAA,CACH;EACH;EACA,SAAS;GACP,WAAWA,qBAAO;GAClB,QAAQ,EACN,MAAM,IACR;GACA,aAAa;IACX,eAAe;IACf,MAAM;GACR;EACF;CACF;CAEA,OACE,oBAAC,SAAD;EAAO,GAAI;EAAM,WAAW;EAAoB;EAC9C,UAAA,oBAAC,qBAAD,EAAA,UACE,oBAAC,sBAAD;GAAsB,OAAO;GAAc,cAAc,CAAC,MAAM;GAC7D;EACmB,CAAA,EACH,CAAA;CAChB,CAAA;AAEX,CAAC"}
|
package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { useDesignTokens } from "../../../../lib/theming/hooks/useDesignTokens.mjs";
|
|
4
4
|
import { useCartesianChartContext } from "../../context.mjs";
|
|
5
|
+
import { useTickLabelWidth } from "../../hooks/useTickLabelWidth.mjs";
|
|
5
6
|
import { TypedYAxis } from "./types.mjs";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import * as Recharts from "recharts";
|
|
@@ -20,17 +21,34 @@ var YAxis = (props) => {
|
|
|
20
21
|
const { domain, type = "auto", width, ...rest } = props;
|
|
21
22
|
const tokens = useDesignTokens();
|
|
22
23
|
const { layout } = useCartesianChartContext();
|
|
23
|
-
const
|
|
24
|
+
const tickLabels = useTickLabelWidth();
|
|
25
|
+
const isAutoWidth = (width ?? (type === "category" || type === "auto" && layout === "vertical" ? "auto" : void 0)) === "auto";
|
|
26
|
+
const tickMargin = parseInt(tokens.axis.spacing.value);
|
|
27
|
+
const tickSize = parseInt(tokens.axis["tick-size"].value);
|
|
28
|
+
const tickFill = tokens.axis["color"].value;
|
|
29
|
+
const autoWidth = tickLabels.width === void 0 ? "auto" : tickLabels.width + tickSize + tickMargin;
|
|
30
|
+
const measuredTick = (tickProps) => {
|
|
31
|
+
const { payload, index, tickFormatter } = tickProps;
|
|
32
|
+
const value = `${tickFormatter ? tickFormatter(payload.value, index) : payload.value}${rest.unit ?? ""}`;
|
|
33
|
+
return /* @__PURE__ */ jsx(Recharts.Text, {
|
|
34
|
+
...tickProps,
|
|
35
|
+
ref: tickLabels.labelRef,
|
|
36
|
+
className: "recharts-cartesian-axis-tick-value",
|
|
37
|
+
fill: tickFill,
|
|
38
|
+
width: void 0,
|
|
39
|
+
children: value
|
|
40
|
+
});
|
|
41
|
+
};
|
|
24
42
|
return /* @__PURE__ */ jsx(Recharts.YAxis, {
|
|
25
43
|
...rest,
|
|
26
44
|
allowDataOverflow: true,
|
|
27
45
|
domain,
|
|
28
46
|
type,
|
|
29
|
-
width:
|
|
47
|
+
width: isAutoWidth ? autoWidth : width,
|
|
30
48
|
fontSize: tokens.axis["font-size"].value,
|
|
31
|
-
tick: { fill:
|
|
32
|
-
tickMargin
|
|
33
|
-
tickSize
|
|
49
|
+
tick: isAutoWidth ? measuredTick : { fill: tickFill },
|
|
50
|
+
tickMargin,
|
|
51
|
+
tickSize
|
|
34
52
|
});
|
|
35
53
|
};
|
|
36
54
|
//#endregion
|
package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YAxis.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/YAxis/YAxis.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type {\n ChartDataValue,\n DataKey,\n DataKeyValue,\n} from \"@/components/CartesianChart/types\";\nimport { useCartesianChartContext } from \"@/components/CartesianChart/context\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\nexport type YAxisProps<\n TData extends ChartDataValue = ChartDataValue,\n TDataKey extends DataKey<TData> = DataKey<TData>,\n TDataMatch = DataKeyValue<TData, TDataKey>,\n> = Pick<\n Recharts.YAxisProps,\n | \"className\"\n | \"orientation\"\n | \"allowDecimals\"\n | \"interval\"\n | \"minTickGap\"\n | \"scale\"\n | \"type\"\n | \"domain\"\n | \"hide\"\n | \"unit\"\n> & {\n dataKey?: TDataKey;\n tickFormatter?: (value: TDataMatch, index: number) => string;\n /**\n * The width of the axis in pixels. `\"auto\"` sizes the axis to its widest tick\n * label. Defaults to `\"auto\"` for a category axis (e.g. with `layout` set to\n * `\"vertical\"`) and to `60` otherwise. Pin a number to align the plot areas\n * of synchronized charts.\n */\n width?: number | \"auto\";\n};\n\n/**\n * `tickFormatter` is deliberately not part of the remote surface. A function\n * property crosses the boundary as a thread proxy whose call returns a Promise,\n * and recharts concatenates the formatter's result straight into the tick label\n * — so remotely every tick rendered `[object Promise]`. Dropping it from the\n * remote surface leaves the raw value there; the prop keeps working locally.\n *\n * @flr-generate all\n * @flr-ignore-props tickFormatter\n */\nexport const YAxis: FC<YAxisProps> = (props) => {\n const { domain, type = \"auto\", width, ...rest } = props;\n\n const tokens = useDesignTokens();\n const { layout } = useCartesianChartContext();\n\n const isCategoryAxis =\n type === \"category\" || (type === \"auto\" && layout === \"vertical\");\n\n return (\n <Recharts.YAxis\n {...rest}\n allowDataOverflow\n domain={domain}\n type={type}\n width={
|
|
1
|
+
{"version":3,"file":"YAxis.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/YAxis/YAxis.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type {\n ChartDataValue,\n DataKey,\n DataKeyValue,\n} from \"@/components/CartesianChart/types\";\nimport { useCartesianChartContext } from \"@/components/CartesianChart/context\";\nimport { useDesignTokens } from \"@/lib/theming\";\nimport { useTickLabelWidth } from \"@/components/CartesianChart/hooks/useTickLabelWidth\";\n\nexport type YAxisProps<\n TData extends ChartDataValue = ChartDataValue,\n TDataKey extends DataKey<TData> = DataKey<TData>,\n TDataMatch = DataKeyValue<TData, TDataKey>,\n> = Pick<\n Recharts.YAxisProps,\n | \"className\"\n | \"orientation\"\n | \"allowDecimals\"\n | \"interval\"\n | \"minTickGap\"\n | \"scale\"\n | \"type\"\n | \"domain\"\n | \"hide\"\n | \"unit\"\n> & {\n dataKey?: TDataKey;\n tickFormatter?: (value: TDataMatch, index: number) => string;\n /**\n * The width of the axis in pixels. `\"auto\"` sizes the axis to its widest tick\n * label. Defaults to `\"auto\"` for a category axis (e.g. with `layout` set to\n * `\"vertical\"`) and to `60` otherwise. Pin a number to align the plot areas\n * of synchronized charts.\n */\n width?: number | \"auto\";\n};\n\n/**\n * `tickFormatter` is deliberately not part of the remote surface. A function\n * property crosses the boundary as a thread proxy whose call returns a Promise,\n * and recharts concatenates the formatter's result straight into the tick label\n * — so remotely every tick rendered `[object Promise]`. Dropping it from the\n * remote surface leaves the raw value there; the prop keeps working locally.\n *\n * @flr-generate all\n * @flr-ignore-props tickFormatter\n */\nexport const YAxis: FC<YAxisProps> = (props) => {\n const { domain, type = \"auto\", width, ...rest } = props;\n\n const tokens = useDesignTokens();\n const { layout } = useCartesianChartContext();\n const tickLabels = useTickLabelWidth();\n\n const isCategoryAxis =\n type === \"category\" || (type === \"auto\" && layout === \"vertical\");\n const isAutoWidth =\n (width ?? (isCategoryAxis ? \"auto\" : undefined)) === \"auto\";\n\n const tickMargin = parseInt(tokens.axis.spacing.value);\n const tickSize = parseInt(tokens.axis[\"tick-size\"].value);\n const tickFill = tokens.axis[\"color\"].value;\n\n /*\n * Recharts' own `\"auto\"` stays in charge until the labels are measured, so\n * the first frame is close already.\n */\n const autoWidth =\n tickLabels.width === undefined\n ? \"auto\"\n : tickLabels.width + tickSize + tickMargin;\n\n /*\n * Recharts' default tick label, plus the measuring ref. Recharts passes a\n * numeric axis width on to the label, which wraps once the text is wider —\n * so the label drops it, as it does with `\"auto\"`.\n */\n const measuredTick = (tickProps: Recharts.YAxisTickContentProps) => {\n const { payload, index, tickFormatter } = tickProps;\n const value = `${tickFormatter ? tickFormatter(payload.value, index) : payload.value}${rest.unit ?? \"\"}`;\n return (\n <Recharts.Text\n {...tickProps}\n ref={tickLabels.labelRef}\n className=\"recharts-cartesian-axis-tick-value\"\n fill={tickFill}\n width={undefined}\n >\n {value}\n </Recharts.Text>\n );\n };\n\n return (\n <Recharts.YAxis\n {...rest}\n allowDataOverflow\n domain={domain}\n type={type}\n width={isAutoWidth ? autoWidth : width}\n fontSize={tokens.axis[\"font-size\"].value}\n tick={isAutoWidth ? measuredTick : { fill: tickFill }}\n tickMargin={tickMargin}\n tickSize={tickSize}\n />\n );\n};\n\nexport { TypedYAxis } from \"./types\";\n\nexport default YAxis;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiDA,IAAa,SAAyB,UAAU;CAC9C,MAAM,EAAE,QAAQ,OAAO,QAAQ,OAAO,GAAG,SAAS;CAElD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,EAAE,WAAW,yBAAyB;CAC5C,MAAM,aAAa,kBAAkB;CAIrC,MAAM,eACH,UAFD,SAAS,cAAe,SAAS,UAAU,WAAW,aAE1B,SAAS,KAAA,QAAgB;CAEvD,MAAM,aAAa,SAAS,OAAO,KAAK,QAAQ,KAAK;CACrD,MAAM,WAAW,SAAS,OAAO,KAAK,YAAY,CAAC,KAAK;CACxD,MAAM,WAAW,OAAO,KAAK,QAAQ,CAAC;CAMtC,MAAM,YACJ,WAAW,UAAU,KAAA,IACjB,SACA,WAAW,QAAQ,WAAW;CAOpC,MAAM,gBAAgB,cAA8C;EAClE,MAAM,EAAE,SAAS,OAAO,kBAAkB;EAC1C,MAAM,QAAQ,GAAG,gBAAgB,cAAc,QAAQ,OAAO,KAAK,IAAI,QAAQ,QAAQ,KAAK,QAAQ;EACpG,OACE,oBAAC,SAAS,MAAV;GACE,GAAI;GACJ,KAAK,WAAW;GAChB,WAAU;GACV,MAAM;GACN,OAAO,KAAA;GAEN,UAAA;EACY,CAAA;CAEnB;CAEA,OACE,oBAAC,SAAS,OAAV;EACE,GAAI;EACJ,mBAAA;EACQ;EACF;EACN,OAAO,cAAc,YAAY;EACjC,UAAU,OAAO,KAAK,YAAY,CAAC;EACnC,MAAM,cAAc,eAAe,EAAE,MAAM,SAAS;EACxC;EACF;CACX,CAAA;AAEL"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { createFrameResizeObserver } from "../../../lib/dom/createFrameResizeObserver.mjs";
|
|
4
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
|
+
//#region src/components/CartesianChart/hooks/useTickLabelWidth.ts
|
|
6
|
+
var measureLabel = (label) => {
|
|
7
|
+
try {
|
|
8
|
+
return label.getBBox().width;
|
|
9
|
+
} catch {
|
|
10
|
+
return 0;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Measures the widest tick label of an axis, for an axis that sizes itself to
|
|
15
|
+
* its labels.
|
|
16
|
+
*
|
|
17
|
+
* Replaces recharts' own `width="auto"` measurement, which undersizes the axis
|
|
18
|
+
* in two ways. It reads `getBoundingClientRect()` — screen pixels, which a CSS
|
|
19
|
+
* `zoom` or `transform` on an ancestor scales — and uses the result as SVG user
|
|
20
|
+
* units. And it measures once, so a web font that replaces its fallback after
|
|
21
|
+
* mount widens the labels past the axis. `getBBox()` measures in user units,
|
|
22
|
+
* and a `ResizeObserver` — which tracks an SVG element's bbox — measures again
|
|
23
|
+
* whenever a label changes size: a font swap, a new text, a hidden chart that
|
|
24
|
+
* is shown.
|
|
25
|
+
*
|
|
26
|
+
* Attach the returned ref to every tick label. The width is `undefined` until a
|
|
27
|
+
* label has been measured.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
var useTickLabelWidth = () => {
|
|
32
|
+
const labels = useRef(/* @__PURE__ */ new Set());
|
|
33
|
+
const observer = useRef(null);
|
|
34
|
+
const [width, setWidth] = useState();
|
|
35
|
+
const measure = useCallback(() => {
|
|
36
|
+
const widest = Math.max(0, ...[...labels.current].map(measureLabel));
|
|
37
|
+
setWidth(widest > 0 ? Math.ceil(widest) : void 0);
|
|
38
|
+
}, []);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
41
|
+
const frameObserver = createFrameResizeObserver(measure);
|
|
42
|
+
frameObserver.observe(labels.current);
|
|
43
|
+
observer.current = frameObserver;
|
|
44
|
+
return () => {
|
|
45
|
+
frameObserver.disconnect();
|
|
46
|
+
observer.current = null;
|
|
47
|
+
};
|
|
48
|
+
}, [measure]);
|
|
49
|
+
return {
|
|
50
|
+
width,
|
|
51
|
+
labelRef: useCallback((label) => {
|
|
52
|
+
if (!label) return;
|
|
53
|
+
labels.current.add(label);
|
|
54
|
+
observer.current?.observe(labels.current);
|
|
55
|
+
measure();
|
|
56
|
+
return () => {
|
|
57
|
+
labels.current.delete(label);
|
|
58
|
+
observer.current?.observe(labels.current);
|
|
59
|
+
measure();
|
|
60
|
+
};
|
|
61
|
+
}, [measure])
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { useTickLabelWidth };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=useTickLabelWidth.mjs.map
|
package/dist/js/packages/components/src/components/CartesianChart/hooks/useTickLabelWidth.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTickLabelWidth.mjs","names":[],"sources":["../../../../../../../../src/components/CartesianChart/hooks/useTickLabelWidth.ts"],"sourcesContent":["import {\n type RefCallback,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from \"react\";\nimport {\n createFrameResizeObserver,\n type FrameResizeObserver,\n} from \"@/lib/dom/createFrameResizeObserver\";\n\nconst measureLabel = (label: SVGTextElement): number => {\n try {\n return label.getBBox().width;\n } catch {\n // Firefox throws for an element that is not rendered, and jsdom has no\n // `getBBox` at all.\n return 0;\n }\n};\n\n/**\n * Measures the widest tick label of an axis, for an axis that sizes itself to\n * its labels.\n *\n * Replaces recharts' own `width=\"auto\"` measurement, which undersizes the axis\n * in two ways. It reads `getBoundingClientRect()` — screen pixels, which a CSS\n * `zoom` or `transform` on an ancestor scales — and uses the result as SVG user\n * units. And it measures once, so a web font that replaces its fallback after\n * mount widens the labels past the axis. `getBBox()` measures in user units,\n * and a `ResizeObserver` — which tracks an SVG element's bbox — measures again\n * whenever a label changes size: a font swap, a new text, a hidden chart that\n * is shown.\n *\n * Attach the returned ref to every tick label. The width is `undefined` until a\n * label has been measured.\n *\n * @internal\n */\nexport const useTickLabelWidth = () => {\n const labels = useRef(new Set<SVGTextElement>());\n const observer = useRef<FrameResizeObserver>(null);\n const [width, setWidth] = useState<number>();\n\n const measure = useCallback(() => {\n const widest = Math.max(0, ...[...labels.current].map(measureLabel));\n setWidth(widest > 0 ? Math.ceil(widest) : undefined);\n }, []);\n\n useEffect(() => {\n // jsdom has no `ResizeObserver`.\n if (typeof ResizeObserver === \"undefined\") {\n return;\n }\n const frameObserver = createFrameResizeObserver(measure);\n frameObserver.observe(labels.current);\n observer.current = frameObserver;\n return () => {\n frameObserver.disconnect();\n observer.current = null;\n };\n }, [measure]);\n\n const labelRef: RefCallback<SVGTextElement> = useCallback(\n (label) => {\n if (!label) {\n return;\n }\n labels.current.add(label);\n observer.current?.observe(labels.current);\n measure();\n return () => {\n labels.current.delete(label);\n observer.current?.observe(labels.current);\n measure();\n };\n },\n [measure],\n );\n\n return { width, labelRef };\n};\n"],"mappings":";;;;;AAYA,IAAM,gBAAgB,UAAkC;CACtD,IAAI;EACF,OAAO,MAAM,QAAQ,CAAC,CAAC;CACzB,QAAQ;EAGN,OAAO;CACT;AACF;;;;;;;;;;;;;;;;;;;AAoBA,IAAa,0BAA0B;CACrC,MAAM,SAAS,uBAAO,IAAI,IAAoB,CAAC;CAC/C,MAAM,WAAW,OAA4B,IAAI;CACjD,MAAM,CAAC,OAAO,YAAY,SAAiB;CAE3C,MAAM,UAAU,kBAAkB;EAChC,MAAM,SAAS,KAAK,IAAI,GAAG,GAAG,CAAC,GAAG,OAAO,OAAO,CAAC,CAAC,IAAI,YAAY,CAAC;EACnE,SAAS,SAAS,IAAI,KAAK,KAAK,MAAM,IAAI,KAAA,CAAS;CACrD,GAAG,CAAC,CAAC;CAEL,gBAAgB;EAEd,IAAI,OAAO,mBAAmB,aAC5B;EAEF,MAAM,gBAAgB,0BAA0B,OAAO;EACvD,cAAc,QAAQ,OAAO,OAAO;EACpC,SAAS,UAAU;EACnB,aAAa;GACX,cAAc,WAAW;GACzB,SAAS,UAAU;EACrB;CACF,GAAG,CAAC,OAAO,CAAC;CAmBZ,OAAO;EAAE;EAAO,UAjB8B,aAC3C,UAAU;GACT,IAAI,CAAC,OACH;GAEF,OAAO,QAAQ,IAAI,KAAK;GACxB,SAAS,SAAS,QAAQ,OAAO,OAAO;GACxC,QAAQ;GACR,aAAa;IACX,OAAO,QAAQ,OAAO,KAAK;IAC3B,SAAS,SAAS,QAAQ,OAAO,OAAO;IACxC,QAAQ;GACV;EACF,GACA,CAAC,OAAO,CAGM;CAAS;AAC3B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
4
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
5
|
+
import { useRegisterSectionHeading } from "../Section/context.mjs";
|
|
5
6
|
import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
|
|
6
7
|
import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
|
|
7
8
|
import { styleClassname } from "../../lib/scss/selectors.mjs";
|
|
@@ -25,6 +26,7 @@ var sizeByLevel = {
|
|
|
25
26
|
/** @flr-generate all */
|
|
26
27
|
var Heading = flowComponent("Heading", (props) => {
|
|
27
28
|
const { children, className, level = 2, color = "default", wrap, size, ref, elementType, ...rest } = props;
|
|
29
|
+
useRegisterSectionHeading(rest.id);
|
|
28
30
|
const isSkeleton = useSkeletonMode();
|
|
29
31
|
const rootClassName = clsx(Heading_module_default.heading, size && Heading_module_default[`size-${size}`], color !== "default" && Heading_module_default[color], wrap && Heading_module_default[`wrap-${wrap}`], styleClassname(Heading_module_default, `h${level}`), className);
|
|
30
32
|
const Element = elementType ?? Aria.Heading;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.mjs","names":["styles"],"sources":["../../../../../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import type { AlphaColor, PropsWithElementType } from \"@/lib/types/props\";\nimport styles from \"./Heading.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { Children } from \"react\";\nimport { SkeletonTextContent } from \"@/components/SkeletonMode/components/SkeletonTextContent\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface HeadingProps\n extends\n Aria.HeadingProps,\n FlowComponentProps,\n PropsWithElementType<\"span\" | \"p\"> {\n /** The font size of the heading. */\n size?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\";\n /** The color of the heading. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n /** The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\";\n}\n\n/**\n * The font size each heading level renders at — the TypeScript half of the\n * level-based `--font-size` rules in Heading.module.scss. Levels 4 to 6 fall\n * through to the `xs` default.\n */\nconst sizeByLevel: Record<number, NonNullable<HeadingProps[\"size\"]>> = {\n 1: \"xl\",\n 2: \"m\",\n 3: \"s\",\n};\n\n/** @flr-generate all */\nexport const Heading = flowComponent(\"Heading\", (props) => {\n const {\n children,\n className,\n level = 2,\n color = \"default\",\n wrap,\n size,\n ref,\n elementType,\n ...rest\n } = props;\n\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = clsx(\n styles.heading,\n size && styles[`size-${size}`],\n color !== \"default\" && styles[color],\n wrap && styles[`wrap-${wrap}`],\n // The level class carries the font size. Emitted for every heading — not\n // just the `elementType` ones — so the stylesheet can select on the class\n // instead of the h1–h6 element react-aria renders without one.\n styleClassname(styles, `h${level}`),\n className,\n );\n\n const Element = elementType ?? Aria.Heading;\n\n const effectiveSize = size ?? sizeByLevel[level] ?? \"xs\";\n const buttonSize =\n effectiveSize === \"xl\" || effectiveSize === \"xxl\" ? \"m\" : \"s\";\n\n const propsContext: PropsContext = {\n Icon: {\n \"aria-hidden\": true,\n className: styles.icon,\n },\n AlertBadge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Badge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Button: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n CopyButton: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n ContextualHelpTrigger: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n Button: {\n tunnel: null,\n },\n },\n AlertText: {\n Icon: {\n className: styles.icon,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element\n className={rootClassName}\n {...rest}\n ref={ref}\n level={level}\n inert={isSkeleton || undefined}\n >\n <span className={styles.headingText}>\n <SkeletonTextContent defaultWidth=\"12em\">\n {children}\n </SkeletonTextContent>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.count(items) > 0 && (\n <span className={styles.headingTextSpacer} />\n )\n }\n </UiComponentTunnelExit>\n </span>\n <span className={styles.headingContent}>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.map(items, (item) => (\n <span className={styles.headingContentItem}>{item}</span>\n ))\n }\n </UiComponentTunnelExit>\n </span>\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Heading;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Heading.mjs","names":["styles"],"sources":["../../../../../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import type { AlphaColor, PropsWithElementType } from \"@/lib/types/props\";\nimport styles from \"./Heading.module.scss\";\nimport { styleClassname } from \"@/lib/scss/selectors\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { Children } from \"react\";\nimport { SkeletonTextContent } from \"@/components/SkeletonMode/components/SkeletonTextContent\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { useRegisterSectionHeading } from \"@/components/Section/context\";\n\nexport interface HeadingProps\n extends\n Aria.HeadingProps,\n FlowComponentProps,\n PropsWithElementType<\"span\" | \"p\"> {\n /** The font size of the heading. */\n size?: \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\";\n /** The color of the heading. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n /** The text-wrap property of the text. @default undefined */\n wrap?: \"wrap\" | \"balance\";\n}\n\n/**\n * The font size each heading level renders at — the TypeScript half of the\n * level-based `--font-size` rules in Heading.module.scss. Levels 4 to 6 fall\n * through to the `xs` default.\n */\nconst sizeByLevel: Record<number, NonNullable<HeadingProps[\"size\"]>> = {\n 1: \"xl\",\n 2: \"m\",\n 3: \"s\",\n};\n\n/** @flr-generate all */\nexport const Heading = flowComponent(\"Heading\", (props) => {\n const {\n children,\n className,\n level = 2,\n color = \"default\",\n wrap,\n size,\n ref,\n elementType,\n ...rest\n } = props;\n\n useRegisterSectionHeading(rest.id);\n\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = clsx(\n styles.heading,\n size && styles[`size-${size}`],\n color !== \"default\" && styles[color],\n wrap && styles[`wrap-${wrap}`],\n // The level class carries the font size. Emitted for every heading — not\n // just the `elementType` ones — so the stylesheet can select on the class\n // instead of the h1–h6 element react-aria renders without one.\n styleClassname(styles, `h${level}`),\n className,\n );\n\n const Element = elementType ?? Aria.Heading;\n\n const effectiveSize = size ?? sizeByLevel[level] ?? \"xs\";\n const buttonSize =\n effectiveSize === \"xl\" || effectiveSize === \"xxl\" ? \"m\" : \"s\";\n\n const propsContext: PropsContext = {\n Icon: {\n \"aria-hidden\": true,\n className: styles.icon,\n },\n AlertBadge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Badge: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n },\n Button: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n CopyButton: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n size: buttonSize,\n },\n ContextualHelpTrigger: {\n tunnel: {\n id: \"headingContent\",\n component: \"Heading\",\n },\n Button: {\n tunnel: null,\n },\n },\n AlertText: {\n Icon: {\n className: styles.icon,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element\n className={rootClassName}\n {...rest}\n ref={ref}\n level={level}\n inert={isSkeleton || undefined}\n >\n <span className={styles.headingText}>\n <SkeletonTextContent defaultWidth=\"12em\">\n {children}\n </SkeletonTextContent>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.count(items) > 0 && (\n <span className={styles.headingTextSpacer} />\n )\n }\n </UiComponentTunnelExit>\n </span>\n <span className={styles.headingContent}>\n <UiComponentTunnelExit id=\"headingContent\" component=\"Heading\">\n {(items) =>\n Children.map(items, (item) => (\n <span className={styles.headingContentItem}>{item}</span>\n ))\n }\n </UiComponentTunnelExit>\n </span>\n </Element>\n </PropsContextProvider>\n );\n});\n\nexport default Heading;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiCA,IAAM,cAAiE;CACrE,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AAGA,IAAa,UAAU,cAAc,YAAY,UAAU;CACzD,MAAM,EACJ,UACA,WACA,QAAQ,GACR,QAAQ,WACR,MACA,MACA,KACA,aACA,GAAG,SACD;CAEJ,0BAA0B,KAAK,EAAE;CAEjC,MAAM,aAAa,gBAAgB;CAEnC,MAAM,gBAAgB,KACpBA,uBAAO,SACP,QAAQA,uBAAO,QAAQ,SACvB,UAAU,aAAaA,uBAAO,QAC9B,QAAQA,uBAAO,QAAQ,SAIvB,eAAeA,wBAAQ,IAAI,OAAO,GAClC,SACF;CAEA,MAAM,UAAU,eAAe,KAAK;CAEpC,MAAM,gBAAgB,QAAQ,YAAY,UAAU;CACpD,MAAM,aACJ,kBAAkB,QAAQ,kBAAkB,QAAQ,MAAM;CAE5D,MAAM,eAA6B;EACjC,MAAM;GACJ,eAAe;GACf,WAAWA,uBAAO;EACpB;EACA,YAAY,EACV,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,OAAO,EACL,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,QAAQ;GACN,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,YAAY;GACV,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,MAAM;EACR;EACA,uBAAuB;GACrB,QAAQ;IACN,IAAI;IACJ,WAAW;GACb;GACA,QAAQ,EACN,QAAQ,KACV;EACF;EACA,WAAW,EACT,MAAM,EACJ,WAAWA,uBAAO,KACpB,EACF;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,SAAD;GACE,WAAW;GACX,GAAI;GACC;GACE;GACP,OAAO,cAAc,KAAA;GALvB,UAAA,CAOE,qBAAC,QAAD;IAAM,WAAWA,uBAAO;IAAxB,UAAA,CACE,oBAAC,qBAAD;KAAqB,cAAa;KAC/B;IACkB,CAAA,GACrB,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,UACA,SAAS,MAAM,KAAK,IAAI,KACtB,oBAAC,QAAD,EAAM,WAAWA,uBAAO,kBAAoB,CAAA;IAG3B,CAAA,CACnB;GACN,CAAA,GAAA,oBAAC,QAAD;IAAM,WAAWA,uBAAO;IACtB,UAAA,oBAAC,uBAAD;KAAuB,IAAG;KAAiB,WAAU;KACjD,WAAA,UACA,SAAS,IAAI,QAAQ,SACnB,oBAAC,QAAD;MAAM,WAAWA,uBAAO;MAAqB,UAAA;KAAW,CAAA,CACzD;IAEkB,CAAA;GACnB,CAAA,CACC;;CACW,CAAA;AAE1B,CAAC"}
|
package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
4
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
5
|
+
import { SectionHeadingReset } from "../Section/context.mjs";
|
|
5
6
|
import { isAlphaColor } from "../../lib/types/props.mjs";
|
|
6
7
|
import IllustratedMessage_module_default from "./IllustratedMessage.module.mjs";
|
|
7
8
|
import clsx from "clsx";
|
|
@@ -35,10 +36,10 @@ var IllustratedMessage = flowComponent("IllustratedMessage", (props) => {
|
|
|
35
36
|
return /* @__PURE__ */ jsx("div", {
|
|
36
37
|
...rest,
|
|
37
38
|
className: rootClassName,
|
|
38
|
-
children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
39
|
+
children: /* @__PURE__ */ jsx(SectionHeadingReset, { children: /* @__PURE__ */ jsx(PropsContextProvider, {
|
|
39
40
|
props: propsContext,
|
|
40
41
|
children
|
|
41
|
-
})
|
|
42
|
+
}) })
|
|
42
43
|
});
|
|
43
44
|
});
|
|
44
45
|
//#endregion
|
package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IllustratedMessage.mjs","names":["styles"],"sources":["../../../../../../../src/components/IllustratedMessage/IllustratedMessage.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./IllustratedMessage.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\n\nexport interface IllustratedMessageProps\n extends PropsWithChildren<ComponentProps<\"div\">>, FlowComponentProps {\n /** The color of the illustrated message. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n}\n\n/** @flr-generate all */\nexport const IllustratedMessage = flowComponent(\n \"IllustratedMessage\",\n (props) => {\n const { className, children, color = \"default\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.illustratedMessage,\n color !== \"default\" && styles[color],\n className,\n );\n\n const alphaColor = isAlphaColor(color) ? color : undefined;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n size: \"l\",\n },\n Heading: {\n className: styles.heading,\n color,\n },\n Text: {\n className: styles.text,\n color: alphaColor,\n },\n Button: {\n color: alphaColor,\n },\n ActionGroup: {\n preserveOrder: true,\n className: styles.actionGroup,\n },\n ProgressBar: { className: styles.progressBar },\n };\n\n return (\n <div {...rest} className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n
|
|
1
|
+
{"version":3,"file":"IllustratedMessage.mjs","names":["styles"],"sources":["../../../../../../../src/components/IllustratedMessage/IllustratedMessage.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./IllustratedMessage.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\n\nexport interface IllustratedMessageProps\n extends PropsWithChildren<ComponentProps<\"div\">>, FlowComponentProps {\n /** The color of the illustrated message. @default \"default\" */\n color?: \"default\" | \"danger\" | \"unavailable\" | AlphaColor;\n}\n\n/** @flr-generate all */\nexport const IllustratedMessage = flowComponent(\n \"IllustratedMessage\",\n (props) => {\n const { className, children, color = \"default\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.illustratedMessage,\n color !== \"default\" && styles[color],\n className,\n );\n\n const alphaColor = isAlphaColor(color) ? color : undefined;\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n size: \"l\",\n },\n Heading: {\n className: styles.heading,\n color,\n },\n Text: {\n className: styles.text,\n color: alphaColor,\n },\n Button: {\n color: alphaColor,\n },\n ActionGroup: {\n preserveOrder: true,\n className: styles.actionGroup,\n },\n ProgressBar: { className: styles.progressBar },\n };\n\n return (\n <div {...rest} className={rootClassName}>\n <SectionHeadingReset>\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </SectionHeadingReset>\n </div>\n );\n },\n);\n\nexport default IllustratedMessage;\n"],"mappings":";;;;;;;;;;;AAmBA,IAAa,qBAAqB,cAChC,uBACC,UAAU;CACT,MAAM,EAAE,WAAW,UAAU,QAAQ,WAAW,GAAG,SAAS;CAE5D,MAAM,gBAAgB,KACpBA,kCAAO,oBACP,UAAU,aAAaA,kCAAO,QAC9B,SACF;CAEA,MAAM,aAAa,aAAa,KAAK,IAAI,QAAQ,KAAA;CAEjD,MAAM,eAA6B;EACjC,MAAM;GACJ,WAAWA,kCAAO;GAClB,MAAM;EACR;EACA,SAAS;GACP,WAAWA,kCAAO;GAClB;EACF;EACA,MAAM;GACJ,WAAWA,kCAAO;GAClB,OAAO;EACT;EACA,QAAQ,EACN,OAAO,WACT;EACA,aAAa;GACX,eAAe;GACf,WAAWA,kCAAO;EACpB;EACA,aAAa,EAAE,WAAWA,kCAAO,YAAY;CAC/C;CAEA,OACE,oBAAC,OAAD;EAAK,GAAI;EAAM,WAAW;EACxB,UAAA,oBAAC,qBAAD,EAAA,UACE,oBAAC,sBAAD;GAAsB,OAAO;GAC1B;EACmB,CAAA,EACH,CAAA;CAClB,CAAA;AAET,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.mjs","names":["locales","styles"],"sources":["../../../../../../../src/components/Label/Label.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport styles from \"./Label.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport {\n overlayTriggersTunneledTo,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { SkeletonTextContent } from \"@/components/SkeletonMode/components/SkeletonTextContent\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\nexport interface LabelProps\n extends\n PropsWithChildren<Omit<Aria.LabelProps, \"children\">>,\n FlowComponentProps<HTMLLabelElement> {\n /** Whether the label should show an \"optional\" indicator. */\n optional?: boolean;\n /** Whether the label should be displayed as disabled. */\n isDisabled?: boolean;\n /** @internal */\n unstyled?: boolean;\n}\n\n/** @flr-generate all */\nexport const Label = flowComponent(\"Label\", (props) => {\n const {\n children,\n className,\n optional,\n isDisabled,\n ref,\n unstyled = false,\n ...rest\n } = props;\n\n const [labelProps, labelRef] = Aria.useContextProps(\n rest,\n ref,\n Aria.LabelContext,\n );\n const { id, ...rootProps } = labelProps;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Label\");\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = unstyled\n ? className\n : clsx(styles.label, isDisabled && styles.disabled, className);\n\n const optionalMarker = (\n <span className={styles.optional}>\n {stringFormatter.format(\"optional\")}\n </span>\n );\n\n const rightTunnel = {\n id: \"right\",\n component: \"Label\",\n } as const;\n\n const propsContext: PropsContext = {\n ...overlayTriggersTunneledTo(rightTunnel),\n // The contextual help sits next to the label text, not with the actions.\n ContextualHelpTrigger: {\n tunnel: {\n id: \"contextualHelp\",\n component: \"Label\",\n },\n },\n Button: {\n tunnel: rightTunnel,\n size: \"s\",\n },\n
|
|
1
|
+
{"version":3,"file":"Label.mjs","names":["locales","styles"],"sources":["../../../../../../../src/components/Label/Label.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport styles from \"./Label.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport {\n overlayTriggersTunneledTo,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport { SkeletonTextContent } from \"@/components/SkeletonMode/components/SkeletonTextContent\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\nexport interface LabelProps\n extends\n PropsWithChildren<Omit<Aria.LabelProps, \"children\">>,\n FlowComponentProps<HTMLLabelElement> {\n /** Whether the label should show an \"optional\" indicator. */\n optional?: boolean;\n /** Whether the label should be displayed as disabled. */\n isDisabled?: boolean;\n /** @internal */\n unstyled?: boolean;\n}\n\n/** @flr-generate all */\nexport const Label = flowComponent(\"Label\", (props) => {\n const {\n children,\n className,\n optional,\n isDisabled,\n ref,\n unstyled = false,\n ...rest\n } = props;\n\n const [labelProps, labelRef] = Aria.useContextProps(\n rest,\n ref,\n Aria.LabelContext,\n );\n const { id, ...rootProps } = labelProps;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Label\");\n const isSkeleton = useSkeletonMode();\n\n const rootClassName = unstyled\n ? className\n : clsx(styles.label, isDisabled && styles.disabled, className);\n\n const optionalMarker = (\n <span className={styles.optional}>\n {stringFormatter.format(\"optional\")}\n </span>\n );\n\n const rightTunnel = {\n id: \"right\",\n component: \"Label\",\n } as const;\n\n const propsContext: PropsContext = {\n ...overlayTriggersTunneledTo(rightTunnel),\n // The contextual help sits next to the label text, not with the actions.\n ContextualHelpTrigger: {\n tunnel: {\n id: \"contextualHelp\",\n component: \"Label\",\n },\n },\n Button: {\n tunnel: rightTunnel,\n size: \"s\",\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n {/* The context is already merged into `labelProps` above. */}\n <Aria.LabelContext.Provider value={null}>\n <Aria.Label\n {...rootProps}\n className={rootClassName}\n ref={labelRef}\n inert={isSkeleton || undefined}\n >\n {/*\n * Fields point `aria-labelledby` at the label's id, and the name\n * computation takes every descendant's name, buttons included. The\n * id sits on this span so the tunnelled buttons stay out of it.\n */}\n <span id={id} className={styles.text}>\n <SkeletonTextContent defaultWidth=\"6em\">\n {children}\n {optional && optionalMarker}\n </SkeletonTextContent>\n </span>\n <UiComponentTunnelExit id=\"contextualHelp\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return children;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n <UiComponentTunnelExit id=\"right\" component=\"Label\">\n {(children) => {\n if (React.Children.count(children) >= 1) {\n return <div className={styles.right}>{children}</div>;\n }\n\n return undefined;\n }}\n </UiComponentTunnelExit>\n </Aria.Label>\n </Aria.LabelContext.Provider>\n </PropsContextProvider>\n );\n});\n\nexport default Label;\n"],"mappings":";;;;;;;;;;;;;;;;;AA+BA,IAAa,QAAQ,cAAc,UAAU,UAAU;CACrD,MAAM,EACJ,UACA,WACA,UACA,YACA,KACA,WAAW,OACX,GAAG,SACD;CAEJ,MAAM,CAAC,YAAY,YAAY,KAAK,gBAClC,MACA,KACA,KAAK,YACP;CACA,MAAM,EAAE,IAAI,GAAG,cAAc;CAE7B,MAAM,kBAAkB,4BAA4BA,kBAAS,OAAO;CACpE,MAAM,aAAa,gBAAgB;CAEnC,MAAM,gBAAgB,WAClB,YACA,KAAKC,qBAAO,OAAO,cAAcA,qBAAO,UAAU,SAAS;CAE/D,MAAM,iBACJ,oBAAC,QAAD;EAAM,WAAWA,qBAAO;EACrB,UAAA,gBAAgB,OAAO,UAAU;CAC9B,CAAA;CAGR,MAAM,cAAc;EAClB,IAAI;EACJ,WAAW;CACb;CAEA,MAAM,eAA6B;EACjC,GAAG,0BAA0B,WAAW;EAExC,uBAAuB,EACrB,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;EACA,QAAQ;GACN,QAAQ;GACR,MAAM;EACR;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAE3B,UAAA,oBAAC,KAAK,aAAa,UAAnB;GAA4B,OAAO;GACjC,UAAA,qBAAC,KAAK,OAAN;IACE,GAAI;IACJ,WAAW;IACX,KAAK;IACL,OAAO,cAAc,KAAA;IAJvB,UAAA;KAWE,oBAAC,QAAD;MAAU;MAAI,WAAWA,qBAAO;MAC9B,UAAA,qBAAC,qBAAD;OAAqB,cAAa;OAAlC,UAAA,CACG,UACA,YAAY,cACM;;KACjB,CAAA;KACN,oBAAC,uBAAD;MAAuB,IAAG;MAAiB,WAAU;MACjD,WAAA,aAAa;OACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO;MAIX;KACqB,CAAA;KACvB,oBAAC,uBAAD;MAAuB,IAAG;MAAQ,WAAU;MACxC,WAAA,aAAa;OACb,IAAI,MAAM,SAAS,MAAM,QAAQ,KAAK,GACpC,OAAO,oBAAC,OAAD;QAAK,WAAWA,qBAAO;QAAQ;OAAc,CAAA;MAIxD;KACqB,CAAA;IACb;;EACc,CAAA;CACR,CAAA;AAE1B,CAAC"}
|
package/dist/js/packages/components/src/components/List/components/Items/views/GridList/GridList.mjs
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
+
import { useLabelledBySectionHeading } from "../../../../../Section/context.mjs";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import * as Aria from "react-aria-components";
|
|
5
6
|
//#region src/components/List/components/Items/views/GridList/GridList.tsx
|
|
6
7
|
/** @flr-generate all */
|
|
7
8
|
var GridList = (props) => {
|
|
8
9
|
const { tileMaxWidth, emptyView, ...rest } = props;
|
|
10
|
+
const ariaLabelledBy = useLabelledBySectionHeading(rest);
|
|
9
11
|
return /* @__PURE__ */ jsx(Aria.GridList, {
|
|
10
12
|
...rest,
|
|
13
|
+
"aria-labelledby": ariaLabelledBy,
|
|
11
14
|
renderEmptyState: () => emptyView,
|
|
12
15
|
style: { gridTemplateColumns: `repeat(auto-fill, minmax(${tileMaxWidth}px, 1fr))` }
|
|
13
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridList.mjs","names":[],"sources":["../../../../../../../../../../../src/components/List/components/Items/views/GridList/GridList.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, ReactNode } from \"react\";\n\nexport type GridListProps = Aria.GridListProps<never> & {\n tileMaxWidth: number;\n emptyView?: ReactNode;\n};\n\n/** @flr-generate all */\nexport const GridList: FC<GridListProps> = (props) => {\n const { tileMaxWidth, emptyView, ...rest } = props;\n\n return (\n <Aria.GridList\n {...rest}\n renderEmptyState={() => emptyView}\n style={{\n gridTemplateColumns: `repeat(auto-fill, minmax(${tileMaxWidth}px, 1fr))`,\n }}\n />\n );\n};\n\nexport default GridList;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GridList.mjs","names":[],"sources":["../../../../../../../../../../../src/components/List/components/Items/views/GridList/GridList.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, ReactNode } from \"react\";\nimport { useLabelledBySectionHeading } from \"@/components/Section/context\";\n\nexport type GridListProps = Aria.GridListProps<never> & {\n tileMaxWidth: number;\n emptyView?: ReactNode;\n};\n\n/** @flr-generate all */\nexport const GridList: FC<GridListProps> = (props) => {\n const { tileMaxWidth, emptyView, ...rest } = props;\n const ariaLabelledBy = useLabelledBySectionHeading(rest);\n\n return (\n <Aria.GridList\n {...rest}\n aria-labelledby={ariaLabelledBy}\n renderEmptyState={() => emptyView}\n style={{\n gridTemplateColumns: `repeat(auto-fill, minmax(${tileMaxWidth}px, 1fr))`,\n }}\n />\n );\n};\n\nexport default GridList;\n"],"mappings":";;;;;;;AAUA,IAAa,YAA+B,UAAU;CACpD,MAAM,EAAE,cAAc,WAAW,GAAG,SAAS;CAC7C,MAAM,iBAAiB,4BAA4B,IAAI;CAEvD,OACE,oBAAC,KAAK,UAAN;EACE,GAAI;EACJ,mBAAiB;EACjB,wBAAwB;EACxB,OAAO,EACL,qBAAqB,4BAA4B,aAAa,WAChE;CACD,CAAA;AAEL"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
+
import { SectionHeadingReset } from "../../Section/context.mjs";
|
|
3
4
|
import { useIsActivityActive } from "../../Activity/context.mjs";
|
|
4
5
|
import DivView from "../../../views/DivView.mjs";
|
|
5
6
|
import Overlay_module_default from "../Overlay.module.mjs";
|
|
@@ -104,7 +105,7 @@ var OverlayContent = (props) => {
|
|
|
104
105
|
fallback: /* @__PURE__ */ jsx(Fallback, {}),
|
|
105
106
|
children: /* @__PURE__ */ jsx(Aria.Dialog, {
|
|
106
107
|
"aria-labelledby": ariaLabelledBy,
|
|
107
|
-
children
|
|
108
|
+
children: /* @__PURE__ */ jsx(SectionHeadingReset, { children })
|
|
108
109
|
})
|
|
109
110
|
}) })
|
|
110
111
|
})
|
package/dist/js/packages/components/src/components/Overlay/components/OverlayContent.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayContent.mjs","names":["styles"],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n *\n * Hidden nodes don't count either: react-aria appends a `display: none`\n * description node whenever a DatePicker's value changes, and moving the\n * container for it on every keystroke resets the segment being typed into.\n */\nconst isHiddenNode = (node: Element): boolean =>\n node instanceof HTMLElement &&\n (node.hidden === true || node.style.display === \"none\");\n\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n {children}
|
|
1
|
+
{"version":3,"file":"OverlayContent.mjs","names":["styles"],"sources":["../../../../../../../../src/components/Overlay/components/OverlayContent.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport { type FC, type PropsWithChildren, type Ref, Suspense } from \"react\";\nimport { UNSAFE_PortalProvider } from \"react-aria\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { OverlaySuspenseFallback } from \"@/components/Overlay/components/OverlaySuspenseFallback\";\nimport styles from \"../Overlay.module.scss\";\nimport DivView from \"@/views/DivView\";\nimport {\n isBrowserExtensionNode,\n useKeepBrowserExtensionsInteractive,\n} from \"@/lib/hooks/dom/useKeepBrowserExtensionsInteractive\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\n\nconst overlayContainerAttribute = \"data-flow-overlays\";\n\n/**\n * Nodes a browser extension appends (e.g. 1Password's inline menu) don't count\n * as covering: they belong on top anyway, and moving the container for them\n * blurs a focused field inside it (#3268). The same heuristic also spares\n * custom elements and shadow hosts the page itself appends, which then render\n * above open overlays.\n *\n * Hidden nodes don't count either: react-aria appends a `display: none`\n * description node whenever a DatePicker's value changes, and moving the\n * container for it on every keystroke resets the segment being typed into.\n */\nconst isHiddenNode = (node: Element): boolean =>\n node instanceof HTMLElement &&\n (node.hidden === true || node.style.display === \"none\");\n\nconst isCoveredByPageContent = (container: HTMLElement): boolean => {\n for (\n let node = container.nextElementSibling;\n node;\n node = node.nextElementSibling\n ) {\n if (!isBrowserExtensionNode(node) && !isHiddenNode(node)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Only the container moves, never the nodes appended after it: those are\n * foreign, and moving them costs state we cannot restore (an iframe reloads).\n * The container's own state we can. Moving a node blurs the focused element\n * inside it and resets every scroll container inside to the top. `moveBefore`\n * keeps the focus (and, in Chromium, the scroll positions); the rest is\n * restored afterwards.\n */\nconst moveToEnd = (container: HTMLElement): void => {\n const body = document.body;\n const focused = document.activeElement;\n const scrolled = Array.from(container.querySelectorAll<HTMLElement>(\"*\"))\n .filter((element) => element.scrollTop !== 0 || element.scrollLeft !== 0)\n .map(\n (element) => [element, element.scrollTop, element.scrollLeft] as const,\n );\n\n if (typeof body.moveBefore === \"function\") {\n body.moveBefore(container, null);\n } else {\n body.append(container);\n }\n\n for (const [element, scrollTop, scrollLeft] of scrolled) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n if (\n focused instanceof HTMLElement &&\n container.contains(focused) &&\n document.activeElement !== focused\n ) {\n focused.focus({ preventScroll: true });\n }\n};\n\n/**\n * Render overlays into a dedicated container instead of `document.body`.\n *\n * React Aria `FocusScope` relies on nearby sibling nodes (sentinels + overlay).\n * Browser extensions (e.g. password managers) inject/reorder `body` children,\n * which can separate those nodes. Then focus scope detection breaks and may\n * cause recursive focus restoration.\n *\n * Keep the overlay container as the last child of body.\n *\n * React Aria normally portals overlays directly into body, so they are appended\n * last and render on top.\n *\n * If we create one persistent container only once, anything appended to body\n * later (toasts, third-party widgets, remounted app root) can render above open\n * overlays. Then overlays can appear behind page content, and the backdrop blur\n * no longer covers the page.\n */\nconst getOverlayContainer = (): HTMLElement | null => {\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const existingContainer = document.querySelector<HTMLElement>(\n `body > [${overlayContainerAttribute}]`,\n );\n\n if (existingContainer) {\n if (isCoveredByPageContent(existingContainer)) {\n moveToEnd(existingContainer);\n }\n return existingContainer;\n }\n\n const container = document.createElement(\"div\");\n container.setAttribute(overlayContainerAttribute, \"\");\n document.body.append(container);\n\n return container;\n};\n\nexport interface OverlayContentProps\n extends\n PropsWithChildren,\n PropsWithClassName,\n Pick<Aria.DialogProps, \"aria-labelledby\"> {\n ref?: Ref<HTMLDivElement>;\n onOpenChange: (isOpen: boolean) => void;\n isDismissable?: boolean;\n isOpen?: boolean;\n}\n\n/** @flr-generate all */\nexport const OverlayContent: FC<OverlayContentProps> = (props) => {\n const {\n children,\n className,\n \"aria-labelledby\": ariaLabelledBy,\n ...restProps\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n useKeepBrowserExtensionsInteractive(restProps.isOpen ?? false);\n\n const Fallback = () => {\n return (\n <DivView className={styles.suspense}>\n <OverlaySuspenseFallback {...restProps} />\n </DivView>\n );\n };\n\n if (!isActivityActive) {\n return null;\n }\n\n return (\n <UNSAFE_PortalProvider getContainer={getOverlayContainer}>\n <Aria.ModalOverlay {...restProps} className={className}>\n {/* The centering viewport between the backdrop and react-aria's modal\n wrapper. Classed so Modal/OffCanvas/LightBox can position it\n without selecting a bare `div`. */}\n <DivView className={styles.viewport}>\n <Aria.Modal>\n <Suspense fallback={<Fallback />}>\n <Aria.Dialog aria-labelledby={ariaLabelledBy}>\n <SectionHeadingReset>{children}</SectionHeadingReset>\n </Aria.Dialog>\n </Suspense>\n </Aria.Modal>\n </DivView>\n </Aria.ModalOverlay>\n </UNSAFE_PortalProvider>\n );\n};\n\nexport default OverlayContent;\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAM,4BAA4B;;;;;;;;;;;;AAalC,IAAM,gBAAgB,SACpB,gBAAgB,gBACf,KAAK,WAAW,QAAQ,KAAK,MAAM,YAAY;AAElD,IAAM,0BAA0B,cAAoC;CAClE,KACE,IAAI,OAAO,UAAU,oBACrB,MACA,OAAO,KAAK,oBAEZ,IAAI,CAAC,uBAAuB,IAAI,KAAK,CAAC,aAAa,IAAI,GACrD,OAAO;CAGX,OAAO;AACT;;;;;;;;;AAUA,IAAM,aAAa,cAAiC;CAClD,MAAM,OAAO,SAAS;CACtB,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,MAAM,KAAK,UAAU,iBAA8B,GAAG,CAAC,CAAC,CACtE,QAAQ,YAAY,QAAQ,cAAc,KAAK,QAAQ,eAAe,CAAC,CAAC,CACxE,KACE,YAAY;EAAC;EAAS,QAAQ;EAAW,QAAQ;CAAU,CAC9D;CAEF,IAAI,OAAO,KAAK,eAAe,YAC7B,KAAK,WAAW,WAAW,IAAI;MAE/B,KAAK,OAAO,SAAS;CAGvB,KAAK,MAAM,CAAC,SAAS,WAAW,eAAe,UAAU;EACvD,QAAQ,YAAY;EACpB,QAAQ,aAAa;CACvB;CACA,IACE,mBAAmB,eACnB,UAAU,SAAS,OAAO,KAC1B,SAAS,kBAAkB,SAE3B,QAAQ,MAAM,EAAE,eAAe,KAAK,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;AAoBA,IAAM,4BAAgD;CACpD,IAAI,OAAO,aAAa,aACtB,OAAO;CAGT,MAAM,oBAAoB,SAAS,cACjC,WAAW,0BAA0B,EACvC;CAEA,IAAI,mBAAmB;EACrB,IAAI,uBAAuB,iBAAiB,GAC1C,UAAU,iBAAiB;EAE7B,OAAO;CACT;CAEA,MAAM,YAAY,SAAS,cAAc,KAAK;CAC9C,UAAU,aAAa,2BAA2B,EAAE;CACpD,SAAS,KAAK,OAAO,SAAS;CAE9B,OAAO;AACT;;AAcA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,WACA,mBAAmB,gBACnB,GAAG,cACD;CAEJ,MAAM,mBAAmB,oBAAoB;CAE7C,oCAAoC,UAAU,UAAU,KAAK;CAE7D,MAAM,iBAAiB;EACrB,OACE,oBAAC,SAAD;GAAS,WAAWA,uBAAO;GACzB,UAAA,oBAAC,yBAAD,EAAyB,GAAI,UAAY,CAAA;EAClC,CAAA;CAEb;CAEA,IAAI,CAAC,kBACH,OAAO;CAGT,OACE,oBAAC,uBAAD;EAAuB,cAAc;EACnC,UAAA,oBAAC,KAAK,cAAN;GAAmB,GAAI;GAAsB;GAI3C,UAAA,oBAAC,SAAD;IAAS,WAAWA,uBAAO;IACzB,UAAA,oBAAC,KAAK,OAAN,EAAA,UACE,oBAAC,UAAD;KAAU,UAAU,oBAAC,UAAD,CAAW,CAAA;KAC7B,UAAA,oBAAC,KAAK,QAAN;MAAa,mBAAiB;MAC5B,UAAA,oBAAC,qBAAD,EAAsB,SAA8B,CAAA;KACzC,CAAA;IACL,CAAA,EACA,CAAA;GACL,CAAA;EACQ,CAAA;CACE,CAAA;AAE3B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
+
import { SectionHeadingReset } from "../../../Section/context.mjs";
|
|
3
4
|
import { useIsActivityActive } from "../../../Activity/context.mjs";
|
|
4
5
|
import Popover_module_default from "../../Popover.module.mjs";
|
|
5
6
|
import { popoverViewportPadding } from "../../viewportPadding.mjs";
|
|
@@ -21,6 +22,7 @@ var PopoverContent = (props) => {
|
|
|
21
22
|
const triggerRefFromContext = popoverContext && "triggerRef" in popoverContext ? popoverContext.triggerRef : void 0;
|
|
22
23
|
const idFromContext = popoverContext && "id" in popoverContext ? popoverContext.id : void 0;
|
|
23
24
|
const ContentComponent = isDialogContent ? Aria.Dialog : "div";
|
|
25
|
+
const content = /* @__PURE__ */ jsx(SectionHeadingReset, { children });
|
|
24
26
|
if (!isActivityActive) return null;
|
|
25
27
|
if (modality === "non-modal") {
|
|
26
28
|
const anchor = rest.triggerRef ?? triggerRefFromContext;
|
|
@@ -35,7 +37,7 @@ var PopoverContent = (props) => {
|
|
|
35
37
|
id: idFromContext,
|
|
36
38
|
triggerRef: anchor,
|
|
37
39
|
onOpenChange,
|
|
38
|
-
children
|
|
40
|
+
children: content
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
43
|
return /* @__PURE__ */ jsxs(Aria.Popover, {
|
|
@@ -51,7 +53,7 @@ var PopoverContent = (props) => {
|
|
|
51
53
|
children: /* @__PURE__ */ jsx(PopoverTip, {})
|
|
52
54
|
}), /* @__PURE__ */ jsx(ContentComponent, {
|
|
53
55
|
className: Popover_module_default.content,
|
|
54
|
-
children
|
|
56
|
+
children: content
|
|
55
57
|
})]
|
|
56
58
|
});
|
|
57
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverContent.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Popover/components/PopoverContent/PopoverContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref, RefObject } from \"react\";\nimport { useContext } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Popover.module.scss\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\nimport { NonModalPopoverContent } from \"../NonModalPopoverContent\";\nimport { PopoverTip } from \"../PopoverTip\";\nimport { popoverViewportPadding } from \"../../viewportPadding\";\nimport { popoverWidthStyle } from \"../../widthStyle\";\n\nexport interface PopoverContentProps\n extends PropsWithChildren, PropsWithClassName {\n withTip?: boolean;\n isDialogContent?: boolean;\n isOpen?: boolean;\n width?: string | number;\n /** @internal Set by `CoachMark`; see `PopoverProps`. */\n modality?: \"modal\" | \"non-modal\";\n onOpenChange: (isOpen: boolean) => void;\n ref?: Ref<HTMLElement>;\n triggerRef?: RefObject<Element | null>;\n}\n\n/**\n * @flr-generate all\n * @flr-ignore-props modality\n */\nexport const PopoverContent: FC<PopoverContentProps> = (props) => {\n const {\n children,\n className,\n isDialogContent = false,\n withTip,\n onOpenChange,\n ref,\n isOpen,\n width,\n modality,\n ...rest\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n // A trigger hands its popover a ref through the context react-aria sets up,\n // and the non-modal popover has to anchor itself with it.\n const popoverContext = useContext(Aria.PopoverContext);\n const triggerRefFromContext =\n popoverContext && \"triggerRef\" in popoverContext\n ? popoverContext.triggerRef\n : undefined;\n\n // The trigger points its `aria-controls` at this id while the popover is\n // open, so the popover has to carry it — react-aria's own only applies it\n // when the popover is a dialog.\n const idFromContext =\n popoverContext && \"id\" in popoverContext ? popoverContext.id : undefined;\n\n const ContentComponent = isDialogContent ? Aria.Dialog : \"div\";\n\n if (!isActivityActive) {\n return null;\n }\n\n if (modality === \"non-modal\") {\n const anchor = rest.triggerRef ?? triggerRefFromContext;\n\n // Without an anchor there is nothing to position against. react-aria's own\n // popover has the same requirement; it just throws further in.\n if (!anchor) {\n return null;\n }\n\n return (\n <NonModalPopoverContent\n {...rest}\n className={className}\n ref={ref}\n isOpen={isOpen}\n width={width}\n withTip={withTip}\n id={idFromContext}\n triggerRef={anchor}\n onOpenChange={onOpenChange}\n >\n {
|
|
1
|
+
{"version":3,"file":"PopoverContent.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Popover/components/PopoverContent/PopoverContent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, Ref, RefObject } from \"react\";\nimport { useContext } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Popover.module.scss\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { useIsActivityActive } from \"@/components/Activity/context\";\nimport { SectionHeadingReset } from \"@/components/Section/context\";\nimport { NonModalPopoverContent } from \"../NonModalPopoverContent\";\nimport { PopoverTip } from \"../PopoverTip\";\nimport { popoverViewportPadding } from \"../../viewportPadding\";\nimport { popoverWidthStyle } from \"../../widthStyle\";\n\nexport interface PopoverContentProps\n extends PropsWithChildren, PropsWithClassName {\n withTip?: boolean;\n isDialogContent?: boolean;\n isOpen?: boolean;\n width?: string | number;\n /** @internal Set by `CoachMark`; see `PopoverProps`. */\n modality?: \"modal\" | \"non-modal\";\n onOpenChange: (isOpen: boolean) => void;\n ref?: Ref<HTMLElement>;\n triggerRef?: RefObject<Element | null>;\n}\n\n/**\n * @flr-generate all\n * @flr-ignore-props modality\n */\nexport const PopoverContent: FC<PopoverContentProps> = (props) => {\n const {\n children,\n className,\n isDialogContent = false,\n withTip,\n onOpenChange,\n ref,\n isOpen,\n width,\n modality,\n ...rest\n } = props;\n\n const isActivityActive = useIsActivityActive();\n\n // A trigger hands its popover a ref through the context react-aria sets up,\n // and the non-modal popover has to anchor itself with it.\n const popoverContext = useContext(Aria.PopoverContext);\n const triggerRefFromContext =\n popoverContext && \"triggerRef\" in popoverContext\n ? popoverContext.triggerRef\n : undefined;\n\n // The trigger points its `aria-controls` at this id while the popover is\n // open, so the popover has to carry it — react-aria's own only applies it\n // when the popover is a dialog.\n const idFromContext =\n popoverContext && \"id\" in popoverContext ? popoverContext.id : undefined;\n\n const ContentComponent = isDialogContent ? Aria.Dialog : \"div\";\n\n const content = <SectionHeadingReset>{children}</SectionHeadingReset>;\n\n if (!isActivityActive) {\n return null;\n }\n\n if (modality === \"non-modal\") {\n const anchor = rest.triggerRef ?? triggerRefFromContext;\n\n // Without an anchor there is nothing to position against. react-aria's own\n // popover has the same requirement; it just throws further in.\n if (!anchor) {\n return null;\n }\n\n return (\n <NonModalPopoverContent\n {...rest}\n className={className}\n ref={ref}\n isOpen={isOpen}\n width={width}\n withTip={withTip}\n id={idFromContext}\n triggerRef={anchor}\n onOpenChange={onOpenChange}\n >\n {content}\n </NonModalPopoverContent>\n );\n }\n\n return (\n <Aria.Popover\n {...rest}\n className={className}\n containerPadding={popoverViewportPadding}\n ref={ref}\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n style={popoverWidthStyle(width)}\n >\n {withTip && (\n <Aria.OverlayArrow className={styles.tip}>\n <PopoverTip />\n </Aria.OverlayArrow>\n )}\n <ContentComponent className={styles.content}>{content}</ContentComponent>\n </Aria.Popover>\n );\n};\n\nexport default PopoverContent;\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,IAAa,kBAA2C,UAAU;CAChE,MAAM,EACJ,UACA,WACA,kBAAkB,OAClB,SACA,cACA,KACA,QACA,OACA,UACA,GAAG,SACD;CAEJ,MAAM,mBAAmB,oBAAoB;CAI7C,MAAM,iBAAiB,WAAW,KAAK,cAAc;CACrD,MAAM,wBACJ,kBAAkB,gBAAgB,iBAC9B,eAAe,aACf,KAAA;CAKN,MAAM,gBACJ,kBAAkB,QAAQ,iBAAiB,eAAe,KAAK,KAAA;CAEjE,MAAM,mBAAmB,kBAAkB,KAAK,SAAS;CAEzD,MAAM,UAAU,oBAAC,qBAAD,EAAsB,SAA8B,CAAA;CAEpE,IAAI,CAAC,kBACH,OAAO;CAGT,IAAI,aAAa,aAAa;EAC5B,MAAM,SAAS,KAAK,cAAc;EAIlC,IAAI,CAAC,QACH,OAAO;EAGT,OACE,oBAAC,wBAAD;GACE,GAAI;GACO;GACN;GACG;GACD;GACE;GACT,IAAI;GACJ,YAAY;GACE;GAEb,UAAA;EACqB,CAAA;CAE5B;CAEA,OACE,qBAAC,KAAK,SAAN;EACE,GAAI;EACO;EACX,kBAAkB;EACb;EACG;EACM;EACd,OAAO,kBAAkB,KAAK;EAPhC,UAAA,CASG,WACC,oBAAC,KAAK,cAAN;GAAmB,WAAWA,uBAAO;GACnC,UAAA,oBAAC,YAAD,CAAa,CAAA;EACI,CAAA,GAErB,oBAAC,kBAAD;GAAkB,WAAWA,uBAAO;GAAU,UAAA;EAA0B,CAAA,CAC5D;;AAElB"}
|