@amirjalili1374/ui-kit 1.9.2 → 1.10.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jalili_a
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -9,26 +9,28 @@ A reusable UI component library built with Vue 3, Vuetify 3, and TypeScript. Thi
9
9
  - 🎭 Vuetify 3 components
10
10
  - 🔧 Composable utilities
11
11
  - 📦 Tree-shakeable exports
12
- - 🎪 Multiple build formats (ES, CJS, UMD)
12
+ - 🎪 ESM and CommonJS package outputs
13
13
 
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
17
  npm install @amirjalili1374/ui-kit
18
- # or
19
- yarn add @amirjalili1374/ui-kit
20
- # or
21
- pnpm add @amirjalili1374/ui-kit
22
18
  ```
23
19
 
20
+ This repository is developed and validated with Node.js `^20.19.0 || >=22.12.0`
21
+ and npm 11. The committed `package-lock.json` is the canonical lockfile.
22
+
24
23
  ## Peer Dependencies
25
24
 
26
25
  This library requires the following peer dependencies to be installed in your project:
27
26
 
28
- - `vue` >= 3.3.0
29
- - `vuetify` >= 3.10.0
30
- - `@vueuse/core` >= 13.0.0 (optional)
31
- - `axios` >= 1.8.0 (optional)
27
+ - `vue` ^3.4.0
28
+ - `vuetify` ^3.10.0
29
+ - `vue-router` ^4.3.0
30
+
31
+ `CustomDataTable` currently calls Vue Router directly, so applications that render
32
+ the table must install a router before mounting it. Other package dependencies,
33
+ including Pinia, Axios, and VueUse, are installed through the package metadata.
32
34
 
33
35
  ## Usage
34
36
 
@@ -63,7 +65,7 @@ You can import components individually for better tree-shaking:
63
65
 
64
66
  ```vue
65
67
  <script setup lang="ts">
66
- 1import {
68
+ import {
67
69
  CustomDataTable,
68
70
  CustomDataTableV2,
69
71
  BaseIcon,
@@ -255,8 +257,8 @@ const formatted = formatNumberWithCommas(1234567); // "1,234,567"
255
257
  - `BaseIcon` - Icon component wrapper
256
258
  - `ConfirmDialog` - Confirmation dialog
257
259
  - `CustomAutocomplete` - Enhanced autocomplete input
258
- - `CustomDataTable` - Feature-rich data table (stable; unchanged)
259
- - `CustomDataTableV2` - Same API as `CustomDataTable` with bug fixes; use for new pages
260
+ - `CustomDataTableV2` - Current feature-rich data table implementation
261
+ - `CustomDataTable` - Backward-compatible alias for `CustomDataTableV2`; there is no separate V1 implementation on this branch
260
262
  - `DescriptionInput` - Text area input for descriptions
261
263
  - `DownloadButton` - Button with download functionality
262
264
  - `MoneyInput` - Currency/money input field
@@ -319,28 +321,42 @@ To build the library for distribution:
319
321
  npm run build:lib
320
322
  ```
321
323
 
322
- This will:
323
- 1. Run TypeScript type checking
324
- 2. Build the library in multiple formats (ES, CJS, UMD)
325
- 3. Generate TypeScript declaration files
324
+ This runs fail-closed TypeScript checking, builds ESM and CommonJS outputs,
325
+ bundles the kit CSS, and generates TypeScript declarations.
326
326
 
327
327
  Output files will be in the `dist` directory:
328
328
  - `ui-kit.es.js` - ES module format
329
329
  - `ui-kit.cjs` - CommonJS format
330
- - `ui-kit.umd.js` - UMD format (browser)
331
330
  - `style.css` - Compiled CSS
332
331
  - `index.d.ts` - TypeScript declarations
333
332
 
333
+ The normal `npm run build` command builds the demo application. Use
334
+ `npm run build:lib` for the publishable package.
335
+
336
+ ### Optional Excel export
337
+
338
+ Client-side Excel export dynamically loads the optional `xlsx` dependency. Install
339
+ it before enabling that feature:
340
+
341
+ ```bash
342
+ npm install xlsx
343
+ ```
344
+
345
+ Other table features work without XLSX. Missing XLSX produces a clear runtime error
346
+ when client-side export is invoked.
347
+
334
348
  ## Publishing
335
349
 
336
- To publish the library to npm:
350
+ Before publishing, validate and inspect the packed package:
337
351
 
338
352
  ```bash
339
- npm login
340
- npm publish
353
+ npm ci
354
+ npm run validate
355
+ npm pack --dry-run
341
356
  ```
342
357
 
343
- The `prepublishOnly` script will automatically build the library before publishing.
358
+ Publishing remains a manual, separately authorized operation. The `prepublishOnly`
359
+ hook rebuilds the library, but does not replace `npm run validate`.
344
360
 
345
361
  ## Development
346
362
 
@@ -359,9 +375,23 @@ npm run typecheck
359
375
  ### Linting
360
376
 
361
377
  ```bash
362
- npm run lint
378
+ npm run lint:check # read-only
379
+ npm run lint:fix # explicit auto-fix
380
+ ```
381
+
382
+ ### Tests and package consumer validation
383
+
384
+ ```bash
385
+ npm test
386
+ npm run test:coverage
387
+ npm run test:consumer
363
388
  ```
364
389
 
390
+ `test:consumer` packs the built library, installs the tarball into a fresh temporary
391
+ Vite application, and verifies ESM, CommonJS, declarations, CSS exports, and a
392
+ production consumer build. Current tests cover utilities, the digit directive,
393
+ table selection/helpers, and initial public-component accessibility contracts.
394
+
365
395
  ### Formatting
366
396
 
367
397
  ```bash
@@ -376,7 +406,9 @@ To update and republish the library:
376
406
  2. Update the version in `package.json`
377
407
  3. Build the library: `npm run build:lib`
378
408
  4. Test locally if possible
379
- 5. Publish: `npm publish`
409
+ 5. Run `npm run validate`
410
+ 6. Inspect `npm pack --dry-run`
411
+ 7. Publish only through the separately authorized release process
380
412
 
381
413
  For npm scoped packages, make sure you have the correct permissions.
382
414
 
@@ -401,7 +433,13 @@ For npm scoped packages, make sure you have the correct permissions.
401
433
 
402
434
  ## License
403
435
 
404
- MIT
436
+ MIT. See [LICENSE](./LICENSE).
437
+
438
+ ## Runtime limitations
439
+
440
+ The current table export/download behavior, PDF viewer, loading animation, and
441
+ authentication helpers use browser APIs. SSR is not currently claimed or validated.
442
+ The table also requires an installed Vue Router instance when rendered.
405
443
 
406
444
  ## Contributing
407
445
 
@@ -1,3 +1,10 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ animationLink?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ label: string;
7
+ animationLink: string;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
9
  declare const _default: typeof __VLS_export;
3
10
  export default _default;
@@ -11,6 +11,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
11
11
  type: () => {
12
12
  title: string;
13
13
  section: Component;
14
+ disabled?: boolean;
14
15
  }[];
15
16
  required: true;
16
17
  };
@@ -30,6 +31,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
30
31
  type: ObjectConstructor;
31
32
  default: () => {};
32
33
  };
