@obosbbl/grunnmuren-react 3.1.3 → 3.2.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 +13 -9
- package/dist/index.mjs +46 -10
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DisclosureProps as DisclosureProps$1, ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, 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
|
-
export { ListBoxItemProps as ComboboxItemProps, Form, Group, LabelProps, ListBoxItemProps as SelectItemProps
|
|
1
|
+
import { DisclosureProps as DisclosureProps$1, ButtonProps as ButtonProps$1, LinkProps as LinkProps$1, 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, 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
|
+
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';
|
|
5
5
|
import { RefAttributes, HTMLAttributes, HTMLProps, ComponentProps, ReactNode, Ref, JSX, RefObject, Dispatch, SetStateAction } from 'react';
|
|
@@ -19,8 +19,8 @@ declare const disclosureButtonVariants: (props?: ({
|
|
|
19
19
|
class?: never;
|
|
20
20
|
className?: cva.ClassValue;
|
|
21
21
|
})) | undefined) => string;
|
|
22
|
-
type DisclosureButtonProps = Omit<ButtonProps$1, 'children'
|
|
23
|
-
children
|
|
22
|
+
type DisclosureButtonProps = Omit<ButtonProps$1, 'children'> & VariantProps<typeof disclosureButtonVariants> & {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
24
|
} & RefAttributes<HTMLButtonElement>;
|
|
25
25
|
declare const DisclosureButton: ({ className, withChevron, isIconOnly, children, ref: _ref, ...restProps }: DisclosureButtonProps) => react_jsx_runtime.JSX.Element;
|
|
26
26
|
type DisclosureProps = DisclosureProps$1 & RefAttributes<HTMLDivElement> & {
|
|
@@ -167,7 +167,7 @@ declare function Breadcrumbs(props: BreadcrumbsProps): react_jsx_runtime.JSX.Ele
|
|
|
167
167
|
*/
|
|
168
168
|
declare const buttonVariants: (props?: ({
|
|
169
169
|
variant?: "primary" | "secondary" | "tertiary" | undefined;
|
|
170
|
-
color?: "
|
|
170
|
+
color?: "mint" | "white" | "blue" | undefined;
|
|
171
171
|
isIconOnly?: boolean | undefined;
|
|
172
172
|
isPending?: boolean | undefined;
|
|
173
173
|
} & ({
|
|
@@ -194,7 +194,7 @@ type CardProps = VariantProps<typeof cardVariants> & HTMLAttributes<HTMLDivEleme
|
|
|
194
194
|
};
|
|
195
195
|
declare const cardVariants: (props?: ({
|
|
196
196
|
variant?: "subtle" | "outlined" | undefined;
|
|
197
|
-
layout?: "
|
|
197
|
+
layout?: "horizontal" | "vertical" | undefined;
|
|
198
198
|
} & ({
|
|
199
199
|
class?: cva.ClassValue;
|
|
200
200
|
className?: never;
|
|
@@ -351,7 +351,7 @@ type MediaProps = HTMLProps<HTMLDivElement> & VariantProps<typeof mediaVariant>
|
|
|
351
351
|
ref?: Ref<HTMLDivElement>;
|
|
352
352
|
};
|
|
353
353
|
declare const mediaVariant: (props?: ({
|
|
354
|
-
fit?: "
|
|
354
|
+
fit?: "contain" | "cover" | undefined;
|
|
355
355
|
} & ({
|
|
356
356
|
class?: cva.ClassValue;
|
|
357
357
|
className?: never;
|
|
@@ -577,12 +577,16 @@ declare function Table(props: TableProps): react_jsx_runtime.JSX.Element;
|
|
|
577
577
|
*/
|
|
578
578
|
declare function TableHeader({ className, children, ...restProps }: TableHeaderProps): react_jsx_runtime.JSX.Element;
|
|
579
579
|
declare function TableColumn(props: TableColumnProps): react_jsx_runtime.JSX.Element;
|
|
580
|
+
type TableColumnResizerProps = ColumnResizerProps;
|
|
581
|
+
declare const TableColumnResizer: ({ className, ...restProps }: TableColumnResizerProps) => react_jsx_runtime.JSX.Element;
|
|
580
582
|
/**
|
|
581
583
|
* Container for table rows.
|
|
582
584
|
*/
|
|
583
585
|
declare function TableBody({ className, children, ...restProps }: TableBodyProps): react_jsx_runtime.JSX.Element;
|
|
584
586
|
declare function TableRow(props: TableRowProps): react_jsx_runtime.JSX.Element;
|
|
585
587
|
declare function TableCell(props: TableCellProps): react_jsx_runtime.JSX.Element;
|
|
588
|
+
type TableContainerProps = ResizableTableContainerProps;
|
|
589
|
+
declare const TableContainer: ({ className, ...restProps }: ResizableTableContainerProps) => react_jsx_runtime.JSX.Element;
|
|
586
590
|
|
|
587
591
|
type TabsProps = Omit<TabsProps$1, 'className'> & RefAttributes<HTMLDivElement> & {
|
|
588
592
|
/**
|
|
@@ -740,5 +744,5 @@ type VideoLoopProps = {
|
|
|
740
744
|
};
|
|
741
745
|
declare const VideoLoop: ({ src, format, alt, className }: VideoLoopProps) => react_jsx_runtime.JSX.Element;
|
|
742
746
|
|
|
743
|
-
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,
|
|
744
|
-
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,
|
|
747
|
+
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, 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, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _useLocale as useLocale };
|
|
748
|
+
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, 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, LinkListItemProps as UNSAFE_LinkListItemProps, LinkListProps as UNSAFE_LinkListProps, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 ModalOverlay$1, NumberField as NumberField$1, Radio as Radio$1, RadioGroup as RadioGroup$1, Select as Select$1, SelectValue, Table as Table$1, TableBody as TableBody$1, Cell, Column, 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
|
-
export { Form, Group
|
|
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 ModalOverlay$1, NumberField as NumberField$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
|
+
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';
|
|
6
6
|
import { createContext, useContext, useId, useRef, Children, useState, useEffect, isValidElement, cloneElement, useCallback } from 'react';
|
|
@@ -117,6 +117,7 @@ const disclosureButtonVariants = cva({
|
|
|
117
117
|
});
|
|
118
118
|
const DisclosureButton = ({ className, withChevron, isIconOnly, children, ref: _ref, ...restProps })=>{
|
|
119
119
|
const [props, ref] = useContextProps(restProps, _ref, ButtonContext$1);
|
|
120
|
+
const hasContext = !!useContext(DisclosureContext);
|
|
120
121
|
return /*#__PURE__*/ jsxs(Button$1, {
|
|
121
122
|
...props,
|
|
122
123
|
ref: ref,
|
|
@@ -125,7 +126,7 @@ const DisclosureButton = ({ className, withChevron, isIconOnly, children, ref: _
|
|
|
125
126
|
withChevron,
|
|
126
127
|
isIconOnly
|
|
127
128
|
}),
|
|
128
|
-
slot:
|
|
129
|
+
slot: hasContext ? 'trigger' : undefined,
|
|
129
130
|
children: [
|
|
130
131
|
children,
|
|
131
132
|
withChevron && /*#__PURE__*/ jsx(ChevronDown, {
|
|
@@ -482,7 +483,7 @@ const Avatar = ({ src, alt = '', className, onError, loading = 'lazy', ...rest }
|
|
|
482
483
|
*/ const Link = ({ children, className, ...restProps })=>{
|
|
483
484
|
return /*#__PURE__*/ jsx(Link$1, {
|
|
484
485
|
...restProps,
|
|
485
|
-
className: cx(className, 'inline-flex cursor-pointer items-center gap-1 font-medium hover:no-underline focus-visible:outline-current focus-visible:outline-focus-offset [&>svg]:shrink-0'),
|
|
486
|
+
className: cx(className, 'inline-flex cursor-pointer items-center gap-1 font-medium hover:no-underline focus-visible:outline-current focus-visible:outline-focus-offset [&>svg]:shrink-0 [&>svg]:transition-transform'),
|
|
486
487
|
children: children
|
|
487
488
|
});
|
|
488
489
|
};
|
|
@@ -2233,7 +2234,7 @@ function ScrollButton({ direction, onClick, isVisible, hasScrollingOccurred, cla
|
|
|
2233
2234
|
/**
|
|
2234
2235
|
* Simple hook for detecting horizontal scroll capabilities
|
|
2235
2236
|
* Returns scroll state and a ref to attach to your scrollable container
|
|
2236
|
-
*/ function useHorizontalScroll() {
|
|
2237
|
+
*/ function useHorizontalScroll(scrollStateDeps = []) {
|
|
2237
2238
|
const scrollContainerRef = useRef(null);
|
|
2238
2239
|
const [scrollState, setScrollState] = useState({
|
|
2239
2240
|
canScrollLeft: false,
|
|
@@ -2255,13 +2256,15 @@ function ScrollButton({ direction, onClick, isVisible, hasScrollingOccurred, cla
|
|
|
2255
2256
|
}));
|
|
2256
2257
|
}, []);
|
|
2257
2258
|
const debouncedUpdateScrollState = useDebouncedCallback(updateScrollState, 100);
|
|
2259
|
+
// Initial check and react to dependency changes
|
|
2260
|
+
useEffect(updateScrollState, [
|
|
2261
|
+
...scrollStateDeps
|
|
2262
|
+
]);
|
|
2258
2263
|
useEffect(()=>{
|
|
2259
2264
|
const container = scrollContainerRef.current;
|
|
2260
2265
|
if (!container) {
|
|
2261
2266
|
return;
|
|
2262
2267
|
}
|
|
2263
|
-
// Initial check
|
|
2264
|
-
updateScrollState();
|
|
2265
2268
|
// Listen for scroll events
|
|
2266
2269
|
container.addEventListener('scroll', debouncedUpdateScrollState);
|
|
2267
2270
|
// Listen for resize events (content or container size changes)
|
|
@@ -2299,11 +2302,18 @@ const tableRowVariants = cva({
|
|
|
2299
2302
|
'group-data-[variant=zebra-striped]:even:bg-sky-lightest'
|
|
2300
2303
|
]
|
|
2301
2304
|
});
|
|
2305
|
+
// Used to deal with showing or hiding scroll indicators during column resizing
|
|
2306
|
+
const TableScrollContainerContext = /*#__PURE__*/ createContext({
|
|
2307
|
+
isResizing: false
|
|
2308
|
+
});
|
|
2302
2309
|
/**
|
|
2303
2310
|
* A container component for displaying tabular data with horizontal scrolling support.
|
|
2304
2311
|
*/ function Table(props) {
|
|
2305
2312
|
const { className, children, variant = 'default', ...restProps } = props;
|
|
2306
|
-
const {
|
|
2313
|
+
const { isResizing } = useContext(TableScrollContainerContext);
|
|
2314
|
+
const { scrollContainerRef, canScrollLeft, canScrollRight, hasScrollingOccurred } = useHorizontalScroll([
|
|
2315
|
+
isResizing
|
|
2316
|
+
]);
|
|
2307
2317
|
const handleScroll = useCallback((direction)=>{
|
|
2308
2318
|
const container = scrollContainerRef.current;
|
|
2309
2319
|
if (!container) return;
|
|
@@ -2369,10 +2379,16 @@ function TableColumn(props) {
|
|
|
2369
2379
|
const { className, children, ...restProps } = props;
|
|
2370
2380
|
return /*#__PURE__*/ jsx(Column, {
|
|
2371
2381
|
...restProps,
|
|
2372
|
-
className: cx(className, 'px-4 py-3 text-left font-medium text-black text-sm', 'data-focus-visible:outline-focus-inset', 'min-w-fit whitespace-nowrap'),
|
|
2382
|
+
className: cx(className, 'px-4 py-3 text-left font-medium text-black text-sm', 'data-focus-visible:outline-focus-inset', '[&_:not([data-slot="table-column-resizer"]):focus-visible]:outline-focus-offset', 'min-w-fit whitespace-nowrap', 'has-data-[slot=table-column-resizer]:*:data-[slot=content]:flex has-data-[slot=table-column-resizer]:*:data-[slot=content]:justify-between has-data-[slot=table-column-resizer]:*:data-[slot=content]:gap-2'),
|
|
2383
|
+
"data-slot": "table-column",
|
|
2373
2384
|
children: children
|
|
2374
2385
|
});
|
|
2375
2386
|
}
|
|
2387
|
+
const TableColumnResizer = ({ className, ...restProps })=>/*#__PURE__*/ jsx(ColumnResizer, {
|
|
2388
|
+
...restProps,
|
|
2389
|
+
className: cx(className, '-my-3 -mr-4.5 size-11 flex-none', 'cursor-ew-resize', 'relative after:absolute after:top-2 after:right-5 after:bottom-2 after:w-px after:bg-black', 'data-focused:after:outline-focus-offset'),
|
|
2390
|
+
"data-slot": "table-column-resizer"
|
|
2391
|
+
});
|
|
2376
2392
|
/**
|
|
2377
2393
|
* Container for table rows.
|
|
2378
2394
|
*/ function TableBody({ className, children, ...restProps }) {
|
|
@@ -2397,9 +2413,29 @@ function TableCell(props) {
|
|
|
2397
2413
|
return /*#__PURE__*/ jsx(Cell, {
|
|
2398
2414
|
...restProps,
|
|
2399
2415
|
className: cx(className, 'px-4 py-3 text-black text-sm leading-relaxed', 'min-w-fit whitespace-nowrap', 'align-top', 'data-focus-visible:outline-focus-inset'),
|
|
2416
|
+
"data-slot": "table-cell",
|
|
2400
2417
|
children: children
|
|
2401
2418
|
});
|
|
2402
2419
|
}
|
|
2420
|
+
const TableContainer = ({ className, ...restProps })=>{
|
|
2421
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
2422
|
+
return /*#__PURE__*/ jsx(Provider, {
|
|
2423
|
+
values: [
|
|
2424
|
+
[
|
|
2425
|
+
TableScrollContainerContext,
|
|
2426
|
+
{
|
|
2427
|
+
isResizing
|
|
2428
|
+
}
|
|
2429
|
+
]
|
|
2430
|
+
],
|
|
2431
|
+
children: /*#__PURE__*/ jsx(ResizableTableContainer, {
|
|
2432
|
+
...restProps,
|
|
2433
|
+
className: cx(className, '**:data-[slot=table-column]:overflow-hidden **:data-[slot=table-column]:text-ellipsis', '**:data-[slot=table-cell]:overflow-hidden **:data-[slot=table-cell]:text-ellipsis'),
|
|
2434
|
+
onResizeStart: ()=>setIsResizing(true),
|
|
2435
|
+
onResizeEnd: ()=>setIsResizing(false)
|
|
2436
|
+
})
|
|
2437
|
+
});
|
|
2438
|
+
};
|
|
2403
2439
|
|
|
2404
2440
|
const tabsVariants = cva({
|
|
2405
2441
|
base: [
|
|
@@ -2795,4 +2831,4 @@ const VideoLoop = ({ src, format, alt, className })=>{
|
|
|
2795
2831
|
});
|
|
2796
2832
|
};
|
|
2797
2833
|
|
|
2798
|
-
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,
|
|
2834
|
+
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, 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, 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, TableColumnResizer as UNSAFE_TableColumnResizer, TableContainer as UNSAFE_TableContainer, TableHeader as UNSAFE_TableHeader, TableRow as UNSAFE_TableRow, Tabs as UNSAFE_Tabs, VideoLoop, _useLocale as useLocale };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@obosbbl/grunnmuren-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Grunnmuren components in React",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/code-obos/grunnmuren"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@react-aria/utils": "^3.29.1",
|
|
25
25
|
"@react-stately/form": "^3.1.5",
|
|
26
26
|
"@react-stately/utils": "^3.10.7",
|
|
27
|
-
"@types/node": "^
|
|
27
|
+
"@types/node": "^24.0.0",
|
|
28
28
|
"cva": "^1.0.0-0",
|
|
29
29
|
"react-aria": "^3.41.1",
|
|
30
30
|
"react-aria-components": "^1.10.1",
|