@wakastellar/ui 3.3.3 → 3.5.2

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 (149) hide show
  1. package/dist/badge-BbwO7QeZ.js +1 -0
  2. package/dist/badge-BfiocODp.mjs +23 -0
  3. package/dist/charts.cjs.js +1 -1
  4. package/dist/charts.es.js +1 -1
  5. package/dist/chunk-14q5BKub.js +1 -0
  6. package/dist/{chunk-BH6uBOac.mjs → chunk-Cr9pTUWm.mjs} +5 -5
  7. package/dist/cn-DEtaFQsA.js +1 -0
  8. package/dist/cn-DUn6aSIQ.mjs +24 -0
  9. package/dist/doc.cjs.js +2 -2
  10. package/dist/doc.es.js +19 -19
  11. package/dist/editor.cjs.js +48 -0
  12. package/dist/editor.d.ts +1 -0
  13. package/dist/editor.es.js +6551 -0
  14. package/dist/{exceljs.min-DG9M8IZ1.mjs → exceljs.min-DL1XYDll.mjs} +1 -1
  15. package/dist/{exceljs.min-BuefmDRS.js → exceljs.min-qeIfSCbF.js} +1 -1
  16. package/dist/export.cjs.js +1 -1
  17. package/dist/export.es.js +1 -1
  18. package/dist/index.cjs.js +150 -150
  19. package/dist/index.es.js +25694 -26503
  20. package/dist/input-BfaSAGVw.js +1 -0
  21. package/dist/input-DVr_Qkl8.mjs +14 -0
  22. package/dist/rich-text.cjs.js +1 -1
  23. package/dist/rich-text.es.js +1 -1
  24. package/dist/security-CyBpuklN.mjs +122 -0
  25. package/dist/security-bFWwDrlg.js +1 -0
  26. package/dist/separator-NrkltulH.js +1 -0
  27. package/dist/separator-ibN2mycs.mjs +51 -0
  28. package/dist/src/blocks/login/index.d.ts +4 -4
  29. package/dist/src/components/editor/blocks/index.d.ts +51 -0
  30. package/dist/src/components/editor/blocks/waka-acceptance-criteria-block.d.ts +60 -0
  31. package/dist/src/components/editor/blocks/waka-ai-assist-block.d.ts +58 -0
  32. package/dist/src/components/editor/blocks/waka-api-endpoint-block.d.ts +63 -0
  33. package/dist/src/components/editor/blocks/waka-code-playground-block.d.ts +61 -0
  34. package/dist/src/components/editor/blocks/waka-comment-thread-block.d.ts +85 -0
  35. package/dist/src/components/editor/blocks/waka-diagram-block.d.ts +52 -0
  36. package/dist/src/components/editor/blocks/waka-embed-block.d.ts +58 -0
  37. package/dist/src/components/editor/blocks/waka-slash-menu-block.d.ts +67 -0
  38. package/dist/src/components/editor/blocks/waka-user-story-block.d.ts +79 -0
  39. package/dist/src/components/editor/blocks/waka-version-diff-block.d.ts +73 -0
  40. package/dist/src/components/editor/index.d.ts +66 -0
  41. package/dist/src/components/editor/waka-ai-writer.d.ts +80 -0
  42. package/dist/src/components/editor/waka-collaborative-editor.d.ts +93 -0
  43. package/dist/src/components/editor/waka-diff-viewer.d.ts +71 -0
  44. package/dist/src/components/editor/waka-dnd-editor.d.ts +64 -0
  45. package/dist/src/components/editor/waka-document-editor.d.ts +92 -0
  46. package/dist/src/components/editor/waka-editor-elements.d.ts +79 -0
  47. package/dist/src/components/editor/waka-editor-leaves.d.ts +39 -0
  48. package/dist/src/components/editor/waka-editor-plugins.d.ts +41 -0
  49. package/dist/src/components/editor/waka-editor-toolbar.d.ts +20 -0
  50. package/dist/src/components/editor/waka-editor.d.ts +59 -0
  51. package/dist/src/components/editor/waka-floating-toolbar.d.ts +47 -0
  52. package/dist/src/components/editor/waka-markdown-editor.d.ts +60 -0
  53. package/dist/src/components/editor/waka-mention-editor.d.ts +125 -0
  54. package/dist/src/components/editor/waka-slash-menu.d.ts +70 -0
  55. package/dist/src/components/editor/waka-spec-editor.d.ts +88 -0
  56. package/dist/src/components/index.d.ts +1 -15
  57. package/dist/src/editor.d.ts +26 -0
  58. package/dist/src/stories/editor/EditorStoryWrapper.d.ts +11 -0
  59. package/dist/textarea-CdQWggYG.js +1 -0
  60. package/dist/textarea-DJDXJ3nd.mjs +23 -0
  61. package/dist/types-C2St0wOW.js +1 -0
  62. package/dist/{types-B6GVaSIP.mjs → types-JnqoLyuv.mjs} +214 -211
  63. package/dist/{useDataTableImport-BPvfo--2.mjs → useDataTableImport-BWUFesPi.mjs} +3 -3
  64. package/dist/{useDataTableImport-Cm_pCKnO.js → useDataTableImport-T7ddpN5k.js} +3 -3
  65. package/dist/waka-doc-renderer-CTxC7Trf.js +3 -0
  66. package/dist/{waka-doc-renderer-BkIvas3z.mjs → waka-doc-renderer-Cw-Xnyen.mjs} +264 -281
  67. package/dist/waka-editor-plugins-CGojOMS5.js +1 -0
  68. package/dist/waka-editor-plugins-Dwh4Vreq.mjs +135 -0
  69. package/dist/waka-rich-text-editor-BlIdtknG.js +1 -0
  70. package/dist/waka-rich-text-editor-D1uA3zbB.js +1 -0
  71. package/dist/waka-rich-text-editor-DgSWiXMW.mjs +342 -0
  72. package/dist/waka-rich-text-editor-DndVJuDw.mjs +2 -0
  73. package/package.json +87 -2
  74. package/src/blocks/footer/index.tsx +4 -9
  75. package/src/blocks/login/index.tsx +14 -20
  76. package/src/blocks/profile/index.tsx +5 -8
  77. package/src/blocks/sidebar/index.tsx +0 -2
  78. package/src/components/dropdown-menu/DropdownMenu.stories.tsx +2 -2
  79. package/src/components/editor/blocks/index.ts +182 -0
  80. package/src/components/editor/blocks/waka-acceptance-criteria-block.tsx +326 -0
  81. package/src/components/editor/blocks/waka-ai-assist-block.tsx +284 -0
  82. package/src/components/editor/blocks/waka-api-endpoint-block.tsx +382 -0
  83. package/src/components/editor/blocks/waka-code-playground-block.tsx +331 -0
  84. package/src/components/editor/blocks/waka-comment-thread-block.tsx +448 -0
  85. package/src/components/editor/blocks/waka-diagram-block.tsx +293 -0
  86. package/src/components/editor/blocks/waka-embed-block.tsx +416 -0
  87. package/src/components/editor/blocks/waka-slash-menu-block.tsx +432 -0
  88. package/src/components/editor/blocks/waka-user-story-block.tsx +295 -0
  89. package/src/components/editor/blocks/waka-version-diff-block.tsx +426 -0
  90. package/src/components/editor/index.ts +279 -0
  91. package/src/components/editor/waka-ai-writer.tsx +434 -0
  92. package/src/components/editor/waka-collaborative-editor.tsx +426 -0
  93. package/src/components/editor/waka-diff-viewer.tsx +352 -0
  94. package/src/components/editor/waka-dnd-editor.tsx +284 -0
  95. package/src/components/editor/waka-document-editor.tsx +502 -0
  96. package/src/components/editor/waka-editor-elements.tsx +312 -0
  97. package/src/components/editor/waka-editor-leaves.tsx +101 -0
  98. package/src/components/editor/waka-editor-plugins.ts +207 -0
  99. package/src/components/editor/waka-editor-toolbar.tsx +358 -0
  100. package/src/components/editor/waka-editor.tsx +431 -0
  101. package/src/components/editor/waka-floating-toolbar.tsx +268 -0
  102. package/src/components/editor/waka-markdown-editor.tsx +395 -0
  103. package/src/components/editor/waka-mention-editor.tsx +459 -0
  104. package/src/components/editor/waka-slash-menu.tsx +392 -0
  105. package/src/components/editor/waka-spec-editor.tsx +657 -0
  106. package/src/components/index.ts +1 -18
  107. package/src/components/waka-approval-chain/WakaApprovalChain.stories.tsx +15 -17
  108. package/src/components/waka-compare-period/WakaComparePeriod.stories.tsx +35 -19
  109. package/src/components/waka-content-recommendation/WakaContentRecommendation.stories.tsx +18 -5
  110. package/src/components/waka-password-strength/WakaPasswordStrength.stories.tsx +11 -34
  111. package/src/components/waka-streak-counter/WakaStreakCounter.stories.tsx +30 -30
  112. package/dist/chunk-BDDJmn7V.js +0 -1
  113. package/dist/cn-DnPbmOCy.js +0 -1
  114. package/dist/cn-DpLcAzrf.mjs +0 -22
  115. package/dist/separator-BDReXBvI.mjs +0 -59
  116. package/dist/separator-BKjNl9sI.js +0 -1
  117. package/dist/src/components/waka-actor-badge/index.d.ts +0 -8
  118. package/dist/src/components/waka-actors-list/index.d.ts +0 -18
  119. package/dist/src/components/waka-ai-assistant-button/index.d.ts +0 -8
  120. package/dist/src/components/waka-document-flyover/index.d.ts +0 -10
  121. package/dist/src/components/waka-document-preview-popup/index.d.ts +0 -26
  122. package/dist/src/components/waka-hour-balance-badge/index.d.ts +0 -8
  123. package/dist/src/components/waka-hour-consumption-table/index.d.ts +0 -15
  124. package/dist/src/components/waka-hour-pack-dialog/index.d.ts +0 -8
  125. package/dist/src/components/waka-project-stats-header/index.d.ts +0 -15
  126. package/dist/src/components/waka-step-comment-bubble/index.d.ts +0 -13
  127. package/dist/src/components/waka-step-comment-panel/index.d.ts +0 -20
  128. package/dist/src/components/waka-step-permission-matrix/index.d.ts +0 -12
  129. package/dist/src/components/waka-time-entry-dialog/index.d.ts +0 -16
  130. package/dist/src/components/waka-time-tracking-flyover/index.d.ts +0 -11
  131. package/dist/types-BH9cQRqZ.js +0 -1
  132. package/dist/waka-doc-renderer-BZ2-SqyT.js +0 -3
  133. package/dist/waka-rich-text-editor-BJGlQgpq.js +0 -1
  134. package/dist/waka-rich-text-editor-BJzzxeP1.mjs +0 -361
  135. package/dist/waka-rich-text-editor-wnXLwvUo.js +0 -1
  136. package/src/components/waka-actor-badge/index.tsx +0 -34
  137. package/src/components/waka-actors-list/index.tsx +0 -125
  138. package/src/components/waka-ai-assistant-button/index.tsx +0 -31
  139. package/src/components/waka-document-flyover/index.tsx +0 -36
  140. package/src/components/waka-document-preview-popup/index.tsx +0 -103
  141. package/src/components/waka-hour-balance-badge/index.tsx +0 -43
  142. package/src/components/waka-hour-consumption-table/index.tsx +0 -72
  143. package/src/components/waka-hour-pack-dialog/index.tsx +0 -72
  144. package/src/components/waka-project-stats-header/index.tsx +0 -69
  145. package/src/components/waka-step-comment-bubble/index.tsx +0 -71
  146. package/src/components/waka-step-comment-panel/index.tsx +0 -106
  147. package/src/components/waka-step-permission-matrix/index.tsx +0 -65
  148. package/src/components/waka-time-entry-dialog/index.tsx +0 -131
  149. package/src/components/waka-time-tracking-flyover/index.tsx +0 -41
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react"
2
- import { WakaApprovalChain, type Approver } from "./index"
2
+ import { WakaApprovalChain, type ApprovalStep } from "./index"
3
3
 
