@fabio.caffarello/react-design-system 1.10.5 → 1.11.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/components/index.cjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components-B08xLmiA.cjs +689 -0
- package/dist/components-B08xLmiA.cjs.map +1 -0
- package/dist/{components-BTUibx0r.js → components-DEuqI-ld.js} +3446 -3504
- package/dist/components-DEuqI-ld.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +357 -364
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.cjs.map +1 -1
- package/dist/primitives/index.js +973 -981
- package/dist/primitives/index.js.map +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.cjs.map +1 -1
- package/dist/tokens/index.js +1602 -98
- package/dist/tokens/index.js.map +1 -1
- package/dist/ui/index.d.ts +0 -4
- package/dist/ui/tokens/TokenVisualizations.d.ts +0 -4
- package/dist/ui/tokens/index.d.ts +0 -5
- package/package.json +1 -1
- package/dist/components-BTUibx0r.js.map +0 -1
- package/dist/components-znqlol8t.cjs +0 -690
- package/dist/components-znqlol8t.cjs.map +0 -1
- package/dist/tokens-DcAT-mPY.js +0 -2140
- package/dist/tokens-DcAT-mPY.js.map +0 -1
- package/dist/tokens-Dul82Bn_.cjs +0 -2
- package/dist/tokens-Dul82Bn_.cjs.map +0 -1
- package/dist/ui/tokens/colors.d.ts +0 -122
- package/dist/ui/tokens/gradients.d.ts +0 -56
- package/dist/ui/tokens/themes/dark.d.ts +0 -42
- package/dist/ui/tokens/themes/light.d.ts +0 -42
- package/dist/ui/tokens/tokens.factory.d.ts +0 -98
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,A=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var h=(r,a,n)=>a in r?O(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n,u=(r,a)=>{for(var n in a||(a={}))I.call(a,n)&&h(r,n,a[n]);if(N)for(var n of N(a))F.call(a,n)&&h(r,n,a[n]);return r},T=(r,a)=>A(r,D(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./tokens-Dul82Bn_.cjs"),e=require("./components-znqlol8t.cjs"),i=require("./primitives/index.cjs"),d=require("react"),P=d.createContext(void 0);function E({children:r,defaultTheme:a="light",storageKey:n="theme"}){const[s,g]=d.useState(()=>{if(typeof window=="undefined")return a;try{const o=localStorage.getItem(n);if(o==="light"||o==="dark")return o}catch(o){console.warn("Failed to read theme from localStorage:",o)}return a});d.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(n,s)}catch(o){console.warn("Failed to save theme to localStorage:",o)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,n]);const C=()=>{g(o=>o==="light"?"dark":"light")},S=o=>{g(o)},l=s==="light"?t.SEMANTIC_COLORS_LIGHT:t.SEMANTIC_COLORS_DARK,b={theme:s,toggleTheme:C,setTheme:S,colors:l,isDark:s==="dark"};return e.jsxRuntimeExports.jsx(P.Provider,{value:b,children:r})}function L(){const r=d.useContext(P);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r}const k={breakpoints:t.BREAKPOINT_TOKENS,spacing:t.SPACING_TOKENS,typography:t.TYPOGRAPHY_TOKENS,animations:t.ANIMATION_TOKENS,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},x=d.createContext(void 0);function R({children:r,config:a,strategy:n="default"}){const s=d.useMemo(()=>{const o=u({},k);return a?T(u(u({},o),a),{breakpoints:a.breakpoints||o.breakpoints,spacing:a.spacing||o.spacing,typography:a.typography||o.typography,animations:a.animations||o.animations,features:u(u({},o.features),a.features),behavior:u(u({},o.behavior),a.behavior)}):o},[a]);d.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),d.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const g=d.useMemo(()=>o=>s.spacing[o],[s.spacing]),C=d.useMemo(()=>o=>s.breakpoints[o],[s.breakpoints]),S=d.useMemo(()=>o=>{var c;return(c=s.features[o])!=null?c:!1},[s.features]),l=d.useMemo(()=>o=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),b={config:s,getSpacing:g,getBreakpoint:C,isFeatureEnabled:S,updateConfig:l};return e.jsxRuntimeExports.jsx(x.Provider,{value:b,children:r})}function H(){const r=d.useContext(x);if(r===void 0)throw new Error("useConfig must be used within a ConfigProvider");return r}function f({children:r,defaultDuration:a=5e3,maxToasts:n=5}){const[s,g]=d.useState([]),C=d.useCallback(o=>{var v;const c=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,m=T(u({},o),{id:c,duration:(v=o.duration)!=null?v:a});return g(y=>[m,...y].slice(0,n)),c},[a,n]),S=d.useCallback(o=>{g(c=>c.filter(m=>m.id!==o))},[]),l=d.useCallback(()=>{g([])},[]),b={toasts:s,addToast:C,removeToast:S,clearAll:l};return e.jsxRuntimeExports.jsx(e.ToastContext.Provider,{value:b,children:r})}const M={ThemeProvider:E,ConfigProvider:R,ToastProvider:f,DialogProvider:e.DialogProvider},p=M;function _(r,a){const{theme:n,config:s,toast:g,dialog:C,providers:S={theme:!0,config:!0,toast:!0,dialog:!0}}=a||{};let l=r;return S.dialog&&(l=e.jsxRuntimeExports.jsx(p.DialogProvider,T(u({},C),{children:l}))),S.toast&&(l=e.jsxRuntimeExports.jsx(p.ToastProvider,T(u({},g),{children:l}))),S.config&&(l=e.jsxRuntimeExports.jsx(p.ConfigProvider,T(u({},s),{children:l}))),S.theme&&(l=e.jsxRuntimeExports.jsx(p.ThemeProvider,T(u({},n),{children:l}))),l}function G({children:r,config:a}){const n=d.useMemo(()=>_(r,a),[r,a]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:n})}function w(){return{}}exports.AMBER=t.AMBER;exports.BLUE=t.BLUE;exports.BRAND_COLORS=t.BRAND_COLORS;exports.BREAKPOINT_TOKENS=t.BREAKPOINT_TOKENS;exports.BreakpointTokenFactory=t.BreakpointTokenFactory;exports.COLOR_SCALES=t.COLOR_SCALES;exports.CYAN=t.CYAN;exports.DARK_THEME=t.DARK_THEME;exports.EMERALD=t.EMERALD;exports.FONT_FAMILY_TOKENS=t.FONT_FAMILY_TOKENS;exports.FONT_WEIGHT_TOKENS=t.FONT_WEIGHT_TOKENS;exports.FUCHSIA=t.FUCHSIA;exports.GRAY=t.GRAY;exports.GREEN=t.GREEN;exports.INDIGO=t.INDIGO;exports.LIGHT_THEME=t.LIGHT_THEME;exports.LIME=t.LIME;exports.ORANGE=t.ORANGE;exports.PINK=t.PINK;exports.PRIMITIVE_COLORS=t.PRIMITIVE_COLORS;exports.PURPLE=t.PURPLE;exports.RED=t.RED;exports.ROSE=t.ROSE;exports.SEMANTIC_COLORS=t.SEMANTIC_COLORS;exports.SEMANTIC_COLORS_DARK=t.SEMANTIC_COLORS_DARK;exports.SEMANTIC_COLORS_LIGHT=t.SEMANTIC_COLORS_LIGHT;exports.SIDEBAR_TOKENS=t.SIDEBAR_TOKENS;exports.SKY=t.SKY;exports.SLATE=t.SLATE;exports.SPACING_TOKENS=t.SPACING_TOKENS;exports.SpacingTokenFactory=t.SpacingTokenFactory;exports.TEAL=t.TEAL;exports.TYPOGRAPHY_TOKENS=t.TYPOGRAPHY_TOKENS;exports.TokensFactory=t.TokensFactory;exports.TypographyTokenFactory=t.TypographyTokenFactory;exports.VIOLET=t.VIOLET;exports.YELLOW=t.YELLOW;exports.blendColors=t.blendColors;exports.createTokenSet=t.createTokenSet;exports.darken=t.darken;exports.defaultTokensFactory=t.defaultTokensFactory;exports.getAnimation=t.getAnimation;exports.getAnimationClass=t.getAnimationClass;exports.getBreakpoint=t.getBreakpoint;exports.getColor=t.getColor;exports.getColorClass=t.getColorClass$1;exports.getContrastColor=t.getContrastColor;exports.getFocusColorClass=t.getFocusColorClass$1;exports.getFocusRingClass=t.getFocusRingClass$1;exports.getGradient=t.getGradient;exports.getGradientClass=t.getGradientClass;exports.getHoverColorClass=t.getHoverColorClass$1;exports.getMediaQuery=t.getMediaQuery;exports.getNestedIndentClass=t.getNestedIndentClass;exports.getOpacity=t.getOpacity;exports.getOpacityClass=t.getOpacityClass;exports.getPrimitiveColor=t.getPrimitiveColor;exports.getPrimitiveColorPalette=t.getPrimitiveColorPalette;exports.getSemanticColor=t.getSemanticColor;exports.getSemanticColorClass=t.getSemanticColorClass;exports.getSemanticColorRole=t.getSemanticColorRole;exports.getSemanticColorValue=t.getSemanticColorValue;exports.getSpacing=t.getSpacing;exports.getSpacingClass=t.getSpacingClass;exports.getTransitionClass=t.getTransitionClass;exports.getTypography=t.getTypography;exports.getTypographyClasses=t.getTypographyClasses;exports.getTypographyLineHeight=t.getTypographyLineHeight;exports.getTypographySize=t.getTypographySize;exports.getTypographySizeFromFontSize=t.getTypographySizeFromFontSize;exports.getTypographyWeight=t.getTypographyWeight;exports.getTypographyWeightFromFontWeight=t.getTypographyWeightFromFontWeight;exports.getZIndex=t.getZIndex;exports.getZIndexClass=t.getZIndexClass;exports.isLightColor=t.isLightColor;exports.lighten=t.lighten;exports.withOpacity=t.withOpacity;exports.Accordion=e.Accordion;exports.AlertDialog=e.AlertDialog;exports.Autocomplete=e.Autocomplete;exports.AutocompleteList=e.AutocompleteList;exports.AutocompleteOption=e.AutocompleteOption;exports.Breadcrumb=e.Breadcrumb;exports.Card=e.Card;exports.ColorPicker=e.ColorPicker;exports.CommandPalette=e.CommandPalette;exports.DashboardLayout=e.DashboardLayout;exports.DataGrid=e.DataGrid;exports.DataTablePattern=e.DataTablePattern;exports.DatePicker=e.DatePicker;exports.DatePickerCalendar=e.DatePickerCalendar;exports.DatePickerInput=e.DatePickerInput;exports.DatePickerProvider=e.DatePickerProvider;exports.Dialog=e.Dialog;exports.DialogClose=e.DialogClose;exports.DialogContent=e.DialogContent;exports.DialogContext=e.DialogContext;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogProvider=e.DialogProvider;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.Drawer=e.Drawer;exports.DrawerContent=e.DrawerContent;exports.DrawerFooter=e.DrawerFooter;exports.DrawerHeader=e.DrawerHeader;exports.Dropdown=e.Dropdown;exports.EmptyState=e.EmptyState;exports.FileUpload=e.FileUpload;exports.Form=e.Form;exports.FormContext=e.FormContext;exports.FormField=e.FormField;exports.FormProvider=e.FormProvider;exports.FormWizardPattern=e.FormWizardPattern;exports.Header=e.Header;exports.HeaderActions=e.HeaderActions;exports.HeaderComponent=e.Header;exports.HeaderHamburger=e.HeaderHamburger;exports.HeaderLogo=e.HeaderLogo;exports.HeaderMobileMenu=e.HeaderMobileMenu;exports.HeaderNavigation=e.HeaderNavigation;exports.HeaderProvider=e.HeaderProvider;exports.LoginBox=e.LoginBox;exports.Menu=e.Menu;exports.MenuContent=e.MenuContent;exports.MenuItem=e.MenuItem;exports.MenuSeparator=e.MenuSeparator;exports.MenuTrigger=e.MenuTrigger;exports.Modal=e.Modal;exports.MultiSelect=e.MultiSelect;exports.Navbar=e.Navbar;exports.NavbarContext=e.NavbarContext;exports.NavbarGroup=e.NavbarGroup;exports.NavbarItem=e.NavbarItem;exports.NavbarSeparator=e.NavbarSeparator;exports.NavbarToggle=e.NavbarToggle;exports.Navigation=e.Navigation;exports.NavigationComponent=e.Navigation;exports.PageHeader=e.PageHeader;exports.PageHeaderComponent=e.PageHeader;exports.Pagination=e.Pagination;exports.Popover=e.Popover;exports.Rating=e.Rating;exports.SearchAndFilterPattern=e.SearchAndFilterPattern;exports.SearchInput=e.SearchInput;exports.SideNavbar=e.SideNavbar;exports.SideNavbarBackdrop=e.SideNavbarBackdrop;exports.SideNavbarConfigContext=e.SideNavbarConfigContext;exports.SideNavbarConfigProvider=e.SideNavbarConfigProvider;exports.SideNavbarProvider=e.SideNavbarProvider;exports.SideNavbarResizeHandle=e.SideNavbarResizeHandle;exports.SideNavbarRoot=e.SideNavbarRoot;exports.SideNavbarStateContext=e.SideNavbarStateContext;exports.SideNavbarStateProvider=e.SideNavbarStateProvider;exports.SideNavbarThemeContext=e.SideNavbarThemeContext;exports.SideNavbarThemeProvider=e.SideNavbarThemeProvider;exports.SideNavbarToggle=e.SideNavbarToggle;exports.SideNavbarToggleContext=e.SideNavbarToggleContext;exports.Sidebar=e.Sidebar;exports.SidebarContent=e.SidebarContent;exports.SidebarContext=e.SidebarContext;exports.SidebarFooter=e.SidebarFooter;exports.SidebarGroup=e.SidebarGroup;exports.SidebarHeader=e.SidebarHeader;exports.SidebarSlot=e.SidebarSlot;exports.SidebarSlotContent=e.SidebarSlotContent;exports.SidebarSlotContext=e.SidebarSlotContext;exports.SidebarSlotProvider=e.SidebarSlotProvider;exports.Stepper=e.Stepper;exports.Table=e.TableComponent;exports.TableActions=e.TableActions;exports.TableBody=e.TableBody;exports.TableCell=e.TableCell;exports.TableContext=e.TableContext;exports.TableEmptyState=e.TableEmptyState;exports.TableFilters=e.TableFilters;exports.TableHeader=e.TableHeader;exports.TableHeaderCell=e.TableHeaderCell;exports.TableHeaderRow=e.TableHeaderRow;exports.TablePagination=e.TablePagination;exports.TableProvider=e.TableProvider;exports.TableRow=e.TableRow;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsContext=e.TabsContext;exports.TabsList=e.TabsList;exports.TabsProvider=e.TabsProvider;exports.TabsTrigger=e.TabsTrigger;exports.TimePicker=e.TimePicker;exports.Timeline=e.Timeline;exports.Toast=e.Toast;exports.ToastContainer=e.ToastContainer;exports.ToastContext=e.ToastContext;exports.clampWidth=e.clampWidth;exports.cn=e.cn;exports.defaultConfigValues=e.defaultConfigValues;exports.defaultThemeValues=e.defaultThemeValues;exports.formatKeyboardShortcut=e.formatKeyboardShortcut;exports.parseKeyboardShortcut=e.parseKeyboardShortcut;exports.parseWidthToPixels=e.parseWidthToPixels;exports.useColumnResizing=e.useColumnResizing;exports.useDialogContext=e.useDialogContext;exports.useDialogContextOptional=e.useDialogContextOptional;exports.useFocusManagement=e.useFocusManagement;exports.useFormContext=e.useFormContext;exports.useFormContextOptional=e.useFormContextOptional;exports.useFormFieldArray=e.useFormFieldArray;exports.useGroupState=e.useGroupState;exports.useHeaderContext=e.useHeaderContext;exports.useKeyboardShortcut=e.useKeyboardShortcut;exports.useNavbar=e.useNavbar;exports.useNavbarRequired=e.useNavbarRequired;exports.useResize=e.useResize;exports.useResponsiveSidebar=e.useResponsiveSidebar;exports.useSideNavbarCombined=e.useSideNavbarCombined;exports.useSideNavbarConfig=e.useSideNavbarConfig;exports.useSideNavbarConfigRequired=e.useSideNavbarConfigRequired;exports.useSideNavbarContent=e.useSideNavbarContent;exports.useSideNavbarNavigation=e.useSideNavbarNavigation;exports.useSideNavbarState=e.useSideNavbarState;exports.useSideNavbarStateRequired=e.useSideNavbarStateRequired;exports.useSideNavbarTheme=e.useSideNavbarTheme;exports.useSideNavbarThemeRequired=e.useSideNavbarThemeRequired;exports.useSideNavbarToggleContext=e.useSideNavbarToggleContext;exports.useSideNavbarToggleContextRequired=e.useSideNavbarToggleContextRequired;exports.useSidebar=e.useSidebar;exports.useSidebarRequired=e.useSidebarRequired;exports.useSidebarSlot=e.useSidebarSlot;exports.useSidebarSlotRequired=e.useSidebarSlotRequired;exports.useTableContext=e.useTableContext;exports.useTableContextOptional=e.useTableContextOptional;exports.useTabsContext=e.useTabsContext;exports.useTabsContextOptional=e.useTabsContextOptional;exports.useToast=e.useToast;exports.useToastContext=e.useToastContext;exports.useToastContextOptional=e.useToastContextOptional;exports.useVirtualScrolling=e.useVirtualScrolling;exports.validateWidthBounds=e.validateWidthBounds;exports.Avatar=i.Avatar;exports.AvatarGroup=i.AvatarGroup;exports.Badge=i.Badge;exports.Button=i.Button;exports.Checkbox=i.Checkbox;exports.Chip=i.Chip;exports.Collapsible=i.Collapsible;exports.ErrorMessage=i.ErrorMessage;exports.Info=i.Info;exports.Input=i.Input;exports.Label=i.Label;exports.NavLink=i.NavLink;exports.Progress=i.Progress;exports.Radio=i.Radio;exports.Select=i.Select;exports.Separator=i.Separator;exports.Skeleton=i.Skeleton;exports.Slider=i.Slider;exports.Spinner=i.Spinner;exports.Switch=i.Switch;exports.Text=i.Text;exports.Textarea=i.Textarea;exports.Tooltip=i.Tooltip;exports.useNavLink=i.useNavLink;exports.AppProvider=G;exports.ConfigProvider=R;exports.ThemeProvider=E;exports.ToastProvider=f;exports.useApp=w;exports.useConfig=H;exports.useTheme=L;
|
|
1
|
+
"use strict";var y=Object.defineProperty,A=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var h=(r,a,n)=>a in r?y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n,u=(r,a)=>{for(var n in a||(a={}))I.call(a,n)&&h(r,n,a[n]);if(N)for(var n of N(a))F.call(a,n)&&h(r,n,a[n]);return r},T=(r,a)=>A(r,D(a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./tokens/index.cjs"),e=require("./components-B08xLmiA.cjs"),i=require("./primitives/index.cjs"),d=require("react"),P=d.createContext(void 0);function x({children:r,defaultTheme:a="light",storageKey:n="theme"}){const[s,g]=d.useState(()=>{if(typeof window=="undefined")return a;try{const o=localStorage.getItem(n);if(o==="light"||o==="dark")return o}catch(o){console.warn("Failed to read theme from localStorage:",o)}return a});d.useEffect(()=>{if(typeof window!="undefined"){try{localStorage.setItem(n,s)}catch(o){console.warn("Failed to save theme to localStorage:",o)}typeof document!="undefined"&&(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(s))}},[s,n]);const C=()=>{g(o=>o==="light"?"dark":"light")},S=o=>{g(o)},l=s==="light"?t.SEMANTIC_COLORS_LIGHT:t.SEMANTIC_COLORS_DARK,b={theme:s,toggleTheme:C,setTheme:S,colors:l,isDark:s==="dark"};return e.jsxRuntimeExports.jsx(P.Provider,{value:b,children:r})}function L(){const r=d.useContext(P);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r}const M={breakpoints:t.BREAKPOINT_TOKENS,spacing:t.SPACING_TOKENS,typography:t.TYPOGRAPHY_TOKENS,animations:t.ANIMATION_TOKENS,features:{reducedMotion:!1,highContrast:!1,debug:!1},behavior:{defaultAnimationDuration:200,defaultTransitionDuration:150,focusVisible:!0}},R=d.createContext(void 0);function f({children:r,config:a,strategy:n="default"}){const s=d.useMemo(()=>{const o=u({},M);return a?T(u(u({},o),a),{breakpoints:a.breakpoints||o.breakpoints,spacing:a.spacing||o.spacing,typography:a.typography||o.typography,animations:a.animations||o.animations,features:u(u({},o.features),a.features),behavior:u(u({},o.behavior),a.behavior)}):o},[a]);d.useEffect(()=>{typeof document!="undefined"&&(s.features.reducedMotion?document.documentElement.style.setProperty("--motion-reduce","1"):document.documentElement.style.removeProperty("--motion-reduce"))},[s.features.reducedMotion]),d.useEffect(()=>{typeof document!="undefined"&&(s.features.highContrast?document.documentElement.classList.add("high-contrast"):document.documentElement.classList.remove("high-contrast"))},[s.features.highContrast]);const g=d.useMemo(()=>o=>s.spacing[o],[s.spacing]),C=d.useMemo(()=>o=>s.breakpoints[o],[s.breakpoints]),S=d.useMemo(()=>o=>{var c;return(c=s.features[o])!=null?c:!1},[s.features]),l=d.useMemo(()=>o=>{console.warn("ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.")},[]),b={config:s,getSpacing:g,getBreakpoint:C,isFeatureEnabled:S,updateConfig:l};return e.jsxRuntimeExports.jsx(R.Provider,{value:b,children:r})}function k(){const r=d.useContext(R);if(r===void 0)throw new Error("useConfig must be used within a ConfigProvider");return r}function E({children:r,defaultDuration:a=5e3,maxToasts:n=5}){const[s,g]=d.useState([]),C=d.useCallback(o=>{var v;const c=`toast-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,m=T(u({},o),{id:c,duration:(v=o.duration)!=null?v:a});return g(O=>[m,...O].slice(0,n)),c},[a,n]),S=d.useCallback(o=>{g(c=>c.filter(m=>m.id!==o))},[]),l=d.useCallback(()=>{g([])},[]),b={toasts:s,addToast:C,removeToast:S,clearAll:l};return e.jsxRuntimeExports.jsx(e.ToastContext.Provider,{value:b,children:r})}const H={ThemeProvider:x,ConfigProvider:f,ToastProvider:E,DialogProvider:e.DialogProvider},p=H;function _(r,a){const{theme:n,config:s,toast:g,dialog:C,providers:S={theme:!0,config:!0,toast:!0,dialog:!0}}=a||{};let l=r;return S.dialog&&(l=e.jsxRuntimeExports.jsx(p.DialogProvider,T(u({},C),{children:l}))),S.toast&&(l=e.jsxRuntimeExports.jsx(p.ToastProvider,T(u({},g),{children:l}))),S.config&&(l=e.jsxRuntimeExports.jsx(p.ConfigProvider,T(u({},s),{children:l}))),S.theme&&(l=e.jsxRuntimeExports.jsx(p.ThemeProvider,T(u({},n),{children:l}))),l}function w({children:r,config:a}){const n=d.useMemo(()=>_(r,a),[r,a]);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:n})}function B(){return{}}exports.AMBER=t.AMBER;exports.BLUE=t.BLUE;exports.BRAND_COLORS=t.BRAND_COLORS;exports.BREAKPOINT_TOKENS=t.BREAKPOINT_TOKENS;exports.BreakpointTokenFactory=t.BreakpointTokenFactory;exports.COLOR_SCALES=t.COLOR_SCALES;exports.CYAN=t.CYAN;exports.EMERALD=t.EMERALD;exports.FONT_FAMILY_TOKENS=t.FONT_FAMILY_TOKENS;exports.FONT_WEIGHT_TOKENS=t.FONT_WEIGHT_TOKENS;exports.FUCHSIA=t.FUCHSIA;exports.GRAY=t.GRAY;exports.GREEN=t.GREEN;exports.INDIGO=t.INDIGO;exports.LIME=t.LIME;exports.ORANGE=t.ORANGE;exports.PINK=t.PINK;exports.PRIMITIVE_COLORS=t.PRIMITIVE_COLORS;exports.PURPLE=t.PURPLE;exports.RED=t.RED;exports.ROSE=t.ROSE;exports.SEMANTIC_COLORS=t.SEMANTIC_COLORS;exports.SEMANTIC_COLORS_DARK=t.SEMANTIC_COLORS_DARK;exports.SEMANTIC_COLORS_LIGHT=t.SEMANTIC_COLORS_LIGHT;exports.SIDEBAR_TOKENS=t.SIDEBAR_TOKENS;exports.SKY=t.SKY;exports.SLATE=t.SLATE;exports.SPACING_TOKENS=t.SPACING_TOKENS;exports.SpacingTokenFactory=t.SpacingTokenFactory;exports.TEAL=t.TEAL;exports.TYPOGRAPHY_TOKENS=t.TYPOGRAPHY_TOKENS;exports.TypographyTokenFactory=t.TypographyTokenFactory;exports.VIOLET=t.VIOLET;exports.YELLOW=t.YELLOW;exports.blendColors=t.blendColors;exports.darken=t.darken;exports.getAnimation=t.getAnimation;exports.getAnimationClass=t.getAnimationClass;exports.getBreakpoint=t.getBreakpoint;exports.getColor=t.getColor;exports.getColorClass=t.getColorClass;exports.getContrastColor=t.getContrastColor;exports.getFocusColorClass=t.getFocusColorClass;exports.getFocusRingClass=t.getFocusRingClass;exports.getHoverColorClass=t.getHoverColorClass;exports.getMediaQuery=t.getMediaQuery;exports.getNestedIndentClass=t.getNestedIndentClass;exports.getOpacity=t.getOpacity;exports.getOpacityClass=t.getOpacityClass;exports.getPrimitiveColor=t.getPrimitiveColor;exports.getPrimitiveColorPalette=t.getPrimitiveColorPalette;exports.getSemanticColor=t.getSemanticColor;exports.getSemanticColorClass=t.getSemanticColorClass;exports.getSemanticColorRole=t.getSemanticColorRole;exports.getSemanticColorValue=t.getSemanticColorValue;exports.getSpacing=t.getSpacing;exports.getSpacingClass=t.getSpacingClass;exports.getTransitionClass=t.getTransitionClass;exports.getTypography=t.getTypography;exports.getTypographyClasses=t.getTypographyClasses;exports.getTypographyLineHeight=t.getTypographyLineHeight;exports.getTypographySize=t.getTypographySize;exports.getTypographySizeFromFontSize=t.getTypographySizeFromFontSize;exports.getTypographyWeight=t.getTypographyWeight;exports.getTypographyWeightFromFontWeight=t.getTypographyWeightFromFontWeight;exports.getZIndex=t.getZIndex;exports.getZIndexClass=t.getZIndexClass;exports.isLightColor=t.isLightColor;exports.lighten=t.lighten;exports.withOpacity=t.withOpacity;exports.Accordion=e.Accordion;exports.AlertDialog=e.AlertDialog;exports.Autocomplete=e.Autocomplete;exports.AutocompleteList=e.AutocompleteList;exports.AutocompleteOption=e.AutocompleteOption;exports.Breadcrumb=e.Breadcrumb;exports.Card=e.Card;exports.ColorPicker=e.ColorPicker;exports.CommandPalette=e.CommandPalette;exports.DashboardLayout=e.DashboardLayout;exports.DataGrid=e.DataGrid;exports.DataTablePattern=e.DataTablePattern;exports.DatePicker=e.DatePicker;exports.DatePickerCalendar=e.DatePickerCalendar;exports.DatePickerInput=e.DatePickerInput;exports.DatePickerProvider=e.DatePickerProvider;exports.Dialog=e.Dialog;exports.DialogClose=e.DialogClose;exports.DialogContent=e.DialogContent;exports.DialogContext=e.DialogContext;exports.DialogDescription=e.DialogDescription;exports.DialogFooter=e.DialogFooter;exports.DialogHeader=e.DialogHeader;exports.DialogProvider=e.DialogProvider;exports.DialogTitle=e.DialogTitle;exports.DialogTrigger=e.DialogTrigger;exports.Drawer=e.Drawer;exports.DrawerContent=e.DrawerContent;exports.DrawerFooter=e.DrawerFooter;exports.DrawerHeader=e.DrawerHeader;exports.Dropdown=e.Dropdown;exports.EmptyState=e.EmptyState;exports.FileUpload=e.FileUpload;exports.Form=e.Form;exports.FormContext=e.FormContext;exports.FormField=e.FormField;exports.FormProvider=e.FormProvider;exports.FormWizardPattern=e.FormWizardPattern;exports.Header=e.Header;exports.HeaderActions=e.HeaderActions;exports.HeaderComponent=e.Header;exports.HeaderHamburger=e.HeaderHamburger;exports.HeaderLogo=e.HeaderLogo;exports.HeaderMobileMenu=e.HeaderMobileMenu;exports.HeaderNavigation=e.HeaderNavigation;exports.HeaderProvider=e.HeaderProvider;exports.LoginBox=e.LoginBox;exports.Menu=e.Menu;exports.MenuContent=e.MenuContent;exports.MenuItem=e.MenuItem;exports.MenuSeparator=e.MenuSeparator;exports.MenuTrigger=e.MenuTrigger;exports.Modal=e.Modal;exports.MultiSelect=e.MultiSelect;exports.Navbar=e.Navbar;exports.NavbarContext=e.NavbarContext;exports.NavbarGroup=e.NavbarGroup;exports.NavbarItem=e.NavbarItem;exports.NavbarSeparator=e.NavbarSeparator;exports.NavbarToggle=e.NavbarToggle;exports.Navigation=e.Navigation;exports.NavigationComponent=e.Navigation;exports.PageHeader=e.PageHeader;exports.PageHeaderComponent=e.PageHeader;exports.Pagination=e.Pagination;exports.Popover=e.Popover;exports.Rating=e.Rating;exports.SearchAndFilterPattern=e.SearchAndFilterPattern;exports.SearchInput=e.SearchInput;exports.SideNavbar=e.SideNavbar;exports.SideNavbarBackdrop=e.SideNavbarBackdrop;exports.SideNavbarConfigContext=e.SideNavbarConfigContext;exports.SideNavbarConfigProvider=e.SideNavbarConfigProvider;exports.SideNavbarProvider=e.SideNavbarProvider;exports.SideNavbarResizeHandle=e.SideNavbarResizeHandle;exports.SideNavbarRoot=e.SideNavbarRoot;exports.SideNavbarStateContext=e.SideNavbarStateContext;exports.SideNavbarStateProvider=e.SideNavbarStateProvider;exports.SideNavbarThemeContext=e.SideNavbarThemeContext;exports.SideNavbarThemeProvider=e.SideNavbarThemeProvider;exports.SideNavbarToggle=e.SideNavbarToggle;exports.SideNavbarToggleContext=e.SideNavbarToggleContext;exports.Sidebar=e.Sidebar;exports.SidebarContent=e.SidebarContent;exports.SidebarContext=e.SidebarContext;exports.SidebarFooter=e.SidebarFooter;exports.SidebarGroup=e.SidebarGroup;exports.SidebarHeader=e.SidebarHeader;exports.SidebarSlot=e.SidebarSlot;exports.SidebarSlotContent=e.SidebarSlotContent;exports.SidebarSlotContext=e.SidebarSlotContext;exports.SidebarSlotProvider=e.SidebarSlotProvider;exports.Stepper=e.Stepper;exports.Table=e.TableComponent;exports.TableActions=e.TableActions;exports.TableBody=e.TableBody;exports.TableCell=e.TableCell;exports.TableContext=e.TableContext;exports.TableEmptyState=e.TableEmptyState;exports.TableFilters=e.TableFilters;exports.TableHeader=e.TableHeader;exports.TableHeaderCell=e.TableHeaderCell;exports.TableHeaderRow=e.TableHeaderRow;exports.TablePagination=e.TablePagination;exports.TableProvider=e.TableProvider;exports.TableRow=e.TableRow;exports.Tabs=e.Tabs;exports.TabsContent=e.TabsContent;exports.TabsContext=e.TabsContext;exports.TabsList=e.TabsList;exports.TabsProvider=e.TabsProvider;exports.TabsTrigger=e.TabsTrigger;exports.TimePicker=e.TimePicker;exports.Timeline=e.Timeline;exports.Toast=e.Toast;exports.ToastContainer=e.ToastContainer;exports.ToastContext=e.ToastContext;exports.clampWidth=e.clampWidth;exports.cn=e.cn;exports.defaultConfigValues=e.defaultConfigValues;exports.defaultThemeValues=e.defaultThemeValues;exports.formatKeyboardShortcut=e.formatKeyboardShortcut;exports.parseKeyboardShortcut=e.parseKeyboardShortcut;exports.parseWidthToPixels=e.parseWidthToPixels;exports.useColumnResizing=e.useColumnResizing;exports.useDialogContext=e.useDialogContext;exports.useDialogContextOptional=e.useDialogContextOptional;exports.useFocusManagement=e.useFocusManagement;exports.useFormContext=e.useFormContext;exports.useFormContextOptional=e.useFormContextOptional;exports.useFormFieldArray=e.useFormFieldArray;exports.useGroupState=e.useGroupState;exports.useHeaderContext=e.useHeaderContext;exports.useKeyboardShortcut=e.useKeyboardShortcut;exports.useNavbar=e.useNavbar;exports.useNavbarRequired=e.useNavbarRequired;exports.useResize=e.useResize;exports.useResponsiveSidebar=e.useResponsiveSidebar;exports.useSideNavbarCombined=e.useSideNavbarCombined;exports.useSideNavbarConfig=e.useSideNavbarConfig;exports.useSideNavbarConfigRequired=e.useSideNavbarConfigRequired;exports.useSideNavbarContent=e.useSideNavbarContent;exports.useSideNavbarNavigation=e.useSideNavbarNavigation;exports.useSideNavbarState=e.useSideNavbarState;exports.useSideNavbarStateRequired=e.useSideNavbarStateRequired;exports.useSideNavbarTheme=e.useSideNavbarTheme;exports.useSideNavbarThemeRequired=e.useSideNavbarThemeRequired;exports.useSideNavbarToggleContext=e.useSideNavbarToggleContext;exports.useSideNavbarToggleContextRequired=e.useSideNavbarToggleContextRequired;exports.useSidebar=e.useSidebar;exports.useSidebarRequired=e.useSidebarRequired;exports.useSidebarSlot=e.useSidebarSlot;exports.useSidebarSlotRequired=e.useSidebarSlotRequired;exports.useTableContext=e.useTableContext;exports.useTableContextOptional=e.useTableContextOptional;exports.useTabsContext=e.useTabsContext;exports.useTabsContextOptional=e.useTabsContextOptional;exports.useToast=e.useToast;exports.useToastContext=e.useToastContext;exports.useToastContextOptional=e.useToastContextOptional;exports.useVirtualScrolling=e.useVirtualScrolling;exports.validateWidthBounds=e.validateWidthBounds;exports.Avatar=i.Avatar;exports.AvatarGroup=i.AvatarGroup;exports.Badge=i.Badge;exports.Button=i.Button;exports.Checkbox=i.Checkbox;exports.Chip=i.Chip;exports.Collapsible=i.Collapsible;exports.ErrorMessage=i.ErrorMessage;exports.Info=i.Info;exports.Input=i.Input;exports.Label=i.Label;exports.NavLink=i.NavLink;exports.Progress=i.Progress;exports.Radio=i.Radio;exports.Select=i.Select;exports.Separator=i.Separator;exports.Skeleton=i.Skeleton;exports.Slider=i.Slider;exports.Spinner=i.Spinner;exports.Switch=i.Switch;exports.Text=i.Text;exports.Textarea=i.Textarea;exports.Tooltip=i.Tooltip;exports.useNavLink=i.useNavLink;exports.AppProvider=w;exports.ConfigProvider=f;exports.ThemeProvider=x;exports.ToastProvider=E;exports.useApp=B;exports.useConfig=k;exports.useTheme=L;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/ui/providers/ThemeProvider.tsx","../src/ui/providers/ConfigProvider.tsx","../src/ui/providers/ToastProvider.tsx","../src/ui/providers/providers-bundle.ts","../src/ui/providers/AppProvider.tsx"],"sourcesContent":["\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type ReactNode,\n} from \"react\";\nimport {\n SEMANTIC_COLORS_LIGHT,\n SEMANTIC_COLORS_DARK,\n type SemanticColorName,\n type SemanticColor,\n} from \"../tokens/colors/index\";\nimport type { ThemeMode } from \"../tokens\";\n\nexport interface ThemeContextValue {\n theme: ThemeMode;\n toggleTheme: () => void;\n setTheme: (theme: ThemeMode) => void;\n colors: Record<SemanticColorName, SemanticColor>;\n isDark: boolean;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\nexport interface ThemeProviderProps {\n children: ReactNode;\n defaultTheme?: ThemeMode;\n storageKey?: string;\n}\n\n/**\n * ThemeProvider Component\n *\n * Provides theme context to the application.\n * Uses Strategy Pattern for different theme strategies (light, dark).\n * Uses Observer Pattern to notify components about theme changes.\n *\n * @example\n * ```tsx\n * <ThemeProvider defaultTheme=\"light\">\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = \"light\",\n storageKey = \"theme\",\n}: ThemeProviderProps) {\n const [theme, setThemeState] = useState<ThemeMode>(() => {\n if (typeof window === \"undefined\") {\n return defaultTheme;\n }\n\n try {\n const stored = localStorage.getItem(storageKey);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n } catch (error) {\n console.warn(\"Failed to read theme from localStorage:\", error);\n }\n\n return defaultTheme;\n });\n\n useEffect(() => {\n // Only run in browser (SSR-safe)\n if (typeof window === \"undefined\") {\n return;\n }\n\n try {\n localStorage.setItem(storageKey, theme);\n } catch (error) {\n console.warn(\"Failed to save theme to localStorage:\", error);\n }\n\n // Apply theme class to document root\n if (typeof document !== \"undefined\") {\n document.documentElement.classList.remove(\"light\", \"dark\");\n document.documentElement.classList.add(theme);\n }\n }, [theme, storageKey]);\n\n const toggleTheme = () => {\n setThemeState((prev) => (prev === \"light\" ? \"dark\" : \"light\"));\n };\n\n const setTheme = (newTheme: ThemeMode) => {\n setThemeState(newTheme);\n };\n\n const colors =\n theme === \"light\" ? SEMANTIC_COLORS_LIGHT : SEMANTIC_COLORS_DARK;\n\n const value: ThemeContextValue = {\n theme,\n toggleTheme,\n setTheme,\n colors,\n isDark: theme === \"dark\",\n };\n\n return (\n <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n );\n}\n\n/**\n * Hook to use theme context\n */\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n }\n return context;\n}\n","\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport {\n createContext,\n useContext,\n useMemo,\n useEffect,\n type ReactNode,\n} from \"react\";\nimport { SPACING_TOKENS } from \"../tokens/spacing\";\nimport { TYPOGRAPHY_TOKENS } from \"../tokens/typography\";\nimport { BREAKPOINT_TOKENS } from \"../tokens/breakpoints\";\nimport { ANIMATION_TOKENS } from \"../tokens/animations\";\nimport type { BreakpointName, BreakpointToken } from \"../tokens/breakpoints\";\nimport type { SpacingToken } from \"../tokens/spacing\";\n\n/**\n * Design System Configuration\n *\n * Centralizes all design system configuration including:\n * - Breakpoints for responsive design\n * - Design tokens (spacing, typography, colors)\n * - Behavior configurations (animations, transitions)\n * - Feature flags\n */\nexport interface DesignSystemConfig {\n /**\n * Responsive breakpoints\n */\n breakpoints: Record<\n BreakpointName,\n {\n name: BreakpointName;\n minWidth: number;\n px: string;\n rem: string;\n tailwind: string;\n }\n >;\n\n /**\n * Spacing tokens\n */\n spacing: typeof SPACING_TOKENS;\n\n /**\n * Typography tokens\n */\n typography: typeof TYPOGRAPHY_TOKENS;\n\n /**\n * Animation tokens\n */\n animations: typeof ANIMATION_TOKENS;\n\n /**\n * Feature flags\n */\n features: {\n /**\n * Enable reduced motion for accessibility\n */\n reducedMotion?: boolean;\n\n /**\n * Enable high contrast mode\n */\n highContrast?: boolean;\n\n /**\n * Enable debug mode\n */\n debug?: boolean;\n };\n\n /**\n * Behavior configurations\n */\n behavior: {\n /**\n * Default animation duration in ms\n */\n defaultAnimationDuration?: number;\n\n /**\n * Default transition duration in ms\n */\n defaultTransitionDuration?: number;\n\n /**\n * Enable focus visible outline\n */\n focusVisible?: boolean;\n };\n}\n\n/**\n * Default design system configuration\n */\nconst defaultConfig: DesignSystemConfig = {\n breakpoints: BREAKPOINT_TOKENS,\n spacing: SPACING_TOKENS,\n typography: TYPOGRAPHY_TOKENS,\n animations: ANIMATION_TOKENS,\n features: {\n reducedMotion: false,\n highContrast: false,\n debug: false,\n },\n behavior: {\n defaultAnimationDuration: 200,\n defaultTransitionDuration: 150,\n focusVisible: true,\n },\n};\n\nexport interface ConfigContextValue {\n config: DesignSystemConfig;\n /**\n * Get spacing token by scale\n */\n getSpacing: (scale: keyof typeof SPACING_TOKENS) => SpacingToken;\n /**\n * Get breakpoint value\n */\n getBreakpoint: (name: BreakpointName) => BreakpointToken;\n /**\n * Check if feature is enabled\n */\n isFeatureEnabled: (feature: keyof DesignSystemConfig[\"features\"]) => boolean;\n /**\n * Update configuration (for runtime updates)\n */\n updateConfig: (updates: Partial<DesignSystemConfig>) => void;\n}\n\nconst ConfigContext = createContext<ConfigContextValue | undefined>(undefined);\n\nexport interface ConfigProviderProps {\n children: ReactNode;\n /**\n * Custom configuration to override defaults\n */\n config?: Partial<DesignSystemConfig>;\n /**\n * Strategy for configuration (default, custom, theme-based)\n */\n strategy?: \"default\" | \"custom\" | \"theme-based\";\n}\n\n/**\n * ConfigProvider Component\n *\n * Provides design system configuration context to the application.\n * Uses Strategy Pattern for different configuration strategies.\n *\n * @example\n * ```tsx\n * <ConfigProvider config={{ features: { debug: true } }}>\n * <App />\n * </ConfigProvider>\n * ```\n */\nexport function ConfigProvider({\n children,\n config: customConfig,\n strategy: _strategy = \"default\",\n}: ConfigProviderProps) {\n // Merge custom config with defaults\n const config = useMemo<DesignSystemConfig>(() => {\n const baseConfig = { ...defaultConfig };\n\n if (customConfig) {\n return {\n ...baseConfig,\n ...customConfig,\n breakpoints: customConfig.breakpoints || baseConfig.breakpoints,\n spacing: customConfig.spacing || baseConfig.spacing,\n typography: customConfig.typography || baseConfig.typography,\n animations: customConfig.animations || baseConfig.animations,\n features: {\n ...baseConfig.features,\n ...customConfig.features,\n },\n behavior: {\n ...baseConfig.behavior,\n ...customConfig.behavior,\n },\n };\n }\n\n return baseConfig;\n }, [customConfig]);\n\n // Apply reduced motion if enabled (SSR-safe)\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n\n if (config.features.reducedMotion) {\n document.documentElement.style.setProperty(\"--motion-reduce\", \"1\");\n } else {\n document.documentElement.style.removeProperty(\"--motion-reduce\");\n }\n }, [config.features.reducedMotion]);\n\n // Apply high contrast if enabled (SSR-safe)\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n\n if (config.features.highContrast) {\n document.documentElement.classList.add(\"high-contrast\");\n } else {\n document.documentElement.classList.remove(\"high-contrast\");\n }\n }, [config.features.highContrast]);\n\n const getSpacing = useMemo(\n () => (scale: keyof typeof SPACING_TOKENS) => {\n return config.spacing[scale];\n },\n [config.spacing],\n );\n\n const getBreakpoint = useMemo(\n () => (name: BreakpointName) => {\n return config.breakpoints[name];\n },\n [config.breakpoints],\n );\n\n const isFeatureEnabled = useMemo(\n () => (feature: keyof DesignSystemConfig[\"features\"]) => {\n return config.features[feature] ?? false;\n },\n [config.features],\n );\n\n const updateConfig = useMemo(\n () => (_updates: Partial<DesignSystemConfig>) => {\n // This is a placeholder - in a real implementation, you'd use state\n // For now, config is immutable. Future enhancement could add state management.\n console.warn(\n \"ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.\",\n );\n },\n [],\n );\n\n const value: ConfigContextValue = {\n config,\n getSpacing,\n getBreakpoint,\n isFeatureEnabled,\n updateConfig,\n };\n\n return (\n <ConfigContext.Provider value={value}>{children}</ConfigContext.Provider>\n );\n}\n\n/**\n * Hook to use config context\n *\n * @throws Error if used outside ConfigProvider\n */\nexport function useConfig(): ConfigContextValue {\n const context = useContext(ConfigContext);\n if (context === undefined) {\n throw new Error(\"useConfig must be used within a ConfigProvider\");\n }\n return context;\n}\n","\"use client\";\n\nimport { useState, useCallback, type ReactNode } from \"react\";\nimport {\n ToastContext,\n type Toast,\n type ToastContextValue,\n} from \"./ToastContext\";\n\nexport interface ToastProviderProps {\n children: ReactNode;\n defaultDuration?: number; // Default auto-dismiss duration in ms\n maxToasts?: number; // Maximum number of toasts to show\n}\n\nexport function ToastProvider({\n children,\n defaultDuration = 5000,\n maxToasts = 5,\n}: ToastProviderProps) {\n const [toasts, setToasts] = useState<Toast[]>([]);\n\n const addToast = useCallback(\n (toast: Omit<Toast, \"id\">): string => {\n const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\n const newToast: Toast = {\n ...toast,\n id,\n duration: toast.duration ?? defaultDuration,\n };\n\n setToasts((prev) => {\n const updated = [newToast, ...prev];\n // Limit number of toasts\n return updated.slice(0, maxToasts);\n });\n\n return id;\n },\n [defaultDuration, maxToasts],\n );\n\n const removeToast = useCallback((id: string) => {\n setToasts((prev) => prev.filter((toast) => toast.id !== id));\n }, []);\n\n const clearAll = useCallback(() => {\n setToasts([]);\n }, []);\n\n const contextValue: ToastContextValue = {\n toasts,\n addToast,\n removeToast,\n clearAll,\n };\n\n return (\n <ToastContext.Provider value={contextValue}>\n {children}\n </ToastContext.Provider>\n );\n}\n","/**\n * PROVIDERS BUNDLE - Turbopack Compatibility\n *\n * This file creates a single module boundary for all providers to prevent\n * Turbopack from code-splitting them incorrectly. All providers are imported\n * and re-exported from this single file, ensuring they're in the same chunk.\n *\n * CRITICAL: This file must be imported before any provider is used to ensure\n * correct initialization order in Turbopack builds.\n */\n\n// Import all providers in dependency order\nimport {\n ThemeProvider,\n type ThemeProviderProps,\n type ThemeContextValue,\n} from \"./ThemeProvider\";\nimport {\n ConfigProvider,\n type ConfigProviderProps,\n type DesignSystemConfig,\n type ConfigContextValue,\n} from \"./ConfigProvider\";\nimport { ToastProvider, type ToastProviderProps } from \"./ToastProvider\";\nimport { DialogProvider, type DialogProviderProps } from \"./DialogProvider\";\nimport { useTheme } from \"./ThemeProvider\";\nimport { useConfig } from \"./ConfigProvider\";\nimport {\n useToastContext,\n useToastContextOptional,\n type Toast,\n type ToastContextValue,\n type ToastVariant,\n} from \"./ToastContext\";\nimport {\n useDialogContext,\n useDialogContextOptional,\n type DialogContextValue,\n} from \"./DialogContext\";\nimport { ToastContext } from \"./ToastContext\";\nimport { DialogContext } from \"./DialogContext\";\n\n/**\n * Providers Bundle Object\n *\n * This object ensures all providers are referenced together, creating a\n * module boundary that Turbopack cannot break. By accessing providers\n * through this object, we guarantee they're all in the same chunk.\n */\nexport const ProvidersBundle = {\n ThemeProvider,\n ConfigProvider,\n ToastProvider,\n DialogProvider,\n // Contexts\n ToastContext,\n DialogContext,\n // Hooks\n useTheme,\n useConfig,\n useToastContext,\n useToastContextOptional,\n useDialogContext,\n useDialogContextOptional,\n} as const;\n\n// Re-export all providers individually for convenience\nexport {\n ThemeProvider,\n ConfigProvider,\n ToastProvider,\n DialogProvider,\n useTheme,\n useConfig,\n useToastContext,\n useToastContextOptional,\n useDialogContext,\n useDialogContextOptional,\n ToastContext,\n DialogContext,\n};\n\n// Re-export types\nexport type {\n ThemeProviderProps,\n ThemeContextValue,\n ConfigProviderProps,\n DesignSystemConfig,\n ConfigContextValue,\n ToastProviderProps,\n DialogProviderProps,\n Toast,\n ToastContextValue,\n ToastVariant,\n DialogContextValue,\n};\n","\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport { type ReactNode, useMemo } from \"react\";\n\n/**\n * STRUCTURAL SOLUTION: Module Boundary Isolation with Explicit Initialization\n *\n * This solution ensures providers are initialized in the correct order by:\n * 1. Using a single atomic function that references all providers\n * 2. Ensuring all providers are in the same module boundary (no code splitting)\n * 3. Using explicit initialization order that cannot be broken by bundler\n *\n * The key: All provider references are in a single function execution context,\n * creating a module boundary that the bundler cannot break.\n */\n\n/**\n * TURBOPACK COMPATIBILITY: Import all providers from a single bundle\n *\n * By importing all providers from providers-bundle.ts, we ensure they're\n * all in the same module boundary. This prevents Turbopack from code-splitting\n * them incorrectly, which causes initialization order issues.\n */\nimport {\n ProvidersBundle,\n type ThemeProviderProps,\n type ConfigProviderProps,\n type ToastProviderProps,\n type DialogProviderProps,\n} from \"./providers-bundle\";\n\n/**\n * Provider Initialization Guard\n *\n * Use ProvidersBundle to ensure all providers are in the same module boundary.\n * This prevents Turbopack from code-splitting providers incorrectly.\n */\nconst PROVIDER_INITIALIZATION_GUARD = ProvidersBundle;\n\n/**\n * AppProvider Configuration\n */\nexport interface AppProviderConfig {\n theme?: Omit<ThemeProviderProps, \"children\">;\n config?: Omit<ConfigProviderProps, \"children\">;\n toast?: Omit<ToastProviderProps, \"children\">;\n dialog?: Omit<DialogProviderProps, \"children\">;\n providers?: {\n theme?: boolean;\n config?: boolean;\n toast?: boolean;\n dialog?: boolean;\n };\n}\n\nexport interface AppProviderProps {\n children: ReactNode;\n config?: AppProviderConfig;\n}\n\n/**\n * Create provider stack with guaranteed initialization order\n *\n * This function uses the PROVIDER_INITIALIZATION_GUARD to ensure\n * all providers are initialized in the correct order. The guard object\n * creates a module boundary that prevents code splitting.\n */\nfunction createProviderStack(\n children: ReactNode,\n config: AppProviderConfig | undefined,\n): ReactNode {\n const {\n theme: themeConfig,\n config: configConfig,\n toast: toastConfig,\n dialog: dialogConfig,\n providers = {\n theme: true,\n config: true,\n toast: true,\n dialog: true,\n },\n } = config || {};\n\n // CRITICAL: Use providers from the guard object\n // This ensures they're all in the same module boundary\n // The bundler cannot code-split or reorder code within this function\n\n let content: ReactNode = children;\n\n // Step 1: DialogProvider (most specific, wraps content)\n if (providers.dialog) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.DialogProvider {...dialogConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.DialogProvider>\n );\n }\n\n // Step 2: ToastProvider (component-level, wraps content)\n if (providers.toast) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ToastProvider {...toastConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ToastProvider>\n );\n }\n\n // Step 3: ConfigProvider (design system config, wraps content)\n if (providers.config) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ConfigProvider {...configConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ConfigProvider>\n );\n }\n\n // Step 4: ThemeProvider (foundation, wraps everything) - MUST BE LAST\n if (providers.theme) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ThemeProvider {...themeConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ThemeProvider>\n );\n }\n\n return content;\n}\n\n/**\n * AppProvider Component\n *\n * Root provider that composes all global providers of the design system.\n * Uses module boundary isolation to ensure correct initialization order.\n *\n * Provider Hierarchy:\n * ```\n * AppProvider (Root)\n * ├── ThemeProvider (Design System Theme) - Foundation\n * ├── ConfigProvider (Design System Config)\n * └── ComponentProviders (optional, per feature)\n * ├── ToastProvider\n * └── DialogProvider\n * ```\n *\n * @example\n * ```tsx\n * <AppProvider>\n * <App />\n * </AppProvider>\n * ```\n *\n * @example With custom configuration\n * ```tsx\n * <AppProvider config={{\n * theme: { defaultTheme: 'dark' },\n * config: { config: { features: { debug: true } } },\n * toast: { maxToasts: 10 }\n * }}>\n * <App />\n * </AppProvider>\n * ```\n */\nexport function AppProvider({ children, config }: AppProviderProps) {\n // Use useMemo to ensure provider stack is created once\n // This prevents React from re-evaluating and ensures stable reference\n const providerStack = useMemo(\n () => createProviderStack(children, config),\n [children, config],\n );\n\n return <>{providerStack}</>;\n}\n\n/**\n * Hook to access AppProvider context\n *\n * This is a convenience hook that provides access to all provider contexts.\n * Individual hooks (useTheme, useConfig, etc.) should be used for specific contexts.\n */\nexport function useApp() {\n // This hook can be extended in the future to provide unified access\n // For now, use individual hooks: useTheme(), useConfig(), etc.\n return {\n // Placeholder for future unified API\n };\n}\n"],"names":["ThemeContext","createContext","ThemeProvider","children","defaultTheme","storageKey","theme","setThemeState","useState","stored","error","useEffect","toggleTheme","prev","setTheme","newTheme","colors","SEMANTIC_COLORS_LIGHT","SEMANTIC_COLORS_DARK","value","jsx","useTheme","context","useContext","defaultConfig","BREAKPOINT_TOKENS","SPACING_TOKENS","TYPOGRAPHY_TOKENS","ANIMATION_TOKENS","ConfigContext","ConfigProvider","customConfig","_strategy","config","useMemo","baseConfig","__spreadValues","__spreadProps","getSpacing","scale","getBreakpoint","name","isFeatureEnabled","feature","_a","updateConfig","_updates","useConfig","ToastProvider","defaultDuration","maxToasts","toasts","setToasts","addToast","useCallback","toast","id","newToast","removeToast","clearAll","contextValue","ToastContext","ProvidersBundle","DialogProvider","PROVIDER_INITIALIZATION_GUARD","createProviderStack","themeConfig","configConfig","toastConfig","dialogConfig","providers","content","AppProvider","providerStack","useApp"],"mappings":"ooBA0BMA,EAAeC,EAAAA,cAA6C,MAAS,EAsBpE,SAASC,EAAc,CAC5B,SAAAC,EACA,aAAAC,EAAe,QACf,WAAAC,EAAa,OACf,EAAuB,CACrB,KAAM,CAACC,EAAOC,CAAa,EAAIC,EAAAA,SAAoB,IAAM,CACvD,GAAI,OAAO,QAAW,YACpB,OAAOJ,EAGT,GAAI,CACF,MAAMK,EAAS,aAAa,QAAQJ,CAAU,EAC9C,GAAII,IAAW,SAAWA,IAAW,OACnC,OAAOA,CAEX,OAASC,EAAO,CACd,QAAQ,KAAK,0CAA2CA,CAAK,CAC/D,CAEA,OAAON,CACT,CAAC,EAEDO,EAAAA,UAAU,IAAM,CAEd,GAAI,OAAO,QAAW,YAItB,IAAI,CACF,aAAa,QAAQN,EAAYC,C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O,GACP,OAAQ,GACR,MAAO,GACP,OAAQ,EAAA,CACV,EACErC,GAAU,CAAA,EAMd,IAAIsC,EAAqBpE,EAGzB,OAAImE,EAAU,SACZC,0BACGP,EAA8B,eAA9B3B,EAAAD,EAAA,GAAiDiC,GAAjD,CACE,SAAAE,GACH,GAKAD,EAAU,QACZC,0BACGP,EAA8B,cAA9B3B,EAAAD,EAAA,GAAgDgC,GAAhD,CACE,SAAAG,GACH,GAKAD,EAAU,SACZC,0BACGP,EAA8B,eAA9B3B,EAAAD,EAAA,GAAiD+B,GAAjD,CACE,SAAAI,GACH,GAKAD,EAAU,QACZC,0BACGP,EAA8B,cAA9B3B,EAAAD,EAAA,GAAgD8B,GAAhD,CACE,SAAAK,GACH,GAIGA,CACT,CAoCO,SAASC,EAAY,CAAE,SAAArE,EAAU,OAAA8B,GAA4B,CAGlE,MAAMwC,EAAgBvC,EAAAA,QACpB,IAAM+B,EAAoB9D,EAAU8B,CAAM,EAC1C,CAAC9B,EAAU8B,CAAM,CAAA,EAGnB,6DAAU,SAAAwC,CAAA,CAAc,CAC1B,CAQO,SAASC,GAAS,CAGvB,MAAO,CAAA,CAGT"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/ui/providers/ThemeProvider.tsx","../src/ui/providers/ConfigProvider.tsx","../src/ui/providers/ToastProvider.tsx","../src/ui/providers/providers-bundle.ts","../src/ui/providers/AppProvider.tsx"],"sourcesContent":["\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport {\n createContext,\n useContext,\n useEffect,\n useState,\n type ReactNode,\n} from \"react\";\nimport {\n SEMANTIC_COLORS_LIGHT,\n SEMANTIC_COLORS_DARK,\n type SemanticColorName,\n type SemanticColor,\n} from \"../tokens/colors/index\";\nimport type { ThemeMode } from \"../tokens\";\n\nexport interface ThemeContextValue {\n theme: ThemeMode;\n toggleTheme: () => void;\n setTheme: (theme: ThemeMode) => void;\n colors: Record<SemanticColorName, SemanticColor>;\n isDark: boolean;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | undefined>(undefined);\n\nexport interface ThemeProviderProps {\n children: ReactNode;\n defaultTheme?: ThemeMode;\n storageKey?: string;\n}\n\n/**\n * ThemeProvider Component\n *\n * Provides theme context to the application.\n * Uses Strategy Pattern for different theme strategies (light, dark).\n * Uses Observer Pattern to notify components about theme changes.\n *\n * @example\n * ```tsx\n * <ThemeProvider defaultTheme=\"light\">\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = \"light\",\n storageKey = \"theme\",\n}: ThemeProviderProps) {\n const [theme, setThemeState] = useState<ThemeMode>(() => {\n if (typeof window === \"undefined\") {\n return defaultTheme;\n }\n\n try {\n const stored = localStorage.getItem(storageKey);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n } catch (error) {\n console.warn(\"Failed to read theme from localStorage:\", error);\n }\n\n return defaultTheme;\n });\n\n useEffect(() => {\n // Only run in browser (SSR-safe)\n if (typeof window === \"undefined\") {\n return;\n }\n\n try {\n localStorage.setItem(storageKey, theme);\n } catch (error) {\n console.warn(\"Failed to save theme to localStorage:\", error);\n }\n\n // Apply theme class to document root\n if (typeof document !== \"undefined\") {\n document.documentElement.classList.remove(\"light\", \"dark\");\n document.documentElement.classList.add(theme);\n }\n }, [theme, storageKey]);\n\n const toggleTheme = () => {\n setThemeState((prev) => (prev === \"light\" ? \"dark\" : \"light\"));\n };\n\n const setTheme = (newTheme: ThemeMode) => {\n setThemeState(newTheme);\n };\n\n const colors =\n theme === \"light\" ? SEMANTIC_COLORS_LIGHT : SEMANTIC_COLORS_DARK;\n\n const value: ThemeContextValue = {\n theme,\n toggleTheme,\n setTheme,\n colors,\n isDark: theme === \"dark\",\n };\n\n return (\n <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n );\n}\n\n/**\n * Hook to use theme context\n */\nexport function useTheme(): ThemeContextValue {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n }\n return context;\n}\n","\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport {\n createContext,\n useContext,\n useMemo,\n useEffect,\n type ReactNode,\n} from \"react\";\nimport { SPACING_TOKENS } from \"../tokens/spacing\";\nimport { TYPOGRAPHY_TOKENS } from \"../tokens/typography\";\nimport { BREAKPOINT_TOKENS } from \"../tokens/breakpoints\";\nimport { ANIMATION_TOKENS } from \"../tokens/animations\";\nimport type { BreakpointName, BreakpointToken } from \"../tokens/breakpoints\";\nimport type { SpacingToken } from \"../tokens/spacing\";\n\n/**\n * Design System Configuration\n *\n * Centralizes all design system configuration including:\n * - Breakpoints for responsive design\n * - Design tokens (spacing, typography, colors)\n * - Behavior configurations (animations, transitions)\n * - Feature flags\n */\nexport interface DesignSystemConfig {\n /**\n * Responsive breakpoints\n */\n breakpoints: Record<\n BreakpointName,\n {\n name: BreakpointName;\n minWidth: number;\n px: string;\n rem: string;\n tailwind: string;\n }\n >;\n\n /**\n * Spacing tokens\n */\n spacing: typeof SPACING_TOKENS;\n\n /**\n * Typography tokens\n */\n typography: typeof TYPOGRAPHY_TOKENS;\n\n /**\n * Animation tokens\n */\n animations: typeof ANIMATION_TOKENS;\n\n /**\n * Feature flags\n */\n features: {\n /**\n * Enable reduced motion for accessibility\n */\n reducedMotion?: boolean;\n\n /**\n * Enable high contrast mode\n */\n highContrast?: boolean;\n\n /**\n * Enable debug mode\n */\n debug?: boolean;\n };\n\n /**\n * Behavior configurations\n */\n behavior: {\n /**\n * Default animation duration in ms\n */\n defaultAnimationDuration?: number;\n\n /**\n * Default transition duration in ms\n */\n defaultTransitionDuration?: number;\n\n /**\n * Enable focus visible outline\n */\n focusVisible?: boolean;\n };\n}\n\n/**\n * Default design system configuration\n */\nconst defaultConfig: DesignSystemConfig = {\n breakpoints: BREAKPOINT_TOKENS,\n spacing: SPACING_TOKENS,\n typography: TYPOGRAPHY_TOKENS,\n animations: ANIMATION_TOKENS,\n features: {\n reducedMotion: false,\n highContrast: false,\n debug: false,\n },\n behavior: {\n defaultAnimationDuration: 200,\n defaultTransitionDuration: 150,\n focusVisible: true,\n },\n};\n\nexport interface ConfigContextValue {\n config: DesignSystemConfig;\n /**\n * Get spacing token by scale\n */\n getSpacing: (scale: keyof typeof SPACING_TOKENS) => SpacingToken;\n /**\n * Get breakpoint value\n */\n getBreakpoint: (name: BreakpointName) => BreakpointToken;\n /**\n * Check if feature is enabled\n */\n isFeatureEnabled: (feature: keyof DesignSystemConfig[\"features\"]) => boolean;\n /**\n * Update configuration (for runtime updates)\n */\n updateConfig: (updates: Partial<DesignSystemConfig>) => void;\n}\n\nconst ConfigContext = createContext<ConfigContextValue | undefined>(undefined);\n\nexport interface ConfigProviderProps {\n children: ReactNode;\n /**\n * Custom configuration to override defaults\n */\n config?: Partial<DesignSystemConfig>;\n /**\n * Strategy for configuration (default, custom, theme-based)\n */\n strategy?: \"default\" | \"custom\" | \"theme-based\";\n}\n\n/**\n * ConfigProvider Component\n *\n * Provides design system configuration context to the application.\n * Uses Strategy Pattern for different configuration strategies.\n *\n * @example\n * ```tsx\n * <ConfigProvider config={{ features: { debug: true } }}>\n * <App />\n * </ConfigProvider>\n * ```\n */\nexport function ConfigProvider({\n children,\n config: customConfig,\n strategy: _strategy = \"default\",\n}: ConfigProviderProps) {\n // Merge custom config with defaults\n const config = useMemo<DesignSystemConfig>(() => {\n const baseConfig = { ...defaultConfig };\n\n if (customConfig) {\n return {\n ...baseConfig,\n ...customConfig,\n breakpoints: customConfig.breakpoints || baseConfig.breakpoints,\n spacing: customConfig.spacing || baseConfig.spacing,\n typography: customConfig.typography || baseConfig.typography,\n animations: customConfig.animations || baseConfig.animations,\n features: {\n ...baseConfig.features,\n ...customConfig.features,\n },\n behavior: {\n ...baseConfig.behavior,\n ...customConfig.behavior,\n },\n };\n }\n\n return baseConfig;\n }, [customConfig]);\n\n // Apply reduced motion if enabled (SSR-safe)\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n\n if (config.features.reducedMotion) {\n document.documentElement.style.setProperty(\"--motion-reduce\", \"1\");\n } else {\n document.documentElement.style.removeProperty(\"--motion-reduce\");\n }\n }, [config.features.reducedMotion]);\n\n // Apply high contrast if enabled (SSR-safe)\n useEffect(() => {\n if (typeof document === \"undefined\") {\n return;\n }\n\n if (config.features.highContrast) {\n document.documentElement.classList.add(\"high-contrast\");\n } else {\n document.documentElement.classList.remove(\"high-contrast\");\n }\n }, [config.features.highContrast]);\n\n const getSpacing = useMemo(\n () => (scale: keyof typeof SPACING_TOKENS) => {\n return config.spacing[scale];\n },\n [config.spacing],\n );\n\n const getBreakpoint = useMemo(\n () => (name: BreakpointName) => {\n return config.breakpoints[name];\n },\n [config.breakpoints],\n );\n\n const isFeatureEnabled = useMemo(\n () => (feature: keyof DesignSystemConfig[\"features\"]) => {\n return config.features[feature] ?? false;\n },\n [config.features],\n );\n\n const updateConfig = useMemo(\n () => (_updates: Partial<DesignSystemConfig>) => {\n // This is a placeholder - in a real implementation, you'd use state\n // For now, config is immutable. Future enhancement could add state management.\n console.warn(\n \"ConfigProvider: updateConfig called but config is immutable. Consider using state management for dynamic updates.\",\n );\n },\n [],\n );\n\n const value: ConfigContextValue = {\n config,\n getSpacing,\n getBreakpoint,\n isFeatureEnabled,\n updateConfig,\n };\n\n return (\n <ConfigContext.Provider value={value}>{children}</ConfigContext.Provider>\n );\n}\n\n/**\n * Hook to use config context\n *\n * @throws Error if used outside ConfigProvider\n */\nexport function useConfig(): ConfigContextValue {\n const context = useContext(ConfigContext);\n if (context === undefined) {\n throw new Error(\"useConfig must be used within a ConfigProvider\");\n }\n return context;\n}\n","\"use client\";\n\nimport { useState, useCallback, type ReactNode } from \"react\";\nimport {\n ToastContext,\n type Toast,\n type ToastContextValue,\n} from \"./ToastContext\";\n\nexport interface ToastProviderProps {\n children: ReactNode;\n defaultDuration?: number; // Default auto-dismiss duration in ms\n maxToasts?: number; // Maximum number of toasts to show\n}\n\nexport function ToastProvider({\n children,\n defaultDuration = 5000,\n maxToasts = 5,\n}: ToastProviderProps) {\n const [toasts, setToasts] = useState<Toast[]>([]);\n\n const addToast = useCallback(\n (toast: Omit<Toast, \"id\">): string => {\n const id = `toast-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;\n const newToast: Toast = {\n ...toast,\n id,\n duration: toast.duration ?? defaultDuration,\n };\n\n setToasts((prev) => {\n const updated = [newToast, ...prev];\n // Limit number of toasts\n return updated.slice(0, maxToasts);\n });\n\n return id;\n },\n [defaultDuration, maxToasts],\n );\n\n const removeToast = useCallback((id: string) => {\n setToasts((prev) => prev.filter((toast) => toast.id !== id));\n }, []);\n\n const clearAll = useCallback(() => {\n setToasts([]);\n }, []);\n\n const contextValue: ToastContextValue = {\n toasts,\n addToast,\n removeToast,\n clearAll,\n };\n\n return (\n <ToastContext.Provider value={contextValue}>\n {children}\n </ToastContext.Provider>\n );\n}\n","/**\n * PROVIDERS BUNDLE - Turbopack Compatibility\n *\n * This file creates a single module boundary for all providers to prevent\n * Turbopack from code-splitting them incorrectly. All providers are imported\n * and re-exported from this single file, ensuring they're in the same chunk.\n *\n * CRITICAL: This file must be imported before any provider is used to ensure\n * correct initialization order in Turbopack builds.\n */\n\n// Import all providers in dependency order\nimport {\n ThemeProvider,\n type ThemeProviderProps,\n type ThemeContextValue,\n} from \"./ThemeProvider\";\nimport {\n ConfigProvider,\n type ConfigProviderProps,\n type DesignSystemConfig,\n type ConfigContextValue,\n} from \"./ConfigProvider\";\nimport { ToastProvider, type ToastProviderProps } from \"./ToastProvider\";\nimport { DialogProvider, type DialogProviderProps } from \"./DialogProvider\";\nimport { useTheme } from \"./ThemeProvider\";\nimport { useConfig } from \"./ConfigProvider\";\nimport {\n useToastContext,\n useToastContextOptional,\n type Toast,\n type ToastContextValue,\n type ToastVariant,\n} from \"./ToastContext\";\nimport {\n useDialogContext,\n useDialogContextOptional,\n type DialogContextValue,\n} from \"./DialogContext\";\nimport { ToastContext } from \"./ToastContext\";\nimport { DialogContext } from \"./DialogContext\";\n\n/**\n * Providers Bundle Object\n *\n * This object ensures all providers are referenced together, creating a\n * module boundary that Turbopack cannot break. By accessing providers\n * through this object, we guarantee they're all in the same chunk.\n */\nexport const ProvidersBundle = {\n ThemeProvider,\n ConfigProvider,\n ToastProvider,\n DialogProvider,\n // Contexts\n ToastContext,\n DialogContext,\n // Hooks\n useTheme,\n useConfig,\n useToastContext,\n useToastContextOptional,\n useDialogContext,\n useDialogContextOptional,\n} as const;\n\n// Re-export all providers individually for convenience\nexport {\n ThemeProvider,\n ConfigProvider,\n ToastProvider,\n DialogProvider,\n useTheme,\n useConfig,\n useToastContext,\n useToastContextOptional,\n useDialogContext,\n useDialogContextOptional,\n ToastContext,\n DialogContext,\n};\n\n// Re-export types\nexport type {\n ThemeProviderProps,\n ThemeContextValue,\n ConfigProviderProps,\n DesignSystemConfig,\n ConfigContextValue,\n ToastProviderProps,\n DialogProviderProps,\n Toast,\n ToastContextValue,\n ToastVariant,\n DialogContextValue,\n};\n","\"use client\";\n\n/* eslint-disable react-refresh/only-export-components */\nimport { type ReactNode, useMemo } from \"react\";\n\n/**\n * STRUCTURAL SOLUTION: Module Boundary Isolation with Explicit Initialization\n *\n * This solution ensures providers are initialized in the correct order by:\n * 1. Using a single atomic function that references all providers\n * 2. Ensuring all providers are in the same module boundary (no code splitting)\n * 3. Using explicit initialization order that cannot be broken by bundler\n *\n * The key: All provider references are in a single function execution context,\n * creating a module boundary that the bundler cannot break.\n */\n\n/**\n * TURBOPACK COMPATIBILITY: Import all providers from a single bundle\n *\n * By importing all providers from providers-bundle.ts, we ensure they're\n * all in the same module boundary. This prevents Turbopack from code-splitting\n * them incorrectly, which causes initialization order issues.\n */\nimport {\n ProvidersBundle,\n type ThemeProviderProps,\n type ConfigProviderProps,\n type ToastProviderProps,\n type DialogProviderProps,\n} from \"./providers-bundle\";\n\n/**\n * Provider Initialization Guard\n *\n * Use ProvidersBundle to ensure all providers are in the same module boundary.\n * This prevents Turbopack from code-splitting providers incorrectly.\n */\nconst PROVIDER_INITIALIZATION_GUARD = ProvidersBundle;\n\n/**\n * AppProvider Configuration\n */\nexport interface AppProviderConfig {\n theme?: Omit<ThemeProviderProps, \"children\">;\n config?: Omit<ConfigProviderProps, \"children\">;\n toast?: Omit<ToastProviderProps, \"children\">;\n dialog?: Omit<DialogProviderProps, \"children\">;\n providers?: {\n theme?: boolean;\n config?: boolean;\n toast?: boolean;\n dialog?: boolean;\n };\n}\n\nexport interface AppProviderProps {\n children: ReactNode;\n config?: AppProviderConfig;\n}\n\n/**\n * Create provider stack with guaranteed initialization order\n *\n * This function uses the PROVIDER_INITIALIZATION_GUARD to ensure\n * all providers are initialized in the correct order. The guard object\n * creates a module boundary that prevents code splitting.\n */\nfunction createProviderStack(\n children: ReactNode,\n config: AppProviderConfig | undefined,\n): ReactNode {\n const {\n theme: themeConfig,\n config: configConfig,\n toast: toastConfig,\n dialog: dialogConfig,\n providers = {\n theme: true,\n config: true,\n toast: true,\n dialog: true,\n },\n } = config || {};\n\n // CRITICAL: Use providers from the guard object\n // This ensures they're all in the same module boundary\n // The bundler cannot code-split or reorder code within this function\n\n let content: ReactNode = children;\n\n // Step 1: DialogProvider (most specific, wraps content)\n if (providers.dialog) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.DialogProvider {...dialogConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.DialogProvider>\n );\n }\n\n // Step 2: ToastProvider (component-level, wraps content)\n if (providers.toast) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ToastProvider {...toastConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ToastProvider>\n );\n }\n\n // Step 3: ConfigProvider (design system config, wraps content)\n if (providers.config) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ConfigProvider {...configConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ConfigProvider>\n );\n }\n\n // Step 4: ThemeProvider (foundation, wraps everything) - MUST BE LAST\n if (providers.theme) {\n content = (\n <PROVIDER_INITIALIZATION_GUARD.ThemeProvider {...themeConfig}>\n {content}\n </PROVIDER_INITIALIZATION_GUARD.ThemeProvider>\n );\n }\n\n return content;\n}\n\n/**\n * AppProvider Component\n *\n * Root provider that composes all global providers of the design system.\n * Uses module boundary isolation to ensure correct initialization order.\n *\n * Provider Hierarchy:\n * ```\n * AppProvider (Root)\n * ├── ThemeProvider (Design System Theme) - Foundation\n * ├── ConfigProvider (Design System Config)\n * └── ComponentProviders (optional, per feature)\n * ├── ToastProvider\n * └── DialogProvider\n * ```\n *\n * @example\n * ```tsx\n * <AppProvider>\n * <App />\n * </AppProvider>\n * ```\n *\n * @example With custom configuration\n * ```tsx\n * <AppProvider config={{\n * theme: { defaultTheme: 'dark' },\n * config: { config: { features: { debug: true } } },\n * toast: { maxToasts: 10 }\n * }}>\n * <App />\n * </AppProvider>\n * ```\n */\nexport function AppProvider({ children, config }: AppProviderProps) {\n // Use useMemo to ensure provider stack is created once\n // This prevents React from re-evaluating and ensures stable reference\n const providerStack = useMemo(\n () => createProviderStack(children, config),\n [children, config],\n );\n\n return <>{providerStack}</>;\n}\n\n/**\n * Hook to access AppProvider context\n *\n * This is a convenience hook that provides access to all provider contexts.\n * Individual hooks (useTheme, useConfig, etc.) should be used for specific contexts.\n */\nexport function useApp() {\n // This hook can be extended in the future to provide unified access\n // For now, use individual hooks: useTheme(), useConfig(), etc.\n return {\n // Placeholder for future unified API\n };\n}\n"],"names":["ThemeContext","createContext","ThemeProvider","children","defaultTheme","storageKey","theme","setThemeState","useState","stored","error","useEffect","toggleTheme","prev","setTheme","newTheme","colors","SEMANTIC_COLORS_LIGHT","SEMANTIC_COLORS_DARK","value","jsx","useTheme","context","useContext","defaultConfig","BREAKPOINT_TOKENS","SPACING_TOKENS","TYPOGRAPHY_TOKENS","ANIMATION_TOKENS","ConfigContext","ConfigProvider","customConfig","_strategy","config","useMemo","baseConfig","__spreadValues","__spreadProps","getSpacing","scale","getBreakpoint","name","isFeatureEnabled","feature","_a","updateConfig","_updates","useConfig","ToastProvider","defaultDuration","maxToasts","toasts","setToasts","addToast","useCallback","toast","id","newToast","removeToast","clearAll","contextValue","ToastContext","ProvidersBundle","DialogProvider","PROVIDER_INITIALIZATION_GUARD","createProviderStack","themeConfig","configConfig","toastConfig","dialogConfig","providers","content","AppProvider","providerStack","useApp"],"mappings":"ioBA0BMA,EAAeC,EAAAA,cAA6C,MAAS,EAsBpE,SAASC,EAAc,CAC5B,SAAAC,EACA,aAAAC,EAAe,QACf,WAAAC,EAAa,OACf,EAAuB,CACrB,KAAM,CAACC,EAAOC,CAAa,EAAIC,EAAAA,SAAoB,IAAM,CACvD,GAAI,OAAO,QAAW,YACpB,OAAOJ,EAGT,GAAI,CACF,MAAMK,EAAS,aAAa,QAAQJ,CAAU,EAC9C,GAAII,IAAW,SAAWA,IAAW,OACnC,OAAOA,CAEX,OAASC,EAAO,CACd,QAAQ,KAAK,0CAA2CA,CAAK,CAC/D,CAEA,OAAON,CACT,CAAC,EAEDO,EAAAA,UAAU,IAAM,CAEd,GAAI,OAAO,QAAW,YAItB,IAAI,CACF,aAAa,QAAQN,EAAYC,CAAK,CACxC,OAASI,EAAO,CACd,QAAQ,KAAK,wCAAyCA,CAAK,CAC7D,CAGI,OAAO,UAAa,cACtB,SAAS,gBAAgB,UAAU,OAAO,QAAS,MAAM,EACzD,SAAS,gBAAgB,UAAU,IAAIJ,CAAK,GAEhD,EAAG,CAACA,EAAOD,CAAU,CAAC,EAEtB,MAAMO,EAAc,IAAM,CACxBL,EAAeM,GAAUA,IAAS,QAAU,OAAS,OAAQ,CAC/D,EAEMC,EAAYC,GAAwB,CACxCR,EAAcQ,CAAQ,CACxB,EAEMC,EACJV,IAAU,QAAUW,EAAAA,sBAAwBC,EAAAA,qBAExCC,EAA2B,CAC/B,MAAAb,EACA,YAAAM,EACA,SAAAE,EACA,OAAAE,EACA,OAAQV,IAAU,MAAA,EAGpB,OACEc,EAAAA,kBAAAA,IAACpB,EAAa,SAAb,CAAsB,MAAAmB,EAAe,SAAAhB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