@appsbd/vue3-appsbd-ui 1.0.4 → 1.0.5

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 (91) hide show
  1. package/.ai/ai_ref_AbAvatar.md +41 -41
  2. package/.ai/ai_ref_AbBadge.md +36 -36
  3. package/.ai/ai_ref_AbButton.md +52 -51
  4. package/.ai/ai_ref_AbCard.md +51 -51
  5. package/.ai/ai_ref_AbCarousel.md +36 -36
  6. package/.ai/ai_ref_AbChart.md +46 -46
  7. package/.ai/ai_ref_AbColorPicker.md +42 -42
  8. package/.ai/ai_ref_AbConfirmPopover.md +54 -54
  9. package/.ai/ai_ref_AbCustomField.md +66 -66
  10. package/.ai/ai_ref_AbDarkModeToggler.md +33 -33
  11. package/.ai/ai_ref_AbDateTimePicker.md +74 -74
  12. package/.ai/ai_ref_AbEasyModal.md +56 -56
  13. package/.ai/ai_ref_AbField.md +88 -88
  14. package/.ai/ai_ref_AbFileUploader.md +47 -47
  15. package/.ai/ai_ref_AbFilterPanel.md +67 -67
  16. package/.ai/ai_ref_AbFormCheck.md +58 -58
  17. package/.ai/ai_ref_AbImageRadioInput.md +55 -55
  18. package/.ai/ai_ref_AbInputField.md +66 -66
  19. package/.ai/ai_ref_AbInputTag.md +56 -56
  20. package/.ai/ai_ref_AbKbd.md +23 -23
  21. package/.ai/ai_ref_AbKbdGroup.md +21 -21
  22. package/.ai/ai_ref_AbMainLayout.md +106 -0
  23. package/.ai/ai_ref_AbMultiSelect.md +78 -78
  24. package/.ai/ai_ref_AbNumberField.md +59 -59
  25. package/.ai/ai_ref_AbPinInput.md +33 -33
  26. package/.ai/ai_ref_AbPopover.md +54 -54
  27. package/.ai/ai_ref_AbPricingCard.md +56 -56
  28. package/.ai/ai_ref_AbPricingContainer.md +41 -41
  29. package/.ai/ai_ref_AbPricingTable.md +56 -56
  30. package/.ai/ai_ref_AbProgressbar.md +34 -34
  31. package/.ai/ai_ref_AbScrollbar.md +38 -38
  32. package/.ai/ai_ref_AbSettingsForm.md +46 -46
  33. package/.ai/ai_ref_AbSideMenuItem.md +47 -47
  34. package/.ai/ai_ref_AbSidebar.md +62 -62
  35. package/.ai/ai_ref_AbSkeleton.md +23 -23
  36. package/.ai/ai_ref_AbSlider.md +52 -52
  37. package/.ai/ai_ref_AbTab.md +30 -30
  38. package/.ai/ai_ref_AbTable.md +49 -49
  39. package/.ai/ai_ref_AbTabs.md +37 -37
  40. package/.ai/ai_ref_AbToggle.md +46 -46
  41. package/.ai/ai_ref_AbTooltip.md +39 -39
  42. package/.ai/ai_ref_AbWizard.md +64 -64
  43. package/.ai/ai_ref_AbWizardStep.md +36 -36
  44. package/.ai/ai_ref_abEventBus.md +66 -66
  45. package/.ai/ai_ref_abRequestParam.md +40 -40
  46. package/.ai/ai_ref_abVeeRules.md +33 -33
  47. package/.ai/ai_ref_global_config.md +57 -56
  48. package/.ai/ai_ref_useAlert.md +50 -45
  49. package/.ai/ai_ref_useFileValidator.md +31 -31
  50. package/.ai/ai_ref_useResponsive.md +41 -41
  51. package/.ai/ai_ref_useTheme.md +28 -28
  52. package/.ai/ai_ref_useToast.md +30 -30
  53. package/AI_REFERENCE.md +87 -86
  54. package/design-system.md +403 -403
  55. package/dist/skins/black.css +1 -1
  56. package/dist/skins/black.scss +3 -3
  57. package/dist/skins/cyan.css +1 -1
  58. package/dist/skins/cyan.scss +3 -3
  59. package/dist/skins/default.css +1 -1
  60. package/dist/skins/default.scss +5 -5
  61. package/dist/skins/gray.css +1 -1
  62. package/dist/skins/gray.scss +3 -3
  63. package/dist/skins/green.css +1 -1
  64. package/dist/skins/green.scss +5 -5
  65. package/dist/skins/orange.css +1 -1
  66. package/dist/skins/orange.scss +3 -3
  67. package/dist/skins/pink.css +1 -1
  68. package/dist/skins/pink.scss +3 -3
  69. package/dist/skins/purple.css +1 -1
  70. package/dist/skins/purple.scss +3 -3
  71. package/dist/skins/red.css +1 -1
  72. package/dist/skins/red.scss +3 -3
  73. package/dist/skins/themes/_black.scss +18 -6
  74. package/dist/skins/themes/_blue.scss +18 -43
  75. package/dist/skins/themes/_common_variable.scss +695 -685
  76. package/dist/skins/themes/_cyan.scss +18 -6
  77. package/dist/skins/themes/_gray.scss +18 -7
  78. package/dist/skins/themes/_green.scss +18 -6
  79. package/dist/skins/themes/_grid.scss +32 -30
  80. package/dist/skins/themes/_orange.scss +18 -6
  81. package/dist/skins/themes/_pink.scss +18 -6
  82. package/dist/skins/themes/_purple.scss +18 -6
  83. package/dist/skins/themes/_red.scss +18 -6
  84. package/dist/skins/themes/_violet.scss +18 -6
  85. package/dist/skins/violet.css +1 -1
  86. package/dist/skins/violet.scss +3 -3
  87. package/dist/style.css +1 -1
  88. package/dist/vue3-appsbd-ui.cjs.js +130 -142
  89. package/dist/vue3-appsbd-ui.es.js +21758 -20241
  90. package/package.json +72 -72
  91. package/readme.md +194 -194
