@wazobiatech/wazui 0.0.12 → 0.0.13
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/.env.sample +18 -18
- package/.env.test +5 -0
- package/CONVERSION_COMPLETE.md +87 -0
- package/ENVIRONMENT.md +230 -0
- package/NEXTJS_GUIDE.md +186 -0
- package/QUICK_START_ENV.md +0 -0
- package/USAGE_EXAMPLES.tsx +76 -0
- package/package.json +3 -10
- package/src/config/env.ts +8 -8
- package/src/config/next.ts +79 -0
- package/src/decorators/ApolloDecorator.tsx +1 -1
- package/src/decorators/DolosApolloDecorator.tsx +1 -1
- package/src/env.ts +48 -93
- package/src/hooks/useMercuryProjectToken.ts +3 -3
- package/src/hooks/useProjectToken.ts +2 -2
- package/src/index.ts +17 -1
- package/src/mocks/env.ts +9 -9
- package/src/providers/EnvironmentProvider/WazUIEnvironmentProvider.tsx +50 -0
- package/src/providers/EnvironmentProvider/context.ts +5 -0
- package/src/providers/EnvironmentProvider/index.ts +5 -0
- package/src/providers/EnvironmentProvider/useWazUIEnvironment.ts +20 -0
- package/src/providers/EnvironmentProvider/utils.ts +122 -0
- package/src/utils/apolloClient.ts +6 -6
- package/src/utils/images.ts +14 -7
- package/storybook-static/assets/ApolloDecorator-DdFdPk9I.js +1 -0
- package/storybook-static/assets/BlogCategoryContent-j1uDZXn7.js +97 -0
- package/storybook-static/assets/BlogCategoryContent.stories-qYKLjb6F.js +9 -0
- package/storybook-static/assets/BlogPostContentComponent-C2AFWOqJ.js +956 -0
- package/storybook-static/assets/BlogPostContentComponent.stories-ZsTapbYf.js +18 -0
- package/storybook-static/assets/BlogPostsComponent.stories-CcjjSusf.js +11 -0
- package/storybook-static/assets/BlogTagContent-BnwuQUSW.js +92 -0
- package/storybook-static/assets/BlogTagContent.stories-BdzlB1N5.js +9 -0
- package/storybook-static/assets/CategoriesComponent.stories-C4qc6J3o.js +7 -0
- package/storybook-static/assets/ClearCacheHistory.stories-BFGJ9Cpr.js +6 -0
- package/storybook-static/assets/Color-YHDXOIA2-uT_23_Qt.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-PYIpRFNk.js +575 -0
- package/storybook-static/assets/DolosApolloDecorator-DEvkQjrM.js +1 -0
- package/storybook-static/assets/FeatureJungle-Light-CFEx0Apr.woff +0 -0
- package/storybook-static/assets/PictureBlot-Ce0f3E3l.js +2 -0
- package/storybook-static/assets/PurgeCache-6QorPr5P.js +5 -0
- package/storybook-static/assets/PurgeCache.stories-9MRRLCNG.js +13 -0
- package/storybook-static/assets/ReactQueryDecorator-CrsXrNQd.js +1 -0
- package/storybook-static/assets/RecipeCategories.stories--J_t5Kqe.js +7 -0
- package/storybook-static/assets/RecipeCategoryContent-PlykHail.js +139 -0
- package/storybook-static/assets/RecipeCategoryContent.stories-kGW7yk1Q.js +9 -0
- package/storybook-static/assets/RecipeContentComponent.stories-BQ8Uxx67.js +18 -0
- package/storybook-static/assets/RecipeTags.stories-C1FTvpsL.js +7 -0
- package/storybook-static/assets/RecipeTagsContent-DS00_2mK.js +18 -0
- package/storybook-static/assets/RecipeTagsContent.stories-BiMSQhz1.js +5 -0
- package/storybook-static/assets/RecipesComponent.stories-CHZ8K6cH.js +9 -0
- package/storybook-static/assets/RedirectContent-CmGN0ktq.js +96 -0
- package/storybook-static/assets/RedirectContent.stories-9_qkEHzb.js +5 -0
- package/storybook-static/assets/RedirectsComponent.stories-CTycXldt.js +8 -0
- package/storybook-static/assets/TagsComponent.stories-DSohzxP0.js +7 -0
- package/storybook-static/assets/TimeAgo-BMs3lst-.js +5 -0
- package/storybook-static/assets/UniversalJungle-420-mm6ugnAQ.woff +0 -0
- package/storybook-static/assets/WazUIBlogComponent.stories-CCXKbbai.js +86 -0
- package/storybook-static/assets/WazUIBlogDashboard-CtU7uRTr.js +162 -0
- package/storybook-static/assets/WazUIBlogDashboard.stories-CqTZ4exx.js +38 -0
- package/storybook-static/assets/WazUIButton.stories-CDWIbKyS.js +59 -0
- package/storybook-static/assets/WazUIDataTable-DnneDnRd.js +22 -0
- package/storybook-static/assets/WazUIPostActions-BZQom1Yt.js +16 -0
- package/storybook-static/assets/WazUiBreadCrumb-BPc3tEqC.js +1 -0
- package/storybook-static/assets/WazUiBreadCrumb.stories-_gNokkDn.js +7 -0
- package/storybook-static/assets/WazUiButton-e06gz3US.js +27 -0
- package/storybook-static/assets/WazUiCreateBlogContent-DxC86Nwl.js +327 -0
- package/storybook-static/assets/WazUiCreateBlogContent.stories-Bzq3YtfW.js +94 -0
- package/storybook-static/assets/WazUiCreateContentPopup.stories-D_9OExPO.js +41 -0
- package/storybook-static/assets/WazUiDataTable.stories-D1Aj3wPk.js +23 -0
- package/storybook-static/assets/WazUiGqlMediaLibrary.stories-Cug9TM1_.js +105 -0
- package/storybook-static/assets/WazUiGqlMediaLibraryPopup.stories-CuwWYcJs.js +53 -0
- package/storybook-static/assets/WazUiInputBox-C2jVcTq2.js +734 -0
- package/storybook-static/assets/WazUiInputBox.stories-Bs1Vb_Rd.js +270 -0
- package/storybook-static/assets/WazUiNavigationBlocker-BrhA3ONc.js +1 -0
- package/storybook-static/assets/WazUiNavigationBlocker.stories-CgqwQbJ9.js +6 -0
- package/storybook-static/assets/WazUiPostCard-bQlmiDOB.js +99 -0
- package/storybook-static/assets/WazUiPostCard.stories-Dir2IwY1.js +9 -0
- package/storybook-static/assets/WazUiWysiwygInput.stories-BDO7EAIa.js +170 -0
- package/storybook-static/assets/WazuiActionModal-Cgw_QqFv.js +11 -0
- package/storybook-static/assets/WazuiActionModal.stories-CFCFlfLU.js +5 -0
- package/storybook-static/assets/WazuiCreateContentPopup-CXVvIFOU.js +130 -0
- package/storybook-static/assets/WazuiImage-BwRWaPkA.js +58 -0
- package/storybook-static/assets/WazuiImage.stories-CxpLgpmg.js +48 -0
- package/storybook-static/assets/button-BxNLA_J_.js +1 -0
- package/storybook-static/assets/calendar-CorT5FcI.js +6 -0
- package/storybook-static/assets/chunk-XP5HYGXS-BpfKkqn7.js +1 -0
- package/storybook-static/assets/emerald-GdtolcHR.svg +9 -0
- package/storybook-static/assets/entry-preview-Chux9cpU.js +2 -0
- package/storybook-static/assets/entry-preview-docs-DviPOtIv.js +46 -0
- package/storybook-static/assets/env-B_s3Ell7.js +1 -0
- package/storybook-static/assets/gold-CtN6pOVZ.svg +9 -0
- package/storybook-static/assets/groups-GzRK9wBi.js +6 -0
- package/storybook-static/assets/hooks-D-wca2rG.js +1 -0
- package/storybook-static/assets/iconBase-B7i_G6Rg.js +1 -0
- package/storybook-static/assets/iframe-DarAeeHv.js +211 -0
- package/storybook-static/assets/index-BAoN7Cmi.js +240 -0
- package/storybook-static/assets/index-BJvHeDRT.js +1 -0
- package/storybook-static/assets/index-BR89vyis.js +6 -0
- package/storybook-static/assets/index-BWnBDfn-.js +9 -0
- package/storybook-static/assets/index-Bqat3xNk.js +1 -0
- package/storybook-static/assets/index-CBYaBgW8.js +9 -0
- package/storybook-static/assets/index-CZ4jztst.js +30 -0
- package/storybook-static/assets/index-CeH2RAp8.js +22 -0
- package/storybook-static/assets/index-DarTc5kA.js +1 -0
- package/storybook-static/assets/index-DgH-xKnr.js +11 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/instagram-DKTomRJ8.svg +9 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/no-data-image-Bhn_PKhS.svg +41 -0
- package/storybook-static/assets/no-image-icon-CjrDvlv3.svg +84 -0
- package/storybook-static/assets/pexels-DrnxyPAE.svg +9 -0
- package/storybook-static/assets/popover-BB1qMQFg.js +76 -0
- package/storybook-static/assets/preview-B8lJiyuQ.js +34 -0
- package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-BaoH-L4j.js +1 -0
- package/storybook-static/assets/preview-C-LZrIW4.js +2 -0
- package/storybook-static/assets/preview-CVgpLj3b.js +1 -0
- package/storybook-static/assets/preview-CvbIS5ZJ.js +1 -0
- package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
- package/storybook-static/assets/preview-DMG083aW.js +240 -0
- package/storybook-static/assets/preview-DoyfkCKF.css +1 -0
- package/storybook-static/assets/preview-TWlugwTp.js +3 -0
- package/storybook-static/assets/provider-Bst_TvlW.js +1 -0
- package/storybook-static/assets/queries-9Km_qMSB.js +125 -0
- package/storybook-static/assets/queries-Bdq7cXa5.js +231 -0
- package/storybook-static/assets/queries-ClywsDTl.js +103 -0
- package/storybook-static/assets/quill-Dex9Y0nc.js +49 -0
- package/storybook-static/assets/react-18-DbMmlWnz.js +25 -0
- package/storybook-static/assets/sapphire-BO-7mqXy.svg +9 -0
- package/storybook-static/assets/test-utils-DxU8HTJE.js +9 -0
- package/storybook-static/assets/upload-image-BZPKKzIo.svg +43 -0
- package/storybook-static/assets/useMercuryProjectToken-BgbQUYG9.js +49 -0
- package/storybook-static/assets/users-ClnJTo4A.js +1 -0
- package/storybook-static/assets/utils-3HBFSLrk.js +2 -0
- package/storybook-static/assets/v4-CtRu48qb.js +1 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +669 -0
- package/storybook-static/index.html +185 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +331 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +51 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +405 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +245 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/onboarding-9/manager-bundle.js +127 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-experimental-addon-test-11/manager-bundle.js +223 -0
- package/storybook-static/sb-addons/themes-12/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +1051 -0
- package/storybook-static/sb-manager/globals-runtime.js +41591 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/vite.config.ts +1 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import{f as E}from"./WazUiInputBox-C2jVcTq2.js";import{D as f,G as w,I as W,C as I,a as A,b as U,c as G,U as S,d as x,e as _}from"./queries-9Km_qMSB.js";import{w as M}from"./DolosApolloDecorator-DEvkQjrM.js";import"./jsx-runtime-D_zvdyIk.js";import"./index-CBYaBgW8.js";import"./useMercuryProjectToken-BgbQUYG9.js";import"./popover-BB1qMQFg.js";import"./button-BxNLA_J_.js";import"./utils-3HBFSLrk.js";import"./index-BJvHeDRT.js";import"./index-BWnBDfn-.js";import"./env-B_s3Ell7.js";import"./provider-Bst_TvlW.js";import"./WazuiActionModal-Cgw_QqFv.js";import"./index-CZ4jztst.js";import"./WazuiImage-BwRWaPkA.js";import"./iconBase-B7i_G6Rg.js";import"./index-BR89vyis.js";import"./WazUiButton-e06gz3US.js";import"./WazUiBreadCrumb-BPc3tEqC.js";import"./WazUIDataTable-DnneDnRd.js";import"./calendar-CorT5FcI.js";import"./iframe-DarAeeHv.js";import"./index-CeH2RAp8.js";const re={title:"Components/WazUiWysiwygInput",component:E,decorators:[M],parameters:{layout:"centered",docs:{description:{component:"A rich text editor component with support for markdown, embeds, and media."}}},tags:["autodocs"],argTypes:{onChange:{description:"Callback when content changes",control:!1},className:{description:"Additional CSS classes",control:"text"},content:{description:"Content",control:"text"},error:{description:"Whether the editor is in an error state",control:"boolean",defaultValue:!1}}},T={query:{query:_,variables:{page:1,count:20,library_uuid:"1d86966e-e893-4e90-8ce3-286eed76e5dc"},dataKey:"getImagesByLibraryUuid"},upload:{query:x,dataKey:"getImagesByLibraryUuid",variables:{}},update:{query:S,dataKey:"getImagesByLibraryUuid"},remove:{query:G,dataKey:"getImagesByLibraryUuid",mutationInvalidateKey:"getImagesByLibraryUuid"},unsplash:{query:U,variables:{},dataKey:"getUnsplashImages"},instagram:{fetch:A,connect:I,integrate:W,variables:{},key:"getImagesByLibraryUuid"},pexels:{query:w,variables:{},dataKey:"getPexelsImages"},download:{query:f,dataKey:"getPexelsImages"}},e={args:{imageGalleryConfig:T}},t={args:{...e.args}},a={args:{...e.args,className:"border-2 border-primary rounded-xl p-4 w-full"}},r={...e,args:{...e.args,error:!0}},n={parameters:{docs:{description:{story:`
|
|
2
|
+
### Basic Usage
|
|
3
|
+
|
|
4
|
+
\`\`\`tsx
|
|
5
|
+
import { WazUiWysiwygInput } from '@wazobia/wazui';
|
|
6
|
+
|
|
7
|
+
function MyEditor() {
|
|
8
|
+
const [value, setValue] = useState({
|
|
9
|
+
title: '',
|
|
10
|
+
content: ''
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const handleChange = ({ name, value }) => {
|
|
14
|
+
setValue(prev => ({
|
|
15
|
+
...prev,
|
|
16
|
+
[name]: value
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<WazUiWysiwygInput
|
|
22
|
+
value={value}
|
|
23
|
+
onChange={handleChange}
|
|
24
|
+
initiateEmbed={(type) => {
|
|
25
|
+
// Handle embed request
|
|
26
|
+
console.log('Embed requested:', type);
|
|
27
|
+
}}
|
|
28
|
+
imageGalleryConfig={yourGalleryConfig}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
### With Context Usage
|
|
35
|
+
|
|
36
|
+
\`\`\`tsx
|
|
37
|
+
import { useWysiwyg, WysiwygProvider } from '@wazobia/wazui';
|
|
38
|
+
|
|
39
|
+
// Create a wrapper component
|
|
40
|
+
function WysiwygWrapper() {
|
|
41
|
+
const [value, setValue] = useState({
|
|
42
|
+
title: '',
|
|
43
|
+
content: ''
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<WysiwygProvider
|
|
48
|
+
initialValue={value}
|
|
49
|
+
onChange={({ name, value }) => {
|
|
50
|
+
setValue(prev => ({...prev, [name]: value}));
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
<MyEditor />
|
|
54
|
+
</WysiwygProvider>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Create a component that uses the context
|
|
59
|
+
function MyEditor() {
|
|
60
|
+
const { state, handleInitiateEmbed } = useWysiwyg();
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div>
|
|
64
|
+
<h2>Current title: {state.title}</h2>
|
|
65
|
+
<button onClick={() => handleInitiateEmbed('image')}>
|
|
66
|
+
Add Image
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
\`\`\`
|
|
72
|
+
`}}}};var o,s,i;e.parameters={...e.parameters,docs:{...(o=e.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
|
73
|
+
args: {
|
|
74
|
+
imageGalleryConfig
|
|
75
|
+
}
|
|
76
|
+
}`,...(i=(s=e.parameters)==null?void 0:s.docs)==null?void 0:i.source}}};var u,l,m;t.parameters={...t.parameters,docs:{...(u=t.parameters)==null?void 0:u.docs,source:{originalSource:`{
|
|
77
|
+
args: {
|
|
78
|
+
...Default.args
|
|
79
|
+
}
|
|
80
|
+
}`,...(m=(l=t.parameters)==null?void 0:l.docs)==null?void 0:m.source}}};var d,p,c;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
|
81
|
+
args: {
|
|
82
|
+
...Default.args,
|
|
83
|
+
className: 'border-2 border-primary rounded-xl p-4 w-full'
|
|
84
|
+
}
|
|
85
|
+
}`,...(c=(p=a.parameters)==null?void 0:p.docs)==null?void 0:c.source}}};var g,y,h;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
|
86
|
+
...Default,
|
|
87
|
+
args: {
|
|
88
|
+
...Default.args,
|
|
89
|
+
error: true
|
|
90
|
+
}
|
|
91
|
+
}`,...(h=(y=r.parameters)==null?void 0:y.docs)==null?void 0:h.source}}};var v,C,b;n.parameters={...n.parameters,docs:{...(v=n.parameters)==null?void 0:v.docs,source:{originalSource:`{
|
|
92
|
+
parameters: {
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
story: \`
|
|
96
|
+
### Basic Usage
|
|
97
|
+
|
|
98
|
+
\\\`\\\`\\\`tsx
|
|
99
|
+
import { WazUiWysiwygInput } from '@wazobia/wazui';
|
|
100
|
+
|
|
101
|
+
function MyEditor() {
|
|
102
|
+
const [value, setValue] = useState({
|
|
103
|
+
title: '',
|
|
104
|
+
content: ''
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const handleChange = ({ name, value }) => {
|
|
108
|
+
setValue(prev => ({
|
|
109
|
+
...prev,
|
|
110
|
+
[name]: value
|
|
111
|
+
}));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<WazUiWysiwygInput
|
|
116
|
+
value={value}
|
|
117
|
+
onChange={handleChange}
|
|
118
|
+
initiateEmbed={(type) => {
|
|
119
|
+
// Handle embed request
|
|
120
|
+
console.log('Embed requested:', type);
|
|
121
|
+
}}
|
|
122
|
+
imageGalleryConfig={yourGalleryConfig}
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
\\\`\\\`\\\`
|
|
127
|
+
|
|
128
|
+
### With Context Usage
|
|
129
|
+
|
|
130
|
+
\\\`\\\`\\\`tsx
|
|
131
|
+
import { useWysiwyg, WysiwygProvider } from '@wazobia/wazui';
|
|
132
|
+
|
|
133
|
+
// Create a wrapper component
|
|
134
|
+
function WysiwygWrapper() {
|
|
135
|
+
const [value, setValue] = useState({
|
|
136
|
+
title: '',
|
|
137
|
+
content: ''
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
<WysiwygProvider
|
|
142
|
+
initialValue={value}
|
|
143
|
+
onChange={({ name, value }) => {
|
|
144
|
+
setValue(prev => ({...prev, [name]: value}));
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
<MyEditor />
|
|
148
|
+
</WysiwygProvider>
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Create a component that uses the context
|
|
153
|
+
function MyEditor() {
|
|
154
|
+
const { state, handleInitiateEmbed } = useWysiwyg();
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<div>
|
|
158
|
+
<h2>Current title: {state.title}</h2>
|
|
159
|
+
<button onClick={() => handleInitiateEmbed('image')}>
|
|
160
|
+
Add Image
|
|
161
|
+
</button>
|
|
162
|
+
</div>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
\\\`\\\`\\\`
|
|
166
|
+
\`
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}`,...(b=(C=n.parameters)==null?void 0:C.docs)==null?void 0:b.source}}};const ne=["Default","WithPrefilledContent","WithCustomClass","WithError","Usage"];export{e as Default,n as Usage,a as WithCustomClass,r as WithError,t as WithPrefilledContent,ne as __namedExportsOrder,re as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{r as n}from"./index-CBYaBgW8.js";import{D as A,a as z,c as D,b as _,k as I,e as P,C as o}from"./index-CZ4jztst.js";import{c as u}from"./utils-3HBFSLrk.js";import{c as h}from"./popover-BB1qMQFg.js";import{B as f}from"./button-BxNLA_J_.js";/**
|
|
2
|
+
* @license lucide-react v0.507.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],B=h("circle-x",T);/**
|
|
7
|
+
* @license lucide-react v0.507.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const E=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],W=h("triangle-alert",E),q=n.createContext(void 0),O=()=>{const s=n.useContext(q);if(!s)throw new Error("useActionModal must be used within ActionModalProvider");return s},p={success:e.jsx(o,{className:"w-20 h-20 text-primary-foreground/70"}),error:e.jsx(B,{className:"w-20 h-20 text-white"}),warning:e.jsx(W,{className:"w-20 h-20 text-yellow-500"}),info:e.jsx(o,{className:"w-20 h-20 text-primary-foreground"}),action:e.jsx(o,{className:"w-20 h-20 text-primary-foreground/90"})},V=()=>{const{isVisible:s,currentModal:c,hideModal:a}=O(),[r,i]=n.useState(!1);if(!c)return null;const{type:t,title:g,message:l,icon:d,confirmText:y="OK",cancelText:w="Cancel",onAction:m,onCancel:x,variant:j="default",size:N="md"}=c,C=async()=>{if(m){i(!0);try{await m()}catch(k){console.error("Modal confirm action failed:",k)}finally{i(!1)}}a()},b=()=>{x&&x(),a()},v={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},M=()=>{switch(t){case"error":return"destructive";case"warning":return"outline";case"success":return"default";default:return j}};return e.jsx(A,{"data-testid":"action-modal",open:s,onOpenChange:a,children:e.jsxs(z,{className:u("p-8 sm:max-w-[400px] ",v[N]),children:[e.jsxs(D,{className:"flex items-center justify-around text-center space-y-4",children:[(d||p[t])&&e.jsx("div",{className:u("flex justify-center items-center p-4 text-3xl bg-primary/50 w-20 h-20 rounded-full border border-primary ",{"bg-destructive/90 border-destructive":t=="error"}),children:d||p[t]}),e.jsx(_,{children:e.jsx("h1",{className:"text-md capitalize",children:g})}),l&&e.jsx(I,{className:"text-sm lowercase first-letter:uppercase text-center text-muted-foreground px-10",children:l})]}),e.jsxs(P,{className:"flex justify-center space-x-4 mt-4",children:[t==="action"&&e.jsx(f,{className:"flex-1 rounded",variant:"outline",onClick:C,disabled:r,children:r?"Processing...":y}),e.jsx(f,{variant:M(),onClick:b,disabled:r,className:"flex-1 rounded",children:w})]})]})})};V.__docgenInfo={description:"",methods:[],displayName:"WazuiActionModal"};export{q as A,V as W,O as u};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{W as a}from"./WazuiActionModal-Cgw_QqFv.js";import"./jsx-runtime-D_zvdyIk.js";import"./index-CBYaBgW8.js";import"./index-CZ4jztst.js";import"./button-BxNLA_J_.js";import"./utils-3HBFSLrk.js";import"./popover-BB1qMQFg.js";import"./index-BJvHeDRT.js";import"./index-BWnBDfn-.js";const g={title:"Components/WazuiActionModal",component:a,parameters:{layout:"centered",theme:"dark"},tags:["autodocs"],argTypes:{}},r={args:{}};var t,o,e;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
// TODO: Add args here
|
|
4
|
+
}
|
|
5
|
+
}`,...(e=(o=r.parameters)==null?void 0:o.docs)==null?void 0:e.source}}};const f=["Default"];export{r as Default,f as __namedExportsOrder,g as default};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import{j as n}from"./jsx-runtime-D_zvdyIk.js";import{D as t,a as i,b as u}from"./index-CZ4jztst.js";import{W as s}from"./WazUiCreateBlogContent-DxC86Nwl.js";function m({open:r,onOpenChange:a,...e}){return n.jsx(t,{open:r,onOpenChange:a,children:n.jsxs(i,{className:"!p-0 m-0 overflow-hidden",children:[n.jsx(u,{className:"sr-only",children:e.type?`${e.post_uuid?"Edit":"Create"} ${e.type}`:"Content Editor"}),n.jsx(s,{...e,isPopup:!0,className:"p-0 h-fit"})]})})}m.__docgenInfo={description:"",methods:[],displayName:"WazuiCreateContentPopup",props:{type:{required:!1,tsType:{name:"string"},description:""},formTitle:{required:!1,tsType:{name:"string"},description:""},actionButtonTitle:{required:!1,tsType:{name:"string"},description:""},showDraft:{required:!1,tsType:{name:"boolean"},description:""},showTitle:{required:!1,tsType:{name:"boolean"},description:""},isPopup:{required:!1,tsType:{name:"boolean"},description:""},baseUrl:{required:!1,tsType:{name:"string"},description:""},postBaseUrl:{required:!1,tsType:{name:"string"},description:""},className:{required:!1,tsType:{name:"string"},description:""},post_uuid:{required:!1,tsType:{name:"string"},description:""},postQueryConfig:{required:!0,tsType:{name:"signature",type:"object",raw:`{
|
|
2
|
+
fetch?: QueryConfig;
|
|
3
|
+
create: QueryConfig;
|
|
4
|
+
update?: QueryConfig;
|
|
5
|
+
}`,signature:{properties:[{key:"fetch",value:{name:"signature",type:"object",raw:`{
|
|
6
|
+
url?: string;
|
|
7
|
+
query: DocumentNode;
|
|
8
|
+
variables?: { [key: string]: unknown };
|
|
9
|
+
dataKey: string;
|
|
10
|
+
cacheKey?: string;
|
|
11
|
+
mutationInvalidateKey?: string;
|
|
12
|
+
}`,signature:{properties:[{key:"url",value:{name:"string",required:!1}},{key:"query",value:{name:"DocumentNode",required:!0}},{key:"variables",value:{name:"signature",type:"object",raw:"{ [key: string]: unknown }",signature:{properties:[{key:{name:"string"},value:{name:"unknown",required:!0}}]},required:!1}},{key:"dataKey",value:{name:"string",required:!0}},{key:"cacheKey",value:{name:"string",required:!1}},{key:"mutationInvalidateKey",value:{name:"string",required:!1}}]},required:!1}},{key:"create",value:{name:"signature",type:"object",raw:`{
|
|
13
|
+
url?: string;
|
|
14
|
+
query: DocumentNode;
|
|
15
|
+
variables?: { [key: string]: unknown };
|
|
16
|
+
dataKey: string;
|
|
17
|
+
cacheKey?: string;
|
|
18
|
+
mutationInvalidateKey?: string;
|
|
19
|
+
}`,signature:{properties:[{key:"url",value:{name:"string",required:!1}},{key:"query",value:{name:"DocumentNode",required:!0}},{key:"variables",value:{name:"signature",type:"object",raw:"{ [key: string]: unknown }",signature:{properties:[{key:{name:"string"},value:{name:"unknown",required:!0}}]},required:!1}},{key:"dataKey",value:{name:"string",required:!0}},{key:"cacheKey",value:{name:"string",required:!1}},{key:"mutationInvalidateKey",value:{name:"string",required:!1}}]},required:!1}},{key:"update",value:{name:"signature",type:"object",raw:`{
|
|
20
|
+
url?: string;
|
|
21
|
+
query: DocumentNode;
|
|
22
|
+
variables?: { [key: string]: unknown };
|
|
23
|
+
dataKey: string;
|
|
24
|
+
cacheKey?: string;
|
|
25
|
+
mutationInvalidateKey?: string;
|
|
26
|
+
}`,signature:{properties:[{key:"url",value:{name:"string",required:!1}},{key:"query",value:{name:"DocumentNode",required:!0}},{key:"variables",value:{name:"signature",type:"object",raw:"{ [key: string]: unknown }",signature:{properties:[{key:{name:"string"},value:{name:"unknown",required:!0}}]},required:!1}},{key:"dataKey",value:{name:"string",required:!0}},{key:"cacheKey",value:{name:"string",required:!1}},{key:"mutationInvalidateKey",value:{name:"string",required:!1}}]},required:!1}}]}},description:""},groups:{required:!1,tsType:{name:"Array",elements:[{name:"FormGroup"}],raw:"FormGroup[]"},description:""},mainForm:{required:!0,tsType:{name:"FormGroup"},description:""},validators:{required:!1,tsType:{name:"z.ZodSchema"},description:""},onSave:{required:!1,tsType:{name:"signature",type:"function",raw:"(values: Record<string, FormValue>) => void",signature:{arguments:[{type:{name:"Record",elements:[{name:"string"},{name:"union",raw:`| string
|
|
27
|
+
| number
|
|
28
|
+
| boolean
|
|
29
|
+
| FormOptionValue
|
|
30
|
+
| FormOptionValue[]
|
|
31
|
+
| Image
|
|
32
|
+
| PostOptionValue[]
|
|
33
|
+
| InputGroupItem[]`,elements:[{name:"string"},{name:"number"},{name:"boolean"},{name:"signature",type:"object",raw:`{
|
|
34
|
+
label: string;
|
|
35
|
+
value: string | number;
|
|
36
|
+
other?: string | number;
|
|
37
|
+
subs?: FormOptionValue[];
|
|
38
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}},{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
39
|
+
label: string;
|
|
40
|
+
value: string | number;
|
|
41
|
+
other?: string | number;
|
|
42
|
+
subs?: FormOptionValue[];
|
|
43
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}}],raw:"FormOptionValue[]"},{name:"signature",type:"object",raw:`{
|
|
44
|
+
id: string;
|
|
45
|
+
url: string;
|
|
46
|
+
src?: string;
|
|
47
|
+
title?: string;
|
|
48
|
+
caption?: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
alternative_text?: string;
|
|
51
|
+
photographer?: { name: string; url: string };
|
|
52
|
+
download_url?: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
uuid: string;
|
|
55
|
+
height?: number;
|
|
56
|
+
width?: number;
|
|
57
|
+
metadata?: string;
|
|
58
|
+
}`,signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}},{key:"src",value:{name:"string",required:!1}},{key:"title",value:{name:"string",required:!1}},{key:"caption",value:{name:"string",required:!1}},{key:"description",value:{name:"string",required:!1}},{key:"alternative_text",value:{name:"string",required:!1}},{key:"photographer",value:{name:"signature",type:"object",raw:"{ name: string; url: string }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}}]},required:!1}},{key:"download_url",value:{name:"string",required:!1}},{key:"created_at",value:{name:"string",required:!0}},{key:"uuid",value:{name:"string",required:!0}},{key:"height",value:{name:"number",required:!1}},{key:"width",value:{name:"number",required:!1}},{key:"metadata",value:{name:"string",required:!1}}]}},{name:"Array",elements:[{name:"PostOptionValue"}],raw:"PostOptionValue[]"},{name:"Array",elements:[{name:"InputGroupItem"}],raw:"InputGroupItem[]"}]}],raw:"Record<string, FormValue>"},name:"values"}],return:{name:"void"}}},description:""},onBack:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},initialState:{required:!1,tsType:{name:"BlogPostState"},description:""},formFieldsMapper:{required:!1,tsType:{name:"signature",type:"function",raw:"(post: Record<string, unknown>) => FieldValues",signature:{arguments:[{type:{name:"Record",elements:[{name:"string"},{name:"unknown"}],raw:"Record<string, unknown>"},name:"post"}],return:{name:"FieldValues"}}},description:""},submitFieldsMapper:{required:!1,tsType:{name:"signature",type:"function",raw:"(fields: Record<string, FormValue>) => Record<string, unknown>",signature:{arguments:[{type:{name:"Record",elements:[{name:"string"},{name:"union",raw:`| string
|
|
59
|
+
| number
|
|
60
|
+
| boolean
|
|
61
|
+
| FormOptionValue
|
|
62
|
+
| FormOptionValue[]
|
|
63
|
+
| Image
|
|
64
|
+
| PostOptionValue[]
|
|
65
|
+
| InputGroupItem[]`,elements:[{name:"string"},{name:"number"},{name:"boolean"},{name:"signature",type:"object",raw:`{
|
|
66
|
+
label: string;
|
|
67
|
+
value: string | number;
|
|
68
|
+
other?: string | number;
|
|
69
|
+
subs?: FormOptionValue[];
|
|
70
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}},{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
71
|
+
label: string;
|
|
72
|
+
value: string | number;
|
|
73
|
+
other?: string | number;
|
|
74
|
+
subs?: FormOptionValue[];
|
|
75
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}}],raw:"FormOptionValue[]"},{name:"signature",type:"object",raw:`{
|
|
76
|
+
id: string;
|
|
77
|
+
url: string;
|
|
78
|
+
src?: string;
|
|
79
|
+
title?: string;
|
|
80
|
+
caption?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
alternative_text?: string;
|
|
83
|
+
photographer?: { name: string; url: string };
|
|
84
|
+
download_url?: string;
|
|
85
|
+
created_at: string;
|
|
86
|
+
uuid: string;
|
|
87
|
+
height?: number;
|
|
88
|
+
width?: number;
|
|
89
|
+
metadata?: string;
|
|
90
|
+
}`,signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}},{key:"src",value:{name:"string",required:!1}},{key:"title",value:{name:"string",required:!1}},{key:"caption",value:{name:"string",required:!1}},{key:"description",value:{name:"string",required:!1}},{key:"alternative_text",value:{name:"string",required:!1}},{key:"photographer",value:{name:"signature",type:"object",raw:"{ name: string; url: string }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}}]},required:!1}},{key:"download_url",value:{name:"string",required:!1}},{key:"created_at",value:{name:"string",required:!0}},{key:"uuid",value:{name:"string",required:!0}},{key:"height",value:{name:"number",required:!1}},{key:"width",value:{name:"number",required:!1}},{key:"metadata",value:{name:"string",required:!1}}]}},{name:"Array",elements:[{name:"PostOptionValue"}],raw:"PostOptionValue[]"},{name:"Array",elements:[{name:"InputGroupItem"}],raw:"InputGroupItem[]"}]}],raw:"Record<string, FormValue>"},name:"fields"}],return:{name:"Record",elements:[{name:"string"},{name:"unknown"}],raw:"Record<string, unknown>"}}},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
91
|
+
form: UseFormReturn<FieldValues, unknown, FieldValues>,
|
|
92
|
+
fieldName: string,
|
|
93
|
+
values: Record<string, FormValue>
|
|
94
|
+
) => void`,signature:{arguments:[{type:{name:"UseFormReturn",elements:[{name:"FieldValues"},{name:"unknown"},{name:"FieldValues"}],raw:"UseFormReturn<FieldValues, unknown, FieldValues>"},name:"form"},{type:{name:"string"},name:"fieldName"},{type:{name:"Record",elements:[{name:"string"},{name:"union",raw:`| string
|
|
95
|
+
| number
|
|
96
|
+
| boolean
|
|
97
|
+
| FormOptionValue
|
|
98
|
+
| FormOptionValue[]
|
|
99
|
+
| Image
|
|
100
|
+
| PostOptionValue[]
|
|
101
|
+
| InputGroupItem[]`,elements:[{name:"string"},{name:"number"},{name:"boolean"},{name:"signature",type:"object",raw:`{
|
|
102
|
+
label: string;
|
|
103
|
+
value: string | number;
|
|
104
|
+
other?: string | number;
|
|
105
|
+
subs?: FormOptionValue[];
|
|
106
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}},{name:"Array",elements:[{name:"signature",type:"object",raw:`{
|
|
107
|
+
label: string;
|
|
108
|
+
value: string | number;
|
|
109
|
+
other?: string | number;
|
|
110
|
+
subs?: FormOptionValue[];
|
|
111
|
+
}`,signature:{properties:[{key:"label",value:{name:"string",required:!0}},{key:"value",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!0}},{key:"other",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"subs",value:{name:"Array",elements:[{name:"FormOptionValue"}],raw:"FormOptionValue[]",required:!1}}]}}],raw:"FormOptionValue[]"},{name:"signature",type:"object",raw:`{
|
|
112
|
+
id: string;
|
|
113
|
+
url: string;
|
|
114
|
+
src?: string;
|
|
115
|
+
title?: string;
|
|
116
|
+
caption?: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
alternative_text?: string;
|
|
119
|
+
photographer?: { name: string; url: string };
|
|
120
|
+
download_url?: string;
|
|
121
|
+
created_at: string;
|
|
122
|
+
uuid: string;
|
|
123
|
+
height?: number;
|
|
124
|
+
width?: number;
|
|
125
|
+
metadata?: string;
|
|
126
|
+
}`,signature:{properties:[{key:"id",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}},{key:"src",value:{name:"string",required:!1}},{key:"title",value:{name:"string",required:!1}},{key:"caption",value:{name:"string",required:!1}},{key:"description",value:{name:"string",required:!1}},{key:"alternative_text",value:{name:"string",required:!1}},{key:"photographer",value:{name:"signature",type:"object",raw:"{ name: string; url: string }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"url",value:{name:"string",required:!0}}]},required:!1}},{key:"download_url",value:{name:"string",required:!1}},{key:"created_at",value:{name:"string",required:!0}},{key:"uuid",value:{name:"string",required:!0}},{key:"height",value:{name:"number",required:!1}},{key:"width",value:{name:"number",required:!1}},{key:"metadata",value:{name:"string",required:!1}}]}},{name:"Array",elements:[{name:"PostOptionValue"}],raw:"PostOptionValue[]"},{name:"Array",elements:[{name:"InputGroupItem"}],raw:"InputGroupItem[]"}]}],raw:"Record<string, FormValue>"},name:"values"}],return:{name:"void"}}},description:""},requiredDraftFields:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},createMessage:{required:!1,tsType:{name:"string"},description:""},updateMessage:{required:!1,tsType:{name:"string"},description:""},showDescriptionOnSubmit:{required:!1,tsType:{name:"boolean"},description:""},autoSave:{required:!1,tsType:{name:"boolean"},description:""},user_config:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
127
|
+
uuid: string;
|
|
128
|
+
name: string;
|
|
129
|
+
email: string;
|
|
130
|
+
}`,signature:{properties:[{key:"uuid",value:{name:"string",required:!0}},{key:"name",value:{name:"string",required:!0}},{key:"email",value:{name:"string",required:!0}}]}},description:""},open:{required:!0,tsType:{name:"boolean"},description:""},onOpenChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(open: boolean) => void",signature:{arguments:[{type:{name:"boolean"},name:"open"}],return:{name:"void"}}},description:""}}};export{m as W};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import{j as d}from"./jsx-runtime-D_zvdyIk.js";import{r as f,R as S}from"./index-CBYaBgW8.js";import{e as N}from"./env-B_s3Ell7.js";import{c as k}from"./utils-3HBFSLrk.js";import{G as T}from"./iconBase-B7i_G6Rg.js";const W={width:"w",height:"h",quality:"q",format:"f",coordinates:"cr",rotation:"rt",blur:"bl"},y={desktop:"1100w",tablet:"750w",mobile:"450w"},j=e=>{const t=[];return Object.entries(e).forEach(([a,o])=>{if(o==null)return;const r=W[a];if(!r){console.warn(`Unknown transformation key: ${a}`);return}if(a==="coordinates"){const{width:n,top:l,left:s,height:m}=o;t.push(`${r}-${l}.${s}.${m}.${n}`)}else t.push(`${r}-${o}`)}),t.join(",")},C=e=>{if(!e)return null;try{const t=atob(e);return JSON.parse(decodeURIComponent(t))}catch(t){return console.error("Error parsing config:",t),null}},h=e=>{if(!e)return"";const{left:t,top:a,right:o,bottom:r,rotation:n}=e;return[t,a,o,r,n].every(s=>s!=null)?`cr-${t}.${a}.${o}.${r},rt-${n||0}`:""},v=(e,t,a="",o="")=>{const r=t.split(",").filter(s=>!/^w-\d+/.test(s)&&!/^h-\d+/.test(s)).join(","),n=new URL(e),l=[r,a].filter(Boolean).join(",");return n.searchParams.set("tr",l),o&&n.searchParams.set("config",o),n.toString()},F=(e,t,a,o,r)=>{const n=decodeURIComponent(v(e,t,a.desktop,o)),l=decodeURIComponent(v(e,t,a.tablet)),s=decodeURIComponent(v(e,t,a.mobile)),m=r?`url("${s}") 1x, url("${l}") 2x, url("${n}") 3x`:`${n} ${y.desktop}, ${l} ${y.tablet}, ${s} ${y.mobile} `;return{desktop:decodeURIComponent(n.toString()),tablet:decodeURIComponent(l.toString()),mobile:decodeURIComponent(s.toString()),srcset:m}},G=({url:e="",transformationsUrl:t,transformations:a,isBackground:o=!1})=>{var n,l,s,m,I;if(!e)return console.warn("getImageTransformationsUrl: No URL provided"),{url:"",srcset:"",desktop:"",tablet:"",mobile:""};if(typeof e!="string"||e.trim()==="")return console.warn("getImageTransformationsUrl: Invalid URL format:",e),{url:"",srcset:"",desktop:"",tablet:"",mobile:""};const r=e.trim();if(!r.startsWith("http://")&&!r.startsWith("https://")&&!r.startsWith("/"))return console.warn("getImageTransformationsUrl: URL must be absolute (http/https) or relative path:",e),{url:"",srcset:"",desktop:"",tablet:"",mobile:""};try{const c=r.startsWith("/")?new URL(r,"https://placeholder.com"):new URL(r),p=c.searchParams.get("config")||"",g=t||N.VITE_DOLOS_TRANSFORMATION_ENDPOINT||"images",b=c.hostname==="img.wazobia.tech"?`${g}${c.pathname}`:`${g}${g.endsWith("/")?"":"/"}${c.hostname}${c.pathname}`,u=a?j(a):"",i=C(p),P={desktop:h((n=i==null?void 0:i.coordinates)==null?void 0:n.desktop),tablet:h((l=i==null?void 0:i.coordinates)==null?void 0:l.tablet)||h((s=i==null?void 0:i.coordinates)==null?void 0:s.desktop),mobile:h((m=i==null?void 0:i.coordinates)==null?void 0:m.mobile)||h((I=i==null?void 0:i.coordinates)==null?void 0:I.desktop)},R=v(b,u,"",p),{desktop:E,srcset:U,mobile:$,tablet:q}=F(b,u,P,p,o);return{url:E||R.toString(),srcset:U,mobile:$,tablet:q,desktop:E}}catch(c){return console.error("Error generating image transformation URL:",c),{url:e,srcset:e,mobile:"",desktop:"",tablet:""}}},x=({url:e,transformationsUrl:t,width:a,height:o,blur:r,quality:n=70})=>G({url:e,transformationsUrl:t,transformations:{width:a,height:o,format:"WEBP",quality:n,blur:r}}),O="(min-width: 1024px) 1100px, (min-width: 500px) 750px, 450px",M=e=>{try{const t=new URL(e);return t.searchParams.delete("config"),t.toString()}catch(t){return console.error("Error removing config param:",t),e}};function B(e){return T({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const V=({url:e,alt:t,classname:a,imageClassname:o})=>{const r=f.useRef(null),[n,l]=f.useState(0),[s,m]=f.useState(!0),[I,c]=f.useState(!1),p=f.useRef(null),g=()=>{m(!1),c(!1)},w=()=>{m(!1),c(!0)},b=S.useMemo(()=>n>0?x({url:e,width:n}):x({url:e}),[e,n]);return f.useEffect(()=>{const u=()=>{r.current&&l(r.current.offsetWidth)};u();const i=new ResizeObserver(u);return r.current&&i.observe(r.current),()=>{i.disconnect()}},[]),f.useEffect(()=>{m(!0),c(!1);const u=p.current;u&&u.complete&&u.naturalWidth&&u.naturalWidth>0&&(m(!1),c(!1))},[e]),d.jsxs("div",{ref:r,className:k("w-full h-full relative",a),"data-testid":"image-container",children:[s&&d.jsx("div",{className:"absolute inset-0 bg-secondary/20 animate-pulse"}),(I&&!s||!e)&&d.jsx("div",{"data-testid":"image-error",className:"absolute inset-0 w-full bg-muted flex items-center justify-center ",children:d.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[d.jsx(B,{className:"text-xl"}),d.jsx("p",{className:"text-xs text-center",children:e?"Image Unavailable":"No image"})]})}),e&&b.url&&d.jsx("img",{ref:p,src:b.url,srcSet:b.srcset,sizes:O,alt:t||"Media image",className:k("w-full h-full object-cover transition-all duration-300 ease-in-out",o,s?"opacity-0":"opacity-100"),loading:"lazy",onLoad:g,onError:w})]})};V.__docgenInfo={description:"",methods:[],displayName:"WazuiImage",props:{url:{required:!0,tsType:{name:"string"},description:""},alt:{required:!1,tsType:{name:"string"},description:""},transformations:{required:!1,tsType:{name:"intersection",raw:`Transformation & {
|
|
2
|
+
format?:
|
|
3
|
+
| 'JPEG'
|
|
4
|
+
| 'PNG'
|
|
5
|
+
| 'WEBP'
|
|
6
|
+
| 'AVIF'
|
|
7
|
+
| 'GIF'
|
|
8
|
+
| 'SVG'
|
|
9
|
+
| 'BMP'
|
|
10
|
+
| 'ICO'
|
|
11
|
+
| 'HEIC'
|
|
12
|
+
| 'HEIF'
|
|
13
|
+
| 'PDF';
|
|
14
|
+
quality?: number;
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
blur?: number;
|
|
18
|
+
}`,elements:[{name:"signature",type:"object",raw:`{
|
|
19
|
+
coordinates?: Coordinates;
|
|
20
|
+
rotation?: number;
|
|
21
|
+
flipHorizontal?: boolean;
|
|
22
|
+
flipVertical?: boolean;
|
|
23
|
+
aspectRatio?: string;
|
|
24
|
+
pillowCropBox?: PillowCropBox;
|
|
25
|
+
}`,signature:{properties:[{key:"coordinates",value:{name:"Coordinates",required:!1}},{key:"rotation",value:{name:"number",required:!1}},{key:"flipHorizontal",value:{name:"boolean",required:!1}},{key:"flipVertical",value:{name:"boolean",required:!1}},{key:"aspectRatio",value:{name:"string",required:!1}},{key:"pillowCropBox",value:{name:"signature",type:"object",raw:`{
|
|
26
|
+
left: number;
|
|
27
|
+
top: number;
|
|
28
|
+
right: number;
|
|
29
|
+
bottom: number;
|
|
30
|
+
rotation?: number;
|
|
31
|
+
}`,signature:{properties:[{key:"left",value:{name:"number",required:!0}},{key:"top",value:{name:"number",required:!0}},{key:"right",value:{name:"number",required:!0}},{key:"bottom",value:{name:"number",required:!0}},{key:"rotation",value:{name:"number",required:!1}}]},required:!1}}]}},{name:"signature",type:"object",raw:`{
|
|
32
|
+
format?:
|
|
33
|
+
| 'JPEG'
|
|
34
|
+
| 'PNG'
|
|
35
|
+
| 'WEBP'
|
|
36
|
+
| 'AVIF'
|
|
37
|
+
| 'GIF'
|
|
38
|
+
| 'SVG'
|
|
39
|
+
| 'BMP'
|
|
40
|
+
| 'ICO'
|
|
41
|
+
| 'HEIC'
|
|
42
|
+
| 'HEIF'
|
|
43
|
+
| 'PDF';
|
|
44
|
+
quality?: number;
|
|
45
|
+
width?: number;
|
|
46
|
+
height?: number;
|
|
47
|
+
blur?: number;
|
|
48
|
+
}`,signature:{properties:[{key:"format",value:{name:"union",raw:`| 'JPEG'
|
|
49
|
+
| 'PNG'
|
|
50
|
+
| 'WEBP'
|
|
51
|
+
| 'AVIF'
|
|
52
|
+
| 'GIF'
|
|
53
|
+
| 'SVG'
|
|
54
|
+
| 'BMP'
|
|
55
|
+
| 'ICO'
|
|
56
|
+
| 'HEIC'
|
|
57
|
+
| 'HEIF'
|
|
58
|
+
| 'PDF'`,elements:[{name:"literal",value:"'JPEG'"},{name:"literal",value:"'PNG'"},{name:"literal",value:"'WEBP'"},{name:"literal",value:"'AVIF'"},{name:"literal",value:"'GIF'"},{name:"literal",value:"'SVG'"},{name:"literal",value:"'BMP'"},{name:"literal",value:"'ICO'"},{name:"literal",value:"'HEIC'"},{name:"literal",value:"'HEIF'"},{name:"literal",value:"'PDF'"}],required:!1}},{key:"quality",value:{name:"number",required:!1}},{key:"width",value:{name:"number",required:!1}},{key:"height",value:{name:"number",required:!1}},{key:"blur",value:{name:"number",required:!1}}]}}]},description:""},classname:{required:!1,tsType:{name:"string"},description:""},imageClassname:{required:!1,tsType:{name:"string"},description:""}}};export{B as C,V as W,x as g,M as r};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{W as z}from"./WazuiImage-BwRWaPkA.js";import"./jsx-runtime-D_zvdyIk.js";import"./index-CBYaBgW8.js";import"./env-B_s3Ell7.js";import"./utils-3HBFSLrk.js";import"./iconBase-B7i_G6Rg.js";const q={title:"Components/WazuiImage",component:z,parameters:{layout:"centered",theme:"dark"},tags:["autodocs"],argTypes:{url:{control:"text",description:"Image URL"},alt:{control:"text",description:"Alternative text for the image"},classname:{control:"text",description:"CSS class for the container"},imageClassname:{control:"text",description:"CSS class for the image element"},transformations:{control:"object",description:"Image transformation options"}}},a={args:{url:"https://picsum.photos/400/300",alt:"Sample image"}},r={args:{url:"https://picsum.photos/400/300?random=1",alt:"Custom alt text for accessibility"}},s={args:{url:"https://picsum.photos/400/300?random=2",alt:"Image with custom styling",classname:"border-2 border-blue-500 rounded-lg",imageClassname:"rounded-lg"}},t={args:{url:"https://picsum.photos/400/300?random=3",alt:"Image with transformations",transformations:{height:200}}},e={args:{url:"",alt:"No image provided"}},o={args:{url:"https://invalid-url-that-will-fail.com/image.jpg",alt:"Image that will fail to load"}},n={args:{url:"https://picsum.photos/800/600?random=4",alt:"Large image",classname:"w-96 h-64"}},m={args:{url:"https://picsum.photos/200/200?random=5",alt:"Small image",classname:"w-24 h-24"}};var l,i,c;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
url: 'https://picsum.photos/400/300',
|
|
4
|
+
alt: 'Sample image'
|
|
5
|
+
}
|
|
6
|
+
}`,...(c=(i=a.parameters)==null?void 0:i.docs)==null?void 0:c.source}}};var p,u,g;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{
|
|
7
|
+
args: {
|
|
8
|
+
url: 'https://picsum.photos/400/300?random=1',
|
|
9
|
+
alt: 'Custom alt text for accessibility'
|
|
10
|
+
}
|
|
11
|
+
}`,...(g=(u=r.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var d,h,f;s.parameters={...s.parameters,docs:{...(d=s.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
|
12
|
+
args: {
|
|
13
|
+
url: 'https://picsum.photos/400/300?random=2',
|
|
14
|
+
alt: 'Image with custom styling',
|
|
15
|
+
classname: 'border-2 border-blue-500 rounded-lg',
|
|
16
|
+
imageClassname: 'rounded-lg'
|
|
17
|
+
}
|
|
18
|
+
}`,...(f=(h=s.parameters)==null?void 0:h.docs)==null?void 0:f.source}}};var S,I,C;t.parameters={...t.parameters,docs:{...(S=t.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
|
19
|
+
args: {
|
|
20
|
+
url: 'https://picsum.photos/400/300?random=3',
|
|
21
|
+
alt: 'Image with transformations',
|
|
22
|
+
transformations: {
|
|
23
|
+
height: 200
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}`,...(C=(I=t.parameters)==null?void 0:I.docs)==null?void 0:C.source}}};var w,b,x;e.parameters={...e.parameters,docs:{...(w=e.parameters)==null?void 0:w.docs,source:{originalSource:`{
|
|
27
|
+
args: {
|
|
28
|
+
url: '',
|
|
29
|
+
alt: 'No image provided'
|
|
30
|
+
}
|
|
31
|
+
}`,...(x=(b=e.parameters)==null?void 0:b.docs)==null?void 0:x.source}}};var W,v,y;o.parameters={...o.parameters,docs:{...(W=o.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
32
|
+
args: {
|
|
33
|
+
url: 'https://invalid-url-that-will-fail.com/image.jpg',
|
|
34
|
+
alt: 'Image that will fail to load'
|
|
35
|
+
}
|
|
36
|
+
}`,...(y=(v=o.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};var L,U,N;n.parameters={...n.parameters,docs:{...(L=n.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
|
37
|
+
args: {
|
|
38
|
+
url: 'https://picsum.photos/800/600?random=4',
|
|
39
|
+
alt: 'Large image',
|
|
40
|
+
classname: 'w-96 h-64'
|
|
41
|
+
}
|
|
42
|
+
}`,...(N=(U=n.parameters)==null?void 0:U.docs)==null?void 0:N.source}}};var j,A,T;m.parameters={...m.parameters,docs:{...(j=m.parameters)==null?void 0:j.docs,source:{originalSource:`{
|
|
43
|
+
args: {
|
|
44
|
+
url: 'https://picsum.photos/200/200?random=5',
|
|
45
|
+
alt: 'Small image',
|
|
46
|
+
classname: 'w-24 h-24'
|
|
47
|
+
}
|
|
48
|
+
}`,...(T=(A=m.parameters)==null?void 0:A.docs)==null?void 0:T.source}}};const B=["Default","WithCustomAlt","WithCustomClasses","WithTransformations","NoUrl","InvalidUrl","LargeImage","SmallImage"];export{a as Default,o as InvalidUrl,n as LargeImage,e as NoUrl,m as SmallImage,r as WithCustomAlt,s as WithCustomClasses,t as WithTransformations,B as __namedExportsOrder,q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./jsx-runtime-D_zvdyIk.js";import{r as a,a as V}from"./index-CBYaBgW8.js";import{b as E,c as j}from"./utils-3HBFSLrk.js";function b(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function C(...e){return r=>{let t=!1;const o=e.map(n=>{const i=b(n,r);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let n=0;n<o.length;n++){const i=o[n];typeof i=="function"?i():b(e[n],null)}}}}function H(...e){return a.useCallback(C(...e),e)}const h=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,x=E,R=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return x(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:i}=r,u=Object.keys(n).map(s=>{const d=t==null?void 0:t[s],c=i==null?void 0:i[s];if(d===null)return null;const p=h(d)||h(c);return n[s][p]}),l=t&&Object.entries(t).reduce((s,d)=>{let[c,p]=d;return p===void 0||(s[c]=p),s},{}),f=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((s,d)=>{let{class:c,className:p,...k}=d;return Object.entries(k).every(S=>{let[g,y]=S;return Array.isArray(y)?y.includes({...i,...l}[g]):{...i,...l}[g]===y})?[...s,c,p]:s},[]);return x(e,u,f,t==null?void 0:t.class,t==null?void 0:t.className)};var N=Symbol.for("react.lazy"),v=V[" use ".trim().toString()];function w(e){return typeof e=="object"&&e!==null&&"then"in e}function _(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===N&&"_payload"in e&&w(e._payload)}function O(e){const r=A(e),t=a.forwardRef((o,n)=>{let{children:i,...u}=o;_(i)&&typeof v=="function"&&(i=v(i._payload));const l=a.Children.toArray(i),f=l.find(T);if(f){const s=f.props.children,d=l.map(c=>c===f?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:c);return m.jsx(r,{...u,ref:n,children:a.isValidElement(s)?a.cloneElement(s,void 0,d):null})}return m.jsx(r,{...u,ref:n,children:i})});return t.displayName=`${e}.Slot`,t}var P=O("Slot");function A(e){const r=a.forwardRef((t,o)=>{let{children:n,...i}=t;if(_(n)&&typeof v=="function"&&(n=v(n._payload)),a.isValidElement(n)){const u=I(n),l=$(i,n.props);return n.type!==a.Fragment&&(l.ref=o?C(o,u):u),a.cloneElement(n,l)}return a.Children.count(n)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function T(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function $(e,r){const t={...r};for(const o in r){const n=e[o],i=r[o];/^on[A-Z]/.test(o)?n&&i?t[o]=(...l)=>{const f=i(...l);return n(...l),f}:n&&(t[o]=n):o==="style"?t[o]={...n,...i}:o==="className"&&(t[o]=[n,i].filter(Boolean).join(" "))}return{...e,...t}}function I(e){var o,n;let r=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const W=R("cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",primary:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border border-primary p-4 bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function B({className:e,variant:r,size:t,asChild:o=!1,...n}){const i=o?P:"button";return m.jsx(i,{"data-slot":"button",className:j(W({variant:r,size:t,className:e})),...n})}B.__docgenInfo={description:"",methods:[],displayName:"Button",props:{asChild:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};export{B,P as S,R as a,W as b,C as c,H as u};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as e}from"./popover-BB1qMQFg.js";/**
|
|
2
|
+
* @license lucide-react v0.507.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,c=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,l=(e,r)=>function(){return e&&(r=(0,e[o(e)[0]])(e=0)),r},v=(e,r)=>function(){return r||(0,e[o(e)[0]])((r={exports:{}}).exports,r),r.exports},b=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},n=(e,r,t,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let _ of o(r))!O.call(e,_)&&_!==t&&a(e,_,{get:()=>r[_],enumerable:!(p=s(r,_))||p.enumerable});return e},P=(e,r,t)=>(t=e!=null?u(c(e)):{},n(!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),y=e=>n(a({},"__esModule",{value:!0}),e);export{P as _,v as a,b,l as c,y as d};
|