34
+ direction: {
35
+ type: () => "rtl" | "ltr";
36
+ default: string;
37
+ };
33
38
  }>, {
34
39
  currentStepComponentRef: import("vue").Ref<any, any>;
35
40
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -40,6 +45,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
40
45
  type: () => {
41
46
  title: string;
42
47
  section: Component;
48
+ disabled?: boolean;
43
49
  }[];
44
50
  required: true;
45
51
  };
@@ -59,10 +65,15 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
59
65
  type: ObjectConstructor;
60
66
  default: () => {};
61
67
  };
68
+ direction: {
69
+ type: () => "rtl" | "ltr";
70
+ default: string;
71
+ };
62
72
  }>> & Readonly<{
63
73
  "onUpdate:modelValue"?: (...args: any[]) => any;
64
74
  "onStep-click"?: (...args: any[]) => any;
65
75
  }>, {
76
+ direction: "ltr" | "rtl";
66
77
  contentMinHeight: string;
67
78
  disableClick: boolean;
68
79
  stepProps: Record<string, any>;
@@ -0,0 +1,34 @@
1
+ export type TextFieldVariant = 'outlined' | 'filled' | 'solo' | 'plain' | 'underlined';
2
+ export type TextFieldHeight = 'compact' | 'default' | 'comfortable';
3
+ type __VLS_Props = {
4
+ textFieldBorderRadius?: number;
5
+ textFieldVariant?: TextFieldVariant;
6
+ textFieldHeight?: TextFieldHeight;
7
+ textScale?: number;
8
+ applyPreview?: boolean;
9
+ showActions?: boolean;
10
+ };
11
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ reset: () => any;
13
+ apply: () => any;
14
+ "update:textFieldBorderRadius": (value: number) => any;
15
+ "update:textFieldVariant": (value: TextFieldVariant) => any;
16
+ "update:textFieldHeight": (value: TextFieldHeight) => any;
17
+ "update:textScale": (value: number) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onReset?: () => any;
20
+ onApply?: () => any;
21
+ "onUpdate:textFieldBorderRadius"?: (value: number) => any;
22
+ "onUpdate:textFieldVariant"?: (value: TextFieldVariant) => any;
23
+ "onUpdate:textFieldHeight"?: (value: TextFieldHeight) => any;
24
+ "onUpdate:textScale"?: (value: number) => any;
25
+ }>, {
26
+ textFieldBorderRadius: number;
27
+ textFieldVariant: TextFieldVariant;
28
+ textFieldHeight: TextFieldHeight;
29
+ textScale: number;
30
+ applyPreview: boolean;
31
+ showActions: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ label?: string;
3
+ hint?: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ apply: () => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onApply?: () => any;
9
+ }>, {
10
+ label: string;
11
+ hint: string;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -1,10 +1,14 @@
1
1
  import { type PropType } from 'vue';
2
2
  import type { MenuItem } from '../../types/components/layout/menu';
3
- declare var __VLS_121: {}, __VLS_135: {};
3
+ declare var __VLS_70: {
4
+ items: MenuItem[];
5
+ }, __VLS_82: {}, __VLS_96: {};
4
6
  type __VLS_Slots = {} & {
5
- notifications?: (props: typeof __VLS_121) => any;
7
+ navigation?: (props: typeof __VLS_70) => any;
6
8
  } & {
7
- profile?: (props: typeof __VLS_135) => any;
9
+ notifications?: (props: typeof __VLS_82) => any;
10
+ } & {
11
+ profile?: (props: typeof __VLS_96) => any;
8
12
  };
9
13
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
14
  menuOrientation: {
@@ -0,0 +1,30 @@
1
+ import { type PropType } from 'vue';
2
+ import type { MenuItem } from '../../types/components/layout/menu';
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ /** Already-filtered navigation items supplied by the consuming application. */
5
+ items: {
6
+ type: PropType<MenuItem[]>;
7
+ default: () => any[];
8
+ };
9
+ /** Render as a vertical menu panel for compact header navigation. */
10
+ display: {
11
+ type: PropType<"bar" | "menu">;
12
+ default: string;
13
+ };
14
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ /** Already-filtered navigation items supplied by the consuming application. */
16
+ items: {
17
+ type: PropType<MenuItem[]>;
18
+ default: () => any[];
19
+ };
20
+ /** Render as a vertical menu panel for compact header navigation. */
21
+ display: {
22
+ type: PropType<"bar" | "menu">;
23
+ default: string;
24
+ };
25
+ }>> & Readonly<{}>, {
26
+ items: MenuItem[];
27
+ display: "menu" | "bar";
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
@@ -1,6 +1,7 @@
1
+ import { type Component, type PropType } from 'vue';
1
2
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
3
  icon: {
3
- type: StringConstructor;
4
+ type: PropType<string | Component>;
4
5
  required: false;
5
6
  };
6
7
  buttonClass: {
@@ -9,12 +10,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
9
10
  };
10
11
  emitFunc: {
11
12
  type: FunctionConstructor;
12
- required: true;
13
+ required: false;
13
14
  };
14
15
  rowData: ObjectConstructor;
15
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ ariaLabel: StringConstructor;
17
+ interactive: {
18
+ type: BooleanConstructor;
19
+ default: any;
20
+ };
21
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
22
+ action: (rowData: unknown) => any;
23
+ click: (mouseEvent: MouseEvent) => any;
24
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
25
  icon: {
17
- type: StringConstructor;
26
+ type: PropType<string | Component>;
18
27
  required: false;
19
28
  };
20
29
  buttonClass: {
@@ -23,11 +32,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
23
32
  };
24
33
  emitFunc: {
25
34
  type: FunctionConstructor;
26
- required: true;
35
+ required: false;
27
36
  };
28
37
  rowData: ObjectConstructor;
29
- }>> & Readonly<{}>, {
38
+ ariaLabel: StringConstructor;
39
+ interactive: {
40
+ type: BooleanConstructor;
41
+ default: any;
42
+ };
43
+ }>> & Readonly<{
44
+ onAction?: (rowData: unknown) => any;
45
+ onClick?: (mouseEvent: MouseEvent) => any;
46
+ }>, {
30
47
  buttonClass: string;
48
+ interactive: boolean;
31
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
50
  declare const _default: typeof __VLS_export;
33
51
  export default _default;
@@ -15,6 +15,7 @@ interface Props {
15
15
  falseIcon?: any;
16
16
  activeColor?: string;
17
17
  inactiveColor?: string;
18
+ disabled?: boolean;
18
19
  }
19
20
  declare var __VLS_1: {
20
21
  value: string | boolean;
@@ -29,6 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
29
30
  "onUpdate:modelValue"?: (value: string | boolean) => any;
30
31
  }>, {
31
32
  type: "boolean" | "string";
33
+ disabled: boolean;
32
34
  activeColor: string;
33
35
  options: StringOption[];
34
36
  inactiveColor: string;
package/dist/index.d.ts CHANGED
@@ -24,6 +24,10 @@ export { default as AppStepper } from './components/common/AppStepper.vue';
24
24
  export { default as Loading } from './components/Loading.vue';
25
25
  export { default as AppSidebar } from './components/layout/AppSidebar.vue';
26
26
  export { default as AppHeader } from './components/layout/AppHeader.vue';
27
+ export { default as AppHeaderMenu } from './components/layout/AppHeaderMenu.vue';
28
+ export { default as AppCustomizerControls } from './components/layout/AppCustomizerControls.vue';
29
+ export { default as AppCustomizerSubmit } from './components/layout/AppCustomizerSubmit.vue';
30
+ export type { TextFieldHeight, TextFieldVariant } from './components/layout/AppCustomizerControls.vue';
27
31
  export { default as AppLayout } from './components/layout/AppLayout.vue';
28
32
  export type { MenuItem, HeaderAction } from './types/components/layout/menu';
29
33
  export { useDataTable } from './composables/useDataTable';