@appsbd/vue3-appsbd-ui 1.0.18 → 1.0.19

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.
@@ -2,13 +2,18 @@
2
2
 
3
3
  Bootstrap badge wrapper for statuses or counts with size, variant, shape, and icon variations.
4
4
 
5
+ **Default variant is `solid`** — when asked to generate `AbBadge` with no specific style requested, generate it as-is (don't pass `variant` at all) and it renders as a plain filled badge, the way it's used everywhere in this library.
6
+
5
7
  ## Usage
6
8
 
7
9
  ```vue
8
10
  <template>
11
+ <!-- Default: solid variant (no variant prop needed) -->
9
12
  <ab-badge color="primary">New</ab-badge>
10
13
  <ab-badge color="success" is-rounded-pill>12</ab-badge>
11
- <ab-badge color="warning" is-outline>Pending</ab-badge>
14
+
15
+ <!-- Outline variant -->
16
+ <ab-badge color="warning" variant="outline">Pending</ab-badge>
12
17
  </template>
13
18
  ```
14
19
 
@@ -18,7 +23,8 @@ Bootstrap badge wrapper for statuses or counts with size, variant, shape, and ic
18
23
  | --- | --- | --- | --- |
19
24
  | `size` | `String` | `"md"` | Size of the badge (`sm`, `md`, `lg`). |
20
25
  | `color` | `String` | `"primary"` | Color theme (`primary`, `secondary`, `danger`, `warning`, `success`, `info`). |
21
- | `isOutline` | `Boolean` | `false` | Outlined style with transparent background. |
26
+ | `variant` | `String` | `"solid"` | Design variant — `"solid"` (plain filled badge) or `"outline"` (bordered, transparent background; matches `isOutline`). |
27
+ | `isOutline` | `Boolean` | `false` | Deprecated — equivalent to `variant="outline"`, kept for backward compatibility. Prefer `variant="outline"` in new code. |
22
28
  | `isRoundedPill` | `Boolean` | `false` | Transforms badge to a fully rounded pill shape. |
23
29
  | `isDot` | `Boolean` | `false` | Prepends a dot indicator layout. |
24
30
  | `isAdd` | `Boolean` | `false` | Adjusts styling for an add/plus icon badge. |
@@ -2,13 +2,17 @@
2
2
 
3
3
  Customizable button with optional loader animation and leading icon slot.
4
4
 
5
+ **Default variant is `solid`** — when asked to generate `AbButton` with no specific style requested, generate it as-is (don't pass `variant` at all) and it renders as a plain filled button, the way it's used everywhere in this library.
6
+
5
7
  ## Usage
6
8
 
7
9
  ```vue
8
10
  <template>
11
+ <!-- Default: solid variant (no variant prop needed) -->
9
12
  <ab-button color="primary">Save</ab-button>
10
13
 
11
- <ab-button color="secondary" is-outline show-icon-divider>
14
+ <!-- Outline variant -->
15
+ <ab-button color="secondary" variant="outline" show-icon-divider>
12
16
  <template #icon><i class="bi bi-plus-lg"></i></template>
13
17
  New Item
14
18
  </ab-button>
@@ -31,8 +35,9 @@ const isSaving = ref(false);
31
35
  | `mode` | `String` | `"button"` | Sets the root tag (`button`, `link`, `router-link`). |
32
36
  | `type` | `String` | `"button"` | Native button type (`button`, `submit`, `reset`). |
33
37
  | `color` | `String` | `"primary"` | Color variant (primary, secondary, success, danger, warning, info, light, dark). |
38
+ | `variant` | `String` | `"solid"` | Design variant — `"solid"` (plain filled button) or `"outline"` (border-only, matches `isOutline`). Drives which class is generated for `color` (e.g. `"outline"` → `btn-outline-{color}`). |
34
39
  | `size` | `String` | `"md"` | Button size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
35
- | `isOutline` | `Boolean` | `false` | Applies the outline style for the selected color. |
40
+ | `isOutline` | `Boolean` | `false` | Deprecated — equivalent to `variant="outline"`, kept for backward compatibility. Prefer `variant="outline"` in new code. |
36
41
  | `isIconBtn` | `Boolean` | `false` | Formats the button styling for a single icon. |
37
42
  | `isRounded` | `Boolean` | `false` | Applies a fully rounded, pill-like border radius to the button. |
38
43
  | `isAnimated` | `Boolean` | `false` | When `true`, renders the loader SVG and optionally hides the label. |
@@ -1,33 +1,30 @@
1
1
  # AbCard — AI Reference
2
2
 
3
- 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.
3
+ Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual variations (`tile-card`, `item-card`, `insight-card`, …) are applied through CSS classes rather than separate components.
4
+
5
+ **Default variant is `default`** (a plain card, no layout class) — when asked to generate `AbCard` with no specific style requested, generate it as-is (don't pass `variant` at all).
4
6
 
5
7
  ## Props
6
8
 
7
9
  | Name | Type | Default | Description |
8
10
  | --- | --- | --- | --- |
9
- | `containerClass` | `String` | `undefined` | CSS class applied to the card root. |
11
+ | `containerClass` | `String` | `undefined` | CSS class applied to the card root. General-purpose — also still the way to reach a custom, one-off class that isn't one of the built-in `variant` values. |
10
12
  | `headerClass` | `String` | `""` | CSS class for the header section. |
11
13
  | `bodyClass` | `String` | `""` | CSS class for the body section. |
12
14
  | `footerClass` | `String` | `""` | CSS class for the footer section. |
15
+ | `variant` | `String` | `"default"` | Design variant — `"default"` (plain card), `"tile"` (→ `.tile-card`, stat blocks), `"item"` (→ `.item-card`, list rows), or `"insight"` (→ `.insight-card`, insight panels). |
13
16
  | `isBorderCard` | `Boolean` | `true` | Whether to display the default card border. |
14
17
  | `bgColorVariant` | `String` | `""` | Bootstrap color variant for background (`primary`, `success`, etc.). |
15
18
  | `borderBottomVariant` | `String` | `""` | Adds a colored bottom border with the specified variant. |
16
- | `isTileCard` | `Boolean` | `false` | Applies the `.tile-card` layout styles. |
19
+ | `isTileCard` | `Boolean` | `false` | Deprecated — equivalent to `variant="tile"`, kept for backward compatibility. Prefer `variant="tile"` in new code. |
17
20
  | `showBorder` | `Boolean` | `false` | Whether to display the header and footer borders. |
18
- | `variation` | `String` | `""` | Generic variation class to append to the root. |
21
+ | `variation` | `String` | `""` | Generic escape hatch: any string passed here is appended as a raw class on the root, unvalidated — for one-off/custom classes beyond the four `variant` values. |
19
22
 
20
23
  ## Usage
21
24
 
22
25
  ```vue
23
26
  <template>
24
- <ab-card is-tile-card :is-border-card="false">
25
- <template #body>
26
- <span class="tile-title">Total Revenue</span>
27
- <span class="tile-value">$12,480</span>
28
- </template>
29
- </ab-card>
30
-
27
+ <!-- Default: plain card (no variant prop needed) -->
31
28
  <ab-card container-class="shadow-sm" border-bottom-variant="primary" header-class="bg-light">
32
29
  <template #header>Card Title</template>
33
30
  <template #body>Card Content</template>
@@ -35,6 +32,25 @@ Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual
35
32
  <ab-button size="sm">Action</ab-button>
36
33
  </template>
37
34
  </ab-card>
35
+
36
+ <!-- Tile variant: high-level stat blocks -->
37
+ <ab-card variant="tile" :is-border-card="false">
38
+ <template #body>
39
+ <span class="tile-title">Total Revenue</span>
40
+ <span class="tile-value">$12,480</span>
41
+ </template>
42
+ </ab-card>
43
+
44
+ <!-- Item variant: flexible list-row layout -->
45
+ <ab-card variant="item">
46
+ <template #body>...</template>
47
+ </ab-card>
48
+
49
+ <!-- Insight variant: insight/suggestion panel -->
50
+ <ab-card variant="insight">
51
+ <template #header>...</template>
52
+ <template #body>...</template>
53
+ </ab-card>
38
54
  </template>
39
55
  ```
40
56
 
@@ -48,4 +64,4 @@ Bootstrap-style card container with `header`, `body`, and `footer` slots. Visual
48
64
 
49
65
  ## Notes
50
66
 
51
- 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`.
67
+ Do **not** create a new `.vue` file for card variations — define the variant as a CSS class in `src/styles/components/_card.scss` and expose it through the `variant` enum (or `containerClass`/`variation` for a one-off class).
@@ -21,11 +21,26 @@ Confirmation popover with an async `onConfirm` handler and built-in loader. Usef
21
21
  <script setup>
22
22
  async function handleDelete(record) {
23
23
  await api.delete(record.id);
24
- // loader and popover close handled by the component
24
+ // loader is handled by the component; returning nothing here closes the
25
+ // popover automatically — see "onConfirm return contract" below for the
26
+ // other return shapes (chaining a second confirm step, a success/error alert).
25
27
  }
26
28
  </script>
27
29
  ```
28
30
 
31
+ ## `onConfirm` return contract
32
+
33
+ `onConfirm(itemData)` is awaited; what it resolves to (or throws) decides what happens next:
34
+
35
+ | Resolves to | Result |
36
+ | --- | --- |
37
+ | Nothing (`undefined`/`null`) — the common case, a plain `async () => { await doWork(); }` | Popover closes. |
38
+ | `{ next: 'close' }` | Popover closes (same as returning nothing; use when you also want to pass through other fields, but no other field is read here). |
39
+ | `{ next: 'confirm', title?, message?, icon?, confirmText?, cancelText?, onConfirm? }` | Popover swaps to a new `type: "confirm"` step (Cancel button shown) — for a secondary confirmation. |
40
+ | `{ next: 'confirm-ajax', ...same fields, onConfirm }` | Same as above but `type: "confirm-ajax"` for the next step. |
41
+ | Any other truthy object, e.g. `{ status: true \| false, message? }` | Popover swaps to a terminal `type: "alert"` panel (icon/color from `status`, message from `message`/`msg`, default "Completed successfully" / falls back to "Something went wrong" when `status === false`) — the user must click OK to dismiss. Use this only when you deliberately want that extra confirmation screen. |
42
+ | Throws | Popover shows an `type: "alert"` error panel ("Unexpected error"), dismissed by OK. |
43
+
29
44
  ## Props
30
45
 
31
46
  | Name | Type | Default | Description |
@@ -1,6 +1,6 @@
1
1
  # AbField — AI Reference
2
2
 
3
- Polymorphic field wrapper — renders text, textarea, select, multiselect, tag, checkbox, radio, toggle, or switch based on the `type` prop.
3
+ Polymorphic field wrapper — renders text, textarea, select, multiselect, tag, checkbox, radio, toggle, or switch based on the `type` prop. For `type="number"` it renders `AbInputField` (a plain native number input by default); add `variant="stepper"` to get `AbInputField`'s numeric-stepper behavior (min/max/step clamping, +/- buttons) instead.
4
4
 
5
5
  ## Usage
6
6
 
@@ -29,6 +29,26 @@ Polymorphic field wrapper — renders text, textarea, select, multiselect, tag,
29
29
  </template>
30
30
  ```
31
31
 
32
+ Number field — plain by default, stepper via `variant`:
33
+
34
+ ```vue
35
+ <template>
36
+ <!-- Plain native number input (default) -->
37
+ <ab-field type="number" v-model="form.age" name="age" label="Age" />
38
+
39
+ <!-- Numeric stepper: +/- buttons, min/max/step clamping -->
40
+ <ab-field
41
+ type="number"
42
+ variant="stepper"
43
+ v-model="form.qty"
44
+ name="qty"
45
+ label="Quantity"
46
+ :min="1"
47
+ :max="10"
48
+ />
49
+ </template>
50
+ ```
51
+
32
52
  ## Props
33
53
 
34
54
  | Name | Type | Default | Description |
@@ -50,7 +70,7 @@ Polymorphic field wrapper — renders text, textarea, select, multiselect, tag,
50
70
  | `options` | `Array` | `[]` | Options for select / checkbox / radio. |
51
71
  | `labelKey` | `String` | `"title"` | Option label property. |
52
72
  | `valueKey` | `String` | `"val"` | Option value property. |
53
- | `max` | `Number` | `-1` | Max selections (multiselect/tag); `-1` = unlimited. |
73
+ | `max` | `Number` | `-1` | Max selections (multiselect/tag); `-1` = unlimited. For a `type="number"` field, this doubles as the stepper's numeric ceiling (`min`/`max`/`step` clamping) — `-1`/unset means no ceiling. |
54
74
  | `size` | `String` | `undefined` | Field size. |
55
75
  | `object` | `Boolean` | `false` | Return full objects instead of values (multiselect). |
56
76
  | `searchable` | `Boolean` | `false` | Enable search (select). |
@@ -70,6 +90,11 @@ Polymorphic field wrapper — renders text, textarea, select, multiselect, tag,
70
90
  | `hideSelected` | `Boolean` | `true` | Hide already-selected items from dropdown. |
71
91
  | `loading` | `Boolean` | `false` | Show a loading spinner. |
72
92
  | `appendToBody` | `Boolean` | `true` | Teleport the dropdown to `<body>`. |
93
+ | `variant` | `String` | `undefined` | `type="number"` only. `"stepper"` renders `AbInputField`'s numeric stepper (forces a native number input, shows minus/plus buttons, enables `min`/`max`/`step` clamping) instead of a plain number input. |
94
+ | `min` | `Number \| String` | `null` | `type="number"` only. Minimum allowed value (native constraint always; also clamped + disables the minus button when `variant="stepper"`). |
95
+ | `step` | `Number \| String` | `1` | `type="number"` only. Increment/decrement amount (stepper variant) / native `step` attribute. |
96
+ | `showButtons` | `Boolean` | `true` | `type="number"` + `variant="stepper"` only. Whether to render the minus/plus buttons. |
97
+ | `isBorder` | `Boolean` | `false` | `type="number"` + `variant="stepper"` only. Show inner borders between minus/input/plus. Default is a seamless pill. |
73
98
 
74
99
  ## Events
75
100
 
@@ -101,7 +101,7 @@ item). If different options need different content, branch inside the template o
101
101
  <ab-form-check variant="card" :options="plans" v-model="plan" type="radio" name="plan">
102
102
  <template #option-label="{ check }">
103
103
  <template v-if="check.val === 'pro'">
104
- <ab-badge variant="danger">Popular</ab-badge> {{ check.title }}
104
+ <ab-badge color="danger">Popular</ab-badge> {{ check.title }}
105
105
  </template>
106
106
  <template v-else>{{ check.title }}</template>
107
107
  </template>
@@ -1,6 +1,6 @@
1
1
  # AbInputField — AI Reference
2
2
 
3
- Core text input with VeeValidate integration, localized feedback, and prefix/postfix/hint slots. Use for single-line text inputs; use `AbField` for a polymorphic field that can render selects, toggles, etc.
3
+ Core text input with VeeValidate integration, localized feedback, and prefix/postfix/hint slots. Use for single-line text inputs; use `AbField` for a polymorphic field that can render selects, toggles, etc. Pass `variant="stepper"` to turn it into a numeric stepper input (min/max/step clamping, +/- buttons) — this replaces the deprecated `AbNumberField`.
4
4
 
5
5
  ## Usage
6
6
 
@@ -24,6 +24,54 @@ const form = reactive({ email: '' });
24
24
  </script>
25
25
  ```
26
26
 
27
+ Stepper variant:
28
+
29
+ ```vue
30
+ <template>
31
+ <ab-input-field
32
+ v-model="qty"
33
+ variant="stepper"
34
+ name="quantity"
35
+ label="Quantity"
36
+ :min="1"
37
+ :max="10"
38
+ :step="1"
39
+ hints="Clamped between 1 and 10"
40
+ />
41
+
42
+ <!-- Inner borders between minus/input/plus -->
43
+ <ab-input-field v-model="qty" variant="stepper" name="quantity2" label="Quantity" is-border />
44
+ </template>
45
+
46
+ <script setup>
47
+ import { ref } from 'vue';
48
+ const qty = ref(1);
49
+ </script>
50
+ ```
51
+
52
+ Copyable (read-only value with a copy-to-clipboard button — no built-in confirmation UI, wire your own via the `copy-success`/`copy-error` events):
53
+
54
+ ```vue
55
+ <template>
56
+ <ab-input-field
57
+ v-model="apiKey"
58
+ name="api_key"
59
+ label="API Key"
60
+ readonly
61
+ copyable
62
+ @copy-success="(msg) => toast.success(msg)"
63
+ @copy-error="(msg) => toast.error(msg)"
64
+ />
65
+ </template>
66
+
67
+ <script setup>
68
+ import { ref } from 'vue';
69
+ import { useToast } from 'vue3-appsbd-ui';
70
+ const apiKey = ref('sk_live_...');
71
+ const { toast } = useToast();
72
+ </script>
73
+ ```
74
+
27
75
  ## Props
28
76
 
29
77
  | Name | Type | Default | Description |
@@ -33,7 +81,7 @@ const form = reactive({ email: '' });
33
81
  | `placeholder` | `String` | `""` | Input placeholder. |
34
82
  | `type` | `String` | `"text"` | Native input type (`text`, `email`, `password`, `number`, `tel`, …). |
35
83
  | `name` | `String` | `""` | VeeValidate field name. |
36
- | `isCodeInput` | `Boolean` | `false` | Applies monospace / code-input styling. |
84
+ | `isCodeInput` | `Boolean` | `false` | Renders a small, fixed-size, large-type single-character box — the same `.mega-input-field` style `AbPinInput` uses per digit. For one OTP/PIN digit only; pair with `maxlength="1"` yourself (not set automatically). Not a monospace/code-display style — too narrow for a token, key, or URL, which will visually scroll inside the box. |
37
85
  | `size` | `String` | `undefined` | Adjusts component size (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`). |
