elseware-ui 2.17.2 → 2.17.3
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.
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface CloudinaryConfig {
|
|
2
|
+
cloudName: string;
|
|
3
|
+
}
|
|
4
|
+
export declare const CloudinaryProvider: ({ cloudName, children, }: CloudinaryConfig & {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const useCloudinaryConfig: () => CloudinaryConfig;
|
|
8
|
+
export {};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import CloudinaryImage from "./CloudinaryImage";
|
|
2
|
-
|
|
2
|
+
import { CloudinaryProvider } from "./CloudinaryProvider";
|
|
3
|
+
import { useCloudinaryConfig } from "./CloudinaryProvider";
|
|
4
|
+
export { CloudinaryImage, CloudinaryProvider, useCloudinaryConfig };
|
package/build/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment as Fragment$3 } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { forwardRef, useRef, useEffect, useState, createContext as createContext$1, createRef, PureComponent, Fragment as Fragment$4, useMemo as useMemo$1,
|
|
3
|
+
import React__default, { forwardRef, useRef, useEffect, useState, createContext as createContext$1, createRef, PureComponent, Fragment as Fragment$4, useContext, useMemo as useMemo$1, useImperativeHandle, createElement, Children, useCallback as useCallback$1, useLayoutEffect, Component, useSyncExternalStore, isValidElement, cloneElement, memo as memo$1, useId as useId$1, useInsertionEffect as useInsertionEffect$1, useReducer, Suspense as Suspense$3 } from 'react';
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default, { unstable_batchedUpdates, flushSync, createPortal } from 'react-dom';
|
|
6
6
|
|
|
@@ -31107,21 +31107,25 @@ Video.defaultProps = {
|
|
|
31107
31107
|
type: PropTypes.string
|
|
31108
31108
|
});
|
|
31109
31109
|
|
|
31110
|
-
var
|
|
31110
|
+
var CloudinaryContextConfig = createContext$1(null);
|
|
31111
|
+
var CloudinaryProvider = function (_a) {
|
|
31112
|
+
var cloudName = _a.cloudName, children = _a.children;
|
|
31113
|
+
return (jsx(CloudinaryContextConfig.Provider, __assign$1({ value: { cloudName: cloudName } }, { children: children })));
|
|
31114
|
+
};
|
|
31115
|
+
var useCloudinaryConfig = function () {
|
|
31116
|
+
var ctx = useContext(CloudinaryContextConfig);
|
|
31117
|
+
if (!ctx) {
|
|
31118
|
+
throw new Error("CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />");
|
|
31119
|
+
}
|
|
31120
|
+
return ctx;
|
|
31121
|
+
};
|
|
31122
|
+
|
|
31123
|
+
var DEFAULT_PUBLIC_CLOUD = "demo";
|
|
31111
31124
|
function CloudinaryImage(_a) {
|
|
31112
|
-
var _b,
|
|
31113
|
-
var
|
|
31114
|
-
var resolvedCloudName = cloudName ||
|
|
31115
|
-
|
|
31116
|
-
(typeof import.meta !== "undefined" &&
|
|
31117
|
-
((_b = import.meta.env) === null || _b === void 0 ? void 0 : _b.VITE_CLOUDINARY_NAME)) ||
|
|
31118
|
-
// CRA / Node-style env: process.env.REACT_APP_CLOUDINARY_NAME
|
|
31119
|
-
(typeof process !== "undefined" &&
|
|
31120
|
-
((_c = process.env) === null || _c === void 0 ? void 0 : _c.REACT_APP_CLOUDINARY_NAME)) ||
|
|
31121
|
-
// ✅ Final fallback for Storybook / demos
|
|
31122
|
-
DEFAULT_PUBLIC_CLOUD;
|
|
31123
|
-
var resolvedPublicId = publicId || "sample"; // "sample" exists in the demo cloud
|
|
31124
|
-
return (jsx(CloudinaryContext, __assign$1({ cloudName: resolvedCloudName }, { children: jsx(Image$2, { publicId: resolvedPublicId, secure: secure, alt: alt, className: styles }) })));
|
|
31125
|
+
var publicId = _a.publicId, cloudName = _a.cloudName, _b = _a.secure, secure = _b === void 0 ? true : _b, alt = _a.alt, styles = _a.styles;
|
|
31126
|
+
var providerConfig = useCloudinaryConfig();
|
|
31127
|
+
var resolvedCloudName = cloudName || (providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.cloudName) || DEFAULT_PUBLIC_CLOUD;
|
|
31128
|
+
return (jsx(CloudinaryContext, __assign$1({ cloudName: resolvedCloudName }, { children: jsx(Image$2, { publicId: publicId || "sample", secure: secure, alt: alt, className: styles }) })));
|
|
31125
31129
|
}
|
|
31126
31130
|
|
|
31127
31131
|
var Image$1 = function (_a) {
|
|
@@ -140797,4 +140801,4 @@ function SidemenuLayout(_a) {
|
|
|
140797
140801
|
}) }, { children: [jsx("div", __assign$1({ className: "col-span-2 mb-10" }, { children: jsx(Menu, { data: data }) })), jsx("div", __assign$1({ className: "w-full col-span-5" }, { children: jsx("div", __assign$1({ className: "px-5 py-3" }, { children: children })) }))] })) }));
|
|
140798
140802
|
}
|
|
140799
140803
|
|
|
140800
|
-
export { Accordion, AsyncComponentWrapper, Avatar, Backdrop, Badge, BarChart, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, Button$2 as Button, Card, CardContent, CardFooter, CardHeader, Chapter, Checkbox, Chip, CloudinaryImage, CloudinaryVideo, Content$2 as Content, ContentArea, DateSelector, DefaultLayout, Drawer, DrawerToggler, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, GenericLayout, GlowWrapper, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, Image$1 as Image, ImageInput, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Layout, LineChart, Link, List, ListItem, MarkdownEditor, MarkdownViewer, Menu, MenuGroup, MenuItem, MenuItemTitle, Modal, MultiImageInput, Paragraph, PieChart, PriceTag, Quote, Radio, RouteTab, RouteTabs, Section, Select$2 as Select, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, Skeleton, Slider, StarRating, StarRatingDistribution, StarRatingInput, Switch, Table, Tag, Tags, TextArea, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, Toast, Tooltip$1 as Tooltip, Transition$1 as Transition, TransitionDropdown, TransitionFadeIn, Typography, UnderConstructionBanner, ValueBadge, WorldMap, WorldMapCountryTable, YoutubeVideoPlayer, getCurrencySymbol, sendToast, useClickOutside, useCurrentTheme, useDrawer, useIsMobile, useModal, useTheme };
|
|
140804
|
+
export { Accordion, AsyncComponentWrapper, Avatar, Backdrop, Badge, BarChart, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, Button$2 as Button, Card, CardContent, CardFooter, CardHeader, Chapter, Checkbox, Chip, CloudinaryImage, CloudinaryProvider, CloudinaryVideo, Content$2 as Content, ContentArea, DateSelector, DefaultLayout, Drawer, DrawerToggler, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, GenericLayout, GlowWrapper, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, Image$1 as Image, ImageInput, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Layout, LineChart, Link, List, ListItem, MarkdownEditor, MarkdownViewer, Menu, MenuGroup, MenuItem, MenuItemTitle, Modal, MultiImageInput, Paragraph, PieChart, PriceTag, Quote, Radio, RouteTab, RouteTabs, Section, Select$2 as Select, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, Skeleton, Slider, StarRating, StarRatingDistribution, StarRatingInput, Switch, Table, Tag, Tags, TextArea, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, Toast, Tooltip$1 as Tooltip, Transition$1 as Transition, TransitionDropdown, TransitionFadeIn, Typography, UnderConstructionBanner, ValueBadge, WorldMap, WorldMapCountryTable, YoutubeVideoPlayer, getCurrencySymbol, sendToast, useClickOutside, useCloudinaryConfig, useCurrentTheme, useDrawer, useIsMobile, useModal, useTheme };
|
package/build/index.js
CHANGED
|
@@ -31134,21 +31134,25 @@ Video.defaultProps = {
|
|
|
31134
31134
|
type: PropTypes.string
|
|
31135
31135
|
});
|
|
31136
31136
|
|
|
31137
|
-
var
|
|
31137
|
+
var CloudinaryContextConfig = React.createContext(null);
|
|
31138
|
+
var CloudinaryProvider = function (_a) {
|
|
31139
|
+
var cloudName = _a.cloudName, children = _a.children;
|
|
31140
|
+
return (jsxRuntime.jsx(CloudinaryContextConfig.Provider, __assign$1({ value: { cloudName: cloudName } }, { children: children })));
|
|
31141
|
+
};
|
|
31142
|
+
var useCloudinaryConfig = function () {
|
|
31143
|
+
var ctx = React.useContext(CloudinaryContextConfig);
|
|
31144
|
+
if (!ctx) {
|
|
31145
|
+
throw new Error("CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />");
|
|
31146
|
+
}
|
|
31147
|
+
return ctx;
|
|
31148
|
+
};
|
|
31149
|
+
|
|
31150
|
+
var DEFAULT_PUBLIC_CLOUD = "demo";
|
|
31138
31151
|
function CloudinaryImage(_a) {
|
|
31139
|
-
var _b,
|
|
31140
|
-
var
|
|
31141
|
-
var resolvedCloudName = cloudName ||
|
|
31142
|
-
|
|
31143
|
-
(typeof ({ url: (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || new URL('index.js', document.baseURI).href)) }) !== "undefined" &&
|
|
31144
|
-
((_b = undefined) === null || _b === void 0 ? void 0 : _b.VITE_CLOUDINARY_NAME)) ||
|
|
31145
|
-
// CRA / Node-style env: process.env.REACT_APP_CLOUDINARY_NAME
|
|
31146
|
-
(typeof process !== "undefined" &&
|
|
31147
|
-
((_c = process.env) === null || _c === void 0 ? void 0 : _c.REACT_APP_CLOUDINARY_NAME)) ||
|
|
31148
|
-
// ✅ Final fallback for Storybook / demos
|
|
31149
|
-
DEFAULT_PUBLIC_CLOUD;
|
|
31150
|
-
var resolvedPublicId = publicId || "sample"; // "sample" exists in the demo cloud
|
|
31151
|
-
return (jsxRuntime.jsx(CloudinaryContext, __assign$1({ cloudName: resolvedCloudName }, { children: jsxRuntime.jsx(Image$2, { publicId: resolvedPublicId, secure: secure, alt: alt, className: styles }) })));
|
|
31152
|
+
var publicId = _a.publicId, cloudName = _a.cloudName, _b = _a.secure, secure = _b === void 0 ? true : _b, alt = _a.alt, styles = _a.styles;
|
|
31153
|
+
var providerConfig = useCloudinaryConfig();
|
|
31154
|
+
var resolvedCloudName = cloudName || (providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.cloudName) || DEFAULT_PUBLIC_CLOUD;
|
|
31155
|
+
return (jsxRuntime.jsx(CloudinaryContext, __assign$1({ cloudName: resolvedCloudName }, { children: jsxRuntime.jsx(Image$2, { publicId: publicId || "sample", secure: secure, alt: alt, className: styles }) })));
|
|
31152
31156
|
}
|
|
31153
31157
|
|
|
31154
31158
|
var Image$1 = function (_a) {
|
|
@@ -140844,6 +140848,7 @@ exports.Chapter = Chapter;
|
|
|
140844
140848
|
exports.Checkbox = Checkbox;
|
|
140845
140849
|
exports.Chip = Chip;
|
|
140846
140850
|
exports.CloudinaryImage = CloudinaryImage;
|
|
140851
|
+
exports.CloudinaryProvider = CloudinaryProvider;
|
|
140847
140852
|
exports.CloudinaryVideo = CloudinaryVideo;
|
|
140848
140853
|
exports.Content = Content$2;
|
|
140849
140854
|
exports.ContentArea = ContentArea;
|
|
@@ -140936,6 +140941,7 @@ exports.YoutubeVideoPlayer = YoutubeVideoPlayer;
|
|
|
140936
140941
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
140937
140942
|
exports.sendToast = sendToast;
|
|
140938
140943
|
exports.useClickOutside = useClickOutside;
|
|
140944
|
+
exports.useCloudinaryConfig = useCloudinaryConfig;
|
|
140939
140945
|
exports.useCurrentTheme = useCurrentTheme;
|
|
140940
140946
|
exports.useDrawer = useDrawer;
|
|
140941
140947
|
exports.useIsMobile = useIsMobile;
|