@mittwald/flow-react-components 0.2.0-alpha.425 → 0.2.0-alpha.427
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/CHANGELOG.md +10 -0
- package/dist/assets/doc-properties.json +34359 -34321
- package/dist/js/components/src/components/Link/Link.mjs +3 -0
- package/dist/js/components/src/components/Link/Link.mjs.map +1 -1
- package/dist/types/components/Link/Link.d.ts +3 -1
- package/dist/types/components/Link/Link.d.ts.map +1 -1
- package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
- package/package.json +4 -4
|
@@ -23,6 +23,8 @@ const Link = flowComponent("Link", (props) => {
|
|
|
23
23
|
"aria-current": ariaCurrent,
|
|
24
24
|
ref,
|
|
25
25
|
slot: ignoredSlotProp,
|
|
26
|
+
style,
|
|
27
|
+
whiteSpace,
|
|
26
28
|
...rest
|
|
27
29
|
} = props;
|
|
28
30
|
const { linkComponent: linkComponentFromContext } = useContext(linkContext);
|
|
@@ -49,6 +51,7 @@ const Link = flowComponent("Link", (props) => {
|
|
|
49
51
|
...rest,
|
|
50
52
|
className: rootClassName,
|
|
51
53
|
ref,
|
|
54
|
+
style: { ...style, whiteSpace },
|
|
52
55
|
children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
|
|
53
56
|
children,
|
|
54
57
|
/* @__PURE__ */ jsx(LinkIcon, { ...props })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.mjs","sources":["../../../../../../src/components/Link/Link.tsx"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Link.mjs","sources":["../../../../../../src/components/Link/Link.tsx"],"sourcesContent":["import type {\n ComponentProps,\n ComponentType,\n CSSProperties,\n PropsWithChildren,\n} from \"react\";\nimport { useContext } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./Link.module.scss\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { linkContext } from \"@/components/Link/context\";\nimport { LinkIcon } from \"@/components/Link/components/LinkIcon\";\n\nexport interface LinkProps\n extends PropsWithChildren<\n Omit<Aria.LinkProps, \"children\" | \"slot\" | \"className\">\n >,\n FlowComponentProps<HTMLAnchorElement>,\n PropsWithClassName {\n /** Whether the link should be styled for being displayed inside a text. */\n inline?: boolean;\n /** An alternative link component. */\n linkComponent?: ComponentType<Omit<ComponentProps<\"a\">, \"ref\">>;\n /** The color of the link. @default \"primary\" */\n color?: \"primary\" | \"dark\" | \"light\";\n \"aria-current\"?: string;\n slot?: string;\n /** The whiteSpace css value of the element. */\n whiteSpace?: CSSProperties[\"whiteSpace\"];\n /** @internal */\n unstyled?: boolean;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Link = flowComponent(\"Link\", (props) => {\n const {\n children,\n className,\n inline,\n linkComponent: linkComponentFromProps,\n color = \"primary\",\n unstyled = false,\n \"aria-current\": ariaCurrent,\n ref,\n slot: ignoredSlotProp,\n style,\n whiteSpace,\n ...rest\n } = props;\n\n const { linkComponent: linkComponentFromContext } = useContext(linkContext);\n const Link = linkComponentFromProps\n ? (linkComponentFromProps as typeof Aria.Link)\n : props.href && linkComponentFromContext\n ? (linkComponentFromContext as typeof Aria.Link)\n : Aria.Link;\n\n const rootClassName = unstyled\n ? className\n : clsx(\n styles.link,\n inline && styles.inline,\n styles[color as keyof typeof styles],\n className,\n );\n\n const propsContext: PropsContext = {\n Icon: {\n className: styles.icon,\n size: \"s\",\n },\n };\n\n const unsupportedTypingsLinkProps = ariaCurrent\n ? ({\n \"aria-current\": true,\n } as Record<string, unknown>)\n : {};\n\n return (\n <ClearPropsContext>\n <Link\n {...unsupportedTypingsLinkProps}\n {...rest}\n className={rootClassName}\n ref={ref}\n style={{ ...style, whiteSpace }}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n <LinkIcon {...props} />\n </PropsContextProvider>\n </Link>\n </ClearPropsContext>\n );\n});\n\nexport default Link;\n"],"names":["Link"],"mappings":";;;;;;;;;;;;AA2CO,MAAM,IAAO,GAAA,aAAA,CAAc,MAAQ,EAAA,CAAC,KAAU,KAAA;AACnD,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,aAAe,EAAA,sBAAA;AAAA,IACf,KAAQ,GAAA,SAAA;AAAA,IACR,QAAW,GAAA,KAAA;AAAA,IACX,cAAgB,EAAA,WAAA;AAAA,IAChB,GAAA;AAAA,IACA,IAAM,EAAA,eAAA;AAAA,IACN,KAAA;AAAA,IACA,UAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AAEJ,EAAA,MAAM,EAAE,aAAA,EAAe,wBAAyB,EAAA,GAAI,WAAW,WAAW,CAAA;AAC1E,EAAA,MAAMA,QAAO,sBACR,GAAA,sBAAA,GACD,MAAM,IAAQ,IAAA,wBAAA,GACX,2BACD,IAAK,CAAA,IAAA;AAEX,EAAM,MAAA,aAAA,GAAgB,WAClB,SACA,GAAA,IAAA;AAAA,IACE,MAAO,CAAA,IAAA;AAAA,IACP,UAAU,MAAO,CAAA,MAAA;AAAA,IACjB,OAAO,KAA4B,CAAA;AAAA,IACnC;AAAA,GACF;AAEJ,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,IAAM,EAAA;AAAA,MACJ,WAAW,MAAO,CAAA,IAAA;AAAA,MAClB,IAAM,EAAA;AAAA;AACR,GACF;AAEA,EAAA,MAAM,8BAA8B,WAC/B,GAAA;AAAA,IACC,cAAgB,EAAA;AAAA,MAElB,EAAC;AAEL,EAAA,2BACG,iBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAACA,KAAAA;AAAA,IAAA;AAAA,MACE,GAAG,2BAAA;AAAA,MACH,GAAG,IAAA;AAAA,MACJ,SAAW,EAAA,aAAA;AAAA,MACX,GAAA;AAAA,MACA,KAAO,EAAA,EAAE,GAAG,KAAA,EAAO,UAAW,EAAA;AAAA,MAE9B,QAAA,kBAAA,IAAA,CAAC,oBAAqB,EAAA,EAAA,KAAA,EAAO,YAC1B,EAAA,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA,CAAC,QAAU,EAAA,EAAA,GAAG,KAAO,EAAA;AAAA,OACvB,EAAA;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps, ComponentType, PropsWithChildren } from 'react';
|
|
1
|
+
import { ComponentProps, ComponentType, CSSProperties, PropsWithChildren } from 'react';
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
@@ -11,6 +11,8 @@ export interface LinkProps extends PropsWithChildren<Omit<Aria.LinkProps, "child
|
|
|
11
11
|
color?: "primary" | "dark" | "light";
|
|
12
12
|
"aria-current"?: string;
|
|
13
13
|
slot?: string;
|
|
14
|
+
/** The whiteSpace css value of the element. */
|
|
15
|
+
whiteSpace?: CSSProperties["whiteSpace"];
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* @flr-generate all
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../../src/components/Link/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAM9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,MAAM,WAAW,SACf,SAAQ,iBAAiB,CACrB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,WAAW,CAAC,CACxD,EACD,kBAAkB,CAAC,iBAAiB,CAAC,EACrC,kBAAkB;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,aAAa,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChE,gDAAgD;IAChD,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAG1C;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,iGA6Df,CAAC;AAEH,eAAe,IAAI,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getCategoricalColorByIndex: (index: number) => "
|
|
1
|
+
export declare const getCategoricalColorByIndex: (index: number) => "azure" | "green" | "lime" | "magenta" | "violet" | "yellow" | "sea-green" | "palatinate-blue" | "tangerine" | "tropical-indigo" | "malachite" | "alloy-orange";
|
|
2
2
|
//# sourceMappingURL=getCategoricalColorByIndex.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.427",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@internationalized/string-compiler": "^3.2.6",
|
|
59
59
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
60
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
60
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.427",
|
|
61
61
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
62
62
|
"@react-aria/form": "^3.1.0",
|
|
63
63
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@faker-js/faker": "^9.9.0",
|
|
100
100
|
"@internationalized/date": "^3.8.2",
|
|
101
101
|
"@mittwald/flow-core": "",
|
|
102
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
102
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.427",
|
|
103
103
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
104
104
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
105
105
|
"@mittwald/typescript-config": "",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"optional": true
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "c9c33aba2de9d5cb8ee3fc4eede9f5da4a8044ed"
|
|
176
176
|
}
|