@appsbd/vue3-appsbd-ui 1.0.0 → 1.0.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 (69) hide show
  1. package/.ai/ai_ref_AbAvatar.md +9 -1
  2. package/.ai/ai_ref_AbBadge.md +6 -5
  3. package/.ai/ai_ref_AbButton.md +8 -9
  4. package/.ai/ai_ref_AbCard.md +70 -53
  5. package/.ai/ai_ref_AbCarousel.md +47 -47
  6. package/.ai/ai_ref_AbChart.md +87 -0
  7. package/.ai/ai_ref_AbConfirmPopover.md +59 -59
  8. package/.ai/ai_ref_AbDarkModeToggler.md +42 -42
  9. package/.ai/ai_ref_AbDateTimePicker.md +3 -0
  10. package/.ai/ai_ref_AbEasyModal.md +62 -62
  11. package/.ai/ai_ref_AbField.md +96 -93
  12. package/.ai/ai_ref_AbFileUploader.md +63 -63
  13. package/.ai/ai_ref_AbFilterPanel.md +71 -71
  14. package/.ai/ai_ref_AbFormCheck.md +75 -75
  15. package/.ai/ai_ref_AbImageRadioInput.md +63 -63
  16. package/.ai/ai_ref_AbInputField.md +74 -71
  17. package/.ai/ai_ref_AbInputTag.md +3 -0
  18. package/.ai/ai_ref_AbKbd.md +35 -35
  19. package/.ai/ai_ref_AbKbdGroup.md +33 -33
  20. package/.ai/ai_ref_AbModal.md +103 -103
  21. package/.ai/ai_ref_AbMultiSelect.md +4 -0
  22. package/.ai/ai_ref_AbNumberField.md +84 -84
  23. package/.ai/ai_ref_AbPopover.md +64 -64
  24. package/.ai/ai_ref_AbPricingCard.md +64 -64
  25. package/.ai/ai_ref_AbPricingContainer.md +49 -49
  26. package/.ai/ai_ref_AbPricingTable.md +72 -72
  27. package/.ai/ai_ref_AbProgressbar.md +44 -37
  28. package/.ai/ai_ref_AbScrollbar.md +48 -48
  29. package/.ai/ai_ref_AbSettingsForm.md +54 -54
  30. package/.ai/ai_ref_AbSideMenuItem.md +58 -58
  31. package/.ai/ai_ref_AbSidebar.md +70 -70
  32. package/.ai/ai_ref_AbSkeleton.md +41 -41
  33. package/.ai/ai_ref_AbSlider.md +71 -71
  34. package/.ai/ai_ref_AbTab.md +38 -38
  35. package/.ai/ai_ref_AbTable.md +59 -59
  36. package/.ai/ai_ref_AbTabs.md +47 -47
  37. package/.ai/ai_ref_AbToggle.md +65 -65
  38. package/.ai/ai_ref_AbTooltip.md +53 -53
  39. package/.ai/ai_ref_AbWizard.md +77 -77
  40. package/.ai/ai_ref_AbWizardStep.md +48 -48
  41. package/.ai/ai_ref_abEventBus.md +94 -0
  42. package/.ai/ai_ref_abRequestParam.md +55 -0
  43. package/.ai/ai_ref_abTranslate.md +33 -0
  44. package/.ai/ai_ref_abVeeRules.md +42 -0
  45. package/.ai/ai_ref_useAlert.md +63 -0
  46. package/.ai/ai_ref_useFileValidator.md +46 -0
  47. package/.ai/ai_ref_useResponsive.md +55 -0
  48. package/.ai/ai_ref_useTheme.md +39 -0
  49. package/.ai/ai_ref_useToast.md +42 -0
  50. package/AI_REFERENCE.md +68 -112
  51. package/design-system.md +403 -0
  52. package/dist/skins/black.css +1 -1
  53. package/dist/skins/cyan.css +1 -1
  54. package/dist/skins/default.css +1 -1
  55. package/dist/skins/gray.css +1 -1
  56. package/dist/skins/green.css +1 -1
  57. package/dist/skins/orange.css +1 -1
  58. package/dist/skins/pink.css +1 -1
  59. package/dist/skins/purple.css +1 -1
  60. package/dist/skins/red.css +1 -1
  61. package/dist/skins/red.scss +3 -3
  62. package/dist/skins/themes/_common_variable.scss +2 -0
  63. package/dist/skins/themes/_red.scss +6 -6
  64. package/dist/skins/violet.css +1 -1
  65. package/dist/style.css +1 -1
  66. package/dist/vue3-appsbd-ui.cjs.js +114 -41
  67. package/dist/vue3-appsbd-ui.es.js +27212 -4646
  68. package/package.json +10 -4
  69. package/readme.md +136 -136
