@regardio/react 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/background-slideshow.d.ts +7 -5
- package/dist/components/background-slideshow.js +172 -74
- package/dist/components/blurry-gradient.d.ts +11 -4
- package/dist/components/blurry-gradient.js +121 -5
- package/dist/components/box.d.ts +12 -9
- package/dist/components/box.js +48 -23
- package/dist/components/carousel.d.ts +12 -10
- package/dist/components/carousel.js +146 -66
- package/dist/components/countdown.d.ts +5 -2
- package/dist/components/countdown.js +55 -21
- package/dist/components/definition-list.d.ts +19 -16
- package/dist/components/definition-list.js +83 -51
- package/dist/components/generic-error.d.ts +25 -5
- package/dist/components/generic-error.js +42 -34
- package/dist/components/heading.d.ts +13 -10
- package/dist/components/heading.js +114 -25
- package/dist/components/highlight.d.ts +11 -8
- package/dist/components/highlight.js +65 -17
- package/dist/components/icon-button.d.ts +7 -4
- package/dist/components/icon-button.js +16 -5
- package/dist/components/if.d.ts +6 -4
- package/dist/components/if.js +22 -14
- package/dist/components/iframe.d.ts +6 -4
- package/dist/components/iframe.js +26 -3
- package/dist/components/item.d.ts +17 -14
- package/dist/components/item.js +504 -301
- package/dist/components/leaflet-map.d.ts +5 -4
- package/dist/components/leaflet-map.js +192 -186
- package/dist/components/link.d.ts +24 -16
- package/dist/components/link.js +191 -102
- package/dist/components/list-item.d.ts +11 -8
- package/dist/components/list-item.js +35 -17
- package/dist/components/maptiler-map.d.ts +5 -4
- package/dist/components/maptiler-map.js +125 -112
- package/dist/components/markdown-container.d.ts +10 -8
- package/dist/components/markdown-container.js +181 -82
- package/dist/components/password-input.d.ts +7 -5
- package/dist/components/password-input.js +50 -8
- package/dist/components/picture.d.ts +19 -7
- package/dist/components/picture.js +75 -34
- package/dist/components/protected-email.d.ts +14 -3
- package/dist/components/protected-email.js +29 -15
- package/dist/components/text.d.ts +12 -9
- package/dist/components/text.js +42 -24
- package/dist/components/unordered-list.d.ts +11 -8
- package/dist/components/unordered-list.js +37 -19
- package/dist/hooks/use-current-route-data.d.ts +7 -2
- package/dist/hooks/use-current-route-data.js +13 -9
- package/dist/hooks/use-focus-search.d.ts +6 -3
- package/dist/hooks/use-focus-search.js +17 -13
- package/dist/hooks/use-matches-data.d.ts +9 -2
- package/dist/hooks/use-matches-data.js +12 -8
- package/dist/hooks/use-media-query.d.ts +8 -2
- package/dist/hooks/use-media-query.js +19 -15
- package/dist/hooks/use-mobile.d.ts +3 -2
- package/dist/hooks/use-mobile.js +18 -14
- package/dist/hooks/use-nonce.d.ts +12 -5
- package/dist/hooks/use-nonce.js +11 -7
- package/dist/hooks/use-orientation.d.ts +11 -3
- package/dist/hooks/use-orientation.js +28 -24
- package/dist/hooks/use-user.d.ts +43 -8
- package/dist/hooks/use-user.js +21 -13
- package/dist/utils/author.d.ts +4 -4
- package/dist/utils/author.js +49 -31
- package/dist/utils/cn.d.ts +8 -4
- package/dist/utils/cn.js +12 -8
- package/dist/utils/is-route-active.d.ts +19 -3
- package/dist/utils/is-route-active.js +45 -43
- package/dist/utils/locale.d.ts +66 -4
- package/dist/utils/locale.js +33 -22
- package/dist/utils/text.d.ts +24 -7
- package/dist/utils/text.js +114 -89
- package/package.json +4 -3
- package/dist/components/background-slideshow.d.ts.map +0 -1
- package/dist/components/blurry-gradient.d.ts.map +0 -1
- package/dist/components/box.d.ts.map +0 -1
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/countdown.d.ts.map +0 -1
- package/dist/components/definition-list.d.ts.map +0 -1
- package/dist/components/generic-error.d.ts.map +0 -1
- package/dist/components/heading.d.ts.map +0 -1
- package/dist/components/highlight.d.ts.map +0 -1
- package/dist/components/icon-button.d.ts.map +0 -1
- package/dist/components/if.d.ts.map +0 -1
- package/dist/components/iframe.d.ts.map +0 -1
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/leaflet-map.d.ts.map +0 -1
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.test.d.ts +0 -2
- package/dist/components/link.test.d.ts.map +0 -1
- package/dist/components/link.test.js +0 -204
- package/dist/components/list-item.d.ts.map +0 -1
- package/dist/components/maptiler-map.d.ts.map +0 -1
- package/dist/components/markdown-container.d.ts.map +0 -1
- package/dist/components/password-input.d.ts.map +0 -1
- package/dist/components/picture.d.ts.map +0 -1
- package/dist/components/protected-email.d.ts.map +0 -1
- package/dist/components/text.d.ts.map +0 -1
- package/dist/components/unordered-list.d.ts.map +0 -1
- package/dist/hooks/use-current-route-data.d.ts.map +0 -1
- package/dist/hooks/use-focus-search.d.ts.map +0 -1
- package/dist/hooks/use-matches-data.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-nonce.d.ts.map +0 -1
- package/dist/hooks/use-nonce.test.d.ts +0 -2
- package/dist/hooks/use-nonce.test.d.ts.map +0 -1
- package/dist/hooks/use-nonce.test.js +0 -27
- package/dist/hooks/use-orientation.d.ts.map +0 -1
- package/dist/hooks/use-user.d.ts.map +0 -1
- package/dist/shadcn/accordion.d.ts +0 -25
- package/dist/shadcn/accordion.d.ts.map +0 -1
- package/dist/shadcn/accordion.js +0 -45
- package/dist/shadcn/alert-dialog.d.ts +0 -73
- package/dist/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/shadcn/alert-dialog.js +0 -93
- package/dist/shadcn/alert.d.ts +0 -34
- package/dist/shadcn/alert.d.ts.map +0 -1
- package/dist/shadcn/alert.js +0 -42
- package/dist/shadcn/aspect-ratio.d.ts +0 -6
- package/dist/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/shadcn/aspect-ratio.js +0 -7
- package/dist/shadcn/avatar.d.ts +0 -16
- package/dist/shadcn/avatar.d.ts.map +0 -1
- package/dist/shadcn/avatar.js +0 -27
- package/dist/shadcn/badge.d.ts +0 -29
- package/dist/shadcn/badge.d.ts.map +0 -1
- package/dist/shadcn/badge.js +0 -29
- package/dist/shadcn/breadcrumb.d.ts +0 -42
- package/dist/shadcn/breadcrumb.d.ts.map +0 -1
- package/dist/shadcn/breadcrumb.js +0 -74
- package/dist/shadcn/button.d.ts +0 -38
- package/dist/shadcn/button.d.ts.map +0 -1
- package/dist/shadcn/button.js +0 -38
- package/dist/shadcn/calendar.d.ts +0 -23
- package/dist/shadcn/calendar.d.ts.map +0 -1
- package/dist/shadcn/calendar.js +0 -163
- package/dist/shadcn/card.d.ts +0 -31
- package/dist/shadcn/card.d.ts.map +0 -1
- package/dist/shadcn/card.js +0 -55
- package/dist/shadcn/carousel.d.ts +0 -51
- package/dist/shadcn/carousel.d.ts.map +0 -1
- package/dist/shadcn/carousel.js +0 -161
- package/dist/shadcn/chart.d.ts +0 -103
- package/dist/shadcn/chart.d.ts.map +0 -1
- package/dist/shadcn/chart.js +0 -248
- package/dist/shadcn/checkbox.d.ts +0 -8
- package/dist/shadcn/checkbox.d.ts.map +0 -1
- package/dist/shadcn/checkbox.js +0 -22
- package/dist/shadcn/collapsible.d.ts +0 -16
- package/dist/shadcn/collapsible.d.ts.map +0 -1
- package/dist/shadcn/collapsible.js +0 -19
- package/dist/shadcn/command.d.ts +0 -61
- package/dist/shadcn/command.d.ts.map +0 -1
- package/dist/shadcn/command.js +0 -123
- package/dist/shadcn/context-menu.d.ts +0 -107
- package/dist/shadcn/context-menu.d.ts.map +0 -1
- package/dist/shadcn/context-menu.js +0 -151
- package/dist/shadcn/dialog.d.ts +0 -57
- package/dist/shadcn/dialog.d.ts.map +0 -1
- package/dist/shadcn/dialog.js +0 -96
- package/dist/shadcn/drawer.d.ts +0 -54
- package/dist/shadcn/drawer.d.ts.map +0 -1
- package/dist/shadcn/drawer.js +0 -96
- package/dist/shadcn/dropdown-menu.d.ts +0 -110
- package/dist/shadcn/dropdown-menu.d.ts.map +0 -1
- package/dist/shadcn/dropdown-menu.js +0 -152
- package/dist/shadcn/form.d.ts +0 -59
- package/dist/shadcn/form.d.ts.map +0 -1
- package/dist/shadcn/form.js +0 -99
- package/dist/shadcn/hover-card.d.ts +0 -20
- package/dist/shadcn/hover-card.d.ts.map +0 -1
- package/dist/shadcn/hover-card.js +0 -26
- package/dist/shadcn/input-otp.d.ts +0 -25
- package/dist/shadcn/input-otp.d.ts.map +0 -1
- package/dist/shadcn/input-otp.js +0 -54
- package/dist/shadcn/input.d.ts +0 -14
- package/dist/shadcn/input.d.ts.map +0 -1
- package/dist/shadcn/input.js +0 -48
- package/dist/shadcn/label.d.ts +0 -8
- package/dist/shadcn/label.d.ts.map +0 -1
- package/dist/shadcn/label.js +0 -16
- package/dist/shadcn/menubar.d.ts +0 -108
- package/dist/shadcn/menubar.d.ts.map +0 -1
- package/dist/shadcn/menubar.js +0 -174
- package/dist/shadcn/navigation-menu.d.ts +0 -79
- package/dist/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/shadcn/navigation-menu.js +0 -108
- package/dist/shadcn/pagination.d.ts +0 -45
- package/dist/shadcn/pagination.d.ts.map +0 -1
- package/dist/shadcn/pagination.js +0 -83
- package/dist/shadcn/popover.d.ts +0 -19
- package/dist/shadcn/popover.d.ts.map +0 -1
- package/dist/shadcn/popover.js +0 -29
- package/dist/shadcn/progress.d.ts +0 -9
- package/dist/shadcn/progress.d.ts.map +0 -1
- package/dist/shadcn/progress.js +0 -17
- package/dist/shadcn/radio-group.d.ts +0 -12
- package/dist/shadcn/radio-group.d.ts.map +0 -1
- package/dist/shadcn/radio-group.js +0 -32
- package/dist/shadcn/resizable.d.ts +0 -20
- package/dist/shadcn/resizable.d.ts.map +0 -1
- package/dist/shadcn/resizable.js +0 -32
- package/dist/shadcn/scroll-area.d.ts +0 -16
- package/dist/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/shadcn/scroll-area.js +0 -40
- package/dist/shadcn/select.d.ts +0 -63
- package/dist/shadcn/select.d.ts.map +0 -1
- package/dist/shadcn/select.js +0 -120
- package/dist/shadcn/separator.d.ts +0 -10
- package/dist/shadcn/separator.d.ts.map +0 -1
- package/dist/shadcn/separator.js +0 -18
- package/dist/shadcn/sheet.d.ts +0 -48
- package/dist/shadcn/sheet.d.ts.map +0 -1
- package/dist/shadcn/sheet.js +0 -99
- package/dist/shadcn/sidebar.d.ts +0 -200
- package/dist/shadcn/sidebar.d.ts.map +0 -1
- package/dist/shadcn/sidebar.js +0 -528
- package/dist/shadcn/skeleton.d.ts +0 -6
- package/dist/shadcn/skeleton.d.ts.map +0 -1
- package/dist/shadcn/skeleton.js +0 -11
- package/dist/shadcn/slider.d.ts +0 -12
- package/dist/shadcn/slider.d.ts.map +0 -1
- package/dist/shadcn/slider.js +0 -50
- package/dist/shadcn/sonner.d.ts +0 -7
- package/dist/shadcn/sonner.d.ts.map +0 -1
- package/dist/shadcn/sonner.js +0 -20
- package/dist/shadcn/switch.d.ts +0 -8
- package/dist/shadcn/switch.d.ts.map +0 -1
- package/dist/shadcn/switch.js +0 -22
- package/dist/shadcn/table.d.ts +0 -35
- package/dist/shadcn/table.d.ts.map +0 -1
- package/dist/shadcn/table.js +0 -73
- package/dist/shadcn/tabs.d.ts +0 -20
- package/dist/shadcn/tabs.d.ts.map +0 -1
- package/dist/shadcn/tabs.js +0 -40
- package/dist/shadcn/textarea.d.ts +0 -7
- package/dist/shadcn/textarea.d.ts.map +0 -1
- package/dist/shadcn/textarea.js +0 -14
- package/dist/shadcn/toggle-group.d.ts +0 -22
- package/dist/shadcn/toggle-group.d.ts.map +0 -1
- package/dist/shadcn/toggle-group.js +0 -43
- package/dist/shadcn/toggle.d.ts +0 -29
- package/dist/shadcn/toggle.d.ts.map +0 -1
- package/dist/shadcn/toggle.js +0 -31
- package/dist/shadcn/tooltip.d.ts +0 -20
- package/dist/shadcn/tooltip.d.ts.map +0 -1
- package/dist/shadcn/tooltip.js +0 -40
- package/dist/stories/BackgroundSlideshow.stories.d.ts +0 -9
- package/dist/stories/BackgroundSlideshow.stories.d.ts.map +0 -1
- package/dist/stories/BackgroundSlideshow.stories.js +0 -60
- package/dist/stories/BlurryGradient.stories.d.ts +0 -11
- package/dist/stories/BlurryGradient.stories.d.ts.map +0 -1
- package/dist/stories/BlurryGradient.stories.js +0 -53
- package/dist/stories/Box.stories.d.ts +0 -13
- package/dist/stories/Box.stories.d.ts.map +0 -1
- package/dist/stories/Box.stories.js +0 -50
- package/dist/stories/Carousel.stories.d.ts +0 -9
- package/dist/stories/Carousel.stories.d.ts.map +0 -1
- package/dist/stories/Carousel.stories.js +0 -30
- package/dist/stories/Countdown.stories.d.ts +0 -7
- package/dist/stories/Countdown.stories.d.ts.map +0 -1
- package/dist/stories/Countdown.stories.js +0 -11
- package/dist/stories/DefinitionList.stories.d.ts +0 -9
- package/dist/stories/DefinitionList.stories.d.ts.map +0 -1
- package/dist/stories/DefinitionList.stories.js +0 -20
- package/dist/stories/GenericError.stories.d.ts +0 -9
- package/dist/stories/GenericError.stories.d.ts.map +0 -1
- package/dist/stories/GenericError.stories.js +0 -39
- package/dist/stories/Heading.stories.d.ts +0 -15
- package/dist/stories/Heading.stories.d.ts.map +0 -1
- package/dist/stories/Heading.stories.js +0 -61
- package/dist/stories/Highlight.stories.d.ts +0 -8
- package/dist/stories/Highlight.stories.d.ts.map +0 -1
- package/dist/stories/Highlight.stories.js +0 -19
- package/dist/stories/IconButton.stories.d.ts +0 -10
- package/dist/stories/IconButton.stories.d.ts.map +0 -1
- package/dist/stories/IconButton.stories.js +0 -32
- package/dist/stories/If.stories.d.ts +0 -13
- package/dist/stories/If.stories.d.ts.map +0 -1
- package/dist/stories/If.stories.js +0 -54
- package/dist/stories/Iframe.stories.d.ts +0 -8
- package/dist/stories/Iframe.stories.d.ts.map +0 -1
- package/dist/stories/Iframe.stories.js +0 -23
- package/dist/stories/Item.stories.d.ts +0 -10
- package/dist/stories/Item.stories.d.ts.map +0 -1
- package/dist/stories/Item.stories.js +0 -32
- package/dist/stories/Link.stories.d.ts +0 -10
- package/dist/stories/Link.stories.d.ts.map +0 -1
- package/dist/stories/Link.stories.js +0 -36
- package/dist/stories/ListItem.stories.d.ts +0 -9
- package/dist/stories/ListItem.stories.d.ts.map +0 -1
- package/dist/stories/ListItem.stories.js +0 -26
- package/dist/stories/MarkdownContainer.stories.d.ts +0 -11
- package/dist/stories/MarkdownContainer.stories.d.ts.map +0 -1
- package/dist/stories/MarkdownContainer.stories.js +0 -66
- package/dist/stories/PasswordInput.stories.d.ts +0 -9
- package/dist/stories/PasswordInput.stories.d.ts.map +0 -1
- package/dist/stories/PasswordInput.stories.js +0 -27
- package/dist/stories/Picture.stories.d.ts +0 -10
- package/dist/stories/Picture.stories.d.ts.map +0 -1
- package/dist/stories/Picture.stories.js +0 -46
- package/dist/stories/ProtectedEmail.stories.d.ts +0 -10
- package/dist/stories/ProtectedEmail.stories.d.ts.map +0 -1
- package/dist/stories/ProtectedEmail.stories.js +0 -34
- package/dist/stories/Text.stories.d.ts +0 -10
- package/dist/stories/Text.stories.d.ts.map +0 -1
- package/dist/stories/Text.stories.js +0 -31
- package/dist/stories/UnorderedList.stories.d.ts +0 -10
- package/dist/stories/UnorderedList.stories.d.ts.map +0 -1
- package/dist/stories/UnorderedList.stories.js +0 -24
- package/dist/test-setup.d.ts +0 -2
- package/dist/test-setup.d.ts.map +0 -1
- package/dist/test-setup.js +0 -1
- package/dist/utils/author.d.ts.map +0 -1
- package/dist/utils/author.test.d.ts +0 -2
- package/dist/utils/author.test.d.ts.map +0 -1
- package/dist/utils/author.test.js +0 -46
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.test.d.ts +0 -2
- package/dist/utils/cn.test.d.ts.map +0 -1
- package/dist/utils/cn.test.js +0 -33
- package/dist/utils/is-route-active.d.ts.map +0 -1
- package/dist/utils/is-route-active.test.d.ts +0 -2
- package/dist/utils/is-route-active.test.d.ts.map +0 -1
- package/dist/utils/is-route-active.test.js +0 -61
- package/dist/utils/locale.d.ts.map +0 -1
- package/dist/utils/locale.test.d.ts +0 -2
- package/dist/utils/locale.test.d.ts.map +0 -1
- package/dist/utils/locale.test.js +0 -99
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/text.test.d.ts +0 -2
- package/dist/utils/text.test.d.ts.map +0 -1
- package/dist/utils/text.test.js +0 -122
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
+
|
|
3
6
|
declare const heading: (props?: ({
|
|
4
7
|
level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
5
8
|
variant?: undefined;
|
|
6
9
|
} & ({
|
|
7
|
-
class?:
|
|
10
|
+
class?: cva.ClassValue;
|
|
8
11
|
className?: never;
|
|
9
12
|
} | {
|
|
10
13
|
class?: never;
|
|
11
|
-
className?:
|
|
14
|
+
className?: cva.ClassValue;
|
|
12
15
|
})) | undefined) => string;
|
|
13
|
-
|
|
16
|
+
interface HeadingProps extends HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof heading> {
|
|
14
17
|
as?: ElementType;
|
|
15
18
|
className?: string;
|
|
16
19
|
locale?: string;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
({ as, children, className, level, variant, ...props }: HeadingProps):
|
|
21
|
+
type HeadingLevel = HeadingProps['level'];
|
|
22
|
+
declare const Heading: {
|
|
23
|
+
({ as, children, className, level, variant, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
21
24
|
displayName: string;
|
|
22
25
|
};
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
|
|
27
|
+
export { Heading, type HeadingLevel, type HeadingProps };
|
|
@@ -1,29 +1,118 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { defineConfig, cx } from 'cva';
|
|
2
|
+
import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
|
|
3
|
+
import React, { isValidElement, cloneElement } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
// src/utils/cn.ts
|
|
7
|
+
var { cva, compose } = defineConfig({
|
|
8
|
+
hooks: {
|
|
9
|
+
onComplete: (className) => {
|
|
10
|
+
return twMerge(className);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var cn = (...inputs) => twMerge(cx(inputs));
|
|
15
|
+
var lowerCaseSzett = (text, _returnType) => {
|
|
16
|
+
const processString = (str) => {
|
|
17
|
+
const parts = str.split(/(ß)/g);
|
|
18
|
+
return parts.map(
|
|
19
|
+
(part, index) => part === "\xDF" ? /* @__PURE__ */ jsx(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: "lowercase",
|
|
23
|
+
children: part
|
|
17
24
|
},
|
|
18
|
-
|
|
25
|
+
index.toString()
|
|
26
|
+
) : part
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
if (typeof text === "string") {
|
|
30
|
+
return processString(text);
|
|
31
|
+
}
|
|
32
|
+
if (isValidElement(text)) {
|
|
33
|
+
const element = text;
|
|
34
|
+
const { children, ...props } = element.props;
|
|
35
|
+
return cloneElement(element, {
|
|
36
|
+
...props,
|
|
37
|
+
children: lowerCaseSzett(children)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(text)) {
|
|
41
|
+
return text.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: lowerCaseSzett(child) }, index.toString()));
|
|
42
|
+
}
|
|
43
|
+
return text;
|
|
44
|
+
};
|
|
45
|
+
function replaceShyInString(input) {
|
|
46
|
+
return input.replace(/­/g, "\xAD");
|
|
47
|
+
}
|
|
48
|
+
function replaceShyInReactNode(node) {
|
|
49
|
+
if (typeof node === "string") {
|
|
50
|
+
return node.replace(/\u00AD/g, "");
|
|
51
|
+
}
|
|
52
|
+
if (isValidElement(node)) {
|
|
53
|
+
const element = node;
|
|
54
|
+
const { children, ...props } = element.props;
|
|
55
|
+
return cloneElement(element, {
|
|
56
|
+
...props,
|
|
57
|
+
children: replaceShyInReactNode(children)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
if (Array.isArray(node)) {
|
|
61
|
+
return node.map((child, index) => /* @__PURE__ */ jsx(React.Fragment, { children: replaceShyInReactNode(child) }, index.toString()));
|
|
62
|
+
}
|
|
63
|
+
return node;
|
|
64
|
+
}
|
|
65
|
+
function shy(input) {
|
|
66
|
+
if (input === null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
if (typeof input === "string") {
|
|
70
|
+
return replaceShyInString(input);
|
|
71
|
+
}
|
|
72
|
+
return replaceShyInReactNode(input);
|
|
73
|
+
}
|
|
74
|
+
var heading = cva({
|
|
75
|
+
base: [],
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
level: 3
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
level: {
|
|
81
|
+
1: ["text-2xl"],
|
|
82
|
+
2: ["text-xl"],
|
|
83
|
+
3: ["text-lg"],
|
|
84
|
+
4: ["text-md"],
|
|
85
|
+
5: ["text-sm"],
|
|
86
|
+
6: ["text-xs"]
|
|
19
87
|
},
|
|
88
|
+
variant: {}
|
|
89
|
+
}
|
|
20
90
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
91
|
+
var Heading = ({
|
|
92
|
+
as,
|
|
93
|
+
children,
|
|
94
|
+
className,
|
|
95
|
+
level = 2,
|
|
96
|
+
variant,
|
|
97
|
+
...props
|
|
98
|
+
}) => {
|
|
99
|
+
const word = lowerCaseSzett(shy(children));
|
|
100
|
+
const Component = as || `h${level}`;
|
|
101
|
+
return /* @__PURE__ */ jsx(
|
|
102
|
+
Component,
|
|
103
|
+
{
|
|
104
|
+
className: cn(
|
|
105
|
+
heading({
|
|
106
|
+
level,
|
|
107
|
+
variant
|
|
108
|
+
}),
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...props,
|
|
112
|
+
children: word
|
|
113
|
+
}
|
|
114
|
+
);
|
|
28
115
|
};
|
|
29
|
-
Heading.displayName =
|
|
116
|
+
Heading.displayName = "Heading";
|
|
117
|
+
|
|
118
|
+
export { Heading };
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
+
|
|
3
6
|
declare const li: (props?: ({
|
|
4
7
|
variant?: "primary" | undefined;
|
|
5
8
|
} & ({
|
|
6
|
-
class?:
|
|
9
|
+
class?: cva.ClassValue;
|
|
7
10
|
className?: never;
|
|
8
11
|
} | {
|
|
9
12
|
class?: never;
|
|
10
|
-
className?:
|
|
13
|
+
className?: cva.ClassValue;
|
|
11
14
|
})) | undefined) => string;
|
|
12
|
-
|
|
15
|
+
interface HighlightProps extends ComponentProps<'mark'>, VariantProps<typeof li> {
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
declare const Highlight: (props: HighlightProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { Highlight, type HighlightProps };
|
|
@@ -1,19 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineConfig } from 'cva';
|
|
2
|
+
import { twMerge } from 'fluid-tailwindcss/tailwind-merge';
|
|
3
|
+
import { jsxs, 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
12
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
var li = cva({
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "primary"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
primary: ["highlight"]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
var Highlight = (props) => {
|
|
24
|
+
const { children, className, variant } = props;
|
|
25
|
+
return /* @__PURE__ */ jsxs(
|
|
26
|
+
"mark",
|
|
27
|
+
{
|
|
28
|
+
className: li({
|
|
29
|
+
className,
|
|
30
|
+
variant
|
|
31
|
+
}),
|
|
32
|
+
children: [
|
|
33
|
+
children,
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"svg",
|
|
36
|
+
{
|
|
37
|
+
"aria-label": "!",
|
|
38
|
+
role: "img",
|
|
39
|
+
children: /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("filter", { children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
"feTurbulence",
|
|
42
|
+
{
|
|
43
|
+
baseFrequency: "0 0.2",
|
|
44
|
+
numOctaves: "5",
|
|
45
|
+
result: "warp",
|
|
46
|
+
type: "fractalNoise"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(
|
|
50
|
+
"feDisplacementMap",
|
|
51
|
+
{
|
|
52
|
+
in: "SourceGraphic",
|
|
53
|
+
in2: "warp",
|
|
54
|
+
scale: "30",
|
|
55
|
+
xChannelSelector: "R",
|
|
56
|
+
yChannelSelector: "G"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }) })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
19
65
|
};
|
|
66
|
+
|
|
67
|
+
export { Highlight };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface IconButtonProps extends ComponentProps<'button'> {
|
|
3
5
|
icon: ReactNode;
|
|
4
6
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
declare const IconButton: (props: IconButtonProps) => react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { IconButton, type IconButtonProps };
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
// src/components/icon-button.tsx
|
|
4
|
+
var IconButton = (props) => {
|
|
5
|
+
const { className, icon } = props;
|
|
6
|
+
const defaultClassName = "p-0";
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"button",
|
|
9
|
+
{
|
|
10
|
+
className: className ? className : defaultClassName,
|
|
11
|
+
type: "button",
|
|
12
|
+
children: icon
|
|
13
|
+
}
|
|
14
|
+
);
|
|
6
15
|
};
|
|
16
|
+
|
|
17
|
+
export { IconButton };
|
package/dist/components/if.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
1
3
|
type Condition<Value = unknown> = Value | false | null | undefined | 0 | '';
|
|
2
|
-
|
|
4
|
+
declare function If<Value = unknown>({ condition, children, fallback, }: React.PropsWithoutRef<{
|
|
3
5
|
condition: Condition<Value>;
|
|
4
6
|
children: React.ReactNode | ((value: Value) => React.ReactNode);
|
|
5
7
|
fallback?: React.ReactNode;
|
|
6
|
-
}>):
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
}>): react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
|
|
10
|
+
export { If };
|
package/dist/components/if.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { useMemo } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
|
|
2
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/components/if.tsx
|
|
5
|
+
function If({
|
|
6
|
+
condition,
|
|
7
|
+
children,
|
|
8
|
+
fallback
|
|
9
|
+
}) {
|
|
10
|
+
return useMemo(() => {
|
|
11
|
+
if (condition) {
|
|
12
|
+
if (typeof children === "function") {
|
|
13
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children(condition) });
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
16
|
+
}
|
|
17
|
+
if (fallback) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Fragment, { children: fallback });
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}, [condition, fallback, children]);
|
|
16
22
|
}
|
|
23
|
+
|
|
24
|
+
export { If };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import react__default from 'react';
|
|
2
|
+
|
|
3
|
+
type IframeProps = {
|
|
3
4
|
src: string;
|
|
4
5
|
title: string;
|
|
5
6
|
className?: string;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
declare const Iframe: react__default.FC<IframeProps>;
|
|
9
|
+
|
|
10
|
+
export { Iframe, type IframeProps };
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { defineConfig, cx } 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 cn = (...inputs) => twMerge(cx(inputs));
|
|
14
|
+
var Iframe = ({ src, title, className }) => /* @__PURE__ */ jsx(
|
|
15
|
+
"iframe",
|
|
16
|
+
{
|
|
17
|
+
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
|
|
18
|
+
allowFullScreen: true,
|
|
19
|
+
className: cn("w-full aspect-video border-0", className),
|
|
20
|
+
loading: "lazy",
|
|
21
|
+
src,
|
|
22
|
+
title
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export { Iframe };
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
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: {
|
|
4
7
|
high: never[];
|
|
5
8
|
low: never[];
|
|
6
9
|
medium: never[];
|
|
7
10
|
};
|
|
8
|
-
|
|
11
|
+
declare const paddingValues: {
|
|
9
12
|
default: string;
|
|
10
13
|
gutter: string;
|
|
11
14
|
};
|
|
12
|
-
|
|
15
|
+
declare const width: {
|
|
13
16
|
full: string[];
|
|
14
17
|
lg: string[];
|
|
15
18
|
md: string[];
|
|
@@ -17,7 +20,7 @@ export declare const width: {
|
|
|
17
20
|
xl: string[];
|
|
18
21
|
xs: string[];
|
|
19
22
|
};
|
|
20
|
-
|
|
23
|
+
declare const height: {
|
|
21
24
|
1: string[];
|
|
22
25
|
2: string[];
|
|
23
26
|
3: string[];
|
|
@@ -25,7 +28,7 @@ export declare const height: {
|
|
|
25
28
|
5: string[];
|
|
26
29
|
6: string[];
|
|
27
30
|
};
|
|
28
|
-
|
|
31
|
+
declare const themeColors: {
|
|
29
32
|
black: never[];
|
|
30
33
|
blue: never[];
|
|
31
34
|
coral: never[];
|
|
@@ -49,19 +52,19 @@ declare const item: (props?: ({
|
|
|
49
52
|
padding?: "default" | "gutter" | undefined;
|
|
50
53
|
priority?: "high" | "low" | "medium" | undefined;
|
|
51
54
|
themeColor?: "black" | "blue" | "coral" | "cyan" | "gray" | "green" | "lime" | "olive" | "orange" | "pink" | "purple" | "red" | "teal" | "white" | "yellow" | "unstyled" | "neutral" | undefined;
|
|
52
|
-
variant?: "
|
|
55
|
+
variant?: "primary" | "reset" | "spacer" | "unstyled" | undefined;
|
|
53
56
|
width?: "full" | "lg" | "md" | "sm" | "xl" | "xs" | undefined;
|
|
54
57
|
} & ({
|
|
55
|
-
class?:
|
|
58
|
+
class?: cva.ClassValue;
|
|
56
59
|
className?: never;
|
|
57
60
|
} | {
|
|
58
61
|
class?: never;
|
|
59
|
-
className?:
|
|
62
|
+
className?: cva.ClassValue;
|
|
60
63
|
})) | undefined) => string;
|
|
61
|
-
|
|
64
|
+
interface ItemProps extends ComponentProps<'div'>, VariantProps<typeof item> {
|
|
62
65
|
as?: ElementType;
|
|
63
66
|
link?: string;
|
|
64
67
|
}
|
|
65
|
-
|
|
66
|
-
|
|
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 };
|