@redseed/redseed-ui-vue3 10.4.1 → 10.5.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "10.4.1",
3
+ "version": "10.5.1",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/redseedtraining/redseed-ui",
@@ -33,6 +33,9 @@ const props = defineProps({
33
33
  },
34
34
  })
35
35
 
36
+ // A percentage height sizes the chart from its wrapper, so the wrapper grows to give it one.
37
+ const isFill = computed(() => typeof props.height === 'string' && props.height.endsWith('%'))
38
+
36
39
  const root = ref(null)
37
40
  const mounted = ref(false)
38
41
  const theme = ref(resolveTheme(null))
@@ -56,7 +59,10 @@ const chartOptions = computed(() =>
56
59
  )
57
60
  </script>
58
61
  <template>
59
- <div ref="root" class="rsui-chart">
62
+ <div
63
+ ref="root"
64
+ :class="['rsui-chart', { 'rsui-chart--fill': isFill }]"
65
+ >
60
66
  <VueApexCharts
61
67
  v-if="mounted"
62
68
  type="bar"
@@ -8,6 +8,11 @@ const props = defineProps({
8
8
  type: Boolean,
9
9
  required: false,
10
10
  },
11
+ // Grow each column's content to the row's height, so side-by-side cards end level.
12
+ stretch: {
13
+ type: Boolean,
14
+ default: false,
15
+ },
11
16
  })
12
17
  </script>
13
18
  <template>
@@ -18,6 +23,7 @@ const props = defineProps({
18
23
  {
19
24
  'rsui-two-column-layout__container--top-aside': topAside,
20
25
  'rsui-two-column-layout__container--left-aside': leftAside,
26
+ 'rsui-two-column-layout__container--stretch': stretch,
21
27
  }
22
28
  ]"
23
29
  >
@@ -28,7 +28,12 @@ const props = defineProps({
28
28
  showGap: {
29
29
  type: Boolean,
30
30
  default: true,
31
- }
31
+ },
32
+ // Let the content region grow into spare height, e.g. in a stretched TwoColumnLayout row.
33
+ fill: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
32
37
  })
33
38
 
34
39
  const showGapDelayed = ref(props.showGap)
@@ -52,6 +57,7 @@ const variantClass = computed(() => [
52
57
  'rsui-section--padded': props.padded,
53
58
  'rsui-section--header-padded': props.headerPadded,
54
59
  'rsui-section--content-padded': props.contentPadded,
60
+ 'rsui-section--fill': props.fill,
55
61
  'rsui-section--show-gap': showGapDelayed.value,
56
62
  'rsui-section--primary': props.variant === 'primary',
57
63
  'rsui-section--secondary': props.variant === 'secondary',
@@ -213,6 +213,11 @@ const titleTag = computed(() => HEADING_LEVELS.includes(String(props.headingLeve
213
213
  {
214
214
  'rsui-section-header--divider': showDivider,
215
215
  'rsui-section-header--clickable': isClickable,
216
+ // Direction driven by the SAME measurement as everything else in here.
217
+ // It used to come from `md:` — a viewport query at 768 — while the icon
218
+ // gate, the actions swap and the badge stacking all read the container at
219
+ // 640, so a narrow column on a wide screen got both layouts at once. #420.
220
+ 'rsui-section-header--narrow': !responsiveWidth.specific,
216
221
  }
217
222
  ]"
218
223
  :role="isClickable ? 'button' : undefined"
@@ -222,6 +227,27 @@ const titleTag = computed(() => HEADING_LEVELS.includes(String(props.headingLeve
222
227
  >
223
228
  <div class="rsui-section-header__header">
224
229
 
230
+ <!--
231
+ The chevron takes the LEADING position, beside the text block rather than
232
+ inside the title — the same spot `#icon` occupies, and the same shape
233
+ `CardHeader` and `PageHeader` both use for `#avatar`.
234
+
235
+ It used to sit inside `__title`, copied from the coaching index prototype,
236
+ which hand-rolled it into a span in the title because it had no slot to use.
237
+ That indented the title and left the subtitle at the header's own edge, 46px
238
+ adrift from the heading it belongs to — three edges where there should be two.
239
+ Here the whole of `__text` (title, badge, subtitle) indents past it together.
240
+
241
+ Its own element, NOT the `#icon` slot: that slot is width-gated and a control
242
+ must not vanish on a narrow header (#372). `__header` is already `items-start`,
243
+ so it lands on the title's line rather than centring against the block. #407.
244
+ -->
245
+ <div v-if="rendersTrigger()"
246
+ class="rsui-section-header__trigger"
247
+ >
248
+ <DisclosureTrigger sm />
249
+ </div>
250
+
225
251
  <!-- Icon slot, optional — hidden on narrow sections -->
226
252
  <div class="rsui-section-header__icon"
227
253
  v-if="$slots.icon && responsiveWidth.specific"
@@ -238,23 +264,7 @@ const titleTag = computed(() => HEADING_LEVELS.includes(String(props.headingLeve
238
264
  <div :class="[
239
265
  'rsui-section-header__title',
240
266
  { 'rsui-section-header__title--stacked': !responsiveWidth.specific && !inlineBadge },
241
- // --stacked gives the title text `basis-full`, which takes the whole row and
242
- // strands the trigger on the line above it. Same class of defect CardHeader
243
- // had, and it carries the same modifier name.
244
- { 'rsui-section-header__title--with-trigger': rendersTrigger() },
245
267
  ]">
246
- <!--
247
- First child of the TITLE row, not a sibling of the whole text block
248
- the way `#icon` is: `__icon` centres against title AND subtitle
249
- together, so with a subtitle present the chevron drifts off the line
250
- it belongs to. `sm` matches the ACTION SIZE guidance in
251
- section_header.css.
252
- -->
253
- <div v-if="rendersTrigger()"
254
- class="rsui-section-header__trigger"
255
- >
256
- <DisclosureTrigger sm />
257
- </div>
258
268
  <component :is="titleTag"
259
269
  :class="[
260
270
  'rsui-section-header__title-text',