@omnitend/dashboard-for-laravel 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,8 +10,10 @@ import type { Component } from "vue";
10
10
  * - `image` / `file` — file input (`image` additionally shows a preview).
11
11
  * - `component` — escape hatch that renders `field.component`.
12
12
  * - `repeater` — nested, repeatable sub-form driven by `field.fields`.
13
+ * - `switch` — a toggle checkbox with contextual on/off text and an
14
+ * on-state (filled) style; see `textWhenTrue` / `textWhenFalse`.
13
15
  */
14
- export type FieldType = "text" | "email" | "password" | "number" | "url" | "tel" | "date" | "datetime-local" | "datetime" | "time" | "currency" | "percentage" | "textarea" | "select" | "checkbox" | "radio" | "image" | "file" | "component" | "repeater";
16
+ export type FieldType = "text" | "email" | "password" | "number" | "url" | "tel" | "date" | "datetime-local" | "datetime" | "time" | "currency" | "percentage" | "textarea" | "select" | "checkbox" | "switch" | "radio" | "image" | "file" | "component" | "repeater";
15
17
  /**
16
18
  * A value that may be supplied directly or computed from the live form
17
19
  * model. Predicates receive the current model so fields can react to
@@ -68,6 +70,14 @@ export interface FieldDefinition {
68
70
  max?: number | string;
69
71
  /** Symbol shown for `currency` fields (default: the locale's, "£"). */
70
72
  currencySymbol?: string;
73
+ /**
74
+ * For `percentage` fields: treat the underlying model value as a 0–1
75
+ * fraction while showing/editing it as a 0–100 percentage. The model keeps
76
+ * the fraction (e.g. `0.2`), the input shows `20`. Off by default (the value
77
+ * is taken as a whole percentage). Use for fields stored as ratios (VAT
78
+ * rates, discounts, …).
79
+ */
80
+ asFraction?: boolean;
71
81
  /** `accept` attribute for `image`/`file` inputs (e.g. "image/*"). */
72
82
  accept?: string;
73
83
  /** Help text displayed below the field (always visible). */