38
86
  | `rules` | `String \| Object` | `""` | VeeValidate rules. |
39
87
  | `containerClass` | `String` | `undefined` | Class on the wrapper `<div>`. |
@@ -53,6 +101,15 @@ const form = reactive({ email: '' });
53
101
  | `iconPosition` | `String` | `undefined` | Position of the custom `#icon` slot (`"left"`, `"right"`). |
54
102
  | `inputClass` | `String \| Object \| Array` | `undefined` | Additional class(es) for the input element. |
55
103
  | `inputStyle` | `String \| Object \| Array` | `undefined` | Additional style(s) for the input element. |
104
+ | `variant` | `String` | `undefined` | Layout variant. `"stepper"` renders a numeric stepper (forces `type="number"`, shows +/- buttons, enables `min`/`max`/`step` clamping). |
105
+ | `min` | `Number \| String` | `null` | *(stepper variant)* Minimum allowed value. Clamps input and disables the minus button at the floor. |
106
+ | `max` | `Number \| String` | `null` | *(stepper variant)* Maximum allowed value. Clamps input and disables the plus button at the ceiling. |
107
+ | `step` | `Number \| String` | `1` | *(stepper variant)* Increment/decrement amount. |
108
+ | `showButtons` | `Boolean` | `true` | *(stepper variant)* Render the minus/plus controls. |
109
+ | `isBorder` | `Boolean` | `false` | *(stepper variant)* Show inner borders between minus/input/plus. Default is a seamless pill. |
110
+ | `copyable` | `Boolean` | `false` | Renders a plain, borderless postfix button that copies the current value to the clipboard (via the Clipboard API). No built-in confirmation UI — listen for `copy-success`/`copy-error` to show your own (e.g. `useToast()`). Pair with a native `readonly` attribute for a display-only copyable value — there is no built-in read-only mode, `readonly`/`disabled` fall through to the native input via `$attrs`. |
111
+ | `copySuccessMsg` | `String` | `"Copied to clipboard"` | Message text passed to the `copy-success` event after a successful copy (`copyable` only). Runs through the same translation pipeline as `label`/`hints`. |
112
+ | `copyErrorMsg` | `String` | `"Failed to copy"` | Message text passed to the `copy-error` event when copying fails, e.g. the Clipboard API is unavailable outside a secure context (`copyable` only). |
56
113
 
