jattac.libs.web.overflow-menu 0.0.30 → 0.0.33

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/docs/api.md ADDED
@@ -0,0 +1,47 @@
1
+ # API Reference: Technical Blueprint
2
+
3
+ This document provides exhaustive technical specifications for the Jattac Overflow Menu component and its associated types.
4
+
5
+ ### Table of Contents
6
+ 1. [OverflowMenu Component](#overflowmenu-component)
7
+ 2. [IOverflowMenuItem Type](#ioverflowmenuitem-type)
8
+
9
+ [Previous: Features](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/features.md) | [Next: Configuration](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/configuration.md)
10
+
11
+ ---
12
+
13
+ ### OverflowMenu Component
14
+
15
+ The primary component for rendering the overflow menu.
16
+
17
+ | Prop | Type | Required | Default | Description |
18
+ | :--- | :--- | :--- | :--- | :--- |
19
+ | `items` | `IOverflowMenuItem[]` | Yes | - | An array of objects defining the menu items and their behavior. |
20
+ | `icon` | `React.ReactNode` | No | `<DefaultIcon />` | A custom React node to be used as the menu trigger. |
21
+ | `className` | `string` | No | `''` | A custom CSS class to apply to the trigger button for styling. |
22
+ | `portal` | `HTMLElement` | No | `null` | A reference to a DOM element to render the menu content into using a React Portal. |
23
+
24
+ ### IOverflowMenuItem Type
25
+
26
+ `IOverflowMenuItem` is a discriminated union that enforces correct property usage for different menu item roles.
27
+
28
+ | Property | Type | Required | Default | Description |
29
+ | :--- | :--- | :--- | :--- | :--- |
30
+ | `content` | `React.ReactNode` | Yes | - | The visual content for the menu item. |
31
+ | `onClick` | `() => void` | **See Note** | - | Callback executed when the item is selected. |
32
+ | `children` | `IOverflowMenuItem[]` | **See Note** | - | Optional child items to create a nested submenu. |
33
+ | `visible` | `boolean \| (() => boolean) \| (() => Promise<boolean>)` | No | `true` | Controls the visibility of the item. Supports booleans, sync, and async functions. |
34
+ | `enabled` | `boolean \| (() => boolean) \| (() => Promise<boolean>)` | No | `true` | Controls whether the item is interactive. Supports booleans, sync, and async functions. |
35
+
36
+ #### Notes on Union Variants
37
+ - **`ActionItem`:** Required `onClick`. Does not accept `children`.
38
+ - **`SubmenuItem`:** Required `children` (minimum 1 item). `onClick` is optional and usually omitted.
39
+
40
+ #### Notes on Visibility and Enabled State
41
+ - If `visible` resolves to `false`, the item will not be rendered at all.
42
+ - If `enabled` resolves to `false`, the item is rendered as disabled and `onClick` will not be triggered.
43
+ - Async functions are evaluated once when the item is mounted or when their reference changes.
44
+
45
+ ---
46
+
47
+ [Previous: Features](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/features.md) | [Next: Configuration](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/configuration.md)
@@ -0,0 +1,76 @@
1
+ # Upgrade Path: Breaking Changes
2
+
3
+ This document provides information about major version changes and breaking changes to the Jattac Overflow Menu.
4
+
5
+ ### Table of Contents
6
+ 1. [Version 0.0.32](#version-0-0-32)
7
+ 2. [Version 0.0.30](#version-0-0-30)
8
+
9
+ [Previous: Development](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/development.md) | [Next: README](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/README.md)
10
+
11
+ ---
12
+
13
+ ### Version 0.0.32
14
+
15
+ Version 0.0.32 introduces significant API and architectural enhancements to improve type safety and maintainability.
16
+
17
+ **Breaking Change: IOverflowMenuItem Union**
18
+ `IOverflowMenuItem` is now a discriminated union. This change enforces that `onClick` is required for action items (items without `children`).
19
+
20
+ **Before:**
21
+ ```tsx
22
+ const items: IOverflowMenuItem[] = [
23
+ { content: 'Delete' }, // Invalid if children are absent
24
+ ];
25
+ ```
26
+
27
+ **After:**
28
+ ```tsx
29
+ const items: IOverflowMenuItem[] = [
30
+ { content: 'Delete', onClick: () => {} }, // Now correctly required
31
+ ];
32
+ ```
33
+
34
+ **Feature: Conditional Visibility & Enabled State**
35
+ Added `visible` and `enabled` properties supporting boolean, synchronous, and asynchronous values.
36
+
37
+ ```tsx
38
+ const items: IOverflowMenuItem[] = [
39
+ {
40
+ content: 'Export',
41
+ enabled: async () => await checkExportStatus(),
42
+ onClick: () => {},
43
+ },
44
+ ];
45
+ ```
46
+
47
+ ---
48
+
49
+ ### Version 0.0.30
50
+
51
+ Version 0.0.30 introduces significant enhancements to the component's internal architecture, including support for multi-level submenus. While the primary API remains consistent, some internal types and styles have changed.
52
+
53
+ **Before: Flat Items Only**
54
+ ```tsx
55
+ const items: IOverflowMenuItem[] = [
56
+ { content: 'Item 1', onClick: () => {} },
57
+ ];
58
+ ```
59
+
60
+ **After: Multi-Level Support**
61
+ ```tsx
62
+ const items: IOverflowMenuItem[] = [
63
+ {
64
+ content: 'Item 1',
65
+ children: [
66
+ { content: 'Child Item', onClick: () => {} },
67
+ ],
68
+ },
69
+ ];
70
+ ```
71
+
72
+ For detailed implementation information, refer to the [Multi-Level Child Menus recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#multi-level-child-menus) in the Cookbook.
73
+
74
+ ---
75
+
76
+ [Previous: Development](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/development.md) | [Next: README](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/README.md)
@@ -0,0 +1,48 @@
1
+ # Configuration: The Control Panel
2
+
3
+ The Jattac Overflow Menu is designed to be easily customized. This document outlines the available configuration and styling options.
4
+
5
+ ### Table of Contents
6
+ 1. [Styling and Customization](#styling-and-customization)
7
+ 2. [Advanced Styling with Data Attributes](#advanced-styling-with-data-attributes)
8
+ 3. [Portal Usage and Z-Index](#portal-usage-and-z-index)
9
+
10
+ [Previous: API Reference](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/api.md) | [Next: Development](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/development.md)
11
+
12
+ ---
13
+
14
+ ### Styling and Customization
15
+
16
+ The component uses CSS Modules internally, but its styles can be overridden using standard CSS selectors. The primary classes used are:
17
+ - `.jattac-overflow-menu-content`: The container for the menu items.
18
+ - `.jattac-overflow-menu-item`: Individual menu items.
19
+ - `.jattac-overflow-menu-trigger`: The trigger button for the menu.
20
+
21
+ ### Advanced Styling with Data Attributes
22
+
23
+ The underlying Radix UI components expose data attributes that can be used to target specific states of the menu:
24
+ - `[data-state="open"]`: Applied to the trigger when the menu is visible.
25
+ - `[data-state="closed"]`: Applied to the trigger when the menu is hidden.
26
+ - `[data-highlighted]`: Applied to a menu item when it is being hovered or navigated via keyboard.
27
+
28
+ **Example: Customizing a Highlighted Item**
29
+ ```css
30
+ /* In your application's global CSS file */
31
+ .jattac-overflow-menu-item[data-highlighted] {
32
+ background-color: #f0f0f0;
33
+ color: #333;
34
+ }
35
+ ```
36
+
37
+ ### Portal Usage and Z-Index
38
+
39
+ The `portal` prop is used to render the menu content into a specific DOM element. This is essential for layouts where:
40
+ - A parent container has `overflow: hidden` or `overflow: scroll`.
41
+ - The menu is nested within a complex stacking context (e.g., a modal inside a table).
42
+ - You need to explicitly manage the z-index of the menu content relative to other components in your application.
43
+
44
+ For implementation details, refer to the [Using a Portal recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#using-a-portal-for-complex-layouts).
45
+
46
+ ---
47
+
48
+ [Previous: API Reference](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/api.md) | [Next: Development](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/development.md)
@@ -0,0 +1,52 @@
1
+ # Development Guide: Contributing to Jattac Overflow Menu
2
+
3
+ Thank you for your interest in contributing to the Jattac Overflow Menu. This document provides instructions for setting up your local environment and understanding the project's internal structure.
4
+
5
+ ### Table of Contents
6
+ 1. [Local Setup](#local-setup)
7
+ 2. [Internal Architecture](#internal-architecture)
8
+ 3. [Available Scripts](#available-scripts)
9
+ 4. [Testing and Quality Assurance](#testing-and-quality-assurance)
10
+
11
+ [Previous: Configuration](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/configuration.md) | [Next: Breaking Changes](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/breaking-changes.md)
12
+
13
+ ---
14
+
15
+ ### Local Setup
16
+
17
+ To get started with local development, ensure you have Node.js and npm installed.
18
+ 1. Clone the repository.
19
+ 2. Install dependencies by running `npm install`.
20
+ 3. To start the development build in watch mode, run `npm run watch`.
21
+
22
+ ### Internal Architecture
23
+
24
+ The project is structured to maintain a clean separation of concerns:
25
+ - `src/Data`: Contains core types, including the `IOverflowMenuItem` discriminated union.
26
+ - `src/Styles`: Contains CSS Modules for encapsulated styling.
27
+ - `src/Utils`: Includes helper utilities, such as `Evaluate.ts` for handling sync/async properties.
28
+ - `src/UI`: Contains modular components:
29
+ - `Animations.ts`: Centralized Framer Motion variants.
30
+ - `DefaultIcon.tsx`: The default animated trigger icon.
31
+ - `MenuRow.tsx`: Logic for individual menu rows and submenus.
32
+ - `OverflowMenu.tsx`: The root component and coordinator.
33
+ - `test-app/`: A standard React environment for manual testing.
34
+ - `test-app2/`: A Next.js (App Router) environment for cross-framework verification.
35
+
36
+ ### Available Scripts
37
+
38
+ - `npm run build`: Compiles the library using Rollup into ESM and CommonJS formats.
39
+ - `npm run watch`: Compiles the library in watch mode for a faster development cycle.
40
+ - `npm run lint`: Executes ESLint to ensure code quality and style consistency.
41
+ - `npm run size`: Analyzes the bundle size to maintain a lightweight footprint.
42
+
43
+ ### Testing and Quality Assurance
44
+
45
+ Before submitting a pull request, please ensure that:
46
+ - The project builds without errors (`npm run build`).
47
+ - No linting issues are present (`npm run lint`).
48
+ - The component is manually verified in both `test-app` and `test-app2` to ensure cross-framework compatibility.
49
+
50
+ ---
51
+
52
+ [Previous: Configuration](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/configuration.md) | [Next: Breaking Changes](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/breaking-changes.md)
@@ -0,0 +1,213 @@
1
+ # Cookbook: Practical Examples
2
+
3
+ The Jattac Overflow Menu is designed to be highly flexible. This cookbook provides practical, copy-paste recipes for common scenarios, ranging from simple action lists to complex nested menus.
4
+
5
+ ### Table of Contents
6
+ 1. [Simple Action Menu](#simple-action-menu)
7
+ 2. [Custom Trigger Icon](#custom-trigger-icon)
8
+ 3. [Rich Content Items](#rich-content-items)
9
+ 4. [Multi-Level Child Menus](#multi-level-child-menus)
10
+ 5. [Conditional Visibility](#conditional-visibility)
11
+ 6. [Enabled Toggling](#enabled-toggling)
12
+ 7. [Using a Portal for Complex Layouts](#using-a-portal-for-complex-layouts)
13
+
14
+ [Previous: README](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/README.md) | [Next: Features](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/features.md)
15
+
16
+ ---
17
+
18
+ ### Simple Action Menu
19
+
20
+ The most common use case is a flat list of actions. This recipe shows the minimum configuration required to implement a standard overflow menu.
21
+
22
+ ```tsx
23
+ import React from 'react';
24
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
25
+
26
+ const items: IOverflowMenuItem[] = [
27
+ { content: 'Edit', onClick: () => console.log('Edit clicked') },
28
+ { content: 'Delete', onClick: () => console.log('Delete clicked') },
29
+ ];
30
+
31
+ const MyComponent = () => (
32
+ <OverflowMenu items={items} />
33
+ );
34
+ ```
35
+
36
+ ### Custom Trigger Icon
37
+
38
+ You can override the default animated "three dots" icon with any React node. This is useful for integrating with icon libraries like `react-icons` or `lucide-react`.
39
+
40
+ ```tsx
41
+ import React from 'react';
42
+ import { FiSettings } from 'react-icons/fi';
43
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
44
+
45
+ const items: IOverflowMenuItem[] = [
46
+ { content: 'Profile', onClick: () => {} },
47
+ { content: 'Security', onClick: () => {} },
48
+ ];
49
+
50
+ const MyComponent = () => (
51
+ <OverflowMenu items={items} icon={<FiSettings size={20} />} />
52
+ );
53
+ ```
54
+
55
+ ### Rich Content Items
56
+
57
+ The `content` property of each menu item can be a complex React node. This allows for items with icons, badges, or specialized typography.
58
+
59
+ ```tsx
60
+ import React from 'react';
61
+ import { FiEdit2, FiTrash2 } from 'react-icons/fi';
62
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
63
+
64
+ const items: IOverflowMenuItem[] = [
65
+ {
66
+ content: (
67
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
68
+ <FiEdit2 /> <span>Edit Entry</span>
69
+ </div>
70
+ ),
71
+ onClick: () => {},
72
+ },
73
+ {
74
+ content: (
75
+ <div style={{ display: 'flex', alignItems: 'center', gap: '8px', color: 'red' }}>
76
+ <FiTrash2 /> <span>Delete Entry</span>
77
+ </div>
78
+ ),
79
+ onClick: () => {},
80
+ },
81
+ ];
82
+
83
+ const MyComponent = () => (
84
+ <OverflowMenu items={items} />
85
+ );
86
+ ```
87
+
88
+ ### Multi-Level Child Menus
89
+
90
+ Support for nested menus is built-in. Simply add a `children` array to any item. The component will recursively render submenus with consistent styling and animations.
91
+
92
+ ```tsx
93
+ import React from 'react';
94
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
95
+
96
+ const items: IOverflowMenuItem[] = [
97
+ {
98
+ content: 'Share',
99
+ children: [
100
+ { content: 'Email', onClick: () => {} },
101
+ { content: 'Message', onClick: () => {} },
102
+ {
103
+ content: 'Social Media',
104
+ children: [
105
+ { content: 'Twitter', onClick: () => {} },
106
+ { content: 'Facebook', onClick: () => {} },
107
+ ],
108
+ },
109
+ ],
110
+ },
111
+ { content: 'Download', onClick: () => {} },
112
+ ];
113
+
114
+ const MyComponent = () => (
115
+ <OverflowMenu items={items} />
116
+ );
117
+ ```
118
+
119
+ ### Conditional Visibility
120
+
121
+ Control the visibility of menu items using booleans, synchronous functions, or asynchronous functions. This is ideal for role-based access control or state-dependent actions.
122
+
123
+ ```tsx
124
+ import React from 'react';
125
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
126
+
127
+ const items: IOverflowMenuItem[] = [
128
+ {
129
+ content: 'Admin Panel',
130
+ visible: false, // Statically hidden
131
+ onClick: () => {},
132
+ },
133
+ {
134
+ content: 'User Settings',
135
+ visible: () => localStorage.getItem('user') !== null, // Synchronous check
136
+ onClick: () => {},
137
+ },
138
+ {
139
+ content: 'Delete Project',
140
+ visible: async () => {
141
+ const response = await fetch('/api/check-permissions');
142
+ return response.ok; // Asynchronous check
143
+ },
144
+ onClick: () => {},
145
+ },
146
+ ];
147
+
148
+ const MyComponent = () => <OverflowMenu items={items} />;
149
+ ```
150
+
151
+ ### Enabled Toggling
152
+
153
+ Similar to visibility, you can disable items while keeping them visible. Disabled items are non-interactive and styled appropriately to indicate their state.
154
+
155
+ ```tsx
156
+ import React from 'react';
157
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
158
+
159
+ const items: IOverflowMenuItem[] = [
160
+ {
161
+ content: 'Quick Save',
162
+ enabled: true,
163
+ onClick: () => {},
164
+ },
165
+ {
166
+ content: 'Export Data',
167
+ enabled: () => isDataDirty, // Synchronous check
168
+ onClick: () => {},
169
+ },
170
+ {
171
+ content: 'Finalize Deployment',
172
+ enabled: async () => {
173
+ const status = await getBuildStatus();
174
+ return status === 'ready'; // Asynchronous check
175
+ },
176
+ onClick: () => {},
177
+ },
178
+ ];
179
+
180
+ const MyComponent = () => <OverflowMenu items={items} />;
181
+ ```
182
+
183
+ ### Using a Portal for Complex Layouts
184
+
185
+ When a menu is rendered inside a container with `overflow: hidden` or restricted z-indexing (e.g., a table cell or a modal), use the `portal` prop to render the menu outside the parent's stacking context.
186
+
187
+ ```tsx
188
+ import React, { useRef } from 'react';
189
+ import OverflowMenu, { IOverflowMenuItem } from 'jattac.libs.web.overflow-menu';
190
+
191
+ const App = () => {
192
+ const portalRef = useRef<HTMLDivElement>(null);
193
+
194
+ const items: IOverflowMenuItem[] = [
195
+ { content: 'Action 1', onClick: () => {} },
196
+ ];
197
+
198
+ return (
199
+ <div style={{ position: 'relative' }}>
200
+ <div style={{ overflow: 'hidden', height: '100px' }}>
201
+ <OverflowMenu items={items} portal={portalRef.current} />
202
+ </div>
203
+
204
+ {/* The menu will be rendered here, outside the hidden container */}
205
+ <div ref={portalRef} id="menu-portal" />
206
+ </div>
207
+ );
208
+ };
209
+ ```
210
+
211
+ ---
212
+
213
+ [Previous: README](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/README.md) | [Next: Features](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/features.md)
@@ -0,0 +1,62 @@
1
+ # Showcase: Feature Overview
2
+
3
+ The Jattac Overflow Menu offers a powerful set of features designed to simplify the management of secondary actions while providing a premium user experience.
4
+
5
+ ### Table of Contents
6
+ 1. [Full Accessibility](#full-accessibility)
7
+ 2. [Multi-Level Submenus](#multi-level-submenus)
8
+ 3. [Conditional Visibility and Enabled Toggling](#conditional-visibility-and-enabled-toggling)
9
+ 4. [Advanced Animations](#advanced-animations)
10
+ 5. [Atomic & Maintainable Architecture](#atomic-maintainable-architecture)
11
+ 6. [Modern Frosted-Glass Aesthetic](#modern-frosted-glass-aesthetic)
12
+ 7. [Flexible Trigger Icons](#flexible-trigger-icons)
13
+
14
+ [Previous: Cookbook](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md) | [Next: API Reference](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/api.md)
15
+
16
+ ---
17
+
18
+ ### Full Accessibility
19
+
20
+ The component is built on top of Radix UI primitives, ensuring that it is fully accessible to all users. It adheres to the WAI-ARIA Menu Button pattern, providing:
21
+ - Full keyboard navigation (arrow keys, Enter, Space, Escape, Tab).
22
+ - Focus management to ensure proper tab order.
23
+ - ARIA attributes that automatically communicate the state of the menu to assistive technologies.
24
+
25
+ For implementation details, refer to the [Simple Action Menu recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#simple-action-menu).
26
+
27
+ ### Multi-Level Submenus
28
+
29
+ Organize complex sets of actions with ease using recursive submenus. The library handles the logic for positioning, timing, and keyboard navigation for nested menus, ensuring a smooth experience regardless of depth.
30
+
31
+ For implementation details, refer to the [Multi-Level Child Menus recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#multi-level-child-menus).
32
+
33
+ ### Conditional Visibility and Enabled Toggling
34
+
35
+ Dynamically control whether actions are visible or interactive. These properties support boolean values, synchronous functions, and asynchronous functions (Promises). This allows for complex logic, such as checking permissions from an API or verifying state before enabling an action.
36
+
37
+ For implementation details, refer to the [Conditional Visibility recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#conditional-visibility).
38
+
39
+ ### Advanced Animations
40
+
41
+ Powered by Framer Motion, every interaction feels deliberate and responsive. The trigger features spring-based hover effects, and the menu items use staggered entry animations to guide the user's eye.
42
+
43
+ ### Atomic & Maintainable Architecture
44
+
45
+ The library is designed for enterprise-grade maintainability. The core component has been refactored into atomic, single-responsibility modules, including:
46
+ - **`Evaluate` Utility:** Centralized logic for boolean/sync/async property evaluation.
47
+ - **Animation Hub:** Consolidated Framer Motion variants for consistency.
48
+ - **Isolated UI Components:** Modularized `DefaultIcon` and `MenuRow` for easier testing and extension.
49
+
50
+ ### Modern Frosted-Glass Aesthetic
51
+
52
+ Out of the box, the component features a "glassmorphism" design, including backdrop blur and a subtle translucent background. This allows it to blend seamlessly into modern, high-quality user interfaces without extensive customization.
53
+
54
+ ### Flexible Trigger Icons
55
+
56
+ The default "three dots" icon is animated and interactive. However, the component supports any React node as a custom trigger, making it easy to adapt to your application's specific iconography.
57
+
58
+ For implementation details, refer to the [Custom Trigger Icon recipe](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md#custom-trigger-icon).
59
+
60
+ ---
61
+
62
+ [Previous: Cookbook](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/examples.md) | [Next: API Reference](https://github.com/nyingimaina/jattac.libs.web.overflow-menu/blob/develop/docs/api.md)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jattac.libs.web.overflow-menu",
3
- "version": "0.0.30",
4
- "description": "A customizable and lightweight React overflow menu component with a modern design.",
3
+ "version": "0.0.33",
4
+ "description": "Enterprise-grade, accessible, and highly customizable React overflow menu component. Built on Radix UI and Framer Motion for premium UX and full WAI-ARIA compliance.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
7
  "types": "dist/index.d.ts",
@@ -16,29 +16,57 @@
16
16
  "require": "./dist/index.css"
17
17
  }
18
18
  },
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/nyingimaina/jattac.libs.web.overflow-menu.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/nyingimaina/jattac.libs.web.overflow-menu/issues"
28
+ },
29
+ "homepage": "https://github.com/nyingimaina/jattac.libs.web.overflow-menu#readme",
30
+ "engines": {
31
+ "node": ">=16.0.0",
32
+ "npm": ">=8.0.0"
33
+ },
19
34
  "files": [
20
- "dist"
35
+ "dist",
36
+ "docs"
21
37
  ],
22
38
  "scripts": {
23
39
  "build": "rollup -c",
24
40
  "watch": "rollup -c -w",
25
41
  "lint": "eslint \"./{src,app}/**/*.{ts,tsx}\"",
42
+ "lint:fix": "eslint \"./{src,app}/**/*.{ts,tsx}\" --fix",
43
+ "format": "prettier --write \"src/**/*.{ts,tsx,css,md}\"",
44
+ "type-check": "tsc --noEmit",
26
45
  "size": "size-limit",
27
- "prepare": "npm run build"
46
+ "prepare": "npm run build",
47
+ "prepublishOnly": "npm run lint && npm run type-check && npm run build"
28
48
  },
29
49
  "keywords": [
30
50
  "react",
31
51
  "typescript",
32
52
  "menu",
33
53
  "overflow-menu",
34
- "component"
54
+ "dropdown",
55
+ "context-menu",
56
+ "accessible",
57
+ "radix-ui",
58
+ "framer-motion",
59
+ "ui-component",
60
+ "enterprise",
61
+ "nested-menu",
62
+ "submenu"
35
63
  ],
36
64
  "author": "Nyingi Maina",
37
65
  "license": "MIT",
38
66
  "peerDependencies": {
67
+ "framer-motion": ">=11.0.0",
39
68
  "react": ">=18.2.0",
40
- "react-dom": ">=18.2.0",
41
- "framer-motion": ">=11.0.0"
69
+ "react-dom": ">=18.2.0"
42
70
  },
43
71
  "devDependencies": {
44
72
  "@rollup/plugin-commonjs": "^25.0.7",