@obosbbl/grunnmuren-react 3.0.9 → 3.0.10
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 +13 -5
- package/dist/index.mjs +16 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { RouterProvider, ButtonProps as ButtonProps$1, LinkProps, ContextValue,
|
|
|
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, HTMLProps, ReactNode, RefAttributes,
|
|
5
|
+
import { Ref, HTMLProps, HTMLAttributes, ReactNode, RefAttributes, RefObject, Dispatch, SetStateAction, ComponentProps, JSX } from 'react';
|
|
6
6
|
import * as cva from 'cva';
|
|
7
7
|
import { VariantProps } from 'cva';
|
|
8
8
|
import { DateFormatterOptions } from 'react-aria';
|
|
@@ -444,9 +444,8 @@ type ButtonOrLinkProps = {
|
|
|
444
444
|
type BacklinkProps = (ButtonProps$1 | LinkProps) & ButtonOrLinkProps;
|
|
445
445
|
declare function Backlink(props: BacklinkProps): react_jsx_runtime.JSX.Element;
|
|
446
446
|
|
|
447
|
-
type CardProps = VariantProps<typeof cardVariants> & {
|
|
447
|
+
type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivElement> & {
|
|
448
448
|
children?: React.ReactNode;
|
|
449
|
-
className?: string;
|
|
450
449
|
};
|
|
451
450
|
declare const cardVariants: (props?: ({
|
|
452
451
|
variant?: "subtle" | "outlined" | undefined;
|
|
@@ -702,7 +701,16 @@ declare function Tab(props: TabProps): react_jsx_runtime.JSX.Element;
|
|
|
702
701
|
*/
|
|
703
702
|
declare function TabPanel(props: TabPanelProps): react_jsx_runtime.JSX.Element;
|
|
704
703
|
|
|
705
|
-
type
|
|
704
|
+
type CustomLinkProps = LinkProps & {
|
|
705
|
+
children: ReactNode;
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* A basic link component that extends react-aria-components Link with consistent styling.
|
|
709
|
+
* Provides accessible focus styles and maintains design system consistency.
|
|
710
|
+
*/
|
|
711
|
+
declare const CustomLink: ({ children, className, ...restProps }: CustomLinkProps) => react_jsx_runtime.JSX.Element;
|
|
712
|
+
|
|
713
|
+
type LinkListProps = React.HTMLProps<HTMLDivElement> & {
|
|
706
714
|
children: JSX.Element | JSX.Element[];
|
|
707
715
|
};
|
|
708
716
|
declare const LinkList: ({ className, children, ...restProps }: LinkListProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -712,4 +720,4 @@ type LinkListItemProps = LinkProps & {
|
|
|
712
720
|
};
|
|
713
721
|
declare const LinkListItem: ({ children, isExternal, className, ...restProps }: LinkListItemProps) => react_jsx_runtime.JSX.Element;
|
|
714
722
|
|
|
715
|
-
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, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, type LinkListItemProps as UNSAFE_LinkListItemProps, type LinkListProps as UNSAFE_LinkListProps, 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, 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 };
|
|
723
|
+
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, CustomLink as Link, type CustomLinkProps as LinkProps, 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, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, type LinkListItemProps as UNSAFE_LinkListItemProps, type LinkListProps as UNSAFE_LinkListProps, 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, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1765,7 +1765,7 @@ const FileUpload = ({ children, files: _files, onChange, validate, isInvalid: _i
|
|
|
1765
1765
|
],
|
|
1766
1766
|
children: /*#__PURE__*/ jsxs("div", {
|
|
1767
1767
|
"data-slot": "file-upload",
|
|
1768
|
-
className: "group grid
|
|
1768
|
+
className: "group grid gap-2",
|
|
1769
1769
|
"data-required": isRequired,
|
|
1770
1770
|
children: [
|
|
1771
1771
|
/*#__PURE__*/ jsx(Provider, {
|
|
@@ -1811,7 +1811,7 @@ const FileUpload = ({ children, files: _files, onChange, validate, isInvalid: _i
|
|
|
1811
1811
|
})
|
|
1812
1812
|
}),
|
|
1813
1813
|
controlledOrUncontrolledFiles.length > 0 && /*#__PURE__*/ jsx("ul", {
|
|
1814
|
-
className: "mt-4 grid gap-y-2",
|
|
1814
|
+
className: "mt-4 grid max-w-fit gap-y-2",
|
|
1815
1815
|
children: controlledOrUncontrolledFiles.map((file, fileIndex)=>{
|
|
1816
1816
|
let fileName = file.name;
|
|
1817
1817
|
if (fileTriggerProps.acceptDirectory && file.webkitRelativePath !== '') {
|
|
@@ -1825,9 +1825,8 @@ const FileUpload = ({ children, files: _files, onChange, validate, isInvalid: _i
|
|
|
1825
1825
|
className: cx('flex items-center justify-between gap-2 rounded-lg border-2 px-4 py-2', hasError ? 'border-red bg-red-light' : 'border-gray bg-gray-lightest'),
|
|
1826
1826
|
children: [
|
|
1827
1827
|
fileName,
|
|
1828
|
-
' ',
|
|
1829
1828
|
/*#__PURE__*/ jsx("button", {
|
|
1830
|
-
className: cx('-m-2 grid h-11 w-11 shrink-0 cursor-pointer place-items-center rounded-xl', // Focus styles
|
|
1829
|
+
className: cx('self-start', '-m-2 grid h-11 w-11 shrink-0 cursor-pointer place-items-center rounded-xl', // Focus styles
|
|
1831
1830
|
'focus-visible:-outline-offset-8 focus-visible:outline-focus'),
|
|
1832
1831
|
onClick: ()=>{
|
|
1833
1832
|
// For controlled component
|
|
@@ -2506,12 +2505,23 @@ const tabsVariants = cva({
|
|
|
2506
2505
|
});
|
|
2507
2506
|
}
|
|
2508
2507
|
|
|
2508
|
+
/**
|
|
2509
|
+
* A basic link component that extends react-aria-components Link with consistent styling.
|
|
2510
|
+
* Provides accessible focus styles and maintains design system consistency.
|
|
2511
|
+
*/ const CustomLink = ({ children, className, ...restProps })=>{
|
|
2512
|
+
return /*#__PURE__*/ jsx(Link, {
|
|
2513
|
+
...restProps,
|
|
2514
|
+
className: cx(className, 'cursor-pointer font-medium focus-visible:outline-focus-offset'),
|
|
2515
|
+
children: children
|
|
2516
|
+
});
|
|
2517
|
+
};
|
|
2518
|
+
|
|
2509
2519
|
const LinkList = ({ className, children, ...restProps })=>{
|
|
2510
2520
|
const numberofLinks = Children.count(children);
|
|
2511
2521
|
return /*#__PURE__*/ jsx("div", {
|
|
2512
2522
|
className: cx(className, '@container'),
|
|
2523
|
+
...restProps,
|
|
2513
2524
|
children: /*#__PURE__*/ jsx("ul", {
|
|
2514
|
-
...restProps,
|
|
2515
2525
|
className: cx('min-w-fit', // Hide dividers at the top of the list (overflow-y) and prevents arrow icon from overflowing container when animated to the right (overflow-x)
|
|
2516
2526
|
'overflow-hidden', // Add a small gap between items that fits the divider lines (this way the divider line don't take up any space in each item)
|
|
2517
2527
|
'grid auto-rows-max gap-y-0.25', // Gaps for when the list is displayed in multiple columns
|
|
@@ -2551,4 +2561,4 @@ const LinkListItem = ({ children, isExternal, className, ...restProps })=>{
|
|
|
2551
2561
|
});
|
|
2552
2562
|
};
|
|
2553
2563
|
|
|
2554
|
-
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, 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, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, Modal as UNSAFE_Modal, Tab as UNSAFE_Tab, TabList as UNSAFE_TabList, TabPanel as UNSAFE_TabPanel, Tabs as UNSAFE_Tabs, Tag as UNSAFE_Tag, TagGroup as UNSAFE_TagGroup, TagList as UNSAFE_TagList, VideoLoop, _useLocale as useLocale };
|
|
2564
|
+
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, CustomLink as Link, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, 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, LinkList as UNSAFE_LinkList, LinkListItem as UNSAFE_LinkListItem, Modal as UNSAFE_Modal, Tab as UNSAFE_Tab, TabList as UNSAFE_TabList, TabPanel as UNSAFE_TabPanel, Tabs as UNSAFE_Tabs, Tag as UNSAFE_Tag, TagGroup as UNSAFE_TagGroup, TagList as UNSAFE_TagList, VideoLoop, _useLocale as useLocale };
|