57
114
  ## Events
58
115
 
@@ -63,6 +120,8 @@ const form = reactive({ email: '' });
63
120
  | `keyup` | `KeyboardEvent` | Forwarded native event. |
64
121
  | `keydown` | `KeyboardEvent` | Forwarded native event. |
65
122
  | `paste` | `ClipboardEvent` | Forwarded native event. |
123
+ | `copy-success` | `(message: String, value: String)` | *(`copyable` only)* Fired after a successful clipboard write. `message` is the already-translated `copySuccessMsg` — hand it directly to your own confirmation UI. |
124
+ | `copy-error` | `(message: String, error: Error)` | *(`copyable` only)* Fired when the clipboard write fails (e.g. Clipboard API unavailable outside a secure context). `message` is the already-translated `copyErrorMsg`. |
66
125
 
67
126
  ## Slots
68
127
 
@@ -9,8 +9,8 @@ Full-featured dialog with a built-in VeeValidate `<Form>`, loader overlay, and "
9
9
  <ab-button class="btn-primary" @click="isOpen = true">Open</ab-button>
10
10
 
11
11
  <ab-modal
12
+ v-if="isOpen"
12
13
  ref="modal"
13
- v-model:is-modal-visible="isOpen"
14
14
  modal-size="modal-lg"