@@ -30,7 +30,15 @@ Globally registered by the plugin.
30
30
 
31
31
  ## Events
32
32
 
33
- None.
33
+ | Name | Payload | Description |
34
+ | --- | --- | --- |
35
+ | `change` | `Event` | Fired when a file is selected in `add` variant. The selected file(s) can be accessed via `event.target.files`. |
36
+
37
+ ## Exposed Methods
38
+
39
+ | Name | Description |
40
+ | --- | --- |
41
+ | `triggerFileSelect()` | Programmatically triggers the file selection dialog when in `add` variant. |
34
42
 
35
43
  ## Slots
36
44
 
@@ -10,9 +10,9 @@ Globally registered by the plugin.
10
10
 
11
11
  ```vue
12
12
  <template>
13
- <ab-badge variant="primary">New</ab-badge>
14
- <ab-badge variant="success" is-rounded-pill>12</ab-badge>
15
- <ab-badge variant="warning" is-outline>Pending</ab-badge>
13
+ <ab-badge color="primary">New</ab-badge>
14
+ <ab-badge color="success" is-rounded-pill>12</ab-badge>
15
+ <ab-badge color="warning" is-outline>Pending</ab-badge>
16
16
  </template>
17
17
  ```
18
18
 
@@ -21,13 +21,13 @@ Globally registered by the plugin.
21
21
  | Name | Type | Default | Description |
22
22
  | --- | --- | --- | --- |
23
23
  | `size` | `String` | `"md"` | Size of the badge (`sm`, `md`, `lg`). |
24
- | `variant` | `String` | `"primary"` | Color theme (`primary`, `secondary`, `danger`, `warning`, `success`, `info`). |
24
+ | `color` | `String` | `"primary"` | Color theme (`primary`, `secondary`, `danger`, `warning`, `success`, `info`). |
25
25
  | `isOutline` | `Boolean` | `false` | Outlined style with transparent background. |
26
26
  | `isRoundedPill` | `Boolean` | `false` | Transforms badge to a fully rounded pill shape. |
27
27
  | `isDot` | `Boolean` | `false` | Prepends a dot indicator layout. |
28
- | `isAvatar` | `Boolean` | `false` | Adjusts layout to accommodate an avatar image/SVG. |
29
28
  | `isClose` | `Boolean` | `false` | Adjusts padding and layout for a close icon. |
30
29
  | `isAdd` | `Boolean` | `false` | Adjusts styling for an add/plus icon badge. |
30
+ | `position` | `String` | `"right"` | Position of the `content` slot (`"left"`, `"right"`). |
31
31
 
32
32
  ## Events
33
33
 
@@ -38,6 +38,7 @@ None.
38
38
  | Name | Description |
39
39
  | --- | --- |
40
40
  | `default` | Badge content. |
41
+ | `content` | Slot for an icon, image, or avatar. Placed according to the `position` prop. |
41
42
 
42
43
  ## Notes
43
44
 
@@ -1,6 +1,6 @@
1
1
  # AbButton — AI Reference
2
2
 
