@uselets/ui 0.6.1 → 1.1.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.
Files changed (122) hide show
  1. package/README.md +85 -25
  2. package/dist/cli/uselets.mjs +2 -2
  3. package/dist/cli/uselets.mjs.map +1 -1
  4. package/dist/components/alert-dialog.d.ts +5 -3
  5. package/dist/components/alert-dialog.js +1 -1
  6. package/dist/components/alert-dialog.js.map +1 -1
  7. package/dist/components/anchor.js +1 -1
  8. package/dist/components/anchor.js.map +1 -1
  9. package/dist/components/avatar.d.ts +1 -1
  10. package/dist/components/avatar.js +1 -1
  11. package/dist/components/avatar.js.map +1 -1
  12. package/dist/components/badge.js +1 -1
  13. package/dist/components/badge.js.map +1 -1
  14. package/dist/components/button.d.ts +7 -3
  15. package/dist/components/button.js +1 -1
  16. package/dist/components/button.js.map +1 -1
  17. package/dist/components/calendar.js +1 -1
  18. package/dist/components/calendar.js.map +1 -1
  19. package/dist/components/card.d.ts +1 -1
  20. package/dist/components/card.js +1 -1
  21. package/dist/components/card.js.map +1 -1
  22. package/dist/components/checkbox.d.ts +14 -2
  23. package/dist/components/checkbox.js +1 -1
  24. package/dist/components/checkbox.js.map +1 -1
  25. package/dist/components/combobox.d.ts +8 -1
  26. package/dist/components/combobox.js +1 -1
  27. package/dist/components/combobox.js.map +1 -1
  28. package/dist/components/date-range-picker.d.ts +120 -0
  29. package/dist/components/date-range-picker.js +2 -0
  30. package/dist/components/date-range-picker.js.map +1 -0
  31. package/dist/components/grid.d.ts +37 -0
  32. package/dist/components/grid.js +2 -0
  33. package/dist/components/grid.js.map +1 -0
  34. package/dist/components/group.d.ts +2 -2
  35. package/dist/components/group.js +1 -1
  36. package/dist/components/group.js.map +1 -1
  37. package/dist/components/heading.js +1 -1
  38. package/dist/components/heading.js.map +1 -1
  39. package/dist/components/label.js +1 -1
  40. package/dist/components/label.js.map +1 -1
  41. package/dist/components/list.js +1 -1
  42. package/dist/components/list.js.map +1 -1
  43. package/dist/components/native-select.d.ts +1 -1
  44. package/dist/components/native-select.js +1 -1
  45. package/dist/components/native-select.js.map +1 -1
  46. package/dist/components/pagination.js +1 -1
  47. package/dist/components/pagination.js.map +1 -1
  48. package/dist/components/radio-group.d.ts +23 -2
  49. package/dist/components/radio-group.js +1 -1
  50. package/dist/components/radio-group.js.map +1 -1
  51. package/dist/components/select.d.ts +1 -1
  52. package/dist/components/select.js +1 -1
  53. package/dist/components/select.js.map +1 -1
  54. package/dist/components/sidebar.d.ts +1 -1
  55. package/dist/components/sidebar.js +1 -1
  56. package/dist/components/sidebar.js.map +1 -1
  57. package/dist/components/simple-grid.d.ts +24 -0
  58. package/dist/components/simple-grid.js +2 -0
  59. package/dist/components/simple-grid.js.map +1 -0
  60. package/dist/components/spinner.d.ts +1 -1
  61. package/dist/components/spinner.js +1 -1
  62. package/dist/components/spinner.js.map +1 -1
  63. package/dist/components/stack.d.ts +2 -2
  64. package/dist/components/stack.js +1 -1
  65. package/dist/components/stack.js.map +1 -1
  66. package/dist/components/switch.d.ts +11 -1
  67. package/dist/components/switch.js +1 -1
  68. package/dist/components/switch.js.map +1 -1
  69. package/dist/components/tabs.d.ts +5 -2
  70. package/dist/components/tabs.js +1 -1
  71. package/dist/components/tabs.js.map +1 -1
  72. package/dist/components/text.js +1 -1
  73. package/dist/components/text.js.map +1 -1
  74. package/dist/components/toggle-group.d.ts +2 -0
  75. package/dist/components/toggle-group.js +1 -1
  76. package/dist/components/toggle-group.js.map +1 -1
  77. package/dist/components/toggle.d.ts +4 -2
  78. package/dist/components/toggle.js +1 -1
  79. package/dist/components/toggle.js.map +1 -1
  80. package/dist/components/visibility.d.ts +25 -0
  81. package/dist/components/visibility.js +2 -0
  82. package/dist/components/visibility.js.map +1 -0
  83. package/dist/hooks/use-breakpoint-value.d.ts +9 -0
  84. package/dist/hooks/use-breakpoint-value.js +2 -0
  85. package/dist/hooks/use-breakpoint-value.js.map +1 -0
  86. package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -0
  87. package/dist/hooks/use-breakpoint-value.spec.js +15 -0
  88. package/dist/hooks/use-breakpoint-value.spec.js.map +1 -0
  89. package/dist/hooks/use-breakpoint.d.ts +9 -0
  90. package/dist/hooks/use-breakpoint.js +2 -0
  91. package/dist/hooks/use-breakpoint.js.map +1 -0
  92. package/dist/hooks/use-breakpoint.spec.d.ts +1 -0
  93. package/dist/hooks/use-breakpoint.spec.js +2 -0
  94. package/dist/hooks/use-breakpoint.spec.js.map +1 -0
  95. package/dist/index.d.ts +10 -4
  96. package/dist/index.js +1 -1
  97. package/dist/lib/button.d.ts +12 -8
  98. package/dist/lib/button.js +1 -1
  99. package/dist/lib/button.js.map +1 -1
  100. package/dist/lib/color.d.ts +20 -0
  101. package/dist/lib/color.js +2 -0
  102. package/dist/lib/color.js.map +1 -0
  103. package/dist/skills/uselets-ui/SKILL.md +3 -3
  104. package/dist/skills/uselets-ui/references/component-catalog.md +34 -4
  105. package/dist/skills/uselets-ui/references/package-guide.md +51 -17
  106. package/dist/skills/uselets-ui/scripts/print-public-api.mjs +0 -1
  107. package/dist/styles/base.css +13 -0
  108. package/dist/styles/globals.css +8 -0
  109. package/dist/styles/gomax.css +202 -0
  110. package/dist/styles/max.css +203 -0
  111. package/dist/styles/theme.css +195 -0
  112. package/dist/themes/gomax.css +3 -2
  113. package/dist/themes/max.css +3 -2
  114. package/package.json +1 -2
  115. package/skills/uselets-ui/SKILL.md +3 -3
  116. package/skills/uselets-ui/references/component-catalog.md +34 -4
  117. package/skills/uselets-ui/references/package-guide.md +51 -17
  118. package/skills/uselets-ui/scripts/print-public-api.mjs +0 -1
  119. package/dist/components/sheet.d.ts +0 -61
  120. package/dist/components/sheet.js +0 -2
  121. package/dist/components/sheet.js.map +0 -1
  122. package/dist/styles.css +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-picker.js","names":[],"sources":["../../src/components/date-range-picker.tsx"],"sourcesContent":["import * as React from 'react'\nimport type { Locale } from 'react-day-picker'\n\nimport { IconArrowRight, IconCalendar, IconChevronDown } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport { Calendar, type DateRange } from './calendar'\nimport { Input } from './input'\nimport { Popover, PopoverContent, PopoverTrigger } from './popover'\n\ntype DateRangePickerContextValue = {\n value: DateRange | null\n draft: DateRange | undefined\n month: Date\n locale?: Partial<Locale>\n placeholder: string\n setDraft: (range: DateRange | undefined) => void\n setMonth: (month: Date) => void\n apply: () => void\n reset: () => void\n}\n\nconst DateRangePickerContext = React.createContext<DateRangePickerContextValue | null>(null)\n\nconst defaultPlaceholder = 'Selecione um período'\n\nconst defaultPresetDefinitions = [\n {\n label: 'Hoje',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: today, to: today }\n }\n },\n {\n label: 'Ontem',\n getRange: () => {\n const yesterday = addDays(startOfDay(new Date()), -1)\n return { from: yesterday, to: yesterday }\n }\n },\n {\n label: 'Últimos 7 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -7), to: today }\n }\n },\n {\n label: 'Últimos 15 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -15), to: today }\n }\n },\n {\n label: 'Últimos 30 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -30), to: today }\n }\n },\n {\n label: 'Últimos 60 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -60), to: today }\n }\n },\n {\n label: 'Últimos 90 dias',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: addDays(today, -90), to: today }\n }\n },\n {\n label: 'Semana passada',\n getRange: () => {\n const previousWeekStart = addDays(startOfWeek(new Date()), -7)\n return { from: previousWeekStart, to: addDays(previousWeekStart, 6) }\n }\n },\n {\n label: 'Este mês',\n getRange: () => {\n const today = startOfDay(new Date())\n return { from: startOfMonth(today), to: today }\n }\n },\n {\n label: 'Mês passado',\n getRange: () => {\n const previousMonth = new Date(new Date().getFullYear(), new Date().getMonth() - 1, 1)\n return { from: startOfMonth(previousMonth), to: endOfMonth(previousMonth) }\n }\n }\n] satisfies DateRangePickerPresetOption[]\n\nexport type DateRangePickerPresetOption = {\n label: string\n getRange: () => DateRange\n}\n\nexport type DateRangePickerProps = Omit<\n React.ComponentProps<typeof Popover>,\n 'open' | 'defaultOpen' | 'onOpenChange'\n> & {\n value?: DateRange | null\n defaultValue?: DateRange | null\n onValueChange?: (range: DateRange | null) => void\n onApply?: (range: DateRange | null) => void\n onReset?: () => void\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n locale?: Partial<Locale>\n placeholder?: string\n}\n\nexport type DateRangePickerTriggerProps = React.ComponentProps<typeof Button> & {\n asChild?: boolean\n}\n\nexport type DateRangePickerValueProps = React.ComponentProps<'span'> & {\n placeholder?: string\n}\n\nexport type DateRangePickerContentProps = React.ComponentProps<typeof PopoverContent>\n\nexport type DateRangePickerPresetsProps = React.ComponentProps<'div'> & {\n presets?: DateRangePickerPresetOption[]\n}\n\nexport type DateRangePickerPresetProps = React.ComponentProps<'button'> & {\n selected?: boolean\n}\n\nexport type DateRangePickerCalendarProps = Omit<\n React.ComponentProps<typeof Calendar>,\n 'mode' | 'numberOfMonths' | 'selected' | 'onSelect' | 'month' | 'defaultMonth'\n>\n\nexport type DateRangePickerDateFieldsProps = React.ComponentProps<'div'>\n\nexport type DateRangePickerActionsProps = React.ComponentProps<'div'>\n\nexport type DateRangePickerApplyProps = React.ComponentProps<typeof Button>\n\nexport type DateRangePickerResetProps = React.ComponentProps<typeof Button>\n\nfunction DateRangePicker({\n value: valueProp,\n defaultValue = null,\n onValueChange,\n onApply,\n onReset,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n locale,\n placeholder = defaultPlaceholder,\n children,\n ...props\n}: DateRangePickerProps) {\n const [uncontrolledValue, setUncontrolledValue] = React.useState<DateRange | null>(defaultValue)\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n\n const isValueControlled = valueProp !== undefined\n const isOpenControlled = openProp !== undefined\n const value = isValueControlled ? (valueProp ?? null) : uncontrolledValue\n const open = isOpenControlled ? openProp : uncontrolledOpen\n\n const [draft, setDraft] = React.useState<DateRange | undefined>(() => toDraft(value))\n const [month, setMonth] = React.useState<Date>(() => getRangeMonth(toDraft(value)))\n\n const updateDraft = React.useCallback((nextDraft: DateRange | undefined) => {\n const normalizedDraft = normalizeDraft(nextDraft)\n setDraft(normalizedDraft)\n\n const nextMonth = getRangeMonth(normalizedDraft)\n if (nextMonth) {\n setMonth(nextMonth)\n }\n }, [])\n\n const commitValue = React.useCallback(\n (nextValue: DateRange | null) => {\n if (!isValueControlled) {\n setUncontrolledValue(nextValue)\n }\n\n onValueChange?.(nextValue)\n },\n [isValueControlled, onValueChange]\n )\n\n const setOpen = React.useCallback(\n (nextOpen: boolean) => {\n if (nextOpen) {\n const nextDraft = toDraft(value)\n setDraft(nextDraft)\n setMonth(getRangeMonth(nextDraft))\n }\n\n if (!isOpenControlled) {\n setUncontrolledOpen(nextOpen)\n }\n\n onOpenChange?.(nextOpen)\n },\n [isOpenControlled, onOpenChange, value]\n )\n\n const apply = React.useCallback(() => {\n const nextValue = toValue(draft)\n commitValue(nextValue)\n onApply?.(nextValue)\n setOpen(false)\n }, [commitValue, draft, onApply, setOpen])\n\n const reset = React.useCallback(() => {\n setDraft(undefined)\n commitValue(null)\n onReset?.()\n setOpen(false)\n }, [commitValue, onReset, setOpen])\n\n const context = React.useMemo<DateRangePickerContextValue>(\n () => ({\n value,\n draft,\n month,\n locale,\n placeholder,\n setDraft: updateDraft,\n setMonth,\n apply,\n reset\n }),\n [apply, draft, locale, month, placeholder, reset, updateDraft, value]\n )\n\n return (\n <DateRangePickerContext.Provider value={context}>\n <Popover open={open} onOpenChange={setOpen} {...props}>\n {children ?? (\n <>\n <DateRangePickerTrigger />\n <DateRangePickerContent>\n <DateRangePickerPresets />\n <DateRangePickerDateFields />\n <DateRangePickerCalendar />\n <DateRangePickerActions />\n </DateRangePickerContent>\n </>\n )}\n </Popover>\n </DateRangePickerContext.Provider>\n )\n}\n\nfunction DateRangePickerTrigger({\n className,\n children,\n asChild = false,\n variant = 'outline',\n color = 'zinc',\n type = 'button',\n ...props\n}: DateRangePickerTriggerProps) {\n if (asChild) {\n return <PopoverTrigger asChild>{children}</PopoverTrigger>\n }\n\n return (\n <PopoverTrigger asChild>\n <Button\n type={type}\n variant={variant}\n color={color}\n className={cn('min-w-64 justify-between font-normal', className)}\n {...props}\n >\n {children ?? (\n <>\n <IconCalendar data-icon=\"inline-start\" className=\"size-4 text-muted-foreground\" />\n <DateRangePickerValue className=\"flex-1 text-left\" />\n <IconChevronDown data-icon=\"inline-end\" className=\"size-4 text-muted-foreground\" />\n </>\n )}\n </Button>\n </PopoverTrigger>\n )\n}\n\nfunction DateRangePickerValue({ className, placeholder, ...props }: DateRangePickerValueProps) {\n const { value, locale, placeholder: contextPlaceholder } = useDateRangePicker()\n\n return (\n <span data-slot=\"date-range-picker-value\" className={cn('truncate', className)} {...props}>\n {formatRange(value, locale, placeholder ?? contextPlaceholder)}\n </span>\n )\n}\n\nfunction DateRangePickerContent({\n className,\n align = 'start',\n sideOffset = 8,\n children,\n ...props\n}: DateRangePickerContentProps) {\n const childArray = React.Children.toArray(children)\n const presets = childArray.filter(isDateRangePickerPresetsElement)\n const content = childArray.filter((child) => !isDateRangePickerPresetsElement(child))\n\n return (\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className={cn('w-[calc(100vw---spacing(4))] max-w-2xl p-2', className)}\n {...props}\n >\n <div data-slot=\"date-range-picker-content\" className=\"grid gap-3 md:grid-cols-[10rem_minmax(0,1fr)]\">\n {presets}\n <div className=\"flex min-w-0 flex-col gap-3\">{content}</div>\n </div>\n </PopoverContent>\n )\n}\n\nfunction DateRangePickerPresets({\n className,\n presets = defaultPresetDefinitions,\n ...props\n}: DateRangePickerPresetsProps) {\n const { draft, setDraft } = useDateRangePicker()\n const todayRelativeValue = getRelativeDaysValue(draft, 'today')\n const yesterdayRelativeValue = getRelativeDaysValue(draft, 'yesterday')\n\n return (\n <div\n data-slot=\"date-range-picker-presets\"\n className={cn('hidden flex-col border-border pr-3 md:flex md:border-r', className)}\n {...props}\n >\n {presets.map((preset) => {\n const range = preset.getRange()\n const selected = isSameRange(draft, range)\n\n return (\n <DateRangePickerPreset key={preset.label} type=\"button\" selected={selected} onClick={() => setDraft(range)}>\n {preset.label}\n </DateRangePickerPreset>\n )\n })}\n\n <div className=\"my-3 flex flex-col gap-2\">\n <DateRangePickerRelativeField\n label=\"Dias até hoje\"\n value={todayRelativeValue}\n onValueChange={(days) => setDraft(getRelativeDaysRange(days, 'today'))}\n />\n <DateRangePickerRelativeField\n label=\"Dias até ontem\"\n value={yesterdayRelativeValue}\n onValueChange={(days) => setDraft(getRelativeDaysRange(days, 'yesterday'))}\n />\n </div>\n </div>\n )\n}\n\nfunction DateRangePickerPreset({ className, selected = false, ...props }: DateRangePickerPresetProps) {\n return (\n <button\n data-slot=\"date-range-picker-preset\"\n data-selected={selected}\n className={cn(\n 'flex h-8.5 w-full items-center border-l-3 border-border bg-transparent px-2 text-left text-sm text-foreground transition-colors outline-none',\n 'hover:border-primary hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-primary-950 dark:hover:text-primary-300',\n 'focus-visible:border-primary focus-visible:ring-3 focus-visible:ring-ring/50',\n 'data-[selected=true]:border-primary data-[selected=true]:bg-primary-50 data-[selected=true]:text-primary-700 dark:data-[selected=true]:bg-primary-950 dark:data-[selected=true]:text-primary-300',\n className\n )}\n aria-pressed={selected}\n {...props}\n />\n )\n}\n\nfunction DateRangePickerRelativeField({\n label,\n value,\n onValueChange\n}: {\n label: string\n value: number | undefined\n onValueChange: (days: number) => void\n}) {\n const id = React.useId()\n const [inputValue, setInputValue] = React.useState(() => formatRelativeInputValue(value))\n\n React.useEffect(() => {\n setInputValue(formatRelativeInputValue(value))\n }, [value])\n\n return (\n <div className=\"flex items-center gap-2 text-sm text-foreground\">\n <Input\n id={id}\n type=\"number\"\n name={label}\n min={1}\n step={1}\n value={inputValue}\n className=\"h-7 w-9 rounded-md px-1 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none\"\n aria-label={label}\n onChange={(event) => {\n const nextValue = event.target.value\n setInputValue(nextValue)\n\n if (nextValue === '') return\n\n const days = parsePositiveInteger(nextValue)\n if (!days) return\n onValueChange(days)\n }}\n />\n <label htmlFor={id}>{label}</label>\n </div>\n )\n}\n\nfunction DateRangePickerCalendar({\n className,\n showOutsideDays = false,\n onMonthChange,\n ...props\n}: DateRangePickerCalendarProps) {\n const { draft, locale, month, setDraft, setMonth } = useDateRangePicker()\n\n return (\n <Calendar\n mode=\"range\"\n numberOfMonths={2}\n showOutsideDays={showOutsideDays}\n month={month}\n onMonthChange={(nextMonth) => {\n setMonth(nextMonth)\n onMonthChange?.(nextMonth)\n }}\n selected={draft}\n onSelect={setDraft}\n locale={locale}\n className={cn('mx-auto bg-transparent p-0', className)}\n {...props}\n />\n )\n}\n\nfunction DateRangePickerDateFields({ className, ...props }: DateRangePickerDateFieldsProps) {\n const { draft, setDraft } = useDateRangePicker()\n\n return (\n <div\n data-slot=\"date-range-picker-date-fields\"\n className={cn(\n 'pb-2 border-b flex justify-between gap-2 flex-wrap flex-col sm:flex-row sm:items-center',\n className\n )}\n {...props}\n >\n <Input\n type=\"date\"\n value={formatInputDate(draft?.from)}\n className=\"sm:w-max\"\n onChange={(event) => {\n if (event.target.value === '') {\n setDraft(undefined)\n return\n }\n\n const date = parseInputDate(event.target.value)\n if (!date) return\n setDraft(normalizeDraft({ from: date, to: draft?.to }))\n }}\n />\n <IconArrowRight className=\"size-4 text-primary hidden sm:block\" />\n <Input\n type=\"date\"\n value={formatInputDate(draft?.to)}\n className=\"sm:w-max\"\n onChange={(event) => {\n if (event.target.value === '') {\n setDraft(undefined)\n return\n }\n\n const date = parseInputDate(event.target.value)\n if (!date) return\n setDraft(normalizeDraft({ from: draft?.from, to: date }))\n }}\n />\n </div>\n )\n}\n\nfunction DateRangePickerActions({ className, children, ...props }: DateRangePickerActionsProps) {\n return (\n <div data-slot=\"date-range-picker-actions\" className={cn('flex items-center gap-2 mt-auto', className)} {...props}>\n {children ?? (\n <>\n <DateRangePickerReset />\n <DateRangePickerApply />\n </>\n )}\n </div>\n )\n}\n\nfunction DateRangePickerApply({ children = 'Aplicar', onClick, className, ...props }: DateRangePickerApplyProps) {\n const { apply } = useDateRangePicker()\n\n return (\n <Button\n size=\"sm\"\n className={cn('flex-1', className)}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n apply()\n }\n }}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction DateRangePickerReset({\n children = 'Resetar',\n onClick,\n variant = 'outline',\n color = 'zinc',\n className,\n ...props\n}: DateRangePickerResetProps) {\n const { reset } = useDateRangePicker()\n\n return (\n <Button\n size=\"sm\"\n className={cn('flex-1', className)}\n variant={variant}\n color={color}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n reset()\n }\n }}\n {...props}\n >\n {children}\n </Button>\n )\n}\n\nfunction useDateRangePicker() {\n const context = React.useContext(DateRangePickerContext)\n\n if (!context) {\n throw new Error('DateRangePicker components must be used within DateRangePicker.')\n }\n\n return context\n}\n\nfunction isDateRangePickerPresetsElement(child: React.ReactNode) {\n return React.isValidElement(child) && child.type === DateRangePickerPresets\n}\n\nfunction toDraft(range: DateRange | null | undefined) {\n return normalizeDraft(range ?? undefined)\n}\n\nfunction toValue(range: DateRange | undefined): DateRange | null {\n return normalizeDraft(range) ?? null\n}\n\nfunction getRangeMonth(range: DateRange | undefined) {\n return startOfDay(range?.from ?? range?.to ?? new Date())\n}\n\nfunction normalizeDraft(range: DateRange | undefined): DateRange | undefined {\n if (!range?.from && !range?.to) return undefined\n\n if (range.from && range.to && range.from > range.to) {\n return { from: startOfDay(range.to), to: startOfDay(range.from) }\n }\n\n return {\n from: range.from ? startOfDay(range.from) : undefined,\n to: range.to ? startOfDay(range.to) : undefined\n }\n}\n\nfunction formatRange(range: DateRange | null | undefined, locale: Partial<Locale> | undefined, placeholder: string) {\n if (!range?.from && !range?.to) return placeholder\n\n if (range.from && range.to) {\n return `${formatDisplayDate(range.from, locale)} - ${formatDisplayDate(range.to, locale)}`\n }\n\n return formatDisplayDate(range.from ?? range.to, locale)\n}\n\nfunction formatDisplayDate(date: Date | undefined, locale: Partial<Locale> | undefined) {\n if (!date) return ''\n\n return new Intl.DateTimeFormat(locale?.code ?? 'pt-BR', {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric'\n }).format(date)\n}\n\nfunction formatInputDate(date: Date | undefined) {\n if (!date) return ''\n\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n\n return `${year}-${month}-${day}`\n}\n\nfunction parseInputDate(value: string) {\n if (!value) return undefined\n\n const match = /^(?<year>\\d{4})-(?<month>\\d{2})-(?<day>\\d{2})$/.exec(value)\n if (!match?.groups) return undefined\n\n const year = Number(match.groups.year)\n const month = Number(match.groups.month)\n const day = Number(match.groups.day)\n const date = new Date(year, month - 1, day)\n\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return undefined\n }\n\n return date\n}\n\nfunction parsePositiveInteger(value: string) {\n if (!value) return undefined\n\n const days = Number(value)\n if (!Number.isInteger(days) || days < 1) return undefined\n\n return days\n}\n\nfunction formatRelativeInputValue(value: number | undefined) {\n return value ? String(value) : ''\n}\n\nfunction getRelativeDaysRange(days: number, target: 'today' | 'yesterday'): DateRange {\n const today = startOfDay(new Date())\n const targetDate = target === 'today' ? addDays(today, -1) : addDays(today, -2)\n\n return {\n from: addDays(targetDate, -days + 1),\n to: targetDate\n }\n}\n\nfunction getRelativeDaysValue(range: DateRange | undefined, target: 'today' | 'yesterday') {\n if (!range?.from || !range.to) return undefined\n\n const today = startOfDay(new Date())\n const targetDate = target === 'today' ? addDays(today, -1) : addDays(today, -2)\n if (!isSameDay(range.to, targetDate)) return undefined\n\n const days = differenceInCalendarDays(targetDate, startOfDay(range.from)) + 1\n return days > 0 ? days : undefined\n}\n\nfunction isSameRange(left: DateRange | undefined, right: DateRange | undefined) {\n return isSameDay(left?.from, right?.from) && isSameDay(left?.to, right?.to)\n}\n\nfunction isSameDay(left: Date | undefined, right: Date | undefined) {\n if (!left || !right) return left === right\n\n return (\n left.getFullYear() === right.getFullYear() &&\n left.getMonth() === right.getMonth() &&\n left.getDate() === right.getDate()\n )\n}\n\nfunction startOfDay(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\nfunction startOfWeek(date: Date) {\n const day = startOfDay(date)\n return addDays(day, -day.getDay())\n}\n\nfunction startOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), 1)\n}\n\nfunction endOfMonth(date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0)\n}\n\nfunction differenceInCalendarDays(left: Date, right: Date) {\n const millisecondsPerDay = 24 * 60 * 60 * 1000\n return Math.round((startOfDay(left).getTime() - startOfDay(right).getTime()) / millisecondsPerDay)\n}\n\nfunction addDays(date: Date, amount: number) {\n const nextDate = startOfDay(date)\n nextDate.setDate(nextDate.getDate() + amount)\n return nextDate\n}\n\nexport {\n type DateRange,\n DateRangePicker,\n DateRangePickerActions,\n DateRangePickerApply,\n DateRangePickerCalendar,\n DateRangePickerContent,\n DateRangePickerDateFields,\n DateRangePickerPreset,\n DateRangePickerPresets,\n DateRangePickerReset,\n DateRangePickerTrigger,\n DateRangePickerValue\n}\n"],"mappings":"sbAuBA,MAAM,EAAyB,EAAM,cAAkD,KAAK,CAItF,EAA2B,CAC/B,CACE,MAAO,OACP,aAAgB,CACd,IAAM,EAAQ,WAAW,IAAI,KAAO,CACpC,MAAO,CAAE,KAAM,EAAO,GAAI,EAAO,EAEpC,CACD,CACE,MAAO,QACP,aAAgB,CACd,IAAM,EAAY,QAAQ,WAAW,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yBAAyB,EAAY,WAAW,EAAM,KAAK,CAAC,CAAG,EAC5E,OAAO,EAAO,EAAI,EAAO,IAAA,GAG3B,SAAS,YAAY,EAA6B,EAA8B,CAC9E,OAAO,UAAU,GAAM,KAAM,GAAO,KAAK,EAAI,UAAU,GAAM,GAAI,GAAO,GAAG,CAG7E,SAAS,UAAU,EAAwB,EAAyB,CAGlE,MAFI,CAAC,GAAQ,CAAC,EAAc,IAAS,EAGnC,EAAK,aAAa,GAAK,EAAM,aAAa,EAC1C,EAAK,UAAU,GAAK,EAAM,UAAU,EACpC,EAAK,SAAS,GAAK,EAAM,SAAS,CAItC,SAAS,WAAW,EAAY,CAC9B,OAAO,IAAI,KAAK,EAAK,aAAa,CAAE,EAAK,UAAU,CAAE,EAAK,SAAS,CAAC,CAGtE,SAAS,YAAY,EAAY,CAC/B,IAAM,EAAM,WAAW,EAAK,CAC5B,OAAO,QAAQ,EAAK,CAAC,EAAI,QAAQ,CAAC,CAGpC,SAAS,aAAa,EAAY,CAChC,OAAO,IAAI,KAAK,EAAK,aAAa,CAAE,EAAK,UAAU,CAAE,EAAE,CAGzD,SAAS,WAAW,EAAY,CAC9B,OAAO,IAAI,KAAK,EAAK,aAAa,CAAE,EAAK,UAAU,CAAG,EAAG,EAAE,CAG7D,SAAS,yBAAyB,EAAY,EAAa,CAEzD,OAAO,KAAK,OAAO,WAAW,EAAK,CAAC,SAAS,CAAG,WAAW,EAAM,CAAC,SAAS,GADhD,KAAU,GAAK,KACwD,CAGpG,SAAS,QAAQ,EAAY,EAAgB,CAC3C,IAAM,EAAW,WAAW,EAAK,CAEjC,OADA,EAAS,QAAQ,EAAS,SAAS,CAAG,EAAO,CACtC"}
@@ -0,0 +1,37 @@
1
+ import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+ import * as React from "react";
4
+
5
+ //#region src/components/grid.d.ts
6
+ type GridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
+ type GridProps = React.ComponentProps<'div'> & {
8
+ gap?: GridSpacing;
9
+ rowGap?: GridSpacing;
10
+ columnGap?: GridSpacing;
11
+ templateRows?: string;
12
+ templateColumns?: string;
13
+ };
14
+ declare function Grid({
15
+ className,
16
+ gap,
17
+ rowGap,
18
+ columnGap,
19
+ templateRows,
20
+ templateColumns,
21
+ style,
22
+ ...props
23
+ }: GridProps): _$react_jsx_runtime0.JSX.Element;
24
+ type GridItemProps = React.ComponentProps<'div'> & {
25
+ rowSpan?: number;
26
+ colSpan?: number;
27
+ };
28
+ declare function GridItem({
29
+ className,
30
+ rowSpan,
31
+ colSpan,
32
+ style,
33
+ ...props
34
+ }: GridItemProps): _$react_jsx_runtime0.JSX.Element;
35
+ //#endregion
36
+ export { Grid, GridItem, GridItemProps, GridProps };
37
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1,2 @@
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";const n={xs:1,sm:2,md:3,lg:4,xl:6};function toSpacingValue(e){return`calc(var(--spacing) * ${n[e]})`}function Grid({className:n,gap:r,rowGap:i,columnGap:a,templateRows:o,templateColumns:s=`repeat(12, minmax(0, 1fr))`,style:c,...l}){return t(`div`,{"data-slot":`grid`,className:e(`grid min-w-0`,`grid-cols-(--grid-template-columns) grid-rows-(--grid-template-rows)`,`gap-(--grid-gap) gap-y-(--grid-row-gap) gap-x-(--grid-column-gap)`,n),style:{"--grid-template-columns":s,"--grid-template-rows":o,"--grid-gap":r?toSpacingValue(r):`0px`,"--grid-row-gap":i?toSpacingValue(i):`var(--grid-gap)`,"--grid-column-gap":a?toSpacingValue(a):`var(--grid-gap)`,...c},...l})}function GridItem({className:n,rowSpan:r,colSpan:i=12,style:a,...o}){return t(`div`,{"data-slot":`grid-item`,className:e(`min-w-0`,`col-[span_var(--grid-item-col-span)/span_var(--grid-item-col-span)]`,`row-[span_var(--grid-item-row-span)/span_var(--grid-item-row-span)]`,n),style:{"--grid-item-col-span":i,"--grid-item-row-span":r,...a},...o})}export{Grid,GridItem};
2
+ //# sourceMappingURL=grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.js","names":[],"sources":["../../src/components/grid.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\ntype GridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n\nconst spacingScale: Record<GridSpacing, number> = {\n xs: 1,\n sm: 2,\n md: 3,\n lg: 4,\n xl: 6\n}\n\nfunction toSpacingValue(spacing: GridSpacing) {\n return `calc(var(--spacing) * ${spacingScale[spacing]})`\n}\n\nexport type GridProps = React.ComponentProps<'div'> & {\n gap?: GridSpacing\n rowGap?: GridSpacing\n columnGap?: GridSpacing\n templateRows?: string\n templateColumns?: string\n}\n\nfunction Grid({\n className,\n gap,\n rowGap,\n columnGap,\n templateRows,\n templateColumns = 'repeat(12, minmax(0, 1fr))',\n style,\n ...props\n}: GridProps) {\n return (\n <div\n data-slot=\"grid\"\n className={cn(\n 'grid min-w-0',\n 'grid-cols-(--grid-template-columns) grid-rows-(--grid-template-rows)',\n 'gap-(--grid-gap) gap-y-(--grid-row-gap) gap-x-(--grid-column-gap)',\n className\n )}\n style={\n {\n '--grid-template-columns': templateColumns,\n '--grid-template-rows': templateRows,\n '--grid-gap': gap ? toSpacingValue(gap) : '0px',\n '--grid-row-gap': rowGap ? toSpacingValue(rowGap) : 'var(--grid-gap)',\n '--grid-column-gap': columnGap ? toSpacingValue(columnGap) : 'var(--grid-gap)',\n ...style\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport type GridItemProps = React.ComponentProps<'div'> & {\n rowSpan?: number\n colSpan?: number\n}\n\nfunction GridItem({ className, rowSpan, colSpan = 12, style, ...props }: GridItemProps) {\n return (\n <div\n data-slot=\"grid-item\"\n className={cn(\n 'min-w-0',\n 'col-[span_var(--grid-item-col-span)/span_var(--grid-item-col-span)]',\n 'row-[span_var(--grid-item-row-span)/span_var(--grid-item-row-span)]',\n className\n )}\n style={\n {\n '--grid-item-col-span': colSpan,\n '--grid-item-row-span': rowSpan,\n ...style\n } as React.CSSProperties\n }\n {...props}\n />\n )\n}\n\nexport { Grid, GridItem }\n"],"mappings":"0GAMA,MAAM,EAA4C,CAChD,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACJ,GAAI,EACL,CAED,SAAS,eAAe,EAAsB,CAC5C,MAAO,yBAAyB,EAAa,GAAS,GAWxD,SAAS,KAAK,CACZ,YACA,MACA,SACA,YACA,eACA,kBAAkB,6BAClB,QACA,GAAG,GACS,CACZ,OACE,EAAC,MAAD,CACE,YAAU,OACV,UAAW,EACT,eACA,uEACA,oEACA,EACD,CACD,MACE,CACE,0BAA2B,EAC3B,uBAAwB,EACxB,aAAc,EAAM,eAAe,EAAI,CAAG,MAC1C,iBAAkB,EAAS,eAAe,EAAO,CAAG,kBACpD,oBAAqB,EAAY,eAAe,EAAU,CAAG,kBAC7D,GAAG,EACJ,CAEH,GAAI,EACJ,CAAA,CASN,SAAS,SAAS,CAAE,YAAW,UAAS,UAAU,GAAI,QAAO,GAAG,GAAwB,CACtF,OACE,EAAC,MAAD,CACE,YAAU,YACV,UAAW,EACT,UACA,sEACA,sEACA,EACD,CACD,MACE,CACE,uBAAwB,EACxB,uBAAwB,EACxB,GAAG,EACJ,CAEH,GAAI,EACJ,CAAA"}
@@ -6,13 +6,13 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
6
6
 
7
7
  //#region src/components/group.d.ts
8
8
  declare const groupVariants: (props?: ({
9
- size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
9
+ gap?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  wrap?: boolean | null | undefined;
11
11
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
12
12
  type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>;
13
13
  declare function Group({
14
14
  className,
15
- size,
15
+ gap,
16
16
  wrap,
17
17
  ...props
18
18
  }: GroupProps): _$react_jsx_runtime0.JSX.Element;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`flex flex-row items-center`,{variants:{size:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`},wrap:{true:`flex-wrap`,false:`flex-nowrap`}},defaultVariants:{size:`md`,wrap:!1}});function Group({className:n,size:i=`md`,wrap:a=!1,...o}){return t(`div`,{"data-slot":`group`,"data-size":i,"data-wrap":a?`true`:`false`,className:e(r({size:i,wrap:a}),n),...o})}export{Group,r as groupVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`flex flex-row items-center`,{variants:{gap:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`},wrap:{true:`flex-wrap`,false:`flex-nowrap`}},defaultVariants:{gap:`md`,wrap:!1}});function Group({className:n,gap:i=`md`,wrap:a=!1,...o}){return t(`div`,{"data-slot":`group`,"data-gap":i,"data-wrap":a?`true`:`false`,className:e(r({gap:i,wrap:a}),n),...o})}export{Group,r as groupVariants};
2
2
  //# sourceMappingURL=group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","names":[],"sources":["../../src/components/group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst groupVariants = cva('flex flex-row items-center', {\n variants: {\n size: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap'\n }\n },\n defaultVariants: {\n size: 'md',\n wrap: false\n }\n})\n\nexport type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>\n\nfunction Group({ className, size = 'md', wrap = false, ...props }: GroupProps) {\n return (\n <div\n data-slot=\"group\"\n data-size={size}\n data-wrap={wrap ? 'true' : 'false'}\n className={cn(groupVariants({ size, wrap }), className)}\n {...props}\n />\n )\n}\n\nexport { Group, groupVariants }\n"],"mappings":"yJAMA,MAAM,EAAgB,EAAI,6BAA8B,CACtD,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACD,KAAM,CACJ,KAAM,YACN,MAAO,cACR,CACF,CACD,gBAAiB,CACf,KAAM,KACN,KAAM,GACP,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,OAAO,KAAM,OAAO,GAAO,GAAG,GAAqB,CAC7E,OACE,EAAC,MAAD,CACE,YAAU,QACV,YAAW,EACX,YAAW,EAAO,OAAS,QAC3B,UAAW,EAAG,EAAc,CAAE,OAAM,OAAM,CAAC,CAAE,EAAU,CACvD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"group.js","names":[],"sources":["../../src/components/group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils'\n\nconst groupVariants = cva('flex flex-row items-center', {\n variants: {\n gap: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n },\n wrap: {\n true: 'flex-wrap',\n false: 'flex-nowrap'\n }\n },\n defaultVariants: {\n gap: 'md',\n wrap: false\n }\n})\n\nexport type GroupProps = React.ComponentProps<'div'> & VariantProps<typeof groupVariants>\n\nfunction Group({ className, gap = 'md', wrap = false, ...props }: GroupProps) {\n return (\n <div\n data-slot=\"group\"\n data-gap={gap}\n data-wrap={wrap ? 'true' : 'false'}\n className={cn(groupVariants({ gap, wrap }), className)}\n {...props}\n />\n )\n}\n\nexport { Group, groupVariants }\n"],"mappings":"yJAMA,MAAM,EAAgB,EAAI,6BAA8B,CACtD,SAAU,CACR,IAAK,CACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACD,KAAM,CACJ,KAAM,YACN,MAAO,cACR,CACF,CACD,gBAAiB,CACf,IAAK,KACL,KAAM,GACP,CACF,CAAC,CAIF,SAAS,MAAM,CAAE,YAAW,MAAM,KAAM,OAAO,GAAO,GAAG,GAAqB,CAC5E,OACE,EAAC,MAAD,CACE,YAAU,QACV,WAAU,EACV,YAAW,EAAO,OAAS,QAC3B,UAAW,EAAG,EAAc,CAAE,MAAK,OAAM,CAAC,CAAE,EAAU,CACtD,GAAI,EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`text-foreground font-semibold tracking-tight`,{variants:{size:{xs:`text-lg leading-7`,sm:`text-xl leading-8`,md:`text-2xl leading-tight`,lg:`text-3xl leading-tight`,xl:`text-4xl leading-none`}},defaultVariants:{size:`md`}});function Heading({className:r,size:a=`md`,asChild:o=!1,...s}){return n(o?t.Root:`h2`,{"data-slot":`heading`,"data-size":a,className:e(i({size:a}),r),...s})}export{Heading,i as headingVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`text-foreground font-semibold tracking-tight`,{variants:{size:{xs:`text-lg`,sm:`text-xl`,md:`text-2xl`,lg:`text-3xl`,xl:`text-4xl`}},defaultVariants:{size:`md`}});function Heading({className:r,size:a=`md`,asChild:o=!1,...s}){return n(o?t.Root:`h2`,{"data-slot":`heading`,"data-size":a,className:e(i({size:a}),r),...s})}export{Heading,i as headingVariants};
2
2
  //# sourceMappingURL=heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst headingVariants = cva('text-foreground font-semibold tracking-tight', {\n variants: {\n size: {\n xs: 'text-lg leading-7',\n sm: 'text-xl leading-8',\n md: 'text-2xl leading-tight',\n lg: 'text-3xl leading-tight',\n xl: 'text-4xl leading-none'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type HeadingProps = React.ComponentProps<'h2'> &\n VariantProps<typeof headingVariants> & {\n asChild?: boolean\n }\n\nfunction Heading({ className, size = 'md', asChild = false, ...props }: HeadingProps) {\n const Comp = asChild ? Slot.Root : 'h2'\n\n return <Comp data-slot=\"heading\" data-size={size} className={cn(headingVariants({ size }), className)} {...props} />\n}\n\nexport { Heading, headingVariants }\n"],"mappings":"yLAOA,MAAM,EAAkB,EAAI,+CAAgD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,yBACJ,GAAI,yBACJ,GAAI,wBACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAOF,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,UAAU,GAAO,GAAG,GAAuB,CAGpF,OAAO,EAFM,EAAU,EAAK,KAAO,KAE5B,CAAM,YAAU,UAAU,YAAW,EAAM,UAAW,EAAG,EAAgB,CAAE,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,EAAS,CAAA"}
1
+ {"version":3,"file":"heading.js","names":[],"sources":["../../src/components/heading.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nconst headingVariants = cva('text-foreground font-semibold tracking-tight', {\n variants: {\n size: {\n xs: 'text-lg',\n sm: 'text-xl',\n md: 'text-2xl',\n lg: 'text-3xl',\n xl: 'text-4xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type HeadingProps = React.ComponentProps<'h2'> &\n VariantProps<typeof headingVariants> & {\n asChild?: boolean\n }\n\nfunction Heading({ className, size = 'md', asChild = false, ...props }: HeadingProps) {\n const Comp = asChild ? Slot.Root : 'h2'\n\n return <Comp data-slot=\"heading\" data-size={size} className={cn(headingVariants({ size }), className)} {...props} />\n}\n\nexport { Heading, headingVariants }\n"],"mappings":"yLAOA,MAAM,EAAkB,EAAI,+CAAgD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,WACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAOF,SAAS,QAAQ,CAAE,YAAW,OAAO,KAAM,UAAU,GAAO,GAAG,GAAuB,CAGpF,OAAO,EAFM,EAAU,EAAK,KAAO,KAE5B,CAAM,YAAU,UAAU,YAAW,EAAM,UAAW,EAAG,EAAgB,CAAE,OAAM,CAAC,CAAE,EAAU,CAAE,GAAI,EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Label({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-2 select-none text-sm leading-none font-medium`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r),...i})}export{Label};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function Label({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-2 select-none text-sm leading-none`,`group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r),...i})}export{Label};
2
2
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 select-none text-sm leading-none font-medium',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"2IAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAACA,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,uEACA,uFACA,4DACA,EACD,CACD,GAAI,EACJ,CAAA"}
1
+ {"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Label as LabelPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = React.ComponentProps<typeof LabelPrimitive.Root>\n\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 select-none text-sm leading-none',\n 'group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Label }\n"],"mappings":"2IAQA,SAAS,MAAM,CAAE,YAAW,GAAG,GAAqB,CAClD,OACE,EAACA,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,2DACA,uFACA,4DACA,EACD,CACD,GAAI,EACJ,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import*as a from"react";const o=a.createContext({type:`unordered`}),s=i(`m-0 flex list-none flex-col p-0 text-foreground`,{variants:{size:{xs:`text-xs leading-4`,sm:`text-sm leading-5`,md:`text-base leading-6`,lg:`text-lg leading-7`,xl:`text-xl leading-8`},spacing:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{size:`md`,spacing:`md`}});function List({className:t,children:r,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return n(o.Provider,{value:{type:i},children:n(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:e(s({size:a,spacing:c}),t),...l,children:injectListItemIndices(r)})})}function ListItem({className:t,children:i,__index:s,...c}){let{type:l}=a.useContext(o),u=a.Children.toArray(i),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return r(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:e(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,t),...c,children:[n(`span`,{"aria-hidden":`true`,className:e(`shrink-0`,d&&`flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]`,!d&&p&&`min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground`,!d&&!p&&`flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground`),children:d??(p?`${(s??0)+1}.`:n(`span`,{className:`size-1.5 rounded-full bg-current`}))}),n(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:r,asChild:i=!1,...a}){return n(i?t.Root:`span`,{"data-slot":`list-icon`,className:e(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,i&&`size-4`,r),...a})}function injectListItemIndices(e,t={current:0}){return a.Children.map(e,e=>{if(!a.isValidElement(e))return e;if(e.type===a.Fragment){let r=e;return n(a.Fragment,{children:injectListItemIndices(r.props.children,t)},e.key)}return e.type===ListItem?a.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return a.isValidElement(e)&&e.type===ListIcon}export{List,ListIcon,ListItem,s as listVariants};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import*as a from"react";const o=a.createContext({type:`unordered`}),s=i(`m-0 flex list-none flex-col p-0 text-foreground`,{variants:{size:{xs:`text-xs`,sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`},spacing:{xs:`gap-1`,sm:`gap-2`,md:`gap-3`,lg:`gap-4`,xl:`gap-6`}},defaultVariants:{size:`md`,spacing:`md`}});function List({className:t,children:r,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return n(o.Provider,{value:{type:i},children:n(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:e(s({size:a,spacing:c}),t),...l,children:injectListItemIndices(r)})})}function ListItem({className:t,children:i,__index:s,...c}){let{type:l}=a.useContext(o),u=a.Children.toArray(i),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return r(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:e(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,t),...c,children:[n(`span`,{"aria-hidden":`true`,className:e(`shrink-0`,d&&`flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]`,!d&&p&&`min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground`,!d&&!p&&`flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground`),children:d??(p?`${(s??0)+1}.`:n(`span`,{className:`size-1.5 rounded-full bg-current`}))}),n(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:r,asChild:i=!1,...a}){return n(i?t.Root:`span`,{"data-slot":`list-icon`,className:e(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,i&&`size-4`,r),...a})}function injectListItemIndices(e,t={current:0}){return a.Children.map(e,e=>{if(!a.isValidElement(e))return e;if(e.type===a.Fragment){let r=e;return n(a.Fragment,{children:injectListItemIndices(r.props.children,t)},e.key)}return e.type===ListItem?a.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return a.isValidElement(e)&&e.type===ListIcon}export{List,ListIcon,ListItem,s as listVariants};
2
2
  //# sourceMappingURL=list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\ntype ListType = 'unordered' | 'ordered'\n\ntype ListContextValue = {\n type: ListType\n}\n\ntype InternalListItemProps = {\n __index?: number\n}\n\nconst ListContext = React.createContext<ListContextValue>({\n type: 'unordered'\n})\n\nconst listVariants = cva('m-0 flex list-none flex-col p-0 text-foreground', {\n variants: {\n size: {\n xs: 'text-xs leading-4',\n sm: 'text-sm leading-5',\n md: 'text-base leading-6',\n lg: 'text-lg leading-7',\n xl: 'text-xl leading-8'\n },\n spacing: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n size: 'md',\n spacing: 'md'\n }\n})\n\nexport type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> &\n Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> &\n VariantProps<typeof listVariants> & {\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\n\nfunction List({ className, children, type = 'unordered', size = 'md', spacing = 'md', ...props }: ListProps) {\n const Comp = type === 'ordered' ? 'ol' : 'ul'\n\n return (\n <ListContext.Provider value={{ type }}>\n <Comp\n data-slot=\"list\"\n data-type={type}\n data-size={size}\n data-spacing={spacing}\n className={cn(listVariants({ size, spacing }), className)}\n {...props}\n >\n {injectListItemIndices(children)}\n </Comp>\n </ListContext.Provider>\n )\n}\n\nfunction ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps) {\n const { type } = React.useContext(ListContext)\n const items = React.Children.toArray(children)\n const icon = items.find(isListIconElement) ?? null\n const content = icon ? items.filter((item) => item !== icon) : items\n const isOrdered = type === 'ordered'\n\n return (\n <li\n data-slot=\"list-item\"\n data-type={type}\n data-has-icon={icon ? 'true' : 'false'}\n className={cn('grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3', className)}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n icon && 'flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]',\n !icon && isOrdered && 'min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground',\n !icon && !isOrdered && 'flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground'\n )}\n >\n {icon ?? (isOrdered ? `${(__index ?? 0) + 1}.` : <span className=\"size-1.5 rounded-full bg-current\" />)}\n </span>\n <div className=\"min-w-0\">{content}</div>\n </li>\n )\n}\n\nfunction ListIcon({ className, asChild = false, ...props }: ListIconProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\n data-slot=\"list-icon\"\n className={cn(\n 'inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4',\n asChild && 'size-4',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction injectListItemIndices(children: React.ReactNode, indexRef = { current: 0 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return child\n }\n\n if (child.type === React.Fragment) {\n const fragment = child as React.ReactElement<{ children?: React.ReactNode }>\n\n return <React.Fragment key={child.key}>{injectListItemIndices(fragment.props.children, indexRef)}</React.Fragment>\n }\n\n if (child.type === ListItem) {\n return React.cloneElement(child as React.ReactElement<ListItemProps & InternalListItemProps>, {\n __index: indexRef.current++\n })\n }\n\n return child\n })\n}\n\nfunction isListIconElement(child: React.ReactNode): child is React.ReactElement<ListIconProps> {\n return React.isValidElement(child) && child.type === ListIcon\n}\n\nexport { List, ListIcon, ListItem, listVariants }\n"],"mappings":"2NAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,YACP,CAAC,CAEI,EAAe,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,sBACJ,GAAI,oBACJ,GAAI,oBACL,CACD,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACF,CACD,gBAAiB,CACf,KAAM,KACN,QAAS,KACV,CACF,CAAC,CAcF,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAG,GAAoB,CAC3G,IAAM,EAAO,IAAS,UAAY,KAAO,KAEzC,OACE,EAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,OAAM,UACnC,EAAC,EAAD,CACE,YAAU,OACV,YAAW,EACX,YAAW,EACX,eAAc,EACd,UAAW,EAAG,EAAa,CAAE,OAAM,UAAS,CAAC,CAAE,EAAU,CACzD,GAAI,WAEH,sBAAsB,EAAS,CAC3B,CAAA,CACc,CAAA,CAI3B,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAG,GAAgD,CACnG,GAAM,CAAE,QAAS,EAAM,WAAW,EAAY,CACxC,EAAQ,EAAM,SAAS,QAAQ,EAAS,CACxC,EAAO,EAAM,KAAK,kBAAkB,EAAI,KACxC,EAAU,EAAO,EAAM,OAAQ,GAAS,IAAS,EAAK,CAAG,EACzD,EAAY,IAAS,UAE3B,OACE,EAAC,KAAD,CACE,YAAU,YACV,YAAW,EACX,gBAAe,EAAO,OAAS,QAC/B,UAAW,EAAG,0DAA2D,EAAU,CACnF,GAAI,WALN,CAOE,EAAC,OAAD,CACE,cAAY,OACZ,UAAW,EACT,WACA,GAAQ,0FACR,CAAC,GAAQ,GAAa,2EACtB,CAAC,GAAQ,CAAC,GAAa,oFACxB,UAEA,IAAS,EAAY,IAAI,GAAW,GAAK,EAAE,GAAK,EAAC,OAAD,CAAM,UAAU,mCAAqC,CAAA,EACjG,CAAA,CACP,EAAC,MAAD,CAAK,UAAU,mBAAW,EAAc,CAAA,CACrC,GAIT,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAG,GAAwB,CAGzE,OACE,EAHW,EAAU,EAAK,KAAO,OAGjC,CACE,YAAU,YACV,UAAW,EACT,+EACA,GAAW,SACX,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,EAAG,CAAmB,CACpG,OAAO,EAAM,SAAS,IAAI,EAAW,GAAU,CAC7C,GAAI,CAAC,EAAM,eAAe,EAAM,CAC9B,OAAO,EAGT,GAAI,EAAM,OAAS,EAAM,SAAU,CACjC,IAAM,EAAW,EAEjB,OAAO,EAAC,EAAM,SAAP,CAAA,SAAiC,sBAAsB,EAAS,MAAM,SAAU,EAAS,CAAkB,CAAtF,EAAM,IAAgF,CASpH,OANI,EAAM,OAAS,SACV,EAAM,aAAa,EAAoE,CAC5F,QAAS,EAAS,UACnB,CAAC,CAGG,GACP,CAGJ,SAAS,kBAAkB,EAAoE,CAC7F,OAAO,EAAM,eAAe,EAAM,EAAI,EAAM,OAAS"}
1
+ {"version":3,"file":"list.js","names":[],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Slot } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\ntype ListType = 'unordered' | 'ordered'\n\ntype ListContextValue = {\n type: ListType\n}\n\ntype InternalListItemProps = {\n __index?: number\n}\n\nconst ListContext = React.createContext<ListContextValue>({\n type: 'unordered'\n})\n\nconst listVariants = cva('m-0 flex list-none flex-col p-0 text-foreground', {\n variants: {\n size: {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n xl: 'text-xl'\n },\n spacing: {\n xs: 'gap-1',\n sm: 'gap-2',\n md: 'gap-3',\n lg: 'gap-4',\n xl: 'gap-6'\n }\n },\n defaultVariants: {\n size: 'md',\n spacing: 'md'\n }\n})\n\nexport type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> &\n Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> &\n VariantProps<typeof listVariants> & {\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = React.ComponentProps<'span'> & {\n asChild?: boolean\n}\n\nfunction List({ className, children, type = 'unordered', size = 'md', spacing = 'md', ...props }: ListProps) {\n const Comp = type === 'ordered' ? 'ol' : 'ul'\n\n return (\n <ListContext.Provider value={{ type }}>\n <Comp\n data-slot=\"list\"\n data-type={type}\n data-size={size}\n data-spacing={spacing}\n className={cn(listVariants({ size, spacing }), className)}\n {...props}\n >\n {injectListItemIndices(children)}\n </Comp>\n </ListContext.Provider>\n )\n}\n\nfunction ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps) {\n const { type } = React.useContext(ListContext)\n const items = React.Children.toArray(children)\n const icon = items.find(isListIconElement) ?? null\n const content = icon ? items.filter((item) => item !== icon) : items\n const isOrdered = type === 'ordered'\n\n return (\n <li\n data-slot=\"list-item\"\n data-type={type}\n data-has-icon={icon ? 'true' : 'false'}\n className={cn('grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3', className)}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n 'shrink-0',\n icon && 'flex min-h-5 min-w-4 items-center justify-center pt-0.5 text-primary [&_svg]:size-[1em]',\n !icon && isOrdered && 'min-w-7 pt-0.5 text-right font-medium tabular-nums text-muted-foreground',\n !icon && !isOrdered && 'flex min-h-5 min-w-4 items-start justify-center pt-[0.45em] text-muted-foreground'\n )}\n >\n {icon ?? (isOrdered ? `${(__index ?? 0) + 1}.` : <span className=\"size-1.5 rounded-full bg-current\" />)}\n </span>\n <div className=\"min-w-0\">{content}</div>\n </li>\n )\n}\n\nfunction ListIcon({ className, asChild = false, ...props }: ListIconProps) {\n const Comp = asChild ? Slot.Root : 'span'\n\n return (\n <Comp\n data-slot=\"list-icon\"\n className={cn(\n 'inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4',\n asChild && 'size-4',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction injectListItemIndices(children: React.ReactNode, indexRef = { current: 0 }): React.ReactNode {\n return React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) {\n return child\n }\n\n if (child.type === React.Fragment) {\n const fragment = child as React.ReactElement<{ children?: React.ReactNode }>\n\n return <React.Fragment key={child.key}>{injectListItemIndices(fragment.props.children, indexRef)}</React.Fragment>\n }\n\n if (child.type === ListItem) {\n return React.cloneElement(child as React.ReactElement<ListItemProps & InternalListItemProps>, {\n __index: indexRef.current++\n })\n }\n\n return child\n })\n}\n\nfunction isListIconElement(child: React.ReactNode): child is React.ReactElement<ListIconProps> {\n return React.isValidElement(child) && child.type === ListIcon\n}\n\nexport { List, ListIcon, ListItem, listVariants }\n"],"mappings":"2NAiBA,MAAM,EAAc,EAAM,cAAgC,CACxD,KAAM,YACP,CAAC,CAEI,EAAe,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACJ,GAAI,UACJ,GAAI,UACL,CACD,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACL,CACF,CACD,gBAAiB,CACf,KAAM,KACN,QAAS,KACV,CACF,CAAC,CAcF,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO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AAC,EAAM,eAAe,EAAM,CAC9B,OAAO,EAGT,GAAI,EAAM,OAAS,EAAM,SAAU,CACjC,IAAM,EAAW,EAEjB,OAAO,EAAC,EAAM,SAAP,CAAA,SAAiC,sBAAsB,EAAS,MAAM,SAAU,EAAS,CAAkB,CAAtF,EAAM,IAAgF,CASpH,OANI,EAAM,OAAS,SACV,EAAM,aAAa,EAAoE,CAC5F,QAAS,EAAS,UACnB,CAAC,CAGG,GACP,CAGJ,SAAS,kBAAkB,EAAoE,CAC7F,OAAO,EAAM,eAAe,EAAM,EAAI,EAAM,OAAS"}
@@ -4,7 +4,7 @@ import * as React from "react";
4
4
 
5
5
  //#region src/components/native-select.d.ts
6
6
  type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
7
- size?: 'sm' | 'default';
7
+ size?: 'sm' | 'md';
8
8
  };
9
9
  type NativeSelectOptionProps = React.ComponentProps<'option'>;
10
10
  type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconSelector as t}from"@tabler/icons-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";function NativeSelect({className:i,size:a=`default`,...o}){return r(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,i),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:e(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...o}),n(t,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconSelector as t}from"@tabler/icons-react";import{jsx as n,jsxs as r}from"react/jsx-runtime";function NativeSelect({className:i,size:a=`md`,...o}){return r(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,i),"data-slot":`native-select-wrapper`,"data-size":a,children:[n(`select`,{"data-slot":`native-select`,"data-size":a,className:e(`border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground`,`data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5`,`disabled:pointer-events-none disabled:cursor-not-allowed`),...o}),n(t,{className:`text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function NativeSelectOption({...e}){return n(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...r}){return n(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...r})}export{NativeSelect,NativeSelectOptGroup,NativeSelectOption};
2
2
  //# sourceMappingURL=native-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'default'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'default', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"uKAcA,SAAS,aAAa,CAAE,YAAW,OAAO,UAAW,GAAG,GAA4B,CAClF,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,WAHb,CAKE,EAAC,SAAD,CACE,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,2DACD,CACD,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,qBACV,CAAA,CACE,GAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAD,CAAU,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,EAAS,CAAA"}
1
+ {"version":3,"file":"native-select.js","names":[],"sources":["../../src/components/native-select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconSelector } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n size?: 'sm' | 'md'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, size = 'md', ...props }: NativeSelectProps) {\n return (\n <div\n className={cn('group/native-select relative w-fit has-[select:disabled]:opacity-50', className)}\n data-slot=\"native-select-wrapper\"\n data-size={size}\n >\n <select\n data-slot=\"native-select\"\n data-size={size}\n className={cn(\n 'border-input dark:bg-input/30 dark:hover:bg-input/50 h-8 w-full min-w-0 appearance-none rounded-lg border bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground',\n 'data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5',\n 'disabled:pointer-events-none disabled:cursor-not-allowed'\n )}\n {...props}\n />\n <IconSelector\n className=\"text-muted-foreground top-1/2 right-2.5 size-4 -translate-y-1/2 pointer-events-none absolute select-none\"\n aria-hidden=\"true\"\n data-slot=\"native-select-icon\"\n />\n </div>\n )\n}\n\nfunction NativeSelectOption({ ...props }: NativeSelectOptionProps) {\n return <option data-slot=\"native-select-option\" {...props} />\n}\n\nfunction NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps) {\n return <optgroup data-slot=\"native-select-optgroup\" className={cn(className)} {...props} />\n}\n\nexport { NativeSelect, NativeSelectOptGroup, NativeSelectOption }\n"],"mappings":"uKAcA,SAAS,aAAa,CAAE,YAAW,OAAO,KAAM,GAAG,GAA4B,CAC7E,OACE,EAAC,MAAD,CACE,UAAW,EAAG,sEAAuE,EAAU,CAC/F,YAAU,wBACV,YAAW,WAHb,CAKE,EAAC,SAAD,CACE,YAAU,gBACV,YAAW,EACX,UAAW,EACT,+LACA,4EACA,qKACA,2FACA,+FACA,2DACD,CACD,GAAI,EACJ,CAAA,CACF,EAAC,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,qBACV,CAAA,CACE,GAIV,SAAS,mBAAmB,CAAE,GAAG,GAAkC,CACjE,OAAO,EAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAI,EAAS,CAAA,CAG/D,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OAAO,EAAC,WAAD,CAAU,YAAU,yBAAyB,UAAW,EAAG,EAAU,CAAE,GAAI,EAAS,CAAA"}
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r,IconDots as i}from"@tabler/icons-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function Pagination({className:t,...n}){return a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,className:e(`mx-auto flex w-full justify-center`,t),...n})}function PaginationContent({className:t,...n}){return a(`ul`,{"data-slot":`pagination-content`,className:e(`flex items-center gap-0.5`,t),...n})}function PaginationItem({...e}){return a(`li`,{"data-slot":`pagination-item`,...e})}function PaginationLink({className:n,isActive:r,size:i=`icon`,color:o=`zinc`,...s}){return a(t,{asChild:!0,variant:r?`outline`:`ghost`,color:o,size:i,className:e(n),children:a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...s})})}function PaginationPrevious({className:t,text:r=`Previous`,...i}){return o(PaginationLink,{"aria-label":`Go to previous page`,size:`default`,className:e(`pl-1.5!`,t),...i,children:[a(n,{"data-icon":`inline-start`}),a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=`Next`,...i}){return o(PaginationLink,{"aria-label":`Go to next page`,size:`default`,className:e(`pr-1.5!`,t),...i,children:[a(`span`,{className:`hidden sm:block`,children:n}),a(r,{"data-icon":`inline-end`})]})}function PaginationEllipsis({className:t,...n}){return o(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:e(`flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4`,t),...n,children:[a(i,{}),a(`span`,{className:`sr-only`,children:`More pages`})]})}export{Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{Button as t}from"./button.js";import{IconChevronLeft as n,IconChevronRight as r,IconDots as i}from"@tabler/icons-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function Pagination({className:t,...n}){return a(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,className:e(`mx-auto flex w-full justify-center`,t),...n})}function PaginationContent({className:t,...n}){return a(`ul`,{"data-slot":`pagination-content`,className:e(`flex items-center gap-0.5`,t),...n})}function PaginationItem({...e}){return a(`li`,{"data-slot":`pagination-item`,...e})}function PaginationLink({className:n,isActive:r,size:i=`icon`,color:o=`zinc`,...s}){return a(t,{asChild:!0,variant:r?`outline`:`ghost`,color:o,size:i,className:e(n),children:a(`a`,{"aria-current":r?`page`:void 0,"data-slot":`pagination-link`,"data-active":r,...s})})}function PaginationPrevious({className:t,text:r=`Previous`,...i}){return o(PaginationLink,{"aria-label":`Go to previous page`,size:`md`,className:e(`pl-1.5!`,t),...i,children:[a(n,{"data-icon":`inline-start`}),a(`span`,{className:`hidden sm:block`,children:r})]})}function PaginationNext({className:t,text:n=`Next`,...i}){return o(PaginationLink,{"aria-label":`Go to next page`,size:`md`,className:e(`pr-1.5!`,t),...i,children:[a(`span`,{className:`hidden sm:block`,children:n}),a(r,{"data-icon":`inline-end`})]})}function PaginationEllipsis({className:t,...n}){return o(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:e(`flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4`,t),...n,children:[a(i,{}),a(`span`,{className:`sr-only`,children:`More pages`})]})}export{Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious};
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"default\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"default\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"mPA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CAIN,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAGhH,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAGtD,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,EAAU,UACzG,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,EAAS,CAAA,CACzG,CAAA,CAIb,SAAS,mBAAmB,CAAE,YAAW,OAAO,WAAY,GAAG,GAAkC,CAC/F,OACE,EAAC,eAAD,CAAgB,aAAW,sBAAsB,KAAK,UAAU,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAAzG,CACE,EAAC,EAAD,CAAiB,YAAU,eAAiB,CAAA,CAC5C,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAChC,GAIrB,SAAS,eAAe,CAAE,YAAW,OAAO,OAAQ,GAAG,GAA8B,CACnF,OACE,EAAC,eAAD,CAAgB,aAAW,kBAAkB,KAAK,UAAU,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAArG,CACE,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAC/C,EAAC,EAAD,CAAkB,YAAU,aAAe,CAAA,CAC5B,GAIrB,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,EAAU,CACxG,GAAI,WAJN,CAME,EAAC,EAAD,EAAY,CAAA,CACZ,EAAC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACtC"}
1
+ {"version":3,"file":"pagination.js","names":[],"sources":["../../src/components/pagination.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconChevronLeft, IconChevronRight, IconDots } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\n\nexport type PaginationProps = React.ComponentProps<'nav'>\n\nexport type PaginationContentProps = React.ComponentProps<'ul'>\n\nexport type PaginationItemProps = React.ComponentProps<'li'>\n\nexport type PaginationLinkProps = {\n isActive?: boolean\n} & Pick<React.ComponentProps<typeof Button>, 'size' | 'color'> &\n React.ComponentProps<'a'>\n\nexport type PaginationPreviousProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationNextProps = React.ComponentProps<typeof PaginationLink> & {\n text?: string\n}\n\nexport type PaginationEllipsisProps = React.ComponentProps<'span'>\n\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n )\n}\n\nfunction PaginationContent({ className, ...props }: PaginationContentProps) {\n return <ul data-slot=\"pagination-content\" className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />\n}\n\nfunction PaginationLink({ className, isActive, size = 'icon', color = 'zinc', ...props }: PaginationLinkProps) {\n return (\n <Button asChild variant={isActive ? 'outline' : 'ghost'} color={color} size={size} className={cn(className)}>\n <a aria-current={isActive ? 'page' : undefined} data-slot=\"pagination-link\" data-active={isActive} {...props} />\n </Button>\n )\n}\n\nfunction PaginationPrevious({ className, text = 'Previous', ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink aria-label=\"Go to previous page\" size=\"md\" className={cn('pl-1.5!', className)} {...props}>\n <IconChevronLeft data-icon=\"inline-start\" />\n <span className=\"hidden sm:block\">{text}</span>\n </PaginationLink>\n )\n}\n\nfunction PaginationNext({ className, text = 'Next', ...props }: PaginationNextProps) {\n return (\n <PaginationLink aria-label=\"Go to next page\" size=\"md\" className={cn('pr-1.5!', className)} {...props}>\n <span className=\"hidden sm:block\">{text}</span>\n <IconChevronRight data-icon=\"inline-end\" />\n </PaginationLink>\n )\n}\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n <IconDots />\n <span className=\"sr-only\">More pages</span>\n </span>\n )\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious\n}\n"],"mappings":"mPA4BA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OACE,EAAC,MAAD,CACE,aAAW,aACX,YAAU,aACV,UAAW,EAAG,qCAAsC,EAAU,CAC9D,GAAI,EACJ,CAAA,CAIN,SAAS,kBAAkB,CAAE,YAAW,GAAG,GAAiC,CAC1E,OAAO,EAAC,KAAD,CAAI,YAAU,qBAAqB,UAAW,EAAG,4BAA6B,EAAU,CAAE,GAAI,EAAS,CAAA,CAGhH,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,KAAD,CAAI,YAAU,kBAAkB,GAAI,EAAS,CAAA,CAGtD,SAAS,eAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,QAAQ,OAAQ,GAAG,GAA8B,CAC7G,OACE,EAAC,EAAD,CAAQ,QAAA,GAAQ,QAAS,EAAW,UAAY,QAAgB,QAAa,OAAM,UAAW,EAAG,EAAU,UACzG,EAAC,IAAD,CAAG,eAAc,EAAW,OAAS,IAAA,GAAW,YAAU,kBAAkB,cAAa,EAAU,GAAI,EAAS,CAAA,CACzG,CAAA,CAIb,SAAS,mBAAmB,CAAE,YAAW,OAAO,WAAY,GAAG,GAAkC,CAC/F,OACE,EAAC,eAAD,CAAgB,aAAW,sBAAsB,KAAK,KAAK,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAApG,CACE,EAAC,EAAD,CAAiB,YAAU,eAAiB,CAAA,CAC5C,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAChC,GAIrB,SAAS,eAAe,CAAE,YAAW,OAAO,OAAQ,GAAG,GAA8B,CACnF,OACE,EAAC,eAAD,CAAgB,aAAW,kBAAkB,KAAK,KAAK,UAAW,EAAG,UAAW,EAAU,CAAE,GAAI,WAAhG,CACE,EAAC,OAAD,CAAM,UAAU,2BAAmB,EAAY,CAAA,CAC/C,EAAC,EAAD,CAAkB,YAAU,aAAe,CAAA,CAC5B,GAIrB,SAAS,mBAAmB,CAAE,YAAW,GAAG,GAAkC,CAC5E,OACE,EAAC,OAAD,CACE,cAAA,GACA,YAAU,sBACV,UAAW,EAAG,+EAAgF,EAAU,CACxG,GAAI,WAJN,CAME,EAAC,EAAD,EAAY,CAAA,CACZ,EAAC,OAAD,CAAM,UAAU,mBAAU,aAAiB,CAAA,CACtC"}
@@ -1,17 +1,38 @@
1
1
  import { n as __name } from "../chunk-CHh1Zzun.js";
2
+ import { UIColor } from "../lib/color.js";
3
+ import { LabelProps } from "./label.js";
2
4
  import { RadioGroup as RadioGroup$1 } from "radix-ui";
3
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
+ import { VariantProps } from "class-variance-authority";
4
7
  import * as React from "react";
8
+ import { ReactNode } from "react";
9
+ import * as _$class_variance_authority_types0 from "class-variance-authority/types";
5
10
 
6
11
  //#region src/components/radio-group.d.ts
7
- type RadioGroupProps = React.ComponentProps<typeof RadioGroup$1.Root>;
8
- type RadioGroupItemProps = React.ComponentProps<typeof RadioGroup$1.Item>;
12
+ type RadioGroupProps = React.ComponentProps<typeof RadioGroup$1.Root> & {
13
+ color?: UIColor;
14
+ };
15
+ declare const radioGroupItemVariants: (props?: ({
16
+ color?: "primary" | "brand" | "gray" | "zinc" | "red" | "yellow" | "blue" | "indigo" | "pink" | "green" | null | undefined;
17
+ size?: "sm" | "md" | "lg" | null | undefined;
18
+ } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
19
+ type RadioGroupItemProps = React.ComponentProps<typeof RadioGroup$1.Item> & VariantProps<typeof radioGroupItemVariants> & {
20
+ color?: UIColor;
21
+ label?: ReactNode;
22
+ labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>;
23
+ };
9
24
  declare function RadioGroup({
10
25
  className,
26
+ color,
11
27
  ...props
12
28
  }: RadioGroupProps): _$react_jsx_runtime0.JSX.Element;
13
29
  declare function RadioGroupItem({
14
30
  className,
31
+ color,
32
+ id,
33
+ label,
34
+ labelProps,
35
+ size,
15
36
  ...props
16
37
  }: RadioGroupItemProps): _$react_jsx_runtime0.JSX.Element;
17
38
  //#endregion
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{RadioGroup as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function RadioGroup({className:r,...i}){return n(t.Root,{"data-slot":`radio-group`,className:e(`grid w-full gap-2`,r),...i})}function RadioGroupItem({className:r,...i}){return n(t.Item,{"data-slot":`radio-group-item`,className:e(`group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none`,`after:absolute after:-inset-x-3 after:-inset-y-2`,`focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`aria-invalid:aria-checked:border-primary dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`dark:bg-input/30`,`data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary`,r),...i,children:n(t.Indicator,{"data-slot":`radio-group-indicator`,className:`flex size-4 items-center justify-center`,children:n(`span`,{className:e(`absolute top-1/2 left-1/2 size-2 rounded-full bg-primary-foreground`,`-translate-x-1/2 -translate-y-1/2`)})})})}export{RadioGroup,RadioGroupItem};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{selectionControlColorVariants as t}from"../lib/color.js";import{Label as n}from"./label.js";import{RadioGroup as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";import{useId as s}from"react";const c=o([`group/radio-group-item peer relative flex aspect-square shrink-0 rounded-full border border-input outline-none`,`after:absolute after:-inset-x-3 after:-inset-y-2`,`focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20`,`aria-invalid:aria-checked:border-(--selection-control) dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`dark:bg-input/30`,`data-checked:border-(--selection-control) data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground)`],{variants:{color:t,size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),l=o(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),u=o(`absolute top-1/2 left-1/2 rounded-full bg-primary-foreground`,{variants:{size:{sm:`size-1.5`,md:`size-2`,lg:`size-2.5`}},defaultVariants:{size:`md`}}),d=o(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:a=`primary`,...o}){return i(r.Root,{"data-slot":`radio-group`,"data-color":a,className:e(`grid w-full gap-2`,t[a],n),...o})}function RadioGroupItem({className:t,color:o,id:f,label:p,labelProps:m,size:h=`md`,...g}){let _=s(),v=p!==void 0,y=f??_,{className:b,...x}=m??{},S=i(r.Item,{"data-slot":`radio-group-item`,"data-color":o,"data-size":h,id:v?y:f,className:e(c({color:o,size:h}),t),...g,children:i(r.Indicator,{"data-slot":`radio-group-indicator`,className:e(l({size:h})),children:i(`span`,{className:e(u({size:h}),`-translate-x-1/2 -translate-y-1/2`)})})});return v?a(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[S,i(n,{...x,htmlFor:y,className:e(d({size:h}),b),children:p})]}):S}export{RadioGroup,RadioGroupItem};
2
2
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type RadioGroupProps = React.ComponentProps<typeof RadioGroupPrimitive.Root>\n\nexport type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item>\n\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n return <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('grid w-full gap-2', className)} {...props} />\n}\n\nfunction RadioGroupItem({ className, ...props }: RadioGroupItemProps) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none',\n 'after:absolute after:-inset-x-3 after:-inset-y-2',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20',\n 'aria-invalid:aria-checked:border-primary dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'dark:bg-input/30',\n 'data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary',\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex size-4 items-center justify-center\"\n >\n <span\n className={cn(\n 'absolute top-1/2 left-1/2 size-2 rounded-full bg-primary-foreground',\n '-translate-x-1/2 -translate-y-1/2'\n )}\n />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":"gJAUA,SAAS,WAAW,CAAE,YAAW,GAAG,GAA0B,CAC5D,OAAO,EAACA,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAW,EAAG,oBAAqB,EAAU,CAAE,GAAI,EAAS,CAAA,CAGvH,SAAS,eAAe,CAAE,YAAW,GAAG,GAA8B,CACpE,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,UAAW,EACT,wHACA,mDACA,4EACA,kDACA,uFACA,yHACA,mBACA,wHACA,EACD,CACD,GAAI,WAEJ,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAU,mDAEV,EAAC,OAAD,CACE,UAAW,EACT,sEACA,oCACD,CACD,CAAA,CAC4B,CAAA,CACP,CAAA"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroupPrimitive","Label"],"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["import type * as React from 'react'\nimport { type ReactNode, useId } from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\n\nimport type { UIColor } from '../lib/color'\nimport { selectionControlColorVariants } from '../lib/color'\nimport { cn } from '../lib/utils'\nimport { Label, type LabelProps } from './label'\n\nexport type RadioGroupProps = React.ComponentProps<typeof RadioGroupPrimitive.Root> & {\n color?: UIColor\n}\n\nconst radioGroupItemVariants = cva(\n [\n 'group/radio-group-item peer relative flex aspect-square shrink-0 rounded-full border border-input outline-none',\n 'after:absolute after:-inset-x-3 after:-inset-y-2',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20',\n 'aria-invalid:aria-checked:border-(--selection-control) dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'dark:bg-input/30',\n 'data-checked:border-(--selection-control) data-checked:bg-(--selection-control) data-checked:text-(--selection-control-foreground)'\n ],\n {\n variants: {\n color: selectionControlColorVariants,\n size: {\n sm: 'size-4',\n md: 'size-4.5',\n lg: 'size-5.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n }\n)\n\nconst radioGroupIndicatorVariants = cva('flex items-center justify-center', {\n variants: {\n size: {\n sm: 'size-4',\n md: 'size-4.5',\n lg: 'size-5.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nconst radioGroupIndicatorDotVariants = cva('absolute top-1/2 left-1/2 rounded-full bg-primary-foreground', {\n variants: {\n size: {\n sm: 'size-1.5',\n md: 'size-2',\n lg: 'size-2.5'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nconst radioGroupItemLabelVariants = cva('', {\n variants: {\n size: {\n sm: 'text-xs',\n md: 'text-sm',\n lg: 'text-xl'\n }\n },\n defaultVariants: {\n size: 'md'\n }\n})\n\nexport type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupPrimitive.Item> &\n VariantProps<typeof radioGroupItemVariants> & {\n color?: UIColor\n label?: ReactNode\n labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>\n }\n\nfunction RadioGroup({ className, color = 'primary', ...props }: RadioGroupProps) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n data-color={color}\n className={cn('grid w-full gap-2', selectionControlColorVariants[color], className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({ className, color, id, label, labelProps, size = 'md', ...props }: RadioGroupItemProps) {\n const generatedId = useId()\n const hasLabel = label !== undefined\n const resolvedId = id ?? generatedId\n const { className: labelClassName, ...labelRootProps } = labelProps ?? {}\n\n const item = (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n data-color={color}\n data-size={size}\n id={hasLabel ? resolvedId : id}\n className={cn(radioGroupItemVariants({ color, size }), className)}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={cn(radioGroupIndicatorVariants({ size }))}\n >\n <span className={cn(radioGroupIndicatorDotVariants({ size }), '-translate-x-1/2 -translate-y-1/2')} />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n\n if (!hasLabel) {\n return item\n }\n\n return (\n <div data-slot=\"radio-group-item-field\" className=\"flex items-center gap-2\">\n {item}\n <Label\n {...labelRootProps}\n htmlFor={resolvedId}\n className={cn(radioGroupItemLabelVariants({ size }), labelClassName)}\n >\n {label}\n </Label>\n </div>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":"0UAeA,MAAM,EAAyB,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,mBACA,qIACD,CACD,CACE,SAAU,CACR,MAAO,EACP,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CACF,CAEK,EAA8B,EAAI,mCAAoC,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAEI,EAAiC,EAAI,+DAAgE,CACzG,SAAU,CACR,KAAM,CACJ,GAAI,WACJ,GAAI,SACJ,GAAI,WACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CAEI,EAA8B,EAAI,GAAI,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,UACL,CACF,CACD,gBAAiB,CACf,KAAM,KACP,CACF,CAAC,CASF,SAAS,WAAW,CAAE,YAAW,QAAQ,UAAW,GAAG,GAA0B,CAC/E,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,cACV,aAAY,EACZ,UAAW,EAAG,oBAAqB,EAA8B,GAAQ,EAAU,CACnF,GAAI,EACJ,CAAA,CAIN,SAAS,eAAe,CAAE,YAAW,QAAO,KAAI,QAAO,aAAY,OAAO,KAAM,GAAG,GAA8B,CAC/G,IAAM,EAAc,GAAO,CACrB,EAAW,IAAU,IAAA,GACrB,EAAa,GAAM,EACnB,CAAE,UAAW,EAAgB,GAAG,GAAmB,GAAc,EAAE,CAEnE,EACJ,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,aAAY,EACZ,YAAW,EACX,GAAI,EAAW,EAAa,EAC5B,UAAW,EAAG,EAAuB,CAAE,QAAO,OAAM,CAAC,CAAE,EAAU,CACjE,GAAI,WAEJ,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAW,EAAG,EAA4B,CAAE,OAAM,CAAC,CAAC,UAEpD,EAAC,OAAD,CAAM,UAAW,EAAG,EAA+B,CAAE,OAAM,CAAC,CAAE,oCAAoC,CAAI,CAAA,CACxE,CAAA,CACP,CAAA,CAO7B,OAJK,EAKH,EAAC,MAAD,CAAK,YAAU,yBAAyB,UAAU,mCAAlD,CACG,EACD,EAACC,EAAD,CACE,GAAI,EACJ,QAAS,EACT,UAAW,EAAG,EAA4B,CAAE,OAAM,CAAC,CAAE,EAAe,UAEnE,EACK,CAAA,CACJ,GAbC"}
@@ -8,7 +8,7 @@ type SelectProps = React.ComponentProps<typeof Select$1.Root>;
8
8
  type SelectGroupProps = React.ComponentProps<typeof Select$1.Group>;
9
9
  type SelectValueProps = React.ComponentProps<typeof Select$1.Value>;
10
10
  type SelectTriggerProps = React.ComponentProps<typeof Select$1.Trigger> & {
11
- size?: 'sm' | 'default';
11
+ size?: 'sm' | 'md';
12
12
  };
13
13
  type SelectContentProps = React.ComponentProps<typeof Select$1.Content>;
14
14
  type SelectLabelProps = React.ComponentProps<typeof Select$1.Label>;
@@ -1,2 +1,2 @@
1
- import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t,IconChevronDown as n,IconChevronUp as r,IconSelector as i}from"@tabler/icons-react";import{Select as a}from"radix-ui";import{jsx as o,jsxs as s}from"react/jsx-runtime";function Select({...e}){return o(a.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return o(a.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return o(a.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:t,size:n=`default`,children:r,...c}){return s(a.Trigger,{"data-slot":`select-trigger`,"data-size":n,className:e(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`disabled:cursor-not-allowed disabled:opacity-50`,t),...c,children:[r,o(a.Icon,{asChild:!0,children:o(i,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...c}){return o(a.Portal,{children:s(a.Content,{"data-slot":`select-content`,"data-align-trigger":r===`item-aligned`,className:e(`bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,`data-[align-trigger=true]:animate-none`,r===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,t),position:r,align:i,...c,children:[o(SelectScrollUpButton,{}),o(a.Viewport,{"data-position":r,className:e(`data-[position=popper]:h-(--radix-select-trigger-height)`,`data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`),children:n}),o(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return o(a.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:n,children:r,...i}){return s(a.Item,{"data-slot":`select-item`,className:e(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none`,`*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,n),...i,children:[o(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:o(a.ItemIndicator,{children:o(t,{className:`pointer-events-none`})})}),o(a.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return o(a.Separator,{"data-slot":`select-separator`,className:e(`bg-border -mx-1 my-1 h-px pointer-events-none`,t),...n})}function SelectScrollUpButton({className:t,...n}){return o(a.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...n,children:o(r,{})})}function SelectScrollDownButton({className:t,...r}){return o(a.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:o(n,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
1
+ import"../chunk-CHh1Zzun.js";import{cn as e}from"../lib/utils.js";import{IconCheck as t,IconChevronDown as n,IconChevronUp as r,IconSelector as i}from"@tabler/icons-react";import{Select as a}from"radix-ui";import{jsx as o,jsxs as s}from"react/jsx-runtime";function Select({...e}){return o(a.Root,{"data-slot":`select`,...e})}function SelectGroup({className:t,...n}){return o(a.Group,{"data-slot":`select-group`,className:e(`scroll-my-1 p-1`,t),...n})}function SelectValue({...e}){return o(a.Value,{"data-slot":`select-value`,...e})}function SelectTrigger({className:t,size:n=`md`,children:r,...c}){return s(a.Trigger,{"data-slot":`select-trigger`,"data-size":n,className:e(`border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,`data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`disabled:cursor-not-allowed disabled:opacity-50`,t),...c,children:[r,o(a.Icon,{asChild:!0,children:o(i,{className:`text-muted-foreground size-4 pointer-events-none`})})]})}function SelectContent({className:t,children:n,position:r=`item-aligned`,align:i=`center`,...c}){return o(a.Portal,{children:s(a.Content,{"data-slot":`select-content`,"data-align-trigger":r===`item-aligned`,className:e(`bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto`,`data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,`data-[align-trigger=true]:animate-none`,r===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,t),position:r,align:i,...c,children:[o(SelectScrollUpButton,{}),o(a.Viewport,{"data-position":r,className:e(`data-[position=popper]:h-(--radix-select-trigger-height)`,`data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`),children:n}),o(SelectScrollDownButton,{})]})})}function SelectLabel({className:t,...n}){return o(a.Label,{"data-slot":`select-label`,className:e(`text-muted-foreground px-1.5 py-1 text-xs`,t),...n})}function SelectItem({className:n,children:r,...i}){return s(a.Item,{"data-slot":`select-item`,className:e(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground`,`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none`,`*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,`[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,`data-disabled:pointer-events-none data-disabled:opacity-50`,n),...i,children:[o(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:o(a.ItemIndicator,{children:o(t,{className:`pointer-events-none`})})}),o(a.ItemText,{children:r})]})}function SelectSeparator({className:t,...n}){return o(a.Separator,{"data-slot":`select-separator`,className:e(`bg-border -mx-1 my-1 h-px pointer-events-none`,t),...n})}function SelectScrollUpButton({className:t,...n}){return o(a.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...n,children:o(r,{})})}function SelectScrollDownButton({className:t,...r}){return o(a.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:e(`bg-popover z-10 flex cursor-default items-center justify-center py-1`,`[&_svg:not([class*='size-'])]:size-4`,t),...r,children:o(n,{})})}export{Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue};
2
2
  //# sourceMappingURL=select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>\n\nexport type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}\n\nexport type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content>\n\nexport type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>\n\nexport type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>\n\nexport type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>\n\nfunction Select({ ...props }: SelectProps) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({ className, size = 'default', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === 'item-aligned'}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n 'data-[align-trigger=true]:animate-none',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n 'data-[position=popper]:h-(--radix-select-trigger-height)',\n 'data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n}\n"],"mappings":"gQA6BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,EAAS,CAAA,CAG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0HACA,oEACA,oFACA,6DACA,EACD,CACD,GAAI,WAVN,CAYE,EAAC,OAAD,CAAM,UAAU,wFACd,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,sBAAwB,CAAA,CACf,CAAA,CAC3B,CAAA,CACP,EAACA,EAAgB,SAAjB,CAA2B,WAAoC,CAAA,CAC1C,GAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,EACJ,CAAA,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAiB,CAAA,CACc,CAAA,CAIrC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAmB,CAAA,CACc,CAAA"}
1
+ {"version":3,"file":"select.js","names":["SelectPrimitive"],"sources":["../../src/components/select.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { IconCheck, IconChevronDown, IconChevronUp, IconSelector } from '@tabler/icons-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type SelectProps = React.ComponentProps<typeof SelectPrimitive.Root>\n\nexport type SelectGroupProps = React.ComponentProps<typeof SelectPrimitive.Group>\n\nexport type SelectValueProps = React.ComponentProps<typeof SelectPrimitive.Value>\n\nexport type SelectTriggerProps = React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'md'\n}\n\nexport type SelectContentProps = React.ComponentProps<typeof SelectPrimitive.Content>\n\nexport type SelectLabelProps = React.ComponentProps<typeof SelectPrimitive.Label>\n\nexport type SelectItemProps = React.ComponentProps<typeof SelectPrimitive.Item>\n\nexport type SelectSeparatorProps = React.ComponentProps<typeof SelectPrimitive.Separator>\n\nexport type SelectScrollUpButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>\n\nexport type SelectScrollDownButtonProps = React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>\n\nfunction Select({ ...props }: SelectProps) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return <SelectPrimitive.Group data-slot=\"select-group\" className={cn('scroll-my-1 p-1', className)} {...props} />\n}\n\nfunction SelectValue({ ...props }: SelectValueProps) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({ className, size = 'md', children, ...props }: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n 'border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none outline-none',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3',\n 'aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:ring-3 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n 'data-[size=md]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)]',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <IconSelector className=\"text-muted-foreground size-4 pointer-events-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === 'item-aligned'}\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 relative z-50 min-w-36 max-h-(--radix-select-content-available-height) rounded-lg shadow-md ring-1 duration-100 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto',\n 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n 'data-[align-trigger=true]:animate-none',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n 'data-[position=popper]:h-(--radix-select-trigger-height)',\n 'data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-1.5 py-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground',\n 'relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none',\n '*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n 'data-disabled:pointer-events-none data-disabled:opacity-50',\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <IconCheck className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border -mx-1 my-1 h-px pointer-events-none', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronUp />\n </SelectPrimitive.ScrollUpButton>\n )\n}\n\nfunction SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'bg-popover z-10 flex cursor-default items-center justify-center py-1',\n \"[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <IconChevronDown />\n </SelectPrimitive.ScrollDownButton>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n}\n"],"mappings":"gQA6BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,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AAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,EACD,CACD,GAAI,WAVN,CAYE,EAAC,OAAD,CAAM,UAAU,wFACd,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,sBAAwB,CAAA,CACf,CAAA,CAC3B,CAAA,CACP,EAACA,EAAgB,SAAjB,CAA2B,WAAoC,CAAA,CAC1C,GAI3B,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,EAAU,CACzE,GAAI,EACJ,CAAA,CAIN,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAiB,CAAA,CACc,CAAA,CAIrC,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,EACD,CACD,GAAI,WAEJ,EAAC,EAAD,EAAmB,CAAA,CACc,CAAA"}
@@ -126,7 +126,7 @@ declare function SidebarMenuItem({
126
126
  }: SidebarMenuItemProps): _$react_jsx_runtime0.JSX.Element;
127
127
  declare const sidebarMenuButtonVariants: (props?: ({
128
128
  variant?: "default" | "outline" | null | undefined;
129
- size?: "default" | "sm" | "lg" | null | undefined;
129
+ size?: "sm" | "md" | "lg" | null | undefined;
130
130
  } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
131
131
  type SidebarMenuButtonProps = React.ComponentProps<'button'> & {
132
132
  asChild?: boolean;