@fragment-build/ui 1.1.4 → 1.1.6
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/context.d.ts +3 -4
- package/dist/context.js.map +1 -1
- package/dist/provider.js +2 -2
- package/dist/provider.js.map +1 -1
- package/dist/withFragment.js +1 -1
- package/dist/withFragment.js.map +1 -1
- package/package.json +1 -1
package/dist/context.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { TableRowProps } from "@nextui-org/table/dist/base/table-row";
|
|
1
|
+
import { AccordionItemProps, AccordionProps, AutocompleteItemProps, AutocompleteProps, AutocompleteSectionProps, AvatarGroupProps, AvatarProps, BadgeProps, BreadcrumbItemProps, BreadcrumbsProps, ButtonProps, CardProps, CheckboxGroupProps, CheckboxProps, ChipProps, CircularProgressProps, CodeProps, DividerProps, DropdownItemProps, DropdownMenuProps, DropdownProps, DropdownSectionProps, DropdownTriggerProps, ImageProps, InputProps, KbdProps, LinkProps, ListboxItemProps, ListboxProps, ListboxSectionProps, ModalBodyProps, ModalContentProps, ModalFooterProps, ModalHeaderProps, ModalProps, NavbarBrandProps, NavbarContentProps, NavbarItemProps, NavbarMenuItemProps, NavbarMenuProps, NavbarMenuToggleProps, NavbarProps, PaginationCursorProps, PaginationItemProps, PaginationProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, ProgressProps, RadioGroupProps, RadioProps, ScrollShadowProps, SelectItemProps, SelectProps, SelectSectionProps, SkeletonProps, SliderProps, SnippetProps, SpacerProps, SpinnerProps, SwitchProps, TabItemProps, TableBodyProps, TableCellProps, TableColumnProps, TableHeaderProps, TableProps, TableRow, TabsProps, TextAreaProps, TooltipProps, UserProps } from "@nextui-org/react";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
4
3
|
import { ColorInputProps, ColorSelectorProps } from "./components";
|
|
5
4
|
export interface FragmentUIContext {
|
|
6
5
|
defaults: {
|
|
@@ -72,7 +71,7 @@ export interface FragmentUIContext {
|
|
|
72
71
|
tableCell?: Partial<TableCellProps>;
|
|
73
72
|
tableColumn?: Partial<TableColumnProps<unknown>>;
|
|
74
73
|
tableHeader?: Partial<TableHeaderProps<unknown>>;
|
|
75
|
-
tableRow?: Partial<
|
|
74
|
+
tableRow?: Partial<ComponentProps<typeof TableRow>>;
|
|
76
75
|
tab?: Partial<TabItemProps>;
|
|
77
76
|
tabs?: Partial<TabsProps>;
|
|
78
77
|
textArea?: Partial<TextAreaProps>;
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,aAAa,EAAE,MAAM,OAAO,CAAC;AAkFtD,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,MAAM,EAAE,MAAM;SACf;QACD,KAAK,EAAE;YACL,aAAa,EAAE,IAAI;SACpB;QACD,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,MAAM,EAAE,MAAM;aACf;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/provider.js
CHANGED
|
@@ -5,12 +5,12 @@ import { useEffect, useState } from "react";
|
|
|
5
5
|
import defaultsDeep from "lodash.defaultsdeep";
|
|
6
6
|
import { FragmentUIContext, defaultContext } from "./context";
|
|
7
7
|
export const FragmentUIProvider = ({ children, defaults, ...rest }) => {
|
|
8
|
-
const initContext = defaults ? defaultsDeep(
|
|
8
|
+
const initContext = defaults ? defaultsDeep({ defaults }, defaultContext) : defaultContext;
|
|
9
9
|
const [context, setContext] = useState(initContext);
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
if (!defaults)
|
|
12
12
|
return;
|
|
13
|
-
setContext(defaultsDeep(
|
|
13
|
+
setContext(defaultsDeep({ defaults }, defaultContext));
|
|
14
14
|
}, [defaults]);
|
|
15
15
|
return (_jsx(FragmentUIContext.Provider, { value: context, children: _jsx(NextUIProvider, { ...rest, children: _jsx(ThemeProvider, { attribute: "class", children: children }) }) }));
|
|
16
16
|
};
|
package/dist/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAS9D,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EACpE,QAAQ,EACR,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAS9D,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EACpE,QAAQ,EACR,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC;IAC3F,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,UAAU,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;IACzD,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YACxC,KAAC,cAAc,OAAK,IAAI,YACtB,KAAC,aAAa,IAAC,SAAS,EAAC,OAAO,YAC7B,QAAQ,GACK,GACD,GACU,CAC9B,CAAC;AACJ,CAAC,CAAA"}
|
package/dist/withFragment.js
CHANGED
|
@@ -6,7 +6,7 @@ import { FragmentUIContext } from "./context";
|
|
|
6
6
|
export function withFragment(Component, configId) {
|
|
7
7
|
const ComponentWithContext = forwardRef(({ children, ...props }, ref) => {
|
|
8
8
|
const context = useContext(FragmentUIContext);
|
|
9
|
-
return (_jsx(Component, { ...defaultsDeep(context['defaults'][configId] || {}
|
|
9
|
+
return (_jsx(Component, { ...defaultsDeep(props, context['defaults'][configId] || {}), ref: ref, children: children }));
|
|
10
10
|
});
|
|
11
11
|
// fix react-aria collection
|
|
12
12
|
if ('getCollectionNode' in Component) {
|
package/dist/withFragment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFragment.js","sourceRoot":"","sources":["../src/withFragment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM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