@@ -77,6 +87,23 @@ export interface FieldDefinition {
77
87
  * function of the model for dynamic hints.
78
88
  */
79
89
  hint?: MaybeFn<string>;
90
+ /**
91
+ * Longer help text revealed in a popover from a small info affordance
92
+ * on the field's label (on hover/focus). Complements `hint` (which is
93
+ * always-visible muted text below the control). May be a function of
94
+ * the model. For rich content, use the `#info` slot instead.
95
+ */
96
+ info?: MaybeFn<string>;
97
+ /**
98
+ * For `switch` fields: contextual label shown when the toggle is on.
99
+ * Falls back to `label` when omitted. May be a function of the model.
100
+ */
101
+ textWhenTrue?: MaybeFn<string>;
102
+ /**
103
+ * For `switch` fields: contextual label shown when the toggle is off.
104
+ * Falls back to `label` when omitted. May be a function of the model.
105
+ */
106
+ textWhenFalse?: MaybeFn<string>;
80
107
  /** CSS class for the form group */
81
108
  class?: string;
82
109
  /** Additional props to pass to the input component */
@@ -10,7 +10,13 @@ export interface NavigationItem {
10
10
  export interface NavigationGroup {
11
11
  label?: string;
12
12
  items: NavigationItem[];
13
+ /**
14
+ * Per-group override for the sidebar's `collapsibleGroups` behaviour.
15
+ * Set to `false` to keep a group permanently expanded (no toggle header)
16
+ * even when the sidebar has collapsible groups enabled. Defaults to `true`.
17
+ */
13
18
  collapsible?: boolean;
19
+ /** Reserved for a future explicit initial-open hint; not currently wired. */
14
20
  collapsed?: boolean;
15
21
  visible?: boolean;
16
22
  }
@@ -1,8 +1,8 @@
1
1
  {
2
- "generated": "2026-06-30T14:52:12.642Z",
2
+ "generated": "2026-07-04T10:39:25.077Z",
3
3
  "package": {
4
4
  "name": "@omnitend/dashboard-for-laravel",
5
- "version": "0.7.0"
5
+ "version": "0.9.0"
6
6
  },
7
7
  "components": {
8
8
  "base": [
@@ -1264,6 +1264,20 @@
1264
1264
  "default": "'/logout'",
1265
1265
  "description": "Logout URL for navbar dropdown"
1266
1266
  },
1267
+ {
1268
+ "name": "collapsibleGroups",
1269
+ "type": "boolean",
1270
+ "required": false,
1271
+ "default": "false",
1272
+ "description": "Turn sidebar group headers into accordion toggles that collapse/expand\ntheir items. When off (default), every group is permanently expanded."
1273
+ },
1274
+ {
1275
+ "name": "autoCollapseInactiveGroups",
1276
+ "type": "boolean",
1277
+ "required": false,
1278
+ "default": "true",
1279
+ "description": "Only relevant when `collapsibleGroups` is on. `true` (default): only the\nactive-route group starts open and opening one closes the others\n(single-open accordion). `false`: all groups start open, toggled independently."
1280
+ },
1267
1281
  {
1268
1282
  "name": "storageKey",
1269
1283
  "type": "string",
@@ -1409,6 +1423,20 @@
1409
1423
  "required": false,
1410
1424
  "default": "'Dashboard'",
1411
1425
  "description": ""
1426
+ },
1427
+ {
1428
+ "name": "collapsibleGroups",
1429
+ "type": "boolean",
1430
+ "required": false,
1431
+ "default": "false",
1432
+ "description": "Turn group headers into accordion toggles that collapse/expand their items.\nWhen off (default), every group is rendered permanently expanded."
1433
+ },
1434
+ {
1435
+ "name": "autoCollapseInactiveGroups",
1436
+ "type": "boolean",
1437
+ "required": false,
1438
+ "default": "true",
1439
+ "description": "Only relevant when `collapsibleGroups` is on.\n`true` (default): only the active-route group starts open, and opening one\ngroup closes the others (single-open accordion).\n`false`: all groups start open and toggle independently."
1412
1440
  }
1413
1441
  ],
1414
1442
  "events": [
@@ -1448,6 +1476,10 @@
1448
1476
  {
1449
1477
  "name": "collapsed",
1450
1478
  "title": "binding"
1479
+ },
1480
+ {
1481
+ "name": "is-expanded",
1482
+ "title": "binding"
1451
1483
  }
1452
1484
  ]
1453
1485
  }
@@ -1573,6 +1605,29 @@
1573
1605
  ],
1574
1606
  "methods": []
1575
1607
  },
1608
+ {
1609
+ "name": "DXFieldLabel",
1610
+ "category": "extended",
1611
+ "filePath": "resources/js/components/extended/DXFieldLabel.vue",
1612
+ "description": "",
1613
+ "props": [
1614
+ {
1615
+ "name": "label",
1616
+ "type": "string",
1617
+ "required": true,
1618
+ "description": "Visible label text."
1619
+ },
1620
+ {
1621
+ "name": "info",
1622
+ "type": "string",
1623
+ "required": false,
1624
+ "description": "Optional help text revealed in a popover from an info affordance."
1625
+ }
1626
+ ],
1627
+ "events": [],
1628
+ "slots": [],
1629
+ "methods": []
1630
+ },
1576
1631
  {
1577
1632
  "name": "DXForm",
1578
1633
  "category": "extended",
@@ -2212,8 +2267,8 @@
2212
2267
  ]
2213
2268
  },
2214
2269
  "stats": {
2215
- "totalComponents": 65,
2270
+ "totalComponents": 66,
2216
2271
  "baseComponents": 57,
2217
- "extendedComponents": 8
2272
+ "extendedComponents": 9
2218
2273
  }
