@nice2dev/ui 1.0.28 → 1.0.30

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.
Files changed (107) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/NiceAssessment.doc-BB1rXcVx.cjs +1 -0
  3. package/dist/NiceAssessment.doc-C3QQawiZ.js +23 -0
  4. package/dist/NiceBackupStatusBadge.doc-Bx2bFmBQ.cjs +1 -0
  5. package/dist/NiceBackupStatusBadge.doc-CdDxIQ-M.js +25 -0
  6. package/dist/NiceConfirmDialog-BiTJVR4-.js +81 -0
  7. package/dist/NiceConfirmDialog-Bjw_rN4o.cjs +1 -0
  8. package/dist/NiceConfirmDialog-DPfYwO2B.js +81 -0
  9. package/dist/NiceConfirmDialog-Dyh42OiK.cjs +1 -0
  10. package/dist/NiceErrorBoundary-1H751jK7.cjs +1 -0
  11. package/dist/NiceErrorBoundary-B-txoU3Y.js +709 -0
  12. package/dist/NiceErrorBoundary-BHCKA1h8.cjs +1 -0
  13. package/dist/NiceErrorBoundary-CBxXcleR.js +695 -0
  14. package/dist/NiceExam.doc-BpTJpwGb.js +23 -0
  15. package/dist/NiceExam.doc-Br8pEbQb.cjs +1 -0
  16. package/dist/NiceForm-C8yEx3VV.cjs +382 -0
  17. package/dist/NiceForm-Ci3XG7s7.js +5000 -0
  18. package/dist/NiceForm-DGUTmaZT.js +5014 -0
  19. package/dist/NiceForm-DmU-gmyv.cjs +382 -0
  20. package/dist/NiceModal-BClAtR5T.js +95 -0
  21. package/dist/NiceModal-Crbhc7GB.cjs +1 -0
  22. package/dist/NiceModal-XvEKVVLa.js +95 -0
  23. package/dist/NiceModal-iKwtagFB.cjs +1 -0
  24. package/dist/NiceModuleLifecyclePanel-BO8Hw_W9.js +7619 -0
  25. package/dist/NiceModuleLifecyclePanel-Ch7HRRoy.cjs +1 -0
  26. package/dist/NiceModuleLifecyclePanel-D3k8kAey.js +7582 -0
  27. package/dist/NiceModuleLifecyclePanel-MAyTh_s5.cjs +1 -0
  28. package/dist/NicePagination-BVo-4KAD.js +172 -0
  29. package/dist/NicePagination-CaohvQsY.cjs +1 -0
  30. package/dist/NicePagination-DUnMbROj.cjs +1 -0
  31. package/dist/NicePagination-DyC6dQ7_.js +171 -0
  32. package/dist/NicePinCodeInput-C43eB9h4.js +13102 -0
  33. package/dist/NicePinCodeInput-DsyLuc0b.cjs +696 -0
  34. package/dist/NicePinCodeInput-nuRCN-9R.js +13223 -0
  35. package/dist/NicePinCodeInput-p5IFVwfY.cjs +696 -0
  36. package/dist/NicePoll.doc-DCiXvOb0.js +23 -0
  37. package/dist/NicePoll.doc-IOgqVPhc.cjs +1 -0
  38. package/dist/NicePollLive.doc-CdUyiCyf.js +23 -0
  39. package/dist/NicePollLive.doc-xBMqHeyt.cjs +1 -0
  40. package/dist/NiceQuiz.doc-BhAeGrcP.cjs +1 -0
  41. package/dist/NiceQuiz.doc-BiZq8X1P.js +23 -0
  42. package/dist/NiceSavedQueryPanel-BBFV4qiF.js +6969 -0
  43. package/dist/NiceSavedQueryPanel-CsiVNkCT.cjs +596 -0
  44. package/dist/NiceSavedQueryPanel-DV4a4axz.cjs +596 -0
  45. package/dist/NiceSavedQueryPanel-Dgbn1ExK.js +6893 -0
  46. package/dist/NiceSurvey.doc-9UorYdXy.cjs +1 -0
  47. package/dist/NiceSurvey.doc-CPF1ZEHo.js +23 -0
  48. package/dist/NiceWindow-BehN3PKk.js +1592 -0
  49. package/dist/NiceWindow-Cm9E6EAi.cjs +1 -0
  50. package/dist/NiceWindow-Dqu9ik8A.cjs +1 -0
  51. package/dist/NiceWindow-FMrVS7zo.js +1603 -0
  52. package/dist/charts-B90sSFeJ.cjs +761 -0
  53. package/dist/charts-CJruxLRY.js +4657 -0
  54. package/dist/charts-D8oj6Nf5.cjs +761 -0
  55. package/dist/charts-DaLf19vS.js +4671 -0
  56. package/dist/charts.cjs +1 -1
  57. package/dist/charts.mjs +1 -1
  58. package/dist/core-BIdbG6p3.js +27212 -0
  59. package/dist/core-BUTtIHg0.js +27766 -0
  60. package/dist/core-CESNSRyS.cjs +122 -0
  61. package/dist/core-bzK0ZnUp.cjs +122 -0
  62. package/dist/data-branching-ByQdcjKO.cjs +1 -0
  63. package/dist/data-branching-BzRFsCJu.js +6133 -0
  64. package/dist/data-branching-DahoQa4M.cjs +1 -0
  65. package/dist/data-branching-psTzlcrT.js +6255 -0
  66. package/dist/data-branching.cjs +1 -1
  67. package/dist/data-branching.mjs +1 -1
  68. package/dist/data.cjs +1 -1
  69. package/dist/data.mjs +1 -1
  70. package/dist/devops-C9gdQxuU.cjs +17 -0
  71. package/dist/devops-CaO_4qGz.js +7684 -0
  72. package/dist/devops-D7bQ3rE4.cjs +17 -0
  73. package/dist/devops-jCmpD6O-.js +8165 -0
  74. package/dist/devops.cjs +1 -1
  75. package/dist/devops.mjs +3 -3
  76. package/dist/editors.cjs +1 -1
  77. package/dist/editors.d.ts +4 -0
  78. package/dist/editors.mjs +3 -3
  79. package/dist/feedback.cjs +1 -1
  80. package/dist/feedback.mjs +3 -3
  81. package/dist/index-BK_Uwmz0.js +67774 -0
  82. package/dist/index-BpixglWg.js +69337 -0
  83. package/dist/index-CTbp81RF.cjs +5517 -0
  84. package/dist/index-DLR-aWZR.cjs +5506 -0
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.css +1 -1
  87. package/dist/index.d.ts +796 -545
  88. package/dist/index.mjs +992 -979
  89. package/dist/lazy.cjs +1 -1
  90. package/dist/lazy.mjs +24 -24
  91. package/dist/navigation.cjs +1 -1
  92. package/dist/navigation.mjs +146 -146
  93. package/dist/no-code-B0mG7OQc.cjs +332 -0
  94. package/dist/no-code-BHo5WrXr.js +7425 -0
  95. package/dist/no-code-CikRvKeJ.js +7133 -0
  96. package/dist/no-code-DyA_1_Th.cjs +332 -0
  97. package/dist/no-code.cjs +1 -1
  98. package/dist/no-code.mjs +1 -1
  99. package/dist/overlays.cjs +1 -1
  100. package/dist/overlays.d.ts +4 -0
  101. package/dist/overlays.mjs +66 -66
  102. package/dist/pickerCommons-BEc3pZ_s.js +2044 -0
  103. package/dist/pickerCommons-CqhXp4QL.js +2043 -0
  104. package/dist/pickerCommons-CrITwM88.cjs +1 -0
  105. package/dist/pickerCommons-OsYJhnFE.cjs +1 -0
  106. package/dist/style.css +1 -1
  107. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # [1.0.27] — 2026-06-07
