@obosbbl/grunnmuren-react 3.3.0 → 3.3.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/index.d.mts +21 -8
- package/dist/index.mjs +95 -41
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisclosureProps as DisclosureProps$1, ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, ContextValue, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, 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, ColumnResizerProps, TableProps as TableProps$1, TableBodyProps as TableBodyProps$1, CellProps, ColumnProps, ResizableTableContainerProps, 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';
|
|
1
|
+
import { DisclosureProps as DisclosureProps$1, ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, ContextValue, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, 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 as ModalOverlayProps$1, NumberFieldProps as NumberFieldProps$1, ProgressBarProps as ProgressBarProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, ColumnResizerProps, TableProps as TableProps$1, TableBodyProps as TableBodyProps$1, CellProps, ColumnProps, ResizableTableContainerProps, 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, DisclosureGroup, DisclosureGroupProps, Form, Group, LabelProps, ListBoxItemProps as SelectItemProps } from 'react-aria-components';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
@@ -165,7 +165,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): react_jsx_runtime.JSX.Ele
|
|
|
165
165
|
*/
|
|
166
166
|
declare const buttonVariants: (props?: ({
|
|
167
167
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
168
|
-
color?: "
|
|
168
|
+
color?: "mint" | "white" | "blue" | undefined;
|
|
169
169
|
isIconOnly?: boolean | undefined;
|
|
170
170
|
isPending?: boolean | undefined;
|
|
171
171
|
} & ({
|
|
@@ -192,7 +192,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
192
192
|
};
|
|
193
193
|
declare const cardVariants: (props?: ({
|
|
194
194
|
variant?: "subtle" | "outlined" | undefined;
|
|
195
|
-
layout?: "
|
|
195
|
+
layout?: "horizontal" | "vertical" | undefined;
|
|
196
196
|
} & ({
|
|
197
197
|
class?: cva.ClassValue;
|
|
198
198
|
className?: never;
|
|
@@ -349,7 +349,7 @@ type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant>
|
|
|
349
349
|
ref?: Ref<HTMLDivElement>;
|
|
350
350
|
};
|
|
351
351
|
declare const mediaVariant: (props?: ({
|
|
352
|
-
fit?: "
|
|
352
|
+
fit?: "contain" | "cover" | undefined;
|
|
353
353
|
} & ({
|
|
354
354
|
class?: cva.ClassValue;
|
|
355
355
|
className?: never;
|
|
@@ -456,8 +456,14 @@ declare const LinkListItem: (props: LinkListItemProps) => react_jsx_runtime.JSX.
|
|
|
456
456
|
|
|
457
457
|
type DialogTriggerProps = DialogTriggerProps$1;
|
|
458
458
|
declare const DialogTrigger: (props: DialogTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
459
|
-
type
|
|
460
|
-
|
|
459
|
+
type ModalOverlayProps = Omit<ModalOverlayProps$1, 'isDismissable'> & {
|
|
460
|
+
/** @default 10 Controls the z-index of the modal overlay */
|
|
461
|
+
zIndex?: number;
|
|
462
|
+
/** @default true Makes the modal dismissable */
|
|
463
|
+
isDismissable?: boolean;
|
|
464
|
+
};
|
|
465
|
+
type ModalProps = ModalOverlayProps;
|
|
466
|
+
declare const Modal: ({ isDismissable, isOpen, onOpenChange, defaultOpen, className, zIndex, ...restProps }: ModalProps) => react_jsx_runtime.JSX.Element;
|
|
461
467
|
type DialogProps = DialogProps$1 & {
|
|
462
468
|
children: React.ReactNode;
|
|
463
469
|
};
|
|
@@ -498,6 +504,13 @@ type NumberFieldProps = {
|
|
|
498
504
|
} & Omit<NumberFieldProps$1, 'className' | 'isReadOnly' | 'isDisabled' | 'children' | 'style' | 'hideStepper'>;
|
|
499
505
|
declare function NumberField(props: NumberFieldProps): react_jsx_runtime.JSX.Element;
|
|
500
506
|
|
|
507
|
+
type ProgressBarProps = ProgressBarProps$1;
|
|
508
|
+
type ProgressBarValueTextProps = Omit<HTMLProps<HTMLSpanElement>, 'children'> & {
|
|
509
|
+
className?: string;
|
|
510
|
+
};
|
|
511
|
+
declare const ProgressBarValueText: ({ className, ...restProps }: ProgressBarValueTextProps) => react_jsx_runtime.JSX.Element;
|
|
512
|
+
declare const ProgressBar: ({ children, className, ...restProps }: ProgressBarProps) => react_jsx_runtime.JSX.Element;
|
|
513
|
+
|
|
501
514
|
type RadioProps = {
|
|
502
515
|
children: React.ReactNode;
|
|
503
516
|
/** Additional CSS className for the element. */
|
|
@@ -745,5 +758,5 @@ type VideoLoopProps = {
|
|
|
745
758
|
};
|
|
746
759
|
declare const VideoLoop: ({ src, format, alt, className }: VideoLoopProps) => react_jsx_runtime.JSX.Element;
|
|
747
760
|
|
|
748
|
-
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, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, Link as UNSAFE_Link, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _LinkContext, _useLocale as useLocale };
|
|
749
|
-
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, CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItemsProps as UNSAFE_CarouselItemsProps, CarouselProps as UNSAFE_CarouselProps, DialogProps as UNSAFE_DialogProps, DialogTriggerProps as UNSAFE_DialogTriggerProps, FileUploadProps as UNSAFE_FileUploadProps, HeroProps as UNSAFE_HeroProps, LinkProps 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, TableColumnResizerProps as UNSAFE_TableColumnResizerProps, TableContainerProps as UNSAFE_TableContainerProps, TableHeaderProps as UNSAFE_TableHeaderProps, TableProps as UNSAFE_TableProps, TableRowProps as UNSAFE_TableRowProps, TabsProps as UNSAFE_TabsProps };
|
|
761
|
+
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, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, Link as UNSAFE_Link, Modal as UNSAFE_Modal, ProgressBar as UNSAFE_ProgressBar, ProgressBarValueText as UNSAFE_ProgressBarValueText, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _LinkContext, _useLocale as useLocale };
|
|
762
|
+
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, CarouselItemProps as UNSAFE_CarouselItemProps, CarouselItemsProps as UNSAFE_CarouselItemsProps, CarouselProps as UNSAFE_CarouselProps, DialogProps as UNSAFE_DialogProps, DialogTriggerProps as UNSAFE_DialogTriggerProps, FileUploadProps as UNSAFE_FileUploadProps, HeroProps as UNSAFE_HeroProps, LinkProps as UNSAFE_LinkProps, ModalProps as UNSAFE_ModalProps, ProgressBarProps as UNSAFE_ProgressBarProps, ProgressBarValueTextProps as UNSAFE_ProgressBarValueTextProps, TabListProps as UNSAFE_TabListProps, TabPanelProps as UNSAFE_TabPanelProps, TabProps as UNSAFE_TabProps, TableBodyProps as UNSAFE_TableBodyProps, TableCellProps as UNSAFE_TableCellProps, TableColumnProps as UNSAFE_TableColumnProps, TableColumnResizerProps as UNSAFE_TableColumnResizerProps, TableContainerProps as UNSAFE_TableContainerProps, TableHeaderProps as UNSAFE_TableHeaderProps, TableProps as UNSAFE_TableProps, TableRowProps as UNSAFE_TableRowProps, TabsProps as UNSAFE_TabsProps };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useContextProps, DisclosureContext, DisclosureGroupStateContext, Provider, ButtonContext as ButtonContext$1, DEFAULT_SLOT, Button as Button$1, useLocale, Link as Link$1, Breadcrumb as Breadcrumb$1, Breadcrumbs as Breadcrumbs$1, Text, CheckboxContext, Checkbox as Checkbox$1, FieldError, Label as Label$1, CheckboxGroup as CheckboxGroup$1, Header, ListBoxItem as ListBoxItem$1, ListBoxSection as ListBoxSection$1, ListBox as ListBox$1, ComboBox, Group, Input, Popover, useSlottedContext, FormContext, FieldErrorContext, LabelContext, InputContext, I18nProvider, RouterProvider, GroupContext, Dialog as Dialog$1, DialogTrigger as DialogTrigger$1, Modal as Modal$1, ModalOverlay as
|
|
2
|
+
import { useContextProps, DisclosureContext, DisclosureGroupStateContext, Provider, ButtonContext as ButtonContext$1, DEFAULT_SLOT, Button as Button$1, useLocale, Link as Link$1, Breadcrumb as Breadcrumb$1, Breadcrumbs as Breadcrumbs$1, Text, CheckboxContext, Checkbox as Checkbox$1, FieldError, Label as Label$1, CheckboxGroup as CheckboxGroup$1, Header, ListBoxItem as ListBoxItem$1, ListBoxSection as ListBoxSection$1, ListBox as ListBox$1, ComboBox, Group, Input, Popover, useSlottedContext, FormContext, FieldErrorContext, LabelContext, InputContext, I18nProvider, RouterProvider, GroupContext, Dialog as Dialog$1, DialogTrigger as DialogTrigger$1, Modal as Modal$1, ModalOverlay, NumberField as NumberField$1, ProgressBar as ProgressBar$1, Radio as Radio$1, RadioGroup as RadioGroup$1, Select as Select$1, SelectValue, ColumnResizer, Table as Table$1, TableBody as TableBody$1, Cell, Column, ResizableTableContainer, TableHeader as TableHeader$1, Row, Tab as Tab$1, TabListStateContext, TabList as TabList$1, TabPanel as TabPanel$1, Tabs as Tabs$1, TagGroup as TagGroup$1, TagList as TagList$1, Tag as Tag$1, TextField as TextField$1, TextArea as TextArea$1 } from 'react-aria-components';
|
|
3
3
|
export { DisclosureGroup, Form, Group } from 'react-aria-components';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { cva, cx, compose } from 'cva';
|
|
@@ -279,6 +279,7 @@ function AccordionItem(props) {
|
|
|
279
279
|
const _defaultExpanded = defaultOpen ?? defaultExpanded;
|
|
280
280
|
const _isExpanded = controlledIsOpen ?? isExpanded;
|
|
281
281
|
const _onExpandedChange = onOpenChange ?? onExpandedChange;
|
|
282
|
+
const buttonId = useId();
|
|
282
283
|
return /*#__PURE__*/ jsx(Disclosure, {
|
|
283
284
|
...restProps,
|
|
284
285
|
className: cx('relative px-2', className),
|
|
@@ -299,6 +300,7 @@ function AccordionItem(props) {
|
|
|
299
300
|
className: "flex min-h-11 w-full gap-1.5 rounded-lg px-2 py-3.5 text-left focus-visible:outline-focus-inset!",
|
|
300
301
|
type: "button",
|
|
301
302
|
withChevron: true,
|
|
303
|
+
id: buttonId,
|
|
302
304
|
children: children
|
|
303
305
|
})
|
|
304
306
|
}
|
|
@@ -308,8 +310,9 @@ function AccordionItem(props) {
|
|
|
308
310
|
{
|
|
309
311
|
className: // Uses pseudo elements for vertical padding, since that doesn't affect the height when the accordion is closed
|
|
310
312
|
'text-sm font-light leading-6 px-3.5 data-[expanded]:after:h-3.5 relative overflow-hidden border-sky border-l-[3px] before:relative before:block before:h-1.5 after:relative after:block after:h-1.5',
|
|
311
|
-
role: 'region',
|
|
312
313
|
_outerWrapper: (children)=>/*#__PURE__*/ jsx(DisclosurePanel, {
|
|
314
|
+
"aria-labelledby": buttonId,
|
|
315
|
+
role: "region",
|
|
313
316
|
children: children
|
|
314
317
|
})
|
|
315
318
|
}
|
|
@@ -2031,52 +2034,66 @@ const LinkListItem = (props)=>/*#__PURE__*/ jsx("li", {
|
|
|
2031
2034
|
const DialogTrigger = (props)=>/*#__PURE__*/ jsx(DialogTrigger$1, {
|
|
2032
2035
|
...props
|
|
2033
2036
|
});
|
|
2034
|
-
const
|
|
2035
|
-
...
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2037
|
+
const _ModalOverlay = ({ style = {}, zIndex = 10, ...restProps })=>/*#__PURE__*/ jsx(ModalOverlay, {
|
|
2038
|
+
...restProps,
|
|
2039
|
+
className: ({ isEntering, isExiting })=>cx('fixed inset-0 flex min-h-full items-center justify-center overflow-y-auto bg-black/25 p-4 text-center backdrop-blur-sm', isEntering && 'fade-in animate-in duration-300 ease-out', isExiting && 'fade-out animate-out duration-200 ease-in', // Using the motion-safe class does not work, so we use motion-reduce to overwrite instead
|
|
2040
|
+
'motion-reduce:animate-none'),
|
|
2041
|
+
style: {
|
|
2042
|
+
zIndex,
|
|
2043
|
+
...style
|
|
2044
|
+
}
|
|
2039
2045
|
});
|
|
2040
|
-
const Modal = ({ className, ...restProps })
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2046
|
+
const Modal = ({ isDismissable = true, isOpen, onOpenChange, defaultOpen, className, zIndex, ...restProps })=>{
|
|
2047
|
+
const locale = _useLocale();
|
|
2048
|
+
return /*#__PURE__*/ jsx(Provider, {
|
|
2049
|
+
values: [
|
|
2050
|
+
[
|
|
2051
|
+
HeadingContext,
|
|
2052
|
+
{
|
|
2053
|
+
slots: {
|
|
2054
|
+
[DEFAULT_SLOT]: {},
|
|
2055
|
+
title: {
|
|
2056
|
+
className: 'heading-s',
|
|
2057
|
+
_outerWrapper: (children)=>/*#__PURE__*/ jsxs("div", {
|
|
2058
|
+
className: "flex items-center justify-between gap-x-2",
|
|
2059
|
+
children: [
|
|
2060
|
+
children,
|
|
2061
|
+
isDismissable && /*#__PURE__*/ jsx(Button, {
|
|
2062
|
+
slot: "close",
|
|
2063
|
+
variant: "tertiary",
|
|
2064
|
+
className: "px-2.5! data-focus-visible:outline-focus-inset",
|
|
2065
|
+
"aria-label": translations$1.close[locale],
|
|
2066
|
+
onPress: ()=>onOpenChange?.(false),
|
|
2067
|
+
children: /*#__PURE__*/ jsx(Close, {})
|
|
2068
|
+
})
|
|
2069
|
+
]
|
|
2070
|
+
})
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
]
|
|
2075
|
+
],
|
|
2076
|
+
children: /*#__PURE__*/ jsx(_ModalOverlay, {
|
|
2077
|
+
isOpen: isOpen,
|
|
2078
|
+
onOpenChange: onOpenChange,
|
|
2079
|
+
defaultOpen: defaultOpen,
|
|
2080
|
+
isDismissable: isDismissable,
|
|
2081
|
+
zIndex: zIndex,
|
|
2082
|
+
children: /*#__PURE__*/ jsx(Modal$1, {
|
|
2083
|
+
...restProps,
|
|
2084
|
+
className: ({ isEntering, isExiting })=>cx(className, 'w-full max-w-md overflow-hidden rounded-2xl bg-white p-4 text-left align-middle shadow-xl', isEntering && 'zoom-in-95 animate-in duration-300 ease-out', isExiting && 'zoom-out-95 animate-out duration-200 ease-in', // Using the motion-safe class does not work, so we use motion-reduce to overwrite instead
|
|
2085
|
+
'motion-reduce:animate-none')
|
|
2086
|
+
})
|
|
2045
2087
|
})
|
|
2046
2088
|
});
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
return /*#__PURE__*/ jsx(Dialog$1, {
|
|
2089
|
+
};
|
|
2090
|
+
const Dialog = ({ className, children, ...restProps })=>/*#__PURE__*/ jsx(Dialog$1, {
|
|
2050
2091
|
...restProps,
|
|
2051
2092
|
className: cx('relative grid gap-y-5 outline-none', // Footer
|
|
2052
2093
|
'[&_[data-slot="footer"]]:flex [&_[data-slot="footer"]]:gap-x-2'),
|
|
2053
2094
|
children: ({ close })=>/*#__PURE__*/ jsx(Fragment, {
|
|
2054
2095
|
children: /*#__PURE__*/ jsx(Provider, {
|
|
2055
2096
|
values: [
|
|
2056
|
-
[
|
|
2057
|
-
HeadingContext,
|
|
2058
|
-
{
|
|
2059
|
-
slots: {
|
|
2060
|
-
[DEFAULT_SLOT]: {},
|
|
2061
|
-
title: {
|
|
2062
|
-
className: 'heading-s',
|
|
2063
|
-
_outerWrapper: (children)=>/*#__PURE__*/ jsxs("div", {
|
|
2064
|
-
className: "flex items-center justify-between gap-x-2",
|
|
2065
|
-
children: [
|
|
2066
|
-
children,
|
|
2067
|
-
/*#__PURE__*/ jsx(Button, {
|
|
2068
|
-
slot: "close",
|
|
2069
|
-
variant: "tertiary",
|
|
2070
|
-
className: "!px-2.5 data-focus-visible:outline-focus-inset",
|
|
2071
|
-
"aria-label": translations$1.close[locale],
|
|
2072
|
-
children: /*#__PURE__*/ jsx(Close, {})
|
|
2073
|
-
})
|
|
2074
|
-
]
|
|
2075
|
-
})
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
],
|
|
2080
2097
|
[
|
|
2081
2098
|
ButtonContext$1,
|
|
2082
2099
|
{
|
|
@@ -2098,7 +2115,6 @@ const Dialog = ({ className, children, ...restProps })=>{
|
|
|
2098
2115
|
})
|
|
2099
2116
|
})
|
|
2100
2117
|
});
|
|
2101
|
-
};
|
|
2102
2118
|
|
|
2103
2119
|
// This component is based on a copy of ../textfield/TextField, refactoring is TBD: https://github.com/code-obos/grunnmuren/pull/722#issuecomment-1931478786
|
|
2104
2120
|
const inputVariants$1 = compose(input, cva({
|
|
@@ -2164,6 +2180,44 @@ function NumberField(props) {
|
|
|
2164
2180
|
});
|
|
2165
2181
|
}
|
|
2166
2182
|
|
|
2183
|
+
const _ProgressBarValueTextContext = /*#__PURE__*/ createContext(undefined);
|
|
2184
|
+
const _ProgressBarValueTextProvider = _ProgressBarValueTextContext.Provider;
|
|
2185
|
+
const ProgressBarValueText = ({ className, ...restProps })=>{
|
|
2186
|
+
const value = useContext(_ProgressBarValueTextContext);
|
|
2187
|
+
return /*#__PURE__*/ jsx("span", {
|
|
2188
|
+
...restProps,
|
|
2189
|
+
className: cx(className, 'px-2 leading-7'),
|
|
2190
|
+
"data-slot": "progress-bar-value-text",
|
|
2191
|
+
children: value
|
|
2192
|
+
});
|
|
2193
|
+
};
|
|
2194
|
+
const ProgressBar = ({ children, className, ...restProps })=>{
|
|
2195
|
+
return /*#__PURE__*/ jsx(ProgressBar$1, {
|
|
2196
|
+
"data-slot": "progress-bar",
|
|
2197
|
+
...restProps,
|
|
2198
|
+
className: cx(className, 'max-w-full'),
|
|
2199
|
+
children: ({ percentage, valueText, ...restArgs })=>/*#__PURE__*/ jsxs(_ProgressBarValueTextProvider, {
|
|
2200
|
+
value: valueText,
|
|
2201
|
+
children: [
|
|
2202
|
+
typeof children === 'function' ? children({
|
|
2203
|
+
percentage,
|
|
2204
|
+
valueText,
|
|
2205
|
+
...restArgs
|
|
2206
|
+
}) : children,
|
|
2207
|
+
/*#__PURE__*/ jsx("div", {
|
|
2208
|
+
className: "relative h-0.75 rounded bg-gray-light",
|
|
2209
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
2210
|
+
className: "h-0.75 rounded bg-blue-dark transition-all duration-300 ease-in-out",
|
|
2211
|
+
style: {
|
|
2212
|
+
width: `${percentage}%`
|
|
2213
|
+
}
|
|
2214
|
+
})
|
|
2215
|
+
})
|
|
2216
|
+
]
|
|
2217
|
+
})
|
|
2218
|
+
});
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2167
2221
|
const defaultClasses = cx([
|
|
2168
2222
|
'-ml-2.5 relative inline-flex max-w-fit cursor-pointer items-start gap-4 py-2.5 pl-2.5 leading-7',
|
|
2169
2223
|
// the radio button itself
|
|
@@ -2888,4 +2942,4 @@ const VideoLoop = ({ src, format, alt, className })=>{
|
|
|
2888
2942
|
});
|
|
2889
2943
|
};
|
|
2890
2944
|
|
|
2891
|
-
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, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, Link as UNSAFE_Link, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _LinkContext, _useLocale as useLocale };
|
|
2945
|
+
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, CarouselItem as UNSAFE_CarouselItem, CarouselItems as UNSAFE_CarouselItems, Dialog as UNSAFE_Dialog, DialogTrigger as UNSAFE_DialogTrigger, FileUpload as UNSAFE_FileUpload, Hero as UNSAFE_Hero, Link as UNSAFE_Link, Modal as UNSAFE_Modal, ProgressBar as UNSAFE_ProgressBar, ProgressBarValueText as UNSAFE_ProgressBarValueText, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _LinkContext, _useLocale as useLocale };
|