@nice2dev/ui 1.0.17 → 1.0.18
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/CHANGELOG.md +252 -0
- package/dist/NiceAlertDialog.doc-BST0-aVs.cjs +14 -0
- package/dist/NiceAlertDialog.doc-GRpJU_5Y.js +38 -0
- package/dist/NiceAnimatePresence.doc-BrttRpeS.js +36 -0
- package/dist/NiceAnimatePresence.doc-IdEWrSnT.cjs +12 -0
- package/dist/NiceCalendarScheduler.doc-Cc-DFMhR.js +33 -0
- package/dist/NiceCalendarScheduler.doc-TPe0kRBN.cjs +9 -0
- package/dist/NiceCameraFeed.doc-BJl0gdWv.js +31 -0
- package/dist/NiceCameraFeed.doc-Bt4eZ8MH.cjs +7 -0
- package/dist/NiceChip.doc-Bccf4IQe.cjs +7 -0
- package/dist/NiceChip.doc-DEsqjL7z.js +31 -0
- package/dist/NiceCombobox.doc-8hMzrsdM.js +34 -0
- package/dist/NiceCombobox.doc-C5IPnVuz.cjs +10 -0
- package/dist/NiceConfigProvider.doc-CKIudO44.js +32 -0
- package/dist/NiceConfigProvider.doc-bMLQj3Zx.cjs +8 -0
- package/dist/NiceCronEditor.doc-BThdELxx.js +31 -0
- package/dist/NiceCronEditor.doc-w_TbOWFo.cjs +7 -0
- package/dist/NiceDataList.doc-DHXrpTPT.cjs +9 -0
- package/dist/NiceDataList.doc-R8SchHqZ.js +33 -0
- package/dist/NiceDiagram.doc-CASS0Tnj.cjs +8 -0
- package/dist/NiceDiagram.doc-DGX-Hwhg.js +32 -0
- package/dist/NiceDocPage.doc-BVBe27kj.cjs +1 -0
- package/dist/NiceDocPage.doc-CDcL3Sqt.js +25 -0
- package/dist/NiceDrawingCanvas.doc-DYYFKKMW.js +32 -0
- package/dist/NiceDrawingCanvas.doc-wa684gbC.cjs +8 -0
- package/dist/NiceDropdown.doc-D2NS9hBT.js +35 -0
- package/dist/NiceDropdown.doc-dAgER8da.cjs +11 -0
- package/dist/NiceDropzone.doc-CVVNc9SE.cjs +9 -0
- package/dist/NiceDropzone.doc-aeajYWqU.js +33 -0
- package/dist/NiceEnergyMonitor.doc-BBnVKuwf.js +32 -0
- package/dist/NiceEnergyMonitor.doc-lf6CCIYi.cjs +8 -0
- package/dist/NiceErrorBoundary-COY0cEsF.js +762 -0
- package/dist/NiceErrorBoundary-CR-_ZScD.cjs +1 -0
- package/dist/NiceExpressionBuilder.doc-CTjqEcZR.cjs +8 -0
- package/dist/NiceExpressionBuilder.doc-Cu_ORFhd.js +32 -0
- package/dist/NiceFileExplorer.doc-B0aN041v.js +32 -0
- package/dist/NiceFileExplorer.doc-DNHYQF_t.cjs +8 -0
- package/dist/NiceFloatingActionButton.doc-BOlJwq4S.cjs +7 -0
- package/dist/NiceFloatingActionButton.doc-oYnwvMP9.js +31 -0
- package/dist/NiceFontPicker.doc-B10vOqeF.cjs +8 -0
- package/dist/NiceFontPicker.doc-DuPp0cDP.js +32 -0
- package/dist/NiceForm-COk1rNVa.js +5357 -0
- package/dist/NiceForm-CU8Dldq-.cjs +382 -0
- package/dist/NiceGestureHandler.doc-9GGvVnM5.cjs +8 -0
- package/dist/NiceGestureHandler.doc-BduQU3SA.js +32 -0
- package/dist/NiceHeader.doc-Cxoy_f_k.cjs +6 -0
- package/dist/NiceHeader.doc-DjAVl-T4.js +30 -0
- package/dist/NiceImage.doc-COy4iVy1.js +34 -0
- package/dist/NiceImage.doc-CvnaTRj8.cjs +10 -0
- package/dist/NiceInPlaceEditor.doc-8nC6Kqvn.cjs +1 -0
- package/dist/NiceInPlaceEditor.doc-gF1XPyu5.js +25 -0
- package/dist/NiceInteractiveTimeline.doc-BTeASFR4.js +50 -0
- package/dist/NiceInteractiveTimeline.doc-WMOVQhMe.cjs +11 -0
- package/dist/NiceJsonEditor.doc-BpVa-AlY.js +31 -0
- package/dist/NiceJsonEditor.doc-DeyoVDQw.cjs +7 -0
- package/dist/NiceMegaMenu.doc-CO34gN43.cjs +7 -0
- package/dist/NiceMegaMenu.doc-DpchTBL6.js +31 -0
- package/dist/NiceMentionInput.doc-O0W58Unu.js +32 -0
- package/dist/NiceMentionInput.doc-ZSPjBsZc.cjs +8 -0
- package/dist/NiceModal-CIITx65V.cjs +1 -0
- package/dist/NiceModal-CN23FZsc.js +95 -0
- package/dist/NiceModuleLifecyclePanel-BDnsr5ZW.js +6349 -0
- package/dist/NiceModuleLifecyclePanel-F1uN0gMh.cjs +1 -0
- package/dist/NiceMotion.doc-COF5BldG.cjs +9 -0
- package/dist/NiceMotion.doc-utheTBgM.js +33 -0
- package/dist/NiceMultiColumnComboBox.doc-Ben0Q0J0.cjs +1 -0
- package/dist/NiceMultiColumnComboBox.doc-CK1DppZI.js +25 -0
- package/dist/NiceNotificationList.doc-CBWusjJX.cjs +7 -0
- package/dist/NiceNotificationList.doc-D7lQIxK0.js +31 -0
- package/dist/NiceOfflineSync.doc-BLQFyOf2.cjs +8 -0
- package/dist/NiceOfflineSync.doc-CKWFmR3b.js +32 -0
- package/dist/NicePagination-B4U0LwZy.js +171 -0
- package/dist/NicePagination-CGQf54a9.cjs +1 -0
- package/dist/NicePinCodeInput-DG_-eXXJ.cjs +419 -0
- package/dist/NicePinCodeInput-g-yUiepm.js +11875 -0
- package/dist/NicePreview.doc-Cl7_5MVR.js +30 -0
- package/dist/NicePreview.doc-atKISvmp.cjs +6 -0
- package/dist/NicePropertyGrid.doc-D6xljYe1.cjs +7 -0
- package/dist/NicePropertyGrid.doc-nX2etusg.js +31 -0
- package/dist/NiceRadio.doc-BTURz62X.js +27 -0
- package/dist/NiceRadio.doc-Cc8-1vbn.cjs +3 -0
- package/dist/NiceRecurrencePicker.doc-78HjPJm0.js +31 -0
- package/dist/NiceRecurrencePicker.doc-vC2YmCXF.cjs +7 -0
- package/dist/NiceRichTextEditor.doc-ClPCkzCd.cjs +6 -0
- package/dist/NiceRichTextEditor.doc-CtmV9UvX.js +30 -0
- package/dist/NiceSavedQueryPanel-CE3QR4RY.js +6446 -0
- package/dist/NiceSavedQueryPanel-DSnj-3Es.cjs +596 -0
- package/dist/NiceSceneSelector.doc-CY2OmaWQ.cjs +7 -0
- package/dist/NiceSceneSelector.doc-UsVgDrw1.js +31 -0
- package/dist/NiceScrollArea.doc-C6Y-odUa.js +27 -0
- package/dist/NiceScrollArea.doc-LdxDrGDY.cjs +3 -0
- package/dist/NiceSheet.doc-CsIu3Y1G.cjs +11 -0
- package/dist/NiceSheet.doc-DLfSY-MA.js +35 -0
- package/dist/NiceSpeedDial.doc-CSWvNR9n.cjs +7 -0
- package/dist/NiceSpeedDial.doc-DqnpBcMy.js +31 -0
- package/dist/NiceSplitPane.doc-Ck_FvdL6.cjs +9 -0
- package/dist/NiceSplitPane.doc-Di68JZuy.js +33 -0
- package/dist/NiceSpotlight.doc-CM4PnsHE.js +34 -0
- package/dist/NiceSpotlight.doc-Dm_B-kUJ.cjs +10 -0
- package/dist/NiceStepNavigation.doc-DXraCs7t.js +31 -0
- package/dist/NiceStepNavigation.doc-TSy2dWmf.cjs +7 -0
- package/dist/NiceSteps.doc-C_mkhnez.cjs +10 -0
- package/dist/NiceSteps.doc-PW1zubHM.js +34 -0
- package/dist/NiceSwitch.doc-CLc7OxrE.cjs +6 -0
- package/dist/NiceSwitch.doc-dGMMY4es.js +30 -0
- package/dist/NiceTabs-32xjguOv.cjs +1 -0
- package/dist/NiceTabs-Blk0h4jY.js +1624 -0
- package/dist/NiceTransition.doc-BmImVoB8.js +35 -0
- package/dist/NiceTransition.doc-GA1N91ON.cjs +11 -0
- package/dist/NiceTree.doc-D7SCXljC.js +40 -0
- package/dist/NiceTree.doc-DZx3hUwY.cjs +16 -0
- package/dist/NiceUnitConverter.doc-DmiyYOH_.cjs +10 -0
- package/dist/NiceUnitConverter.doc-YnzD3uKT.js +34 -0
- package/dist/NiceVirtualGrid.doc-DI2c9ckY.js +35 -0
- package/dist/NiceVirtualGrid.doc-rtwudxTG.cjs +11 -0
- package/dist/NiceVirtualList.doc-BpoTiXoV.js +31 -0
- package/dist/NiceVirtualList.doc-C8q-Hfl0.cjs +7 -0
- package/dist/NiceWindow-B4jA_-hi.js +1409 -0
- package/dist/NiceWindow-UpKllge7.cjs +1 -0
- package/dist/charts-0BEMJ0Xt.js +4657 -0
- package/dist/charts-CbxmU6Z2.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +19 -19
- package/dist/charts.mjs +1 -1
- package/dist/core-BIA5_uSq.js +22316 -0
- package/dist/core-DQYnL6uf.cjs +96 -0
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +10 -10
- package/dist/feedback.mjs +2 -2
- package/dist/index-BjBsn6ad.cjs +5194 -0
- package/dist/index-C2Uoywo9.js +63852 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1631 -53
- package/dist/index.mjs +943 -895
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +4 -3
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.mjs +4 -4
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",n="NiceGestureHandler",t="Gesture handler for touch interactions like pinch, rotate, swipe.",o="mobile",i="1.0.0",a="planned",c=[{name:"children",type:"React.ReactNode",required:!0,description:"Content to handle"},{name:"onPinch",type:"(scale: number) => void",description:"Pinch callback"},{name:"onRotate",type:"(angle: number) => void",description:"Rotate callback"},{name:"onSwipe",type:"(direction: SwipeDirection) => void",description:"Swipe callback"},{name:"onPan",type:"(delta: { x: number; y: number }) => void",description:"Pan callback"},{name:"onDoubleTap",type:"() => void",description:"Double tap callback"},{name:"onLongPress",type:"() => void",description:"Long press callback"},{name:"enabled",type:"GestureType[]",description:"Enabled gesture types"}],s=[{title:"Gesture Handler",description:"Handle gestures",code:`<NiceGestureHandler
|
|
2
|
+
onPinch={handleZoom}
|
|
3
|
+
onSwipe={handleSwipe}
|
|
4
|
+
onDoubleTap={resetZoom}
|
|
5
|
+
enabled={['pinch', 'swipe', 'doubleTap']}
|
|
6
|
+
>
|
|
7
|
+
<ImageViewer />
|
|
8
|
+
</NiceGestureHandler>`}],r={keyboard:["Keyboard alternatives for gestures"],aria:[]},l=["NiceSwipeCard","NicePinchZoom"],d={$schema:e,name:n,description:t,category:o,since:i,status:a,props:c,examples:s,accessibility:r,seeAlso:l};exports.$schema=e;exports.accessibility=r;exports.category=o;exports.default=d;exports.description=t;exports.examples=s;exports.name=n;exports.props=c;exports.seeAlso=l;exports.since=i;exports.status=a;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceGestureHandler", o = "Gesture handler for touch interactions like pinch, rotate, swipe.", t = "mobile", a = "1.0.0", c = "planned", i = [{ name: "children", type: "React.ReactNode", required: !0, description: "Content to handle" }, { name: "onPinch", type: "(scale: number) => void", description: "Pinch callback" }, { name: "onRotate", type: "(angle: number) => void", description: "Rotate callback" }, { name: "onSwipe", type: "(direction: SwipeDirection) => void", description: "Swipe callback" }, { name: "onPan", type: "(delta: { x: number; y: number }) => void", description: "Pan callback" }, { name: "onDoubleTap", type: "() => void", description: "Double tap callback" }, { name: "onLongPress", type: "() => void", description: "Long press callback" }, { name: "enabled", type: "GestureType[]", description: "Enabled gesture types" }], s = [{ title: "Gesture Handler", description: "Handle gestures", code: `<NiceGestureHandler
|
|
2
|
+
onPinch={handleZoom}
|
|
3
|
+
onSwipe={handleSwipe}
|
|
4
|
+
onDoubleTap={resetZoom}
|
|
5
|
+
enabled={['pinch', 'swipe', 'doubleTap']}
|
|
6
|
+
>
|
|
7
|
+
<ImageViewer />
|
|
8
|
+
</NiceGestureHandler>` }], r = { keyboard: ["Keyboard alternatives for gestures"], aria: [] }, d = ["NiceSwipeCard", "NicePinchZoom"], l = {
|
|
9
|
+
$schema: e,
|
|
10
|
+
name: n,
|
|
11
|
+
description: o,
|
|
12
|
+
category: t,
|
|
13
|
+
since: a,
|
|
14
|
+
status: c,
|
|
15
|
+
props: i,
|
|
16
|
+
examples: s,
|
|
17
|
+
accessibility: r,
|
|
18
|
+
seeAlso: d
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
e as $schema,
|
|
22
|
+
r as accessibility,
|
|
23
|
+
t as category,
|
|
24
|
+
l as default,
|
|
25
|
+
o as description,
|
|
26
|
+
s as examples,
|
|
27
|
+
n as name,
|
|
28
|
+
i as props,
|
|
29
|
+
d as seeAlso,
|
|
30
|
+
a as since,
|
|
31
|
+
c as status
|
|
32
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceHeader",a="Page header section.",c="layout",o="1.0.0",n="planned",i=[{name:"children",type:"React.ReactNode",description:"Header content"},{name:"title",type:"React.ReactNode",description:"Page title"},{name:"subtitle",type:"React.ReactNode",description:"Subtitle text"},{name:"breadcrumb",type:"BreadcrumbProps",description:"Breadcrumb config"},{name:"extra",type:"React.ReactNode",description:"Extra actions"},{name:"onBack",type:"() => void",description:"Back button callback"},{name:"sticky",type:"boolean",default:"false",description:"Sticky header"}],s=[{title:"Header",description:"Page header",code:`<NiceHeader
|
|
2
|
+
title="Products"
|
|
3
|
+
subtitle="Manage your product catalog"
|
|
4
|
+
onBack={() => navigate(-1)}
|
|
5
|
+
extra={<NiceButton>Add Product</NiceButton>}
|
|
6
|
+
/>`}],r={keyboard:["Tab to back button"],aria:["Banner landmark","Heading level"]},d=["NiceLayout","NicePageHeader"],l={$schema:e,name:t,description:a,category:c,since:o,status:n,props:i,examples:s,accessibility:r,seeAlso:d};exports.$schema=e;exports.accessibility=r;exports.category=c;exports.default=l;exports.description=a;exports.examples=s;exports.name=t;exports.props=i;exports.seeAlso=d;exports.since=o;exports.status=n;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceHeader", a = "Page header section.", c = "layout", n = "1.0.0", o = "planned", i = [{ name: "children", type: "React.ReactNode", description: "Header content" }, { name: "title", type: "React.ReactNode", description: "Page title" }, { name: "subtitle", type: "React.ReactNode", description: "Subtitle text" }, { name: "breadcrumb", type: "BreadcrumbProps", description: "Breadcrumb config" }, { name: "extra", type: "React.ReactNode", description: "Extra actions" }, { name: "onBack", type: "() => void", description: "Back button callback" }, { name: "sticky", type: "boolean", default: "false", description: "Sticky header" }], s = [{ title: "Header", description: "Page header", code: `<NiceHeader
|
|
2
|
+
title="Products"
|
|
3
|
+
subtitle="Manage your product catalog"
|
|
4
|
+
onBack={() => navigate(-1)}
|
|
5
|
+
extra={<NiceButton>Add Product</NiceButton>}
|
|
6
|
+
/>` }], d = { keyboard: ["Tab to back button"], aria: ["Banner landmark", "Heading level"] }, r = ["NiceLayout", "NicePageHeader"], p = {
|
|
7
|
+
$schema: e,
|
|
8
|
+
name: t,
|
|
9
|
+
description: a,
|
|
10
|
+
category: c,
|
|
11
|
+
since: n,
|
|
12
|
+
status: o,
|
|
13
|
+
props: i,
|
|
14
|
+
examples: s,
|
|
15
|
+
accessibility: d,
|
|
16
|
+
seeAlso: r
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
e as $schema,
|
|
20
|
+
d as accessibility,
|
|
21
|
+
c as category,
|
|
22
|
+
p as default,
|
|
23
|
+
a as description,
|
|
24
|
+
s as examples,
|
|
25
|
+
t as name,
|
|
26
|
+
i as props,
|
|
27
|
+
r as seeAlso,
|
|
28
|
+
n as since,
|
|
29
|
+
o as status
|
|
30
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceImage", a = "Image component with loading, error states, and optimization.", n = "display", i = "1.0.0", o = "planned", c = [{ name: "src", type: "string", required: !0, description: "Image source" }, { name: "alt", type: "string", required: !0, description: "Alt text" }, { name: "width", type: "number | string", description: "Image width" }, { name: "height", type: "number | string", description: "Image height" }, { name: "fallback", type: "string | React.ReactNode", description: "Fallback on error" }, { name: "placeholder", type: "'blur' | 'empty' | React.ReactNode", default: "'empty'", description: "Loading placeholder" }, { name: "lazy", type: "boolean", default: "true", description: "Lazy load" }, { name: "objectFit", type: "'cover' | 'contain' | 'fill' | 'none'", default: "'cover'", description: "Object fit" }, { name: "preview", type: "boolean", default: "false", description: "Enable preview on click" }], r = [{ title: "Image", description: "Optimized image", code: `<NiceImage
|
|
2
|
+
src="/photo.jpg"
|
|
3
|
+
alt="Description"
|
|
4
|
+
width={400}
|
|
5
|
+
height={300}
|
|
6
|
+
fallback="/placeholder.jpg"
|
|
7
|
+
placeholder="blur"
|
|
8
|
+
lazy
|
|
9
|
+
preview
|
|
10
|
+
/>` }], s = { keyboard: ["Tab to preview button"], aria: ["Image with alt text", "Loading state"] }, p = ["NiceAvatar", "NiceGallery"], l = {
|
|
11
|
+
$schema: e,
|
|
12
|
+
name: t,
|
|
13
|
+
description: a,
|
|
14
|
+
category: n,
|
|
15
|
+
since: i,
|
|
16
|
+
status: o,
|
|
17
|
+
props: c,
|
|
18
|
+
examples: r,
|
|
19
|
+
accessibility: s,
|
|
20
|
+
seeAlso: p
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
e as $schema,
|
|
24
|
+
s as accessibility,
|
|
25
|
+
n as category,
|
|
26
|
+
l as default,
|
|
27
|
+
a as description,
|
|
28
|
+
r as examples,
|
|
29
|
+
t as name,
|
|
30
|
+
c as props,
|
|
31
|
+
p as seeAlso,
|
|
32
|
+
i as since,
|
|
33
|
+
o as status
|
|
34
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceImage",a="Image component with loading, error states, and optimization.",i="display",n="1.0.0",o="planned",c=[{name:"src",type:"string",required:!0,description:"Image source"},{name:"alt",type:"string",required:!0,description:"Alt text"},{name:"width",type:"number | string",description:"Image width"},{name:"height",type:"number | string",description:"Image height"},{name:"fallback",type:"string | React.ReactNode",description:"Fallback on error"},{name:"placeholder",type:"'blur' | 'empty' | React.ReactNode",default:"'empty'",description:"Loading placeholder"},{name:"lazy",type:"boolean",default:"true",description:"Lazy load"},{name:"objectFit",type:"'cover' | 'contain' | 'fill' | 'none'",default:"'cover'",description:"Object fit"},{name:"preview",type:"boolean",default:"false",description:"Enable preview on click"}],s=[{title:"Image",description:"Optimized image",code:`<NiceImage
|
|
2
|
+
src="/photo.jpg"
|
|
3
|
+
alt="Description"
|
|
4
|
+
width={400}
|
|
5
|
+
height={300}
|
|
6
|
+
fallback="/placeholder.jpg"
|
|
7
|
+
placeholder="blur"
|
|
8
|
+
lazy
|
|
9
|
+
preview
|
|
10
|
+
/>`}],r={keyboard:["Tab to preview button"],aria:["Image with alt text","Loading state"]},l=["NiceAvatar","NiceGallery"],p={$schema:e,name:t,description:a,category:i,since:n,status:o,props:c,examples:s,accessibility:r,seeAlso:l};exports.$schema=e;exports.accessibility=r;exports.category=i;exports.default=p;exports.description=a;exports.examples=s;exports.name=t;exports.props=c;exports.seeAlso=l;exports.since=n;exports.status=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceInPlaceEditor",c="Inline/in-place editing component.",n="input",i="1.0.0",a="planned",o=[{name:"value",type:"string",required:!0,description:"Current value"},{name:"onSave",type:"(value: string) => void",required:!0,description:"Save callback"},{name:"onCancel",type:"() => void",description:"Cancel callback"},{name:"activateOn",type:"'click' | 'dblclick'",default:"'click'",description:"Activation trigger"}],s=[{title:"In-Place Editor",code:"<NiceInPlaceEditor value={title} onSave={updateTitle} />"}],l={keyboard:["Enter to save","Escape to cancel"],aria:["Editable"]},r=["NiceInput","NiceTextarea"],d={$schema:e,name:t,description:c,category:n,since:i,status:a,props:o,examples:s,accessibility:l,seeAlso:r};exports.$schema=e;exports.accessibility=l;exports.category=n;exports.default=d;exports.description=c;exports.examples=s;exports.name=t;exports.props=o;exports.seeAlso=r;exports.since=i;exports.status=a;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceInPlaceEditor", c = "Inline/in-place editing component.", n = "input", i = "1.0.0", a = "planned", o = [{ name: "value", type: "string", required: !0, description: "Current value" }, { name: "onSave", type: "(value: string) => void", required: !0, description: "Save callback" }, { name: "onCancel", type: "() => void", description: "Cancel callback" }, { name: "activateOn", type: "'click' | 'dblclick'", default: "'click'", description: "Activation trigger" }], s = [{ title: "In-Place Editor", code: "<NiceInPlaceEditor value={title} onSave={updateTitle} />" }], l = { keyboard: ["Enter to save", "Escape to cancel"], aria: ["Editable"] }, r = ["NiceInput", "NiceTextarea"], d = {
|
|
2
|
+
$schema: e,
|
|
3
|
+
name: t,
|
|
4
|
+
description: c,
|
|
5
|
+
category: n,
|
|
6
|
+
since: i,
|
|
7
|
+
status: a,
|
|
8
|
+
props: o,
|
|
9
|
+
examples: s,
|
|
10
|
+
accessibility: l,
|
|
11
|
+
seeAlso: r
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
e as $schema,
|
|
15
|
+
l as accessibility,
|
|
16
|
+
n as category,
|
|
17
|
+
d as default,
|
|
18
|
+
c as description,
|
|
19
|
+
s as examples,
|
|
20
|
+
t as name,
|
|
21
|
+
o as props,
|
|
22
|
+
r as seeAlso,
|
|
23
|
+
i as since,
|
|
24
|
+
a as status
|
|
25
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceInteractiveTimeline", t = "Interactive Timeline", i = "1.0.0", o = "planned", a = "planning", s = "timeline", r = "Interactive zoomable timeline (hour→year) with groups, markers, and minimap.", m = "1.0.0", l = ["web", "desktop"], c = ["timeline", "interactive", "zoom", "events", "minimap"], d = [{ name: "events", type: "TimelineEvent[]", required: !0, description: "Events (id, title, start, end, type, group)." }, { name: "groups", type: "TimelineGroup[]", required: !1, description: "Swimlane groups." }, { name: "markers", type: "TimelineMarker[]", required: !1, description: "Milestone lines." }, { name: "initialZoom", type: "'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'", required: !1, default: "'day'", description: "Initial zoom level." }, { name: "width", type: "number | string", required: !1, description: "Timeline width." }, { name: "height", type: "number | string", required: !1, description: "Timeline height." }, { name: "showToday", type: "boolean", required: !1, default: "true", description: "Show today marker." }, { name: "showZoomControls", type: "boolean", required: !1, default: "true", description: "Show zoom buttons." }, { name: "showNavControls", type: "boolean", required: !1, description: "Show navigation arrows." }, { name: "showMinimap", type: "boolean", required: !1, description: "Show minimap overview." }, { name: "renderEvent", type: "(event) => ReactNode", required: !1, description: "Custom event renderer." }, { name: "locale", type: "string", required: !1, description: "Date locale." }], p = [{ name: "onEventClick", parameters: [{ name: "event", type: "TimelineEvent" }], description: "Called when event clicked." }, { name: "onEventHover", parameters: [{ name: "event", type: "TimelineEvent | null" }], description: "Called on event hover." }, { name: "onDateChange", parameters: [{ name: "date", type: "Date" }], description: "Called when visible date changes." }, { name: "onZoomChange", parameters: [{ name: "zoom", type: "string" }], description: "Called when zoom level changes." }], v = [{ name: "goToDate", signature: "(date: Date) => void", description: "Navigate to specific date." }, { name: "zoomIn", signature: "() => void", description: "Zoom in one level." }, { name: "zoomOut", signature: "() => void", description: "Zoom out one level." }, { name: "setZoom", signature: "(zoom: ZoomLevel) => void", description: "Set specific zoom level." }], u = [], h = [{ title: "Project Timeline", code: `const timelineRef = useRef<NiceTimelineRef>(null);
|
|
2
|
+
|
|
3
|
+
<NiceInteractiveTimeline
|
|
4
|
+
ref={timelineRef}
|
|
5
|
+
events={projectEvents}
|
|
6
|
+
groups={teams}
|
|
7
|
+
initialZoom="week"
|
|
8
|
+
showMinimap
|
|
9
|
+
showZoomControls
|
|
10
|
+
onEventClick={handleEventClick}
|
|
11
|
+
/>`, language: "tsx" }], g = [{ name: "NiceTimeline", relationship: "simple" }, { name: "NiceGantt", relationship: "tasks" }], y = {
|
|
12
|
+
$schema: e,
|
|
13
|
+
name: n,
|
|
14
|
+
displayName: t,
|
|
15
|
+
version: i,
|
|
16
|
+
status: o,
|
|
17
|
+
category: a,
|
|
18
|
+
subcategory: s,
|
|
19
|
+
package: "@nicetoDev/ui",
|
|
20
|
+
description: r,
|
|
21
|
+
since: m,
|
|
22
|
+
platforms: l,
|
|
23
|
+
keywords: c,
|
|
24
|
+
props: d,
|
|
25
|
+
events: p,
|
|
26
|
+
methods: v,
|
|
27
|
+
cssVariables: u,
|
|
28
|
+
examples: h,
|
|
29
|
+
related: g
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
e as $schema,
|
|
33
|
+
a as category,
|
|
34
|
+
u as cssVariables,
|
|
35
|
+
y as default,
|
|
36
|
+
r as description,
|
|
37
|
+
t as displayName,
|
|
38
|
+
p as events,
|
|
39
|
+
h as examples,
|
|
40
|
+
c as keywords,
|
|
41
|
+
v as methods,
|
|
42
|
+
n as name,
|
|
43
|
+
l as platforms,
|
|
44
|
+
d as props,
|
|
45
|
+
g as related,
|
|
46
|
+
m as since,
|
|
47
|
+
o as status,
|
|
48
|
+
s as subcategory,
|
|
49
|
+
i as version
|
|
50
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",n="NiceInteractiveTimeline",t="Interactive Timeline",i="1.0.0",o="planned",a="planning",s="timeline",r="Interactive zoomable timeline (hour→year) with groups, markers, and minimap.",l="1.0.0",m=["web","desktop"],c=["timeline","interactive","zoom","events","minimap"],d=[{name:"events",type:"TimelineEvent[]",required:!0,description:"Events (id, title, start, end, type, group)."},{name:"groups",type:"TimelineGroup[]",required:!1,description:"Swimlane groups."},{name:"markers",type:"TimelineMarker[]",required:!1,description:"Milestone lines."},{name:"initialZoom",type:"'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'",required:!1,default:"'day'",description:"Initial zoom level."},{name:"width",type:"number | string",required:!1,description:"Timeline width."},{name:"height",type:"number | string",required:!1,description:"Timeline height."},{name:"showToday",type:"boolean",required:!1,default:"true",description:"Show today marker."},{name:"showZoomControls",type:"boolean",required:!1,default:"true",description:"Show zoom buttons."},{name:"showNavControls",type:"boolean",required:!1,description:"Show navigation arrows."},{name:"showMinimap",type:"boolean",required:!1,description:"Show minimap overview."},{name:"renderEvent",type:"(event) => ReactNode",required:!1,description:"Custom event renderer."},{name:"locale",type:"string",required:!1,description:"Date locale."}],p=[{name:"onEventClick",parameters:[{name:"event",type:"TimelineEvent"}],description:"Called when event clicked."},{name:"onEventHover",parameters:[{name:"event",type:"TimelineEvent | null"}],description:"Called on event hover."},{name:"onDateChange",parameters:[{name:"date",type:"Date"}],description:"Called when visible date changes."},{name:"onZoomChange",parameters:[{name:"zoom",type:"string"}],description:"Called when zoom level changes."}],v=[{name:"goToDate",signature:"(date: Date) => void",description:"Navigate to specific date."},{name:"zoomIn",signature:"() => void",description:"Zoom in one level."},{name:"zoomOut",signature:"() => void",description:"Zoom out one level."},{name:"setZoom",signature:"(zoom: ZoomLevel) => void",description:"Set specific zoom level."}],u=[],h=[{title:"Project Timeline",code:`const timelineRef = useRef<NiceTimelineRef>(null);
|
|
2
|
+
|
|
3
|
+
<NiceInteractiveTimeline
|
|
4
|
+
ref={timelineRef}
|
|
5
|
+
events={projectEvents}
|
|
6
|
+
groups={teams}
|
|
7
|
+
initialZoom="week"
|
|
8
|
+
showMinimap
|
|
9
|
+
showZoomControls
|
|
10
|
+
onEventClick={handleEventClick}
|
|
11
|
+
/>`,language:"tsx"}],y=[{name:"NiceTimeline",relationship:"simple"},{name:"NiceGantt",relationship:"tasks"}],g={$schema:e,name:n,displayName:t,version:i,status:o,category:a,subcategory:s,package:"@nicetoDev/ui",description:r,since:l,platforms:m,keywords:c,props:d,events:p,methods:v,cssVariables:u,examples:h,related:y};exports.$schema=e;exports.category=a;exports.cssVariables=u;exports.default=g;exports.description=r;exports.displayName=t;exports.events=p;exports.examples=h;exports.keywords=c;exports.methods=v;exports.name=n;exports.platforms=m;exports.props=d;exports.related=y;exports.since=l;exports.status=o;exports.subcategory=s;exports.version=i;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceJsonEditor", o = "JSON editor with validation and tree view.", n = "editors", a = "1.0.0", i = "planned", d = [{ name: "value", type: "object | string", required: !0, description: "JSON value" }, { name: "onChange", type: "(value: object) => void", required: !0, description: "Change callback" }, { name: "mode", type: "'tree' | 'code' | 'text'", default: "'tree'", description: "View mode" }, { name: "schema", type: "object", description: "JSON schema for validation" }, { name: "readOnly", type: "boolean", default: "false", description: "Read-only mode" }, { name: "height", type: "number | string", default: "400", description: "Editor height" }, { name: "onValidate", type: "(errors: ValidationError[]) => void", description: "Validation callback" }, { name: "expandAll", type: "boolean", default: "false", description: "Expand all nodes" }], s = [{ title: "JSON Editor", description: "Edit JSON", code: `<NiceJsonEditor
|
|
2
|
+
value={jsonData}
|
|
3
|
+
onChange={setJsonData}
|
|
4
|
+
mode="tree"
|
|
5
|
+
schema={jsonSchema}
|
|
6
|
+
onValidate={handleValidation}
|
|
7
|
+
/>` }], c = { keyboard: ["Tab through nodes", "Enter to edit"], aria: ["JSON editor", "Node descriptions"] }, r = ["NiceCodeEditor", "NicePropertyGrid"], l = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: t,
|
|
10
|
+
description: o,
|
|
11
|
+
category: n,
|
|
12
|
+
since: a,
|
|
13
|
+
status: i,
|
|
14
|
+
props: d,
|
|
15
|
+
examples: s,
|
|
16
|
+
accessibility: c,
|
|
17
|
+
seeAlso: r
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
c as accessibility,
|
|
22
|
+
n as category,
|
|
23
|
+
l as default,
|
|
24
|
+
o as description,
|
|
25
|
+
s as examples,
|
|
26
|
+
t as name,
|
|
27
|
+
d as props,
|
|
28
|
+
r as seeAlso,
|
|
29
|
+
a as since,
|
|
30
|
+
i as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceJsonEditor",o="JSON editor with validation and tree view.",n="editors",i="1.0.0",a="planned",s=[{name:"value",type:"object | string",required:!0,description:"JSON value"},{name:"onChange",type:"(value: object) => void",required:!0,description:"Change callback"},{name:"mode",type:"'tree' | 'code' | 'text'",default:"'tree'",description:"View mode"},{name:"schema",type:"object",description:"JSON schema for validation"},{name:"readOnly",type:"boolean",default:"false",description:"Read-only mode"},{name:"height",type:"number | string",default:"400",description:"Editor height"},{name:"onValidate",type:"(errors: ValidationError[]) => void",description:"Validation callback"},{name:"expandAll",type:"boolean",default:"false",description:"Expand all nodes"}],d=[{title:"JSON Editor",description:"Edit JSON",code:`<NiceJsonEditor
|
|
2
|
+
value={jsonData}
|
|
3
|
+
onChange={setJsonData}
|
|
4
|
+
mode="tree"
|
|
5
|
+
schema={jsonSchema}
|
|
6
|
+
onValidate={handleValidation}
|
|
7
|
+
/>`}],c={keyboard:["Tab through nodes","Enter to edit"],aria:["JSON editor","Node descriptions"]},r=["NiceCodeEditor","NicePropertyGrid"],l={$schema:e,name:t,description:o,category:n,since:i,status:a,props:s,examples:d,accessibility:c,seeAlso:r};exports.$schema=e;exports.accessibility=c;exports.category=n;exports.default=l;exports.description=o;exports.examples=d;exports.name=t;exports.props=s;exports.seeAlso=r;exports.since=i;exports.status=a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceMegaMenu",n="Mega menu with multi-column layouts and rich content.",o="navigation",c="1.0.0",i="planned",s=[{name:"items",type:"MegaMenuItem[]",required:!0,description:"Menu items"},{name:"onItemClick",type:"(item: MegaMenuItem) => void",description:"Item click callback"},{name:"trigger",type:"'click' | 'hover'",default:"'hover'",description:"Trigger type"},{name:"columns",type:"number",default:"4",description:"Column count"},{name:"showIcons",type:"boolean",default:"true",description:"Show item icons"},{name:"showDescriptions",type:"boolean",default:"true",description:"Show descriptions"},{name:"featured",type:"React.ReactNode",description:"Featured content"}],a=[{title:"Mega Menu",description:"Rich navigation menu",code:`<NiceMegaMenu
|
|
2
|
+
items={menuStructure}
|
|
3
|
+
onItemClick={handleNavigation}
|
|
4
|
+
columns={4}
|
|
5
|
+
showIcons
|
|
6
|
+
showDescriptions
|
|
7
|
+
/>`}],r={keyboard:["Tab through items","Arrow keys to navigate"],aria:["Menu role","Submenu announcements"]},u=["NiceToolbar","NiceUserMenu"],m={$schema:e,name:t,description:n,category:o,since:c,status:i,props:s,examples:a,accessibility:r,seeAlso:u};exports.$schema=e;exports.accessibility=r;exports.category=o;exports.default=m;exports.description=n;exports.examples=a;exports.name=t;exports.props=s;exports.seeAlso=u;exports.since=c;exports.status=i;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceMegaMenu", t = "Mega menu with multi-column layouts and rich content.", o = "navigation", c = "1.0.0", i = "planned", s = [{ name: "items", type: "MegaMenuItem[]", required: !0, description: "Menu items" }, { name: "onItemClick", type: "(item: MegaMenuItem) => void", description: "Item click callback" }, { name: "trigger", type: "'click' | 'hover'", default: "'hover'", description: "Trigger type" }, { name: "columns", type: "number", default: "4", description: "Column count" }, { name: "showIcons", type: "boolean", default: "true", description: "Show item icons" }, { name: "showDescriptions", type: "boolean", default: "true", description: "Show descriptions" }, { name: "featured", type: "React.ReactNode", description: "Featured content" }], a = [{ title: "Mega Menu", description: "Rich navigation menu", code: `<NiceMegaMenu
|
|
2
|
+
items={menuStructure}
|
|
3
|
+
onItemClick={handleNavigation}
|
|
4
|
+
columns={4}
|
|
5
|
+
showIcons
|
|
6
|
+
showDescriptions
|
|
7
|
+
/>` }], r = { keyboard: ["Tab through items", "Arrow keys to navigate"], aria: ["Menu role", "Submenu announcements"] }, u = ["NiceToolbar", "NiceUserMenu"], m = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: n,
|
|
10
|
+
description: t,
|
|
11
|
+
category: o,
|
|
12
|
+
since: c,
|
|
13
|
+
status: i,
|
|
14
|
+
props: s,
|
|
15
|
+
examples: a,
|
|
16
|
+
accessibility: r,
|
|
17
|
+
seeAlso: u
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
r as accessibility,
|
|
22
|
+
o as category,
|
|
23
|
+
m as default,
|
|
24
|
+
t as description,
|
|
25
|
+
a as examples,
|
|
26
|
+
n as name,
|
|
27
|
+
s as props,
|
|
28
|
+
u as seeAlso,
|
|
29
|
+
c as since,
|
|
30
|
+
i as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceMentionInput", t = "Text input with @mention support for users and entities.", i = "input", o = "1.0.0", s = "planned", r = [{ name: "value", type: "string", required: !0, description: "Input value" }, { name: "onChange", type: "(value: string) => void", required: !0, description: "Change callback" }, { name: "mentionTrigger", type: "string", default: "'@'", description: "Mention trigger character" }, { name: "getSuggestions", type: "(query: string) => Promise<MentionItem[]>", required: !0, description: "Get suggestions" }, { name: "onMention", type: "(item: MentionItem) => void", description: "Mention callback" }, { name: "renderSuggestion", type: "(item: MentionItem) => React.ReactNode", description: "Custom suggestion renderer" }, { name: "placeholder", type: "string", description: "Placeholder text" }, { name: "multiLine", type: "boolean", default: "false", description: "Multi-line input" }], c = [{ title: "Mention Input", description: "Input with mentions", code: `<NiceMentionInput
|
|
2
|
+
value={comment}
|
|
3
|
+
onChange={setComment}
|
|
4
|
+
getSuggestions={searchUsers}
|
|
5
|
+
onMention={handleMention}
|
|
6
|
+
placeholder="Type @ to mention..."
|
|
7
|
+
multiLine
|
|
8
|
+
/>` }], a = { keyboard: ["Arrow keys for suggestions", "Enter to select"], aria: ["Input with suggestions", "Mention list"] }, p = ["NiceRichTextEditor", "NiceTagInput"], u = {
|
|
9
|
+
$schema: e,
|
|
10
|
+
name: n,
|
|
11
|
+
description: t,
|
|
12
|
+
category: i,
|
|
13
|
+
since: o,
|
|
14
|
+
status: s,
|
|
15
|
+
props: r,
|
|
16
|
+
examples: c,
|
|
17
|
+
accessibility: a,
|
|
18
|
+
seeAlso: p
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
e as $schema,
|
|
22
|
+
a as accessibility,
|
|
23
|
+
i as category,
|
|
24
|
+
u as default,
|
|
25
|
+
t as description,
|
|
26
|
+
c as examples,
|
|
27
|
+
n as name,
|
|
28
|
+
r as props,
|
|
29
|
+
p as seeAlso,
|
|
30
|
+
o as since,
|
|
31
|
+
s as status
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceMentionInput",n="Text input with @mention support for users and entities.",i="input",o="1.0.0",s="planned",c=[{name:"value",type:"string",required:!0,description:"Input value"},{name:"onChange",type:"(value: string) => void",required:!0,description:"Change callback"},{name:"mentionTrigger",type:"string",default:"'@'",description:"Mention trigger character"},{name:"getSuggestions",type:"(query: string) => Promise<MentionItem[]>",required:!0,description:"Get suggestions"},{name:"onMention",type:"(item: MentionItem) => void",description:"Mention callback"},{name:"renderSuggestion",type:"(item: MentionItem) => React.ReactNode",description:"Custom suggestion renderer"},{name:"placeholder",type:"string",description:"Placeholder text"},{name:"multiLine",type:"boolean",default:"false",description:"Multi-line input"}],r=[{title:"Mention Input",description:"Input with mentions",code:`<NiceMentionInput
|
|
2
|
+
value={comment}
|
|
3
|
+
onChange={setComment}
|
|
4
|
+
getSuggestions={searchUsers}
|
|
5
|
+
onMention={handleMention}
|
|
6
|
+
placeholder="Type @ to mention..."
|
|
7
|
+
multiLine
|
|
8
|
+
/>`}],a={keyboard:["Arrow keys for suggestions","Enter to select"],aria:["Input with suggestions","Mention list"]},p=["NiceRichTextEditor","NiceTagInput"],u={$schema:e,name:t,description:n,category:i,since:o,status:s,props:c,examples:r,accessibility:a,seeAlso:p};exports.$schema=e;exports.accessibility=a;exports.category=i;exports.default=u;exports.description=n;exports.examples=r;exports.name=t;exports.props=c;exports.seeAlso=p;exports.since=o;exports.status=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("./core-DQYnL6uf.cjs"),c=require("react"),g=require("react-dom"),E=({open:l,onClose:a,title:n,size:f="md",children:h,footer:r,closeOnOverlay:v=!0,closeOnEscape:d=!0,fullscreenable:y,zIndex:i,className:x,style:_,displayStyle:u})=>{const{t:b}=t.$o(),j=c.useContext(t.nr),m=c.useRef(null),[o,N]=c.useState(!1),k=t.cs("modal",u),w=t.ls("modal",u);if(t.As(m,l),c.useEffect(()=>{if(!l||!d)return;const s=L=>{L.key==="Escape"&&a()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[l,d,a]),c.useEffect(()=>(l?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[l]),!l||typeof document>"u")return null;const C=e.jsx("div",{className:"nice-modal-overlay",style:i?{zIndex:i}:void 0,onClick:v?a:void 0,children:e.jsxs("div",{ref:m,className:`nice-modal nice-modal--${o?"full":f} nice-modal--ds-${w} ${x||""}`,style:{...k,..._},role:"dialog","aria-modal":"true","aria-label":n,onClick:s=>s.stopPropagation(),children:[n&&e.jsxs("div",{className:"nice-modal__header",children:[e.jsx("h2",{className:"nice-modal__title",children:n}),e.jsxs("div",{className:"nice-modal__header-actions",children:[y&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>N(s=>!s),"aria-label":o?"Exit fullscreen":"Fullscreen",children:o?"⇲":"⇱"}),e.jsx("button",{type:"button",className:"nice-modal__close",onClick:a,"aria-label":b("controls.close","Close"),children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]})]}),e.jsx("div",{className:"nice-modal__body",children:h}),r&&e.jsx("div",{className:"nice-modal__footer",children:r})]})});return g.createPortal(C,j?.portalTarget??document.body)};exports.NiceModal=E;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { $ as g, n as $, c as E, l as F, A as j } from "./core-BIA5_uSq.js";
|
|
3
|
+
import { useContext as A, useRef as M, useState as P, useEffect as u } from "react";
|
|
4
|
+
import { createPortal as R } from "react-dom";
|
|
5
|
+
const z = ({
|
|
6
|
+
open: l,
|
|
7
|
+
onClose: o,
|
|
8
|
+
title: t,
|
|
9
|
+
size: f = "md",
|
|
10
|
+
children: h,
|
|
11
|
+
footer: s,
|
|
12
|
+
closeOnOverlay: v = !0,
|
|
13
|
+
closeOnEscape: c = !0,
|
|
14
|
+
fullscreenable: y,
|
|
15
|
+
zIndex: d,
|
|
16
|
+
className: _,
|
|
17
|
+
style: b,
|
|
18
|
+
displayStyle: i
|
|
19
|
+
}) => {
|
|
20
|
+
const { t: N } = g(), k = A($), m = M(null), [n, p] = P(!1), w = E("modal", i), x = F("modal", i);
|
|
21
|
+
if (j(m, l), u(() => {
|
|
22
|
+
if (!l || !c)
|
|
23
|
+
return;
|
|
24
|
+
const a = (L) => {
|
|
25
|
+
L.key === "Escape" && o();
|
|
26
|
+
};
|
|
27
|
+
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
28
|
+
}, [l, c, o]), u(() => (l ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
29
|
+
document.body.style.overflow = "";
|
|
30
|
+
}), [l]), !l || typeof document > "u")
|
|
31
|
+
return null;
|
|
32
|
+
const C = /* @__PURE__ */ e(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
className: "nice-modal-overlay",
|
|
36
|
+
style: d ? { zIndex: d } : void 0,
|
|
37
|
+
onClick: v ? o : void 0,
|
|
38
|
+
children: /* @__PURE__ */ r(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: m,
|
|
42
|
+
className: `nice-modal nice-modal--${n ? "full" : f} nice-modal--ds-${x} ${_ || ""}`,
|
|
43
|
+
style: { ...w, ...b },
|
|
44
|
+
role: "dialog",
|
|
45
|
+
"aria-modal": "true",
|
|
46
|
+
"aria-label": t,
|
|
47
|
+
onClick: (a) => a.stopPropagation(),
|
|
48
|
+
children: [
|
|
49
|
+
t && /* @__PURE__ */ r("div", { className: "nice-modal__header", children: [
|
|
50
|
+
/* @__PURE__ */ e("h2", { className: "nice-modal__title", children: t }),
|
|
51
|
+
/* @__PURE__ */ r("div", { className: "nice-modal__header-actions", children: [
|
|
52
|
+
y && /* @__PURE__ */ e(
|
|
53
|
+
"button",
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
className: "nice-modal__fullscreen",
|
|
57
|
+
onClick: () => p((a) => !a),
|
|
58
|
+
"aria-label": n ? "Exit fullscreen" : "Fullscreen",
|
|
59
|
+
children: n ? "⇲" : "⇱"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ e(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
className: "nice-modal__close",
|
|
67
|
+
onClick: o,
|
|
68
|
+
"aria-label": N("controls.close", "Close"),
|
|
69
|
+
children: /* @__PURE__ */ e(
|
|
70
|
+
"svg",
|
|
71
|
+
{
|
|
72
|
+
width: "24",
|
|
73
|
+
height: "24",
|
|
74
|
+
viewBox: "0 0 20 20",
|
|
75
|
+
fill: "currentColor",
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
children: /* @__PURE__ */ e("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ e("div", { className: "nice-modal__body", children: h }),
|
|
85
|
+
s && /* @__PURE__ */ e("div", { className: "nice-modal__footer", children: s })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
return R(C, k?.portalTarget ?? document.body);
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
z as N
|
|
95
|
+
};
|