frappe-ui 0.1.243 → 0.1.244

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": "frappe-ui",
3
- "version": "0.1.243",
3
+ "version": "0.1.244",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -12,10 +12,14 @@
12
12
  </slot>
13
13
  <slot name="subtitle" v-bind="{ formatValue }">
14
14
  <div
15
- class="flex-1 flex-shrink-0 truncate text-[24px] text-ink-gray-6 font-semibold leading-10"
15
+ class="flex flex-1 items-center gap-0.5 flex-shrink-0 truncate text-[24px] text-ink-gray-6 font-semibold leading-10"
16
16
  >
17
- {{ config.prefix }}{{ formatValue(config.value, 1, true)
18
- }}{{ config.suffix }}
17
+ <div
18
+ v-if="config.prefix"
19
+ v-html="config.prefix"
20
+ class="size-4 table"
21
+ />
22
+ {{ formatValue(config.value, 1, true) }}{{ config.suffix }}
19
23
  </div>
20
24
  </slot>
21
25
  <slot name="delta" v-bind="{ formatValue }">
@@ -29,7 +29,7 @@ const getValues = (arr: String[]) =>
29
29
  arr.map((x) => props.options.find((y) => y.value === x)?.label);
30
30
 
31
31
  const optionToStr = (options: MultiSelectOption[]) =>
32
- options.map((x) => x.label);
32
+ options.map((x) => x.value);
33
33
 
34
34
  const selectedOptions = computed(() => {
35
35
  const values = getValues(model.value).join(", ");
@@ -11,6 +11,7 @@ import type { TabProps } from './types'
11
11
  import { h } from 'vue'
12
12
 
13
13
  const props = defineProps<TabProps>()
14
+ const model = defineModel<string | number>({ default: 0 })
14
15
 
15
16
  const indicatorXCss = `left-0 bottom-0 h-[2px] w-[--reka-tabs-indicator-size] transition-[width,transform]
16
17
  translate-x-[--reka-tabs-indicator-position] translate-y-[1px]`
@@ -29,6 +30,7 @@ const Btn = h('button')
29
30
  class="flex flex-1 overflow-hidden flex-col data-[orientation=vertical]:flex-row"
30
31
  :orientation="props.vertical ? 'vertical' : 'horizontal'"
31
32
  :default-value="props.tabs[0].label"
33
+ v-model="model"
32
34
  >
33
35
  <TabsList
34
36
  class="relative min-h-fit flex data-[orientation=vertical]:flex-col p-1 border-b data-[orientation=vertical]:border-r gap-5"
@@ -1,11 +1,11 @@
1
1
  type Tab = {
2
2
  label: string
3
3
  icon?: string
4
- route?:string
4
+ route?: string
5
5
  }
6
6
 
7
7
  export interface TabProps {
8
8
  as?: string
9
9
  tabs: Tab[]
10
- vertical?: Boolean
10
+ vertical?: boolean
11
11
  }