chore: fix NumberField label for ids
fix new-york example DatePickerWithIndependentMonths to use related icon @radix-icons/vue
This commit is contained in:
parent
5094a7a498
commit
ff8e8f6613
|
|
@ -11,6 +11,7 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="balance"
|
||||||
:default-value="1500"
|
:default-value="1500"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
|
|
@ -19,7 +20,7 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
currencySign: 'accounting',
|
currencySign: 'accounting',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Balance</Label>
|
<Label for="balance">Balance</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,14 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="number"
|
||||||
:default-value="5"
|
:default-value="5"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
signDisplay: 'exceptZero',
|
signDisplay: 'exceptZero',
|
||||||
minimumFractionDigits: 1,
|
minimumFractionDigits: 1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Number</Label>
|
<Label for="number">Number</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField :default-value="18" :min="0">
|
<NumberField id="age" :default-value="18" :min="0">
|
||||||
<Label>Age</Label>
|
<Label for="age">Age</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField :default-value="18" :min="0" disabled>
|
<NumberField id="age-disabled" :default-value="18" disabled>
|
||||||
<Label>Age</Label>
|
<Label for="age-disabled">Age</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,14 @@ import { Label } from '@/lib/registry/default/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="percent"
|
||||||
:default-value="0.05"
|
:default-value="0.05"
|
||||||
:step="0.01"
|
:step="0.01"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
style: 'percent',
|
style: 'percent',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Percent</Label>
|
<Label for="percent">Percent</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
import { type Ref, ref, watch } from 'vue'
|
import { type Ref, ref, watch } from 'vue'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Calendar as CalendarIcon,
|
CalendarIcon,
|
||||||
ChevronLeft,
|
ChevronLeftIcon,
|
||||||
ChevronRight,
|
ChevronRightIcon,
|
||||||
} from 'lucide-vue-next'
|
} from '@radix-icons/vue'
|
||||||
import {
|
import {
|
||||||
CalendarDate,
|
CalendarDate,
|
||||||
type DateValue,
|
type DateValue,
|
||||||
|
|
@ -153,7 +153,7 @@ watch(secondMonthPlaceholder, (_secondMonthPlaceholder) => {
|
||||||
"
|
"
|
||||||
@click="updateMonth('first', -1)"
|
@click="updateMonth('first', -1)"
|
||||||
>
|
>
|
||||||
<ChevronLeft class="h-4 w-4" />
|
<ChevronLeftIcon class="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
<div :class="cn('text-sm font-medium')">
|
<div :class="cn('text-sm font-medium')">
|
||||||
{{
|
{{
|
||||||
|
|
@ -171,7 +171,7 @@ watch(secondMonthPlaceholder, (_secondMonthPlaceholder) => {
|
||||||
"
|
"
|
||||||
@click="updateMonth('first', 1)"
|
@click="updateMonth('first', 1)"
|
||||||
>
|
>
|
||||||
<ChevronRight class="h-4 w-4" />
|
<ChevronRightIcon class="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<RangeCalendarGrid>
|
<RangeCalendarGrid>
|
||||||
|
|
@ -219,7 +219,7 @@ watch(secondMonthPlaceholder, (_secondMonthPlaceholder) => {
|
||||||
"
|
"
|
||||||
@click="updateMonth('second', -1)"
|
@click="updateMonth('second', -1)"
|
||||||
>
|
>
|
||||||
<ChevronLeft class="h-4 w-4" />
|
<ChevronLeftIcon class="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
<div :class="cn('text-sm font-medium')">
|
<div :class="cn('text-sm font-medium')">
|
||||||
{{
|
{{
|
||||||
|
|
@ -238,7 +238,7 @@ watch(secondMonthPlaceholder, (_secondMonthPlaceholder) => {
|
||||||
"
|
"
|
||||||
@click="updateMonth('second', 1)"
|
@click="updateMonth('second', 1)"
|
||||||
>
|
>
|
||||||
<ChevronRight class="h-4 w-4" />
|
<ChevronRightIcon class="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<RangeCalendarGrid>
|
<RangeCalendarGrid>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="balance"
|
||||||
:default-value="1500"
|
:default-value="1500"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
|
|
@ -19,7 +20,7 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
currencySign: 'accounting',
|
currencySign: 'accounting',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Balance</Label>
|
<Label for="balance">Balance</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,14 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="number"
|
||||||
:default-value="5"
|
:default-value="5"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
signDisplay: 'exceptZero',
|
signDisplay: 'exceptZero',
|
||||||
minimumFractionDigits: 1,
|
minimumFractionDigits: 1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Number</Label>
|
<Label for="number">Number</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField :default-value="18" :min="0">
|
<NumberField id="age" :default-value="18" :min="0">
|
||||||
<Label>Age</Label>
|
<Label for="age">Age</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField :default-value="18" disabled>
|
<NumberField id="age-disabled" :default-value="18" disabled>
|
||||||
<Label>Age</Label>
|
<Label for="age-disabled">Age</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,14 @@ import { Label } from '@/lib/registry/new-york/ui/label'
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NumberField
|
<NumberField
|
||||||
|
id="percent"
|
||||||
:default-value="0.05"
|
:default-value="0.05"
|
||||||
:step="0.01"
|
:step="0.01"
|
||||||
:format-options="{
|
:format-options="{
|
||||||
style: 'percent',
|
style: 'percent',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<Label>Percent</Label>
|
<Label for="percent">Percent</Label>
|
||||||
<NumberFieldContent>
|
<NumberFieldContent>
|
||||||
<NumberFieldDecrement />
|
<NumberFieldDecrement />
|
||||||
<NumberFieldInput />
|
<NumberFieldInput />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user