@@ -1,66 +1,66 @@
1
- # abEventBus (abEmitter)
2
-
3
- Lightweight global event bus built on `tiny-emitter`. Provides a Vue 3 plugin for the `$eventBus` global property and a standalone `emitterObj` for non-component usage.
4
-
5
- ## Usage
6
-
7
- ### Standalone (Composable / Utilities)
8
-
9
- ```javascript
10
- import { emitterObj } from "@vue3-appsbd-ui";
11
- import { onUnmounted } from "vue";
12
-
13
- function handler(data) { console.log("Received:", data); }
14
-
15
- emitterObj.$on("my-event", handler);
16
- emitterObj.$emit("my-event", { message: "Hello" });
17
-
18
- onUnmounted(() => {
19
- emitterObj.$off("my-event", handler);
20
- });
21
- ```
22
-
23
- ### Plugin Usage (Options API)
24
-
25
- ```javascript
26
- // main.js
27
- import abEventBus from "@vue3-appsbd-ui/libraries/abEmitter";
28
- app.use(abEventBus);
29
- ```
30
-
31
- ```javascript
32
- // Inside any Options-API component:
33
- export default {
34
- mounted() { this.$eventBus.$on("my-event", this.handleEvent); },
35
- beforeUnmount() { this.$eventBus.$off("my-event", this.handleEvent); },
36
- methods: {
37
- handleEvent(payload) { console.log("Received:", payload); }
38
- }
39
- }
40
- ```
41
-
42
- ### One-Time Listener
43
-
44
- ```javascript
45
- emitterObj.$once("init-complete", () => {
46
- console.log("Runs only once.");
47
- });
48
- ```
49
-
50
- ## API Reference
51
-
52
- ### `emitterObj` Methods
53
-
54
- | Method | Signature | Description |
55
- |---|---|---|
56
- | `$on` | `(event: string, callback: Function)` | Subscribe to an event. |
57
- | `$once` | `(event: string, callback: Function)` | Subscribe; auto-unsubscribe after first fire. |
58
- | `$off` | `(event: string, callback: Function)` | Unsubscribe (pass the same handler reference). |
59
- | `$emit` | `(event: string, ...args: any[])` | Fire an event with optional payload arguments. |
60
-
61
- ### Plugin (default export)
62
-
63
- | Property | Type | Description |
64
- |---|---|---|
65
- | `emitterObj` | `Object` | Direct reference to the emitter wrapper. |
66
- | `install(app)` | `Function` | Vue plugin install hook — registers `$eventBus` on `globalProperties`. |
1
+ # abEventBus (abEmitter)
2
+
3
+ Lightweight global event bus built on `tiny-emitter`. Provides a Vue 3 plugin for the `$eventBus` global property and a standalone `emitterObj` for non-component usage.
4
+
5
+ ## Usage
6
+
7
+ ### Standalone (Composable / Utilities)
8
+
9
+ ```javascript
10
+ import { emitterObj } from "@vue3-appsbd-ui";
11
+ import { onUnmounted } from "vue";
12
+
13
+ function handler(data) { console.log("Received:", data); }
14
+
15
+ emitterObj.$on("my-event", handler);
16
+ emitterObj.$emit("my-event", { message: "Hello" });
17
+
18
+ onUnmounted(() => {
19
+ emitterObj.$off("my-event", handler);
20
+ });
21
+ ```
22
+
23
+ ### Plugin Usage (Options API)
24
+
25
+ ```javascript
26
+ // main.js
27
+ import abEventBus from "@vue3-appsbd-ui/libraries/abEmitter";
28
+ app.use(abEventBus);
29
+ ```
30
+
31
+ ```javascript
32
+ // Inside any Options-API component:
33
+ export default {
34
+ mounted() { this.$eventBus.$on("my-event", this.handleEvent); },
35
+ beforeUnmount() { this.$eventBus.$off("my-event", this.handleEvent); },
36
+ methods: {
37
+ handleEvent(payload) { console.log("Received:", payload); }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ### One-Time Listener
43
+
44
+ ```javascript
45
+ emitterObj.$once("init-complete", () => {
46
+ console.log("Runs only once.");
47
+ });
48
+ ```
49
+
50
+ ## API Reference
51
+
52
+ ### `emitterObj` Methods
53
+
54
+ | Method | Signature | Description |
55
+ |---|---|---|
56
+ | `$on` | `(event: string, callback: Function)` | Subscribe to an event. |
57
+ | `$once` | `(event: string, callback: Function)` | Subscribe; auto-unsubscribe after first fire. |
58
+ | `$off` | `(event: string, callback: Function)` | Unsubscribe (pass the same handler reference). |
59
+ | `$emit` | `(event: string, ...args: any[])` | Fire an event with optional payload arguments. |
60
+
61
+ ### Plugin (default export)
62
+
63
+ | Property | Type | Description |
64
+ |---|---|---|
65
+ | `emitterObj` | `Object` | Direct reference to the emitter wrapper. |
66
+ | `install(app)` | `Function` | Vue plugin install hook — registers `$eventBus` on `globalProperties`. |
@@ -1,40 +1,40 @@
1
- # abRequestParam (Library)
2
-
3
- Data-transfer classes for building structured API request parameters for paginated, sorted, and filtered data queries.
4
-
5
- ## Usage
6
-
7
- ```javascript
8
- import abRequestParam from "@vue3-appsbd-ui/libraries/abRequestParam";
9
-
10
- const params = new abRequestParam();
11
- params.limit = 25;
12
- params.page = 1;
13
- params.AddSortItem("created_at", "desc");
14
- params.AddSrcItem("status", "active", "eq");
15
- params.AddSrcItem("name", "John", "like");
16
- ```
17
-
18
- ## API Reference
19
-
20
- ### `abRequestParam` Class
21
-
22
- **Properties**
23
-
24
- | Property | Type | Description |
25
- |---|---|---|
26
- | `data` | `any` | Arbitrary payload attached to the request. |
27
- | `limit` | `string\|number` | Number of records per page. |
28
- | `page` | `string\|number` | Current page number. |
29
- | `filter_prop` | `string` | Optional filter property identifier. |
30
- | `sort_by` | `abSortParam[]` | Array of sort descriptors. |
31
- | `src_by` | `abSrcParam[]` | Array of filter/search descriptors. |
32
- | `group_by` | `string[]` | Array of property names to group results by. |
33
- | `force` | `boolean` | Forces the server to bypass cache. |
34
-
35
- **Methods**
36
-
37
- | Method | Signature | Description |
38
- |---|---|---|
39
- | `AddSortItem(prop, ord)` | `Function` | Appends a sort rule. `ord` defaults to `'asc'`, accepts `'asc' \| 'desc'`. |
40
- | `AddSrcItem(prop, val, opr)` | `Function` | Appends a search rule. `opr` defaults to `'eq'`, accepts `'eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'like', 'in'`. |
1
+ # abRequestParam (Library)
2
+
3
+ Data-transfer classes for building structured API request parameters for paginated, sorted, and filtered data queries.
4
+
5
+ ## Usage
6
+
7
+ ```javascript
8
+ import abRequestParam from "@vue3-appsbd-ui/libraries/abRequestParam";
9
+
10
+ const params = new abRequestParam();
11
+ params.limit = 25;
12
+ params.page = 1;
13
+ params.AddSortItem("created_at", "desc");
14
+ params.AddSrcItem("status", "active", "eq");
15
+ params.AddSrcItem("name", "John", "like");
16
+ ```
17
+
18
+ ## API Reference
19
+
20
+ ### `abRequestParam` Class
21
+
22
+ **Properties**
23
+
24
+ | Property | Type | Description |
25
+ |---|---|---|
26
+ | `data` | `any` | Arbitrary payload attached to the request. |
27
+ | `limit` | `string\|number` | Number of records per page. |
28
+ | `page` | `string\|number` | Current page number. |
29
+ | `filter_prop` | `string` | Optional filter property identifier. |
30
+ | `sort_by` | `abSortParam[]` | Array of sort descriptors. |
31
+ | `src_by` | `abSrcParam[]` | Array of filter/search descriptors. |
32
+ | `group_by` | `string[]` | Array of property names to group results by. |
33
+ | `force` | `boolean` | Forces the server to bypass cache. |
34
+
35
+ **Methods**
36
+
37
+ | Method | Signature | Description |
38
+ |---|---|---|
39
+ | `AddSortItem(prop, ord)` | `Function` | Appends a sort rule. `ord` defaults to `'asc'`, accepts `'asc' \| 'desc'`. |
40
+ | `AddSrcItem(prop, val, opr)` | `Function` | Appends a search rule. `opr` defaults to `'eq'`, accepts `'eq', 'neq', 'gt', 'gte', 'lt', 'lte', 'like', 'in'`. |
@@ -1,33 +1,33 @@
1
- # abVeeRules (Library)
2
-
3
- Pre-configured VeeValidate validation rules integrated with localization via `abTranslate`.
4
-
5
- ## Usage
6
-
7
- ```javascript
8
- import { abAllRules } from "@vue3-appsbd-ui/libraries/abVeeRules";
9
- import { defineRule } from "vee-validate";
10
-
11
- Object.keys(abAllRules).forEach(rule => {
12
- defineRule(rule, abAllRules[rule]);
13
- });
14
- ```
15
-
16
- ## API Reference
17
-
18
- ### `abAllRules` Object
19
-
20
- Validation functions conforming to VeeValidate's custom rule signature `(value, params, field)`.
21
-
22
- Included rules:
23
- - `required`: Returns translated `%{fld_name} is required`.
24
- - `numeric`: Returns translated `%{fld_name} should be numeric`.
25
- - `email`: Returns translated `%{fld_name} not a valid email address`.
26
- - `min`: Native min validation.
27
- - `min_value`: Returns translated `%{fld_name} should be more than X`.
28
- - `max`: Native max validation.
29
- - `max_value`: Returns translated `%{fld_name} should be less than X`.
30
- - `confirmed`: Checks password confirmation match.
31
- - `url`: Validates URL format.
32
- - `isUnique`: Custom stub for async uniqueness check.
33
- - `isValid`: Custom stub for async validity check.
1
+ # abVeeRules (Library)
2
+
3
+ Pre-configured VeeValidate validation rules integrated with localization via `abTranslate`.
4
+
5
+ ## Usage
6
+
7
+ ```javascript
8
+ import { abAllRules } from "@vue3-appsbd-ui/libraries/abVeeRules";
9
+ import { defineRule } from "vee-validate";
10
+
11
+ Object.keys(abAllRules).forEach(rule => {
12
+ defineRule(rule, abAllRules[rule]);
13
+ });
14
+ ```
15
+
16
+ ## API Reference
17
+
18
+ ### `abAllRules` Object
19
+
20
+ Validation functions conforming to VeeValidate's custom rule signature `(value, params, field)`.
21
+
22
+ Included rules:
23
+ - `required`: Returns translated `%{fld_name} is required`.
24
+ - `numeric`: Returns translated `%{fld_name} should be numeric`.
25
+ - `email`: Returns translated `%{fld_name} not a valid email address`.
26
+ - `min`: Native min validation.
27
+ - `min_value`: Returns translated `%{fld_name} should be more than X`.
28
+ - `max`: Native max validation.
29
+ - `max_value`: Returns translated `%{fld_name} should be less than X`.
30
+ - `confirmed`: Checks password confirmation match.
31
+ - `url`: Validates URL format.
32
+ - `isUnique`: Custom stub for async uniqueness check.
33
+ - `isValid`: Custom stub for async validity check.
@@ -1,56 +1,57 @@
1
- # Global UI Configuration (`AppsbdUIConfigure`)
2
-
3
- Call `AppsbdUIConfigure` once during app initialization to set library-wide locale and formatting defaults. Components follow a strict "prop > global config > built-in default" resolution order.
4
-
5
- ## Usage
6
-
7
- ```javascript
8
- import { AppsbdUIConfigure } from "@vue3-appsbd-ui";
9
-
10
- const banglaDigits = ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"];
11
-
12
- AppsbdUIConfigure({
13
- monthNames: ["জানুয়ারি", "ফেব্রুয়ারি", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"],
14
- monthNamesShort: ["জানু", "ফেব্রু", "মার্চ", "এপ্রি", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টে", "অক্টো", "নভে", "ডিসে"],
15
- dayNames: ["শনি", "রবি", "সোম", "মঙ্গল", "বুধ", "বৃহঃ", "শুক্র"],
16
- formatDigit: (val) => String(val).replace(/\d/g, (d) => banglaDigits[d]),
17
- is24Hour: false,
18
- rangeSeparator: " থেকে ",
19
- dateDataFormat: "YYYY-MM-DD",
20
- dateDisplayFormat: "DD/MM/YYYY",
21
- datetimeDataFormat: "YYYY-MM-DD HH:mm",
22
- datetimeDisplayFormat: "DD/MM/YYYY hh:mm a",
23
- timeDataFormat: "HH:mm",
24
- timeDisplayFormat: "hh:mm a",
25
- });
26
- ```
27
-
28
- ## Options Reference
29
-
30
- | Property | Type | Default | Description |
31
- | :--- | :--- | :--- | :--- |
32
- | `monthNames` | `String[]` | English full names | Array of 12 full month names. |
33
- | `monthNamesShort` | `String[]` | English short names | Array of 12 short month names. |
34
- | `dayNames` | `String[]` | English 3-letter names | Array of 7 short day names (Sat-first). |
35
- | `formatDigit` | `Function` | `(val) => String(val)` | Digit formatter applied to `AbNumberField` (display-only) and `AbDateTimePicker`. |
36
- | `rangeSeparator` | `String` | `' ↔ '` | Separator for date ranges in `AbDateTimePicker`. |
37
- | `is24Hour` | `Boolean` | `false` | Whether to use 24-hour format in `AbDateTimePicker`. |
38
- | `dateDataFormat` | `String` | `'YYYY-MM-DD'` | Global format for date data. |
39
- | `dateDisplayFormat` | `String` | `'YYYY-MM-DD'` | Global format for date display. |
40
- | `datetimeDataFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime data. |
41
- | `datetimeDisplayFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime display. |
42
- | `timeDataFormat` | `String` | `'HH:mm'` | Global format for time data. |
43
- | `timeDisplayFormat` | `String` | `'HH:mm'` | Global format for time display. |
44
- | `inputContainerClass` | `String` | `'mb-3'` | Global class for input containers. |
45
- | `toastPosition` | `String` | `'top-right'` | Default toast position. |
46
- | `toastDesign` | `String` | `'default'` | Default toast design. |
47
- | `toastTimeout` | `Number` | `5000` | Default toast timeout in ms. |
48
- | `toastCloseButton` | `Boolean` | `true` | Default toast close button visibility. |
49
- | `toastPauseOnHover` | `Boolean` | `true` | Default toast pause on hover. |
50
- | `toastPauseOnFocusLoss` | `Boolean` | `true` | Default toast pause on focus loss. |
51
- | `toastShowProgress` | `Boolean` | `true` | Default toast show progress. |
52
- | `trueValue` | `any` | `'Y'` | Default true value for toggles/switches. |
53
- | `falseValue` | `any` | `'N'` | Default false value for toggles/switches. |
54
- | `size` | `String` | `'md'` | Global size for components. |
55
- | `iconPosition` | `String` | `'right'` | Global default icon position (`left`, `right`). |
56
- | `isModalBorder` | `Boolean` | `true` | Global default modal border. |
1
+ # Global UI Configuration (`AppsbdUIConfigure`)
2
+
3
+ Call `AppsbdUIConfigure` once during app initialization to set library-wide locale and formatting defaults. Components follow a strict "prop > global config > built-in default" resolution order.
4
+
5
+ ## Usage
6
+
7
+ ```javascript
8
+ import { AppsbdUIConfigure } from "@vue3-appsbd-ui";
9
+
10
+ const banglaDigits = ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"];
11
+
12
+ AppsbdUIConfigure({
13
+ monthNames: ["জানুয়ারি", "ফেব্রুয়ারি", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"],
14
+ monthNamesShort: ["জানু", "ফেব্রু", "মার্চ", "এপ্রি", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টে", "অক্টো", "নভে", "ডিসে"],
15
+ dayNames: ["শনি", "রবি", "সোম", "মঙ্গল", "বুধ", "বৃহঃ", "শুক্র"],
16
+ formatDigit: (val) => String(val).replace(/\d/g, (d) => banglaDigits[d]),
17
+ is24Hour: false,
18
+ rangeSeparator: " থেকে ",
19
+ dateDataFormat: "YYYY-MM-DD",
20
+ dateDisplayFormat: "DD/MM/YYYY",
21
+ datetimeDataFormat: "YYYY-MM-DD HH:mm",
22
+ datetimeDisplayFormat: "DD/MM/YYYY hh:mm a",
23
+ timeDataFormat: "HH:mm",
24
+ timeDisplayFormat: "hh:mm a",
25
+ });
26
+ ```
27
+
28
+ ## Options Reference
29
+
30
+ | Property | Type | Default | Description |
31
+ | :--- | :--- | :--- | :--- |
32
+ | `monthNames` | `String[]` | English full names | Array of 12 full month names. |
33
+ | `monthNamesShort` | `String[]` | English short names | Array of 12 short month names. |
34
+ | `dayNames` | `String[]` | English 3-letter names | Array of 7 short day names (Sat-first). |
35
+ | `formatDigit` | `Function` | `(val) => String(val)` | Digit formatter applied to `AbNumberField` (display-only) and `AbDateTimePicker`. |
36
+ | `rangeSeparator` | `String` | `' ↔ '` | Separator for date ranges in `AbDateTimePicker`. |
37
+ | `is24Hour` | `Boolean` | `false` | Whether to use 24-hour format in `AbDateTimePicker`. |
38
+ | `dateDataFormat` | `String` | `'YYYY-MM-DD'` | Global format for date data. |
39
+ | `dateDisplayFormat` | `String` | `'YYYY-MM-DD'` | Global format for date display. |
40
+ | `datetimeDataFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime data. |
41
+ | `datetimeDisplayFormat` | `String` | `'YYYY-MM-DD HH:mm'` | Global format for datetime display. |
42
+ | `timeDataFormat` | `String` | `'HH:mm'` | Global format for time data. |
43
+ | `timeDisplayFormat` | `String` | `'HH:mm'` | Global format for time display. |
44
+ | `inputContainerClass` | `String` | `'mb-3'` | Global class for input containers. |
45
+ | `toastPosition` | `String` | `'top-right'` | Default toast position. |
46
+ | `toastDesign` | `String` | `'default'` | Default toast design. |
47
+ | `toastTimeout` | `Number` | `5000` | Default toast timeout in ms. |
48
+ | `toastCloseButton` | `Boolean` | `true` | Default toast close button visibility. |
49
+ | `toastPauseOnHover` | `Boolean` | `true` | Default toast pause on hover. |
50
+ | `toastPauseOnFocusLoss` | `Boolean` | `true` | Default toast pause on focus loss. |
51
+ | `toastShowProgress` | `Boolean` | `true` | Default toast show progress. |
52
+ | `trueValue` | `any` | `'Y'` | Default true value for toggles/switches. |
53
+ | `falseValue` | `any` | `'N'` | Default false value for toggles/switches. |
54
+ | `size` | `String` | `'md'` | Global size for components. |
55
+ | `input.iconPosition` | `String` | `'right'` | Global default icon position for input components (`left`, `right`). |
56
+ | `button.iconPosition` | `String` | `'left'` | Global default icon position for buttons (`left`, `right`). |
57
+ | `isModalBorder` | `Boolean` | `true` | Global default modal border. |
@@ -1,45 +1,50 @@
1
- # useAlert (Composable)
2
-
3
- Provides a procedural API to trigger modal alerts, notifications, and confirmations using the global `$alert` instance.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <script setup>
9
- import { useAlert } from "@vue3-appsbd-ui";
10
-
11
- const { alert } = useAlert();
12
-
13
- async function handleAction() {
14
- const result = await alert({
15
- type: "confirm",
16
- title: "Delete item?",
17
- message: "Are you sure you want to delete this?",
18
- icon: "warning",
19
- confirmText: "Yes, delete",
20
- cancelText: "Cancel"
21
- });
22
-
23
- if (result) {
24
- // User confirmed
25
- }
26
- }
27
- </script>
28
- ```
29
-
30
- ## API Reference
31
-
32
- ### `alert(options)`
33
-
34
- | Property | Type | Default | Description |
35
- |---|---|---|---|
36
- | `type` | `string` | `"alert"` | Variant: `"alert"`, `"confirm"`, or `"confirm-ajax"`. |
37
- | `title` | `string` | - | Headline text for the dialog. |
38
- | `message` | `string` | - | Detailed body text. |
39
- | `icon` | `string` | - | Status icon: `"success"`, `"error"`, `"warning"`, `"info"`, `"question"`. |
40
- | `variation` | `string` | `"default"` | Visual style: `"default"`, `"modern"`, `"minimal"`, `"top-color-bar"`. |
41
- | `size` | `string` | `"md"` | Width limit: `"sm"`, `"md"`, `"lg"`, `"xl"`, `"auto"`. |
42
- | `confirmText` | `string` | `"OK"` | Label for the primary accept button. |
43
- | `cancelText` | `string` | `"Cancel"` | Label for the cancel/decline button. |
44
- | `onConfirm` | `Function` | - | Async callback executed when accepting a `"confirm-ajax"` modal. |
45
- | `timer` | `number` | - | Auto-close timer in milliseconds (only for `"alert"` type). |
1
+ # useAlert (Composable)
2
+
3
+ Provides a procedural API to trigger modal alerts, notifications, and confirmations using the global `$alert` instance.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <script setup>
9
+ import { useAlert } from "@vue3-appsbd-ui";
10
+
11
+ const { alert } = useAlert();
12
+
13
+ async function handleAction() {
14
+ const result = await alert({
15
+ type: "confirm",
16
+ title: "Delete item?",
17
+ message: "Are you sure you want to delete this?",
18
+ icon: "warning",
19
+ confirmText: "Yes, delete",
20
+ cancelText: "Cancel"
21
+ });
22
+
23
+ if (result) {
24
+ // User confirmed
25
+ }
26
+ }
27
+ </script>
28
+ ```
29
+
30
+ ## API Reference
31
+
32
+ ### `alert(options)`
33
+
34
+ | Property | Type | Default | Description |
35
+ |---|---|---|---|
36
+ | `type` | `string` | `"alert"` | Variant: `"alert"`, `"confirm"`, or `"confirm-ajax"`. |
37
+ | `title` | `string` | - | Headline text for the dialog. |
38
+ | `message` | `string` | - | Detailed body text. |
39
+ | `icon` | `string` | - | Status icon: `"success"`, `"error"`, `"warning"`, `"info"`, `"question"`. |
40
+ | `variation` | `string` | `"default"` | Visual style: `"default"`, `"modern"`, `"minimal"`, `"top-color-bar"`. |
41
+ | `size` | `string` | `"md"` | Width limit: `"sm"`, `"md"`, `"lg"`, `"xl"`, `"auto"`. |
42
+ | `confirmText` | `string` | `"OK"` | Label for the primary accept button. |
43
+ | `cancelText` | `string` | `"Cancel"` | Label for the cancel/decline button. |
44
+ | `confirmBtnIcon` | `string \| Component` | `"save"` | Icon for the confirm button. Built-in names: `"save"`, `"cancel"`, `"delete"`, or Vue Component. |
45
+ | `cancelBtnIcon` | `string \| Component` | `"cancel"` | Icon for the cancel button. Built-in names: `"save"`, `"cancel"`, `"delete"`, or Vue Component. |
46
+ | `confirmBtnColor` | `string` | `"primary"` | Theme color for the confirm button (e.g., `"danger"`, `"success"`). |
47
+ | `cancelBtnColor` | `string` | `"light"` | Theme color for the cancel button (e.g., `"secondary"`, `"light"`). |
48
+ | `onConfirm` | `Function` | - | Async callback executed when accepting a `"confirm-ajax"` modal. |
49
+ | `timer` | `number` | - | Auto-close timer in milliseconds (only for `"alert"` type). |
50
+ | `responseMessage` | `string \| object` | `null` | Secondary message block. Can be a string or an object with string arrays for keys `error`, `info`, `debug`, `warning`. |
@@ -1,31 +1,31 @@
1
- # useFileValidator (Composable)
2
-
3
- Provides file validation utilities to check extensions, MIME types, and file sizes. Automatically spawns error toasts on validation failure and returns a structured file object with icon metadata.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <script setup>
9
- import { useFileValidator } from "@vue3-appsbd-ui";
10
-
11
- const { getFileInfo, getFileIconByExt } = useFileValidator();
12
-
13
- function handleFileUpload(event) {
14
- const file = event.target.files[0];
15
- if (!file) return;
16
-
17
- const validatedFile = getFileInfo(file, 2.0);
18
- if (validatedFile) {
19
- // validatedFile.isImage
20
- // validatedFile.fileIcon
21
- }
22
- }
23
- </script>
24
- ```
25
-
26
- ## API Reference
27
-
28
- | Method | Signature | Description |
29
- |---|---|---|
30
- | `getFileInfo(file, sizeLimitMb)` | `Function` | Validates a `File` object against allowed MIME types and max size (`sizeLimitMb`, default `1.0`). If invalid, spawns a toast error and returns `null`. If valid, returns the `file` augmented with `isImage` and `fileIcon` properties. |
31
- | `getFileIconByExt(ext, type)` | `Function` | Returns `{ isImage: boolean, fileIcon: Component\|String }` based on file extension and MIME type. Uses `lucide-vue-next` icons for known formats (pdf, zip, doc, xls, ppt, mp4). |
1
+ # useFileValidator (Composable)
2
+
3
+ Provides file validation utilities to check extensions, MIME types, and file sizes. Automatically spawns error toasts on validation failure and returns a structured file object with icon metadata.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <script setup>
9
+ import { useFileValidator } from "@vue3-appsbd-ui";
10
+
11
+ const { getFileInfo, getFileIconByExt } = useFileValidator();
12
+
13
+ function handleFileUpload(event) {
14
+ const file = event.target.files[0];
15
+ if (!file) return;
16
+
17
+ const validatedFile = getFileInfo(file, 2.0);
18
+ if (validatedFile) {
19
+ // validatedFile.isImage
20
+ // validatedFile.fileIcon
21
+ }
22
+ }
23
+ </script>
24
+ ```
25
+
26
+ ## API Reference
27
+
28
+ | Method | Signature | Description |
29
+ |---|---|---|
30
+ | `getFileInfo(file, sizeLimitMb)` | `Function` | Validates a `File` object against allowed MIME types and max size (`sizeLimitMb`, default `1.0`). If invalid, spawns a toast error and returns `null`. If valid, returns the `file` augmented with `isImage` and `fileIcon` properties. |
31
+ | `getFileIconByExt(ext, type)` | `Function` | Returns `{ isImage: boolean, fileIcon: Component\|String }` based on file extension and MIME type. Uses `lucide-vue-next` icons for known formats (pdf, zip, doc, xls, ppt, mp4). |
@@ -1,41 +1,41 @@
1
- # useResponsive (Composable)
2
-
3
- Tracks browser viewport width in real-time with reactive helpers for responsive layout decisions, aligned with Bootstrap 5 breakpoints.
4
-
5
- ## Usage
6
-
7
- ```html
8
- <script setup>
9
- import { useResponsive } from "@vue3-appsbd-ui";
10
-
11
- const { ScreenWidth, ScreenType, isUptoTab } = useResponsive();
12
- // Or with custom tablet threshold:
13
- // const { isUptoTab } = useResponsive({ tabMaxWidth: 900 });
14
- </script>
15
-
16
- <template>
17
- <div>
18
- <p>Current Width: {{ ScreenWidth }}px — Breakpoint: {{ ScreenType }}</p>
19
- <div v-if="isUptoTab">Mobile / Tablet Layout</div>
20
- <div v-else>Desktop Layout</div>
21
- </div>
22
- </template>
23
- ```
24
-
25
- ## API Reference
26
-
27
- ### `useResponsive(options)`
28
-
29
- **Options**
30
-
31
- | Property | Type | Default | Description |
32
- |---|---|---|---|
33
- | `tabMaxWidth` | `number` | `0` | Custom max-width (px) to treat as "up-to tab". When `> 0`, screens at or below this width are considered tablet-sized regardless of breakpoint. |
34
-
35
- **Returned Properties**
36
-
37
- | Property | Type | Description |
38
- |---|---|---|
39
- | `ScreenWidth` | `ComputedRef<number>` | Raw viewport width in pixels. |
40
- | `ScreenType` | `ComputedRef<string>` | Current Bootstrap-style breakpoint (`'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`). |
41
- | `isUptoTab` | `ComputedRef<boolean>` | `true` when viewport is tablet-sized or smaller (`xs`, `sm`, or `<=` `tabMaxWidth`). |
1
+ # useResponsive (Composable)
2
+
3
+ Tracks browser viewport width in real-time with reactive helpers for responsive layout decisions, aligned with Bootstrap 5 breakpoints.
4
+
5
+ ## Usage
6
+
7
+ ```html
8
+ <script setup>
9
+ import { useResponsive } from "@vue3-appsbd-ui";
10
+
11
+ const { ScreenWidth, ScreenType, isUptoTab } = useResponsive();
12
+ // Or with custom tablet threshold:
13
+ // const { isUptoTab } = useResponsive({ tabMaxWidth: 900 });
14
+ </script>
15
+
16
+ <template>
17
+ <div>
18
+ <p>Current Width: {{ ScreenWidth }}px — Breakpoint: {{ ScreenType }}</p>
19
+ <div v-if="isUptoTab">Mobile / Tablet Layout</div>
20
+ <div v-else>Desktop Layout</div>
21
+ </div>
22
+ </template>
23
+ ```
24
+
25
+ ## API Reference
26
+
27
+ ### `useResponsive(options)`
28
+
29
+ **Options**
30
+
31
+ | Property | Type | Default | Description |
32
+ |---|---|---|---|
33
+ | `tabMaxWidth` | `number` | `0` | Custom max-width (px) to treat as "up-to tab". When `> 0`, screens at or below this width are considered tablet-sized regardless of breakpoint. |
34
+
35
+ **Returned Properties**
36
+
37
+ | Property | Type | Description |
38
+ |---|---|---|
39
+ | `ScreenWidth` | `ComputedRef<number>` | Raw viewport width in pixels. |
40
+ | `ScreenType` | `ComputedRef<string>` | Current Bootstrap-style breakpoint (`'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`). |
41
+ | `isUptoTab` | `ComputedRef<boolean>` | `true` when viewport is tablet-sized or smaller (`xs`, `sm`, or `<=` `tabMaxWidth`). |