@obosbbl/grunnmuren-react 3.0.16 → 3.1.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/__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 +46 -61
- package/dist/index.mjs +292 -248
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,36 +1,52 @@
|
|
|
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, DisclosureGroupProps, 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, ComponentProps, Ref, HTMLProps, 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 = DisclosureGroupProps & {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
/** Whether multiple accordion items can be expanded at the same time. Default is true */
|
|
40
|
+
allowsMultipleExpanded?: boolean;
|
|
41
|
+
};
|
|
42
|
+
type AccordionItemProps = DisclosureProps & {
|
|
22
43
|
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) */
|
|
44
|
+
/** @deprecated use isExpanded instead */
|
|
28
45
|
isOpen?: boolean;
|
|
29
|
-
/**
|
|
46
|
+
/** @deprecated use defaultExpanded instead */
|
|
30
47
|
defaultOpen?: boolean;
|
|
31
|
-
/**
|
|
48
|
+
/** @deprecated use onExpandedChange instead */
|
|
32
49
|
onOpenChange?: (isOpen: boolean) => void;
|
|
33
|
-
ref?: Ref<HTMLDivElement>;
|
|
34
50
|
};
|
|
35
51
|
declare function Accordion(props: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
36
52
|
declare function AccordionItem(props: AccordionItemProps): react_jsx_runtime.JSX.Element;
|
|
@@ -144,7 +160,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): react_jsx_runtime.JSX.Ele
|
|
|
144
160
|
*/
|
|
145
161
|
declare const buttonVariants: (props?: ({
|
|
146
162
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
147
|
-
color?: "
|
|
163
|
+
color?: "blue" | "mint" | "white" | undefined;
|
|
148
164
|
isIconOnly?: boolean | undefined;
|
|
149
165
|
isPending?: boolean | undefined;
|
|
150
166
|
} & ({
|
|
@@ -171,7 +187,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
171
187
|
};
|
|
172
188
|
declare const cardVariants: (props?: ({
|
|
173
189
|
variant?: "subtle" | "outlined" | undefined;
|
|
174
|
-
layout?: "
|
|
190
|
+
layout?: "vertical" | "horizontal" | undefined;
|
|
175
191
|
} & ({
|
|
176
192
|
class?: cva.ClassValue;
|
|
177
193
|
className?: never;
|
|
@@ -193,11 +209,9 @@ type CardLinkProps = (Omit<LinkProps, 'href'> & Required<Pick<LinkProps, 'href'>
|
|
|
193
209
|
*/
|
|
194
210
|
declare const CardLink: ({ className: _className, href, ...restProps }: CardLinkProps) => react_jsx_runtime.JSX.Element;
|
|
195
211
|
|
|
196
|
-
type CarouselProps = {
|
|
212
|
+
type CarouselProps = Omit<HTMLProps<HTMLDivElement>, 'onChange'> & {
|
|
197
213
|
/** The <CarouselItem/> components to be displayed within the carousel. */
|
|
198
214
|
children: React.ReactNode;
|
|
199
|
-
/** Additional CSS className for the element. */
|
|
200
|
-
className?: string;
|
|
201
215
|
/**
|
|
202
216
|
* Callback that is triggered when a user navigates to new item in the Carousel.
|
|
203
217
|
* 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 +221,15 @@ type CarouselProps = {
|
|
|
207
221
|
*/
|
|
208
222
|
onChange?: (item: CarouselItem) => void;
|
|
209
223
|
};
|
|
210
|
-
declare const Carousel: ({ className, children, onChange }: CarouselProps) => react_jsx_runtime.JSX.Element;
|
|
211
|
-
type CarouselItemsProps = {
|
|
224
|
+
declare const Carousel: ({ className, children, onChange, ...rest }: CarouselProps) => react_jsx_runtime.JSX.Element;
|
|
225
|
+
type CarouselItemsProps = HTMLProps<HTMLDivElement> & {
|
|
212
226
|
/** The <CarouselItem/> components to be displayed within the carousel. */
|
|
213
227
|
children: React.ReactNode;
|
|
214
|
-
/** Additional CSS className for the element. */
|
|
215
|
-
className?: string;
|
|
216
228
|
};
|
|
217
229
|
declare const CarouselItems: ({ className, children }: CarouselItemsProps) => react_jsx_runtime.JSX.Element;
|
|
218
|
-
type CarouselItemProps = {
|
|
230
|
+
type CarouselItemProps = HTMLProps<HTMLDivElement> & {
|
|
219
231
|
/** The component/components to display as the <CarouselItem/>. */
|
|
220
232
|
children: JSX.Element | JSX.Element[];
|
|
221
|
-
/** Additional CSS className for the element. */
|
|
222
|
-
className?: string;
|
|
223
|
-
id?: string;
|
|
224
233
|
};
|
|
225
234
|
type CarouselItem = Pick<CarouselItemProps, 'id'> & {
|
|
226
235
|
/** The index of the item that is currently in view */
|
|
@@ -311,7 +320,7 @@ type HeadingProps = Omit<HTMLProps<HTMLHeadingElement>, 'size'> & VariantProps<t
|
|
|
311
320
|
};
|
|
312
321
|
declare const HeadingContext: react.Context<ContextValue<Partial<HeadingProps>, HTMLHeadingElement>>;
|
|
313
322
|
declare const headingVariants: (props?: ({
|
|
314
|
-
size?: "
|
|
323
|
+
size?: "s" | "xl" | "l" | "m" | "xs" | undefined;
|
|
315
324
|
} & ({
|
|
316
325
|
class?: cva.ClassValue;
|
|
317
326
|
className?: never;
|
|
@@ -319,7 +328,7 @@ declare const headingVariants: (props?: ({
|
|
|
319
328
|
class?: never;
|
|
320
329
|
className?: cva.ClassValue;
|
|
321
330
|
})) | 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> |
|
|
331
|
+
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
332
|
declare const ContentContext: react.Context<ContextValue<Partial<ContentProps>, HTMLDivElement>>;
|
|
324
333
|
type ContentProps = HTMLProps<HTMLDivElement> & {
|
|
325
334
|
children: React.ReactNode;
|
|
@@ -328,7 +337,7 @@ type ContentProps = HTMLProps<HTMLDivElement> & {
|
|
|
328
337
|
/** Ref for the element. */
|
|
329
338
|
ref?: Ref<HTMLDivElement>;
|
|
330
339
|
};
|
|
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> |
|
|
340
|
+
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
341
|
type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant> & {
|
|
333
342
|
children: React.ReactNode;
|
|
334
343
|
/** Ref for the element. */
|
|
@@ -367,31 +376,6 @@ type DateFormatterProps = {
|
|
|
367
376
|
*/
|
|
368
377
|
declare const DateFormatter: ({ options: _options, value, children: render, }: DateFormatterProps) => ReactNode;
|
|
369
378
|
|
|
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
379
|
type FileTriggerProps = Partial<FormValidationProps<File>> & FileTriggerProps$1 & Omit<HTMLAttributes<HTMLInputElement>, 'onSelect' | 'onChange' | 'required' | 'className'> & {
|
|
396
380
|
ref?: RefObject<HTMLInputElement | null>;
|
|
397
381
|
isInvalid?: boolean;
|
|
@@ -442,7 +426,7 @@ declare const variants: (props?: ({
|
|
|
442
426
|
class?: never;
|
|
443
427
|
className?: cva.ClassValue;
|
|
444
428
|
})) | undefined) => string;
|
|
445
|
-
declare const Hero: ({ variant, className, children }: HeroProps) => react_jsx_runtime.JSX.Element;
|
|
429
|
+
declare const Hero: ({ variant, className, children, ...rest }: HeroProps) => react_jsx_runtime.JSX.Element;
|
|
446
430
|
|
|
447
431
|
type DescriptionProps = TextProps;
|
|
448
432
|
declare function Description(props: DescriptionProps): react_jsx_runtime.JSX.Element;
|
|
@@ -758,4 +742,5 @@ type VideoLoopProps = {
|
|
|
758
742
|
};
|
|
759
743
|
declare const VideoLoop: ({ src, format, alt, className }: VideoLoopProps) => react_jsx_runtime.JSX.Element;
|
|
760
744
|
|
|
761
|
-
export { Accordion, AccordionItem,
|
|
745
|
+
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 };
|
|
746
|
+
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 };
|