2219
2274
  }
@@ -1,7 +1,7 @@
1
1
  # Documentation Map
2
2
 
3
3
  > Auto-generated hierarchical overview of all documentation
4
- > Last updated: 2026-06-30T14:52:12.703Z
4
+ > Last updated: 2026-07-04T10:39:25.137Z
5
5
 
6
6
  This file provides a complete map of all available documentation for AI agents and developers.
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Vue 3 dashboard components for Laravel with Bootstrap Vue Next
4
4
  >
5
- > A dual-package library (NPM + Composer) providing 65 Vue 3 components for building Laravel dashboards with Bootstrap Vue Next.
5
+ > A dual-package library (NPM + Composer) providing 66 Vue 3 components for building Laravel dashboards with Bootstrap Vue Next.
6
6
 
7
7
  ## Installation
8
8
 
@@ -81,7 +81,7 @@ Lightweight type-safe wrappers around Bootstrap Vue Next components providing AP
81
81
  - [DToaster](/components/base/dtoaster): Bootstrap Vue Next Toaster wrapper
82
82
  - [DTooltip](/components/base/dtooltip): Bootstrap Vue Next Tooltip wrapper
83
83
 
84
- ## Extended Components (8 components)
84
+ ## Extended Components (9 components)
85
85
 
86
86
  Custom dashboard components with advanced functionality beyond Bootstrap Vue Next.
87
87
 
@@ -90,6 +90,7 @@ Custom dashboard components with advanced functionality beyond Bootstrap Vue Nex
90
90
  - [DXDashboardNavbar](/components/extended/dxdashboardnavbar): Top navbar with user dropdown
91
91
  - [DXDashboardSidebar](/components/extended/dxdashboardsidebar): Collapsible sidebar with navigation
92
92
  - [DXField](/components/extended/dxfield): Single-field renderer for any field type with value/span/info/hint slots
93
+ - [DXFieldLabel](/components/extended/dxfieldlabel): Extended dashboard component
93
94
  - [DXForm](/components/extended/dxform): Form renderer driven by field definitions, with optional tabs, conditional fields, per-field slots, async options, nested repeaters, and auto error-tab switching
94
95
  - [DXRepeater](/components/extended/dxrepeater): Repeatable nested sub-form (field array) primitive
95
96
  - [DXTable](/components/extended/dxtable): Data table with pagination, filtering, and sorting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnitend/dashboard-for-laravel",
3
- "version": "0.7.1",
3
+ "version": "0.9.0",
4
4
  "description": "Vue 3 dashboard components for Laravel with Bootstrap Vue Next",
5
5
  "type": "module",
6
6
  "main": "./dist/dashboard-for-laravel.umd.cjs",
@@ -169,7 +169,8 @@ $dashboard-navbar-height: 64px;
169
169
  border-bottom-color: $navbar-dark-toggler-border-color;
170
170
  }
171
171
 
172
- .nav-group-label {
172
+ .nav-group-label,
173
+ .nav-group-toggle {
173
174
  color: $navbar-dark-color;
174
175
  }
175
176
 
@@ -197,6 +198,66 @@ $dashboard-navbar-height: 64px;
197
198
  height: $dashboard-navbar-height;
198
199
  }
199
200
 
