@omnitend/dashboard-for-laravel 0.37.0 → 0.38.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.
@@ -1,8 +1,8 @@
1
1
  {
2
- "generated": "2026-07-23T11:32:06.998Z",
2
+ "generated": "2026-07-23T18:28:14.921Z",
3
3
  "package": {
4
4
  "name": "@omnitend/dashboard-for-laravel",
5
- "version": "0.37.0"
5
+ "version": "0.38.0"
6
6
  },
7
7
  "components": {
8
8
  "base": [
@@ -3092,6 +3092,12 @@
3092
3092
  "required": false,
3093
3093
  "default": "\"success\"",
3094
3094
  "description": "On-state colour. `\"success\"` (default) reads the house green-on / red-off\nstyle — an active/enabled/good switch (\"Product is current\", \"Stock is\ntracked\", \"Visible\"). `\"neutral\"` is for semantically-mixed switches\n(\"contains alcohol\", an allergen toggle, \"hidden on web shop\") that\nshouldn't imply good/bad — it uses the brand primary on / grey off (#158)."
3095
+ },
3096
+ {
3097
+ "name": "size",
3098
+ "type": "\"sm\"",
3099
+ "required": false,
3100
+ "description": "`\"sm\"` renders a compact box (~31px vs the default ~35px input height) for\ndense rows that repeat the switch per item (a per-line visibility toggle in\na modal). Omit for the standard size, which matches the `.form-control`\nheight so a switch lines up with inputs beside it."
3095
3101
  }
3096
3102
  ],
3097
3103
  "events": [
@@ -1,7 +1,7 @@
1
1
  # Documentation Map
2
2
 
3
3
  > Auto-generated hierarchical overview of all documentation
4
- > Last updated: 2026-07-23T11:32:07.049Z
4
+ > Last updated: 2026-07-23T18:28:14.969Z
5
5
 
6
6
  This file provides a complete map of all available documentation for AI agents and developers.
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnitend/dashboard-for-laravel",
3
- "version": "0.37.0",
3
+ "version": "0.38.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",
@@ -804,6 +804,21 @@ $dx-switch-on-soft: map.get(map.get($dx-variants, "success"), "soft-bg"); // #cd
804
804
  --dx-switch-pill: var(--bs-gray-400, #ced4da); // neutral pill in both states
805
805
  }
806
806
 
807
+ // Optically centre the check/radio/switch box against its label's FIRST line.
808
+ // Bootstrap's `.25em` top margin is mathematically right for a 1em box in a
809
+ // 1.5em line box, but Poppins seats its glyphs low in the line box, so the box
810
+ // reads visibly HIGH beside the text (same optical-metrics issue as the B14
811
+ // dropdown caret). `0.325em` lands the box centre on Poppins' visual centre —
812
+ // judged against a rendered filmstrip (0.25/0.30/0.325/0.35em) with Poppins
813
+ // loaded, not from the maths. A top MARGIN (not flex-centring) is deliberate:
814
+ // it aligns to the first line, so a multi-line label keeps the box on line one
815
+ // rather than floating to the block's vertical centre. DXSwitch is unaffected —
816
+ // it flex-centres and zeroes this margin on its inner input at higher
817
+ // specificity (`.dx-switch :deep(.form-check-input) { margin: 0 }`).
818
+ .form-check-input {
819
+ margin-top: 0.325em;
820
+ }
821
+
807
822
  .form-switch .form-check-input {
808
823
  // OFF: light-red track, red thumb (left).
809
824
  background-color: var(--dx-switch-off-bg);
@@ -21,7 +21,7 @@
21
21
  `label` prop for simple text, or the default slot for richer label content.
22
22
  -->
23
23
  <template>
24
- <div class="dx-switch" :class="[`dx-switch--${onVariant}`, { 'dx-switch--on': isOn }]">
24
+ <div class="dx-switch" :class="[`dx-switch--${onVariant}`, { 'dx-switch--on': isOn, 'dx-switch--sm': size === 'sm' }]">
25
25
  <!-- For the neutral variant, tag the inner `.form-switch` with
26
26
  `switch-neutral` so the global theme restores grey-off / primary-on for
27
27
  the toggle itself (the box styling below handles the wrapper). -->
@@ -63,6 +63,13 @@ interface Props {
63
63
  * shouldn't imply good/bad — it uses the brand primary on / grey off (#158).
64
64
  */
65
65
  onVariant?: "success" | "neutral";
66
+ /**
67
+ * `"sm"` renders a compact box (~31px vs the default ~35px input height) for
68
+ * dense rows that repeat the switch per item (a per-line visibility toggle in
69
+ * a modal). Omit for the standard size, which matches the `.form-control`
70
+ * height so a switch lines up with inputs beside it.
71
+ */
72
+ size?: "sm";
66
73
  }
67
74
 
68
75
  const props = withDefaults(defineProps<Props>(), {
@@ -131,6 +138,17 @@ defineOptions({
131
138
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
132
139
  }
133
140
 
141
+ /* Compact size (#… size="sm"): a shorter box for dense rows that repeat the
142
+ switch per item. `min-height: auto` drops the input-height floor so the box
143
+ shrinks to its padded content (~31px vs ~35px); the smaller font pulls the
144
+ label in to match. The fixed-rem toggle itself is unchanged — only the box
145
+ chrome tightens. */
146
+ .dx-switch--sm :deep(.form-check) {
147
+ font-size: 0.875rem;
148
+ min-height: auto;
149
+ padding: 0.25rem 0.625rem;
150
+ }
151
+
134
152
  /* Label on the left, toggle on the right (DOM order is input then label). */
135
153
  .dx-switch :deep(.form-check-label) {
136
154
  order: 1;