@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 CHANGED
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- 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, TabsProps, TextAreaProps, TooltipProps, UserProps } from "@nextui-org/react";
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<TableRowProps>;
74
+ tableRow?: Partial<ComponentProps<typeof TableRow>>;
76
75
  tab?: Partial<TabItemProps>;
77
76
  tabs?: Partial<TabsProps>;
78
77
  textArea?: Partial<TextAreaProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAkFtC,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"}
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(defaultContext, { defaults }) : defaultContext;
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(defaultContext, { defaults }));
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
  };
@@ -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,OA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,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"}
@@ -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] || {}, props), ref: ref, children: children }));
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) {
@@ -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,WAAW,CAAC;AAE9C,8DAA8D;AAC9D,MAAM,UAAU,YAAY,CAAqC,SAAY,EAAE,QAA6C;IAC1H,MAAM,oBAAoB,GAAG,UAAU,CAA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mB,IAAI,SAAS,EAAE,CAAC;QACrC,8DAA8D;QAC7D,oBAA4B,CAAC,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC;IAChF,CAAC;IAED,OAAO,oBAAoC,CAAC;AAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fragment-build/ui",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {