@bagelink/vue 1.21.32 → 1.21.38

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.21.32",
4
+ "version": "1.21.38",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -63,7 +63,7 @@
63
63
  "@types/signature_pad": "^4.0.0",
64
64
  "vue": "^3.5.45",
65
65
  "vue-component-type-helpers": "^2.2.12",
66
- "@bagelink/sdk": "1.21.32"
66
+ "@bagelink/sdk": "1.21.38"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@bagelink/sdk": "*",
@@ -239,6 +239,19 @@ const iconStyle = computed(() => {
239
239
  font-family: 'Material Symbols Outlined', serif !important;
240
240
  }
241
241
 
242
+ /* Morph outline ↔ filled (and weight) via the variable-font FILL/wght axes.
243
+ * :where() keeps specificity at 0 so Vue swap transitions (slide-up / rotate /
244
+ * scale / fade) and other animation rules are not overridden. */
245
+ :where(.bgl_icon-font:not(.fa-brands)) {
246
+ transition: font-variation-settings 0.2s ease;
247
+ }
248
+
249
+ @media (prefers-reduced-motion: reduce) {
250
+ :where(.bgl_icon-font:not(.fa-brands)) {
251
+ transition: none;
252
+ }
253
+ }
254
+
242
255
  .bgl_icon-font.bgl_icon-round {
243
256
  display: inline-flex;
244
257
  align-items: center;
@@ -297,10 +297,22 @@ justify-content: flex-start !important;
297
297
  }
298
298
  .app-header--m-single-flow > .app-header-side,
299
299
  .app-header--m-single-flow > .app-header-center,
300
- .app-header--m-single-flow > .app-header-side > .app-header-slot > *,
301
- .app-header--m-single-flow > .app-header-center > .app-header-slot > * {
300
+ .app-header--m-single-flow > .app-header-side > .app-header-slot > *:not(.bgl_btn),
301
+ .app-header--m-single-flow > .app-header-center > .app-header-slot > *:not(.bgl_btn){
302
302
  display: contents !important;
303
303
  }
304
+ .app-header.app-header--m-single-flow .page-top{
305
+ max-width: calc(100% - 5rem) !important;
306
+ }
307
+ .app-header.app-header--m-single-flow .top-subtitle{
308
+ display: block;
309
+ display: -webkit-box;
310
+ max-width: 100%;
311
+ -webkit-box-orient: vertical;
312
+ overflow: hidden;
313
+ text-overflow: ellipsis;
314
+ -webkit-line-clamp: 1;
315
+ }
304
316
  }
305
317
 
306
318
  </style>
@@ -16,6 +16,8 @@ const props = defineProps<{
16
16
  outline?: boolean
17
17
  thin?: boolean
18
18
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
19
+ /** Mobile-only size override (≤ 910px). e.g. size="lg" size-mobile="sm". */
20
+ sizeMobile?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
19
21
  fullWidth?: boolean
20
22
  fullWidthMobile?: boolean
21
23
  alignTxt?: 'center' | 'start' | 'end'
@@ -26,6 +28,11 @@ const props = defineProps<{
26
28
  iconEnd?: IconType
27
29
  iconSize?: number | string
28
30
  iconMobileSize?: number | string
31
+ /**
32
+ * On mobile (≤ 910px): equal-height tabs based on the tallest content
33
+ * (labels may wrap). When a tab has an icon, it stacks above the label.
34
+ */
35
+ iconAboveMobile?: boolean
29
36
  }>()
30
37
 
31
38
  const emit = defineEmits(['update:modelValue'])
@@ -18,6 +18,8 @@ const props = defineProps<{
18
18
  iconMobileSize?: number | string
19
19
  thin?: boolean
20
20
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
21
+ /** Mobile-only size override (≤ 910px). e.g. size="lg" size-mobile="sm". */
22
+ sizeMobile?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
21
23
  fullWidth?: boolean
22
24
  fullWidthMobile?: boolean
23
25
  alignTxt?: 'center' | 'start' | 'end'
@@ -27,6 +29,11 @@ const props = defineProps<{
27
29
  frame?: boolean
28
30
  /** Render only each tab's icon; its label becomes the tooltip + aria-label. */
29
31
  iconOnly?: boolean
32
+ /**
33
+ * On mobile (≤ 910px): equal-height tabs based on the tallest content
34
+ * (labels may wrap). When a tab has an icon, it stacks above the label.
35
+ */
36
+ iconAboveMobile?: boolean
30
37
  }>()
31
38
 
32
39
  const emit = defineEmits(['update:modelValue'])
@@ -158,6 +165,12 @@ function tabLabel(tab: Tab) {
158
165
  return tab.label
159
166
  }
160
167
 
168
+ /** True when this tab will render a leading/trailing icon. */
169
+ function tabHasIcon(tab: Tab) {
170
+ if (props.icon || props.iconEnd) { return true }
171
+ return typeof tab !== 'string' && !!tab.icon
172
+ }
173
+
161
174
  watch(
162
175
  () => props.modelValue,
163
176
  (value) => {
@@ -225,16 +238,31 @@ onBeforeUnmount(() => {
225
238
  </script>
226
239
 
227
240
  <template>
228
- <div ref="tabsWrap" class="grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden" :class="{ 'bgl_flat-tabs': flat, 'bgl_vertical-tabs': vertical, 'bgl_tabs-outline': outline, 'bgl_tabs-frame': frame }">
241
+ <div
242
+ ref="tabsWrap"
243
+ class="grid auto-flow-columns relative fit-content bgl_tabs_wrap overflow-hidden"
244
+ :class="{
245
+ 'bgl_flat-tabs': flat,
246
+ 'bgl_vertical-tabs': vertical,
247
+ 'bgl_tabs-outline': outline,
248
+ 'bgl_tabs-frame': frame,
249
+ 'bgl_tabs-fit-height-mobile': iconAboveMobile,
250
+ }"
251
+ >
229
252
  <slot name="tabs" v-bind="{ selectTab, isActive, tabLabel, tabs: tabEls }">
230
253
  <button v-for="(tab, i) in props.tabs" :key="i" type="button" :class="[
231
254
  { active: isActive(tab) },
232
- {
255
+ {
233
256
  'bgl_tab-thin': thin,
234
257
  'bgl_tab-xs': size === 'xs',
235
258
  'bgl_tab-s': size === 'sm',
236
259
  'bgl_tab-l': size === 'lg',
237
260
  'bgl_tab-xl': size === 'xl',
261
+ 'bgl_tab-m-xs': sizeMobile === 'xs',
262
+ 'bgl_tab-m-s': sizeMobile === 'sm',
263
+ 'bgl_tab-m-md': sizeMobile === 'md',
264
+ 'bgl_tab-m-l': sizeMobile === 'lg',
265
+ 'bgl_tab-m-xl': sizeMobile === 'xl',
238
266
  'w-100p justify-center': fullWidth,
239
267
  'w-auto m_w-100p': fullWidthMobile,
240
268
  'bgl_tab-align-center': alignTxt === 'center',
@@ -243,8 +271,9 @@ onBeforeUnmount(() => {
243
271
  'bgl_tab-align-center-mobile': alignTxtMobile === 'center',
244
272
  'bgl_tab-align-start-mobile': alignTxtMobile === 'start',
245
273
  'bgl_tab-align-end-mobile': alignTxtMobile === 'end',
246
- }
247
- ]" class="bgl_tab relative z-1"
274
+ 'bgl_tab-icon-above-mobile': iconAboveMobile && tabHasIcon(tab),
275
+ }
276
+ ]" class="bgl_tab relative z-1 m_line-height-13"
248
277
  :aria-label="iconOnly ? tabLabel(tab) : undefined"
249
278
  v-tooltip="iconOnly ? tabLabel(tab) : undefined"
250
279
  @click="selectTab(tab)">
@@ -464,6 +493,96 @@ white-space: nowrap;
464
493
  gap: 0.25rem;
465
494
  padding: 0.25rem 0.5rem;
466
495
  }
496
+
497
+ /* Mobile size overrides — mirror desktop size tokens. */
498
+ .bgl_tab-m-xs {
499
+ padding-inline: calc(var(--bgl_tab-inline-padding) / 3);
500
+ font-size: calc(var(--bgl-input-font-size) * 0.6);
501
+ height: calc(var(--bgl-btn-height) * 0.5 - var(--bgl_tabs-block-padding) * 2);
502
+ }
503
+
504
+ .bgl_tab-m-s {
505
+ padding-inline: calc(var(--bgl_tab-inline-padding) / 1.5);
506
+ font-size: var(--bgl-input-font-size);
507
+ height: calc(var(--bgl-btn-height) * 0.7 - var(--bgl_tabs-block-padding) * 2);
508
+ }
509
+
510
+ .bgl_tab-m-md {
511
+ padding-inline: var(--bgl_tab-inline-padding);
512
+ font-size: var(--bgl-input-font-size);
513
+ height: calc(var(--bgl-btn-height) - var(--bgl_tabs-block-padding) * 2);
514
+ }
515
+
516
+ .bgl_tab-m-l {
517
+ padding-inline: calc(var(--bgl_tab-inline-padding) * 1.3);
518
+ font-size: calc(var(--bgl-input-font-size) * 1.1);
519
+ height: calc(var(--bgl-btn-height) * 1.2 - var(--bgl_tabs-block-padding) * 2);
520
+ }
521
+
522
+ .bgl_tab-m-xl {
523
+ padding-inline: calc(var(--bgl_tab-inline-padding) * 1.6);
524
+ font-size: calc(var(--bgl-input-font-size) * 1.3);
525
+ height: calc(var(--bgl-btn-height) * 1.5 - var(--bgl_tabs-block-padding) * 2);
526
+ }
527
+
528
+ /*
529
+ * iconAboveMobile: equal-height from tallest content (with or without icons).
530
+ * Tabs with an icon also get .bgl_tab-icon-above-mobile → column stack.
531
+ */
532
+ .bgl_tabs-fit-height-mobile.bgl_tabs_wrap {
533
+ align-items: stretch;
534
+ }
535
+
536
+ .bgl_tabs-fit-height-mobile .bgl_tab,
537
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-thin,
538
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-xs,
539
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-s,
540
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-l,
541
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-xl,
542
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-xs,
543
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-s,
544
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-md,
545
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-l,
546
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-xl {
547
+ align-items: center;
548
+ justify-content: center;
549
+ height: auto;
550
+ min-height: calc(var(--bgl-btn-height) - var(--bgl_tabs-block-padding) * 2);
551
+ white-space: normal;
552
+ text-align: center;
553
+ padding-block: 0.35rem;
554
+ line-height: 1.25;
555
+ }
556
+
557
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-icon-above-mobile {
558
+ flex-direction: column;
559
+ }
560
+
561
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-xs,
562
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-xs {
563
+ min-height: calc(var(--bgl-btn-height) * 0.5 - var(--bgl_tabs-block-padding) * 2);
564
+ }
565
+
566
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-s,
567
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-s,
568
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-thin {
569
+ min-height: calc(var(--bgl-btn-height) * 0.7 - var(--bgl_tabs-block-padding) * 2);
570
+ }
571
+
572
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-l,
573
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-l {
574
+ min-height: calc(var(--bgl-btn-height) * 1.2 - var(--bgl_tabs-block-padding) * 2);
575
+ }
576
+
577
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-xl,
578
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-xl {
579
+ min-height: calc(var(--bgl-btn-height) * 1.5 - var(--bgl_tabs-block-padding) * 2);
580
+ }
581
+
582
+ /* sizeMobile wins over desktop size for the content-height floor. */
583
+ .bgl_tabs-fit-height-mobile .bgl_tab.bgl_tab-m-md {
584
+ min-height: calc(var(--bgl-btn-height) - var(--bgl_tabs-block-padding) * 2);
585
+ }
467
586
  }
468
587
 
469
588
  </style>