@obosbbl/grunnmuren-react 3.4.7 → 3.6.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 +12 -10
- package/dist/index.mjs +106 -80
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -179,10 +179,8 @@ declare const linkVariants: (props?: (((VariantProps<(props?: ({
|
|
|
179
179
|
})) | undefined) => string;
|
|
180
180
|
type LinkProps = VariantProps<typeof linkVariants> & LinkProps$1 & React.RefAttributes<HTMLAnchorElement> & {
|
|
181
181
|
children?: React.ReactNode;
|
|
182
|
-
/** @private Internal use */
|
|
183
|
-
'~iconRight'?: React.ReactNode;
|
|
184
182
|
};
|
|
185
|
-
declare const Link: ({ animateIcon, children, className,
|
|
183
|
+
declare const Link: ({ animateIcon, children, className, ...props }: LinkProps) => react_jsx_runtime.JSX.Element;
|
|
186
184
|
|
|
187
185
|
type BreadcrumbProps = {
|
|
188
186
|
/** Additional CSS className for the element. */
|
|
@@ -220,7 +218,7 @@ declare const buttonVariants: (props?: (((VariantProps<(props?: ({
|
|
|
220
218
|
className?: cva.ClassValue;
|
|
221
219
|
})) | undefined) => string> & VariantProps<(props?: ({
|
|
222
220
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
223
|
-
color?: "
|
|
221
|
+
color?: "blue" | "mint" | "white" | undefined;
|
|
224
222
|
isIconOnly?: boolean | undefined;
|
|
225
223
|
isPending?: boolean | undefined;
|
|
226
224
|
} & ({
|
|
@@ -245,7 +243,7 @@ type ButtonOrLinkProps = VariantProps<typeof buttonVariants> & {
|
|
|
245
243
|
ref?: Ref<HTMLButtonElement | HTMLAnchorElement>;
|
|
246
244
|
};
|
|
247
245
|
type ButtonProps = (ButtonProps$1 | LinkProps$1) & ButtonOrLinkProps;
|
|
248
|
-
declare const ButtonContext: react.Context<ContextValue<ButtonProps,
|
|
246
|
+
declare const ButtonContext: react.Context<ContextValue<ButtonProps, HTMLButtonElement | HTMLAnchorElement>>;
|
|
249
247
|
declare function Button({ ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
250
248
|
|
|
251
249
|
type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivElement> & {
|
|
@@ -465,7 +463,7 @@ type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant>
|
|
|
465
463
|
ref?: Ref<HTMLDivElement>;
|
|
466
464
|
};
|
|
467
465
|
declare const mediaVariant: (props?: ({
|
|
468
|
-
fit?: "
|
|
466
|
+
fit?: "cover" | "contain" | undefined;
|
|
469
467
|
} & ({
|
|
470
468
|
class?: cva.ClassValue;
|
|
471
469
|
className?: never;
|
|
@@ -562,8 +560,12 @@ declare function ErrorMessage(props: ErrorMessageProps): react_jsx_runtime.JSX.E
|
|
|
562
560
|
|
|
563
561
|
declare function Label(props: LabelProps): react_jsx_runtime.JSX.Element;
|
|
564
562
|
|
|
563
|
+
type LinkListContextValue = {
|
|
564
|
+
shouldRenderAutoIcons: boolean;
|
|
565
|
+
};
|
|
566
|
+
declare const LinkListContext: react.Context<LinkListContextValue | null>;
|
|
565
567
|
declare const linkListContainerVariants: (props?: ({
|
|
566
|
-
layout?: "
|
|
568
|
+
layout?: "stack" | "grid" | undefined;
|
|
567
569
|
} & ({
|
|
568
570
|
class?: cva.ClassValue;
|
|
569
571
|
className?: never;
|
|
@@ -578,7 +580,7 @@ declare const LinkListContainer: ({ className, layout, ...props }: LinkListConta
|
|
|
578
580
|
type LinkListProps = React.HTMLProps<HTMLUListElement> & {
|
|
579
581
|
children: JSX.Element | JSX.Element[];
|
|
580
582
|
};
|
|
581
|
-
declare const LinkList: ({ className, ...restProps }: LinkListProps) => react_jsx_runtime.JSX.Element;
|
|
583
|
+
declare const LinkList: ({ className, children, ...restProps }: LinkListProps) => react_jsx_runtime.JSX.Element;
|
|
582
584
|
type LinkListItemProps = React.HTMLProps<HTMLLIElement> & {
|
|
583
585
|
children: ReactNode;
|
|
584
586
|
};
|
|
@@ -920,5 +922,5 @@ type VideoLoopProps = {
|
|
|
920
922
|
};
|
|
921
923
|
declare const VideoLoop: ({ src, format, alt, className }: VideoLoopProps) => react_jsx_runtime.JSX.Element;
|
|
922
924
|
|
|
923
|
-
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, Disclosure, DisclosureButton, DisclosurePanel, DisclosureStateContext, ErrorMessage, Footer, GrunnmurenProvider, Heading, HeadingContext, Label, LinkList, LinkListContainer, LinkListItem, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, Tag, TagGroup, TagList, TextArea, TextField, Carousel as UNSAFE_Carousel, CarouselButton as UNSAFE_CarouselButton, CarouselContext as UNSAFE_CarouselContext, CarouselControls as UNSAFE_CarouselControls, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, CarouselItemsContainer as UNSAFE_CarouselItemsContainer, CarouselItemsContainer as UNSAFE_CarouselItemsContainerProps, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, HeroContext as UNSAFE_HeroContext,
|
|
924
|
-
export type { AccordionItemProps, AccordionProps, Props as AlertboxProps, AvatarProps, BacklinkProps, BadgeProps, BreadcrumbProps, BreadcrumbsProps, ButtonProps, CaptionProps, CardLinkProps, CardProps, CheckboxGroupProps, CheckboxProps, ComboboxProps, ContentProps, DateFormatterProps, DescriptionProps, DisclosureButtonProps, DisclosurePanelProps, DisclosureProps, ErrorMessageProps, FooterProps, GrunnmurenProviderProps, HeadingProps, LinkListContainerProps, LinkListItemProps, LinkListProps, Locale, MediaProps, NumberFieldProps, RadioGroupProps, RadioProps, SelectProps, TagGroupProps, TagListProps, TagProps, TextAreaProps, TextFieldProps, CarouselButtonProps as UNSAFE_CarouselButtonProps, CarouselContextValue as UNSAFE_CarouselContextValue, CarouselControlsProps as UNSAFE_CarouselControlsProps, CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItemsProps as UNSAFE_CarouselItemsProps, CarouselProps as UNSAFE_CarouselProps, CarouselElement as UNSAFE_CarouselRef, DialogProps as UNSAFE_DialogProps, DialogTriggerProps as UNSAFE_DialogTriggerProps, FileUploadProps as UNSAFE_FileUploadProps, HeroContextValue as UNSAFE_HeroContextValue, HeroProps as UNSAFE_HeroProps,
|
|
925
|
+
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, Disclosure, DisclosureButton, DisclosurePanel, DisclosureStateContext, ErrorMessage, Footer, GrunnmurenProvider, Heading, HeadingContext, Label, Link, LinkList, LinkListContainer, LinkListContext, LinkListItem, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, Tab, TabList, TabPanel, Tabs, Tag, TagGroup, TagList, TextArea, TextField, Carousel as UNSAFE_Carousel, CarouselButton as UNSAFE_CarouselButton, CarouselContext as UNSAFE_CarouselContext, CarouselControls as UNSAFE_CarouselControls, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, CarouselItemsContainer as UNSAFE_CarouselItemsContainer, CarouselItemsContainer as UNSAFE_CarouselItemsContainerProps, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, HeroContext as UNSAFE_HeroContext, Modal as UNSAFE_Modal, ResizableTableContainer as UNSAFE_ResizableTableContainer, Step as UNSAFE_Step, Stepper as UNSAFE_Stepper, Table as UNSAFE_Table, TableBody as UNSAFE_TableBody, TableCell as UNSAFE_TableCell, TableColumn as UNSAFE_TableColumn, TableColumnResizer as UNSAFE_TableColumnResizer, UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, VideoLoop, _useLocale as useLocale };
|
|
926
|
+
export type { AccordionItemProps, AccordionProps, Props as AlertboxProps, AvatarProps, BacklinkProps, BadgeProps, BreadcrumbProps, BreadcrumbsProps, ButtonProps, CaptionProps, CardLinkProps, CardProps, CheckboxGroupProps, CheckboxProps, ComboboxProps, ContentProps, DateFormatterProps, DescriptionProps, DisclosureButtonProps, DisclosurePanelProps, DisclosureProps, ErrorMessageProps, FooterProps, GrunnmurenProviderProps, HeadingProps, LinkListContainerProps, LinkListContextValue, LinkListItemProps, LinkListProps, LinkProps, Locale, MediaProps, NumberFieldProps, RadioGroupProps, RadioProps, SelectProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagListProps, TagProps, TextAreaProps, TextFieldProps, CarouselButtonProps as UNSAFE_CarouselButtonProps, CarouselContextValue as UNSAFE_CarouselContextValue, CarouselControlsProps as UNSAFE_CarouselControlsProps, CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItemsProps as UNSAFE_CarouselItemsProps, CarouselProps as UNSAFE_CarouselProps, CarouselElement as UNSAFE_CarouselRef, DialogProps as UNSAFE_DialogProps, DialogTriggerProps as UNSAFE_DialogTriggerProps, FileUploadProps as UNSAFE_FileUploadProps, HeroContextValue as UNSAFE_HeroContextValue, HeroProps as UNSAFE_HeroProps, ModalProps as UNSAFE_ModalProps, ResizableTableContainerProps as UNSAFE_ResizableTableContainerProps, StepProps as UNSAFE_StepProps, StepperProps as UNSAFE_StepperProps, TableBodyProps as UNSAFE_TableBodyProps, TableCellProps as UNSAFE_TableCellProps, TableColumnProps as UNSAFE_TableColumnProps, TableColumnResizerProps as UNSAFE_TableColumnResizerProps, UNSAFE_TableContainerProps, TableHeaderProps as UNSAFE_TableHeaderProps, TableProps as UNSAFE_TableProps, TableRowProps as UNSAFE_TableRowProps };
|
package/dist/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { RouterProvider } from 'react-aria-components';
|
|
|
3
3
|
export { Form, Group } from 'react-aria-components';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { cva, cx, compose } from 'cva';
|
|
6
|
-
import { createContext, useContext, useId, useRef, Children, useState, useEffect, useMemo, useCallback, useImperativeHandle, isValidElement,
|
|
6
|
+
import { createContext, useContext, useId, useRef, Children, useState, useEffect, useMemo, useCallback, useImperativeHandle, isValidElement, use, cloneElement } from 'react';
|
|
7
7
|
import { useContextProps, Provider, DEFAULT_SLOT, useSlottedContext } from 'react-aria-components/slots';
|
|
8
|
-
import { ChevronDown, Error, Warning, CheckCircle, InfoCircle, Close, User, ChevronLeft,
|
|
8
|
+
import { ChevronDown, Error, Warning, CheckCircle, InfoCircle, Close, User, ChevronLeft, Download, LinkExternal, ArrowRight, ChevronRight, LoadingSpinner, Check, Trash, Edit, PlayerPause, PlayerPlay } from '@obosbbl/grunnmuren-icons-react';
|
|
9
9
|
import { ButtonContext as ButtonContext$1, Button as Button$1 } from 'react-aria-components/Button';
|
|
10
10
|
import { DisclosureContext, DisclosureGroupStateContext } from 'react-aria-components/DisclosureGroup';
|
|
11
11
|
export { DisclosureGroup } from 'react-aria-components/DisclosureGroup';
|
|
@@ -669,18 +669,116 @@ function Badge(props) {
|
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
+
const LinkListContext = /*#__PURE__*/ createContext(null);
|
|
673
|
+
const linkStyles = [
|
|
674
|
+
'*:data-[slot=link]:flex',
|
|
675
|
+
'*:data-[slot=link]:w-full',
|
|
676
|
+
'*:data-[slot=link]:justify-between',
|
|
677
|
+
'*:data-[slot=link]:gap-x-2',
|
|
678
|
+
'*:data-[slot=link]:py-3.5',
|
|
679
|
+
'*:data-[slot=link]:no-underline',
|
|
680
|
+
'*:data-[slot=link]:focus-visible:outline-focus'
|
|
681
|
+
];
|
|
682
|
+
const linkListContainerVariants = cva({
|
|
683
|
+
base: [
|
|
684
|
+
'*:data-[slot=link-list]:overflow-visible',
|
|
685
|
+
'*:data-[slot=heading]:p-1.25',
|
|
686
|
+
'*:data-[slot=heading]:*:data-[slot=link]:py-2.25',
|
|
687
|
+
'**:[svg]:text-base',
|
|
688
|
+
'has-data-[slot=heading]:*:data-[slot=link-list]:overflow-visible',
|
|
689
|
+
'*:data-[slot=heading]:has-not:*:data-[slot=link]:my-2.25'
|
|
690
|
+
],
|
|
691
|
+
variants: {
|
|
692
|
+
layout: {
|
|
693
|
+
stack: null,
|
|
694
|
+
grid: '@container'
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
defaultVariants: {
|
|
698
|
+
layout: 'stack'
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
const LinkListContainer = ({ className, layout = 'stack', ...props })=>{
|
|
702
|
+
const container = /*#__PURE__*/ jsx(Provider, {
|
|
703
|
+
values: [
|
|
704
|
+
[
|
|
705
|
+
HeadingContext,
|
|
706
|
+
{
|
|
707
|
+
size: 'm',
|
|
708
|
+
className: cx(linkStyles)
|
|
709
|
+
}
|
|
710
|
+
]
|
|
711
|
+
],
|
|
712
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
713
|
+
...props,
|
|
714
|
+
className: linkListContainerVariants({
|
|
715
|
+
className,
|
|
716
|
+
layout
|
|
717
|
+
}),
|
|
718
|
+
"data-layout": layout,
|
|
719
|
+
"data-slot": "link-list-container"
|
|
720
|
+
})
|
|
721
|
+
});
|
|
722
|
+
const hasLinkListContext = !!useContext(LinkListContext);
|
|
723
|
+
if (hasLinkListContext) {
|
|
724
|
+
return container;
|
|
725
|
+
}
|
|
726
|
+
return /*#__PURE__*/ jsx(LinkListContext.Provider, {
|
|
727
|
+
value: {
|
|
728
|
+
shouldRenderAutoIcons: true
|
|
729
|
+
},
|
|
730
|
+
children: container
|
|
731
|
+
});
|
|
732
|
+
};
|
|
733
|
+
const LinkList = ({ className, children, ...restProps })=>{
|
|
734
|
+
const ul = /*#__PURE__*/ jsx("ul", {
|
|
735
|
+
...restProps,
|
|
736
|
+
"data-slot": "link-list",
|
|
737
|
+
className: cx(/**
|
|
738
|
+
* Hides dividers at the top of the list (overflow-y)
|
|
739
|
+
* while preventing arrow icons from overflowing container when animated to the right (overflow-x)
|
|
740
|
+
*/ 'grid min-w-fit auto-rows-max gap-y-px overflow-hidden', className),
|
|
741
|
+
children: children
|
|
742
|
+
});
|
|
743
|
+
const hasLinkListContext = !!useContext(LinkListContext);
|
|
744
|
+
if (hasLinkListContext) {
|
|
745
|
+
return ul;
|
|
746
|
+
}
|
|
747
|
+
return /*#__PURE__*/ jsx(LinkListContext.Provider, {
|
|
748
|
+
value: {
|
|
749
|
+
shouldRenderAutoIcons: true
|
|
750
|
+
},
|
|
751
|
+
children: ul
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
const LinkListItem = ({ children, className, ...props })=>/*#__PURE__*/ jsx("li", {
|
|
755
|
+
...props,
|
|
756
|
+
className: cx(className, 'after:bg-gray-light relative p-1.25 after:absolute after:inset-x-0 after:-top-px after:h-px after:w-full', '*:data-[slot=link]:paragraph', ...linkStyles),
|
|
757
|
+
"data-slot": "link-list-item",
|
|
758
|
+
children: children
|
|
759
|
+
});
|
|
760
|
+
|
|
672
761
|
const linkVariants = compose(animateIconVariants, cva({
|
|
673
762
|
base: 'focus-visible:outline-focus-offset inline-flex cursor-pointer items-center gap-1 font-medium hover:no-underline focus-visible:outline-current data-disabled:cursor-default data-disabled:font-normal data-disabled:no-underline'
|
|
674
763
|
}));
|
|
675
|
-
const Link = ({ animateIcon, children, className,
|
|
764
|
+
const Link = ({ animateIcon, children, className, ...props })=>{
|
|
676
765
|
const locale = _useLocale();
|
|
677
766
|
const externalLinkText = translations$1.externalLink[locale];
|
|
767
|
+
const shouldRenderAutoIcons = useContext(LinkListContext)?.shouldRenderAutoIcons ?? false;
|
|
768
|
+
let resolvedAnimateIcon = animateIcon;
|
|
769
|
+
let autoIcon = null;
|
|
770
|
+
if (shouldRenderAutoIcons) {
|
|
771
|
+
if (resolvedAnimateIcon === undefined) {
|
|
772
|
+
resolvedAnimateIcon = props.download ? 'down' : props.rel?.includes('external') ? 'up-right' : 'right';
|
|
773
|
+
}
|
|
774
|
+
autoIcon = props.download ? /*#__PURE__*/ jsx(Download, {}) : props.rel?.includes('external') ? /*#__PURE__*/ jsx(LinkExternal, {}) : /*#__PURE__*/ jsx(ArrowRight, {});
|
|
775
|
+
}
|
|
678
776
|
return /*#__PURE__*/ jsxs(Link$1, {
|
|
679
777
|
...props,
|
|
680
778
|
"data-slot": "link",
|
|
681
779
|
className: linkVariants({
|
|
682
780
|
className,
|
|
683
|
-
animateIcon
|
|
781
|
+
animateIcon: resolvedAnimateIcon
|
|
684
782
|
}),
|
|
685
783
|
children: [
|
|
686
784
|
children,
|
|
@@ -688,7 +786,7 @@ const Link = ({ animateIcon, children, className, '~iconRight': iconRight, ...pr
|
|
|
688
786
|
className: "sr-only",
|
|
689
787
|
children: externalLinkText
|
|
690
788
|
}),
|
|
691
|
-
|
|
789
|
+
autoIcon
|
|
692
790
|
]
|
|
693
791
|
});
|
|
694
792
|
};
|
|
@@ -2291,78 +2389,6 @@ function GrunnmurenProvider({ children, locale = 'nb', navigate, useHref }) {
|
|
|
2291
2389
|
});
|
|
2292
2390
|
}
|
|
2293
2391
|
|
|
2294
|
-
const linkStyles = [
|
|
2295
|
-
'*:data-[slot=link]:flex',
|
|
2296
|
-
'*:data-[slot=link]:w-full',
|
|
2297
|
-
'*:data-[slot=link]:justify-between',
|
|
2298
|
-
'*:data-[slot=link]:gap-x-2',
|
|
2299
|
-
'*:data-[slot=link]:py-3.5',
|
|
2300
|
-
'*:data-[slot=link]:no-underline',
|
|
2301
|
-
'*:data-[slot=link]:focus-visible:outline-focus'
|
|
2302
|
-
];
|
|
2303
|
-
const linkListContainerVariants = cva({
|
|
2304
|
-
base: [
|
|
2305
|
-
'*:data-[slot=link-list]:overflow-visible',
|
|
2306
|
-
'*:data-[slot=heading]:p-1.25',
|
|
2307
|
-
'*:data-[slot=heading]:*:data-[slot=link]:py-2.25',
|
|
2308
|
-
'**:[svg]:text-base',
|
|
2309
|
-
'has-data-[slot=heading]:*:data-[slot=link-list]:overflow-visible',
|
|
2310
|
-
'*:data-[slot=heading]:has-not:*:data-[slot=link]:my-2.25'
|
|
2311
|
-
],
|
|
2312
|
-
variants: {
|
|
2313
|
-
layout: {
|
|
2314
|
-
stack: null,
|
|
2315
|
-
grid: '@container'
|
|
2316
|
-
}
|
|
2317
|
-
},
|
|
2318
|
-
defaultVariants: {
|
|
2319
|
-
layout: 'stack'
|
|
2320
|
-
}
|
|
2321
|
-
});
|
|
2322
|
-
const LinkListContainer = ({ className, layout = 'stack', ...props })=>/*#__PURE__*/ jsx(Provider, {
|
|
2323
|
-
values: [
|
|
2324
|
-
[
|
|
2325
|
-
HeadingContext,
|
|
2326
|
-
{
|
|
2327
|
-
size: 'm',
|
|
2328
|
-
className: cx(linkStyles)
|
|
2329
|
-
}
|
|
2330
|
-
]
|
|
2331
|
-
],
|
|
2332
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
2333
|
-
...props,
|
|
2334
|
-
className: linkListContainerVariants({
|
|
2335
|
-
className,
|
|
2336
|
-
layout
|
|
2337
|
-
}),
|
|
2338
|
-
"data-layout": layout,
|
|
2339
|
-
"data-slot": "link-list-container"
|
|
2340
|
-
})
|
|
2341
|
-
});
|
|
2342
|
-
const LinkList = ({ className, ...restProps })=>/*#__PURE__*/ jsx("ul", {
|
|
2343
|
-
...restProps,
|
|
2344
|
-
"data-slot": "link-list",
|
|
2345
|
-
className: cx(/**
|
|
2346
|
-
* Hides dividers at the top of the list (overflow-y)
|
|
2347
|
-
* while preventing arrow icons from overflowing container when animated to the right (overflow-x)
|
|
2348
|
-
*/ 'grid min-w-fit auto-rows-max gap-y-px overflow-hidden', className)
|
|
2349
|
-
});
|
|
2350
|
-
const LinkListItem = ({ children, className, ...props })=>{
|
|
2351
|
-
const child = Children.only(children);
|
|
2352
|
-
const childProps = /*#__PURE__*/ isValidElement(child) ? child.props : {};
|
|
2353
|
-
const animateIcon = childProps.animateIcon || childProps.download ? 'down' : childProps.rel?.includes('external') ? 'up-right' : 'right';
|
|
2354
|
-
const iconRight = childProps['~iconRight'] || childProps.download ? /*#__PURE__*/ jsx(Download, {}) : childProps.rel?.includes('external') ? /*#__PURE__*/ jsx(LinkExternal, {}) : /*#__PURE__*/ jsx(ArrowRight, {});
|
|
2355
|
-
return /*#__PURE__*/ jsx("li", {
|
|
2356
|
-
...props,
|
|
2357
|
-
className: cx(className, 'after:bg-gray-light relative p-1.25 after:absolute after:inset-x-0 after:-top-px after:h-px after:w-full', '*:data-[slot=link]:paragraph', ...linkStyles),
|
|
2358
|
-
"data-slot": "link-list-item",
|
|
2359
|
-
children: /*#__PURE__*/ isValidElement(child) && /*#__PURE__*/ cloneElement(child, {
|
|
2360
|
-
animateIcon,
|
|
2361
|
-
'~iconRight': iconRight
|
|
2362
|
-
})
|
|
2363
|
-
});
|
|
2364
|
-
};
|
|
2365
|
-
|
|
2366
2392
|
// This component is based on a copy of ../textfield/TextField, refactoring is TBD: https://github.com/code-obos/grunnmuren/pull/722#issuecomment-1931478786
|
|
2367
2393
|
const inputVariants$1 = compose(input, cva({
|
|
2368
2394
|
base: '',
|
|
@@ -3069,8 +3095,8 @@ const tabsVariants = cva({
|
|
|
3069
3095
|
return /*#__PURE__*/ jsx(Tab$1, {
|
|
3070
3096
|
...restProps,
|
|
3071
3097
|
className: cx(className, 'data-focus-visible:outline-focus data-focus-visible:-outline-offset-10', 'description h-11 cursor-pointer border-transparent px-4 py-[0.71875rem] font-light', // Transition
|
|
3072
|
-
'transition-colors duration-150 ease-out', //
|
|
3073
|
-
'data-disabled:
|
|
3098
|
+
'transition-colors duration-150 ease-out', // Hide disabled tabs entirely — the design system avoids disabled states (see https://grunnmuren.obos.no/disabled-state)
|
|
3099
|
+
'data-disabled:hidden', // Selection
|
|
3074
3100
|
'data-selected:text-blue-dark data-selected:font-medium', // Hover with layout shift prevention using pseudo-element
|
|
3075
3101
|
'after:invisible after:block after:h-0 after:overflow-hidden after:font-medium after:content-[attr(data-text)]', 'data-hovered:font-medium', // Pressed
|
|
3076
3102
|
'data-pressed:text-blue-dark data-pressed:font-medium'),
|
|
@@ -3332,4 +3358,4 @@ const VideoLoop = ({ src, format, alt, className })=>{
|
|
|
3332
3358
|
});
|
|
3333
3359
|
};
|
|
3334
3360
|
|
|
3335
|
-
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, Disclosure, DisclosureButton, DisclosurePanel, DisclosureStateContext, ErrorMessage, Footer, GrunnmurenProvider, Heading, HeadingContext, Label, LinkList, LinkListContainer, LinkListItem, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, Tag, TagGroup, TagList, TextArea, TextField, Carousel as UNSAFE_Carousel, CarouselButton as UNSAFE_CarouselButton, CarouselContext as UNSAFE_CarouselContext, CarouselControls as UNSAFE_CarouselControls, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, CarouselItemsContainer as UNSAFE_CarouselItemsContainer, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, HeroContext as UNSAFE_HeroContext,
|
|
3361
|
+
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, Disclosure, DisclosureButton, DisclosurePanel, DisclosureStateContext, ErrorMessage, Footer, GrunnmurenProvider, Heading, HeadingContext, Label, Link, LinkList, LinkListContainer, LinkListContext, LinkListItem, Media, MediaContext, NumberField, Radio, RadioGroup, Select, ListBoxHeader as SelectHeader, ListBoxItem as SelectItem, ListBoxSection as SelectSection, Tab, TabList, TabPanel, Tabs, Tag, TagGroup, TagList, TextArea, TextField, Carousel as UNSAFE_Carousel, CarouselButton as UNSAFE_CarouselButton, CarouselContext as UNSAFE_CarouselContext, CarouselControls as UNSAFE_CarouselControls, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, CarouselItemsContainer as UNSAFE_CarouselItemsContainer, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, HeroContext as UNSAFE_HeroContext, Modal as UNSAFE_Modal, ResizableTableContainer as UNSAFE_ResizableTableContainer, Step as UNSAFE_Step, Stepper as UNSAFE_Stepper, Table as UNSAFE_Table, TableBody as UNSAFE_TableBody, TableCell as UNSAFE_TableCell, TableColumn as UNSAFE_TableColumn, TableColumnResizer as UNSAFE_TableColumnResizer, UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, VideoLoop, _useLocale as useLocale };
|