@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/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, ListBoxItemProps, ListBoxSectionProps, HeadingProps as HeadingProps$1, ComboBoxProps, DisclosureProps as DisclosureProps$1, FileTriggerProps as FileTriggerProps$1, RouterProvider, TextProps, LabelProps, DialogTriggerProps as DialogTriggerProps$1, ModalOverlayProps, DialogProps as DialogProps$1, NumberFieldProps as NumberFieldProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, TableProps as TableProps$1, TableHeaderProps as TableHeaderProps$1, ColumnProps, TableBodyProps as TableBodyProps$1, RowProps, CellProps, TabsProps as TabsProps$1, TabListProps as TabListProps$1, TabProps as TabProps$1, TabPanelProps as TabPanelProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TagProps as TagProps$1, TextFieldProps as TextFieldProps$1 } from 'react-aria-components';
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 { Ref, ComponentProps, HTMLAttributes, JSX, HTMLProps, ReactNode, RefAttributes, RefObject, Dispatch, SetStateAction } from 'react';
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
- type AccordionProps = {
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
- /** Additional CSS className for the element. */
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
- type AccordionItemProps = {
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
- /** Additional CSS className for the element. */
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
- /** Whether the accordion is open by default (uncontrolled) */
46
+ /** @deprecated use defaultExpanded instead */
30
47
  defaultOpen?: boolean;
31
- /** Handler that is called when the accordion's open state changes */
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?: "mint" | "white" | "blue" | undefined;
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?: "horizontal" | "vertical" | undefined;
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?: "xl" | "l" | "m" | "s" | "xs" | undefined;
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> | react_jsx_runtime.JSX.Element | 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> | react_jsx_runtime.JSX.Element | 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, type AccordionItemProps, type AccordionProps, Alertbox, type Props as AlertboxProps, Avatar, type AvatarProps, Backlink, type BacklinkProps, Badge, type BadgeProps, Breadcrumb, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonContext, type ButtonProps, Caption, type CaptionProps, Card, CardLink, type CardLinkProps, type CardProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Combobox, ListBoxHeader as ComboboxHeader, ListBoxItem as ComboboxItem, type ComboboxProps, ListBoxSection as ComboboxSection, Content, ContentContext, type ContentProps, DateFormatter, type DateFormatterProps, Description, type DescriptionProps, DisclosureStateContext, ErrorMessage, type ErrorMessageProps, Footer, type FooterProps, GrunnmurenProvider, type GrunnmurenProviderProps, Heading, HeadingContext, type HeadingProps, Label, type Locale, Media, MediaContext, type MediaProps, NumberField, type NumberFieldProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, type SelectProps, ListBoxSection as SelectSection, type TagGroupProps, type TagListProps, type TagProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, Carousel as UNSAFE_Carousel, CarouselItem as UNSAFE_CarouselItem, type CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItems as UNSAFE_CarouselItems, type CarouselItemsProps as UNSAFE_CarouselItemsProps, type CarouselProps as UNSAFE_CarouselProps, Dialog as UNSAFE_Dialog, type DialogProps as UNSAFE_DialogProps, DialogTrigger as UNSAFE_DialogTrigger, type DialogTriggerProps as UNSAFE_DialogTriggerProps, Disclosure as UNSAFE_Disclosure, DisclosureButton as UNSAFE_DisclosureButton, type DisclosureButtonProps as UNSAFE_DisclosureButtonProps, DisclosurePanel as UNSAFE_DisclosurePanel, type DisclosurePanelProps as UNSAFE_DisclosurePanelProps, type DisclosureProps as UNSAFE_DisclosureProps, FileUpload as UNSAFE_FileUpload, type FileUploadProps as UNSAFE_FileUploadProps, Hero as UNSAFE_Hero, type HeroProps as UNSAFE_HeroProps, CustomLink as UNSAFE_Link, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, type LinkListItemProps as UNSAFE_LinkListItemProps, type LinkListProps as UNSAFE_LinkListProps, type CustomLinkProps as UNSAFE_LinkProps, Modal as UNSAFE_Modal, type ModalProps as UNSAFE_ModalProps, Tab as UNSAFE_Tab, TabList as UNSAFE_TabList, type TabListProps as UNSAFE_TabListProps, TabPanel as UNSAFE_TabPanel, type TabPanelProps as UNSAFE_TabPanelProps, type TabProps as UNSAFE_TabProps, Table as UNSAFE_Table, TableBody as UNSAFE_TableBody, type TableBodyProps as UNSAFE_TableBodyProps, TableCell as UNSAFE_TableCell, type TableCellProps as UNSAFE_TableCellProps, TableColumn as UNSAFE_TableColumn, type TableColumnProps as UNSAFE_TableColumnProps, TableHeader as UNSAFE_TableHeader, type TableHeaderProps as UNSAFE_TableHeaderProps, type TableProps as UNSAFE_TableProps, TableRow as UNSAFE_TableRow, type TableRowProps as UNSAFE_TableRowProps, Tabs as UNSAFE_Tabs, type TabsProps as UNSAFE_TabsProps, Tag as UNSAFE_Tag, TagGroup as UNSAFE_TagGroup, TagList as UNSAFE_TagList, VideoLoop, _useLocale as useLocale };
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 };