4
4
  const meta: Meta<typeof WakaApprovalChain> = {
5
5
  title: "Admin/WakaApprovalChain",
@@ -7,28 +7,27 @@ const meta: Meta<typeof WakaApprovalChain> = {
7
7
  parameters: { layout: "padded" },
8
8
  tags: ["autodocs"],
9
9
  argTypes: {
10
- orientation: { control: "select", options: ["horizontal", "vertical"], description: "Orientation" },
10
+ variant: { control: "select", options: ["horizontal", "vertical"], description: "Orientation" },
11
11
  showComments: { control: "boolean", description: "Afficher les commentaires" },
12
- interactive: { control: "boolean", description: "Mode interactif" },
13
12
  },
14
13
  }
15
14
 
16
15
  export default meta
17
16
  type Story = StoryObj<typeof WakaApprovalChain>
18
17
 
19
- const approvers: Approver[] = [
20
- { id: "1", name: "Alice Martin", role: "Manager", status: "approved", date: new Date(Date.now() - 86400000), comment: "Approuvé" },
21
- { id: "2", name: "Bob Dupont", role: "Finance", status: "approved", date: new Date(Date.now() - 43200000) },
22
- { id: "3", name: "Charlie Bernard", role: "Directeur", status: "pending" },
18
+ const steps: ApprovalStep[] = [
19
+ { id: "1", approver: { id: "a1", name: "Alice Martin", role: "Manager" }, status: "approved", timestamp: new Date(Date.now() - 86400000), comment: "Approuve" },
20
+ { id: "2", approver: { id: "a2", name: "Bob Dupont", role: "Finance" }, status: "approved", timestamp: new Date(Date.now() - 43200000) },
21
+ { id: "3", approver: { id: "a3", name: "Charlie Bernard", role: "Directeur" }, status: "pending" },
23
22
  ]
24
23
 
25
24
  export const Default: Story = {
26
- args: { approvers, orientation: "horizontal", showComments: true },
25
+ args: { steps, variant: "horizontal", showComments: true },
27
26
  render: (args) => <WakaApprovalChain {...args} />,
28
27
  }
29
28
 
30
29
  export const Vertical: Story = {
31
- args: { approvers, orientation: "vertical", showComments: true },
30
+ args: { steps, variant: "vertical", showComments: true },
32
31
  render: (args) => (
33
32
  <div style={{ maxWidth: 400 }}>
34
33
  <WakaApprovalChain {...args} />
@@ -38,18 +37,18 @@ export const Vertical: Story = {
38
37
 
39
38
  export const AllApproved: Story = {
40
39
  args: {
41
- approvers: approvers.map(a => ({ ...a, status: "approved" as const, date: new Date() })),
42
- orientation: "horizontal",
40
+ steps: steps.map(s => ({ ...s, status: "approved" as const, timestamp: new Date() })),
41
+ variant: "horizontal",
43
42
  },
44
43
  render: (args) => <WakaApprovalChain {...args} />,
45
44
  }
46
45
 
47
46
  export const Rejected: Story = {
48
47
  args: {
49
- approvers: [
50
- { ...approvers[0], status: "approved" as const },
51
- { ...approvers[1], status: "rejected" as const, comment: "Budget insuffisant" },
52
- { ...approvers[2], status: "skipped" as const },
48
+ steps: [
49
+ { ...steps[0], status: "approved" as const },
50
+ { ...steps[1], status: "rejected" as const, comment: "Budget insuffisant" },
51
+ { ...steps[2], status: "pending" as const },
53
52
  ],
54
53
  showComments: true,
55
54
  },
@@ -57,7 +56,6 @@ export const Rejected: Story = {
57
56
  }
58
57
 
59
58
  export const Interactive: Story = {
60
- args: { approvers, interactive: true, showComments: true },
59
+ args: { steps, showComments: true, currentUserId: "a3" },
61
60
  render: (args) => <WakaApprovalChain {...args} />,
62
61
  }
63
-
@@ -7,29 +7,32 @@ const meta: Meta<typeof WakaComparePeriod> = {
7
7
  parameters: { layout: "centered" },
8
8
  tags: ["autodocs"],
9
9
  argTypes: {
10
- preset: { control: "select", options: ["last_week", "last_month", "last_quarter", "last_year", "custom"], description: "Préréglage" },
11
- showChart: { control: "boolean", description: "Afficher le graphique" },
12
- showPercentage: { control: "boolean", description: "Afficher les pourcentages" },
10
+ periodPreset: { control: "select", options: ["last_week", "last_month", "last_quarter", "last_year", "custom"], description: "Prereglage" },
11
+ showComparisonBars: { control: "boolean", description: "Afficher les barres de comparaison" },
12
+ showSummary: { control: "boolean", description: "Afficher le resume" },
13
13
  },
14
14
  }
15
15
 
16
16
  export default meta
17
17
  type Story = StoryObj<typeof WakaComparePeriod>
18
18
 
19
+ const currentPeriod = { start: new Date("2024-01-01"), end: new Date("2024-01-31") }
20
+ const previousPeriod = { start: new Date("2023-12-01"), end: new Date("2023-12-31") }
21
+
19
22
  const metrics = [
20
- { id: "revenue", label: "Revenu", current: 45000, previous: 38000, format: "currency" as const },
21
- { id: "users", label: "Utilisateurs", current: 1250, previous: 1100, format: "number" as const },
22
- { id: "conversion", label: "Conversion", current: 3.5, previous: 3.2, format: "percent" as const },
23
+ { id: "revenue", name: "Revenu", value: { current: 45000, previous: 38000 }, unit: "EUR" },
24
+ { id: "users", name: "Utilisateurs", value: { current: 1250, previous: 1100 } },
25
+ { id: "conversion", name: "Conversion", value: { current: 3.5, previous: 3.2 }, unit: "%" },
23
26
  ]
24
27
 
25
28
  export const Default: Story = {
26
29
  args: {
27
30
  metrics,
28
- preset: "last_month",
29
- currentPeriod: { start: new Date("2024-01-01"), end: new Date("2024-01-31") },
30
- previousPeriod: { start: new Date("2023-12-01"), end: new Date("2023-12-31") },
31
- showChart: true,
32
- showPercentage: true,
31
+ currentPeriod,
32
+ previousPeriod,
33
+ periodPreset: "last_month",
34
+ showComparisonBars: true,
35
+ showSummary: true,
33
36
  },
34
37
  render: (args) => (
35
38
  <div style={{ width: 500 }}>
@@ -41,9 +44,11 @@ export const Default: Story = {
41
44
  export const WeekComparison: Story = {
42
45
  args: {
43
46
  metrics,
44
- preset: "last_week",
45
- showChart: true,
46
- showPercentage: true,
47
+ currentPeriod: { start: new Date("2024-01-22"), end: new Date("2024-01-28") },
48
+ previousPeriod: { start: new Date("2024-01-15"), end: new Date("2024-01-21") },
49
+ periodPreset: "last_week",
50
+ showComparisonBars: true,
51
+ showSummary: true,
47
52
  },
48
53
  render: (args) => (
49
54
  <div style={{ width: 500 }}>
@@ -54,9 +59,14 @@ export const WeekComparison: Story = {
54
59
 
55
60
  export const NegativeTrend: Story = {
56
61
  args: {
57
- metrics: metrics.map(m => ({ ...m, current: m.previous * 0.9, previous: m.current })),
58
- preset: "last_month",
59
- showPercentage: true,
62
+ metrics: metrics.map(m => ({
63
+ ...m,
64
+ value: { current: m.value.previous * 0.9, previous: m.value.current },
65
+ })),
66
+ currentPeriod,
67
+ previousPeriod,
68
+ periodPreset: "last_month",
69
+ showSummary: true,
60
70
  },
61
71
  render: (args) => (
62
72
  <div style={{ width: 500 }}>
@@ -66,11 +76,17 @@ export const NegativeTrend: Story = {
66
76
  }
67
77
 
68
78
  export const NoChart: Story = {
69
- args: { metrics, preset: "last_quarter", showChart: false, showPercentage: true },
79
+ args: {
80
+ metrics,
81
+ currentPeriod,
82
+ previousPeriod,
83
+ periodPreset: "last_quarter",
84
+ showComparisonBars: false,
85
+ showSummary: true,
86
+ },
70
87
  render: (args) => (
71
88
  <div style={{ width: 400 }}>
72
89
  <WakaComparePeriod {...args} />
73
90
  </div>
74
91
  ),
75
92
  }
76
-
@@ -1,16 +1,30 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react"
2
2
  import { WakaContentRecommendation } from "./index"
3
+ import { WakaAdProvider } from "../waka-ad-provider/index"
4
+
5
+ const adConfig = {
6
+ network: "custom" as const,
7
+ customAdServer: "https://ads.example.com",
8
+ testMode: true,
9
+ }
3
10
 
4
11
  const meta: Meta<typeof WakaContentRecommendation> = {
5
12
  title: "Sponsoring/WakaContentRecommendation",
6
13
  component: WakaContentRecommendation,
7
14
  parameters: { layout: "padded" },
8
15
  tags: ["autodocs"],
16
+ decorators: [
17
+ (Story) => (
18
+ <WakaAdProvider config={adConfig}>
19
+ <Story />
20
+ </WakaAdProvider>
21
+ ),
22
+ ],
9
23
  argTypes: {
10
24
  layout: { control: "select", options: ["grid", "carousel", "list"], description: "Disposition" },
11
25
  columns: { control: "select", options: [2, 3, 4], description: "Colonnes (grid)" },
12
- showArrows: { control: "boolean", description: "Flèches navigation" },
13
- autoScroll: { control: "boolean", description: "Défilement auto" },
26
+ showArrows: { control: "boolean", description: "Fleches navigation" },
27
+ autoScroll: { control: "boolean", description: "Defilement auto" },
14
28
  },
15
29
  }
16
30
 
@@ -25,12 +39,12 @@ export const Default: Story = {
25
39
  }
26
40
 
27
41
  export const Carousel: Story = {
28
- args: { title: "À découvrir", slotIds, layout: "carousel", showArrows: true, autoScroll: false },
42
+ args: { title: "A decouvrir", slotIds, layout: "carousel", showArrows: true, autoScroll: false },
29
43
  render: (args) => <WakaContentRecommendation {...args} />,
30
44
  }
31
45
 
32
46
  export const List: Story = {
33
- args: { title: "Articles suggérés", slotIds: slotIds.slice(0, 3), layout: "list" },
47
+ args: { title: "Articles suggeres", slotIds: slotIds.slice(0, 3), layout: "list" },
34
48
  render: (args) => <WakaContentRecommendation {...args} />,
35
49
  }
36
50
 
@@ -38,4 +52,3 @@ export const TwoColumns: Story = {
38
52
  args: { title: "Pour vous", slotIds: slotIds.slice(0, 4), layout: "grid", columns: 2 },
39
53
  render: (args) => <WakaContentRecommendation {...args} />,
40
54
  }
41
-
@@ -18,9 +18,9 @@ const meta: Meta<typeof WakaPasswordStrength> = {
18
18
  control: "boolean",
19
19
  description: "Afficher le champ de saisie",
20
20
  },
21
- showRequirements: {
21
+ showChecklist: {
22
22
  control: "boolean",
23
- description: "Afficher les exigences",
23
+ description: "Afficher la checklist des exigences",
24
24
  },
25
25
  showStrengthBar: {
26
26
  control: "boolean",
@@ -34,22 +34,6 @@ const meta: Meta<typeof WakaPasswordStrength> = {
34
34
  control: "number",
35
35
  description: "Longueur minimale requise",
36
36
  },
37
- requireUppercase: {
38
- control: "boolean",
39
- description: "Exiger une majuscule",
40
- },
41
- requireLowercase: {
42
- control: "boolean",
43
- description: "Exiger une minuscule",
44
- },
45
- requireNumber: {
46
- control: "boolean",
47
- description: "Exiger un chiffre",
48
- },
49
- requireSpecial: {
50
- control: "boolean",
51
- description: "Exiger un caractère spécial",
52
- },
53
37
  },
54
38
  }
55
39
 
@@ -58,15 +42,12 @@ type Story = StoryObj<typeof WakaPasswordStrength>
58
42
 
59
43
  export const Default: Story = {
60
44
  args: {
45
+ password: "",
61
46
  showInput: true,
62
- showRequirements: true,
47
+ showChecklist: true,
63
48
  showStrengthBar: true,
64
49
  showStrengthLabel: true,
65
50
  minLength: 8,
66
- requireUppercase: true,
67
- requireLowercase: true,
68
- requireNumber: true,
69
- requireSpecial: true,
70
51
  },
71
52
  render: (args) => (
72
53
  <div style={{ width: 350 }}>
@@ -79,7 +60,7 @@ export const WeakPassword: Story = {
79
60
  args: {
80
61
  password: "abc",
81
62
  showInput: false,
82
- showRequirements: true,
63
+ showChecklist: true,
83
64
  showStrengthBar: true,
84
65
  showStrengthLabel: true,
85
66
  },
@@ -94,7 +75,7 @@ export const FairPassword: Story = {
94
75
  args: {
95
76
  password: "Password1",
96
77
  showInput: false,
97
- showRequirements: true,
78
+ showChecklist: true,
98
79
  showStrengthBar: true,
99
80
  showStrengthLabel: true,
100
81
  },
@@ -109,7 +90,7 @@ export const GoodPassword: Story = {
109
90
  args: {
110
91
  password: "Password123!",
111
92
  showInput: false,
112
- showRequirements: true,
93
+ showChecklist: true,
113
94
  showStrengthBar: true,
114
95
  showStrengthLabel: true,
115
96
  },
@@ -124,7 +105,7 @@ export const StrongPassword: Story = {
124
105
  args: {
125
106
  password: "MyStr0ng!P@ssword2024",
126
107
  showInput: false,
127
- showRequirements: true,
108
+ showChecklist: true,
128
109
  showStrengthBar: true,
129
110
  showStrengthLabel: true,
130
111
  },
@@ -138,7 +119,7 @@ export const StrongPassword: Story = {
138
119
  export const BarOnly: Story = {
139
120
  args: {
140
121
  showInput: true,
141
- showRequirements: false,
122
+ showChecklist: false,
142
123
  showStrengthBar: true,
143
124
  showStrengthLabel: true,
144
125
  },
@@ -152,7 +133,7 @@ export const BarOnly: Story = {
152
133
  export const RequirementsOnly: Story = {
153
134
  args: {
154
135
  showInput: true,
155
- showRequirements: true,
136
+ showChecklist: true,
156
137
  showStrengthBar: false,
157
138
  showStrengthLabel: false,
158
139
  },
@@ -166,13 +147,9 @@ export const RequirementsOnly: Story = {
166
147
  export const SimpleRequirements: Story = {
167
148
  args: {
168
149
  showInput: true,
169
- showRequirements: true,
150
+ showChecklist: true,
170
151
  showStrengthBar: true,
171
152
  minLength: 6,
172
- requireUppercase: false,
173
- requireLowercase: true,
174
- requireNumber: true,
175
- requireSpecial: false,
176
153
  },
177
154
  render: (args) => (
178
155
  <div style={{ width: 350 }}>
@@ -15,11 +15,11 @@ const meta: Meta<typeof WakaStreakCounter> = {
15
15
  },
16
16
  tags: ['autodocs'],
17
17
  argTypes: {
18
- streak: {
18
+ count: {
19
19
  control: { type: 'number', min: 0, max: 365 },
20
20
  description: 'Current streak count',
21
21
  },
22
- maxStreak: {
22
+ bestStreak: {
23
23
  control: { type: 'number', min: 0, max: 365 },
24
24
  description: 'Best streak achieved',
25
25
  },
@@ -49,8 +49,8 @@ type Story = StoryObj<typeof WakaStreakCounter>
49
49
 
50
50
  export const Default: Story = {
51
51
  args: {
52
- streak: 7,
53
- maxStreak: 14,
52
+ count: 7,
53
+ bestStreak: 14,
54
54
  size: 'md',
55
55
  variant: 'default',
56
56
  animated: true,
@@ -64,15 +64,15 @@ export const Variants: Story = {
64
64
  <div className="flex flex-wrap gap-6 items-start">
65
65
  <div className="text-center">
66
66
  <p className="text-sm text-muted-foreground mb-2">Default</p>
67
- <WakaStreakCounter streak={14} variant="default" />
67
+ <WakaStreakCounter count={14} variant="default" />
68
68
  </div>
69
69
  <div className="text-center">
70
70
  <p className="text-sm text-muted-foreground mb-2">Compact</p>
71
- <WakaStreakCounter streak={14} variant="compact" />
71
+ <WakaStreakCounter count={14} variant="compact" />
72
72
  </div>
73
73
  <div className="text-center">
74
74
  <p className="text-sm text-muted-foreground mb-2">Detailed</p>
75
- <WakaStreakCounter streak={14} maxStreak={30} variant="detailed" />
75
+ <WakaStreakCounter count={14} bestStreak={30} variant="detailed" />
76
76
  </div>
77
77
  </div>
78
78
  ),
@@ -83,15 +83,15 @@ export const Sizes: Story = {
83
83
  <div className="flex items-end gap-6">
84
84
  <div className="text-center">
85
85
  <p className="text-sm text-muted-foreground mb-2">Small</p>
86
- <WakaStreakCounter streak={5} size="sm" />
86
+ <WakaStreakCounter count={5} size="sm" />
87
87
  </div>
88
88
  <div className="text-center">
89
89
  <p className="text-sm text-muted-foreground mb-2">Medium</p>
90
- <WakaStreakCounter streak={10} size="md" />
90
+ <WakaStreakCounter count={10} size="md" />
91
91
  </div>
92
92
  <div className="text-center">
93
93
  <p className="text-sm text-muted-foreground mb-2">Large</p>
94
- <WakaStreakCounter streak={15} size="lg" />
94
+ <WakaStreakCounter count={15} size="lg" />
95
95
  </div>
96
96
  </div>
97
97
  ),
@@ -102,27 +102,27 @@ export const StreakLevels: Story = {
102
102
  <div className="grid grid-cols-2 gap-6">
103
103
  <div className="p-4 rounded-lg border text-center">
104
104
  <p className="text-sm text-muted-foreground mb-2">No Streak</p>
105
- <WakaStreakCounter streak={0} />
105
+ <WakaStreakCounter count={0} />
106
106
  </div>
107
107
  <div className="p-4 rounded-lg border text-center">
108
108
  <p className="text-sm text-muted-foreground mb-2">Starting (3 days)</p>
109
- <WakaStreakCounter streak={3} />
109
+ <WakaStreakCounter count={3} />
110
110
  </div>
111
111
  <div className="p-4 rounded-lg border text-center">
112
112
  <p className="text-sm text-muted-foreground mb-2">Week (7 days)</p>
113
- <WakaStreakCounter streak={7} />
113
+ <WakaStreakCounter count={7} />
114
114
  </div>
115
115
  <div className="p-4 rounded-lg border text-center">
116
116
  <p className="text-sm text-muted-foreground mb-2">Month (30 days)</p>
117
- <WakaStreakCounter streak={30} />
117
+ <WakaStreakCounter count={30} />
118
118
  </div>
119
119
  <div className="p-4 rounded-lg border text-center">
120
120
  <p className="text-sm text-muted-foreground mb-2">Quarter (90 days)</p>
121
- <WakaStreakCounter streak={90} />
121
+ <WakaStreakCounter count={90} />
122
122
  </div>
123
123
  <div className="p-4 rounded-lg border text-center">
124
124
  <p className="text-sm text-muted-foreground mb-2">Year (365 days)</p>
125
- <WakaStreakCounter streak={365} />
125
+ <WakaStreakCounter count={365} />
126
126
  </div>
127
127
  </div>
128
128
  ),
@@ -133,11 +133,11 @@ export const WithMaxStreak: Story = {
133
133
  <div className="space-y-6">
134
134
  <div className="p-4 rounded-lg border">
135
135
  <p className="text-sm text-muted-foreground mb-2">Current vs Best</p>
136
- <WakaStreakCounter streak={12} maxStreak={45} variant="detailed" />
136
+ <WakaStreakCounter count={12} bestStreak={45} variant="detailed" />
137
137
  </div>
138
138
  <div className="p-4 rounded-lg border">
139
139
  <p className="text-sm text-muted-foreground mb-2">New Personal Best!</p>
140
- <WakaStreakCounter streak={50} maxStreak={45} variant="detailed" />
140
+ <WakaStreakCounter count={50} bestStreak={45} variant="detailed" />
141
141
  </div>
142
142
  </div>
143
143
  ),
@@ -145,13 +145,13 @@ export const WithMaxStreak: Story = {
145
145
 
146
146
  export const Interactive: Story = {
147
147
  render: () => {
148
- const [streak, setStreak] = React.useState(5)
149
- const [maxStreak, setMaxStreak] = React.useState(10)
148
+ const [count, setStreak] = React.useState(5)
149
+ const [bestStreak, setMaxStreak] = React.useState(10)
150
150
 
151
151
  const incrementStreak = () => {
152
- const newStreak = streak + 1
152
+ const newStreak = count + 1
153
153
  setStreak(newStreak)
154
- if (newStreak > maxStreak) {
154
+ if (newStreak > bestStreak) {
155
155
  setMaxStreak(newStreak)
156
156
  }
157
157
  }
@@ -162,7 +162,7 @@ export const Interactive: Story = {
162
162
 
163
163
  return (
164
164
  <div className="space-y-6">
165
- <WakaStreakCounter streak={streak} maxStreak={maxStreak} variant="detailed" size="lg" />
165
+ <WakaStreakCounter count={count} bestStreak={bestStreak} variant="detailed" size="lg" />
166
166
 
167
167
  <div className="flex gap-2 justify-center">
168
168
  <button
@@ -196,7 +196,7 @@ export const DashboardWidget: Story = {
196
196
  <h3 className="font-semibold">Daily Streak</h3>
197
197
  <span className="text-xs text-muted-foreground">Keep it going!</span>
198
198
  </div>
199
- <WakaStreakCounter streak={21} maxStreak={35} variant="detailed" />
199
+ <WakaStreakCounter count={21} bestStreak={35} variant="detailed" />
200
200
  <div className="mt-4 pt-4 border-t">
201
201
  <div className="flex justify-between text-sm">
202
202
  <span className="text-muted-foreground">Next milestone</span>
@@ -212,10 +212,10 @@ export const MultipleUsers: Story = {
212
212
  <div className="space-y-4 w-[400px]">
213
213
  <h3 className="font-semibold">Leaderboard - Streaks</h3>
214
214
  {[
215
- { name: 'Alice', streak: 45, avatar: 'A' },
216
- { name: 'Bob', streak: 32, avatar: 'B' },
217
- { name: 'Carol', streak: 28, avatar: 'C' },
218
- { name: 'David', streak: 14, avatar: 'D' },
215
+ { name: 'Alice', count: 45, avatar: 'A' },
216
+ { name: 'Bob', count: 32, avatar: 'B' },
217
+ { name: 'Carol', count: 28, avatar: 'C' },
218
+ { name: 'David', count: 14, avatar: 'D' },
219
219
  ].map((user, index) => (
220
220
  <div key={user.name} className="flex items-center gap-3 p-3 rounded-lg border">
221
221
  <span className="text-lg font-bold text-muted-foreground w-6">#{index + 1}</span>
@@ -223,7 +223,7 @@ export const MultipleUsers: Story = {
223
223
  {user.avatar}
224
224
  </div>
225
225
  <span className="font-medium flex-1">{user.name}</span>
226
- <WakaStreakCounter streak={user.streak} variant="compact" size="sm" />
226
+ <WakaStreakCounter count={user.count} variant="compact" size="sm" />
227
227
  </div>
228
228
  ))}
229
229
  </div>
@@ -231,5 +231,5 @@ export const MultipleUsers: Story = {
231
231
  }
232
232
 
233
233
  export const NoAnimation: Story = {
234
- render: () => <WakaStreakCounter streak={15} animated={false} showFlame={false} />,
234
+ render: () => <WakaStreakCounter count={15} animated={false} showFlame={false} />,
235
235
  }
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1 +0,0 @@
1
- require(`./chunk-BDDJmn7V.js`);let e=require(`clsx`),t=require(`tailwind-merge`),n=require(`class-variance-authority`);function r(...n){return(0,t.twMerge)((0,e.clsx)(...n))}r.variants=function(e){let t={variants:e.variants??{},defaultVariants:e.defaultVariants},i=(0,n.cva)(e.base??``,t);return e=>{let{class:t,className:n,...a}=e??{};return r(i(a),t,n)}};var i=(...e)=>r(e);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -1,22 +0,0 @@
1
- import { clsx as e } from "clsx";
2
- import { twMerge as t } from "tailwind-merge";
3
- import { cva as n } from "class-variance-authority";
4
- //#region src/utils/tweak.ts
5
- function r(...n) {
6
- return t(e(...n));
7
- }
8
- r.variants = function(e) {
9
- let t = {
10
- variants: e.variants ?? {},
11
- defaultVariants: e.defaultVariants
12
- }, i = n(e.base ?? "", t);
13
- return (e) => {
14
- let { class: t, className: n, ...a } = e ?? {};
15
- return r(i(a), t, n);
16
- };
17
- };
18
- //#endregion
19
- //#region src/utils/cn.ts
20
- var i = (...e) => r(e);
21
- //#endregion
22
- export { r as n, i as t };
@@ -1,59 +0,0 @@
1
- import { t as e } from "./cn-DpLcAzrf.mjs";
2
- import * as t from "react";
3
- import { cva as n } from "class-variance-authority";
4
- import { jsx as r } from "react/jsx-runtime";
5
- import { Slot as i } from "@radix-ui/react-slot";
6
- import * as a from "@radix-ui/react-separator";
7
- //#region src/components/button/index.tsx
8
- var o = n("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0", {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
12
- destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
13
- outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
14
- secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
15
- ghost: "hover:bg-accent hover:text-accent-foreground",
16
- link: "text-primary underline-offset-4 hover:underline"
17
- },
18
- size: {
19
- default: "h-9 px-4 py-2",
20
- sm: "h-8 rounded-md px-3 text-xs",
21
- lg: "h-10 rounded-md px-8",
22
- icon: "h-9 w-9"
23
- }
24
- },
25
- defaultVariants: {
26
- variant: "default",
27
- size: "default"
28
- }
29
- }), s = t.forwardRef(({ className: t, variant: n, size: a, asChild: s = !1, ...c }, l) => /* @__PURE__ */ r(s ? i : "button", {
30
- className: e(o({
31
- variant: n,
32
- size: a,
33
- className: t
34
- })),
35
- ref: l,
36
- ...c
37
- }));
38
- s.displayName = "Button";
39
- //#endregion
40
- //#region src/components/input/index.tsx
41
- var c = t.forwardRef(({ className: t, type: n, ...i }, a) => /* @__PURE__ */ r("input", {
42
- type: n,
43
- className: e("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", t),
44
- ref: a,
45
- ...i
46
- }));
47
- c.displayName = "Input";
48
- //#endregion
49
- //#region src/components/separator/index.tsx
50
- var l = t.forwardRef(({ className: t, orientation: n = "horizontal", decorative: i = !0, ...o }, s) => /* @__PURE__ */ r(a.Root, {
51
- ref: s,
52
- decorative: i,
53
- orientation: n,
54
- className: e("shrink-0 bg-border", n === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", t),
55
- ...o
56
- }));
57
- l.displayName = a.Root.displayName;
58
- //#endregion
59
- export { c as n, s as r, l as t };
@@ -1 +0,0 @@
1
- const e=require(`./chunk-BDDJmn7V.js`),t=require(`./cn-DnPbmOCy.js`);let n=require(`react`);n=e.n(n);let r=require(`class-variance-authority`),i=require(`react/jsx-runtime`),a=require(`@radix-ui/react-slot`),o=require(`@radix-ui/react-separator`);o=e.n(o);var s=(0,r.cva)(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),c=n.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...c},l)=>(0,i.jsx)(o?a.Slot:`button`,{className:t.t(s({variant:n,size:r,className:e})),ref:l,...c}));c.displayName=`Button`;var l=n.forwardRef(({className:e,type:n,...r},a)=>(0,i.jsx)(`input`,{type:n,className:t.t(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:a,...r}));l.displayName=`Input`;var u=n.forwardRef(({className:e,orientation:n=`horizontal`,decorative:r=!0,...a},s)=>(0,i.jsx)(o.Root,{ref:s,decorative:r,orientation:n,className:t.t(`shrink-0 bg-border`,n===`horizontal`?`h-[1px] w-full`:`h-full w-[1px]`,e),...a}));u.displayName=o.Root.displayName,Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return u}});
@@ -1,8 +0,0 @@
1
- export interface ActorBadgeProps {
2
- role: string;
3
- name?: string;
4
- isPrimary?: boolean;
5
- className?: string;
6
- }
7
- declare function ActorBadge({ role, name, isPrimary, className }: ActorBadgeProps): import("react/jsx-runtime").JSX.Element;
8
- export { ActorBadge };
@@ -1,18 +0,0 @@
1
- export interface Actor {
2
- id: string;
3
- userId: string;
4
- userName: string;
5
- role: string;
6
- isPrimary: boolean;
7
- }
8
- export interface ActorsListProps {
9
- wakaActors: Actor[];
10
- ppActors: Actor[];
11
- requiredWakaRoles: string[];
12
- requiredPpRoles: string[];
13
- onAdd: (side: "waka" | "pp") => void;
14
- onRemove: (actorId: string) => void;
15
- onTogglePrimary: (actorId: string) => void;
16
- }
17
- declare function ActorsList({ wakaActors, ppActors, requiredWakaRoles, requiredPpRoles, onAdd, onRemove, onTogglePrimary, }: ActorsListProps): import("react/jsx-runtime").JSX.Element;
18
- export { ActorsList };
@@ -1,8 +0,0 @@
1
- export interface AiAssistantButtonProps {
2
- onClick: () => void;
3
- hasExistingDoc?: boolean;
4
- disabled?: boolean;
5
- className?: string;
6
- }
7
- declare function AiAssistantButton({ onClick, hasExistingDoc, disabled, className }: AiAssistantButtonProps): import("react/jsx-runtime").JSX.Element;
8
- export { AiAssistantButton };