15
15
  @on-submit="handleSubmit"
16
16
  @close="isOpen = false"
@@ -47,7 +47,6 @@ async function handleSubmit(values, { resetForm }) {
47
47
 
48
48
  | Name | Type | Default | Description |
49
49
  | --- | --- | --- | --- |
50
- | `isModalVisible` | `Boolean` | — | Visibility state (`v-model:is-modal-visible`). |
51
50
  | `modalSize` | `String` | `""` | Bootstrap size class (`modal-sm`, `modal-lg`, `modal-xl`). |
52
51
  | `modalMsg` | `[String, Object]` | `{}` | Default message for message-only mode. |
53
52
  | `hideHeader` | `Boolean` | `false` | Hide the header section. |
@@ -92,9 +91,13 @@ async function handleSubmit(values, { resetForm }) {
92
91
  | `close()` | Close the modal. |
93
92
  | `clearForm()` | Reset the VeeValidate form and close. |
94
93
  | `returnClear()` | Reset the form without closing. |
95
- | `showMsgOnly(msg, isHideFooter?)` | Switch to message-only mode. |
94
+ | `showMsgOnly(msg, isHideFooter?)` | Switch to message-only mode, replacing the body with `AbResponseMsg` rendering `msg`. `isHideFooter: true` swaps the footer for a single static "Close" button (`close()`) instead of the default/slotted footer — it does **not** auto-dismiss the modal; without user action the modal stays open indefinitely. |
96
95
  | `setMessageOnly(status)` | Toggle message-only mode programmatically. |
97
96
 
97
+ ## v-model
98
+
99
+ None — there is no internal show/hide state. Mount/unmount the whole component with `v-if` (or `v-show`) on a boolean in the parent, as shown in Usage above.
100
+
98
101
  ## Notes
99
102
 
100
103
  Use `AbEasyModal` when you only need a simple trigger-and-close dialog without a form.
@@ -1,5 +1,7 @@
1
1
  # AbNumberField — AI Reference
2
2
 
3
+ > **Deprecated.** `AbNumberField` is now a thin wrapper around [`AbInputField`](./ai_ref_AbInputField.md) with `variant="stepper"`. It is kept for backward compatibility and still works exactly as documented below, but prefer `<ab-input-field variant="stepper" ... />` in new code.
4
+
3
5
  Numeric input with minus/plus buttons, min/max clamping, custom step, and VeeValidate integration. Renders as a seamless pill by default; pass `is-border` to show internal dividers between buttons and input.
4
6
 
5
7
  ## Usage
@@ -2,16 +2,25 @@
2
2
 
3
3
  Parent container for tabbed interfaces. Pair with `AbTab` children. Supports content-switching mode (default) and router-link mode for navigation-driven tabs.
4
4
 
5
+ **Default variation is `outline`** — when asked to generate `AbTabs` with no specific style requested, generate it as-is (don't pass `variation` at all) and it renders with the outlined design.
6
+
5
7
  ## Usage
6
8
 
7
9
  ```vue
8
10
  <template>
9
- <ab-tabs nav-class="nav-pills">
11
+ <!-- Default: outline variation (no props needed) -->
12
+ <ab-tabs>
10
13
  <ab-tab title="Overview" selected>Overview content</ab-tab>
11
14
  <ab-tab title="Billing">Billing content</ab-tab>
12
15
  <ab-tab title="Security">Security content</ab-tab>
13
16
  </ab-tabs>
14
17
 
18
+ <!-- Other variation -->
19
+ <ab-tabs variation="pills">
20
+ <ab-tab title="Overview" selected>Overview content</ab-tab>
21
+ <ab-tab title="Billing">Billing content</ab-tab>
22
+ </ab-tabs>
23
+
15
24
  <ab-tabs is-route-mode>
16
25
  <ab-tab title="Users" :to="{ name: 'users' }" />
17
26
  <ab-tab title="Teams" :to="{ name: 'teams' }" />
@@ -26,7 +35,8 @@ Parent container for tabbed interfaces. Pair with `AbTab` children. Supports con
26
35
  | `tabContainerClass` | `String` | — | Root wrapper class. |
27
36
  | `navContainerClass` | `String` | — | Wrapper around the nav list. |
28
37
  | `tabDetailsClass` | `String` | — | Wrapper around the tab content. |
29
- | `navClass` | `String` | `"nav-pills"` | Class on the nav list itself (e.g. `nav-tabs`, `nav-pills`). |
38
+ | `variation` | `String` | `"outline"` | Design variation of the nav. Generates a `nav-{variation}` class automatically — e.g. `"outline"` → `nav-outline`, `"pills"` → `nav-pills`, `"underline"` → `nav-underline`, `"bg-secondary"` → `nav-bg-secondary`. Pass `""` to skip auto-generation and rely on `navClass` only. |
39
+ | `navClass` | `String` | `""` | Extra classes on the nav list, merged after the `variation` class — use for size (`nav-xs`/`nav-md`/`nav-lg`/`nav-xl`), layout (`nav-fill`, `nav-vertical`), or color (`nav-secondary`) modifiers. |
30
40
  | `tabClass` | `String` | `""` | Class on each individual tab link. |
31
41
  | `isRouteMode` | `Boolean` | `false` | When `true`, tab clicks perform router navigation. |
32
42
 
@@ -0,0 +1,212 @@
1
+ # EliteGrid — AI Reference
2
+
3
+ > **External dependency, not developed in this library.** `EliteGrid` ships from the separate `@appsbd/vue3-elite-grid` package (peer dependency, `>=2.0.4`) — it is only *imported* and demonstrated here (`playground/components/EliteGridTest.vue`), not authored or maintained in this repo's `src/`. Prefer an `Ab*` component when one covers the need (see `AbTable` for a simpler, in-library data grid); reach for `EliteGrid` only for the advanced data-grid features below (grouping, subrows, card view, column chooser) that `AbTable` doesn't have.
4
+ >
5
+ > This file mirrors the package's own docs at <https://apps.inotise.com/projects/elite-grid-docs/> (EliteGrid v2.0) — re-check that site if behavior here seems stale, since this library does not control its release cycle.
6
+
7
+ A feature-rich, CSS-variable-themeable data grid: pagination, column sorting, row grouping, row checkboxes with selection tracking, an actions column, card-view responsive layout, and recursive subrow (tree-grid) expansion.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @appsbd/vue3-elite-grid
13
+ npm install vue3-gettext shvl
14
+ ```
15
+
16
+ Requires `vue3-gettext` and `shvl` as its own peer dependencies (separate from this library's). Import the CSS once (already done for you if only using it via this library's playground):
17
+
18
+ ```js
19
+ import EliteGrid from '@appsbd/vue3-elite-grid';
20
+ import '@appsbd/vue3-elite-grid/dist/elite-grid.css';
21
+ // or, per the package's own docs: '@appsbd/vue3-elite-grid/elite-grid.css'
22
+ ```
23
+
24
+ It is **not** globally registered by this library's `install()` — import and use it (or its `EliteColumnModel` helper) directly per-component, as `EliteGridTest.vue` does.
25
+
26
+ ## Usage
27
+
28
+ ```vue
29
+ <template>
30
+ <elite-grid
31
+ :grid-data="gridData"
32
+ :columns="columns"
33
+ :is-show-row-index-column="true"
34
+ :is-show-row-checkbox="true"
35
+ selected-prop="email"
36
+ :show-action-column="true"
37
+ action-width="100px"
38
+ @loadData="loadData"
39
+ @selectionChange="handleSelection"
40
+ >
41
+ <template #actionProperty="{ rowitem }">
42
+ <ab-button class="btn-xs btn-primary" @click="edit(rowitem)">Edit</ab-button>
43
+ </template>
44
+ </elite-grid>
45
+ </template>
46
+
47
+ <script setup>
48
+ import { ref } from 'vue';
49
+ import EliteGrid, { EliteColumnModel } from '@appsbd/vue3-elite-grid';
50
+ import '@appsbd/vue3-elite-grid/dist/elite-grid.css';
51
+
52
+ const gridData = ref({ page: 1, total: 1, records: 0, limit: 10, rowdata: [] });
53
+
54
+ const columns = [
55
+ EliteColumnModel.getColumn({ name: 'name', title: 'Name' }),
56
+ EliteColumnModel.getColumn({ name: 'email', title: 'Email', align: 'center' }),
57
+ ];
58
+
59
+ function loadData({ page, limit }) {
60
+ // fetch page/limit worth of rows, then assign to gridData.value.rowdata (+ total/records)
61
+ }
62
+
63
+ function handleSelection(selectedRows) {
64
+ // selectedRows: values of each selected row's `selected-prop` field (or full row objects if unset)
65
+ }
66
+ </script>
67
+ ```
68
+
69
+ Grouping (any column with `is_group_by: true`) and recursive subtrees (`subrow-prop` + `subrow-icon-column`) are opt-in via column config / props — see the three worked variants in `playground/components/EliteGridTest.vue` (Default, Group By, Subtree).
70
+
71
+ ## Props
72
+
73
+ | Name | Type | Default | Description |
74
+ | --- | --- | --- | --- |
75
+ | `gridData` | `Object` | `{ page:1, total:1, records:0, limit:0, rowdata:[] }` | Main data object: pagination state + row array. |
76
+ | `columns` | `Array` | `[]` | Column definitions, each built via `EliteColumnModel.getColumn()` (see below). |
77
+ | `showHeader` | `Boolean` | `false` | Show the grid header slot area (`#slot-header`). |
78
+ | `isRounded` | `Boolean` | `true` | Rounded corners on the grid container. |
79
+ | `showLoader` | `Boolean` | `false` | Show a loading overlay (content via `#slot-loader`). |
80
+ | `showActionColumn` | `Boolean` | `false` | Show a rightmost actions column. |
81
+ | `actionTitle` | `String` | `"Action"` | Actions column header text. |
82
+ | `actionWidth` | `String` | `""` | CSS width for the actions column. |
83
+ | `isShowRowIndexColumn` | `Boolean` | `true` | Show the row index column (1, 2, 3…). |
84
+ | `isShowRowCheckbox` | `Boolean` | `false` | Show a checkbox selection column. |
85
+ | `checkboxClass` | `String` | `""` | CSS class applied to every checkbox. |
86
+ | `selectedProp` | `String` | `""` | Row property used as each selected row's value (e.g. `"id"`); omit to get full row objects in `selectionChange`. |
87
+ | `getRowClass` | `Function` | `(row, i) => ""` | Returns a CSS class string per row. |
88
+ | `oddColor` | `String` | `"inherit"` | Odd row background color. |
89
+ | `evenColor` | `String` | `"inherit"` | Even row background color. |
90
+ | `hoverColor` | `String` | `"#fbfbfb"` | Row hover background color. |
91
+ | `hidePagination` | `Boolean` | `false` | Hide the entire pagination bar. |
92
+ | `hidePageList` | `Boolean` | `false` | Hide the page-number buttons. |
93
+ | `hideRecordInfo` | `Boolean` | `false` | Hide the "Viewing X to Y of Z" text. |
94
+ | `hideLimitSelector` | `Boolean` | `false` | Hide the rows-per-page dropdown. |
95
+ | `limitList` | `Array` | `[10,20,50,100,200]` | Rows-per-page options. |
96
+ | `paginationLength` | `Number` | `5` | Max page-number buttons shown at once. |
97
+ | `paginationPosition` | `String` | `"right"` | `"right"` or `"left"` alignment for the pagination bar. |
98
+ | `isGroupSeparateHead` | `Boolean` | `false` | Repeat the header row inside every group (used with `is_group_by`). |
99
+ | `isCardView` | `Boolean` | `false` | Render rows as cards instead of a table. |
100
+ | `cardColumn` | `Number \| Array` | `3` | Card columns; an array is responsive `[xs,sm,md,lg,xl,xxl]`. |
101
+ | `cardItemBorderRadius` | `String` | — | Border radius for card items (card view only; e.g. `"8px"`). |
102
+ | `cardItemGap` | `String` | — | Gap between card items (card view only; e.g. `"20px"`). |
103
+ | `subrowProp` | `String` | `""` | Row property holding a nested children array (enables tree-grid subrows). |
104
+ | `subrowIconColumn` | `String` | `""` | Column name that renders the expand/collapse chevron icon. |
105
+ | `subrowDefaultExpanded` | `Boolean` | `false` | Expand every subrow by default, globally. |
106
+ | `subrowExpandProp` | `String` | — | Row property to read/persist a row's own expanded state (per-row override of the global default). |
107
+
108
+ ## Events
109
+
110
+ | Event | Payload | Description |
111
+ | --- | --- | --- |
112
+ | `loadData` | `{ page, limit, sort_prop, sort_ord }` | Fired when new data is needed — pagination change or column sort. Fetch that page/limit (and apply sort) and assign the result into `gridData`. |
113
+ | `columnStatusChange` | `col` (column object) | Fired when a column's visibility is toggled via the built-in column-chooser (⚙ icon in the index header). |
114
+ | `selectionChange` | `selectedRows` (Array) | Fired when checkbox selection changes — array of `selectedProp` values, or full row objects if `selectedProp` is unset. |
115
+
116
+ ## Slots
117
+
118
+ | Name | Scope | Description |
119
+ | --- | --- | --- |
120
+ | `#slot{col.name}` (e.g. `#slotEmail`) | `{ rowitem, index, col, val }` | Custom cell renderer for a given column. |
121
+ | `#header-{col.name}` | `{ col }` | Custom header cell for a given column. |
122
+ | `#actionProperty` | `{ rowitem, index }` | Actions column content per row (only with `show-action-column`). |
123
+ | `#slot-header` | — | Grid header/toolbar area (requires `show-header`). |
124
+ | `#slot-loader` | — | Custom loading-overlay content (requires `show-loader`). |
125
+ | `#slot-no-record` | — | Custom "no records" message. |
126
+ | `#subrow-icon` | `{ isExpanded, rowitem }` | Custom expand/collapse icon (with `subrow-prop`). |
127
+ | `#groupTitle` | `{ groupitem }` | Custom group header content (with `is_group_by` columns). |
128
+ | `#eg_pg-status` | `{ startRecord, endRecord, totalRecord }` | Custom pagination status text (replaces "Viewing X to Y of Z"). |
129
+ | `#card-item` | `{ item, itemColumns }` | Override an entire card (card view only). |
130
+
131
+ Column/header slots also receive a deeply-injected **`toggle-subrow()`** method and **`is-subrow-expanded`** prop, letting you build your own manual expand/collapse trigger inside any column slot instead of relying on `subrow-icon-column`.
132
+
133
+ ## Column Model — `EliteColumnModel.getColumn(options)`
134
+
135
+ ```js
136
+ import { EliteColumnModel } from '@appsbd/vue3-elite-grid';
137
+
138
+ const columns = [
139
+ EliteColumnModel.getColumn({ name: 'id', title: 'ID', width: '50px' }),
140
+ EliteColumnModel.getColumn({ name: 'name', title: 'Name', is_sortable: true }),
141
+ EliteColumnModel.getColumn({ name: 'address.city', title: 'City', is_group_by: true }),
142
+ ];
143
+ ```
144
+
145
+ | Property | Type | Default | Description |
146
+ | --- | --- | --- | --- |
147
+ | `name` | `String` | `""` | Data key; supports dot notation for nested values (e.g. `"address.city"`). |
148
+ | `title` | `String` | `""` | Column header label. |
149
+ | `align` | `String` | `"left"` | Cell content alignment: `"left"`, `"center"`, `"right"`. |
150
+ | `title_align` | `String` | `"left"` | Header alignment: `"left"`, `"center"`, `"right"`. |
151
+ | `width` | `String` | `null` | CSS width (e.g. `"50px"`, `"20%"`). |
152
+ | `hidden_in` | `Array` | `[]` | Hide this column at these breakpoints: `["xs","sm","md","lg","xl","xxl"]`. |
153
+ | `default_show` | `Boolean` | `true` | Visible by default; toggleable later via the built-in column chooser. |
154
+ | `is_sortable` | `Boolean` | `false` | Enable click-to-sort on this column's header (cycles asc → desc → none, fires `loadData` with `sort_prop`/`sort_ord`). |
155
+ | `sort_order` | `String` | `"asc"` | Initial sort direction: `"asc"` or `"desc"`. |
156
+ | `is_group_by` | `Boolean` | `false` | Use this column as the row-grouping key (pairs with `is-group-separate-head`). |
157
+ | `tooltip` | `String` | `""` | Tooltip text shown next to the column header. |
158
+
159
+ ## Exposed methods
160
+
161
+ | Method | Description |
162
+ | --- | --- |
163
+ | `clearSelection()` | Clears the current checkbox selection. Call via a template ref, e.g. `this.$refs.myGrid.clearSelection()`. |
164
+
165
+ ## CSS Variables
166
+
167
+ Theme the grid by overriding these on `:root` or a parent wrapper — no `Ab*` design tokens apply here, it's a fully separate `--eg-*` variable set.
168
+
169
+ | Variable | Default | Category |
170
+ | --- | --- | --- |
171
+ | `--eg-font-family` | `Inter, sans-serif, Arial` | Typography |
172
+ | `--eg-font-style` | `normal` | Typography |
173
+ | `--eg-font-weight` | `500` | Typography |
174
+ | `--eg-font-size` | `12px` | Typography |
175
+ | `--eg-margin` | `0px -7px` | Typography |
176
+ | `--eg-bg` | `#fff` | Backgrounds |
177
+ | `--eg-hover-bg` | `#fbfbfb` | Backgrounds |
178
+ | `--eg-loader-bg` | `rgba(0, 0, 0, 0.65)` | Backgrounds |
179
+ | `--eg-row-odd-color` | `inherit` | Backgrounds |
180
+ | `--eg-row-even-color` | `inherit` | Backgrounds |
181
+ | `--eg-primary-color` | `#3b82f6` | Core Colors |
182
+ | `--eg-text-color` | `#374151` | Core Colors |
183
+ | `--eg-no-record-color` | `#cf0c0c` | Core Colors |
184
+ | `--eg-cell-header-color` | `#f9fafc` | Table |
185
+ | `--eg-row-group-title-color` | `#41444b` | Table |
186
+ | `--eg-cell-index-color` | `#7f848d` | Table |
187
+ | `--eg-header-tooltip` | `#9f641b` | Table |
188
+ | `--eg-cell-padding` | `5px` | Table |
189
+ | `--eg-border-radius` | `5px` | Borders |
190
+ | `--eg-table-border-color` | `#e2e8f0` | Borders |
191
+ | `--eg-pg-border-color` | `#ccc` | Pagination |
192
+ | `--eg-pg-btn-bg` | `#3e44cc` | Pagination |
193
+ | `--eg-pg-btn-color` | `#fff` | Pagination |
194
+ | `--eg-pg-shodow-color` | `#ccc` | Pagination |
195
+ | `--eg-pg-btn-action-size` | `40px` | Pagination |
196
+ | `--eg-pg-btn-size` | `30px` | Pagination |
197
+ | `--eg-pg-margin-top` | `10px` | Pagination |
198
+ | `--eg-pg-margin-bottom` | `10px` | Pagination |
199
+ | `--eg-shodow-color` | `#3e3e3e` | Shadows |
200
+ | `--eg-shodow-rule` | `0px 3px 10px -7px var(--eg-shodow-color)` | Shadows |
201
+ | `--eg-dropdown-bg` | `#ffffff` | Popovers |
202
+ | `--eg-tooltip-bg` | `#333333` | Popovers |
203
+ | `--eg-tooltip-color` | `#ffffff` | Popovers |
204
+ | `--eg-card-column` | `3` | Card View |
205
+ | `--eg-card-column-radius` | `5px` | Card View |
206
+ | `--eg-card-column-gap` | `15px` | Card View |
207
+ | `--eg-card-container-margin` | `15px` | Card View |
208
+
209
+ ## Notes
210
+
211
+ - Full worked examples (default table, `is_group_by` grouping, recursive `subrow-prop` subtree) live in `playground/components/EliteGridTest.vue`, importing `EliteGrid` and `EliteColumnModel` directly from `@appsbd/vue3-elite-grid`.
212
+ - Since this is an external package, its own version/CHANGELOG governs its API — this library's `CHANGELOG.md` only tracks changes to `Ab*` components and this playground's example usage, not `@appsbd/vue3-elite-grid` itself.
@@ -12,10 +12,19 @@
12
12
 
13
13
  ---
14
14
 
15
- ## [Unreleased]
15
+ ## [1.0.19] - 2026-09-14
16
16
 
17
17
  ### ⚠️ Action Required — Breaking
18
18
 
19
+ - **`AbTabs`'s default nav design changed from pills to outline; `navClass` default changed from `"nav-pills"` to `""`.**
20
+ - Find: `<AbTabs ...>` usages with **no** `nav-class`/`navClass` prop at all (relying on the old implicit `"nav-pills"` default).
21
+ - Replace: add `variation="pills"` to keep the previous pill-shaped appearance. No change needed if the outline look is acceptable, or if `nav-class`/`navClass` was already being passed explicitly (that keeps working unchanged, though switching it to the new `variation` prop — e.g. `nav-class="nav-pills nav-xs"` → `variation="pills" nav-class="nav-xs"` — is recommended, see below).
22
+ - See [`.ai/ai_ref_AbTabs.md`](./ai_ref_AbTabs.md) for the full `variation` → class mapping.
23
+
24
+ - **`AbModal`'s `isModalVisible` prop removed.**
25
+ - Find: `isModalVisible` / `is-modal-visible` / `v-model:is-modal-visible` on `<AbModal>`.
26
+ - Replace: nothing to migrate functionally — the prop never actually controlled visibility (it was dead/unwired). Control visibility the way every existing usage in this library already does: wrap `<AbModal>` itself in `v-if="isOpen"` in the parent. Just remove the prop/binding if present.
27
+
19
28
  - **`AbFilterPanel`'s standard-search and advance-search field layouts switched from a Bootstrap `.row`/`.col-*` grid to plain flex; `advanceContainerClass` default changed from `"col-6"` to `""`.**
20
29
  - Find: `<AbFilterPanel ...>` usages in either default (standard) mode or `is-advance`/`isAdvance` mode that relied on the Bootstrap grid for field widths — either the default 2-columns-per-row layout, or an explicit `advance-container-class`/`advanceContainerClass` Bootstrap grid class (e.g. `"col-12 col-sm-6"`).
21
30
  - Replace: nothing required to keep working — fields now lay out via flex (`flex: 1 1 240px`, wraps automatically), which also fixes long field labels getting clipped. A Bootstrap grid class passed to `advance-container-class` no longer has a `.row` ancestor to size against and should be replaced with either a plain width class/CSS, or the new `width` prop on the individual field component (`AbInputField`/`AbMultiSelect`/`AbDateTimePicker`) inside `filterOptions`.