2
2
 
3
+ ## 1.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - Library-wide consistency pass + showcase overhaul.
8
+ - **Universal app shell:** every genuine multi-panel editor/studio/designer/builder/workspace standardized onto `NiceAppShell` (slots + `flush`), incl. `NiceTeamsWorkspace` and `NiceAPIDesigner`. No public API changes — internal layout only.
9
+ - **Icons:** foreign icons (emoji, raw unicode glyphs, inline `<svg>`, FontAwesome) replaced with `@nice2dev/icons` / `NiceIcon` built-ins across the packages; ~110 built-in icon paths added to `NiceIcon`.
10
+ - **Control sizing:** every basic control now honours the full `xs · sm · md · lg · xl` size scale with working CSS — fixed `NiceCard`, `NiceAlert`, `NiceSkeleton`, `NiceDivider`, `NiceSearchInput`, `NiceCallout`, `NiceStatistic`, `NiceSegmentedControl`, `NiceCheckbox`, `NiceParagraph`, and a `NiceSpinner` CSS-shadow regression (`md` baseline unchanged). `NiceNumericInput` gained a `size` prop.
11
+ - **NiceKioskShell:** the `style` prop now overrides the default full-screen `position: fixed` (so it can be embedded contained).
12
+ - **Input devices + spatial navigation:** `NiceGamepad` / `NiceMicrophone` / `NiceDeviceManager` / `NiceDeviceTile` and `NavShell` spatial-navigation support.
13
+ - **Audio:** AudioVerse → `@nice2dev/ui-audio` parity (15 controls; optional `recharts` visualizers).
14
+ - **Display atoms + forms:** standardized atoms (`NiceBadge`/`NiceTag`/`NiceAvatarGroup`/`NiceProgress`/…), removed the deprecated `NiceStatusBadge` (migrated to `NiceBadge` variants), entity validation builder, selectable `NiceCard`.
15
+ - **Editors inside satellites** (`ui-ai`/`ui-api`/`ui-bi`/`ui-math`/`ui-video`/`ui-audio`/`events`) now declare `@nice2dev/ui` (and where used `@nice2dev/icons` / `@nice2dev/ui-core`) as peer dependencies.
16
+
17
+ - Updated dependencies
18
+ - @nice2dev/ui-core@1.0.29
19
+
20
+ ## 1.0.29
21
+
22
+ ### Patch Changes
23
+
24
+ - ERP editor suite — consistency pass across the module / view / theme editing tools. Applied the rebuilt **NiceEntityEditor** quality bar to the whole suite: canonical theme tokens, every UI string routed through `useNiceTranslation`, and real multi-step guided tutorials.
25
+ - **NiceWorkflowDesigner / NiceBPMNDesigner** (`@nice2dev/ui`): full i18n — every toolbar / palette / properties / simulation label and all validation messages are now translatable (75 `workflowDesigner.*` keys); guided tour expanded to 4 steps (intro / toolbar / canvas / minimap). BPMN 2.0 element names stay in English by spec.
26
+ - **NiceThemeBuilder / NiceThemeDesigner** (`@nice2dev/ui`): tutorial expanded to 5 steps (presets / token sections / live preview / name + export).
27
+ - **NiceSchemaForm, NiceModuleEditor, NiceManifestEditor, NiceI18nEditor, NiceEntityEditor** (`@nice2dev/ui-forms`): canonical theme tokens, full i18n and multi-step tutorials; `NiceEntityEditor` DE/FR/ES/UK completed.
28
+ - **`@nice2dev/i18n`**: central dictionary now at 100% coverage for all six core languages (en/pl/de/fr/es/uk).
29
+
30
+ No public API changes; the sub-editors keep composing inside `NiceModuleEditor` via their existing prop contracts.
31
+
32
+ - NiceAssessment — PRO quiz / exam / survey / poll on one shared headless core (`useAssessment`), modelled on the NiceSetupWizard step-flow. Pages render arbitrary content (text, images, video, math formulas, presentations, any Nice control); 17 question types; scoring (per-question points + option weights, partial credit, negative marking, pass threshold, per-section subscores, review + explanations); timers (total/page/question), sections, question pools, deterministic shuffle, adaptive branching, resume/persistence; survey aggregate results (`results`/`fetchAggregateResults`); certificate + `onExport`. `NiceQuiz`/`NiceSurvey`/`NicePoll`/`NicePollLive` are now configurable presets, plus a new `NiceExam`.
33
+
34
+ BREAKING (pre-1.2.0): the old `NiceQuiz`/`NiceSurvey`/`NicePoll` prop & type APIs (`QuizQuestion`, `SurveyQuestion`, `PollOption`, `NiceQuizProps`, `SurveyResults`, …) are replaced by the unified `Assessment*` model. Component names persist as presets. Migration: `documentation/migration/assessment-1.0.x.md`.
35
+
36
+ - Updated dependencies
37
+ - @nice2dev/i18n@1.0.29
38
+
3
39
  ### NiceSetupWizard — sticky, independently-scrollable stepper
