@atom-learning/components 9.0.0-beta.4 → 9.0.0-beta.5
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/components/banner/banner-slim/BannerSlim.d.ts +11 -4
- package/dist/components/banner/banner-slim/BannerSlimButton.d.ts +4 -5
- package/dist/components/banner/banner-slim/BannerSlimButton.js +2 -2
- package/dist/components/banner/banner-slim/BannerSlimButton.js.map +1 -1
- package/dist/components/tile/Tile.d.ts +5 -4
- package/dist/components/tile/Tile.js +2 -2
- package/dist/components/tile/Tile.js.map +1 -1
- package/dist/components/tile-interactive/TileInteractive.d.ts +8 -4
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +9 -3
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,10 +14,17 @@ export declare const BannerSlim: {
|
|
|
14
14
|
(props: React.ComponentPropsWithoutRef<typeof import("../..").Image>): React.JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
|
-
Button: {
|
|
18
|
-
(
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
Button: import("../../..").PolymorphicComponent<"button", Omit<{
|
|
18
|
+
theme?: ("danger" | "neutral" | "primary" | "secondary" | "success" | "warning" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "danger" | "neutral" | "primary" | "secondary" | "success" | "warning">>) | undefined;
|
|
19
|
+
appearance?: ("outline" | "solid" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "outline" | "solid">>) | undefined;
|
|
20
|
+
size?: ("lg" | "md" | "sm" | "xl" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm" | "xl">>) | undefined;
|
|
21
|
+
isLoading?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
22
|
+
fullWidth?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
23
|
+
}, "children" | "isLoading" | keyof import("../../..").NavigatorActions> & {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
href?: string;
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
} & import("../../..").NavigatorActions>;
|
|
21
28
|
Dismiss: {
|
|
22
29
|
({ label, ...rest }: {
|
|
23
30
|
key?: React.Key | null | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type PolymorphicComponent } from '../../../styled';
|
|
2
2
|
import { Button } from '../../button/Button';
|
|
3
|
-
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
}
|
|
3
|
+
type ButtonOwnProps = typeof Button extends PolymorphicComponent<infer _Element, infer OwnProps> ? OwnProps : never;
|
|
4
|
+
export declare const BannerSlimButton: PolymorphicComponent<'button', ButtonOwnProps>;
|
|
5
|
+
export {};
|
|
@@ -5,7 +5,7 @@ import { useBannerContext } from "../Banner.context.js";
|
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/banner/banner-slim/BannerSlimButton.tsx
|
|
8
|
-
var BannerSlimButton = ({ className, ...rest }) => {
|
|
8
|
+
var BannerSlimButton = (({ className, ...rest }) => {
|
|
9
9
|
const { emphasis, size } = useBannerContext();
|
|
10
10
|
return /* @__PURE__ */ jsx(Button, {
|
|
11
11
|
size: "md",
|
|
@@ -14,7 +14,7 @@ var BannerSlimButton = ({ className, ...rest }) => {
|
|
|
14
14
|
...rest,
|
|
15
15
|
className: cn("ml-auto", className)
|
|
16
16
|
});
|
|
17
|
-
};
|
|
17
|
+
});
|
|
18
18
|
BannerSlimButton.displayName = "BannerSlimButton";
|
|
19
19
|
//#endregion
|
|
20
20
|
export { BannerSlimButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerSlimButton.js","names":[],"sources":["../../../../src/components/banner/banner-slim/BannerSlimButton.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\nexport const BannerSlimButton = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...rest}\n className={cn('ml-auto', className)}\n />\n )\n}
|
|
1
|
+
{"version":3,"file":"BannerSlimButton.js","names":[],"sources":["../../../../src/components/banner/banner-slim/BannerSlimButton.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { type PolymorphicComponent, cn } from '../../../styled'\nimport { overrideStyledVariantValue } from '../../../utilities/override-styled-variant-value/overrideStyledVariantValue'\nimport { Button } from '../../button/Button'\nimport { useBannerContext } from '../Banner.context'\n\n// Re-expose Button's own props so BannerSlim.Button stays polymorphic (keeps\n// `as`, e.g. `<BannerSlim.Button as=\"a\" href>`). Typing with\n// React.ComponentProps<typeof Button> alone would collapse to the default\n// element and drop `as` (as?: never).\ntype ButtonOwnProps =\n typeof Button extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\nexport const BannerSlimButton = (({\n className,\n ...rest\n}: React.ComponentProps<typeof Button>) => {\n const { emphasis, size } = useBannerContext()\n\n const fullWidth = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => s === 'sm'),\n [size]\n )\n\n return (\n <Button\n size=\"md\"\n fullWidth={fullWidth}\n theme={emphasis === 'bold' ? 'neutral' : 'primary'}\n {...rest}\n className={cn('ml-auto', className)}\n />\n )\n}) as PolymorphicComponent<'button', ButtonOwnProps>\n\nBannerSlimButton.displayName = 'BannerSlimButton'\n"],"mappings":";;;;;;;AAgBA,IAAa,qBAAqB,EAChC,WACA,GAAG,WACsC;CACzC,MAAM,EAAE,UAAU,SAAS,iBAAiB;CAO5C,OACE,oBAAC,QAAD;EACE,MAAK;EACM,WARG,QAAM,cAChB,2BAA2B,OAAO,MAAM,MAAM,IAAI,GACxD,CAAC,IAAI,CAMQ;EACX,OAAO,aAAa,SAAS,YAAY;EACzC,GAAI;EACJ,WAAW,GAAG,WAAW,SAAS;CACnC,CAAA;AAEL;AAEA,iBAAiB,cAAc"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { type TcolorScheme } from '../../experiments/color-scheme/ColorScheme';
|
|
3
|
-
|
|
2
|
+
import { type PolymorphicComponent } from '../../styled';
|
|
3
|
+
export declare const StyledTile: PolymorphicComponent<"div", {
|
|
4
4
|
borderRadius?: ("lg" | "md" | "sm" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm">>) | undefined;
|
|
5
5
|
border?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
6
6
|
diffused?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
7
7
|
}>;
|
|
8
|
-
type
|
|
8
|
+
type StyledTileOwnProps = typeof StyledTile extends PolymorphicComponent<infer _Element, infer OwnProps> ? OwnProps : never;
|
|
9
|
+
type TileOwnProps = StyledTileOwnProps & {
|
|
9
10
|
colorScheme?: TcolorScheme;
|
|
10
11
|
};
|
|
11
|
-
export declare const Tile:
|
|
12
|
+
export declare const Tile: PolymorphicComponent<'div', TileOwnProps>;
|
|
12
13
|
export {};
|
|
@@ -24,7 +24,7 @@ var StyledTile = styled("div", {
|
|
|
24
24
|
diffused: { true: ["supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]", "supports-color-mix:backdrop-blur-sm"] }
|
|
25
25
|
}
|
|
26
26
|
}, { enableResponsiveVariants: true });
|
|
27
|
-
var Tile = ({ ref, children, borderRadius = "lg", colorScheme = {}, ...rest }) => /* @__PURE__ */ jsx(ColorScheme, {
|
|
27
|
+
var Tile = (({ ref, children, borderRadius = "lg", colorScheme = {}, ...rest }) => /* @__PURE__ */ jsx(ColorScheme, {
|
|
28
28
|
asChild: true,
|
|
29
29
|
base: "grey1",
|
|
30
30
|
accent: "primary2",
|
|
@@ -36,7 +36,7 @@ var Tile = ({ ref, children, borderRadius = "lg", colorScheme = {}, ...rest }) =
|
|
|
36
36
|
...rest,
|
|
37
37
|
children
|
|
38
38
|
})
|
|
39
|
-
});
|
|
39
|
+
}));
|
|
40
40
|
//#endregion
|
|
41
41
|
export { StyledTile, Tile };
|
|
42
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { styled } from '../../styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\
|
|
1
|
+
{"version":3,"file":"Tile.js","names":[],"sources":["../../../src/components/tile/Tile.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport {\n ColorScheme,\n type TcolorScheme\n} from '../../experiments/color-scheme/ColorScheme'\nimport { type PolymorphicComponent, styled } from '../../styled'\n\nexport const StyledTile = styled(\n 'div',\n {\n base: [\n 'box-border',\n 'flex',\n 'flex-col',\n 'relative',\n 'border',\n 'bg-(--base-1)',\n 'text-(--foreground)',\n 'border-transparent'\n ],\n variants: {\n borderRadius: {\n sm: ['rounded-sm'],\n md: ['rounded-md'],\n lg: ['rounded-xl']\n },\n border: {\n true: ['border-(--base-3)']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n }\n }\n },\n { enableResponsiveVariants: true }\n)\n\n// Re-expose StyledTile's own props so Tile stays polymorphic (keeps `as`, e.g.\n// `<Tile as=\"a\" href>`). Typing with React.ComponentProps<typeof StyledTile>\n// would collapse to the default element and drop `as` (as?: never).\ntype StyledTileOwnProps =\n typeof StyledTile extends PolymorphicComponent<infer _Element, infer OwnProps>\n ? OwnProps\n : never\n\ntype TileOwnProps = StyledTileOwnProps & { colorScheme?: TcolorScheme }\n\nexport const Tile = (({\n ref,\n children,\n borderRadius = 'lg',\n colorScheme = {},\n ...rest\n}: React.ComponentProps<typeof StyledTile> & {\n colorScheme?: TcolorScheme\n}) => (\n <ColorScheme\n asChild\n base=\"grey1\"\n accent=\"primary2\"\n interactive=\"loContrast\"\n {...colorScheme}\n >\n <StyledTile ref={ref} borderRadius={borderRadius} {...rest}>\n {children}\n </StyledTile>\n </ColorScheme>\n)) as PolymorphicComponent<'div', TileOwnProps>\n"],"mappings":";;;;;AAQA,IAAa,aAAa,OACxB,OACA;CACE,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU;EACR,cAAc;GACZ,IAAI,CAAC,YAAY;GACjB,IAAI,CAAC,YAAY;GACjB,IAAI,CAAC,YAAY;EACnB;EACA,QAAQ,EACN,MAAM,CAAC,mBAAmB,EAC5B;EACA,UAAU,EACR,MAAM,CACJ,wEACA,qCACF,EACF;CACF;AACF,GACA,EAAE,0BAA0B,KAAK,CACnC;AAYA,IAAa,SAAS,EACpB,KACA,UACA,eAAe,MACf,cAAc,CAAC,GACf,GAAG,WAIH,oBAAC,aAAD;CACE,SAAA;CACA,MAAK;CACL,QAAO;CACP,aAAY;CACZ,GAAI;WAEJ,oBAAC,YAAD;EAAiB;EAAmB;EAAc,GAAI;EACnD;CACS,CAAA;AACD,CAAA"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { NavigatorActions } from '../../types/navigatorActions.types';
|
|
3
3
|
import type { Override } from '../../utilities/types';
|
|
4
|
-
declare const StyledTileInteractive: import("../..").PolymorphicComponent<(
|
|
4
|
+
declare const StyledTileInteractive: import("../..").PolymorphicComponent<import("../..").PolymorphicComponent<"div", {
|
|
5
5
|
borderRadius?: ("lg" | "md" | "sm" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm">>) | undefined;
|
|
6
6
|
border?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
7
7
|
diffused?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
8
8
|
} & {
|
|
9
|
-
as?: never;
|
|
10
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | "border" | "borderRadius" | "diffused"> & {
|
|
11
9
|
colorScheme?: import("../..").TcolorScheme;
|
|
12
|
-
}
|
|
10
|
+
}>, {
|
|
11
|
+
borderRadius?: ("lg" | "md" | "sm" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm">>) | undefined;
|
|
12
|
+
border?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
13
|
+
diffused?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
colorScheme?: import("../..").TcolorScheme;
|
|
16
|
+
}>;
|
|
13
17
|
type TileInteractiveProps = Override<React.ComponentProps<typeof StyledTileInteractive> & React.ButtonHTMLAttributes<HTMLButtonElement> & NavigatorActions, {
|
|
14
18
|
as?: React.ElementType;
|
|
15
19
|
}>;
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const StyledTileToggleGroupItem: import("../..").PolymorphicComponent<({ ref, onClick, href, type, as, ...rest }: Omit<{
|
|
4
|
+
borderRadius?: ("lg" | "md" | "sm" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm">>) | undefined;
|
|
5
|
+
border?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
6
|
+
diffused?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
colorScheme?: import("../..").TcolorScheme;
|
|
9
|
+
} & {
|
|
4
10
|
as?: never;
|
|
5
11
|
} & Omit<{
|
|
6
12
|
borderRadius?: ("lg" | "md" | "sm" | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", "lg" | "md" | "sm">>) | undefined;
|
|
7
13
|
border?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
8
14
|
diffused?: (boolean | Partial<Record<"@initial" | "@lg" | "@md" | "@sm" | "@xl", boolean>>) | undefined;
|
|
9
15
|
} & {
|
|
10
|
-
as?: never;
|
|
11
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | "border" | "borderRadius" | "diffused"> & {
|
|
12
16
|
colorScheme?: import("../..").TcolorScheme;
|
|
13
|
-
}
|
|
17
|
+
} & {
|
|
18
|
+
as?: never;
|
|
19
|
+
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | "border" | "borderRadius" | "colorScheme" | "diffused">, "as" | "border" | "borderRadius" | "colorScheme" | "diffused"> & React.ButtonHTMLAttributes<HTMLButtonElement> & import("../..").NavigatorActions, "as"> & {
|
|
14
20
|
as?: React.ElementType;
|
|
15
21
|
}) => React.JSX.Element, unknown>;
|
|
16
22
|
type TileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> & React.ComponentProps<typeof StyledTileToggleGroupItem>;
|