201
+ // ----------------------------------------------------------------------------
202
+ // Toasts
203
+ // ----------------------------------------------------------------------------
204
+ // Bootstrap Vue Next renders toasts with Bootstrap's `.text-bg-{variant}`
205
+ // utility, which fills the whole toast with a saturated colour and white text —
206
+ // loud "candy" blocks that are wrong for a dashboard. Restyle them as a calm,
207
+ // neutral surface with a subtle semantic tint + a coloured left accent rail and
208
+ // progress bar. Colour still signals the toast type, but the bold palette stays
209
+ // where it belongs (actions, badges, selected states).
210
+
211
+ .toast {
212
+ overflow: hidden; // clip the bottom progress bar to the rounded corners
213
+ border: 1px solid $border-color;
214
+ border-radius: $border-radius;
215
+ background-color: $white;
216
+ box-shadow:
217
+ 0 10px 15px -3px rgba(0, 0, 0, 0.1),
218
+ 0 4px 6px -2px rgba(0, 0, 0, 0.05);
219
+ // BVN wraps each toast in a <span>, which defeats Bootstrap's built-in
220
+ // `.toast:not(:last-child)` spacing (toasts are no longer direct children of
221
+ // the container). Add the gap on the toast itself so it doesn't rely on that.
222
+ margin-bottom: 0.75rem;
223
+
224
+ .toast-header {
225
+ background-color: transparent;
226
+ border-bottom: 0; // remove the two-tone header/body split
227
+ padding-bottom: 0.25rem;
228
+ color: $dark; // dark, high-contrast title
229
+ font-weight: 600;
230
+ }
231
+
232
+ .toast-body {
233
+ padding-top: 0.25rem;
234
+ color: $secondary; // muted message text
235
+ }
236
+
237
+ // Hide the auto-dismiss countdown bar — the ticking animation reads as
238
+ // stressful/urgent, which is wrong for a passive notification. Auto-dismiss
239
+ // still works; only its visual indicator is removed.
240
+ .progress {
241
+ display: none;
242
+ }
243
+
244
+ // Semantic variants: subtle tinted surface. Overrides the saturated
245
+ // `.text-bg-*` fill (compound selector wins on specificity); the dark title /
246
+ // muted body from the base rules above stay.
247
+ @each $name, $color in (
248
+ "success": $success,
249
+ "danger": $danger,
250
+ "warning": $warning,
251
+ "info": $info
252
+ ) {
253
+ &.text-bg-#{$name} {
254
+ // !important overrides Bootstrap's `.text-bg-*` helper, which sets a
255
+ // saturated background-color !important that BVN applies per variant.
256
+ background-color: mix($color, $white, 8%) !important;
257
+ }
258
+ }
259
+ }
260
+
200
261
  // ----------------------------------------------------------------------------
201
262
  // Custom Utilities
202
263
  // ----------------------------------------------------------------------------
@@ -7,6 +7,8 @@
7
7
  :title="title"
8
8
  :collapsed="collapsed"
9
9
  :hidden="hidden"
10
+ :collapsible-groups="collapsibleGroups"
11
+ :auto-collapse-inactive-groups="autoCollapseInactiveGroups"
10
12
  @toggle="toggleSidebar"
11
13
  >
12
14
  <!-- Dynamically forward all sidebar-* slots by stripping the prefix -->
@@ -82,6 +84,19 @@ interface Props {
82
84
  /** Logout URL for navbar dropdown */
83
85
  logoutUrl?: string;
84
86
 
87
+ /**
88
+ * Turn sidebar group headers into accordion toggles that collapse/expand
89
+ * their items. When off (default), every group is permanently expanded.
90
+ */
91
+ collapsibleGroups?: boolean;
92
+
93
+ /**
94
+ * Only relevant when `collapsibleGroups` is on. `true` (default): only the
95
+ * active-route group starts open and opening one closes the others
96
+ * (single-open accordion). `false`: all groups start open, toggled independently.
97
+ */
98
+ autoCollapseInactiveGroups?: boolean;
99
+
85
100
  /** LocalStorage key for sidebar state persistence */
86
101
  storageKey?: string;
87
102
 
@@ -98,6 +113,8 @@ const props = withDefaults(defineProps<Props>(), {
98
113
  pageTitle: '',
99
114
  user: null,
100
115
  logoutUrl: '/logout',
116
+ collapsibleGroups: false,
117
+ autoCollapseInactiveGroups: true,
101
118
  storageKey: 'dashboard-sidebar-hidden',
102
119
  dashboardId: '',
103
120
  });