@nice2dev/ui 1.0.17 → 1.0.19
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 +316 -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/NiceErrorBoundary-DBCCmeyl.js +770 -0
- package/dist/NiceErrorBoundary-V6wkSSLP.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/NiceForm-DLADlHAQ.js +5383 -0
- package/dist/NiceForm-DUkduLqG.cjs +382 -0
- package/dist/NiceForm.css +1 -1
- 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/NiceModal-CUdeVj-j.js +95 -0
- package/dist/NiceModal-Cc8R-DpX.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-4UEsYB5r.js +6553 -0
- package/dist/NiceModuleLifecyclePanel-BDnsr5ZW.js +6349 -0
- package/dist/NiceModuleLifecyclePanel-C6agdtTI.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-F1uN0gMh.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- 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/NicePagination-Cqr3Pe_F.js +171 -0
- package/dist/NicePagination-DyWWdtb3.cjs +1 -0
- package/dist/NicePinCodeInput-C6zJxUVf.cjs +419 -0
- package/dist/NicePinCodeInput-DG_-eXXJ.cjs +419 -0
- package/dist/NicePinCodeInput-g-yUiepm.js +11875 -0
- package/dist/NicePinCodeInput-ltwzQf4r.js +12240 -0
- package/dist/NicePinCodeInput.css +1 -1
- 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-BIXW0y1X.js +6455 -0
- package/dist/NiceSavedQueryPanel-CE3QR4RY.js +6446 -0
- package/dist/NiceSavedQueryPanel-CFHwMDIx.cjs +596 -0
- package/dist/NiceSavedQueryPanel-DSnj-3Es.cjs +596 -0
- package/dist/NiceSavedQueryPanel.css +1 -1
- 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-B9zxj6qd.js +1657 -0
- package/dist/NiceTabs-Blk0h4jY.js +1624 -0
- package/dist/NiceTabs-CNauJ4fu.cjs +1 -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-Bo_yCa1o.js +1418 -0
- package/dist/NiceWindow-DPzJxOfx.cjs +1 -0
- package/dist/NiceWindow-UpKllge7.cjs +1 -0
- package/dist/charts-0BEMJ0Xt.js +4657 -0
- package/dist/charts-C60va95_.js +4657 -0
- package/dist/charts-CbxmU6Z2.cjs +761 -0
- package/dist/charts-D_I1iwel.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.css +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-Bcc4sz15.cjs +96 -0
- package/dist/core-DQYnL6uf.cjs +96 -0
- package/dist/core-Da1dGJN3.js +22401 -0
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +5 -0
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +44 -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-DCDfWfAt.js +64336 -0
- package/dist/index-DpiCo0_e.cjs +5194 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1798 -57
- 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.d.ts +15 -1
- package/dist/navigation.mjs +30 -30
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +53 -53
- package/dist/style.css +6 -6
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
.nice-data-grid-ai{--ai-primary: var(--
|
|
1
|
+
.nice-data-grid-ai{--ai-primary: var(--color-info, #3b82f6);--ai-primary-light: var(--nice-accent, #818cf8);--ai-bg: var(--bg-secondary, #f8fafc);--ai-border: var(--border-color, #e5e7eb);--ai-text: var(--text-primary, #0f172a);--ai-text-muted: var(--text-secondary, #475569);--ai-success: var(--color-success, #10b981);--ai-panel-bg: var(--bg-primary, #ffffff);display:flex;flex-direction:column;border-radius:var(--nice-radius-lg, 8px);overflow:hidden;border:1px solid var(--ai-border);background:var(--ai-panel-bg)}[data-theme=dark] .nice-data-grid-ai,.nice-data-grid-ai.dark{--ai-primary: var(--nice-accent, #818cf8);--ai-primary-light: var(--nice-accent, #a5b4fc);--ai-bg: var(--text-primary, #0f172a);--ai-border: var(--text-primary, #0f172a);--ai-text: var(--border-color, #e5e7eb);--ai-text-muted: var(--text-muted, #94a3b8);--ai-success: var(--color-success, #10b981);--ai-panel-bg: var(--text-primary, #0f172a)}.nice-data-grid-ai__search-bar{display:flex;align-items:center;gap:var(--nice-space-3, 12px);padding:var(--nice-space-3, 12px) var(--nice-space-4, 16px);background:linear-gradient(135deg,var(--color-info, #3b82f6) 0%,var(--nice-accent, #8b5cf6) 100%)}.nice-data-grid-ai__search-left{display:flex;align-items:center}.nice-data-grid-ai__badge{display:inline-flex;align-items:center;justify-content:center;padding:var(--nice-space-0-75, 3px) var(--nice-space-2-5, 10px);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ai-primary);background:#fff;border-radius:var(--nice-radius-sm, 4px)}.nice-data-grid-ai__search-form{flex:1;display:flex;gap:var(--nice-space-2, 8px)}.nice-data-grid-ai__input-wrapper{flex:1;position:relative;display:flex;align-items:center}.nice-data-grid-ai__search-icon{position:absolute;left:12px;font-size:14px;pointer-events:none}.nice-data-grid-ai__input{width:100%;padding:var(--nice-space-2-5, 10px) 36px var(--nice-space-2-5, 10px) 38px;font-size:14px;color:var(--ai-text);background:#fff;border:none;border-radius:var(--nice-radius-md, 6px);outline:none;transition:box-shadow .15s ease}.nice-data-grid-ai__input:focus{box-shadow:0 0 0 3px var(--nice-overlay-light-30, color-mix(in srgb, var(--text-on-primary, #fff) 30%, transparent))}.nice-data-grid-ai__input::placeholder{color:var(--ai-text-muted)}.nice-data-grid-ai__loading-spinner{position:absolute;right:40px;width:16px;height:16px;border:2px solid var(--ai-border);border-top-color:var(--ai-primary);border-radius:var(--nice-radius-full, 50%);animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.nice-data-grid-ai__clear-input{position:absolute;right:10px;display:flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;font-size:12px;color:var(--ai-text-muted);background:transparent;border:none;border-radius:var(--nice-radius-full, 50%);cursor:pointer;transition:all .15s ease}.nice-data-grid-ai__clear-input:hover{color:var(--ai-text);background:var(--ai-bg)}.nice-data-grid-ai__search-btn{padding:var(--nice-space-2-5, 10px) var(--nice-space-5, 20px);font-size:14px;font-weight:500;color:var(--ai-primary);background:#fff;border:none;border-radius:var(--nice-radius-md, 6px);cursor:pointer;transition:all .15s ease;white-space:nowrap}.nice-data-grid-ai__search-btn:hover:not(:disabled){background:var(--bg-secondary, #f8fafc)}.nice-data-grid-ai__search-btn:disabled{opacity:.6;cursor:not-allowed}.nice-data-grid-ai__insights-btn{padding:var(--nice-space-2-5, 10px) var(--nice-space-4, 16px);font-size:13px;font-weight:500;color:#fff;background:var(--nice-overlay-light-15, color-mix(in srgb, var(--text-on-primary, #fff) 15%, transparent));border:1px solid var(--nice-overlay-light-25, color-mix(in srgb, var(--text-on-primary, #fff) 25%, transparent));border-radius:var(--nice-radius-md, 6px);cursor:pointer;transition:all .15s ease;white-space:nowrap}.nice-data-grid-ai__insights-btn:hover:not(:disabled){background:var(--nice-overlay-light-25, color-mix(in srgb, var(--text-on-primary, #fff) 25%, transparent))}.nice-data-grid-ai__insights-btn:disabled{opacity:.5;cursor:not-allowed}.nice-data-grid-ai__examples{display:flex;align-items:center;gap:var(--nice-space-3, 12px);padding:var(--nice-space-2, 8px) var(--nice-space-4, 16px);background:var(--ai-bg);border-bottom:1px solid var(--ai-border);flex-wrap:wrap}.nice-data-grid-ai__examples-label{font-size:12px;color:var(--ai-text-muted);white-space:nowrap}.nice-data-grid-ai__examples-list{display:flex;gap:var(--nice-space-2, 8px);flex-wrap:wrap}.nice-data-grid-ai__example{padding:var(--nice-space-1, 4px) var(--nice-space-2-5, 10px);font-size:12px;font-style:italic;color:var(--ai-primary);background:transparent;border:1px dashed var(--ai-border);border-radius:var(--nice-radius-sm, 4px);cursor:pointer;transition:all .15s ease}.nice-data-grid-ai__example:hover{color:#fff;background:var(--ai-primary);border-color:var(--ai-primary);border-style:solid}.nice-data-grid-ai__active-filter{display:flex;align-items:center;gap:var(--nice-space-3, 12px);padding:var(--nice-space-2-5, 10px) var(--nice-space-4, 16px);background:var(--nice-accent-tint-8, rgba(99, 102, 241, .08));border-bottom:1px solid var(--ai-border);flex-wrap:wrap}.nice-data-grid-ai__filter-info{display:flex;align-items:center;gap:var(--nice-space-2, 8px)}.nice-data-grid-ai__filter-icon{font-size:14px}.nice-data-grid-ai__filter-query{font-size:13px;font-weight:500;color:var(--ai-primary)}.nice-data-grid-ai__filter-count{font-size:12px;color:var(--ai-text-muted)}.nice-data-grid-ai__filter-badges{display:flex;gap:var(--nice-space-1-5, 6px);flex-wrap:wrap}.nice-data-grid-ai__filter-badge{padding:var(--nice-space-0-75, 3px) var(--nice-space-2, 8px);font-size:11px;font-family:Fira Code,monospace;color:var(--ai-text);background:var(--ai-bg);border:1px solid var(--ai-border);border-radius:var(--nice-radius-sm, 3px)}.nice-data-grid-ai__clear-filter{margin-left:auto;padding:var(--nice-space-1, 4px) var(--nice-space-2-5, 10px);font-size:12px;color:var(--ai-text-muted);background:transparent;border:1px solid var(--ai-border);border-radius:var(--nice-radius-sm, 4px);cursor:pointer;transition:all .15s ease}.nice-data-grid-ai__clear-filter:hover{color:var(--color-danger, #ef4444);border-color:var(--color-danger, #ef4444)}.nice-data-grid-ai__grid-wrapper{flex:1;min-height:200px}.nice-data-grid-ai__insights-panel{position:fixed;top:20%;right:20px;width:360px;max-height:60vh;background:var(--ai-panel-bg);border-radius:var(--nice-radius-xl, 12px);box-shadow:0 20px 40px var(--nice-overlay-20, color-mix(in srgb, var(--text-primary, #000) 20%, transparent));display:flex;flex-direction:column;z-index:1000;animation:slideIn .2s ease-out}@keyframes slideIn{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.nice-data-grid-ai__insights-header{display:flex;align-items:center;justify-content:space-between;padding:var(--nice-space-3-5, 14px) var(--nice-space-4, 16px);background:var(--ai-bg);border-bottom:1px solid var(--ai-border);border-radius:var(--nice-radius-xl, 12px) var(--nice-radius-xl, 12px) 0 0}.nice-data-grid-ai__insights-header h4{margin:0;font-size:15px;font-weight:600;color:var(--ai-text)}.nice-data-grid-ai__insights-close{display:flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;font-size:14px;color:var(--ai-text-muted);background:transparent;border:none;border-radius:var(--nice-radius-md, 6px);cursor:pointer;transition:all .15s ease}.nice-data-grid-ai__insights-close:hover{color:var(--ai-text);background:var(--ai-border)}.nice-data-grid-ai__insights-body{flex:1;overflow-y:auto;padding:var(--nice-space-4, 16px)}.nice-data-grid-ai__insights-loading{display:flex;align-items:center;justify-content:center;padding:var(--nice-space-8, 32px);color:var(--ai-primary);font-size:14px}.nice-data-grid-ai__insights-loading:before{content:"";display:inline-block;width:18px;height:18px;margin-right:var(--nice-space-2-5, 10px);border:2px solid var(--ai-border);border-top-color:var(--ai-primary);border-radius:var(--nice-radius-full, 50%);animation:spin .8s linear infinite}.nice-data-grid-ai__insights-list{margin:0;padding:0;list-style:none}.nice-data-grid-ai__insight{display:flex;align-items:flex-start;gap:var(--nice-space-2-5, 10px);padding:var(--nice-space-3, 12px) 0;font-size:14px;line-height:1.5;color:var(--ai-text);border-bottom:1px solid var(--ai-border)}.nice-data-grid-ai__insight:last-child{border-bottom:none}.nice-data-grid-ai__insight-bullet{color:var(--ai-primary);font-weight:700}.nice-data-grid-ai__insights-empty{text-align:center;padding:var(--nice-space-6, 24px);color:var(--ai-text-muted);font-size:14px}.nice-data-grid-ai__insights-footer{padding:var(--nice-space-3, 12px) var(--nice-space-4, 16px);border-top:1px solid var(--ai-border)}.nice-data-grid-ai__refresh-insights{width:100%;padding:var(--nice-space-2-5, 10px);font-size:13px;font-weight:500;color:var(--ai-primary);background:transparent;border:1px solid var(--ai-border);border-radius:var(--nice-radius-md, 6px);cursor:pointer;transition:all .15s ease}.nice-data-grid-ai__refresh-insights:hover:not(:disabled){background:var(--ai-bg);border-color:var(--ai-primary)}.nice-data-grid-ai__refresh-insights:disabled{opacity:.5;cursor:not-allowed}@media(max-width:768px){.nice-data-grid-ai__search-bar{flex-wrap:wrap}.nice-data-grid-ai__search-form{width:100%;order:1;margin-top:var(--nice-space-2, 8px)}.nice-data-grid-ai__insights-panel{position:fixed;inset:auto 0 0;width:100%;max-height:50vh;border-radius:var(--nice-radius-xl, 12px) var(--nice-radius-xl, 12px) 0 0}}@media(max-width:480px){.nice-data-grid-ai__search-form{flex-direction:column}.nice-data-grid-ai__search-btn{width:100%}.nice-data-grid-ai__examples{flex-direction:column;align-items:flex-start}.nice-data-grid-ai__examples-list{width:100%}}
|
|
@@ -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="NiceSceneSelector",c="Smart home scene selector for activating preset configurations.",n="smart-home",i="1.0.0",o="planned",s=[{name:"scenes",type:"Scene[]",required:!0,description:"Available scenes"},{name:"activeScene",type:"string",description:"Active scene ID"},{name:"onActivate",type:"(scene: Scene) => Promise<void>",description:"Activation callback"},{name:"onEdit",type:"(scene: Scene) => void",description:"Edit callback"},{name:"onCreate",type:"() => void",description:"Create callback"},{name:"layout",type:"'grid' | 'list'",default:"'grid'",description:"Display layout"},{name:"showQuickActions",type:"boolean",default:"true",description:"Show quick actions"}],a=[{title:"Scene Selector",description:"Activate scenes",code:`<NiceSceneSelector
|
|
2
|
+
scenes={homeScenes}
|
|
3
|
+
activeScene={currentScene}
|
|
4
|
+
onActivate={activateScene}
|
|
5
|
+
onEdit={editScene}
|
|
6
|
+
layout="grid"
|
|
7
|
+
/>`}],r={keyboard:["Tab through scenes","Enter to activate"],aria:["Scene list","Active state"]},l=["NiceRoomGrid","NiceDeviceControl"],d={$schema:e,name:t,description:c,category:n,since:i,status:o,props:s,examples:a,accessibility:r,seeAlso:l};exports.$schema=e;exports.accessibility=r;exports.category=n;exports.default=d;exports.description=c;exports.examples=a;exports.name=t;exports.props=s;exports.seeAlso=l;exports.since=i;exports.status=o;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceSceneSelector", c = "Smart home scene selector for activating preset configurations.", n = "smart-home", i = "1.0.0", o = "planned", s = [{ name: "scenes", type: "Scene[]", required: !0, description: "Available scenes" }, { name: "activeScene", type: "string", description: "Active scene ID" }, { name: "onActivate", type: "(scene: Scene) => Promise<void>", description: "Activation callback" }, { name: "onEdit", type: "(scene: Scene) => void", description: "Edit callback" }, { name: "onCreate", type: "() => void", description: "Create callback" }, { name: "layout", type: "'grid' | 'list'", default: "'grid'", description: "Display layout" }, { name: "showQuickActions", type: "boolean", default: "true", description: "Show quick actions" }], a = [{ title: "Scene Selector", description: "Activate scenes", code: `<NiceSceneSelector
|
|
2
|
+
scenes={homeScenes}
|
|
3
|
+
activeScene={currentScene}
|
|
4
|
+
onActivate={activateScene}
|
|
5
|
+
onEdit={editScene}
|
|
6
|
+
layout="grid"
|
|
7
|
+
/>` }], r = { keyboard: ["Tab through scenes", "Enter to activate"], aria: ["Scene list", "Active state"] }, d = ["NiceRoomGrid", "NiceDeviceControl"], l = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: t,
|
|
10
|
+
description: c,
|
|
11
|
+
category: n,
|
|
12
|
+
since: i,
|
|
13
|
+
status: o,
|
|
14
|
+
props: s,
|
|
15
|
+
examples: a,
|
|
16
|
+
accessibility: r,
|
|
17
|
+
seeAlso: d
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
r as accessibility,
|
|
22
|
+
n as category,
|
|
23
|
+
l as default,
|
|
24
|
+
c as description,
|
|
25
|
+
a as examples,
|
|
26
|
+
t as name,
|
|
27
|
+
s as props,
|
|
28
|
+
d as seeAlso,
|
|
29
|
+
i as since,
|
|
30
|
+
o as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", o = "NiceScrollArea", t = "Custom scrollbar area with cross-platform support.", r = "layout", c = "1.0.0", i = "planned", l = [{ name: "children", type: "React.ReactNode", required: !0, description: "Scrollable content" }, { name: "height", type: "number | string", description: "Container height" }, { name: "width", type: "number | string", description: "Container width" }, { name: "direction", type: "'vertical' | 'horizontal' | 'both'", default: "'vertical'", description: "Scroll direction" }, { name: "showScrollbar", type: "'always' | 'hover' | 'never'", default: "'hover'", description: "Scrollbar visibility" }, { name: "onScroll", type: "(e: ScrollEvent) => void", description: "Scroll callback" }, { name: "scrollRef", type: "RefObject<HTMLDivElement>", description: "Scroll container ref" }], n = [{ title: "Scroll Area", description: "Custom scrollbar", code: `<NiceScrollArea height={400} direction="vertical" showScrollbar="hover">
|
|
2
|
+
<div>{longContent}</div>
|
|
3
|
+
</NiceScrollArea>` }], a = { keyboard: ["Arrow keys to scroll"], aria: ["Scrollable region"] }, s = ["NiceVirtualList", "NiceInfiniteScroll"], d = {
|
|
4
|
+
$schema: e,
|
|
5
|
+
name: o,
|
|
6
|
+
description: t,
|
|
7
|
+
category: r,
|
|
8
|
+
since: c,
|
|
9
|
+
status: i,
|
|
10
|
+
props: l,
|
|
11
|
+
examples: n,
|
|
12
|
+
accessibility: a,
|
|
13
|
+
seeAlso: s
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
e as $schema,
|
|
17
|
+
a as accessibility,
|
|
18
|
+
r as category,
|
|
19
|
+
d as default,
|
|
20
|
+
t as description,
|
|
21
|
+
n as examples,
|
|
22
|
+
o as name,
|
|
23
|
+
l as props,
|
|
24
|
+
s as seeAlso,
|
|
25
|
+
c as since,
|
|
26
|
+
i as status
|
|
27
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceScrollArea",o="Custom scrollbar area with cross-platform support.",c="layout",r="1.0.0",i="planned",l=[{name:"children",type:"React.ReactNode",required:!0,description:"Scrollable content"},{name:"height",type:"number | string",description:"Container height"},{name:"width",type:"number | string",description:"Container width"},{name:"direction",type:"'vertical' | 'horizontal' | 'both'",default:"'vertical'",description:"Scroll direction"},{name:"showScrollbar",type:"'always' | 'hover' | 'never'",default:"'hover'",description:"Scrollbar visibility"},{name:"onScroll",type:"(e: ScrollEvent) => void",description:"Scroll callback"},{name:"scrollRef",type:"RefObject<HTMLDivElement>",description:"Scroll container ref"}],n=[{title:"Scroll Area",description:"Custom scrollbar",code:`<NiceScrollArea height={400} direction="vertical" showScrollbar="hover">
|
|
2
|
+
<div>{longContent}</div>
|
|
3
|
+
</NiceScrollArea>`}],s={keyboard:["Arrow keys to scroll"],aria:["Scrollable region"]},a=["NiceVirtualList","NiceInfiniteScroll"],d={$schema:e,name:t,description:o,category:c,since:r,status:i,props:l,examples:n,accessibility:s,seeAlso:a};exports.$schema=e;exports.accessibility=s;exports.category=c;exports.default=d;exports.description=o;exports.examples=n;exports.name=t;exports.props=l;exports.seeAlso=a;exports.since=r;exports.status=i;
|
|
@@ -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="NiceSheet",t="Bottom sheet dialog for mobile.",o="overlay",i="1.0.0",s="planned",a=[{name:"open",type:"boolean",required:!0,description:"Sheet visibility"},{name:"children",type:"React.ReactNode",required:!0,description:"Sheet content"},{name:"snapPoints",type:"number[]",description:"Snap positions (0-1)"},{name:"defaultSnapPoint",type:"number",description:"Initial snap point"},{name:"dismissible",type:"boolean",default:"true",description:"Can be dismissed"},{name:"modal",type:"boolean",default:"true",description:"Modal behavior"},{name:"onOpenChange",type:"(open: boolean) => void",required:!0,description:"Open change callback"},{name:"onSnapChange",type:"(snap: number) => void",description:"Snap change callback"}],c=[{title:"Sheet",description:"Bottom sheet",code:`<NiceSheet
|
|
2
|
+
open={isOpen}
|
|
3
|
+
snapPoints={[0.25, 0.5, 1]}
|
|
4
|
+
defaultSnapPoint={0.5}
|
|
5
|
+
onOpenChange={setIsOpen}
|
|
6
|
+
>
|
|
7
|
+
<div className="p-4">
|
|
8
|
+
<h3>Sheet Content</h3>
|
|
9
|
+
<p>Drag to resize or swipe down to dismiss.</p>
|
|
10
|
+
</div>
|
|
11
|
+
</NiceSheet>`}],p={keyboard:["Tab within sheet","Escape to close"],aria:["Dialog role","Draggable handle"]},r=["NiceDrawer","NiceModal"],d={$schema:e,name:n,description:t,category:o,since:i,status:s,props:a,examples:c,accessibility:p,seeAlso:r};exports.$schema=e;exports.accessibility=p;exports.category=o;exports.default=d;exports.description=t;exports.examples=c;exports.name=n;exports.props=a;exports.seeAlso=r;exports.since=i;exports.status=s;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", n = "NiceSheet", t = "Bottom sheet dialog for mobile.", o = "overlay", i = "1.0.0", a = "planned", s = [{ name: "open", type: "boolean", required: !0, description: "Sheet visibility" }, { name: "children", type: "React.ReactNode", required: !0, description: "Sheet content" }, { name: "snapPoints", type: "number[]", description: "Snap positions (0-1)" }, { name: "defaultSnapPoint", type: "number", description: "Initial snap point" }, { name: "dismissible", type: "boolean", default: "true", description: "Can be dismissed" }, { name: "modal", type: "boolean", default: "true", description: "Modal behavior" }, { name: "onOpenChange", type: "(open: boolean) => void", required: !0, description: "Open change callback" }, { name: "onSnapChange", type: "(snap: number) => void", description: "Snap change callback" }], c = [{ title: "Sheet", description: "Bottom sheet", code: `<NiceSheet
|
|
2
|
+
open={isOpen}
|
|
3
|
+
snapPoints={[0.25, 0.5, 1]}
|
|
4
|
+
defaultSnapPoint={0.5}
|
|
5
|
+
onOpenChange={setIsOpen}
|
|
6
|
+
>
|
|
7
|
+
<div className="p-4">
|
|
8
|
+
<h3>Sheet Content</h3>
|
|
9
|
+
<p>Drag to resize or swipe down to dismiss.</p>
|
|
10
|
+
</div>
|
|
11
|
+
</NiceSheet>` }], p = { keyboard: ["Tab within sheet", "Escape to close"], aria: ["Dialog role", "Draggable handle"] }, d = ["NiceDrawer", "NiceModal"], r = {
|
|
12
|
+
$schema: e,
|
|
13
|
+
name: n,
|
|
14
|
+
description: t,
|
|
15
|
+
category: o,
|
|
16
|
+
since: i,
|
|
17
|
+
status: a,
|
|
18
|
+
props: s,
|
|
19
|
+
examples: c,
|
|
20
|
+
accessibility: p,
|
|
21
|
+
seeAlso: d
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
e as $schema,
|
|
25
|
+
p as accessibility,
|
|
26
|
+
o as category,
|
|
27
|
+
r as default,
|
|
28
|
+
t as description,
|
|
29
|
+
c as examples,
|
|
30
|
+
n as name,
|
|
31
|
+
s as props,
|
|
32
|
+
d as seeAlso,
|
|
33
|
+
i as since,
|
|
34
|
+
a as status
|
|
35
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",o="NiceSpeedDial",n="Speed dial menu expanding from floating action button.",t="mobile",i="1.0.0",c="planned",s=[{name:"actions",type:"SpeedDialAction[]",required:!0,description:"Action items"},{name:"icon",type:"React.ReactNode",description:"Main button icon"},{name:"openIcon",type:"React.ReactNode",description:"Icon when open"},{name:"direction",type:"'up' | 'down' | 'left' | 'right'",default:"'up'",description:"Expand direction"},{name:"open",type:"boolean",description:"Controlled open state"},{name:"onOpenChange",type:"(open: boolean) => void",description:"Open change callback"},{name:"position",type:"'bottom-right' | 'bottom-left'",default:"'bottom-right'",description:"Position"}],a=[{title:"Speed Dial",description:"Quick actions",code:`<NiceSpeedDial
|
|
2
|
+
actions={quickActions}
|
|
3
|
+
icon={<AddIcon />}
|
|
4
|
+
openIcon={<CloseIcon />}
|
|
5
|
+
direction="up"
|
|
6
|
+
position="bottom-right"
|
|
7
|
+
/>`}],p={keyboard:["Tab through actions","Escape to close"],aria:["Menu role","Action labels"]},d=["NiceFloatingActionButton","NiceDropdownMenu"],l={$schema:e,name:o,description:n,category:t,since:i,status:c,props:s,examples:a,accessibility:p,seeAlso:d};exports.$schema=e;exports.accessibility=p;exports.category=t;exports.default=l;exports.description=n;exports.examples=a;exports.name=o;exports.props=s;exports.seeAlso=d;exports.since=i;exports.status=c;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", o = "NiceSpeedDial", n = "Speed dial menu expanding from floating action button.", t = "mobile", i = "1.0.0", c = "planned", a = [{ name: "actions", type: "SpeedDialAction[]", required: !0, description: "Action items" }, { name: "icon", type: "React.ReactNode", description: "Main button icon" }, { name: "openIcon", type: "React.ReactNode", description: "Icon when open" }, { name: "direction", type: "'up' | 'down' | 'left' | 'right'", default: "'up'", description: "Expand direction" }, { name: "open", type: "boolean", description: "Controlled open state" }, { name: "onOpenChange", type: "(open: boolean) => void", description: "Open change callback" }, { name: "position", type: "'bottom-right' | 'bottom-left'", default: "'bottom-right'", description: "Position" }], s = [{ title: "Speed Dial", description: "Quick actions", code: `<NiceSpeedDial
|
|
2
|
+
actions={quickActions}
|
|
3
|
+
icon={<AddIcon />}
|
|
4
|
+
openIcon={<CloseIcon />}
|
|
5
|
+
direction="up"
|
|
6
|
+
position="bottom-right"
|
|
7
|
+
/>` }], p = { keyboard: ["Tab through actions", "Escape to close"], aria: ["Menu role", "Action labels"] }, d = ["NiceFloatingActionButton", "NiceDropdownMenu"], l = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: o,
|
|
10
|
+
description: n,
|
|
11
|
+
category: t,
|
|
12
|
+
since: i,
|
|
13
|
+
status: c,
|
|
14
|
+
props: a,
|
|
15
|
+
examples: s,
|
|
16
|
+
accessibility: p,
|
|
17
|
+
seeAlso: d
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
p as accessibility,
|
|
22
|
+
t as category,
|
|
23
|
+
l as default,
|
|
24
|
+
n as description,
|
|
25
|
+
s as examples,
|
|
26
|
+
o as name,
|
|
27
|
+
a as props,
|
|
28
|
+
d as seeAlso,
|
|
29
|
+
i as since,
|
|
30
|
+
c as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",i="NiceSplitPane",n="Split pane layout with resizable panels.",t="layout",a="1.0.0",s="planned",o=[{name:"children",type:"React.ReactNode",required:!0,description:"Panel children"},{name:"split",type:"'vertical' | 'horizontal'",default:"'vertical'",description:"Split direction"},{name:"defaultSize",type:"number | string",description:"Default first panel size"},{name:"minSize",type:"number",default:"50",description:"Minimum panel size"},{name:"maxSize",type:"number",description:"Maximum panel size"},{name:"onChange",type:"(size: number) => void",description:"Size change callback"},{name:"allowResize",type:"boolean",default:"true",description:"Allow resizing"},{name:"snap",type:"boolean",default:"false",description:"Snap to positions"}],c=[{title:"Split Pane",description:"Resizable split",code:`<NiceSplitPane
|
|
2
|
+
split="vertical"
|
|
3
|
+
defaultSize="30%"
|
|
4
|
+
minSize={200}
|
|
5
|
+
onChange={handleSizeChange}
|
|
6
|
+
>
|
|
7
|
+
<div>Left panel</div>
|
|
8
|
+
<div>Right panel</div>
|
|
9
|
+
</NiceSplitPane>`}],l={keyboard:["Arrow keys to resize"],aria:["Separator role"]},p=["NiceResizable","NiceMdiWorkspace"],r={$schema:e,name:i,description:n,category:t,since:a,status:s,props:o,examples:c,accessibility:l,seeAlso:p};exports.$schema=e;exports.accessibility=l;exports.category=t;exports.default=r;exports.description=n;exports.examples=c;exports.name=i;exports.props=o;exports.seeAlso=p;exports.since=a;exports.status=s;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", i = "NiceSplitPane", n = "Split pane layout with resizable panels.", t = "layout", a = "1.0.0", s = "planned", o = [{ name: "children", type: "React.ReactNode", required: !0, description: "Panel children" }, { name: "split", type: "'vertical' | 'horizontal'", default: "'vertical'", description: "Split direction" }, { name: "defaultSize", type: "number | string", description: "Default first panel size" }, { name: "minSize", type: "number", default: "50", description: "Minimum panel size" }, { name: "maxSize", type: "number", description: "Maximum panel size" }, { name: "onChange", type: "(size: number) => void", description: "Size change callback" }, { name: "allowResize", type: "boolean", default: "true", description: "Allow resizing" }, { name: "snap", type: "boolean", default: "false", description: "Snap to positions" }], l = [{ title: "Split Pane", description: "Resizable split", code: `<NiceSplitPane
|
|
2
|
+
split="vertical"
|
|
3
|
+
defaultSize="30%"
|
|
4
|
+
minSize={200}
|
|
5
|
+
onChange={handleSizeChange}
|
|
6
|
+
>
|
|
7
|
+
<div>Left panel</div>
|
|
8
|
+
<div>Right panel</div>
|
|
9
|
+
</NiceSplitPane>` }], c = { keyboard: ["Arrow keys to resize"], aria: ["Separator role"] }, p = ["NiceResizable", "NiceMdiWorkspace"], r = {
|
|
10
|
+
$schema: e,
|
|
11
|
+
name: i,
|
|
12
|
+
description: n,
|
|
13
|
+
category: t,
|
|
14
|
+
since: a,
|
|
15
|
+
status: s,
|
|
16
|
+
props: o,
|
|
17
|
+
examples: l,
|
|
18
|
+
accessibility: c,
|
|
19
|
+
seeAlso: p
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
e as $schema,
|
|
23
|
+
c as accessibility,
|
|
24
|
+
t as category,
|
|
25
|
+
r as default,
|
|
26
|
+
n as description,
|
|
27
|
+
l as examples,
|
|
28
|
+
i as name,
|
|
29
|
+
o as props,
|
|
30
|
+
p as seeAlso,
|
|
31
|
+
a as since,
|
|
32
|
+
s as status
|
|
33
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceSpotlight", n = "Spotlight search component.", l = "nav", o = "1.0.0", i = "planned", s = [{ name: "open", type: "boolean", required: !0, description: "Spotlight visibility" }, { name: "actions", type: "SpotlightAction[]", required: !0, description: "Searchable actions" }, { name: "placeholder", type: "string", default: "'Search...'", description: "Search placeholder" }, { name: "nothingFoundMessage", type: "string", description: "No results message" }, { name: "highlightQuery", type: "boolean", default: "true", description: "Highlight matches" }, { name: "shortcut", type: "string", default: "'mod+k'", description: "Toggle shortcut" }, { name: "onQueryChange", type: "(query: string) => void", description: "Query change callback" }, { name: "onClose", type: "() => void", required: !0, description: "Close callback" }], a = [{ title: "Spotlight", description: "Global search", code: `<NiceSpotlight
|
|
2
|
+
open={isOpen}
|
|
3
|
+
actions={[
|
|
4
|
+
{ title: 'Home', description: 'Go to home page', onTrigger: () => navigate('/') },
|
|
5
|
+
{ title: 'Settings', description: 'Open settings', onTrigger: () => navigate('/settings') }
|
|
6
|
+
]}
|
|
7
|
+
placeholder="Search anything..."
|
|
8
|
+
highlightQuery
|
|
9
|
+
onClose={() => setIsOpen(false)}
|
|
10
|
+
/>` }], c = { keyboard: ["Type to search", "Arrow keys to navigate", "Enter to trigger"], aria: ["Search dialog", "Results list"] }, r = ["NiceCommandPalette", "NiceSearchInput"], p = {
|
|
11
|
+
$schema: e,
|
|
12
|
+
name: t,
|
|
13
|
+
description: n,
|
|
14
|
+
category: "nav",
|
|
15
|
+
since: o,
|
|
16
|
+
status: i,
|
|
17
|
+
props: s,
|
|
18
|
+
examples: a,
|
|
19
|
+
accessibility: c,
|
|
20
|
+
seeAlso: r
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
e as $schema,
|
|
24
|
+
c as accessibility,
|
|
25
|
+
l as category,
|
|
26
|
+
p as default,
|
|
27
|
+
n as description,
|
|
28
|
+
a as examples,
|
|
29
|
+
t as name,
|
|
30
|
+
s as props,
|
|
31
|
+
r as seeAlso,
|
|
32
|
+
o as since,
|
|
33
|
+
i 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="NiceSpotlight",n="Spotlight search component.",o="nav",i="1.0.0",s="planned",c=[{name:"open",type:"boolean",required:!0,description:"Spotlight visibility"},{name:"actions",type:"SpotlightAction[]",required:!0,description:"Searchable actions"},{name:"placeholder",type:"string",default:"'Search...'",description:"Search placeholder"},{name:"nothingFoundMessage",type:"string",description:"No results message"},{name:"highlightQuery",type:"boolean",default:"true",description:"Highlight matches"},{name:"shortcut",type:"string",default:"'mod+k'",description:"Toggle shortcut"},{name:"onQueryChange",type:"(query: string) => void",description:"Query change callback"},{name:"onClose",type:"() => void",required:!0,description:"Close callback"}],a=[{title:"Spotlight",description:"Global search",code:`<NiceSpotlight
|
|
2
|
+
open={isOpen}
|
|
3
|
+
actions={[
|
|
4
|
+
{ title: 'Home', description: 'Go to home page', onTrigger: () => navigate('/') },
|
|
5
|
+
{ title: 'Settings', description: 'Open settings', onTrigger: () => navigate('/settings') }
|
|
6
|
+
]}
|
|
7
|
+
placeholder="Search anything..."
|
|
8
|
+
highlightQuery
|
|
9
|
+
onClose={() => setIsOpen(false)}
|
|
10
|
+
/>`}],r={keyboard:["Type to search","Arrow keys to navigate","Enter to trigger"],aria:["Search dialog","Results list"]},l=["NiceCommandPalette","NiceSearchInput"],p={$schema:e,name:t,description:n,category:o,since:i,status:s,props:c,examples:a,accessibility:r,seeAlso:l};exports.$schema=e;exports.accessibility=r;exports.category=o;exports.default=p;exports.description=n;exports.examples=a;exports.name=t;exports.props=c;exports.seeAlso=l;exports.since=i;exports.status=s;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceStepNavigation", n = "Step-based navigation for multi-step processes.", o = "navigation", i = "1.0.0", a = "planned", s = [{ name: "steps", type: "NavigationStep[]", required: !0, description: "Step definitions" }, { name: "currentStep", type: "number", default: "0", description: "Current step index" }, { name: "onStepClick", type: "(step: number) => void", description: "Step click callback" }, { name: "orientation", type: "'horizontal' | 'vertical'", default: "'horizontal'", description: "Orientation" }, { name: "allowNavigation", type: "boolean", default: "false", description: "Allow step clicking" }, { name: "showConnector", type: "boolean", default: "true", description: "Show step connectors" }, { name: "variant", type: "'default' | 'compact' | 'numbered'", default: "'default'", description: "Display variant" }], c = [{ title: "Step Navigation", description: "Process steps", code: `<NiceStepNavigation
|
|
2
|
+
steps={checkoutSteps}
|
|
3
|
+
currentStep={currentStep}
|
|
4
|
+
onStepClick={goToStep}
|
|
5
|
+
orientation="horizontal"
|
|
6
|
+
allowNavigation
|
|
7
|
+
/>` }], p = { keyboard: ["Tab through steps", "Enter to navigate"], aria: ["Step list", "Current step"] }, r = ["NiceStepper", "NiceWizard"], l = {
|
|
8
|
+
$schema: e,
|
|
9
|
+
name: t,
|
|
10
|
+
description: n,
|
|
11
|
+
category: o,
|
|
12
|
+
since: i,
|
|
13
|
+
status: a,
|
|
14
|
+
props: s,
|
|
15
|
+
examples: c,
|
|
16
|
+
accessibility: p,
|
|
17
|
+
seeAlso: r
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
e as $schema,
|
|
21
|
+
p as accessibility,
|
|
22
|
+
o as category,
|
|
23
|
+
l as default,
|
|
24
|
+
n as description,
|
|
25
|
+
c as examples,
|
|
26
|
+
t as name,
|
|
27
|
+
s as props,
|
|
28
|
+
r as seeAlso,
|
|
29
|
+
i as since,
|
|
30
|
+
a 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="NiceStepNavigation",n="Step-based navigation for multi-step processes.",i="navigation",o="1.0.0",a="planned",s=[{name:"steps",type:"NavigationStep[]",required:!0,description:"Step definitions"},{name:"currentStep",type:"number",default:"0",description:"Current step index"},{name:"onStepClick",type:"(step: number) => void",description:"Step click callback"},{name:"orientation",type:"'horizontal' | 'vertical'",default:"'horizontal'",description:"Orientation"},{name:"allowNavigation",type:"boolean",default:"false",description:"Allow step clicking"},{name:"showConnector",type:"boolean",default:"true",description:"Show step connectors"},{name:"variant",type:"'default' | 'compact' | 'numbered'",default:"'default'",description:"Display variant"}],c=[{title:"Step Navigation",description:"Process steps",code:`<NiceStepNavigation
|
|
2
|
+
steps={checkoutSteps}
|
|
3
|
+
currentStep={currentStep}
|
|
4
|
+
onStepClick={goToStep}
|
|
5
|
+
orientation="horizontal"
|
|
6
|
+
allowNavigation
|
|
7
|
+
/>`}],p={keyboard:["Tab through steps","Enter to navigate"],aria:["Step list","Current step"]},r=["NiceStepper","NiceWizard"],l={$schema:e,name:t,description:n,category:i,since:o,status:a,props:s,examples:c,accessibility:p,seeAlso:r};exports.$schema=e;exports.accessibility=p;exports.category=i;exports.default=l;exports.description=n;exports.examples=c;exports.name=t;exports.props=s;exports.seeAlso=r;exports.since=o;exports.status=a;
|
|
@@ -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="NiceSteps",s="Step progress indicator.",n="nav",i="1.0.0",o="planned",r=[{name:"items",type:"StepItem[]",required:!0,description:"Step items"},{name:"current",type:"number",default:"0",description:"Current step index"},{name:"direction",type:"'horizontal' | 'vertical'",default:"'horizontal'",description:"Steps direction"},{name:"type",type:"'default' | 'navigation' | 'inline'",default:"'default'",description:"Steps type"},{name:"size",type:"'default' | 'small'",default:"'default'",description:"Steps size"},{name:"status",type:"'wait' | 'process' | 'finish' | 'error'",description:"Current status"},{name:"progressDot",type:"boolean | ((iconDot, { index, status }) => React.ReactNode)",default:"false",description:"Dot style"},{name:"onChange",type:"(current: number) => void",description:"Step change callback"}],c=[{title:"Steps",description:"Progress steps",code:`<NiceSteps
|
|
2
|
+
current={1}
|
|
3
|
+
items={[
|
|
4
|
+
{ title: 'Step 1', description: 'Fill form' },
|
|
5
|
+
{ title: 'Step 2', description: 'Verify' },
|
|
6
|
+
{ title: 'Step 3', description: 'Complete' }
|
|
7
|
+
]}
|
|
8
|
+
direction="horizontal"
|
|
9
|
+
onChange={(step) => setCurrentStep(step)}
|
|
10
|
+
/>`}],a={keyboard:["Tab between steps"],aria:["Progress indicator","Current step"]},p=["NiceProgress","NiceWizard"],d={$schema:e,name:t,description:s,category:n,since:i,status:o,props:r,examples:c,accessibility:a,seeAlso:p};exports.$schema=e;exports.accessibility=a;exports.category=n;exports.default=d;exports.description=s;exports.examples=c;exports.name=t;exports.props=r;exports.seeAlso=p;exports.since=i;exports.status=o;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceSteps", n = "Step progress indicator.", p = "nav", s = "1.0.0", i = "planned", o = [{ name: "items", type: "StepItem[]", required: !0, description: "Step items" }, { name: "current", type: "number", default: "0", description: "Current step index" }, { name: "direction", type: "'horizontal' | 'vertical'", default: "'horizontal'", description: "Steps direction" }, { name: "type", type: "'default' | 'navigation' | 'inline'", default: "'default'", description: "Steps type" }, { name: "size", type: "'default' | 'small'", default: "'default'", description: "Steps size" }, { name: "status", type: "'wait' | 'process' | 'finish' | 'error'", description: "Current status" }, { name: "progressDot", type: "boolean | ((iconDot, { index, status }) => React.ReactNode)", default: "false", description: "Dot style" }, { name: "onChange", type: "(current: number) => void", description: "Step change callback" }], r = [{ title: "Steps", description: "Progress steps", code: `<NiceSteps
|
|
2
|
+
current={1}
|
|
3
|
+
items={[
|
|
4
|
+
{ title: 'Step 1', description: 'Fill form' },
|
|
5
|
+
{ title: 'Step 2', description: 'Verify' },
|
|
6
|
+
{ title: 'Step 3', description: 'Complete' }
|
|
7
|
+
]}
|
|
8
|
+
direction="horizontal"
|
|
9
|
+
onChange={(step) => setCurrentStep(step)}
|
|
10
|
+
/>` }], c = { keyboard: ["Tab between steps"], aria: ["Progress indicator", "Current step"] }, a = ["NiceProgress", "NiceWizard"], d = {
|
|
11
|
+
$schema: e,
|
|
12
|
+
name: t,
|
|
13
|
+
description: n,
|
|
14
|
+
category: "nav",
|
|
15
|
+
since: s,
|
|
16
|
+
status: i,
|
|
17
|
+
props: o,
|
|
18
|
+
examples: r,
|
|
19
|
+
accessibility: c,
|
|
20
|
+
seeAlso: a
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
e as $schema,
|
|
24
|
+
c as accessibility,
|
|
25
|
+
p as category,
|
|
26
|
+
d as default,
|
|
27
|
+
n as description,
|
|
28
|
+
r as examples,
|
|
29
|
+
t as name,
|
|
30
|
+
o as props,
|
|
31
|
+
a as seeAlso,
|
|
32
|
+
s as since,
|
|
33
|
+
i as status
|
|
34
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",c="NiceSwitch",t="Toggle switch for boolean values.",o="input",n="1.0.0",a="planned",s=[{name:"checked",type:"boolean",description:"Checked state"},{name:"defaultChecked",type:"boolean",default:"false",description:"Default checked"},{name:"disabled",type:"boolean",default:"false",description:"Disabled state"},{name:"loading",type:"boolean",default:"false",description:"Loading state"},{name:"size",type:"'sm' | 'md' | 'lg'",default:"'md'",description:"Switch size"},{name:"checkedChildren",type:"React.ReactNode",description:"Checked label"},{name:"unCheckedChildren",type:"React.ReactNode",description:"Unchecked label"},{name:"onChange",type:"(checked: boolean) => void",description:"Change callback"}],i=[{title:"Switch",description:"Toggle switch",code:`<NiceSwitch
|
|
2
|
+
defaultChecked
|
|
3
|
+
checkedChildren="ON"
|
|
4
|
+
unCheckedChildren="OFF"
|
|
5
|
+
onChange={(checked) => console.log('Checked:', checked)}
|
|
6
|
+
/>`}],d={keyboard:["Space to toggle"],aria:["Switch role","Checked state"]},l=["NiceCheckbox","NiceToggleGroup"],h={$schema:e,name:c,description:t,category:o,since:n,status:a,props:s,examples:i,accessibility:d,seeAlso:l};exports.$schema=e;exports.accessibility=d;exports.category=o;exports.default=h;exports.description=t;exports.examples=i;exports.name=c;exports.props=s;exports.seeAlso=l;exports.since=n;exports.status=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", c = "NiceSwitch", t = "Toggle switch for boolean values.", n = "input", o = "1.0.0", a = "planned", d = [{ name: "checked", type: "boolean", description: "Checked state" }, { name: "defaultChecked", type: "boolean", default: "false", description: "Default checked" }, { name: "disabled", type: "boolean", default: "false", description: "Disabled state" }, { name: "loading", type: "boolean", default: "false", description: "Loading state" }, { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'", description: "Switch size" }, { name: "checkedChildren", type: "React.ReactNode", description: "Checked label" }, { name: "unCheckedChildren", type: "React.ReactNode", description: "Unchecked label" }, { name: "onChange", type: "(checked: boolean) => void", description: "Change callback" }], i = [{ title: "Switch", description: "Toggle switch", code: `<NiceSwitch
|
|
2
|
+
defaultChecked
|
|
3
|
+
checkedChildren="ON"
|
|
4
|
+
unCheckedChildren="OFF"
|
|
5
|
+
onChange={(checked) => console.log('Checked:', checked)}
|
|
6
|
+
/>` }], s = { keyboard: ["Space to toggle"], aria: ["Switch role", "Checked state"] }, l = ["NiceCheckbox", "NiceToggleGroup"], h = {
|
|
7
|
+
$schema: e,
|
|
8
|
+
name: c,
|
|
9
|
+
description: t,
|
|
10
|
+
category: n,
|
|
11
|
+
since: o,
|
|
12
|
+
status: a,
|
|
13
|
+
props: d,
|
|
14
|
+
examples: i,
|
|
15
|
+
accessibility: s,
|
|
16
|
+
seeAlso: l
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
e as $schema,
|
|
20
|
+
s as accessibility,
|
|
21
|
+
n as category,
|
|
22
|
+
h as default,
|
|
23
|
+
t as description,
|
|
24
|
+
i as examples,
|
|
25
|
+
c as name,
|
|
26
|
+
d as props,
|
|
27
|
+
l as seeAlso,
|
|
28
|
+
o as since,
|
|
29
|
+
a as status
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),o=require("./core-DQYnL6uf.cjs"),c=require("react"),Ie=require("react-dom"),Ce=c.forwardRef(({label:l,helperText:m,error:i,required:p,disabled:s,readOnly:n,size:d="md",name:y,id:f,className:u,style:_,accessMode:S,displayStyle:X,variant:x,value:w,defaultValue:E,onChange:h,onBlur:Z,onKeyDown:D,placeholder:$,type:F="text",maxLength:g,prefix:I,suffix:U,clearable:R,autoFocus:A,submitOnEnter:k,onSubmit:B,showKeyboardHints:K,labelPlacement:L,errorPlacement:W,loading:re,labelWidth:le,controlWidth:J,displayMode:Y,...de},b)=>{const N=o._s(S,f),G=N==="hidden";N==="disabled"&&(s=!0),N==="readOnly"&&(n=!0);const{t:H}=o.$o(),M=o.ks(f),ee=o.cs("input",X),ae=o.ls("input",X),ue=x==="filled"?"filled":x==="underlined"?"underlined":"",Q=c.useCallback(()=>h?.(""),[h]),z=o.ms({enabled:Y,readOnly:n,disabled:s}),oe=o.nc({enabled:k,onSubmit:B}),se=c.useCallback(v=>{oe(v),D?.(v)},[oe,D]),a=c.useMemo(()=>{const v=[];return k&&v.push({key:"Enter",description:H("shortcuts.submit","Submit")}),R&&v.push({key:"Escape",description:H("shortcuts.clear","Clear")}),v},[k,R,H]);return G?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${L==="left"?"nice-field--label-left":""} ${L==="inside"?"nice-field--label-inside":""} ${re?"nice-field--loading":""} ${u||""}`,style:{..._,...le!=null&&{"--nice-field-label-width":typeof le=="number"?`${le}px`:le},...J!=null&&{"--nice-field-control-width":typeof J=="number"?`${J}px`:J}},"aria-busy":re||void 0,"data-floating":L==="inside"&&w?"true":void 0,children:[l&&L!=="inside"&&e.jsxs("label",{htmlFor:M,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,K&&a.length>0&&e.jsx(o.Vr,{shortcuts:a,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[z.isDisplay?e.jsx(o.ps,{value:w??E??"",placeholder:$,disabled:s,readOnly:n,onActivate:z.enterEdit,ariaLabel:l}):e.jsxs("div",{className:`nice-input nice-input--${d} nice-input--ds-${ue||ae} ${i?"nice-input--error":""} ${s?"nice-input--disabled":""} ${n?"nice-input--readonly":""}`,style:x?void 0:ee,children:[I&&e.jsx("span",{className:"nice-input__icon",children:I}),e.jsx("input",{ref:v=>{typeof b=="function"?b(v):b&&(b.current=v),z.autoFocusRef(v)},id:M,className:"nice-input__native",type:F,name:y,value:w,defaultValue:E,placeholder:$,disabled:s||re,readOnly:n,maxLength:g,autoFocus:A,"aria-invalid":!!i,"aria-describedby":i?`${M}-error`:m?`${M}-helper`:void 0,onChange:v=>h?.(v.target.value),onBlur:v=>{Y&&z.exitEdit(),Z?.(v)},onKeyDown:se,...de}),R&&w&&e.jsx("button",{type:"button",className:"nice-input__clear",onClick:Q,"aria-label":H("controls.clear","Clear"),children:"✕"}),U&&e.jsx("span",{className:"nice-input__icon",children:U}),l&&L==="inside"&&e.jsx("label",{htmlFor:M,className:`nice-input__floating-label ${p?"nice-input__floating-label--required":""}`,children:l})]}),re&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),W==="right"&&i&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:i}),W==="right"&&!i&&m&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:m})]}),W!=="right"&&i&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:i}),W!=="right"&&!i&&m&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:m})]})});Ce.displayName="NiceTextInput";const Se=c.forwardRef(({label:l,helperText:m,error:i,required:p,disabled:s,readOnly:n,size:d="md",name:y,id:f,className:u,style:_,accessMode:S,displayStyle:X,value:x,onChange:w,onBlur:E,onKeyDown:h,placeholder:Z,min:D,max:$,step:F=1,precision:g,prefix:I,prefixType:U="label",prefixOptions:R,prefixValue:A,onPrefixChange:k,suffix:B,showStepper:K=!0,submitOnEnter:L,onSubmit:W,showKeyboardHints:re,labelPlacement:le,errorPlacement:J,loading:Y,labelWidth:de,controlWidth:b,formatPreset:N,format:G,suffixType:H="label",suffixOptions:M,suffixValue:ee,onSuffixChange:ae,displayMode:ue},Q)=>{const z=o._s(S,f),oe=z==="hidden";z==="disabled"&&(s=!0),z==="readOnly"&&(n=!0);const{t:se}=o.$o(),a=o.ks(f),v=o.cs("input",X),V=o.ls("input",X),[C,P]=c.useState(!1),[O,xe]=c.useState(null),ve=o.ms({enabled:ue,readOnly:n,disabled:s}),pe=c.useMemo(()=>{let t=3;return $!=null&&(t=String(Math.abs(Math.floor($))).length),D!=null&&D<0&&(t+=1),g&&(t+=g+1),Math.max(3,t)+1},[$,D,g]),je=c.useCallback(t=>{if(G)return G(t);if(!N)return g!=null?t.toFixed(g):String(t);switch(N){case"integer":return Math.round(t).toLocaleString();case"decimal":return t.toLocaleString(void 0,{minimumFractionDigits:g??2,maximumFractionDigits:g??2});case"money":return t.toLocaleString(void 0,{minimumFractionDigits:g??2,maximumFractionDigits:g??2,useGrouping:!0});case"percent":return(t*100).toLocaleString(void 0,{minimumFractionDigits:g??0,maximumFractionDigits:g??2})+"%";default:return String(t)}},[G,N,g]),ye=c.useMemo(()=>C&&O!==null?O:x==null?"":C?g!=null?x.toFixed(g):String(x):je(x),[x,C,O,je,g]),fe=x!=null&&x<0,ie=!!(I||U==="select"&&R&&R.length>0),ne=fe&&ie&&!C,we=ne?ye.replace(/^[-−]/,""):ye,he=c.useCallback(t=>{let j=t;return D!==void 0&&(j=Math.max(D,j)),$!==void 0&&(j=Math.min($,j)),g!==void 0&&(j=parseFloat(j.toFixed(g))),j},[D,$,g]),Me=c.useCallback(t=>{const j=t.target.value;if(xe(j),j===""||j==="-"||j==="."||j==="-."){j===""&&w?.(null);return}const ce=parseFloat(j);if(!isNaN(ce)){let _e=ce;D!==void 0&&(_e=Math.max(D,_e)),$!==void 0&&(_e=Math.min($,_e)),w?.(_e)}},[w,D,$]),ge=c.useCallback(()=>{const t=be.current,j=he((t??0)+F);be.current=j,w?.(j)},[F,w,he]),$e=c.useCallback(()=>{const t=be.current,j=he((t??0)-F);be.current=j,w?.(j)},[F,w,he]),be=c.useRef(x);be.current=x;const r=c.useRef(null),T=c.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),q=c.useCallback(t=>{T();let j=300;const ce=()=>{t(),j=Math.max(30,j*.82),r.current=setTimeout(ce,j)};r.current=setTimeout(ce,400)},[T]),me=o.nc({enabled:L,onSubmit:W}),ke=c.useCallback(t=>{me(t),t.key==="ArrowUp"?(t.preventDefault(),ge()):t.key==="ArrowDown"&&(t.preventDefault(),$e()),h?.(t)},[me,h,ge,$e]),te=c.useMemo(()=>{const t=[];return L&&t.push(o.rc.submit),K&&(t.push({key:"ArrowUp",description:se("shortcuts.increment","Increase value")}),t.push({key:"ArrowDown",description:se("shortcuts.decrement","Decrease value")})),t},[L,K,se]);return oe?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${le==="left"?"nice-field--label-left":""} ${Y?"nice-field--loading":""} ${u||""}`,style:{..._,...de!=null&&{"--nice-field-label-width":typeof de=="number"?`${de}px`:de},...b!=null&&{"--nice-field-control-width":typeof b=="number"?`${b}px`:b}},"aria-busy":Y||void 0,children:[l&&e.jsxs("label",{htmlFor:a,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,re&&te.length>0&&e.jsx(o.Vr,{shortcuts:te,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ve.isDisplay?e.jsx(o.ps,{value:x==null?"":I?e.jsxs(e.Fragment,{children:[I,ye]}):ye,placeholder:Z,disabled:s,readOnly:n,onActivate:ve.enterEdit,ariaLabel:l}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:`nice-input nice-input--number nice-input--${d} nice-input--ds-${V} ${i?"nice-input--error":""} ${s?"nice-input--disabled":""} ${n?"nice-input--readonly":""}`,style:v,children:[K&&!n&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__minus",onClick:$e,onMouseDown:()=>q($e),onMouseUp:T,onMouseLeave:T,disabled:s,"aria-label":se("controls.decrement","Decrement"),children:"−"}),U==="select"&&R&&R.length>0?e.jsxs(e.Fragment,{children:[ne&&e.jsx("span",{className:"nice-input__sign",children:"−"}),e.jsx("select",{className:"nice-input__suffix-select nice-input__icon--prefix",value:A??R[0]?.value,disabled:s,onChange:t=>{const j=t.target.value,ce=R.find(Ne=>Ne.value===(A??R[0]?.value)),_e=R.find(Ne=>Ne.value===j);k?.(j,ce?.weight,_e?.weight)},children:R.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}):I?e.jsxs("span",{className:"nice-input__icon nice-input__icon--prefix",children:[ne&&e.jsx("span",{className:"nice-input__sign",children:"−"}),I]}):null,e.jsx("input",{ref:t=>{typeof Q=="function"?Q(t):Q&&(Q.current=t),ve.autoFocusRef(t)},id:a,className:"nice-input__native",type:!C&&(G||N)?"text":"number",name:y,value:we,placeholder:Z,min:D,max:$,step:F,disabled:s||Y,readOnly:n,"aria-invalid":!!i,onChange:Me,onFocus:t=>{P(!0),xe(null),t.target.select()},onBlur:t=>{if(P(!1),xe(null),x!=null&&g!==void 0){const j=parseFloat(x.toFixed(g));j!==x&&w?.(j)}ue&&ve.exitEdit(),E?.(t)},onKeyDown:ke,style:{width:`${pe}ch`}}),H==="select"&&M&&M.length>0?e.jsx("select",{className:"nice-input__suffix-select nice-input__icon--suffix",value:ee??M[0]?.value,disabled:s,onChange:t=>{const j=t.target.value,ce=M.find(Ne=>Ne.value===(ee??M[0]?.value)),_e=M.find(Ne=>Ne.value===j);ae?.(j,ce?.weight,_e?.weight)},children:M.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}):B?e.jsx("span",{className:"nice-input__icon nice-input__icon--suffix",children:B}):null,K&&!n&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__plus",onClick:ge,onMouseDown:()=>q(ge),onMouseUp:T,onMouseLeave:T,disabled:s,"aria-label":se("controls.increment","Increment"),children:"+"})]})}),Y&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),J==="right"&&i&&e.jsx("div",{className:"nice-field__error",role:"alert",children:i}),J==="right"&&!i&&m&&e.jsx("div",{className:"nice-field__helper",children:m})]}),J!=="right"&&i&&e.jsx("div",{className:"nice-field__error",role:"alert",children:i}),J!=="right"&&!i&&m&&e.jsx("div",{className:"nice-field__helper",children:m})]})});Se.displayName="NiceNumberInput";const Re=c.forwardRef(({label:l,helperText:m,error:i,required:p,disabled:s,size:n="md",name:d,id:y,className:f,style:u,accessMode:_,displayStyle:S,options:X,value:x,onChange:w,placeholder:E,multiple:h=!1,searchable:Z=!1,clearable:D=!1,emptyText:$,maxHeight:F=240,optionsSource:g,valueField:I,labelField:U,virtualScroll:R,optionHeight:A=36,onSearch:k,loading:B,renderOption:K,multipleAutosize:L=!1,showKeyboardHints:W,labelPlacement:re,errorPlacement:le,labelWidth:J,controlWidth:Y,displayMode:de},b)=>{const N=o._s(_,y),G=N==="hidden";(N==="disabled"||N==="readOnly")&&(s=!0);const{t:H}=o.$o(),M=o.cs("input",S),ee=o.ls("input",S),ae=o.ks(y),ue=o.ms({enabled:de,disabled:s}),[Q,z]=c.useState(!1),[oe,se]=c.useState(""),[a,v]=c.useState(-1),[V,C]=c.useState(0),P=c.useRef(null),O=c.useRef(null),[xe,ve]=c.useState(null);c.useLayoutEffect(()=>{!B&&O.current&&ve(O.current.offsetWidth)},[B,x,S]);const[pe,je]=c.useState(null);c.useLayoutEffect(()=>{h&&!L&&O.current&&pe==null&&je(O.current.offsetWidth)},[h,L,pe]);const ye=o.Gl(g??null,I??g?.keyField??"id",U??"name"),fe=g?ye.options:(X??[]).map(r=>typeof r=="string"?{value:r,label:r}:r);o.Cs(P,()=>{z(!1),se("")});const ie=c.useMemo(()=>x?Array.isArray(x)?x:[x]:[],[x]),ne=c.useMemo(()=>{if(!oe&&!k||k)return fe;const r=oe.toLowerCase();return fe.filter(T=>T.label.toLowerCase().includes(r)||String(T.value).toLowerCase().includes(r))},[fe,oe,k]),we=c.useMemo(()=>{const r=new Map;for(const T of ne){const q=T.group||"";r.has(q)||r.set(q,[]),r.get(q).push(T)}return r},[ne]),he=c.useCallback(r=>{if(h){const T=ie.includes(r)?ie.filter(q=>q!==r):[...ie,r];w?.(T)}else w?.(r),z(!1),se("")},[h,ie,w]),Me=c.useCallback(r=>{if(r.key==="Escape"){z(!1),se("");return}if(r.key==="Enter"||r.key===" "){if(!Q){z(!0),r.preventDefault();return}a>=0&&ne[a]&&(he(ne[a].value),r.preventDefault());return}r.key==="ArrowDown"&&(r.preventDefault(),v(T=>Math.min(T+1,ne.length-1))),r.key==="ArrowUp"&&(r.preventDefault(),v(T=>Math.max(T-1,0)))},[Q,a,ne,he]),ge=c.useMemo(()=>ie.length===0?null:h?ie.map(r=>fe.find(T=>T.value===r)?.label||r).join(", "):fe.find(r=>r.value===ie[0])?.label||ie[0],[ie,fe,h]),$e=c.useCallback(r=>{r.stopPropagation(),w?.(h?[]:"")},[w,h]),be=c.useMemo(()=>[{key:"Enter",description:H("shortcuts.select","Select")},{key:"Space",description:H("shortcuts.openDropdown","Open dropdown")},o.rc.moveUp,o.rc.moveDown,o.rc.cancel],[H]);return G?null:e.jsxs("div",{className:`nice-field ${Y==null?"nice-field--select-auto":""} nice-field--${n} ${re==="left"?"nice-field--label-left":""} ${B?"nice-field--loading":""} ${f||""}`,style:{...u,...J!=null&&{"--nice-field-label-width":typeof J=="number"?`${J}px`:J},...Y!=null&&{"--nice-field-control-width":typeof Y=="number"?`${Y}px`:Y},...B&&xe!=null&&{"--nice-select-locked-width":`${xe}px`}},"aria-busy":B||void 0,children:[l&&e.jsxs("label",{htmlFor:ae,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,W&&e.jsx(o.Vr,{shortcuts:be,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ue.isDisplay?e.jsx(o.ps,{value:ge,placeholder:E||H("controls.select","Select..."),disabled:s,onActivate:()=>{ue.enterEdit(),z(!0)},ariaLabel:l}):e.jsxs("div",{className:"nice-select",ref:P,children:[e.jsxs("button",{ref:r=>{O.current=r,typeof b=="function"?b(r):b&&(b.current=r)},type:"button",id:ae,role:"combobox","aria-expanded":Q,"aria-haspopup":"listbox","aria-invalid":!!i,className:`nice-select__trigger nice-select__trigger--${n} nice-select--ds-${ee} ${Q?"nice-select__trigger--open":""} ${i?"nice-select__trigger--error":""} ${s?"nice-select__trigger--disabled":""}`,style:{...M,...h&&!L&&pe!=null?{width:pe,maxWidth:pe,overflow:"hidden"}:{}},disabled:s,onClick:()=>z(!Q),onKeyDown:Me,children:[ge?e.jsx("span",{style:h&&!L?{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0,children:ge}):e.jsx("span",{className:"nice-select__placeholder",children:E||H("controls.select","Select...")}),e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[D&&ie.length>0&&e.jsx("span",{className:"nice-input__clear",onClick:$e,role:"button","aria-label":H("controls.clear","Clear"),children:"✕"}),e.jsx("svg",{className:`nice-select__chevron ${Q?"nice-select__chevron--open":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),Q&&e.jsxs("div",{className:"nice-select__dropdown",role:"listbox",style:{maxHeight:F},onScroll:R?r=>C(r.currentTarget.scrollTop):void 0,children:[(Z||k)&&e.jsx("div",{className:"nice-select__search",children:e.jsx("input",{type:"text",value:oe,onChange:r=>{se(r.target.value),v(0),k?.(r.target.value)},placeholder:H("controls.search","Search..."),autoFocus:!0})}),B&&e.jsx("div",{className:"nice-select__loading",children:e.jsx("div",{className:"nice-spinner nice-spinner--sm",style:{margin:"8px auto"}})}),!B&&ne.length===0?e.jsx("div",{className:"nice-select__empty",children:$||H("controls.noResults","No results found")}):R&&!Array.from(we.keys()).some(r=>r!=="")?(()=>{const T=ne.length*A,q=Math.max(0,Math.floor(V/A)-3),me=Math.min(ne.length,Math.ceil((V+F)/A)+3),ke=ne.slice(q,me);return e.jsx("div",{style:{height:T,position:"relative"},children:ke.map((te,t)=>{const j=q+t,ce=ie.includes(te.value);return e.jsx("div",{role:"option","aria-selected":ce,className:`nice-select__option ${ce?"nice-select__option--selected":""} ${j===a?"nice-select__option--highlighted":""} ${te.disabled?"nice-select__option--disabled":""}`,style:{position:"absolute",top:j*A,left:0,right:0,height:A,display:"flex",alignItems:"center",padding:"0 12px"},onClick:()=>!te.disabled&&he(String(te.value)),onMouseEnter:()=>v(j),children:K?K(te,ce):e.jsxs(e.Fragment,{children:[te.icon&&e.jsx("span",{children:te.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:te.label}),te.description&&e.jsx("div",{className:"nice-select__option-desc",children:te.description})]}),ce&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},te.value)})})})():Array.from(we.entries()).map(([r,T])=>e.jsxs(c.Fragment,{children:[r&&e.jsx("div",{className:"nice-select__group-label",children:r}),T.map(q=>{const me=ie.includes(q.value),ke=ne.indexOf(q);return e.jsx("div",{role:"option","aria-selected":me,className:`nice-select__option ${me?"nice-select__option--selected":""} ${ke===a?"nice-select__option--highlighted":""} ${q.disabled?"nice-select__option--disabled":""}`,onClick:()=>!q.disabled&&he(String(q.value)),onMouseEnter:()=>v(ke),children:K?K(q,me):e.jsxs(e.Fragment,{children:[q.icon&&e.jsx("span",{children:q.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:q.label}),q.description&&e.jsx("div",{className:"nice-select__option-desc",children:q.description})]}),me&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},q.value)})]},r))]})]}),B&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),le==="right"&&i&&e.jsx("div",{id:`${ae}-error`,className:"nice-field__error",role:"alert",children:i}),le==="right"&&!i&&m&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:m})]}),le!=="right"&&i&&e.jsx("div",{id:`${ae}-error`,className:"nice-field__error",role:"alert",children:i}),le!=="right"&&!i&&m&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:m})]})});Re.displayName="NiceSelect";const De=c.forwardRef(({label:l,checked:m=!1,indeterminate:i=!1,onChange:p,disabled:s,readOnly:n,loading:d,required:y,size:f="md",name:u,id:_,className:S,style:X,error:x,helperText:w,accessMode:E,displayStyle:h,showKeyboardHints:Z,labelPlacement:D,errorPlacement:$,labelWidth:F,controlWidth:g},I)=>{const U=o._s(E,_),R=U==="hidden";(U==="disabled"||U==="readOnly")&&(s=!0);const{t:A}=o.$o(),k=o.ks(_);o.ls("toggle",h);const B=c.useMemo(()=>[{key:"Space",description:A("shortcuts.toggle","Toggle")}],[A]),K=c.useCallback(L=>{L&&(L.indeterminate=i),typeof I=="function"?I(L):I&&(I.current=L)},[i,I]);return R?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${f} ${D==="left"?"nice-field--label-left":""} ${$==="right"?"nice-field--error-right":""} ${d?"nice-field--loading":""} ${S||""}`,style:{...X,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...g!=null&&{"--nice-field-control-width":typeof g=="number"?`${g}px`:g}},"aria-busy":d||void 0,children:[D==="left"&&l&&e.jsx("span",{className:`nice-field__label ${y?"nice-field__label--required":""}`,children:l}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-checkbox ${f!=="md"?`nice-checkbox--${f}`:""} ${s||d?"nice-checkbox--disabled":""}`,htmlFor:k,children:[e.jsx("input",{ref:K,id:k,type:"checkbox",className:"nice-checkbox__input",name:u,checked:m,disabled:s||d,readOnly:n,"aria-invalid":!!x,onChange:L=>{n||d||p?.(L.target.checked)}}),e.jsx("span",{className:"nice-checkbox__box",children:e.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i?e.jsx("line",{x1:"2",y1:"6",x2:"10",y2:"6"}):e.jsx("polyline",{points:"2 6 5 9 10 3"})})}),D!=="left"&&l&&e.jsx("span",{children:l}),Z&&e.jsx(o.Vr,{shortcuts:B,size:"sm"})]}),d&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),$==="right"&&x&&e.jsx("div",{id:`${k}-error`,className:"nice-field__error",role:"alert",children:x}),$==="right"&&!x&&w&&e.jsx("div",{id:`${k}-helper`,className:"nice-field__helper",children:w})]}),$!=="right"&&x&&e.jsx("div",{id:`${k}-error`,className:"nice-field__error",role:"alert",children:x}),$!=="right"&&!x&&w&&e.jsx("div",{id:`${k}-helper`,className:"nice-field__helper",children:w})]})});De.displayName="NiceCheckbox";const Fe=c.forwardRef(({label:l,checked:m=!1,onChange:i,disabled:p,readOnly:s,loading:n,required:d,size:y="md",name:f,id:u,className:_,style:S,accessMode:X,displayStyle:x,showKeyboardHints:w,error:E,helperText:h,labelPlacement:Z,errorPlacement:D,labelWidth:$,controlWidth:F},g)=>{const I=o._s(X,u),U=I==="hidden";(I==="disabled"||I==="readOnly")&&(p=!0);const{t:R}=o.$o(),A=o.ks(u);o.cs("toggle",x);const k=o.ls("toggle",x),B=c.useMemo(()=>[{key:"Space",description:R("shortcuts.toggle","Toggle on/off")}],[R]);return U?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${y} ${Z==="left"?"nice-field--label-left":""} ${n?"nice-field--loading":""} ${_||""}`,style:{...S,...$!=null&&{"--nice-field-label-width":typeof $=="number"?`${$}px`:$},...F!=null&&{"--nice-field-control-width":typeof F=="number"?`${F}px`:F}},"aria-busy":n||void 0,children:[Z==="left"&&l&&e.jsx("span",{className:`nice-field__label ${d?"nice-field__label--required":""}`,children:l}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-toggle nice-toggle--ds-${k} ${y!=="md"?`nice-toggle--${y}`:""} ${p||n?"nice-toggle--disabled":""}`,htmlFor:A,children:[e.jsx("input",{ref:g,id:A,type:"checkbox",className:"nice-toggle__input",name:f,checked:m,disabled:p||n,readOnly:s,role:"switch","aria-checked":m,"aria-invalid":!!E,onChange:K=>{s||n||i?.(K.target.checked)}}),e.jsx("span",{className:"nice-toggle__track",children:e.jsx("span",{className:"nice-toggle__thumb"})}),Z!=="left"&&l&&e.jsx("span",{children:l}),w&&e.jsx(o.Vr,{shortcuts:B,size:"sm"})]}),n&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),D==="right"&&E&&e.jsx("div",{id:`${A}-error`,className:"nice-field__error",role:"alert",children:E}),D==="right"&&!E&&h&&e.jsx("div",{id:`${A}-helper`,className:"nice-field__helper",children:h})]}),D!=="right"&&E&&e.jsx("div",{id:`${A}-error`,className:"nice-field__error",role:"alert",children:E}),D!=="right"&&!E&&h&&e.jsx("div",{id:`${A}-helper`,className:"nice-field__helper",children:h})]})});Fe.displayName="NiceToggle";const He=["var(--nice-danger, #ef4444)","var(--nice-warning, #f97316)","var(--nice-warning, #f59e0b)","var(--nice-success, #84cc16)","var(--nice-success, #10b981)","var(--nice-info, #06b6d4)","var(--nice-primary, #3b82f6)","var(--nice-info, #6366f1)","var(--nice-accent, #8b5cf6)","var(--nice-accent-pink, #ec4899)","var(--nice-text-secondary, #64748b)","var(--nice-text, #1e293b)"];function Ae(){return"#"+Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}function Be(l,m,i){const p=l/255,s=m/255,n=i/255,d=Math.max(p,s,n),y=Math.min(p,s,n),f=(d+y)/2;let u=0,_=0;if(d!==y){const S=d-y;switch(_=f>.5?S/(2-d-y):S/(d+y),d){case p:u=(s-n)/S+(s<n?6:0);break;case s:u=(n-p)/S+2;break;case n:u=(p-s)/S+4;break}u*=60}return{h:Math.round(u),s:Math.round(_*100),l:Math.round(f*100)}}function Te(l,m,i){const p=m/100,s=i/100,n=(1-Math.abs(2*s-1))*p,d=n*(1-Math.abs(l/60%2-1)),y=s-n/2;let f=0,u=0,_=0;return l<60?[f,u,_]=[n,d,0]:l<120?[f,u,_]=[d,n,0]:l<180?[f,u,_]=[0,n,d]:l<240?[f,u,_]=[0,d,n]:l<300?[f,u,_]=[d,0,n]:[f,u,_]=[n,0,d],{r:Math.round((f+y)*255),g:Math.round((u+y)*255),b:Math.round((_+y)*255)}}function qe(l,m,i){const p=l/255,s=m/255,n=i/255,d=Math.max(p,s,n),y=Math.min(p,s,n),f=d-y;let u=0;f!==0&&(d===p?u=(s-n)/f%6:d===s?u=(n-p)/f+2:u=(p-s)/f+4,u*=60,u<0&&(u+=360));const _=d===0?0:f/d;return{h:Math.round(u),s:Math.round(_*100),v:Math.round(d*100)}}function Ve(l,m,i){const p=m/100,s=i/100,n=s*p,d=n*(1-Math.abs(l/60%2-1)),y=s-n;let f=0,u=0,_=0;return l<60?[f,u,_]=[n,d,0]:l<120?[f,u,_]=[d,n,0]:l<180?[f,u,_]=[0,n,d]:l<240?[f,u,_]=[0,d,n]:l<300?[f,u,_]=[d,0,n]:[f,u,_]=[n,0,d],{r:Math.round((f+y)*255),g:Math.round((u+y)*255),b:Math.round((_+y)*255)}}function Ue(l){const m=/^#?([0-9a-f]{6})$/i.exec(l.trim()),i=/^#?([0-9a-f]{8})$/i.exec(l.trim());if(i){const p=i[1];return{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16),a:parseInt(p.slice(6,8),16)/255}}if(m){const p=parseInt(m[1],16);return{r:p>>16&255,g:p>>8&255,b:p&255,a:1}}return{r:0,g:0,b:0,a:1}}function Ke(l,m,i,p,s){const n=y=>Math.max(0,Math.min(255,Math.round(y))).toString(16).padStart(2,"0"),d=`#${n(l)}${n(m)}${n(i)}`;return s?`${d}${n(p*255)}`:d}const Le=c.forwardRef(({label:l,helperText:m,error:i,required:p,disabled:s,id:n,className:d,style:y,accessMode:f,displayStyle:u,value:_="var(--nice-primary, #3b82f6)",onChange:S,presets:X=He,showInput:x=!0,showRandom:w=!0,withAlpha:E=!1,showKeyboardHints:h,size:Z="md",labelPlacement:D,errorPlacement:$,labelWidth:F,controlWidth:g,loading:I},U)=>{const R=o._s(f,n),A=R==="hidden";(R==="disabled"||R==="readOnly")&&(s=!0);const{t:k}=o.$o(),B=o.ks(n);o.ls("input",u);const K=c.useCallback(()=>{s||S?.(Ae())},[s,S]),[L,W]=c.useState(!1),[re,le]=c.useState(null),J=c.useRef(null),Y=c.useRef(null);c.useLayoutEffect(()=>{if(!L||!Y.current)return;const b=()=>{const N=Y.current?.getBoundingClientRect();if(!N)return;const G=280,H=360;let M=N.left,ee=N.bottom+6;M+G>window.innerWidth-8&&(M=Math.max(8,window.innerWidth-G-8)),ee+H>window.innerHeight-8&&(ee=Math.max(8,N.top-H-6)),le({left:M,top:ee})};return b(),window.addEventListener("scroll",b,!0),window.addEventListener("resize",b),()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}},[L]),c.useEffect(()=>{if(!L)return;const b=G=>{const H=G.target;J.current?.contains(H)||Y.current?.contains(H)||W(!1)},N=G=>{G.key==="Escape"&&W(!1)};return document.addEventListener("mousedown",b),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",b),document.removeEventListener("keydown",N)}},[L]);const de=c.useMemo(()=>[{key:"Enter",description:k("shortcuts.openPicker","Open color picker")},{key:"Arrow keys",description:k("shortcuts.navigatePresets","Navigate presets")}],[k]);return A?null:e.jsxs("div",{className:`nice-field nice-field--${Z} ${D==="left"?"nice-field--label-left":""} ${I?"nice-field--loading":""} ${d||""}`,style:{...y,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...g!=null&&{"--nice-field-control-width":typeof g=="number"?`${g}px`:g}},"aria-busy":I||void 0,children:[l&&e.jsxs("label",{htmlFor:B,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,h&&e.jsx(o.Vr,{shortcuts:de,size:"sm"})]}),e.jsx("div",{className:"nice-field__control",children:e.jsxs("div",{className:"nice-color-picker",children:[e.jsxs("div",{className:"nice-color-picker__preview-row",children:[e.jsx("div",{ref:Y,className:"nice-color-picker__swatch",id:B,style:{background:_},onClick:b=>{b.stopPropagation(),s||W(N=>!N)},onKeyDown:b=>{!s&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),W(N=>!N))},role:"button",tabIndex:0,"aria-label":k("colorPicker.openPalette","Open color palette"),"aria-haspopup":"dialog","aria-expanded":L,children:e.jsx("input",{ref:b=>{typeof U=="function"?U(b):U&&(U.current=b)},type:"hidden",value:_,disabled:s,readOnly:!0})}),x&&e.jsx("div",{className:"nice-input nice-input--sm",style:{width:100},children:e.jsx("input",{className:"nice-input__native",type:"text",value:_,disabled:s,onChange:b=>S?.(b.target.value),maxLength:7})}),w&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--outline nice-btn--sm nice-color-picker__random",onClick:K,disabled:s,title:k("colorPicker.random","Random"),"aria-label":k("colorPicker.random","Random"),style:{fontSize:"0.65rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:k("colorPicker.random","Random")}),I&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),$==="right"&&i&&e.jsx("div",{id:`${B}-error`,className:"nice-field__error",role:"alert",children:i}),$==="right"&&!i&&m&&e.jsx("div",{id:`${B}-helper`,className:"nice-field__helper",children:m})]}),L&&re&&typeof document<"u"&&Ie.createPortal(e.jsx("div",{ref:J,className:"nice-color-picker__popup nice-color-picker__popup--portal",role:"dialog","aria-label":k("colorPicker.palette","Color palette"),style:{position:"fixed",left:re.left,top:re.top},onClick:b=>b.stopPropagation(),children:(()=>{const b=Ue(_),N={r:b.r,g:b.g,b:b.b},G=E?b.a:1,H=Be(N.r,N.g,N.b),M=qe(N.r,N.g,N.b),ee=(a,v,V,C=G)=>S?.(Ke(a,v,V,C,E)),ae=(a,v,V)=>ee(a,v,V),ue=(a,v,V)=>{const C=Te(a,v,V);ee(C.r,C.g,C.b)},Q=(a,v,V)=>{const C=Ve(a,v,V);ee(C.r,C.g,C.b)},z=a=>ee(N.r,N.g,N.b,a),oe=a=>{if(s)return;const v=a.currentTarget,V=P=>{const O=v.getBoundingClientRect(),xe=Math.max(0,Math.min(O.width,P.clientX-O.left)),ve=Math.max(0,Math.min(O.height,P.clientY-O.top)),pe=Math.round(xe/O.width*100),je=100-Math.round(ve/O.height*100);Q(M.h,pe,je)};V(a);const C=()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",C)};document.addEventListener("pointermove",V),document.addEventListener("pointerup",C)},se=`hsl(${M.h}, 100%, 50%)`;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-color-picker__popup-header",children:e.jsx("input",{type:"text",className:"nice-input__native nice-color-picker__popup-hex",value:_,disabled:s,onChange:a=>S?.(a.target.value),maxLength:E?9:7,"aria-label":k("colorPicker.hexValue","Hex value")})}),e.jsx("input",{type:"range",min:0,max:360,value:M.h,disabled:s,onChange:a=>Q(Number(a.target.value),M.s,M.v),className:"nice-color-picker__hue-slider","aria-label":k("colorPicker.hue","Hue")}),e.jsx("div",{className:"nice-color-picker__sv",style:{background:`linear-gradient(to top, var(--nice-text, #000), transparent), linear-gradient(to right, var(--nice-bg, #FFF), ${se})`},onPointerDown:oe,role:"application","aria-label":k("colorPicker.svPalette","Saturation/value palette"),children:e.jsx("span",{className:"nice-color-picker__sv-marker",style:{left:`${M.s}%`,top:`${100-M.v}%`}})}),e.jsxs("div",{className:"nice-color-picker__sliders",children:[e.jsx("div",{className:"nice-color-picker__slider-col",children:["h","s","l"].map(a=>{const v=a==="h"?360:100,V=H[a],C=P=>ue(a==="h"?P:H.h,a==="s"?P:H.s,a==="l"?P:H.l);return e.jsxs("div",{className:"nice-color-picker__slider-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:a.toUpperCase()}),e.jsx("input",{type:"range",min:0,max:v,value:V,disabled:s,onChange:P=>C(Number(P.target.value))}),e.jsx("input",{type:"number",min:0,max:v,value:V,disabled:s,onChange:P=>C(Number(P.target.value)||0),className:"nice-input__native nice-color-picker__slider-num"})]},a)})}),e.jsx("div",{className:"nice-color-picker__slider-col",children:["r","g","b"].map(a=>{const v=N[a],V=C=>ae(a==="r"?C:N.r,a==="g"?C:N.g,a==="b"?C:N.b);return e.jsxs("div",{className:"nice-color-picker__slider-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:a.toUpperCase()}),e.jsx("input",{type:"range",min:0,max:255,value:v,disabled:s,onChange:C=>V(Number(C.target.value))}),e.jsx("input",{type:"number",min:0,max:255,value:v,disabled:s,onChange:C=>V(Number(C.target.value)||0),className:"nice-input__native nice-color-picker__slider-num"})]},a)})})]}),E&&e.jsxs("div",{className:"nice-color-picker__alpha-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:"A"}),e.jsx("input",{type:"range",min:0,max:100,value:Math.round(G*100),disabled:s,onChange:a=>z(Number(a.target.value)/100),className:"nice-color-picker__alpha-slider",style:{background:`linear-gradient(to right, transparent, rgb(${N.r},${N.g},${N.b}))`},"aria-label":k("colorPicker.alpha","Alpha")}),e.jsx("input",{type:"number",min:0,max:100,value:Math.round(G*100),disabled:s,onChange:a=>z((Number(a.target.value)||0)/100),className:"nice-input__native nice-color-picker__slider-num"})]}),X.length>0&&e.jsx("div",{className:"nice-color-picker__popup-presets",children:X.map(a=>e.jsx("div",{className:`nice-color-picker__preset ${_===a?"nice-color-picker__preset--active":""}`,style:{background:a},onClick:()=>{S?.(a),W(!1)},role:"button",tabIndex:0,"aria-label":a,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),S?.(a),W(!1))}},a))})]})})()}),document.body)]})}),$!=="right"&&i&&e.jsx("div",{id:`${B}-error`,className:"nice-field__error",role:"alert",children:i}),$!=="right"&&!i&&m&&e.jsx("div",{id:`${B}-helper`,className:"nice-field__helper",children:m})]})});Le.displayName="NiceColorPicker";const Ee=c.forwardRef(({children:l,variant:m="primary",size:i="md",type:p="button",disabled:s,loading:n,fullWidth:d,onClick:y,leftIcon:f,rightIcon:u,error:_,errorPlacement:S="bottom",className:X,style:x,id:w,accessMode:E,displayStyle:h,...Z},D)=>{const $=o._s(E,w),F=$==="hidden";($==="disabled"||$==="readOnly")&&(s=!0);const g=o.cs("button",h),I=o.ls("button",h),U=m!=="primary"?(({background:k,color:B,...K})=>K)(g):g,R=e.jsxs("button",{ref:D,type:p,id:w,className:`nice-btn nice-btn--${m} nice-btn--${i} nice-btn--ds-${I} ${d?"nice-btn--full-width":""} ${n?"nice-btn--loading":""} ${_&&!S?"nice-btn--has-error":""} ${X||""}`,style:{...U,...x},disabled:s||n,"aria-busy":n||void 0,"aria-disabled":s||n||void 0,onClick:y,...Z,children:[n&&e.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),!n&&f&&e.jsx("span",{"aria-hidden":"true",children:f}),!n&&e.jsx("span",{children:l}),n&&e.jsx("span",{style:{visibility:"hidden"},"aria-hidden":"true",children:l}),!n&&u&&e.jsx("span",{"aria-hidden":"true",children:u})]});if(F)return null;if(!_)return R;const A=e.jsx("div",{className:"nice-field__error",role:"alert",children:_});return S==="right"?e.jsxs("span",{className:`nice-btn-field nice-btn-field--right nice-field--${i}`,style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:"8px",width:"fit-content"},children:[R,A]}):F?null:e.jsxs("span",{className:`nice-btn-field nice-btn-field--bottom nice-field--${i}`,style:{display:"inline-flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",width:"fit-content"},children:[R,A]})});Ee.displayName="NiceButton";const Ge=({tabs:l,activeTab:m,onChange:i,variant:p="default",vertical:s,size:n="md",className:d,style:y,displayStyle:f})=>{const u=o.cs("tab",f),_=o.ls("tab",f),[S,X]=c.useState(m||l[0]?.id),x=m??S,w=c.useCallback(h=>{X(h),i?.(h)},[i]),E=l.find(h=>h.id===x)?.content;return e.jsxs("div",{className:`nice-tabs nice-tabs--${n} nice-tabs--ds-${_} ${d||""}`,style:{...u,...y,...s?{display:"flex",gap:16}:{}},children:[e.jsx("div",{className:`nice-tabs__list ${p!=="default"?`nice-tabs__list--${p}`:""} ${s?"nice-tabs__list--vertical":""}`,role:"tablist",children:l.map(h=>e.jsxs("button",{type:"button",role:"tab","aria-selected":x===h.id,className:`nice-tabs__tab ${x===h.id?"nice-tabs__tab--active":""} ${h.disabled?"nice-tabs__tab--disabled":""}`,disabled:h.disabled,onClick:()=>w(h.id),children:[h.icon,e.jsx("span",{children:h.label}),h.badge!==void 0&&e.jsx("span",{className:"nice-tabs__badge",children:h.badge})]},h.id))}),E&&e.jsx("div",{className:"nice-tabs__panel",role:"tabpanel",children:E})]})};exports.NiceButton=Ee;exports.NiceCheckbox=De;exports.NiceColorPicker=Le;exports.NiceNumberInput=Se;exports.NiceSelect=Re;exports.NiceTabs=Ge;exports.NiceTextInput=Ce;exports.NiceToggle=Fe;
|