3
- Highly customizable push button with an optional built-in loader animation and a leading icon slot. Styling variants and sizes are easily configured via props (`variant`, `size`, `isOutline`, `isIconBtn`).
3
+ Highly customizable push button with an optional built-in loader animation and a leading icon slot. Styling variants and sizes are easily configured via props (`color`, `size`, `isOutline`, `isIconBtn`).
4
4
 
5
5
  ## Installation
6
6
 
@@ -19,16 +19,16 @@ No per-component import required.
19
19
  ```vue
20
20
  <template>
21
21
  <!-- Basic -->
22
- <ab-button variant="primary">Save</ab-button>
22
+ <ab-button color="primary">Save</ab-button>
23
23
 
24
24
  <!-- With icon + divider -->
25
- <ab-button outline-variant="secondary" is-outline show-icon-divider>
25
+ <ab-button color="secondary" is-outline show-icon-divider>
26
26
  <template #icon><i class="bi bi-plus-lg"></i></template>
27
27
  New Item
28
28
  </ab-button>
29
29
 
30
30
  <!-- Loading state -->
31
- <ab-button variant="primary" :is-animated="isSaving" is-hide-text-on-animate>
31
+ <ab-button color="primary" :is-animated="isSaving" is-hide-text-on-animate>
32
32
  Save
33
33
  </ab-button>
34
34
  </template>
@@ -44,10 +44,9 @@ const isSaving = ref(false);
44
44
  | Name | Type | Default | Description |
45
45
  | --- | --- | --- | --- |
46
46
  | `type` | `String` | `"button"` | Native button type (`button`, `submit`, `reset`). |
47
- | `variant` | `String` | `"primary"` | Color variant (primary, secondary, success, danger, warning, info, light, dark). |
48
- | `outlineVariant` | `String` | `"primary"` | Color variant applied when `isOutline` is true. |
47
+ | `color` | `String` | `"primary"` | Color variant (primary, secondary, success, danger, warning, info, light, dark). |
49
48
  | `size` | `String` | `"md"` | Button size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
50
- | `isOutline` | `Boolean` | `false` | Applies the outline style for the selected variant. |
49
+ | `isOutline` | `Boolean` | `false` | Applies the outline style for the selected color. |
51
50
  | `isIconBtn` | `Boolean` | `false` | Formats the button styling for a single icon. |
52
51
  | `isAnimated` | `Boolean` | `false` | When `true`, renders the loader SVG and optionally hides the label. |
53
52
  | `isHideTextOnAnimate` | `Boolean` | `false` | Hides the default slot content while `isAnimated` is `true`. |
@@ -67,5 +66,5 @@ No custom events emitted. All native button events (`click`, `focus`, `blur`,
67
66
 
68
67
  ## Notes
69
68
 
70
- - Size and color are now controlled via the `size` and `variant` props rather than raw Bootstrap utility classes.
71
- - If no `variant` prop is supplied, the component auto-applies `primary`.
69
+ - Size and color are now controlled via the `size` and `color` props rather than raw Bootstrap utility classes.
70
+ - If no `color` prop is supplied, the component auto-applies `primary`.
@@ -1,53 +1,70 @@
1
- # AbCard — AI Reference
2
-
3
- Flexible Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual variations (`tile-card`, `item-card`, `insight-card`, …) are applied through CSS classes on `containerClass` rather than separate components.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin — no import required.
8
-
9
- ```js
10
- app.use(AppsbdUI);
11
- ```
12
-
13
- ## Usage
14
-
15
- ```vue
16
- <template>
17
- <ab-card container-class="insight-card" header-class="fw-semibold">
18
- <template #header>Revenue this month</template>
19
- <template #body>
20
- <h3>$12,480</h3>
21
- <p>+8.2% vs last month</p>
22
- </template>
23
- <template #footer>
24
- <ab-button class="btn-outline-primary btn-sm">View Report</ab-button>
25
- </template>
26
- </ab-card>
27
- </template>
28
- ```
29
-
30
- ## Props
31
-
32
- | Name | Type | Default | Description |
33
- | --- | --- | --- | --- |
34
- | `containerClass` | `String` | `""` | CSS class applied to the card root (use to pick a layout variant). |
35
- | `headerClass` | `String` | `""` | CSS class for the header section. |
36
- | `bodyClass` | `String` | `""` | CSS class for the body section. |
37
- | `footerClass` | `String` | `""` | CSS class for the footer section. |
38
-
39
- ## Events
40
-
41
- None.
42
-
43
- ## Slots
44
-
45
- | Name | Description |
46
- | --- | --- |
47
- | `header` | Card header content. Omit to hide the header. |
48
- | `body` | Card body content. |
49
- | `footer` | Card footer content. Omit to hide the footer. |
50
-
51
- ## Notes
52
-
53
- - Do **not** create a new `.vue` file for card variations — define the variant as a CSS class in `src/styles/components/_card.scss` and pass it via `containerClass`.
1
+ # AbCard — AI Reference
2
+
3
+ Flexible Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual variations (`tile-card`, `item-card`, `insight-card`, …) are applied through CSS classes on `containerClass` rather than separate components.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin — no import required.
8
+
9
+ ```js
10
+ app.use(AppsbdUI);
11
+ ```
12
+
13
+ ## Props
14
+
15
+ | Name | Type | Default | Description |
16
+ | --- | --- | --- | --- |
17
+ | `containerClass` | `String` | `undefined` | CSS class applied to the card root. |
18
+ | `headerClass` | `String` | `""` | CSS class for the header section. |
19
+ | `bodyClass` | `String` | `""` | CSS class for the body section. |
20
+ | `footerClass` | `String` | `""` | CSS class for the footer section. |
21
+ | `isBorderCard` | `Boolean` | `true` | Whether to display the default card border. |
22
+ | `bgColorVariant` | `String` | `""` | Bootstrap color variant for background (`primary`, `success`, etc.). |
23
+ | `borderBottomVariant` | `String` | `""` | Adds a colored bottom border with the specified variant. |
24
+ | `isTileCard` | `Boolean` | `false` | Applies the `.tile-card` layout styles. |
25
+ | `variation` | `String` | `""` | Generic variation class to append to the root. |
26
+
27
+ ## Usage
28
+
29
+ ```vue
30
+ <template>
31
+ <!-- Simple Stat Tile -->
32
+ <ab-card is-tile-card :is-border-card="false">
33
+ <template #body>
34
+ <div class="left-section">
35
+ <span class="tile-title">Total Revenue</span>
36
+ <span class="tile-value">$12,480</span>
37
+ </div>
38
+ </template>
39
+ </ab-card>
40
+
41
+ <!-- Custom Styled Card -->
42
+ <ab-card
43
+ container-class="shadow-sm"
44
+ border-bottom-variant="primary"
45
+ header-class="bg-light"
46
+ >
47
+ <template #header>Card Title</template>
48
+ <template #body>Card Content</template>
49
+ <template #footer>
50
+ <ab-button size="sm">Action</ab-button>
51
+ </template>
52
+ </ab-card>
53
+ </template>
54
+ ```
55
+
56
+ ## Events
57
+
58
+ None.
59
+
60
+ ## Slots
61
+
62
+ | Name | Description |
63
+ | --- | --- |
64
+ | `header` | Card header content. Omit to hide the header. |
65
+ | `body` | Card body content. |
66
+ | `footer` | Card footer content. Omit to hide the footer. |
67
+
68
+ ## Notes
69
+
70
+ - Do **not** create a new `.vue` file for card variations — define the variant as a CSS class in `src/styles/components/_card.scss` and pass it via `containerClass`.
@@ -1,47 +1,47 @@
1
- # AbCarousel — AI Reference
2
-
3
- Rotating slider for images or arbitrary HTML content. Supports horizontal and vertical orientations, autoplay, edge-fade, and outside / hover-only navigation buttons.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <!-- Image carousel -->
14
- <ab-carousel edge-fade autoplay :autoplay-interval="4000">
15
- <img src="/slide1.jpg" alt="" />
16
- <img src="/slide2.jpg" alt="" />
17
- <img src="/slide3.jpg" alt="" />
18
- </ab-carousel>
19
-
20
- <!-- Card carousel, vertical orientation -->
21
- <ab-carousel orientation="vertical" nav-outside nav-on-hover>
22
- <ab-card v-for="card in cards" :key="card.id">…</ab-card>
23
- </ab-carousel>
24
- </template>
25
- ```
26
-
27
- ## Props
28
-
29
- | Name | Type | Default | Description |
30
- | --- | --- | --- | --- |
31
- | `scrollAmount` | `Number` | `200` | Pixels scrolled per click. When children exist, falls back to item width. |
32
- | `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
33
- | `edgeFade` | `Boolean` | `false` | Fade the leading/trailing edges. |
34
- | `autoplay` | `Boolean` | `false` | Auto-scroll enabled. |
35
- | `autoplayInterval` | `Number` | `3000` | Autoplay interval in ms. |
36
- | `navOutside` | `Boolean` | `false` | Render nav buttons outside the carousel. |
37
- | `navOnHover` | `Boolean` | `false` | Show nav buttons only on hover. |
38
-
39
- ## Events
40
-
41
- None.
42
-
43
- ## Slots
44
-
45
- | Name | Description |
46
- | --- | --- |
47
- | `default` | Carousel items (images, cards, or arbitrary HTML). |
1
+ # AbCarousel — AI Reference
2
+
3
+ Rotating slider for images or arbitrary HTML content. Supports horizontal and vertical orientations, autoplay, edge-fade, and outside / hover-only navigation buttons.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <!-- Image carousel -->
14
+ <ab-carousel edge-fade autoplay :autoplay-interval="4000">
15
+ <img src="/slide1.jpg" alt="" />
16
+ <img src="/slide2.jpg" alt="" />
17
+ <img src="/slide3.jpg" alt="" />
18
+ </ab-carousel>
19
+
20
+ <!-- Card carousel, vertical orientation -->
21
+ <ab-carousel orientation="vertical" nav-outside nav-on-hover>
22
+ <ab-card v-for="card in cards" :key="card.id">…</ab-card>
23
+ </ab-carousel>
24
+ </template>
25
+ ```
26
+
27
+ ## Props
28
+
29
+ | Name | Type | Default | Description |
30
+ | --- | --- | --- | --- |
31
+ | `scrollAmount` | `Number` | `200` | Pixels scrolled per click. When children exist, falls back to item width. |
32
+ | `orientation` | `String` | `"horizontal"` | `horizontal` or `vertical`. |
33
+ | `edgeFade` | `Boolean` | `false` | Fade the leading/trailing edges. |
34
+ | `autoplay` | `Boolean` | `false` | Auto-scroll enabled. |
35
+ | `autoplayInterval` | `Number` | `3000` | Autoplay interval in ms. |
36
+ | `navOutside` | `Boolean` | `false` | Render nav buttons outside the carousel. |
37
+ | `navOnHover` | `Boolean` | `false` | Show nav buttons only on hover. |
38
+
39
+ ## Events
40
+
41
+ None.
42
+
43
+ ## Slots
44
+
45
+ | Name | Description |
46
+ | --- | --- |
47
+ | `default` | Carousel items (images, cards, or arbitrary HTML). |
@@ -0,0 +1,87 @@
1
+ # AbChart
2
+
3
+ A flexible chart component powered by Apache ECharts (via vue-echarts). It supports both full ECharts option objects and a simplified props-based API for common chart types.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install echarts vue-echarts
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Using individual props (Simplified API)
14
+
15
+ ```vue
16
+ <script setup>
17
+ import { AbChart } from "@vue3-appsbd-ui";
18
+
19
+ const xAxisData = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
20
+ const seriesData = [150, 230, 224, 218, 135, 147, 260];
21
+ </script>
22
+
23
+ <template>
24
+ <AbChart
25
+ chartType="line"
26
+ :xAxisData="xAxisData"
27
+ :seriesData="seriesData"
28
+ height="400px"
29
+ />
30
+ </template>
31
+ ```
32
+
33
+ ### Using full ECharts option (Advanced API)
34
+
35
+ ```vue
36
+ <script setup>
37
+ import { AbChart } from "@vue3-appsbd-ui";
38
+
39
+ const option = {
40
+ xAxis: {
41
+ type: 'category',
42
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
43
+ },
44
+ yAxis: {
45
+ type: 'value'
46
+ },
47
+ series: [{
48
+ data: [150, 230, 224, 218, 135, 147, 260],
49
+ type: 'line'
50
+ }]
51
+ };
52
+ </script>
53
+
54
+ <template>
55
+ <AbChart :option="option" height="400px" />
56
+ </template>
57
+ ```
58
+
59
+ ## Props
60
+
61
+ | Name | Type | Default | Description |
62
+ | :--- | :--- | :--- | :--- |
63
+ | `option` | `Object` | `{}` | Full ECharts option object. If provided, it overrides all other props. |
64
+ | `chartType` | `String` | `""` | The type of chart when using simplified props (`"line"`, `"bar"`, `"pie"`). |
65
+ | `xAxisData` | `Array` | `[]` | Categories for the X-axis (e.g., dates or labels). |
66
+ | `seriesData` | `Array` | `[]` | Data points for the chart. For Pie charts, use an array of objects: `[{ value: 10, name: 'A' }]`. |
67
+ | `xAxisType` | `String` | `"category"` | ECharts X-axis type (e.g., `"value"`, `"category"`, `"time"`, `"log"`). |
68
+ | `yAxisType` | `String` | `"value"` | ECharts Y-axis type. |
69
+ | `legendOrient` | `String` | `""` | Orientation of the chart legend (e.g., `"vertical"`, `"horizontal"`). |
70
+ | `showPointValues` | `Boolean` | `false` | If true, displays the value label on each data point in the chart. |
71
+ | `height` | `String` | `"400px"` | Height of the chart container (e.g., `"300px"`, `"100%"`). |
72
+
73
+
74
+
75
+ ## Events
76
+
77
+ None.
78
+
79
+ ## Slots
80
+
81
+ None.
82
+
83
+ ## Notes
84
+
85
+ - **Tree Shaking**: The component internally imports only the necessary ECharts modules (`CanvasRenderer`, `LineChart`, `PieChart`, `BarChart`, `GridComponent`, `TitleComponent`, `TooltipComponent`, `LegendComponent`) to keep the bundle size small.
86
+ - **Autoresize**: The component has `autoresize` enabled by default.
87
+ - **Pie Charts**: When `chartType="pie"`, the `xAxis` and `yAxis` configurations are automatically omitted.
@@ -1,59 +1,59 @@
1
- # AbConfirmPopover — AI Reference
2
-
3
- Confirmation popover with an async `onConfirm` handler and a built-in loader. Useful for destructive actions (delete, archive) that need an inline confirmation without opening a modal.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <!-- Recommended: async onConfirm handles loader automatically -->
14
- <ab-confirm-popover
15
- msg="Delete this record?"
16
- icon="warning"
17
- :on-confirm="handleDelete"
18
- :item-data="record"
19
- confirm-text="Delete"
20
- cancel-text="Keep"
21
- >
22
- <ab-button class="btn-danger"><i class="bi bi-trash"></i></ab-button>
23
- </ab-confirm-popover>
24
- </template>
25
-
26
- <script setup>
27
- async function handleDelete(record) {
28
- await api.delete(record.id);
29
- // loader and popover close handled by the component
30
- }
31
- </script>
32
- ```
33
-
34
- ## Props
35
-
36
- | Name | Type | Default | Description |
37
- | --- | --- | --- | --- |
38
- | `msg` | `String` | `"Are you sure?"` | Confirmation message. |
39
- | `title` | `String` | `""` | Optional title above the message. |
40
- | `confirmText` | `String` | `"Yes"` | Confirm button label. |
41
- | `cancelText` | `String` | `"No"` | Cancel button label. |
42
- | `icon` | `String` | `"question"` | `success`, `error`, `warning`, `info`, `question`. |
43
- | `type` | `String` | `"confirm"` | `confirm`, `confirm-ajax`, or `alert`. |
44
- | `onConfirm` | `Function` | `null` | Async handler `(itemData) => Promise`. Preferred over `onConfirmed` event. |
45
- | `itemData` | `Object \| String \| Number \| Array` | `null` | Payload passed to `onConfirm`. |
46
-
47
- ## Events
48
-
49
- | Event | Payload | Description |
50
- | --- | --- | --- |
51
- | `onConfirmed` | `{ showLoader(status), itemData, closePopover }` | Legacy callback — used only when no `onConfirm` prop is provided. Call `showLoader(true)` to start the loader, then `closePopover()` when done. |
52
-
53
- ## Slots
54
-
55
- | Name | Scope | Description |
56
- | --- | --- | --- |
57
- | `default` | — | Trigger element (typically an `AbButton`). |
58
- | `desc` | — | Additional description below the message. |
59
- | `actionButtons` | `{ removeConfirmed, state }` | Custom action buttons — call `removeConfirmed()` to trigger the confirm flow. |
1
+ # AbConfirmPopover — AI Reference
2
+
3
+ Confirmation popover with an async `onConfirm` handler and a built-in loader. Useful for destructive actions (delete, archive) that need an inline confirmation without opening a modal.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <!-- Recommended: async onConfirm handles loader automatically -->
14
+ <ab-confirm-popover
15
+ msg="Delete this record?"
16
+ icon="warning"
17
+ :on-confirm="handleDelete"
18
+ :item-data="record"
19
+ confirm-text="Delete"
20
+ cancel-text="Keep"
21
+ >
22
+ <ab-button class="btn-danger"><i class="bi bi-trash"></i></ab-button>
23
+ </ab-confirm-popover>
24
+ </template>
25
+
26
+ <script setup>
27
+ async function handleDelete(record) {
28
+ await api.delete(record.id);
29
+ // loader and popover close handled by the component
30
+ }
31
+ </script>
32
+ ```
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Default | Description |
37
+ | --- | --- | --- | --- |
38
+ | `msg` | `String` | `"Are you sure?"` | Confirmation message. |
39
+ | `title` | `String` | `""` | Optional title above the message. |
40
+ | `confirmText` | `String` | `"Yes"` | Confirm button label. |
41
+ | `cancelText` | `String` | `"No"` | Cancel button label. |
42
+ | `icon` | `String` | `"question"` | `success`, `error`, `warning`, `info`, `question`. |
43
+ | `type` | `String` | `"confirm"` | `confirm`, `confirm-ajax`, or `alert`. |
44
+ | `onConfirm` | `Function` | `null` | Async handler `(itemData) => Promise`. Preferred over `onConfirmed` event. |
45
+ | `itemData` | `Object \| String \| Number \| Array` | `null` | Payload passed to `onConfirm`. |
46
+
47
+ ## Events
48
+
49
+ | Event | Payload | Description |
50
+ | --- | --- | --- |
51
+ | `onConfirmed` | `{ showLoader(status), itemData, closePopover }` | Legacy callback — used only when no `onConfirm` prop is provided. Call `showLoader(true)` to start the loader, then `closePopover()` when done. |
52
+
53
+ ## Slots
54
+
55
+ | Name | Scope | Description |
56
+ | --- | --- | --- |
57
+ | `default` | — | Trigger element (typically an `AbButton`). |
58
+ | `desc` | — | Additional description below the message. |
59
+ | `actionButtons` | `{ removeConfirmed, state }` | Custom action buttons — call `removeConfirmed()` to trigger the confirm flow. |
@@ -1,42 +1,42 @@
1
- # AbDarkModeToggler — AI Reference
2
-
3
- Light / dark theme toggle. Pairs with the `useTheme()` composable — clicking the toggle flips the current theme.
4
-
5
- ## Installation
6
-
7
- Globally registered by the plugin. Uses the `useTheme` composable internally.
8
-
9
- ## Usage
10
-
11
- ```vue
12
- <template>
13
- <ab-dark-mode-toggler size="md" />
14
-
15
- <!-- Custom icons -->
16
- <ab-dark-mode-toggler size="lg">
17
- <template #dark-icon><i class="bi bi-sun"></i></template>
18
- <template #light-icon><i class="bi bi-moon-stars"></i></template>
19
- </ab-dark-mode-toggler>
20
- </template>
21
- ```
22
-
23
- ## Props
24
-
25
- | Name | Type | Default | Description |
26
- | --- | --- | --- | --- |
27
- | `size` | `String` | `"md"` | One of: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
28
-
29
- ## Events
30
-
31
- None.
32
-
33
- ## Slots
34
-
35
- | Name | Description |
36
- | --- | --- |
37
- | `dark-icon` | Icon shown when the current theme is dark (typically a sun). |
38
- | `light-icon` | Icon shown when the current theme is light (typically a moon). |
39
-
40
- ## Related
41
-
42
- - `useTheme()` composable exposes `isDarkMode`, `toggleTheme()`, `setTheme()`.
1
+ # AbDarkModeToggler — AI Reference
2
+
3
+ Light / dark theme toggle. Pairs with the `useTheme()` composable — clicking the toggle flips the current theme.
4
+
5
+ ## Installation
6
+
7
+ Globally registered by the plugin. Uses the `useTheme` composable internally.
8
+
9
+ ## Usage
10
+
11
+ ```vue
12
+ <template>
13
+ <ab-dark-mode-toggler size="md" />
14
+
15
+ <!-- Custom icons -->
16
+ <ab-dark-mode-toggler size="lg">
17
+ <template #dark-icon><i class="bi bi-sun"></i></template>
18
+ <template #light-icon><i class="bi bi-moon-stars"></i></template>
19
+ </ab-dark-mode-toggler>
20
+ </template>
21
+ ```
22
+
23
+ ## Props
24
+
25
+ | Name | Type | Default | Description |
26
+ | --- | --- | --- | --- |
27
+ | `size` | `String` | `"md"` | One of: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
28
+
29
+ ## Events
30
+
31
+ None.
32
+
33
+ ## Slots
34
+
35
+ | Name | Description |
36
+ | --- | --- |
37
+ | `dark-icon` | Icon shown when the current theme is dark (typically a sun). |
38
+ | `light-icon` | Icon shown when the current theme is light (typically a moon). |
39
+
40
+ ## Related
41
+
42
+ - `useTheme()` composable exposes `isDarkMode`, `toggleTheme()`, `setTheme()`.
@@ -83,6 +83,9 @@ const datetime = ref(null);
83
83
  | `minuteStep` | `Number` | `1` | Minute increment. |
84
84
  | `isLeftIconBorder` | `Boolean` | `false` | Border on prefix icon. |
85
85
  | `isRightIconBorder` | `Boolean` | `false` | Border on suffix icon. |
86
+ | `isHideLabel` | `Boolean` | `false` | Hide the label visually. |
87
+ | `defaultIconPosition` | `String` | `"right"` | Position of the default calendar/clock icon. |
88
+ | `iconPosition` | `String` | `"right"` | Position of the custom `#icon` slot. |
86
89
 
87
90
  ## Events
88
91