@regardio/react 0.4.7 → 0.5.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/LICENSE +1 -1
- package/README.md +6 -8
- package/dist/{components/background-slideshow.js → background-slideshow/index.js} +2 -11
- package/dist/{components/blurry-gradient.js → blurry-gradient/index.js} +15 -9
- package/dist/{components/carousel.d.ts → carousel/index.d.ts} +17 -9
- package/dist/{components/carousel.js → carousel/index.js} +34 -30
- package/dist/{components/countdown.js → countdown/index.js} +2 -11
- package/dist/{components/generic-error.js → generic-error/index.js} +1 -1
- package/dist/grid/index.d.ts +1196 -0
- package/dist/grid/index.js +239 -0
- package/dist/heading/index.d.ts +24 -0
- package/dist/{components/heading.js → heading/index.js} +15 -34
- package/dist/highlight/index.d.ts +13 -0
- package/dist/{components/highlight.js → highlight/index.js} +9 -17
- package/dist/hooks/use-nonce.d.ts +1 -6
- package/dist/hooks/use-nonce.js +1 -6
- package/dist/{components/icon-button.js → icon-button/index.js} +1 -1
- package/dist/{components/if.js → if/index.js} +1 -1
- package/dist/{components/iframe.js → iframe/index.js} +2 -11
- package/dist/{components/link.d.ts → link/index.d.ts} +19 -13
- package/dist/{components/link.js → link/index.js} +31 -36
- package/dist/list/index.d.ts +69 -0
- package/dist/list/index.js +65 -0
- package/dist/{components/markdown-container.js → markdown-container/index.js} +3 -67
- package/dist/{components/password-input.js → password-input/index.js} +2 -11
- package/dist/{components/picture.js → picture/index.js} +2 -11
- package/dist/{components/protected-email.d.ts → protected-email/index.d.ts} +1 -1
- package/dist/{components/protected-email.js → protected-email/index.js} +1 -1
- package/dist/text/index.d.ts +20 -0
- package/dist/text/index.js +38 -0
- package/dist/utils/author/index.d.ts +3 -0
- package/dist/utils/author/index.js +33 -0
- package/dist/utils/text/index.d.ts +15 -0
- package/dist/utils/text/index.js +73 -0
- package/package.json +170 -187
- package/src/background-slideshow/background-slideshow.stories.tsx +137 -0
- package/src/{components → background-slideshow}/background-slideshow.tsx +3 -1
- package/src/background-slideshow/index.ts +2 -0
- package/src/{stories/BlurryGradient.stories.tsx → blurry-gradient/blurry-gradient.stories.tsx} +1 -1
- package/src/{components → blurry-gradient}/blurry-gradient.tsx +14 -8
- package/src/blurry-gradient/index.ts +2 -0
- package/src/carousel/carousel-content.tsx +16 -0
- package/src/carousel/carousel-item.tsx +23 -0
- package/src/carousel/carousel-next.tsx +22 -0
- package/src/carousel/carousel-previous.tsx +22 -0
- package/src/{components/carousel.tsx → carousel/carousel-root.tsx} +8 -78
- package/src/carousel/carousel.stories.tsx +135 -0
- package/src/carousel/index.parts.ts +5 -0
- package/src/carousel/index.ts +4 -0
- package/src/{stories/Countdown.stories.tsx → countdown/countdown.stories.tsx} +1 -1
- package/src/{components → countdown}/countdown.tsx +3 -7
- package/src/countdown/index.ts +1 -0
- package/src/{stories/GenericError.stories.tsx → generic-error/generic-error.stories.tsx} +1 -1
- package/src/{components → generic-error}/generic-error.tsx +2 -0
- package/src/generic-error/index.ts +2 -0
- package/src/grid/grid-item.tsx +188 -0
- package/src/grid/grid-root.tsx +72 -0
- package/src/grid/grid.stories.tsx +236 -0
- package/src/grid/index.parts.ts +2 -0
- package/src/grid/index.ts +5 -0
- package/src/{stories/Heading.stories.tsx → heading/heading.stories.tsx} +1 -1
- package/src/{components → heading}/heading.tsx +17 -25
- package/src/heading/index.ts +2 -0
- package/src/{stories/Highlight.stories.tsx → highlight/highlight.stories.tsx} +1 -1
- package/src/{components → highlight}/highlight.tsx +13 -9
- package/src/highlight/index.ts +2 -0
- package/src/hooks/use-nonce.ts +0 -10
- package/src/{stories/IconButton.stories.tsx → icon-button/icon-button.stories.tsx} +1 -1
- package/src/icon-button/index.ts +2 -0
- package/src/{stories/If.stories.tsx → if/if.stories.tsx} +1 -1
- package/src/if/index.ts +1 -0
- package/src/{stories/Iframe.stories.tsx → iframe/iframe.stories.tsx} +1 -1
- package/src/{components → iframe}/iframe.tsx +1 -1
- package/src/iframe/index.ts +2 -0
- package/src/link/index.ts +2 -0
- package/src/{stories/Link.stories.tsx → link/link.stories.tsx} +52 -1
- package/src/{components → link}/link.tsx +39 -28
- package/src/list/index.parts.ts +2 -0
- package/src/list/index.ts +4 -0
- package/src/list/list-item.tsx +63 -0
- package/src/list/list-root-context.ts +21 -0
- package/src/list/list-root.tsx +81 -0
- package/src/list/list.css +32 -0
- package/src/list/list.stories.tsx +119 -0
- package/src/list/list.test.tsx +168 -0
- package/src/markdown-container/index.ts +2 -0
- package/src/{stories/MarkdownContainer.stories.tsx → markdown-container/markdown-container.stories.tsx} +56 -1
- package/src/{components → markdown-container}/markdown-container.tsx +3 -1
- package/src/password-input/index.ts +2 -0
- package/src/{stories/PasswordInput.stories.tsx → password-input/password-input.stories.tsx} +1 -1
- package/src/{components → password-input}/password-input.tsx +4 -4
- package/src/picture/index.ts +2 -0
- package/src/{stories/Picture.stories.tsx → picture/picture.stories.tsx} +1 -1
- package/src/{components → picture}/picture.tsx +2 -4
- package/src/protected-email/index.ts +2 -0
- package/src/{stories/ProtectedEmail.stories.tsx → protected-email/protected-email.stories.tsx} +1 -1
- package/src/{components → protected-email}/protected-email.tsx +3 -1
- package/src/tailwind.css +10 -0
- package/src/text/index.ts +2 -0
- package/src/{stories/Text.stories.tsx → text/text.stories.tsx} +1 -1
- package/src/text/text.tsx +46 -0
- package/src/utils/author/author.tsx +36 -0
- package/src/utils/author/index.ts +1 -0
- package/src/utils/text/index.ts +1 -0
- package/src/utils/text/text.tsx +103 -0
- package/dist/components/box.d.ts +0 -20
- package/dist/components/box.js +0 -50
- package/dist/components/definition-list.d.ts +0 -43
- package/dist/components/definition-list.js +0 -89
- package/dist/components/heading.d.ts +0 -27
- package/dist/components/highlight.d.ts +0 -19
- package/dist/components/item.d.ts +0 -70
- package/dist/components/item.js +0 -512
- package/dist/components/leaflet-map.d.ts +0 -34
- package/dist/components/leaflet-map.js +0 -201
- package/dist/components/list-item.d.ts +0 -19
- package/dist/components/list-item.js +0 -37
- package/dist/components/maptiler-map.d.ts +0 -27
- package/dist/components/maptiler-map.js +0 -129
- package/dist/components/text.d.ts +0 -20
- package/dist/components/text.js +0 -45
- package/dist/components/unordered-list.d.ts +0 -19
- package/dist/components/unordered-list.js +0 -39
- package/dist/utils/author.d.ts +0 -9
- package/dist/utils/author.js +0 -55
- package/dist/utils/cn.d.ts +0 -9
- package/dist/utils/cn.js +0 -14
- package/dist/utils/is-route-active.d.ts +0 -19
- package/dist/utils/is-route-active.js +0 -56
- package/dist/utils/text.d.ts +0 -24
- package/dist/utils/text.js +0 -127
- package/src/components/box.tsx +0 -45
- package/src/components/definition-list.tsx +0 -90
- package/src/components/item.tsx +0 -340
- package/src/components/leaflet-map.tsx +0 -294
- package/src/components/link.test.tsx +0 -387
- package/src/components/list-item.tsx +0 -30
- package/src/components/maptiler-map.tsx +0 -181
- package/src/components/text.tsx +0 -38
- package/src/components/unordered-list.tsx +0 -32
- package/src/hooks/use-nonce.test.ts +0 -35
- package/src/stories/BackgroundSlideshow.stories.tsx +0 -68
- package/src/stories/Box.stories.tsx +0 -83
- package/src/stories/Carousel.stories.tsx +0 -95
- package/src/stories/DefinitionList.stories.tsx +0 -51
- package/src/stories/Item.stories.tsx +0 -79
- package/src/stories/ListItem.stories.tsx +0 -38
- package/src/stories/UnorderedList.stories.tsx +0 -73
- package/src/styles/tailwind.css +0 -7
- package/src/test-setup.ts +0 -1
- package/src/utils/author.test.ts +0 -54
- package/src/utils/author.tsx +0 -73
- package/src/utils/cn.test.ts +0 -48
- package/src/utils/cn.ts +0 -14
- package/src/utils/is-route-active.test.ts +0 -80
- package/src/utils/is-route-active.ts +0 -100
- package/src/utils/text.test.ts +0 -152
- package/src/utils/text.tsx +0 -209
- package/src/vite-env.d.ts +0 -1
- /package/dist/{components/background-slideshow.d.ts → background-slideshow/index.d.ts} +0 -0
- /package/dist/{components/blurry-gradient.d.ts → blurry-gradient/index.d.ts} +0 -0
- /package/dist/{components/countdown.d.ts → countdown/index.d.ts} +0 -0
- /package/dist/{components/generic-error.d.ts → generic-error/index.d.ts} +0 -0
- /package/dist/{components/icon-button.d.ts → icon-button/index.d.ts} +0 -0
- /package/dist/{components/if.d.ts → if/index.d.ts} +0 -0
- /package/dist/{components/iframe.d.ts → iframe/index.d.ts} +0 -0
- /package/dist/{components/markdown-container.d.ts → markdown-container/index.d.ts} +0 -0
- /package/dist/{components/password-input.d.ts → password-input/index.d.ts} +0 -0
- /package/dist/{components/picture.d.ts → picture/index.d.ts} +0 -0
- /package/src/{components → icon-button}/icon-button.tsx +0 -0
- /package/src/{components → if}/if.tsx +0 -0
- /package/src/{styles/storybook.css → storybook.css} +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { parseAuthorString } from '@regardio/js/text';
|
|
2
|
+
|
|
3
|
+
export function generateLinkFromAuthorString(input: string): React.ReactNode {
|
|
4
|
+
const match = parseAuthorString(input);
|
|
5
|
+
|
|
6
|
+
if (match.name) {
|
|
7
|
+
// Generate email link if email is present
|
|
8
|
+
if (match.email) {
|
|
9
|
+
return (
|
|
10
|
+
<a
|
|
11
|
+
className={'u-email p-name'}
|
|
12
|
+
href={`mailto:${match.email}`}
|
|
13
|
+
>
|
|
14
|
+
{match.name}
|
|
15
|
+
</a>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Generate URL link if URL is present (including relative URLs that start with a slash)
|
|
20
|
+
if (match.url && (match.url.startsWith('/') || match.url.startsWith('http'))) {
|
|
21
|
+
return (
|
|
22
|
+
<a
|
|
23
|
+
className={'u-url p-name'}
|
|
24
|
+
href={match.url}
|
|
25
|
+
>
|
|
26
|
+
{match.name}
|
|
27
|
+
</a>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Return plain name with microformat class if only name is present
|
|
32
|
+
return <span className={'p-name'}>{match.name}</span>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { generateLinkFromAuthorString } from './author';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { lowerCaseSzett, replaceSpecialChars, shy, wrapSentences } from './text';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { replaceShyInString, splitIntoSentences, typographicQuotes } from '@regardio/js/text';
|
|
2
|
+
import React, { cloneElement, isValidElement, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export const lowerCaseSzett = (text: ReactNode | string, _returnType?: 'string'): ReactNode => {
|
|
5
|
+
// Helper function to process strings
|
|
6
|
+
const processString = (str: string): ReactNode | string => {
|
|
7
|
+
const parts = str.split(/(ß)/g);
|
|
8
|
+
return parts.map((part, index) =>
|
|
9
|
+
part === 'ß' ? (
|
|
10
|
+
<span
|
|
11
|
+
className="lowercase"
|
|
12
|
+
key={index.toString()}
|
|
13
|
+
>
|
|
14
|
+
{part}
|
|
15
|
+
</span>
|
|
16
|
+
) : (
|
|
17
|
+
part
|
|
18
|
+
),
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Handle strings
|
|
23
|
+
if (typeof text === 'string') {
|
|
24
|
+
return processString(text);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Handle valid React elements with correct type assertion
|
|
28
|
+
if (isValidElement(text)) {
|
|
29
|
+
const element = text as ReactElement<{ children?: ReactNode }>;
|
|
30
|
+
const { children, ...props } = element.props;
|
|
31
|
+
|
|
32
|
+
return cloneElement(element, {
|
|
33
|
+
...props,
|
|
34
|
+
children: lowerCaseSzett(children),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Handle arrays
|
|
39
|
+
if (Array.isArray(text)) {
|
|
40
|
+
return text.map((child, index) => (
|
|
41
|
+
<React.Fragment key={index.toString()}>{lowerCaseSzett(child as ReactNode)}</React.Fragment>
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Return other types as is
|
|
46
|
+
return text;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Recursive function to traverse ReactNode and replace ­ in string nodes
|
|
50
|
+
function replaceShyInReactNode(node: ReactNode): ReactNode {
|
|
51
|
+
if (typeof node === 'string') {
|
|
52
|
+
// Replace soft hyphen (­) with an empty string or custom logic
|
|
53
|
+
return node.replace(/\u00AD/g, '');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isValidElement(node)) {
|
|
57
|
+
const element = node as ReactElement<{ children?: ReactNode }>;
|
|
58
|
+
const { children, ...props } = element.props;
|
|
59
|
+
|
|
60
|
+
return cloneElement(element, {
|
|
61
|
+
...props,
|
|
62
|
+
children: replaceShyInReactNode(children),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (Array.isArray(node)) {
|
|
67
|
+
return node.map((child, index) => (
|
|
68
|
+
<React.Fragment key={index.toString()}>
|
|
69
|
+
{replaceShyInReactNode(child as ReactNode)}
|
|
70
|
+
</React.Fragment>
|
|
71
|
+
));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return node;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function shy(input: string | ReactNode | null): string | ReactNode | null {
|
|
78
|
+
if (input === null) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (typeof input === 'string') {
|
|
83
|
+
return replaceShyInString(input);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return replaceShyInReactNode(input);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Replace special characters in text: typographic quotes and soft hyphens.
|
|
91
|
+
* This is a React-aware version that handles ReactNode trees.
|
|
92
|
+
*/
|
|
93
|
+
export function replaceSpecialChars(text: string, locale: string): string | ReactNode | null {
|
|
94
|
+
return shy(typographicQuotes(text, locale));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Wrap sentences in span elements
|
|
99
|
+
*/
|
|
100
|
+
export function wrapSentences(text: string): ReactNode {
|
|
101
|
+
const sentences = splitIntoSentences(text);
|
|
102
|
+
return sentences.map((sentence, index) => <span key={index.toString()}>{sentence} </span>);
|
|
103
|
+
}
|
package/dist/components/box.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as cva from 'cva';
|
|
3
|
-
import { VariantProps } from 'cva';
|
|
4
|
-
import { ComponentProps, ElementType } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const box: (props?: ({
|
|
7
|
-
variant?: "grid" | "main" | "primary" | "aside" | "code" | "container" | "flex" | "section" | undefined;
|
|
8
|
-
} & ({
|
|
9
|
-
class?: cva.ClassValue;
|
|
10
|
-
className?: never;
|
|
11
|
-
} | {
|
|
12
|
-
class?: never;
|
|
13
|
-
className?: cva.ClassValue;
|
|
14
|
-
})) | undefined) => string;
|
|
15
|
-
interface BoxProps extends ComponentProps<'div'>, VariantProps<typeof box> {
|
|
16
|
-
as?: ElementType;
|
|
17
|
-
}
|
|
18
|
-
declare const Box: ({ as: Component, children, className, variant, ...props }: BoxProps) => react_jsx_runtime.JSX.Element;
|
|
19
|
-
|
|
20
|
-
export { Box, type BoxProps };
|
package/dist/components/box.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'cva';
|
|
2
|
-
import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
// src/utils/cn.ts
|
|
6
|
-
var { cva, compose } = defineConfig({
|
|
7
|
-
hooks: {
|
|
8
|
-
onComplete: (className) => {
|
|
9
|
-
return twMerge(className);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var box = cva({
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
variant: "primary"
|
|
16
|
-
},
|
|
17
|
-
variants: {
|
|
18
|
-
variant: {
|
|
19
|
-
aside: [],
|
|
20
|
-
code: ["font-monospace", "overflow-scroll"],
|
|
21
|
-
container: ["u-container"],
|
|
22
|
-
flex: ["flex"],
|
|
23
|
-
grid: ["u-grid"],
|
|
24
|
-
main: [],
|
|
25
|
-
primary: [],
|
|
26
|
-
section: ["u-grid", "content-start"]
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var Box = ({
|
|
31
|
-
as: Component = "div",
|
|
32
|
-
children,
|
|
33
|
-
className,
|
|
34
|
-
variant,
|
|
35
|
-
...props
|
|
36
|
-
}) => {
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
Component,
|
|
39
|
-
{
|
|
40
|
-
className: box({
|
|
41
|
-
className,
|
|
42
|
-
variant
|
|
43
|
-
}),
|
|
44
|
-
...props,
|
|
45
|
-
children
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export { Box };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as cva from 'cva';
|
|
3
|
-
import { VariantProps } from 'cva';
|
|
4
|
-
import { ComponentProps } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const dl: (props?: ({
|
|
7
|
-
variant?: "primary" | "unstyled" | undefined;
|
|
8
|
-
} & ({
|
|
9
|
-
class?: cva.ClassValue;
|
|
10
|
-
className?: never;
|
|
11
|
-
} | {
|
|
12
|
-
class?: never;
|
|
13
|
-
className?: cva.ClassValue;
|
|
14
|
-
})) | undefined) => string;
|
|
15
|
-
declare const dt: (props?: ({
|
|
16
|
-
variant?: "primary" | undefined;
|
|
17
|
-
} & ({
|
|
18
|
-
class?: cva.ClassValue;
|
|
19
|
-
className?: never;
|
|
20
|
-
} | {
|
|
21
|
-
class?: never;
|
|
22
|
-
className?: cva.ClassValue;
|
|
23
|
-
})) | undefined) => string;
|
|
24
|
-
declare const dd: (props?: ({
|
|
25
|
-
variant?: "primary" | undefined;
|
|
26
|
-
} & ({
|
|
27
|
-
class?: cva.ClassValue;
|
|
28
|
-
className?: never;
|
|
29
|
-
} | {
|
|
30
|
-
class?: never;
|
|
31
|
-
className?: cva.ClassValue;
|
|
32
|
-
})) | undefined) => string;
|
|
33
|
-
interface DefinitionListProps extends ComponentProps<'dl'>, VariantProps<typeof dl> {
|
|
34
|
-
}
|
|
35
|
-
interface DtProps extends ComponentProps<'dt'>, VariantProps<typeof dt> {
|
|
36
|
-
}
|
|
37
|
-
interface DdProps extends ComponentProps<'dd'>, VariantProps<typeof dd> {
|
|
38
|
-
}
|
|
39
|
-
declare const DefinitionList: (props: DefinitionListProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
-
declare const Dt: (props: DtProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
-
declare const Dd: (props: DdProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
-
|
|
43
|
-
export { Dd, type DdProps, DefinitionList, type DefinitionListProps, Dt, type DtProps };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'cva';
|
|
2
|
-
import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
// src/utils/cn.ts
|
|
6
|
-
var { cva, compose } = defineConfig({
|
|
7
|
-
hooks: {
|
|
8
|
-
onComplete: (className) => {
|
|
9
|
-
return twMerge(className);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
var dl = cva({
|
|
14
|
-
base: ["grid"],
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "primary"
|
|
17
|
-
},
|
|
18
|
-
variants: {
|
|
19
|
-
variant: {
|
|
20
|
-
primary: ["grid-cols-[auto,1fr]", "gap-x-s", "gap-y-2xs"],
|
|
21
|
-
// Two-column grid with gap
|
|
22
|
-
unstyled: ["list-none", "p-0", "grid-cols-1"]
|
|
23
|
-
// Unstyled, single column
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
var dt = cva({
|
|
28
|
-
base: [],
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "primary"
|
|
31
|
-
},
|
|
32
|
-
variants: {
|
|
33
|
-
variant: {
|
|
34
|
-
primary: ["uppercase", "tracking-wide"]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
var dd = cva({
|
|
39
|
-
base: ["mb-xs"],
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
variant: "primary"
|
|
42
|
-
},
|
|
43
|
-
variants: {
|
|
44
|
-
variant: {
|
|
45
|
-
primary: []
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
var DefinitionList = (props) => {
|
|
50
|
-
const { children, className, variant } = props;
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
"dl",
|
|
53
|
-
{
|
|
54
|
-
className: dl({
|
|
55
|
-
className,
|
|
56
|
-
variant
|
|
57
|
-
}),
|
|
58
|
-
children
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
var Dt = (props) => {
|
|
63
|
-
const { children, className, variant } = props;
|
|
64
|
-
return /* @__PURE__ */ jsx(
|
|
65
|
-
"dt",
|
|
66
|
-
{
|
|
67
|
-
className: dt({
|
|
68
|
-
className,
|
|
69
|
-
variant
|
|
70
|
-
}),
|
|
71
|
-
children
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
var Dd = (props) => {
|
|
76
|
-
const { children, className, variant } = props;
|
|
77
|
-
return /* @__PURE__ */ jsx(
|
|
78
|
-
"dd",
|
|
79
|
-
{
|
|
80
|
-
className: dd({
|
|
81
|
-
className,
|
|
82
|
-
variant
|
|
83
|
-
}),
|
|
84
|
-
children
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export { Dd, DefinitionList, Dt };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as cva from 'cva';
|
|
3
|
-
import { VariantProps } from 'cva';
|
|
4
|
-
import { HTMLAttributes, ElementType } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const heading: (props?: ({
|
|
7
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
8
|
-
variant?: undefined;
|
|
9
|
-
} & ({
|
|
10
|
-
class?: cva.ClassValue;
|
|
11
|
-
className?: never;
|
|
12
|
-
} | {
|
|
13
|
-
class?: never;
|
|
14
|
-
className?: cva.ClassValue;
|
|
15
|
-
})) | undefined) => string;
|
|
16
|
-
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof heading> {
|
|
17
|
-
as?: ElementType;
|
|
18
|
-
className?: string;
|
|
19
|
-
locale?: string;
|
|
20
|
-
}
|
|
21
|
-
type HeadingLevel = HeadingProps['level'];
|
|
22
|
-
declare const Heading: {
|
|
23
|
-
({ as, children, className, level, variant, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
24
|
-
displayName: string;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { Heading, type HeadingLevel, type HeadingProps };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as cva from 'cva';
|
|
3
|
-
import { VariantProps } from 'cva';
|
|
4
|
-
import { ComponentProps } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const li: (props?: ({
|
|
7
|
-
variant?: "primary" | undefined;
|
|
8
|
-
} & ({
|
|
9
|
-
class?: cva.ClassValue;
|
|
10
|
-
className?: never;
|
|
11
|
-
} | {
|
|
12
|
-
class?: never;
|
|
13
|
-
className?: cva.ClassValue;
|
|
14
|
-
})) | undefined) => string;
|
|
15
|
-
interface HighlightProps extends ComponentProps<'mark'>, VariantProps<typeof li> {
|
|
16
|
-
}
|
|
17
|
-
declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
export { Highlight, type HighlightProps };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as cva from 'cva';
|
|
3
|
-
import { VariantProps } from 'cva';
|
|
4
|
-
import { ComponentProps, ElementType } from 'react';
|
|
5
|
-
|
|
6
|
-
declare const priorities: {
|
|
7
|
-
high: never[];
|
|
8
|
-
low: never[];
|
|
9
|
-
medium: never[];
|
|
10
|
-
};
|
|
11
|
-
declare const paddingValues: {
|
|
12
|
-
default: string;
|
|
13
|
-
gutter: string;
|
|
14
|
-
};
|
|
15
|
-
declare const width: {
|
|
16
|
-
full: string[];
|
|
17
|
-
lg: string[];
|
|
18
|
-
md: string[];
|
|
19
|
-
sm: string[];
|
|
20
|
-
xl: string[];
|
|
21
|
-
xs: string[];
|
|
22
|
-
};
|
|
23
|
-
declare const height: {
|
|
24
|
-
1: string[];
|
|
25
|
-
2: string[];
|
|
26
|
-
3: string[];
|
|
27
|
-
4: string[];
|
|
28
|
-
5: string[];
|
|
29
|
-
6: string[];
|
|
30
|
-
};
|
|
31
|
-
declare const themeColors: {
|
|
32
|
-
black: never[];
|
|
33
|
-
blue: never[];
|
|
34
|
-
coral: never[];
|
|
35
|
-
cyan: never[];
|
|
36
|
-
gray: never[];
|
|
37
|
-
green: never[];
|
|
38
|
-
lime: never[];
|
|
39
|
-
neutral: never[];
|
|
40
|
-
olive: never[];
|
|
41
|
-
orange: never[];
|
|
42
|
-
pink: never[];
|
|
43
|
-
purple: never[];
|
|
44
|
-
red: never[];
|
|
45
|
-
teal: never[];
|
|
46
|
-
unstyled: never[];
|
|
47
|
-
white: never[];
|
|
48
|
-
yellow: never[];
|
|
49
|
-
};
|
|
50
|
-
declare const item: (props?: ({
|
|
51
|
-
height?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
52
|
-
padding?: "default" | "gutter" | undefined;
|
|
53
|
-
priority?: "high" | "low" | "medium" | undefined;
|
|
54
|
-
themeColor?: "black" | "blue" | "coral" | "cyan" | "gray" | "green" | "lime" | "olive" | "orange" | "pink" | "purple" | "red" | "teal" | "white" | "yellow" | "unstyled" | "neutral" | undefined;
|
|
55
|
-
variant?: "primary" | "reset" | "spacer" | "unstyled" | undefined;
|
|
56
|
-
width?: "full" | "lg" | "md" | "sm" | "xl" | "xs" | undefined;
|
|
57
|
-
} & ({
|
|
58
|
-
class?: cva.ClassValue;
|
|
59
|
-
className?: never;
|
|
60
|
-
} | {
|
|
61
|
-
class?: never;
|
|
62
|
-
className?: cva.ClassValue;
|
|
63
|
-
})) | undefined) => string;
|
|
64
|
-
interface ItemProps extends ComponentProps<'div'>, VariantProps<typeof item> {
|
|
65
|
-
as?: ElementType;
|
|
66
|
-
link?: string;
|
|
67
|
-
}
|
|
68
|
-
declare const Item: ({ as: Component, children, className, height, link, padding, priority, themeColor, variant, width, ...props }: ItemProps) => react_jsx_runtime.JSX.Element;
|
|
69
|
-
|
|
70
|
-
export { Item, type ItemProps, height, paddingValues, priorities, themeColors, width };
|