4
40
 
5
41
  - The wizard's step navigation (stepper) now behaves like `NiceSidebarNav`: it
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",s="NiceAssessment",i="PRO quiz / exam / survey / poll on one shared core. Pages render arbitrary content (text, images, video, math formulas, presentations, any control) alongside questions; quiz/exam score against correct answers, survey/poll collect responses and can show aggregate results. Presets: NiceQuiz, NiceExam, NiceSurvey, NicePoll, NicePollLive. Headless engine: useAssessment.",t="survey",r="1.0.29",o="stable",n="NiceToDev Team",a=[{name:"mode",type:"'quiz' | 'exam' | 'survey' | 'poll'",required:!1,description:"Behaviour profile (presets set this).",default:"quiz"},{name:"pages",type:"AssessmentPage[]",required:!1,description:"Pages — each renders arbitrary `content` and/or `questions`."},{name:"questions",type:"AssessmentQuestion[]",required:!1,description:"Shorthand: a flat question list (each becomes a one-question page)."},{name:"sections",type:"AssessmentSection[]",required:!1,description:"Sections for subscores + steppers."},{name:"layout",type:"'one-per-page' | 'all-at-once' | 'paginated'",required:!1,description:"Page layout.",default:"one-per-page"},{name:"theme",type:"NiceTheme | string",required:!1,description:"Self-applied theme (scoped NiceThemeProvider)."},{name:"scoring",type:"AssessmentScoringConfig",required:!1,description:"{ passThreshold, weighted, partialCredit, negativeMarking, clampToZero }."},{name:"timer",type:"AssessmentTimerConfig",required:!1,description:"{ total, perQuestion, autoAdvance } in seconds."},{name:"feedback",type:"'none' | 'immediate' | 'after-page' | 'at-end'",required:!1,description:"When correctness/explanations are revealed (mode-dependent default)."},{name:"lockNavigation",type:"boolean",required:!1,description:"Forward-only navigation (exam)."},{name:"allowBack",type:"boolean",required:!1,description:"Allow going back.",default:!0},{name:"allowSkip",type:"boolean",required:!1,description:"Allow skipping non-required questions.",default:!0},{name:"allowRetry",type:"boolean",required:!1,description:"Allow retrying after completion (quiz).",default:!1},{name:"lives",type:"number",required:!1,description:"Lives — quiz gamification (0 = unlimited)."},{name:"lifelines",type:"AssessmentLifeline[]",required:!1,description:"'fiftyFifty' | 'hint' | 'skipQuestion' | 'extraTime'."},{name:"review",type:"boolean",required:!1,description:"Show a review screen with explanations after completion.",default:!0},{name:"revealCorrect",type:"boolean",required:!1,description:"Reveal correct answers in review/feedback."},{name:"shuffleQuestions",type:"boolean",required:!1,description:"Shuffle questions (deterministic with randomizeSeed)."},{name:"shuffleOptions",type:"boolean",required:!1,description:"Shuffle options (per-question override available)."},{name:"randomizeSeed",type:"string | number",required:!1,description:"Deterministic shuffle/pool seed."},{name:"pool",type:"{ count: number; section?: string }",required:!1,description:"Question bank — pick N of M."},{name:"showProgress",type:"boolean",required:!1,description:"Show the progress bar.",default:!0},{name:"showNumbers",type:"boolean",required:!1,description:"Show question numbers.",default:!0},{name:"persistKey",type:"string",required:!1,description:"Persist answers/progress to localStorage (resume)."},{name:"results",type:"AssessmentAggregateResults",required:!1,description:"Aggregate results to display (survey/poll)."},{name:"fetchAggregateResults",type:"(submission) => Promise<AssessmentAggregateResults>",required:!1,description:"Async aggregate fetch after submit (survey/poll)."},{name:"certificate",type:"{ enabled?, title?, recipient? }",required:!1,description:"Certificate on pass (exam)."},{name:"onExport",type:"(result, submission) => void",required:!1,description:"Export hook for result/certificate."},{name:"questionRenderers",type:"AssessmentWidgetRegistry",required:!1,description:"Override / add question-type renderers."},{name:"onComplete",type:"(result: AssessmentResult) => void | Promise<void>",required:!1,description:"Fired with the scored result on completion."},{name:"onSubmit",type:"(submission: AssessmentSubmission) => void | Promise<void>",required:!1,description:"Fired with the raw submission on completion."},{name:"onAnswer",type:"(answer: AssessmentAnswer) => void",required:!1,description:"Fired on each answer change."},{name:"onPageChange",type:"(pageId, index) => void",required:!1,description:"Fired on navigation."},{name:"onTimeout",type:"(scope: 'total' | 'page' | 'question') => void",required:!1,description:"Fired when a timer expires."},{name:"labels",type:"Partial<Record<AssessmentLabelKey, string>>",required:!1,description:"i18n-overridable button/label text."},{name:"accessMode",type:"NiceAccessMode",required:!1,description:"Accessibility / interaction mode."}],l=["Pages accept any ReactNode as `content` — embed images, video, NiceMathEditor formulas, presentations.","Use the NiceQuiz / NiceExam / NiceSurvey / NicePoll presets for ergonomic defaults; all NiceAssessmentProps pass through.","Provide `scoring.passThreshold` for quiz/exam; provide `results`/`fetchAggregateResults` for survey/poll aggregates."],d={$schema:e,name:s,description:i,category:t,since:r,status:o,author:n,props:a,tips:l};exports.$schema=e;exports.author=n;exports.category=t;exports.default=d;exports.description=i;exports.name=s;exports.props=a;exports.since=r;exports.status=o;exports.tips=l;
@@ -0,0 +1,23 @@
1
+ const e = "https://nice2dev.com/schemas/component-doc-v1.json", s = "NiceAssessment", i = "PRO quiz / exam / survey / poll on one shared core. Pages render arbitrary content (text, images, video, math formulas, presentations, any control) alongside questions; quiz/exam score against correct answers, survey/poll collect responses and can show aggregate results. Presets: NiceQuiz, NiceExam, NiceSurvey, NicePoll, NicePollLive. Headless engine: useAssessment.", t = "survey", r = "1.0.29", n = "stable", o = "NiceToDev Team", a = [{ name: "mode", type: "'quiz' | 'exam' | 'survey' | 'poll'", required: !1, description: "Behaviour profile (presets set this).", default: "quiz" }, { name: "pages", type: "AssessmentPage[]", required: !1, description: "Pages — each renders arbitrary `content` and/or `questions`." }, { name: "questions", type: "AssessmentQuestion[]", required: !1, description: "Shorthand: a flat question list (each becomes a one-question page)." }, { name: "sections", type: "AssessmentSection[]", required: !1, description: "Sections for subscores + steppers." }, { name: "layout", type: "'one-per-page' | 'all-at-once' | 'paginated'", required: !1, description: "Page layout.", default: "one-per-page" }, { name: "theme", type: "NiceTheme | string", required: !1, description: "Self-applied theme (scoped NiceThemeProvider)." }, { name: "scoring", type: "AssessmentScoringConfig", required: !1, description: "{ passThreshold, weighted, partialCredit, negativeMarking, clampToZero }." }, { name: "timer", type: "AssessmentTimerConfig", required: !1, description: "{ total, perQuestion, autoAdvance } in seconds." }, { name: "feedback", type: "'none' | 'immediate' | 'after-page' | 'at-end'", required: !1, description: "When correctness/explanations are revealed (mode-dependent default)." }, { name: "lockNavigation", type: "boolean", required: !1, description: "Forward-only navigation (exam)." }, { name: "allowBack", type: "boolean", required: !1, description: "Allow going back.", default: !0 }, { name: "allowSkip", type: "boolean", required: !1, description: "Allow skipping non-required questions.", default: !0 }, { name: "allowRetry", type: "boolean", required: !1, description: "Allow retrying after completion (quiz).", default: !1 }, { name: "lives", type: "number", required: !1, description: "Lives — quiz gamification (0 = unlimited)." }, { name: "lifelines", type: "AssessmentLifeline[]", required: !1, description: "'fiftyFifty' | 'hint' | 'skipQuestion' | 'extraTime'." }, { name: "review", type: "boolean", required: !1, description: "Show a review screen with explanations after completion.", default: !0 }, { name: "revealCorrect", type: "boolean", required: !1, description: "Reveal correct answers in review/feedback." }, { name: "shuffleQuestions", type: "boolean", required: !1, description: "Shuffle questions (deterministic with randomizeSeed)." }, { name: "shuffleOptions", type: "boolean", required: !1, description: "Shuffle options (per-question override available)." }, { name: "randomizeSeed", type: "string | number", required: !1, description: "Deterministic shuffle/pool seed." }, { name: "pool", type: "{ count: number; section?: string }", required: !1, description: "Question bank — pick N of M." }, { name: "showProgress", type: "boolean", required: !1, description: "Show the progress bar.", default: !0 }, { name: "showNumbers", type: "boolean", required: !1, description: "Show question numbers.", default: !0 }, { name: "persistKey", type: "string", required: !1, description: "Persist answers/progress to localStorage (resume)." }, { name: "results", type: "AssessmentAggregateResults", required: !1, description: "Aggregate results to display (survey/poll)." }, { name: "fetchAggregateResults", type: "(submission) => Promise<AssessmentAggregateResults>", required: !1, description: "Async aggregate fetch after submit (survey/poll)." }, { name: "certificate", type: "{ enabled?, title?, recipient? }", required: !1, description: "Certificate on pass (exam)." }, { name: "onExport", type: "(result, submission) => void", required: !1, description: "Export hook for result/certificate." }, { name: "questionRenderers", type: "AssessmentWidgetRegistry", required: !1, description: "Override / add question-type renderers." }, { name: "onComplete", type: "(result: AssessmentResult) => void | Promise<void>", required: !1, description: "Fired with the scored result on completion." }, { name: "onSubmit", type: "(submission: AssessmentSubmission) => void | Promise<void>", required: !1, description: "Fired with the raw submission on completion." }, { name: "onAnswer", type: "(answer: AssessmentAnswer) => void", required: !1, description: "Fired on each answer change." }, { name: "onPageChange", type: "(pageId, index) => void", required: !1, description: "Fired on navigation." }, { name: "onTimeout", type: "(scope: 'total' | 'page' | 'question') => void", required: !1, description: "Fired when a timer expires." }, { name: "labels", type: "Partial<Record<AssessmentLabelKey, string>>", required: !1, description: "i18n-overridable button/label text." }, { name: "accessMode", type: "NiceAccessMode", required: !1, description: "Accessibility / interaction mode." }], l = ["Pages accept any ReactNode as `content` — embed images, video, NiceMathEditor formulas, presentations.", "Use the NiceQuiz / NiceExam / NiceSurvey / NicePoll presets for ergonomic defaults; all NiceAssessmentProps pass through.", "Provide `scoring.passThreshold` for quiz/exam; provide `results`/`fetchAggregateResults` for survey/poll aggregates."], d = {
2
+ $schema: e,
3
+ name: s,
4
+ description: i,
5
+ category: t,
6
+ since: r,
7
+ status: n,
8
+ author: o,
9
+ props: a,
10
+ tips: l
11
+ };
12
+ export {
13
+ e as $schema,
14
+ o as author,
15
+ t as category,
16
+ d as default,
17
+ i as description,
18
+ s as name,
19
+ a as props,
20
+ r as since,
21
+ n as status,
22
+ l as tips
23
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="https://nice2dev.com/schemas/component-doc-v1.json",e="NiceBackupStatusBadge",s="Backup status indicator badge.",a="display",c="1.0.0",n="stable",o=[{name:"status",type:"'synced' | 'pending' | 'error' | 'syncing'",required:!0,description:"Backup status"},{name:"lastBackup",type:"Date",description:"Last backup timestamp"}],i=[{title:"Status Badge",code:'<NiceBackupStatusBadge status="synced" lastBackup={new Date()} />'}],p={keyboard:[],aria:["Status announcement"]},u=["NiceBadge"],d={$schema:t,name:e,description:s,category:a,since:c,status:n,props:o,examples:i,accessibility:p,seeAlso:u};exports.$schema=t;exports.accessibility=p;exports.category=a;exports.default=d;exports.description=s;exports.examples=i;exports.name=e;exports.props=o;exports.seeAlso=u;exports.since=c;exports.status=n;
@@ -0,0 +1,25 @@
1
+ const t = "https://nice2dev.com/schemas/component-doc-v1.json", s = "NiceBackupStatusBadge", e = "Backup status indicator badge.", a = "display", c = "1.0.0", n = "stable", o = [{ name: "status", type: "'synced' | 'pending' | 'error' | 'syncing'", required: !0, description: "Backup status" }, { name: "lastBackup", type: "Date", description: "Last backup timestamp" }], i = [{ title: "Status Badge", code: '<NiceBackupStatusBadge status="synced" lastBackup={new Date()} />' }], p = { keyboard: [], aria: ["Status announcement"] }, u = ["NiceBadge"], d = {
2
+ $schema: t,
3
+ name: s,
4
+ description: e,
5
+ category: a,
6
+ since: c,
7
+ status: n,
8
+ props: o,
9
+ examples: i,
10
+ accessibility: p,
11
+ seeAlso: u
12
+ };
13
+ export {
14
+ t as $schema,
15
+ p as accessibility,
16
+ a as category,
17
+ d as default,
18
+ e as description,
19
+ i as examples,
20
+ s as name,
21
+ o as props,
22
+ u as seeAlso,
23
+ c as since,
24
+ n as status
25
+ };
@@ -0,0 +1,81 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { G as C } from "./core-BUTtIHg0.js";
3
+ import m from "react";
4
+ const z = {
5
+ info: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) }),
6
+ warning: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" }) }),
7
+ error: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) }),
8
+ success: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) })
9
+ }, E = ({
10
+ visible: i,
11
+ message: a,
12
+ header: o,
13
+ icon: h,
14
+ variant: n = "warning",
15
+ acceptLabel: f,
16
+ rejectLabel: v,
17
+ onAccept: u,
18
+ onReject: c,
19
+ closeOnOverlay: g = !1,
20
+ closeOnEscape: l = !0,
21
+ size: p = "md",
22
+ className: w,
23
+ style: y
24
+ }) => {
25
+ const { t: s } = C();
26
+ if (m.useEffect(() => {
27
+ if (!i || !l)
28
+ return;
29
+ const r = (b) => {
30
+ b.key === "Escape" && c();
31
+ };
32
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
33
+ }, [i, l, c]), m.useEffect(() => (i ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
34
+ document.body.style.overflow = "";
35
+ }), [i]), !i)
36
+ return null;
37
+ const d = h ?? z[n], _ = f ?? s("confirm.accept", "Yes"), N = v ?? s("confirm.reject", "No");
38
+ return /* @__PURE__ */ e("div", { className: "nice-modal-overlay", onClick: g ? c : void 0, children: /* @__PURE__ */ t(
39
+ "div",
40
+ {
41
+ className: `nice-confirm nice-confirm--${n} nice-confirm--${p} ${w || ""}`,
42
+ style: y,
43
+ role: "alertdialog",
44
+ "aria-modal": "true",
45
+ "aria-label": o,
46
+ "aria-describedby": "nice-confirm-message",
47
+ onClick: (r) => r.stopPropagation(),
48
+ children: [
49
+ o && /* @__PURE__ */ e("div", { className: "nice-confirm__header", children: /* @__PURE__ */ e("h3", { className: "nice-confirm__title", children: o }) }),
50
+ /* @__PURE__ */ t("div", { className: "nice-confirm__body", children: [
51
+ d && /* @__PURE__ */ e("div", { className: `nice-confirm__icon nice-confirm__icon--${n}`, children: d }),
52
+ /* @__PURE__ */ e("div", { id: "nice-confirm-message", className: "nice-confirm__message", children: a })
53
+ ] }),
54
+ /* @__PURE__ */ t("div", { className: "nice-confirm__footer", children: [
55
+ /* @__PURE__ */ e(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ className: "nice-btn nice-btn--ghost nice-btn--md",
60
+ onClick: c,
61
+ children: N
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e(
65
+ "button",
66
+ {
67
+ type: "button",
68
+ className: `nice-btn nice-btn--${n === "error" ? "error" : "primary"} nice-btn--md`,
69
+ onClick: u,
70
+ autoFocus: !0,
71
+ children: _
72
+ }
73
+ )
74
+ ] })
75
+ ]
76
+ }
77
+ ) });
78
+ };
79
+ export {
80
+ E as N
81
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),C=require("./core-CESNSRyS.cjs"),d=require("react"),N={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},b=({visible:c,message:m,header:o,icon:h,variant:i="warning",acceptLabel:a,rejectLabel:f,onAccept:u,onReject:n,closeOnOverlay:v=!1,closeOnEscape:s=!0,size:x="md",className:g,style:j})=>{const{t}=C.Gt();if(d.useEffect(()=>{if(!c||!s)return;const r=_=>{_.key==="Escape"&&n()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[c,s,n]),d.useEffect(()=>(c?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[c]),!c)return null;const l=h??N[i],w=a??t("confirm.accept","Yes"),y=f??t("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:v?n:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${i} nice-confirm--${x} ${g||""}`,style:j,role:"alertdialog","aria-modal":"true","aria-label":o,"aria-describedby":"nice-confirm-message",onClick:r=>r.stopPropagation(),children:[o&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:o})}),e.jsxs("div",{className:"nice-confirm__body",children:[l&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${i}`,children:l}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:m})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:n,children:y}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${i==="error"?"error":"primary"} nice-btn--md`,onClick:u,autoFocus:!0,children:w})]})]})})};exports.NiceConfirmDialog=b;
@@ -0,0 +1,81 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { G as C } from "./core-BIdbG6p3.js";
3
+ import m from "react";
4
+ const z = {
5
+ info: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" }) }),
6
+ warning: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" }) }),
7
+ error: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) }),
8
+ success: /* @__PURE__ */ e("svg", { width: "28", height: "28", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) })
9
+ }, E = ({
10
+ visible: i,
11
+ message: a,
12
+ header: o,
13
+ icon: h,
14
+ variant: n = "warning",
15
+ acceptLabel: f,
16
+ rejectLabel: v,
17
+ onAccept: u,
18
+ onReject: c,
19
+ closeOnOverlay: g = !1,
20
+ closeOnEscape: l = !0,
21
+ size: p = "md",
22
+ className: w,
23
+ style: y
24
+ }) => {
25
+ const { t: s } = C();
26
+ if (m.useEffect(() => {
27
+ if (!i || !l)
28
+ return;
29
+ const r = (b) => {
30
+ b.key === "Escape" && c();
31
+ };
32
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
33
+ }, [i, l, c]), m.useEffect(() => (i ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
34
+ document.body.style.overflow = "";
35
+ }), [i]), !i)
36
+ return null;
37
+ const d = h ?? z[n], _ = f ?? s("confirm.accept", "Yes"), N = v ?? s("confirm.reject", "No");
38
+ return /* @__PURE__ */ e("div", { className: "nice-modal-overlay", onClick: g ? c : void 0, children: /* @__PURE__ */ t(
39
+ "div",
40
+ {
41
+ className: `nice-confirm nice-confirm--${n} nice-confirm--${p} ${w || ""}`,
42
+ style: y,
43
+ role: "alertdialog",
44
+ "aria-modal": "true",
45
+ "aria-label": o,
46
+ "aria-describedby": "nice-confirm-message",
47
+ onClick: (r) => r.stopPropagation(),
48
+ children: [
49
+ o && /* @__PURE__ */ e("div", { className: "nice-confirm__header", children: /* @__PURE__ */ e("h3", { className: "nice-confirm__title", children: o }) }),
50
+ /* @__PURE__ */ t("div", { className: "nice-confirm__body", children: [
51
+ d && /* @__PURE__ */ e("div", { className: `nice-confirm__icon nice-confirm__icon--${n}`, children: d }),
52
+ /* @__PURE__ */ e("div", { id: "nice-confirm-message", className: "nice-confirm__message", children: a })
53
+ ] }),
54
+ /* @__PURE__ */ t("div", { className: "nice-confirm__footer", children: [
55
+ /* @__PURE__ */ e(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ className: "nice-btn nice-btn--ghost nice-btn--md",
60
+ onClick: c,
61
+ children: N
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e(
65
+ "button",
66
+ {
67
+ type: "button",
68
+ className: `nice-btn nice-btn--${n === "error" ? "error" : "primary"} nice-btn--md`,
69
+ onClick: u,
70
+ autoFocus: !0,
71
+ children: _
72
+ }
73
+ )
74
+ ] })
75
+ ]
76
+ }
77
+ ) });
78
+ };
79
+ export {
80
+ E as N
81
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),C=require("./core-bzK0ZnUp.cjs"),d=require("react"),N={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},b=({visible:c,message:m,header:o,icon:h,variant:i="warning",acceptLabel:a,rejectLabel:f,onAccept:u,onReject:n,closeOnOverlay:v=!1,closeOnEscape:s=!0,size:x="md",className:g,style:j})=>{const{t}=C.Gt();if(d.useEffect(()=>{if(!c||!s)return;const r=_=>{_.key==="Escape"&&n()};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[c,s,n]),d.useEffect(()=>(c?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[c]),!c)return null;const l=h??N[i],w=a??t("confirm.accept","Yes"),y=f??t("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:v?n:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${i} nice-confirm--${x} ${g||""}`,style:j,role:"alertdialog","aria-modal":"true","aria-label":o,"aria-describedby":"nice-confirm-message",onClick:r=>r.stopPropagation(),children:[o&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:o})}),e.jsxs("div",{className:"nice-confirm__body",children:[l&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${i}`,children:l}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:m})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:n,children:y}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${i==="error"?"error":"primary"} nice-btn--md`,onClick:u,autoFocus:!0,children:w})]})]})})};exports.NiceConfirmDialog=b;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),g=require("./core-CESNSRyS.cjs"),i=require("react"),M={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},V=({variant:s="info",title:t,children:a,closable:r,onClose:n,icon:c,size:l="md",className:h,style:u,displayStyle:p})=>{const b=g.ac("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${b} ${h||""}`,style:u,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:c||M[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:a})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:e.jsx(g.oa,{name:"close",size:16})})]})},U=({open:s,onClose:t,title:a,position:r="right",size:n="md",children:c,footer:l,transitionDuration:h,className:u,style:p,displayStyle:b})=>{const j=g.rc("modal",b),x=g.ac("modal",b),{t:_}=g.Gt(),k=i.useRef(null);return g.Sc(k,s),i.useEffect(()=>{if(!s)return;const f=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",f),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:f=>{f.target===f.currentTarget&&t()}}),e.jsxs("div",{ref:k,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${u||""}`,style:{...j,...p,...h!=null?{transitionDuration:`${h}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":a,children:[a&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:a}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":_("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",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-drawer__body",children:c}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},W=({toasts:s,onDismiss:t,position:a="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${a}`,children:s.map(r=>e.jsx(Y,{toast:r,onDismiss:t},r.id))}),Y=({toast:s,onDismiss:t})=>{const[a,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(a){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[a,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${a?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:M[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),"aria-label":"Close",children:e.jsx(g.oa,{name:"close",size:16})})]})};let J=0;function K(){const[s,t]=i.useState([]),a=i.useCallback((n,c,l)=>{const h=`toast-${++J}`;return t(u=>[...u,{id:h,variant:n,message:c,title:l?.title,duration:l?.duration}]),h},[]),r=i.useCallback(n=>{t(c=>c.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,c)=>a("info",n,c),success:(n,c)=>a("success",n,c),warning:(n,c)=>a("warning",n,c),error:(n,c)=>a("error",n,c)}}const Q=({error:s,onRetry:t,retryLabel:a="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:c="error",icon:l,size:h="md",className:u,style:p,"data-testid":b})=>{const[j,x]=i.useState(n??0),_=i.useRef(),k=typeof s=="string"?s:s.message,f=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),_.current=setInterval(()=>{x(o=>o<=1?(clearInterval(_.current),t(),0):o-1)},1e3),()=>clearInterval(_.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${c} nice-retry-panel--${h} ${u||""}`,style:p,role:"alert","data-testid":b,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??e.jsx(g.oa,{name:"warning",size:24})}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:k})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:f,children:a}),n&&j>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",j,"s"]})]})]})};function X(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function Z(){return navigator.onLine}function ee(){return!0}const se=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:a,size:r="md",className:n,style:c,"data-testid":l})=>i.useSyncExternalStore(X,Z,ee)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:c,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:a??e.jsx(g.oa,{name:"wifi",size:18})}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function B({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,autoRetry:r=!1,autoRetryCount:n=3}={}){const[c,l]=i.useState(!1),[h,u]=i.useState(!1),[p,b]=i.useState(!1),[j,x]=i.useState(0),[_,k]=i.useState(0),f=i.useRef(null),o=i.useRef(null),C=i.useRef(null),w=i.useRef(0),N=i.useCallback(()=>{f.current&&clearTimeout(f.current),o.current&&clearTimeout(o.current),C.current&&clearInterval(C.current)},[]),v=i.useCallback(()=>{N(),l(!0),u(!1),b(!1),x(0),w.current=Date.now(),C.current=setInterval(()=>{x(Date.now()-w.current)},200),f.current=setTimeout(()=>{u(!0)},t),o.current=setTimeout(()=>{b(!0),l(!1),u(!1),N(),a?.()},s)},[N,t,s,a]),$=i.useCallback(()=>{N(),l(!1),u(!1)},[N]),d=i.useCallback(()=>{k(y=>y+1),b(!1),v()},[v]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&_<n){const y=Math.pow(2,_)*1e3,E=setTimeout(()=>d(),y);return()=>clearTimeout(E)}},[r,n,p,_,d]),{isLoading:c,isSlow:h,isTimedOut:p,elapsed:j,retryCount:_,start:v,stop:$,retry:d}}const ne=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,onRetry:r,autoRetry:n=!1,autoRetryCount:c=3,showProgress:l=!0,slowMessage:h="Operacja trwa dłużej niż zwykle…",timeoutMessage:u="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:b,size:j="md",className:x,style:_,"data-testid":k})=>{const{isSlow:f,isTimedOut:o,elapsed:C,retry:w}=B({timeoutMs:s,slowThresholdMs:t,onTimeout:a,autoRetry:n,autoRetryCount:c}),N=()=>{w(),r?.()};if(!p)return e.jsx(e.Fragment,{children:b});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${j} ${x??""}`,style:_,role:"alert","data-testid":k,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:u}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const v=Math.min(100,C/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${j} ${f?"nice-timeout-feedback--slow":""} ${x??""}`,style:_,"data-testid":k,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),f&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":v,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${v}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:a,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:c,position:l="bottom",size:h="md",policyUrl:u,showDetails:p=!1,className:b,style:j,id:x,..._},k)=>{const f=g.hc(x),{t:o}=g.Gt(),[C,w]=i.useState(!0),N=s??C,[v,$]=i.useState(p),[d,y]=i.useState(()=>{const m={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return c&&Object.assign(m,c),m.necessary=!0,m}),E={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},S={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},z=i.useCallback(()=>{const m={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(m),w(!1)},[t,r]),L=i.useCallback(()=>{const m={necessary:!0,analytics:!1,marketing:!1,preferences:!1};a?.(),r?.(m),w(!1)},[a,r]),I=i.useCallback(()=>{r?.({...d,necessary:!0}),w(!1)},[d,r]);return N?e.jsx("div",{ref:k,id:f,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${h} ${b??""}`,style:j,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",..._,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),u&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:u,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),v&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(m=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:d[m],disabled:m==="necessary",onChange:D=>y(R=>({...R,[m]:D.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:E[m]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:S[m]})]})]},m))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!v&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),v&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:I,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:L,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:z,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:a,loading:r=!1,error:n,variant:c="primary",size:l="md",showRememberMe:h=!0,showForgotPassword:u=!0,showRegister:p=!1,title:b,logo:j,usernameLabel:x,passwordLabel:_,usernamePlaceholder:k,passwordPlaceholder:f,className:o,style:C,id:w,...N},v)=>{const $=g.hc(w),{t:d}=g.Gt(),[y,E]=i.useState(""),[S,z]=i.useState(""),[L,I]=i.useState(!1),[m,D]=i.useState(!1),R=`${$}-user`,F=`${$}-pass`,q=`${$}-remember`,G=i.useCallback(T=>{T.preventDefault(),!r&&s?.({username:y,password:S,rememberMe:L})},[r,y,S,L,s]);return e.jsxs("form",{ref:v,id:$,className:`nice-login nice-login--${c} nice-login--${l} ${o??""}`,style:C,onSubmit:G,noValidate:!0,...N,children:[j&&e.jsx("div",{className:"nice-login__logo",children:j}),b&&e.jsx("h2",{className:"nice-login__title",children:b??d("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:R,className:"nice-login__label",children:x??d("login.username","Username")}),e.jsx("input",{id:R,className:"nice-login__input",type:"text",value:y,onChange:T=>E(T.target.value),placeholder:k??d("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:r,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:F,className:"nice-login__label",children:_??d("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:m?"text":"password",value:S,onChange:T=>z(T.target.value),placeholder:f??d("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:r,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>D(!m),"aria-label":m?d("login.hidePassword","Hide password"):d("login.showPassword","Show password"),tabIndex:-1,children:e.jsx(g.oa,{name:m?"eye-off":"eye",size:16})})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:q,children:[e.jsx("input",{id:q,type:"checkbox",checked:L,onChange:T=>I(T.target.checked),disabled:r}),e.jsx("span",{children:d("login.rememberMe","Remember me")})]}),u&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:d("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${c}`,disabled:r||!y||!S,children:r?d("login.loading","Signing in..."):d("login.submit","Sign In")}),p&&a&&e.jsxs("p",{className:"nice-login__register",children:[d("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:a,disabled:r,children:d("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const A=class A extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,a){this.props.onError?.(t,a)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:a=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:e.jsx(g.oa,{name:"warning",size:32})}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),a&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};A.displayName="NiceErrorBoundary";let P=A;exports.NiceAlert=V;exports.NiceCookieConsent=O;exports.NiceDrawer=U;exports.NiceErrorBoundary=P;exports.NiceLoginForm=H;exports.NiceOfflineBanner=se;exports.NiceRetryPanel=Q;exports.NiceTimeoutFeedback=ne;exports.NiceToastContainer=W;exports.alertIcons=M;exports.useNiceTimeout=B;exports.useNiceToast=K;