@obosbbl/grunnmuren-react 3.0.16 → 3.1.1
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/__stories__/form-validation.stories.cjs +488 -0
- package/dist/__stories__/form-validation.stories.d.cts +11 -0
- package/dist/__stories__/form-validation.stories.d.ts +11 -0
- package/dist/__stories__/form-validation.stories.js +482 -0
- package/dist/__stories__/home.stories.cjs +32 -0
- package/dist/__stories__/home.stories.d.cts +10 -0
- package/dist/__stories__/home.stories.d.ts +10 -0
- package/dist/__stories__/home.stories.js +29 -0
- package/dist/__stories__/icons.stories.cjs +47 -0
- package/dist/__stories__/icons.stories.d.cts +8 -0
- package/dist/__stories__/icons.stories.d.ts +8 -0
- package/dist/__stories__/icons.stories.js +24 -0
- package/dist/__stories__/typography.stories.cjs +224 -0
- package/dist/__stories__/typography.stories.d.cts +14 -0
- package/dist/__stories__/typography.stories.d.ts +14 -0
- package/dist/__stories__/typography.stories.js +214 -0
- package/dist/index.d.mts +44 -61
- package/dist/index.mjs +289 -246
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
import { ButtonProps as ButtonProps$1, LinkProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ContextValue, CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1,
|
|
1
|
+
import { DisclosureProps as DisclosureProps$1, ButtonProps as ButtonProps$1, LinkProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ContextValue, CheckboxProps as CheckboxProps$1, CheckboxGroupProps as CheckboxGroupProps$1, HeadingProps as HeadingProps$1, ListBoxItemProps, ListBoxSectionProps, ComboBoxProps, FileTriggerProps as FileTriggerProps$1, RouterProvider, TextProps, LabelProps, DialogProps as DialogProps$1, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, NumberFieldProps as NumberFieldProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, TableProps as TableProps$1, TableBodyProps as TableBodyProps$1, CellProps, ColumnProps, TableHeaderProps as TableHeaderProps$1, RowProps, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1 } from 'react-aria-components';
|
|
2
2
|
export { ListBoxItemProps as ComboboxItemProps, Form, Group, LabelProps, ListBoxItemProps as SelectItemProps, DisclosureGroup as UNSAFE_DisclosureGroup, DisclosureGroupProps as UNSAFE_DisclosureGroupProps } from 'react-aria-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { RefAttributes, HTMLAttributes, HTMLProps, ComponentProps, Ref, JSX, ReactNode, RefObject, Dispatch, SetStateAction } from 'react';
|
|
6
6
|
import * as cva from 'cva';
|
|
7
7
|
import { VariantProps } from 'cva';
|
|
8
|
-
import { DateFormatterOptions } from 'react-aria';
|
|
9
8
|
import { DisclosureState } from 'react-stately';
|
|
9
|
+
import { DateFormatterOptions } from 'react-aria';
|
|
10
10
|
import { FormValidationProps } from '@react-stately/form';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
declare const disclosureButtonVariants: (props?: ({
|
|
13
|
+
withChevron?: boolean | undefined;
|
|
14
|
+
isIconOnly?: boolean | undefined;
|
|
15
|
+
} & ({
|
|
16
|
+
class?: cva.ClassValue;
|
|
17
|
+
className?: never;
|
|
18
|
+
} | {
|
|
19
|
+
class?: never;
|
|
20
|
+
className?: cva.ClassValue;
|
|
21
|
+
})) | undefined) => string;
|
|
22
|
+
type DisclosureButtonProps = Omit<ButtonProps$1, 'children' | 'aria-expanded' | 'aria-controls'> & VariantProps<typeof disclosureButtonVariants> & {
|
|
13
23
|
children: React.ReactNode;
|
|
14
|
-
|
|
24
|
+
} & RefAttributes<HTMLButtonElement>;
|
|
25
|
+
declare const DisclosureButton: ({ className, withChevron, isIconOnly, children, ref: _ref, ...restProps }: DisclosureButtonProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
type DisclosureProps = DisclosureProps$1 & RefAttributes<HTMLDivElement> & {
|
|
15
27
|
className?: string;
|
|
16
|
-
/** Additional style properties for the element. */
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
/** Ref to the element. */
|
|
19
|
-
ref?: Ref<HTMLDivElement>;
|
|
20
28
|
};
|
|
21
|
-
|
|
29
|
+
declare const DisclosureStateContext: react.Context<DisclosureState | null>;
|
|
30
|
+
declare const Disclosure: ({ ref: _ref, children, ..._props }: DisclosureProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
+
type DisclosurePanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
role?: 'group' | 'region' | 'none';
|
|
34
|
+
} & RefAttributes<HTMLDivElement>;
|
|
35
|
+
declare const DisclosurePanel: ({ ref, children, ...props }: DisclosurePanelProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
type AccordionProps = HTMLProps<HTMLDivElement> & {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
type AccordionItemProps = DisclosureProps & {
|
|
22
41
|
children?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
className?: string;
|
|
25
|
-
/** Additional style properties for the element. */
|
|
26
|
-
style?: React.CSSProperties;
|
|
27
|
-
/** Whether the accordion is open (controlled) */
|
|
42
|
+
/** @deprecated use isExpanded instead */
|
|
28
43
|
isOpen?: boolean;
|
|
29
|
-
/**
|
|
44
|
+
/** @deprecated use defaultExpanded instead */
|
|
30
45
|
defaultOpen?: boolean;
|
|
31
|
-
/**
|
|
46
|
+
/** @deprecated use onExpandedChange instead */
|
|
32
47
|
onOpenChange?: (isOpen: boolean) => void;
|
|
33
|
-
ref?: Ref<HTMLDivElement>;
|
|
34
48
|
};
|
|
35
49
|
declare function Accordion(props: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
36
50
|
declare function AccordionItem(props: AccordionItemProps): react_jsx_runtime.JSX.Element;
|
|
@@ -144,7 +158,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): react_jsx_runtime.JSX.Ele
|
|
|
144
158
|
*/
|
|
145
159
|
declare const buttonVariants: (props?: ({
|
|
146
160
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
147
|
-
color?: "
|
|
161
|
+
color?: "blue" | "mint" | "white" | undefined;
|
|
148
162
|
isIconOnly?: boolean | undefined;
|
|
149
163
|
isPending?: boolean | undefined;
|
|
150
164
|
} & ({
|
|
@@ -171,7 +185,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
171
185
|
};
|
|
172
186
|
declare const cardVariants: (props?: ({
|
|
173
187
|
variant?: "subtle" | "outlined" | undefined;
|
|
174
|
-
layout?: "
|
|
188
|
+
layout?: "vertical" | "horizontal" | undefined;
|
|
175
189
|
} & ({
|
|
176
190
|
class?: cva.ClassValue;
|
|
177
191
|
className?: never;
|
|
@@ -193,11 +207,9 @@ type CardLinkProps = (Omit<LinkProps, 'href'> & Required<Pick<LinkProps, 'href'>
|
|
|
193
207
|
*/
|
|
194
208
|
declare const CardLink: ({ className: _className, href, ...restProps }: CardLinkProps) => react_jsx_runtime.JSX.Element;
|
|
195
209
|
|
|
196
|
-
type CarouselProps = {
|
|
210
|
+
type CarouselProps = Omit<HTMLProps<HTMLDivElement>, 'onChange'> & {
|
|
197
211
|
/** The <CarouselItem/> components to be displayed within the carousel. */
|
|
198
212
|
children: React.ReactNode;
|
|
199
|
-
/** Additional CSS className for the element. */
|
|
200
|
-
className?: string;
|
|
201
213
|
/**
|
|
202
214
|
* Callback that is triggered when a user navigates to new item in the Carousel.
|
|
203
215
|
* The argument to the callback is an object containing `index` of the new item scrolled into view and the `id` of that item (if set on the `<CarouselItem>`)
|
|
@@ -207,20 +219,15 @@ type CarouselProps = {
|
|
|
207
219
|
*/
|
|
208
220
|
onChange?: (item: CarouselItem) => void;
|
|
209
221
|
};
|
|
210
|
-
declare const Carousel: ({ className, children, onChange }: CarouselProps) => react_jsx_runtime.JSX.Element;
|
|
211
|
-
type CarouselItemsProps = {
|
|
222
|
+
declare const Carousel: ({ className, children, onChange, ...rest }: CarouselProps) => react_jsx_runtime.JSX.Element;
|
|
223
|
+
type CarouselItemsProps = HTMLProps<HTMLDivElement> & {
|
|
212
224
|
/** The <CarouselItem/> components to be displayed within the carousel. */
|
|
213
225
|
children: React.ReactNode;
|
|
214
|
-
/** Additional CSS className for the element. */
|
|
215
|
-
className?: string;
|
|
216
226
|
};
|
|
217
227
|
declare const CarouselItems: ({ className, children }: CarouselItemsProps) => react_jsx_runtime.JSX.Element;
|
|
218
|
-
type CarouselItemProps = {
|
|
228
|
+
type CarouselItemProps = HTMLProps<HTMLDivElement> & {
|
|
219
229
|
/** The component/components to display as the <CarouselItem/>. */
|
|
220
230
|
children: JSX.Element | JSX.Element[];
|
|
221
|
-
/** Additional CSS className for the element. */
|
|
222
|
-
className?: string;
|
|
223
|
-
id?: string;
|
|
224
231
|
};
|
|
225
232
|
type CarouselItem = Pick<CarouselItemProps, 'id'> & {
|
|
226
233
|
/** The index of the item that is currently in view */
|
|
@@ -311,7 +318,7 @@ type HeadingProps = Omit<HTMLProps<HTMLHeadingElement>, 'size'> & VariantProps<t
|
|
|
311
318
|
};
|
|
312
319
|
declare const HeadingContext: react.Context<ContextValue<Partial<HeadingProps>, HTMLHeadingElement>>;
|
|
313
320
|
declare const headingVariants: (props?: ({
|
|
314
|
-
size?: "
|
|
321
|
+
size?: "s" | "xl" | "l" | "m" | "xs" | undefined;
|
|
315
322
|
} & ({
|
|
316
323
|
class?: cva.ClassValue;
|
|
317
324
|
className?: never;
|
|
@@ -319,7 +326,7 @@ declare const headingVariants: (props?: ({
|
|
|
319
326
|
class?: never;
|
|
320
327
|
className?: cva.ClassValue;
|
|
321
328
|
})) | undefined) => string;
|
|
322
|
-
declare const Heading: ({ ref, ...props }: HeadingProps) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> |
|
|
329
|
+
declare const Heading: ({ ref, ...props }: HeadingProps) => string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null | undefined;
|
|
323
330
|
declare const ContentContext: react.Context<ContextValue<Partial<ContentProps>, HTMLDivElement>>;
|
|
324
331
|
type ContentProps = HTMLProps<HTMLDivElement> & {
|
|
325
332
|
children: React.ReactNode;
|
|
@@ -328,7 +335,7 @@ type ContentProps = HTMLProps<HTMLDivElement> & {
|
|
|
328
335
|
/** Ref for the element. */
|
|
329
336
|
ref?: Ref<HTMLDivElement>;
|
|
330
337
|
};
|
|
331
|
-
declare const Content: ({ ref, ...props }: ContentProps) => string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> |
|
|
338
|
+
declare const Content: ({ ref, ...props }: ContentProps) => string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | null | undefined;
|
|
332
339
|
type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant> & {
|
|
333
340
|
children: React.ReactNode;
|
|
334
341
|
/** Ref for the element. */
|
|
@@ -367,31 +374,6 @@ type DateFormatterProps = {
|
|
|
367
374
|
*/
|
|
368
375
|
declare const DateFormatter: ({ options: _options, value, children: render, }: DateFormatterProps) => ReactNode;
|
|
369
376
|
|
|
370
|
-
declare const disclosureButtonVariants: (props?: ({
|
|
371
|
-
withChevron?: boolean | undefined;
|
|
372
|
-
isIconOnly?: boolean | undefined;
|
|
373
|
-
} & ({
|
|
374
|
-
class?: cva.ClassValue;
|
|
375
|
-
className?: never;
|
|
376
|
-
} | {
|
|
377
|
-
class?: never;
|
|
378
|
-
className?: cva.ClassValue;
|
|
379
|
-
})) | undefined) => string;
|
|
380
|
-
type DisclosureButtonProps = Omit<ButtonProps$1, 'children' | 'aria-expanded' | 'aria-controls'> & VariantProps<typeof disclosureButtonVariants> & {
|
|
381
|
-
children: React.ReactNode;
|
|
382
|
-
} & RefAttributes<HTMLButtonElement>;
|
|
383
|
-
declare const DisclosureButton: ({ className, withChevron, isIconOnly, children, ref: _ref, ...restProps }: DisclosureButtonProps) => react_jsx_runtime.JSX.Element;
|
|
384
|
-
type DisclosureProps = DisclosureProps$1 & RefAttributes<HTMLDivElement> & {
|
|
385
|
-
className?: string;
|
|
386
|
-
};
|
|
387
|
-
declare const DisclosureStateContext: react.Context<DisclosureState | null>;
|
|
388
|
-
declare const Disclosure: ({ ref: _ref, children, ..._props }: DisclosureProps) => react_jsx_runtime.JSX.Element;
|
|
389
|
-
type DisclosurePanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'role'> & {
|
|
390
|
-
children: React.ReactNode;
|
|
391
|
-
role?: 'group' | 'region' | 'none';
|
|
392
|
-
} & RefAttributes<HTMLDivElement>;
|
|
393
|
-
declare const DisclosurePanel: ({ ref, children, ...props }: DisclosurePanelProps) => react_jsx_runtime.JSX.Element;
|
|
394
|
-
|
|
395
377
|
type FileTriggerProps = Partial<FormValidationProps<File>> & FileTriggerProps$1 & Omit<HTMLAttributes<HTMLInputElement>, 'onSelect' | 'onChange' | 'required' | 'className'> & {
|
|
396
378
|
ref?: RefObject<HTMLInputElement | null>;
|
|
397
379
|
isInvalid?: boolean;
|
|
@@ -442,7 +424,7 @@ declare const variants: (props?: ({
|
|
|
442
424
|
class?: never;
|
|
443
425
|
className?: cva.ClassValue;
|
|
444
426
|
})) | undefined) => string;
|
|
445
|
-
declare const Hero: ({ variant, className, children }: HeroProps) => react_jsx_runtime.JSX.Element;
|
|
427
|
+
declare const Hero: ({ variant, className, children, ...rest }: HeroProps) => react_jsx_runtime.JSX.Element;
|
|
446
428
|
|
|
447
429
|
type DescriptionProps = TextProps;
|
|
448
430
|
declare function Description(props: DescriptionProps): react_jsx_runtime.JSX.Element;
|
|
@@ -758,4 +740,5 @@ type VideoLoopProps = {
|
|
|
758
740
|
};
|
|
759
741
|
declare const VideoLoop: ({ src, format, alt, className }: VideoLoopProps) => react_jsx_runtime.JSX.Element;
|
|
760
742
|
|
|
761
|
-
export { Accordion, AccordionItem,
|
|
743
|
+
export { Accordion, AccordionItem, Alertbox, Avatar, Backlink, Badge, Breadcrumb, Breadcrumbs, Button, ButtonContext, Caption, Card, CardLink, Checkbox, CheckboxGroup, Combobox, ListBoxHeader as ComboboxHeader, ListBoxItem as ComboboxItem, ListBoxSection as ComboboxSection, Content, ContentContext, DateFormatter, Description, DisclosureStateContext, ErrorMessage, Footer, GrunnmurenProvider, Heading, HeadingContext, Label, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, Tag, TagGroup, TagList, TextArea, TextField, Carousel as UNSAFE_Carousel, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, Disclosure as UNSAFE_Disclosure, DisclosureButton as UNSAFE_DisclosureButton, DisclosurePanel as UNSAFE_DisclosurePanel, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, CustomLink as UNSAFE_Link, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, Modal as UNSAFE_Modal, Tab as UNSAFE_Tab, TabList as UNSAFE_TabList, TabPanel as UNSAFE_TabPanel, Table as UNSAFE_Table, TableBody as UNSAFE_TableBody, TableCell as UNSAFE_TableCell, TableColumn as UNSAFE_TableColumn, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _useLocale as useLocale };
|
|
744
|
+
export type { AccordionItemProps, AccordionProps, Props as AlertboxProps, AvatarProps, BacklinkProps, BadgeProps, BreadcrumbProps, BreadcrumbsProps, ButtonProps, CaptionProps, CardLinkProps, CardProps, CheckboxGroupProps, CheckboxProps, ComboboxProps, ContentProps, DateFormatterProps, DescriptionProps, ErrorMessageProps, FooterProps, GrunnmurenProviderProps, HeadingProps, Locale, MediaProps, NumberFieldProps, RadioGroupProps, RadioProps, SelectProps, TagGroupProps, TagListProps, TagProps, TextAreaProps, TextFieldProps, CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItemsProps as UNSAFE_CarouselItemsProps, CarouselProps as UNSAFE_CarouselProps, DialogProps as UNSAFE_DialogProps, DialogTriggerProps as UNSAFE_DialogTriggerProps, DisclosureButtonProps as UNSAFE_DisclosureButtonProps, DisclosurePanelProps as UNSAFE_DisclosurePanelProps, DisclosureProps as UNSAFE_DisclosureProps, FileUploadProps as UNSAFE_FileUploadProps, HeroProps as UNSAFE_HeroProps, LinkListItemProps as UNSAFE_LinkListItemProps, LinkListProps as UNSAFE_LinkListProps, CustomLinkProps as UNSAFE_LinkProps, ModalProps as UNSAFE_ModalProps, TabListProps as UNSAFE_TabListProps, TabPanelProps as UNSAFE_TabPanelProps, TabProps as UNSAFE_TabProps, TableBodyProps as UNSAFE_TableBodyProps, TableCellProps as UNSAFE_TableCellProps, TableColumnProps as UNSAFE_TableColumnProps, TableHeaderProps as UNSAFE_TableHeaderProps, TableProps as UNSAFE_TableProps, TableRowProps as UNSAFE_TableRowProps, TabsProps as UNSAFE_TabsProps };
|