@uselets/ui 1.12.0 → 1.14.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.
- package/README.md +6 -2
- package/dist/{chart-lqgodZYQ.d.ts → chart-CVe5-EWS.d.ts} +9 -39
- package/dist/components/accordion.d.ts +4 -19
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -53
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +4 -18
- package/dist/components/anchor.d.ts +2 -9
- package/dist/components/area-chart.d.ts +2 -26
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +6 -26
- package/dist/components/badge.d.ts +4 -12
- package/dist/components/bar-chart.d.ts +2 -24
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +7 -31
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -16
- package/dist/components/button.d.ts +4 -15
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -19
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -30
- package/dist/components/carousel.d.ts +6 -37
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.d.ts +1 -1
- package/dist/components/carousel.spec.js +93 -1
- package/dist/components/carousel.spec.js.map +1 -1
- package/dist/components/center.d.ts +2 -8
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -5
- package/dist/components/collapsible.d.ts +3 -10
- package/dist/components/combobox.d.ts +15 -80
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -43
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -7
- package/dist/components/data-table.d.ts +8 -61
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +11 -75
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +12 -49
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +1 -10
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +13 -49
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -66
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -5
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +6 -26
- package/dist/components/field.d.ts +11 -48
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.spec.d.ts +1 -1
- package/dist/components/field.spec.js +1 -1
- package/dist/components/field.spec.js.map +1 -1
- package/dist/components/flex.d.ts +5 -14
- package/dist/components/grid.d.ts +2 -18
- package/dist/components/group.d.ts +4 -12
- package/dist/components/heading.d.ts +2 -8
- package/dist/components/hover-card.d.ts +3 -13
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +8 -32
- package/dist/components/input-otp.d.ts +4 -19
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -7
- package/dist/components/kbd.d.ts +2 -9
- package/dist/components/label.d.ts +1 -5
- package/dist/components/list.d.ts +5 -22
- package/dist/components/list.js.map +1 -1
- package/dist/components/marker.d.ts +18 -0
- package/dist/components/marker.js +2 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/mask-input.d.ts +1 -11
- package/dist/components/native-select.d.ts +3 -14
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +8 -36
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-field.d.ts +35 -0
- package/dist/components/number-field.js +2 -0
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/pagination.d.ts +7 -33
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.d.ts +13 -0
- package/dist/components/phone-input.js +2 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/pie-chart.d.ts +2 -24
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +7 -28
- package/dist/components/progress.d.ts +3 -10
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +4 -17
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -13
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +3 -11
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.d.ts +2 -11
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -46
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -7
- package/dist/components/sidebar.d.ts +24 -118
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -10
- package/dist/components/skeleton.d.ts +1 -7
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.spec.d.ts +1 -1
- package/dist/components/skeleton.spec.js +1 -1
- package/dist/components/skeleton.spec.js.map +1 -1
- package/dist/components/slider.d.ts +1 -10
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +0 -1
- package/dist/components/spinner.d.ts +2 -7
- package/dist/components/stack.d.ts +4 -11
- package/dist/components/stepper.d.ts +71 -0
- package/dist/components/stepper.js +2 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.d.ts +1 -10
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -43
- package/dist/components/tabs.d.ts +5 -21
- package/dist/components/text.d.ts +2 -8
- package/dist/components/textarea.d.ts +1 -6
- package/dist/components/theme.d.ts +1 -7
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +5 -6
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -11
- package/dist/components/tooltip.d.ts +5 -28
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -7
- package/dist/components/visibility.d.ts +2 -9
- package/dist/hooks/use-breakpoint-value.d.ts +0 -1
- package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +0 -1
- package/dist/hooks/use-breakpoint.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-disclosure.d.ts +0 -1
- package/dist/hooks/use-disclosure.spec.d.ts +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-document-visibility.d.ts +0 -1
- package/dist/hooks/use-document-visibility.spec.d.ts +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-hotkeys.spec.d.ts +1 -1
- package/dist/hooks/use-hotkeys.spec.js +1 -1
- package/dist/hooks/use-idle.d.ts +0 -1
- package/dist/hooks/use-idle.spec.d.ts +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-interval.d.ts +10 -8
- package/dist/hooks/use-interval.spec.d.ts +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-local-storage.d.ts +0 -1
- package/dist/hooks/use-local-storage.spec.d.ts +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-mask.d.ts +0 -1
- package/dist/hooks/use-mask.js +1 -1
- package/dist/hooks/use-mask.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.spec.d.ts +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +0 -1
- package/dist/lib/button.d.ts +0 -1
- package/dist/lib/color.d.ts +1 -2
- package/dist/lib/compose-refs.d.ts +0 -1
- package/dist/lib/progress.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -1
- package/dist/{magic-string.es-DbBO8R0S.js → magic-string.es-oADFB1hu.js} +2 -2
- package/dist/{magic-string.es-DbBO8R0S.js.map → magic-string.es-oADFB1hu.js.map} +1 -1
- package/dist/{react.esm-D88qr0ij.js → react.esm-D5AipFQb.js} +5 -5
- package/dist/{react.esm-D88qr0ij.js.map → react.esm-D5AipFQb.js.map} +1 -1
- package/dist/skills/uselets-ui/references/component-catalog.md +14 -2
- package/dist/{use-hotkeys-BOfOFxb5.js → use-hotkeys-C0d5t4yo.js} +2 -2
- package/dist/{use-hotkeys-BOfOFxb5.js.map → use-hotkeys-C0d5t4yo.js.map} +1 -1
- package/dist/{use-hotkeys-Cl1cV6e8.d.ts → use-hotkeys-DloZH-B4.d.ts} +1 -2
- package/dist/utils-Cj3IZeiu.js +37 -0
- package/dist/utils-Cj3IZeiu.js.map +1 -0
- package/package.json +17 -16
- package/skills/uselets-ui/references/component-catalog.md +14 -2
- package/dist/dist-B-hwiqYg.js +0 -129
- package/dist/dist-B-hwiqYg.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-input.js","names":[],"sources":["../../src/components/phone-input.tsx"],"sourcesContent":["import { type ComponentProps, createContext, useContext, useMemo, useState } from 'react'\nimport * as BasePhoneInput from 'react-phone-number-input'\nimport flags from 'react-phone-number-input/flags'\n\nimport { IconWorld } from '@tabler/icons-react'\n\nimport { cn } from '../lib/utils'\nimport { Button } from './button'\nimport {\n Combobox,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxInput,\n ComboboxItem,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue\n} from './combobox'\nimport { Input } from './input'\nimport { ScrollArea } from './scroll-area'\n\nconst PhoneInputContext = createContext<{\n popupClassName?: string\n scrollAreaClassName?: string\n}>({\n popupClassName: undefined,\n scrollAreaClassName: undefined\n})\n\nexport type PhoneInputProps = Omit<ComponentProps<'input'>, 'onChange' | 'value' | 'ref'> &\n Omit<BasePhoneInput.Props<typeof BasePhoneInput.default>, 'onChange' | 'popupClassName' | 'scrollAreaClassName'> & {\n onChange?: (value: BasePhoneInput.Value) => void\n popupClassName?: string\n scrollAreaClassName?: string\n }\n\nfunction PhoneInput({ className, popupClassName, scrollAreaClassName, onChange, value, ...props }: PhoneInputProps) {\n return (\n <PhoneInputContext.Provider value={{ popupClassName, scrollAreaClassName }}>\n <BasePhoneInput.default\n className={cn(\n 'flex',\n props['aria-invalid'] &&\n '[&_*[data-slot=combobox-trigger]]:border-destructive [&_*[data-slot=combobox-trigger]]:ring-destructive/50',\n className\n )}\n flagComponent={FlagComponent}\n countrySelectComponent={CountrySelect}\n inputComponent={InputComponent}\n smartCaret={false}\n defaultCountry=\"BR\"\n value={value || undefined}\n onChange={(value) => onChange?.(value || ('' as BasePhoneInput.Value))}\n {...props}\n />\n </PhoneInputContext.Provider>\n )\n}\n\nfunction InputComponent({ className, ...props }: ComponentProps<typeof Input>) {\n return <Input className={cn('rounded-s-none focus:z-1', className)} {...props} />\n}\n\ntype CountryEntry = { label: string; value: BasePhoneInput.Country | undefined }\n\ntype CountrySelectProps = {\n disabled?: boolean\n value: BasePhoneInput.Country\n options: CountryEntry[]\n onChange: (country: BasePhoneInput.Country) => void\n}\n\nfunction CountrySelect({ disabled, value: selectedCountry, options: countryList, onChange }: CountrySelectProps) {\n const { popupClassName } = useContext(PhoneInputContext)\n const [searchValue, setSearchValue] = useState('')\n\n const filteredCountries = useMemo(() => {\n if (!searchValue) return countryList\n return countryList.filter(({ label }) => label.toLowerCase().includes(searchValue.toLowerCase()))\n }, [countryList, searchValue])\n\n return (\n <Combobox\n items={filteredCountries}\n value={selectedCountry || ''}\n onValueChange={(country: BasePhoneInput.Country | null) => {\n if (country) {\n onChange(country)\n }\n }}\n >\n <ComboboxTrigger\n render={\n <Button\n variant=\"outline\"\n color=\"zinc\"\n className={cn(\n 'flex h-8 items-center gap-1 rounded-s-lg rounded-e-none border-e-0 border-input px-2.5 py-0 leading-none dark:bg-input/30',\n 'hover:bg-transparent focus:z-10 data-pressed:bg-transparent',\n disabled && 'opacity-50'\n )}\n disabled={disabled}\n >\n <span className=\"sr-only\">\n <ComboboxValue />\n </span>\n <FlagComponent country={selectedCountry} countryName={selectedCountry} />\n </Button>\n }\n />\n <ComboboxContent className={cn('w-xs *:data-[slot=input-group]:bg-transparent', popupClassName)}>\n <ComboboxInput\n placeholder=\"e.g. United States\"\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n showTrigger={false}\n className=\"border-input focus-visible:border-border rounded-none border-0 px-0 py-2.5 shadow-none ring-0! outline-none! focus-visible:ring-0 focus-visible:ring-offset-0\"\n />\n <ComboboxSeparator />\n <ComboboxEmpty className=\"px-4 py-2.5 text-sm\">Nenhum país encontrado.</ComboboxEmpty>\n <ComboboxList>\n <div className=\"relative flex max-h-full\">\n <div className=\"flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain\">\n <ScrollArea className=\"size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain\">\n {filteredCountries.map((item: CountryEntry) =>\n item.value ? (\n <ComboboxItem key={item.value} value={item.value} className=\"flex items-center gap-2\">\n <FlagComponent country={item.value} countryName={item.label} />\n <span className=\"flex-1 text-sm\">{item.label}</span>\n <span className=\"text-foreground/50 text-sm\">\n {`+${BasePhoneInput.getCountryCallingCode(item.value)}`}\n </span>\n </ComboboxItem>\n ) : null\n )}\n </ScrollArea>\n </div>\n </div>\n </ComboboxList>\n </ComboboxContent>\n </Combobox>\n )\n}\n\nfunction FlagComponent({ country, countryName }: BasePhoneInput.FlagProps) {\n const Flag = flags[country]\n\n return (\n <span className=\"flex h-4 w-4 items-center justify-center [&_svg:not([class*='size-'])]:size-full! [&_svg:not([class*='size-'])]:rounded-[5px]\">\n {Flag ? <Flag title={countryName} /> : <IconWorld className=\"size-4 opacity-60\" />}\n </span>\n )\n}\n\nexport { PhoneInput }\n"],"mappings":"spBAsBA,MAAM,EAAoB,EAGvB,CACD,eAAgB,IAAA,GAChB,oBAAqB,IAAA,EACvB,CAAC,EASD,SAAS,WAAW,CAAE,YAAW,iBAAgB,sBAAqB,WAAU,QAAO,GAAG,GAA0B,CAClH,OACE,EAAC,EAAkB,SAAnB,CAA4B,MAAO,CAAE,iBAAgB,qBAAoB,EACvE,SAAA,EAAC,EAAe,QAAhB,CACE,UAAW,EACT,OACA,EAAM,iBACJ,6GACF,CACF,EACA,cAAe,cACf,uBAAwB,cACxB,eAAgB,eAChB,WAAY,GACZ,eAAe,KACf,MAAO,GAAS,IAAA,GAChB,SAAW,GAAU,IAAW,GAAU,EAA2B,EACrE,GAAI,CACL,CAAA,CACyB,CAAA,CAEhC,CAEA,SAAS,eAAe,CAAE,YAAW,GAAG,GAAuC,CAC7E,OAAO,EAAC,EAAD,CAAO,UAAW,EAAG,2BAA4B,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClF,CAWA,SAAS,cAAc,CAAE,WAAU,MAAO,EAAiB,QAAS,EAAa,YAAgC,CAC/G,GAAM,CAAE,kBAAmB,EAAW,CAAiB,EACjD,CAAC,EAAa,GAAkB,EAAS,EAAE,EAE3C,EAAoB,MACnB,EACE,EAAY,QAAQ,CAAE,WAAY,EAAM,YAAY,CAAC,CAAC,SAAS,EAAY,YAAY,CAAC,CAAC,EADvE,EAExB,CAAC,EAAa,CAAW,CAAC,EAE7B,OACE,EAAC,EAAD,CACE,MAAO,EACP,MAAO,GAAmB,GAC1B,cAAgB,GAA2C,CACrD,GACF,EAAS,CAAO,CAEpB,EAPF,SAAA,CASE,EAAC,EAAD,CACE,OACE,EAAC,EAAD,CACE,QAAQ,UACR,MAAM,OACN,UAAW,EACT,4HACA,8DACA,GAAY,YACd,EACU,WARZ,SAAA,CAUE,EAAC,OAAD,CAAM,UAAU,UACd,SAAA,EAAC,EAAD,CAAgB,CAAA,CACZ,CAAA,EACN,EAAC,cAAD,CAAe,QAAS,EAAiB,YAAa,CAAkB,CAAA,CAClE,CAEX,CAAA,CAAA,CAAA,EACD,EAAC,EAAD,CAAiB,UAAW,EAAG,gDAAiD,CAAc,EAA9F,SAAA,CACE,EAAC,EAAD,CACE,YAAY,qBACZ,MAAO,EACP,SAAW,GAAM,EAAe,EAAE,OAAO,KAAK,EAC9C,YAAa,GACb,UAAU,+JACX,CAAA,EACD,EAAC,EAAD,CAAoB,CAAA,EACpB,EAAC,EAAD,CAAe,UAAU,sBAAsB,SAAA,yBAAsC,CAAA,EACrF,EAAC,EAAD,CAAA,SACE,EAAC,MAAD,CAAK,UAAU,2BACb,SAAA,EAAC,MAAD,CAAK,UAAU,6GACb,SAAA,EAAC,EAAD,CAAY,UAAU,+JACnB,SAAA,EAAkB,IAAK,GACtB,EAAK,MACH,EAAC,EAAD,CAA+B,MAAO,EAAK,MAAO,UAAU,0BAA5D,SAAA,CACE,EAAC,cAAD,CAAe,QAAS,EAAK,MAAO,YAAa,EAAK,KAAQ,CAAA,EAC9D,EAAC,OAAD,CAAM,UAAU,iBAAkB,SAAA,EAAK,KAAY,CAAA,EACnD,EAAC,OAAD,CAAM,UAAU,6BACb,SAAA,IAAI,EAAe,sBAAsB,EAAK,KAAK,GAChD,CAAA,CACM,CANK,EAAA,EAAK,KAMV,EACZ,IACN,CACU,CAAA,CACT,CAAA,CACF,CAAA,CACO,CAAA,CACC,CACT,CAAA,CAAA,GAEd,CAEA,SAAS,cAAc,CAAE,UAAS,eAAyC,CACzE,IAAM,EAAO,EAAM,GAEnB,OACE,EAAC,OAAD,CAAM,UAAU,gIACb,SAAA,EAAO,EAAC,EAAD,CAAM,MAAO,CAAc,CAAA,EAAI,EAAC,EAAD,CAAW,UAAU,mBAAqB,CAAA,CAC7E,CAAA,CAEV"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
|
-
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey, r as ChartConfig } from "../chart-
|
|
2
|
+
import { c as ChartLegendContentProps, m as ChartTooltipContentProps, n as ChartColorKey, r as ChartConfig } from "../chart-CVe5-EWS.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Pie } from "recharts";
|
|
5
|
-
|
|
6
5
|
//#region src/components/pie-chart.d.ts
|
|
7
6
|
type PieChartDatum = {
|
|
8
7
|
name: string;
|
|
@@ -36,28 +35,7 @@ type PieChartBaseProps = Omit<PieChartProps, 'children'> & {
|
|
|
36
35
|
outerRadius?: number | string;
|
|
37
36
|
centerSlot?: React.ReactNode;
|
|
38
37
|
};
|
|
39
|
-
declare function PieChartBase({
|
|
40
|
-
className,
|
|
41
|
-
data,
|
|
42
|
-
withTooltip,
|
|
43
|
-
withLegend,
|
|
44
|
-
withLabels,
|
|
45
|
-
labelsPosition,
|
|
46
|
-
startAngle,
|
|
47
|
-
endAngle,
|
|
48
|
-
paddingAngle,
|
|
49
|
-
strokeWidth,
|
|
50
|
-
strokeColor,
|
|
51
|
-
innerRadius,
|
|
52
|
-
outerRadius,
|
|
53
|
-
animationDuration,
|
|
54
|
-
tooltipProps,
|
|
55
|
-
legendProps,
|
|
56
|
-
pieProps,
|
|
57
|
-
dataSlot,
|
|
58
|
-
centerSlot,
|
|
59
|
-
...props
|
|
60
|
-
}: PieChartBaseProps): React.JSX.Element;
|
|
38
|
+
declare function PieChartBase({ className, data, withTooltip, withLegend, withLabels, labelsPosition, startAngle, endAngle, paddingAngle, strokeWidth, strokeColor, innerRadius, outerRadius, animationDuration, tooltipProps, legendProps, pieProps, dataSlot, centerSlot, ...props }: PieChartBaseProps): React.JSX.Element;
|
|
61
39
|
declare function PieChart(props: PieChartProps): React.JSX.Element;
|
|
62
40
|
//#endregion
|
|
63
41
|
export { PieChart, PieChartBase, PieChartBaseProps, PieChartDatum, PieChartProps, buildPieConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pie-chart.js","names":["RechartsPieChart"],"sources":["../../src/components/pie-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Legend, Pie, PieChart as RechartsPieChart, Tooltip } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type PieChartDatum = {\n name: string\n value: number\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type PieChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: PieChartDatum[]\n withTooltip?: boolean\n withLegend?: boolean\n withLabels?: boolean\n labelsPosition?: 'inside' | 'outside'\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n strokeWidth?: number\n strokeColor?: ChartColorKey | string\n innerRadius?: number | string\n outerRadius?: number | string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n pieProps?: Partial<React.ComponentProps<typeof Pie>>\n children?: React.ReactNode\n}\n\nexport function buildPieConfig(data: PieChartDatum[]): ChartConfig {\n return data.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nexport type PieChartBaseProps = Omit<PieChartProps, 'children'> & {\n dataSlot: string\n innerRadius?: number | string\n outerRadius?: number | string\n centerSlot?: React.ReactNode\n}\n\nfunction PieChartBase({\n className,\n data,\n withTooltip = true,\n withLegend = false,\n withLabels = false,\n labelsPosition = 'outside',\n startAngle = 90,\n endAngle = -270,\n paddingAngle = 0,\n strokeWidth = 1,\n strokeColor = 'var(--background)',\n innerRadius = 0,\n outerRadius = '80%',\n animationDuration,\n tooltipProps,\n legendProps,\n pieProps,\n dataSlot,\n centerSlot,\n ...props\n}: PieChartBaseProps) {\n const config = React.useMemo(() => buildPieConfig(data), [data])\n const resolvedStroke = resolveChartColor(strokeColor) ?? strokeColor\n const styledData = React.useMemo(\n () => data.map((item) => ({ ...item, fill: config[item.name]?.color, stroke: resolvedStroke })),\n [data, resolvedStroke, config]\n )\n\n return (\n <ChartContainer\n data-slot={dataSlot}\n className={cn('relative aspect-square w-full', className)}\n config={config}\n {...props}\n >\n <RechartsPieChart>\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent hideLabel {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent nameKey=\"name\" {...legendProps} />} />}\n <Pie\n data={styledData}\n dataKey=\"value\"\n nameKey=\"name\"\n startAngle={startAngle}\n endAngle={endAngle}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={paddingAngle}\n strokeWidth={strokeWidth}\n label={withLabels ? { fontSize: 12 } : undefined}\n labelLine={withLabels && labelsPosition === 'outside'}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...pieProps}\n >\n {centerSlot}\n </Pie>\n </RechartsPieChart>\n </ChartContainer>\n )\n}\n\nfunction PieChart(props: PieChartProps) {\n return <PieChartBase {...props} dataSlot=\"pie-chart\" />\n}\n\nexport { PieChart, PieChartBase }\n"],"mappings":"4WA4CA,SAAgB,eAAe,EAAoC,CACjE,OAAO,EAAK,QAAqB,EAAK,EAAM,KAC1C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,KACZ,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CASA,SAAS,aAAa,CACpB,YACA,OACA,cAAc,GACd,aAAa,GACb,aAAa,GACb,iBAAiB,UACjB,aAAa,GACb,WAAW,KACX,eAAe,EACf,cAAc,EACd,cAAc,oBACd,cAAc,EACd,cAAc,MACd,oBACA,eACA,cACA,WACA,WACA,aACA,GAAG,GACiB,CACpB,IAAM,EAAS,EAAM,YAAc,eAAe,CAAI,EAAG,CAAC,CAAI,CAAC,EACzD,EAAiB,EAAkB,CAAW,GAAK,EACnD,EAAa,EAAM,YACjB,EAAK,IAAK,IAAU,CAAE,GAAG,EAAM,KAAM,EAAO,EAAK,KAAK,EAAE,MAAO,OAAQ,CAAe,EAAE,EAC9F,CAAC,EAAM,EAAgB,CAAM,CAC/B,EAEA,OACE,EAAC,EAAD,CACE,YAAW,EACX,UAAW,EAAG,gCAAiC,CAAS,EAChD,SACR,GAAI,
|
|
1
|
+
{"version":3,"file":"pie-chart.js","names":["RechartsPieChart"],"sources":["../../src/components/pie-chart.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Legend, Pie, PieChart as RechartsPieChart, Tooltip } from 'recharts'\n\nimport { cn } from '../lib/utils'\nimport {\n type ChartColorKey,\n type ChartConfig,\n ChartContainer,\n ChartLegendContent,\n type ChartLegendContentProps,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n DEFAULT_CHART_PALETTE,\n resolveChartColor\n} from './chart'\n\nexport type PieChartDatum = {\n name: string\n value: number\n color?: string\n colorKey?: ChartColorKey\n}\n\nexport type PieChartProps = Omit<React.ComponentProps<'div'>, 'children'> & {\n data: PieChartDatum[]\n withTooltip?: boolean\n withLegend?: boolean\n withLabels?: boolean\n labelsPosition?: 'inside' | 'outside'\n startAngle?: number\n endAngle?: number\n paddingAngle?: number\n strokeWidth?: number\n strokeColor?: ChartColorKey | string\n innerRadius?: number | string\n outerRadius?: number | string\n animationDuration?: number\n tooltipProps?: ChartTooltipContentProps\n legendProps?: ChartLegendContentProps\n pieProps?: Partial<React.ComponentProps<typeof Pie>>\n children?: React.ReactNode\n}\n\nexport function buildPieConfig(data: PieChartDatum[]): ChartConfig {\n return data.reduce<ChartConfig>((acc, item, index) => {\n acc[item.name] = {\n label: item.name,\n color:\n item.color ?? resolveChartColor(item.colorKey) ?? DEFAULT_CHART_PALETTE[index % DEFAULT_CHART_PALETTE.length]\n }\n return acc\n }, {})\n}\n\nexport type PieChartBaseProps = Omit<PieChartProps, 'children'> & {\n dataSlot: string\n innerRadius?: number | string\n outerRadius?: number | string\n centerSlot?: React.ReactNode\n}\n\nfunction PieChartBase({\n className,\n data,\n withTooltip = true,\n withLegend = false,\n withLabels = false,\n labelsPosition = 'outside',\n startAngle = 90,\n endAngle = -270,\n paddingAngle = 0,\n strokeWidth = 1,\n strokeColor = 'var(--background)',\n innerRadius = 0,\n outerRadius = '80%',\n animationDuration,\n tooltipProps,\n legendProps,\n pieProps,\n dataSlot,\n centerSlot,\n ...props\n}: PieChartBaseProps) {\n const config = React.useMemo(() => buildPieConfig(data), [data])\n const resolvedStroke = resolveChartColor(strokeColor) ?? strokeColor\n const styledData = React.useMemo(\n () => data.map((item) => ({ ...item, fill: config[item.name]?.color, stroke: resolvedStroke })),\n [data, resolvedStroke, config]\n )\n\n return (\n <ChartContainer\n data-slot={dataSlot}\n className={cn('relative aspect-square w-full', className)}\n config={config}\n {...props}\n >\n <RechartsPieChart>\n {withTooltip && <Tooltip cursor={false} content={<ChartTooltipContent hideLabel {...tooltipProps} />} />}\n {withLegend && <Legend content={<ChartLegendContent nameKey=\"name\" {...legendProps} />} />}\n <Pie\n data={styledData}\n dataKey=\"value\"\n nameKey=\"name\"\n startAngle={startAngle}\n endAngle={endAngle}\n innerRadius={innerRadius}\n outerRadius={outerRadius}\n paddingAngle={paddingAngle}\n strokeWidth={strokeWidth}\n label={withLabels ? { fontSize: 12 } : undefined}\n labelLine={withLabels && labelsPosition === 'outside'}\n animationDuration={animationDuration}\n isAnimationActive={animationDuration !== 0}\n {...pieProps}\n >\n {centerSlot}\n </Pie>\n </RechartsPieChart>\n </ChartContainer>\n )\n}\n\nfunction PieChart(props: PieChartProps) {\n return <PieChartBase {...props} dataSlot=\"pie-chart\" />\n}\n\nexport { PieChart, PieChartBase }\n"],"mappings":"4WA4CA,SAAgB,eAAe,EAAoC,CACjE,OAAO,EAAK,QAAqB,EAAK,EAAM,KAC1C,EAAI,EAAK,MAAQ,CACf,MAAO,EAAK,KACZ,MACE,EAAK,OAAS,EAAkB,EAAK,QAAQ,GAAK,EAAsB,EAAQ,EAAsB,OAC1G,EACO,GACN,CAAC,CAAC,CACP,CASA,SAAS,aAAa,CACpB,YACA,OACA,cAAc,GACd,aAAa,GACb,aAAa,GACb,iBAAiB,UACjB,aAAa,GACb,WAAW,KACX,eAAe,EACf,cAAc,EACd,cAAc,oBACd,cAAc,EACd,cAAc,MACd,oBACA,eACA,cACA,WACA,WACA,aACA,GAAG,GACiB,CACpB,IAAM,EAAS,EAAM,YAAc,eAAe,CAAI,EAAG,CAAC,CAAI,CAAC,EACzD,EAAiB,EAAkB,CAAW,GAAK,EACnD,EAAa,EAAM,YACjB,EAAK,IAAK,IAAU,CAAE,GAAG,EAAM,KAAM,EAAO,EAAK,KAAK,EAAE,MAAO,OAAQ,CAAe,EAAE,EAC9F,CAAC,EAAM,EAAgB,CAAM,CAC/B,EAEA,OACE,EAAC,EAAD,CACE,YAAW,EACX,UAAW,EAAG,gCAAiC,CAAS,EAChD,SACR,GAAI,EAEJ,SAAA,EAACA,EAAD,CAAA,SAAA,CACG,GAAe,EAAC,EAAD,CAAS,OAAQ,GAAO,QAAS,EAAC,EAAD,CAAqB,UAAA,GAAU,GAAI,CAAe,CAAA,CAAI,CAAA,EACtG,GAAc,EAAC,EAAD,CAAQ,QAAS,EAAC,EAAD,CAAoB,QAAQ,OAAO,GAAI,CAAc,CAAA,CAAI,CAAA,EACzF,EAAC,EAAD,CACE,KAAM,EACN,QAAQ,QACR,QAAQ,OACI,aACF,WACG,cACA,cACC,eACD,cACb,MAAO,EAAa,CAAE,SAAU,EAAG,EAAI,IAAA,GACvC,UAAW,GAAc,IAAmB,UACzB,oBACnB,kBAAmB,IAAsB,EACzC,GAAI,EAEH,SAAA,CACE,CAAA,CACW,CAAA,CAAA,CACJ,CAAA,CAEpB,CAEA,SAAS,SAAS,EAAsB,CACtC,OAAO,EAAC,aAAD,CAAc,GAAI,EAAO,SAAS,WAAa,CAAA,CACxD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Popover as Popover$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/popover.d.ts
|
|
6
5
|
type PopoverProps = React.ComponentProps<typeof Popover$1.Root>;
|
|
7
6
|
type PopoverTriggerProps = React.ComponentProps<typeof Popover$1.Trigger>;
|
|
@@ -10,33 +9,13 @@ type PopoverAnchorProps = React.ComponentProps<typeof Popover$1.Anchor>;
|
|
|
10
9
|
type PopoverHeaderProps = React.ComponentProps<'div'>;
|
|
11
10
|
type PopoverTitleProps = React.ComponentProps<'h2'>;
|
|
12
11
|
type PopoverDescriptionProps = React.ComponentProps<'p'>;
|
|
13
|
-
declare function Popover({
|
|
14
|
-
|
|
15
|
-
}:
|
|
16
|
-
declare function
|
|
17
|
-
|
|
18
|
-
}:
|
|
19
|
-
declare function
|
|
20
|
-
className,
|
|
21
|
-
align,
|
|
22
|
-
sideOffset,
|
|
23
|
-
...props
|
|
24
|
-
}: PopoverContentProps): React.JSX.Element;
|
|
25
|
-
declare function PopoverAnchor({
|
|
26
|
-
...props
|
|
27
|
-
}: PopoverAnchorProps): React.JSX.Element;
|
|
28
|
-
declare function PopoverHeader({
|
|
29
|
-
className,
|
|
30
|
-
...props
|
|
31
|
-
}: PopoverHeaderProps): React.JSX.Element;
|
|
32
|
-
declare function PopoverTitle({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: PopoverTitleProps): React.JSX.Element;
|
|
36
|
-
declare function PopoverDescription({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: PopoverDescriptionProps): React.JSX.Element;
|
|
12
|
+
declare function Popover({ ...props }: PopoverProps): React.JSX.Element;
|
|
13
|
+
declare function PopoverTrigger({ ...props }: PopoverTriggerProps): React.JSX.Element;
|
|
14
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: PopoverContentProps): React.JSX.Element;
|
|
15
|
+
declare function PopoverAnchor({ ...props }: PopoverAnchorProps): React.JSX.Element;
|
|
16
|
+
declare function PopoverHeader({ className, ...props }: PopoverHeaderProps): React.JSX.Element;
|
|
17
|
+
declare function PopoverTitle({ className, ...props }: PopoverTitleProps): React.JSX.Element;
|
|
18
|
+
declare function PopoverDescription({ className, ...props }: PopoverDescriptionProps): React.JSX.Element;
|
|
40
19
|
//#endregion
|
|
41
20
|
export { Popover, PopoverAnchor, PopoverAnchorProps, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps };
|
|
42
21
|
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -2,20 +2,13 @@ import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
|
2
2
|
import { Progress as Progress$1 } from "radix-ui";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
|
|
6
5
|
//#region src/components/progress.d.ts
|
|
7
6
|
declare const progressVariants: (props?: ({
|
|
8
|
-
size?: "
|
|
9
|
-
color?: "
|
|
7
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
8
|
+
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
10
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
10
|
type ProgressProps = React.ComponentProps<typeof Progress$1.Root> & VariantProps<typeof progressVariants>;
|
|
12
|
-
declare function Progress({
|
|
13
|
-
className,
|
|
14
|
-
value,
|
|
15
|
-
size,
|
|
16
|
-
color,
|
|
17
|
-
...props
|
|
18
|
-
}: ProgressProps): React.JSX.Element;
|
|
11
|
+
declare function Progress({ className, value, size, color, ...props }: ProgressProps): React.JSX.Element;
|
|
19
12
|
//#endregion
|
|
20
13
|
export { Progress, ProgressProps, progressVariants };
|
|
21
14
|
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":["ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Progress as ProgressPrimitive } from 'radix-ui'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst progressVariants = cva('relative flex w-full items-center overflow-x-hidden rounded-full bg-muted', {\n variants: {\n size: {\n sm: 'h-0.5',\n md: 'h-1',\n lg: 'h-1.5'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & VariantProps<typeof progressVariants>\n\nfunction Progress({ className, value, size = 'md', color = 'primary', ...props }: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n data-size={size}\n data-color={color}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"size-full flex-1 bg-(--progress-color) transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress, progressVariants }\n"],"mappings":"mQAQA,MAAM,EAAmB,EAAI,4EAA6E,CACxG,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,MACJ,GAAI,OACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAID,SAAS,SAAS,CAAE,YAAW,QAAO,OAAO,KAAM,QAAQ,UAAW,GAAG,GAAwB,CAC/F,OACE,EAACA,EAAkB,KAAnB,CACE,YAAU,WACV,YAAW,EACX,aAAY,EACZ,UAAW,EAAG,EAAiB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC1D,GAAI,
|
|
1
|
+
{"version":3,"file":"progress.js","names":["ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { Progress as ProgressPrimitive } from 'radix-ui'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst progressVariants = cva('relative flex w-full items-center overflow-x-hidden rounded-full bg-muted', {\n variants: {\n size: {\n sm: 'h-0.5',\n md: 'h-1',\n lg: 'h-1.5'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive.Root> & VariantProps<typeof progressVariants>\n\nfunction Progress({ className, value, size = 'md', color = 'primary', ...props }: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n data-size={size}\n data-color={color}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"size-full flex-1 bg-(--progress-color) transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n )\n}\n\nexport { Progress, progressVariants }\n"],"mappings":"mQAQA,MAAM,EAAmB,EAAI,4EAA6E,CACxG,SAAU,CACR,KAAM,CACJ,GAAI,QACJ,GAAI,MACJ,GAAI,OACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAID,SAAS,SAAS,CAAE,YAAW,QAAO,OAAO,KAAM,QAAQ,UAAW,GAAG,GAAwB,CAC/F,OACE,EAACA,EAAkB,KAAnB,CACE,YAAU,WACV,YAAW,EACX,aAAY,EACZ,UAAW,EAAG,EAAiB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC1D,GAAI,EAEJ,SAAA,EAACA,EAAkB,UAAnB,CACE,YAAU,qBACV,UAAU,wDACV,MAAO,CAAE,UAAW,eAAe,KAAO,GAAS,GAAG,GAAI,CAC3D,CAAA,CACqB,CAAA,CAE5B"}
|
|
@@ -5,34 +5,21 @@ import { RadioGroup as RadioGroup$1 } from "radix-ui";
|
|
|
5
5
|
import { VariantProps } from "class-variance-authority";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { ReactNode } from "react";
|
|
8
|
-
|
|
9
8
|
//#region src/components/radio-group.d.ts
|
|
10
9
|
type RadioGroupProps = React.ComponentProps<typeof RadioGroup$1.Root> & {
|
|
11
10
|
color?: UIColor;
|
|
12
11
|
};
|
|
13
12
|
declare const radioGroupItemVariants: (props?: ({
|
|
14
|
-
color?: "
|
|
15
|
-
size?: "
|
|
13
|
+
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
14
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
16
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
16
|
type RadioGroupItemProps = React.ComponentProps<typeof RadioGroup$1.Item> & VariantProps<typeof radioGroupItemVariants> & {
|
|
18
17
|
color?: UIColor;
|
|
19
18
|
label?: ReactNode;
|
|
20
19
|
labelProps?: Omit<LabelProps, 'children' | 'htmlFor'>;
|
|
21
20
|
};
|
|
22
|
-
declare function RadioGroup({
|
|
23
|
-
|
|
24
|
-
color,
|
|
25
|
-
...props
|
|
26
|
-
}: RadioGroupProps): React.JSX.Element;
|
|
27
|
-
declare function RadioGroupItem({
|
|
28
|
-
className,
|
|
29
|
-
color,
|
|
30
|
-
id,
|
|
31
|
-
label,
|
|
32
|
-
labelProps,
|
|
33
|
-
size,
|
|
34
|
-
...props
|
|
35
|
-
}: RadioGroupItemProps): React.JSX.Element;
|
|
21
|
+
declare function RadioGroup({ className, color, ...props }: RadioGroupProps): React.JSX.Element;
|
|
22
|
+
declare function RadioGroupItem({ className, color, id, label, labelProps, size, ...props }: RadioGroupItemProps): React.JSX.Element;
|
|
36
23
|
//#endregion
|
|
37
24
|
export { RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps };
|
|
38
25
|
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-Bdj-bS2b.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{useFieldControlId as r}from"./field.js";import{RadioGroup as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{useId as c}from"react";const l=s([`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`}}),u=s(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),d=s(`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`}}),f=s(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:r=`primary`,...o}){return a(i.Root,{"data-slot":`radio-group`,"data-color":r,className:e(`grid w-full gap-2`,t[r],n),...o})}function RadioGroupItem({className:t,color:s,id:p,label:m,labelProps:h,size:g=`md`,..._}){let v=c(),y=r(p),b=m!==void 0,x=y??(b?v:void 0),{className:S,...C}=h??{},w=a(i.Item,{"data-slot":`radio-group-item`,"data-color":s,"data-size":g,id:x,className:e(l({color:s,size:g}),t),..._,children:a(i.Indicator,{"data-slot":`radio-group-indicator`,className:e(u({size:g})),children:a(`span`,{className:e(d({size:g}),`-translate-x-1/2 -translate-y-1/2`)})})});return b?o(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[w,a(n,{...C,htmlFor:x,className:e(f({size:g}),S),children:m})]}):w}export{RadioGroup,RadioGroupItem};
|
|
1
|
+
import"../rolldown-runtime-Bdj-bS2b.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{useFieldControlId as r}from"./field.js";import{RadioGroup as i}from"radix-ui";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{useId as c}from"react";const l=s([`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:data-unchecked: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`}}),u=s(`flex items-center justify-center`,{variants:{size:{sm:`size-4`,md:`size-4.5`,lg:`size-5.5`}},defaultVariants:{size:`md`}}),d=s(`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`}}),f=s(``,{variants:{size:{sm:`text-xs`,md:`text-sm`,lg:`text-xl`}},defaultVariants:{size:`md`}});function RadioGroup({className:n,color:r=`primary`,...o}){return a(i.Root,{"data-slot":`radio-group`,"data-color":r,className:e(`grid w-full gap-2`,t[r],n),...o})}function RadioGroupItem({className:t,color:s,id:p,label:m,labelProps:h,size:g=`md`,..._}){let v=c(),y=r(p),b=m!==void 0,x=y??(b?v:void 0),{className:S,...C}=h??{},w=a(i.Item,{"data-slot":`radio-group-item`,"data-color":s,"data-size":g,id:x,className:e(l({color:s,size:g}),t),..._,children:a(i.Indicator,{"data-slot":`radio-group-indicator`,className:e(u({size:g})),children:a(`span`,{className:e(d({size:g}),`-translate-x-1/2 -translate-y-1/2`)})})});return b?o(`div`,{"data-slot":`radio-group-item-field`,className:`flex items-center gap-2`,children:[w,a(n,{...C,htmlFor:x,className:e(f({size:g}),S),children:m})]}):w}export{RadioGroup,RadioGroupItem};
|
|
2
2
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
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 { useFieldControlId } from './field'\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 fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\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={resolvedId}\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":"oYAgBA,MAAM,EAAyB,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,
|
|
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 { useFieldControlId } from './field'\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:data-unchecked: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 fieldControlId = useFieldControlId(id)\n const hasLabel = label !== undefined\n const resolvedId = fieldControlId ?? (hasLabel ? generatedId : undefined)\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={resolvedId}\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":"oYAgBA,MAAM,EAAyB,EAC7B,CACE,iHACA,mDACA,4EACA,kDACA,uFACA,uIACA,kCACA,oIACF,EACA,CACE,SAAU,CACR,MAAO,EACP,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CACF,EAEM,EAA8B,EAAI,mCAAoC,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,WACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEK,EAAiC,EAAI,+DAAgE,CACzG,SAAU,CACR,KAAM,CACJ,GAAI,WACJ,GAAI,SACJ,GAAI,UACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EAEK,EAA8B,EAAI,GAAI,CAC1C,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,SACN,CACF,EACA,gBAAiB,CACf,KAAM,IACR,CACF,CAAC,EASD,SAAS,WAAW,CAAE,YAAW,QAAQ,UAAW,GAAG,GAA0B,CAC/E,OACE,EAACA,EAAoB,KAArB,CACE,YAAU,cACV,aAAY,EACZ,UAAW,EAAG,oBAAqB,EAA8B,GAAQ,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,YAAW,QAAO,KAAI,QAAO,aAAY,OAAO,KAAM,GAAG,GAA8B,CAC/G,IAAM,EAAc,EAAM,EACpB,EAAiB,EAAkB,CAAE,EACrC,EAAW,IAAU,IAAA,GACrB,EAAa,IAAmB,EAAW,EAAc,IAAA,IACzD,CAAE,UAAW,EAAgB,GAAG,GAAmB,GAAc,CAAC,EAElE,EACJ,EAACA,EAAoB,KAArB,CACE,YAAU,mBACV,aAAY,EACZ,YAAW,EACX,GAAI,EACJ,UAAW,EAAG,EAAuB,CAAE,QAAO,MAAK,CAAC,EAAG,CAAS,EAChE,GAAI,EAEJ,SAAA,EAACA,EAAoB,UAArB,CACE,YAAU,wBACV,UAAW,EAAG,EAA4B,CAAE,MAAK,CAAC,CAAC,EAEnD,SAAA,EAAC,OAAD,CAAM,UAAW,EAAG,EAA+B,CAAE,MAAK,CAAC,EAAG,mCAAmC,CAAI,CAAA,CACxE,CAAA,CACP,CAAA,EAO5B,OAJK,EAKH,EAAC,MAAD,CAAK,YAAU,yBAAyB,UAAU,0BAAlD,SAAA,CACG,EACD,EAACC,EAAD,CACE,GAAI,EACJ,QAAS,EACT,UAAW,EAAG,EAA4B,CAAE,MAAK,CAAC,EAAG,CAAc,EAElE,SAAA,CACI,CAAA,CACJ,IAbE,CAeX"}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
-
|
|
4
3
|
//#region src/components/resizable.d.ts
|
|
5
4
|
type ResizablePanelGroupProps = ResizablePrimitive.GroupProps;
|
|
6
5
|
type ResizablePanelProps = ResizablePrimitive.PanelProps;
|
|
7
6
|
type ResizableHandleProps = ResizablePrimitive.SeparatorProps & {
|
|
8
7
|
withHandle?: boolean;
|
|
9
8
|
};
|
|
10
|
-
declare function ResizablePanelGroup({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}: ResizablePanelGroupProps): import("react").JSX.Element;
|
|
14
|
-
declare function ResizablePanel({
|
|
15
|
-
...props
|
|
16
|
-
}: ResizablePanelProps): import("react").JSX.Element;
|
|
17
|
-
declare function ResizableHandle({
|
|
18
|
-
withHandle,
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: ResizableHandleProps): import("react").JSX.Element;
|
|
9
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePanelGroupProps): import("react").JSX.Element;
|
|
10
|
+
declare function ResizablePanel({ ...props }: ResizablePanelProps): import("react").JSX.Element;
|
|
11
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps): import("react").JSX.Element;
|
|
22
12
|
//#endregion
|
|
23
13
|
export { ResizableHandle, ResizableHandleProps, ResizablePanel, ResizablePanelGroup, ResizablePanelGroupProps, ResizablePanelProps };
|
|
24
14
|
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["import * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils'\n\nexport type ResizablePanelGroupProps = ResizablePrimitive.GroupProps\n\nexport type ResizablePanelProps = ResizablePrimitive.PanelProps\n\nexport type ResizableHandleProps = ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePanelGroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && <div className=\"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border\" />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"],"mappings":"8JAYA,SAAS,oBAAoB,CAAE,YAAW,GAAG,GAAmC,CAC9E,OACE,EAAC,EAAmB,MAApB,CACE,YAAU,wBACV,UAAW,EAAG,0DAA2D,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,EAAmB,MAApB,CAA0B,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAS,gBAAgB,CAAE,aAAY,YAAW,GAAG,GAA+B,CAClF,OACE,EAAC,EAAmB,UAApB,CACE,YAAU,mBACV,UAAW,EACT,ukBACA,CACF,EACA,GAAI,
|
|
1
|
+
{"version":3,"file":"resizable.js","names":[],"sources":["../../src/components/resizable.tsx"],"sourcesContent":["import * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils'\n\nexport type ResizablePanelGroupProps = ResizablePrimitive.GroupProps\n\nexport type ResizablePanelProps = ResizablePrimitive.PanelProps\n\nexport type ResizableHandleProps = ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePanelGroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot=\"resizable-panel-group\"\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePanelProps) {\n return <ResizablePrimitive.Panel data-slot=\"resizable-panel\" {...props} />\n}\n\nfunction ResizableHandle({ withHandle, className, ...props }: ResizableHandleProps) {\n return (\n <ResizablePrimitive.Separator\n data-slot=\"resizable-handle\"\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90',\n className\n )}\n {...props}\n >\n {withHandle && <div className=\"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border\" />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"],"mappings":"8JAYA,SAAS,oBAAoB,CAAE,YAAW,GAAG,GAAmC,CAC9E,OACE,EAAC,EAAmB,MAApB,CACE,YAAU,wBACV,UAAW,EAAG,0DAA2D,CAAS,EAClF,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,eAAe,CAAE,GAAG,GAA8B,CACzD,OAAO,EAAC,EAAmB,MAApB,CAA0B,YAAU,kBAAkB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAS,gBAAgB,CAAE,aAAY,YAAW,GAAG,GAA+B,CAClF,OACE,EAAC,EAAmB,UAApB,CACE,YAAU,mBACV,UAAW,EACT,ukBACA,CACF,EACA,GAAI,EAEH,SAAA,GAAc,EAAC,MAAD,CAAK,UAAU,iDAAmD,CAAA,CACrD,CAAA,CAElC"}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/ring-progress.d.ts
|
|
6
5
|
declare const ringProgressVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
8
|
-
color?: "
|
|
6
|
+
size?: "lg" | "md" | "sm" | null | undefined;
|
|
7
|
+
color?: "blue" | "brand" | "gray" | "green" | "indigo" | "pink" | "primary" | "red" | "yellow" | "zinc" | null | undefined;
|
|
9
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
9
|
type RingProgressThickness = 'thin' | 'md' | 'thick';
|
|
11
10
|
type RingProgressProps = React.ComponentProps<'svg'> & VariantProps<typeof ringProgressVariants> & {
|
|
12
11
|
value?: number;
|
|
13
12
|
thickness?: RingProgressThickness;
|
|
14
13
|
};
|
|
15
|
-
declare function RingProgress({
|
|
16
|
-
className,
|
|
17
|
-
value,
|
|
18
|
-
size,
|
|
19
|
-
color,
|
|
20
|
-
thickness,
|
|
21
|
-
...props
|
|
22
|
-
}: RingProgressProps): React.JSX.Element;
|
|
14
|
+
declare function RingProgress({ className, value, size, color, thickness, ...props }: RingProgressProps): React.JSX.Element;
|
|
23
15
|
//#endregion
|
|
24
16
|
export { RingProgress, RingProgressProps, RingProgressThickness, ringProgressVariants };
|
|
25
17
|
//# sourceMappingURL=ring-progress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ring-progress.js","names":[],"sources":["../../src/components/ring-progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst ringProgressVariants = cva('shrink-0', {\n variants: {\n size: {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type RingProgressThickness = 'thin' | 'md' | 'thick'\n\nconst ringThickness = {\n thin: 8,\n md: 12,\n thick: 16\n} as const satisfies Record<RingProgressThickness, number>\n\nexport type RingProgressProps = React.ComponentProps<'svg'> &\n VariantProps<typeof ringProgressVariants> & {\n value?: number\n thickness?: RingProgressThickness\n }\n\nfunction RingProgress({\n className,\n value = 0,\n size = 'md',\n color = 'primary',\n thickness = 'md',\n ...props\n}: RingProgressProps) {\n const strokeWidth = ringThickness[thickness]\n const radius = (100 - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const clamped = Math.min(100, Math.max(0, value))\n const strokeDashoffset = circumference * (1 - clamped / 100)\n\n return (\n <svg\n data-slot=\"ring-progress\"\n data-size={size}\n data-color={color}\n data-thickness={thickness}\n role=\"progressbar\"\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n viewBox=\"0 0 100 100\"\n className={cn(ringProgressVariants({ size, color }), className)}\n {...props}\n >\n <circle cx=\"50\" cy=\"50\" r={radius} fill=\"none\" strokeWidth={strokeWidth} className=\"stroke-muted\" />\n <circle\n cx=\"50\"\n cy=\"50\"\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform=\"rotate(-90 50 50)\"\n className=\"stroke-(--progress-color) transition-all\"\n />\n </svg>\n )\n}\n\nexport { RingProgress, ringProgressVariants }\n"],"mappings":"yOAOA,MAAM,EAAuB,EAAI,WAAY,CAC3C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,UACJ,GAAI,SACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAIK,EAAgB,CACpB,KAAM,EACN,GAAI,GACJ,MAAO,EACT,EAQA,SAAS,aAAa,CACpB,YACA,QAAQ,EACR,OAAO,KACP,QAAQ,UACR,YAAY,KACZ,GAAG,GACiB,CACpB,IAAM,EAAc,EAAc,GAC5B,GAAU,IAAM,GAAe,EAC/B,EAAgB,EAAI,KAAK,GAAK,EAC9B,EAAU,KAAK,IAAI,IAAK,KAAK,IAAI,EAAG,CAAK,CAAC,EAC1C,EAAmB,GAAiB,EAAI,EAAU,KAExD,OACE,EAAC,MAAD,CACE,YAAU,gBACV,YAAW,EACX,aAAY,EACZ,iBAAgB,EAChB,KAAK,cACL,gBAAe,EACf,gBAAe,EACf,gBAAe,IACf,QAAQ,cACR,UAAW,EAAG,EAAqB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC9D,GAAI,
|
|
1
|
+
{"version":3,"file":"ring-progress.js","names":[],"sources":["../../src/components/ring-progress.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { progressColorVariants } from '../lib/progress'\nimport { cn } from '../lib/utils'\n\nconst ringProgressVariants = cva('shrink-0', {\n variants: {\n size: {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12'\n },\n color: progressColorVariants\n },\n defaultVariants: {\n size: 'md',\n color: 'primary'\n }\n})\n\nexport type RingProgressThickness = 'thin' | 'md' | 'thick'\n\nconst ringThickness = {\n thin: 8,\n md: 12,\n thick: 16\n} as const satisfies Record<RingProgressThickness, number>\n\nexport type RingProgressProps = React.ComponentProps<'svg'> &\n VariantProps<typeof ringProgressVariants> & {\n value?: number\n thickness?: RingProgressThickness\n }\n\nfunction RingProgress({\n className,\n value = 0,\n size = 'md',\n color = 'primary',\n thickness = 'md',\n ...props\n}: RingProgressProps) {\n const strokeWidth = ringThickness[thickness]\n const radius = (100 - strokeWidth) / 2\n const circumference = 2 * Math.PI * radius\n const clamped = Math.min(100, Math.max(0, value))\n const strokeDashoffset = circumference * (1 - clamped / 100)\n\n return (\n <svg\n data-slot=\"ring-progress\"\n data-size={size}\n data-color={color}\n data-thickness={thickness}\n role=\"progressbar\"\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n viewBox=\"0 0 100 100\"\n className={cn(ringProgressVariants({ size, color }), className)}\n {...props}\n >\n <circle cx=\"50\" cy=\"50\" r={radius} fill=\"none\" strokeWidth={strokeWidth} className=\"stroke-muted\" />\n <circle\n cx=\"50\"\n cy=\"50\"\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n transform=\"rotate(-90 50 50)\"\n className=\"stroke-(--progress-color) transition-all\"\n />\n </svg>\n )\n}\n\nexport { RingProgress, ringProgressVariants }\n"],"mappings":"yOAOA,MAAM,EAAuB,EAAI,WAAY,CAC3C,SAAU,CACR,KAAM,CACJ,GAAI,SACJ,GAAI,UACJ,GAAI,SACN,EACA,MAAO,CACT,EACA,gBAAiB,CACf,KAAM,KACN,MAAO,SACT,CACF,CAAC,EAIK,EAAgB,CACpB,KAAM,EACN,GAAI,GACJ,MAAO,EACT,EAQA,SAAS,aAAa,CACpB,YACA,QAAQ,EACR,OAAO,KACP,QAAQ,UACR,YAAY,KACZ,GAAG,GACiB,CACpB,IAAM,EAAc,EAAc,GAC5B,GAAU,IAAM,GAAe,EAC/B,EAAgB,EAAI,KAAK,GAAK,EAC9B,EAAU,KAAK,IAAI,IAAK,KAAK,IAAI,EAAG,CAAK,CAAC,EAC1C,EAAmB,GAAiB,EAAI,EAAU,KAExD,OACE,EAAC,MAAD,CACE,YAAU,gBACV,YAAW,EACX,aAAY,EACZ,iBAAgB,EAChB,KAAK,cACL,gBAAe,EACf,gBAAe,EACf,gBAAe,IACf,QAAQ,cACR,UAAW,EAAG,EAAqB,CAAE,OAAM,OAAM,CAAC,EAAG,CAAS,EAC9D,GAAI,EAXN,SAAA,CAaE,EAAC,SAAD,CAAQ,GAAG,KAAK,GAAG,KAAK,EAAG,EAAQ,KAAK,OAAoB,cAAa,UAAU,cAAgB,CAAA,EACnG,EAAC,SAAD,CACE,GAAG,KACH,GAAG,KACH,EAAG,EACH,KAAK,OACQ,cACb,cAAc,QACd,gBAAiB,EACC,mBAClB,UAAU,oBACV,UAAU,0CACX,CAAA,CACE,GAET"}
|
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { ScrollArea as ScrollArea$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/scroll-area.d.ts
|
|
6
5
|
type ScrollAreaProps = React.ComponentProps<typeof ScrollArea$1.Root>;
|
|
7
6
|
type ScrollBarProps = React.ComponentProps<typeof ScrollArea$1.ScrollAreaScrollbar>;
|
|
8
|
-
declare function ScrollArea({
|
|
9
|
-
|
|
10
|
-
children,
|
|
11
|
-
...props
|
|
12
|
-
}: ScrollAreaProps): React.JSX.Element;
|
|
13
|
-
declare function ScrollBar({
|
|
14
|
-
className,
|
|
15
|
-
orientation,
|
|
16
|
-
...props
|
|
17
|
-
}: ScrollBarProps): React.JSX.Element;
|
|
7
|
+
declare function ScrollArea({ className, children, ...props }: ScrollAreaProps): React.JSX.Element;
|
|
8
|
+
declare function ScrollBar({ className, orientation, ...props }: ScrollBarProps): React.JSX.Element;
|
|
18
9
|
//#endregion
|
|
19
10
|
export { ScrollArea, ScrollAreaProps, ScrollBar, ScrollBarProps };
|
|
20
11
|
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root>\n\nexport type ScrollBarProps = React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n\nfunction ScrollArea({ className, children, ...props }: ScrollAreaProps) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn(\n 'size-full rounded-[inherit] transition-[color,box-shadow] outline-none',\n 'focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({ className, orientation = 'vertical', ...props }: ScrollBarProps) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n 'data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent',\n 'data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"mappings":"qKAUA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAW,EAAG,WAAY,CAAS,EAAG,GAAI,
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":["ScrollAreaPrimitive"],"sources":["../../src/components/scroll-area.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\n\nimport { cn } from '../lib/utils'\n\nexport type ScrollAreaProps = React.ComponentProps<typeof ScrollAreaPrimitive.Root>\n\nexport type ScrollBarProps = React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n\nfunction ScrollArea({ className, children, ...props }: ScrollAreaProps) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn(\n 'size-full rounded-[inherit] transition-[color,box-shadow] outline-none',\n 'focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n )}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({ className, orientation = 'vertical', ...props }: ScrollBarProps) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none',\n 'data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent',\n 'data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"mappings":"qKAUA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAW,EAAG,WAAY,CAAS,EAAG,GAAI,EAA5F,SAAA,CACE,EAACA,EAAoB,SAArB,CACE,YAAU,uBACV,UAAW,EACT,yEACA,6EACF,EAEC,UAC2B,CAAA,EAC9B,EAAC,UAAD,CAAY,CAAA,EACZ,EAACA,EAAoB,OAArB,CAA6B,CAAA,CACL,GAE9B,CAEA,SAAS,UAAU,CAAE,YAAW,cAAc,WAAY,GAAG,GAAyB,CACpF,OACE,EAACA,EAAoB,oBAArB,CACE,YAAU,wBACV,mBAAkB,EACL,cACb,UAAW,EACT,qDACA,+GACA,qGACA,CACF,EACA,GAAI,EAEJ,SAAA,EAACA,EAAoB,gBAArB,CACE,YAAU,oBACV,UAAU,wCACX,CAAA,CACsC,CAAA,CAE7C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Select as Select$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/select.d.ts
|
|
6
5
|
type SelectProps = React.ComponentProps<typeof Select$1.Root>;
|
|
7
6
|
type SelectGroupProps = React.ComponentProps<typeof Select$1.Group>;
|
|
@@ -15,51 +14,16 @@ type SelectItemProps = React.ComponentProps<typeof Select$1.Item>;
|
|
|
15
14
|
type SelectSeparatorProps = React.ComponentProps<typeof Select$1.Separator>;
|
|
16
15
|
type SelectScrollUpButtonProps = React.ComponentProps<typeof Select$1.ScrollUpButton>;
|
|
17
16
|
type SelectScrollDownButtonProps = React.ComponentProps<typeof Select$1.ScrollDownButton>;
|
|
18
|
-
declare function Select({
|
|
19
|
-
|
|
20
|
-
}:
|
|
21
|
-
declare function
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}:
|
|
25
|
-
declare function
|
|
26
|
-
|
|
27
|
-
}:
|
|
28
|
-
declare function SelectTrigger({
|
|
29
|
-
className,
|
|
30
|
-
id,
|
|
31
|
-
size,
|
|
32
|
-
children,
|
|
33
|
-
...props
|
|
34
|
-
}: SelectTriggerProps): React.JSX.Element;
|
|
35
|
-
declare function SelectContent({
|
|
36
|
-
className,
|
|
37
|
-
children,
|
|
38
|
-
position,
|
|
39
|
-
align,
|
|
40
|
-
...props
|
|
41
|
-
}: SelectContentProps): React.JSX.Element;
|
|
42
|
-
declare function SelectLabel({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: SelectLabelProps): React.JSX.Element;
|
|
46
|
-
declare function SelectItem({
|
|
47
|
-
className,
|
|
48
|
-
children,
|
|
49
|
-
...props
|
|
50
|
-
}: SelectItemProps): React.JSX.Element;
|
|
51
|
-
declare function SelectSeparator({
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}: SelectSeparatorProps): React.JSX.Element;
|
|
55
|
-
declare function SelectScrollUpButton({
|
|
56
|
-
className,
|
|
57
|
-
...props
|
|
58
|
-
}: SelectScrollUpButtonProps): React.JSX.Element;
|
|
59
|
-
declare function SelectScrollDownButton({
|
|
60
|
-
className,
|
|
61
|
-
...props
|
|
62
|
-
}: SelectScrollDownButtonProps): React.JSX.Element;
|
|
17
|
+
declare function Select({ ...props }: SelectProps): React.JSX.Element;
|
|
18
|
+
declare function SelectGroup({ className, ...props }: SelectGroupProps): React.JSX.Element;
|
|
19
|
+
declare function SelectValue({ ...props }: SelectValueProps): React.JSX.Element;
|
|
20
|
+
declare function SelectTrigger({ className, id, size, children, ...props }: SelectTriggerProps): React.JSX.Element;
|
|
21
|
+
declare function SelectContent({ className, children, position, align, ...props }: SelectContentProps): React.JSX.Element;
|
|
22
|
+
declare function SelectLabel({ className, ...props }: SelectLabelProps): React.JSX.Element;
|
|
23
|
+
declare function SelectItem({ className, children, ...props }: SelectItemProps): React.JSX.Element;
|
|
24
|
+
declare function SelectSeparator({ className, ...props }: SelectSeparatorProps): React.JSX.Element;
|
|
25
|
+
declare function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps): React.JSX.Element;
|
|
26
|
+
declare function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps): React.JSX.Element;
|
|
63
27
|
//#endregion
|
|
64
28
|
export { Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectProps, SelectScrollDownButton, SelectScrollDownButtonProps, SelectScrollUpButton, SelectScrollUpButtonProps, SelectSeparator, SelectSeparatorProps, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps };
|
|
65
29
|
//# sourceMappingURL=select.d.ts.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'\nimport { useFieldControlId } from './field'\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, id, size = 'md', children, ...props }: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\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":"0TA8BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,kBAAmB,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAS,cAAc,CAAE,YAAW,KAAI,OAAO,KAAM,WAAU,GAAG,GAA6B,CAC7F,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAACA,EAAgB,QAAjB,CACE,GAAI,EACJ,YAAU,iBACV,YAAW,EACX,UAAW,EACT,qQACA,4EACA,qKACA,4FACA,qJACA,oFACA,kDACA,CACF,EACA,GAAI,
|
|
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'\nimport { useFieldControlId } from './field'\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, id, size = 'md', children, ...props }: SelectTriggerProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <SelectPrimitive.Trigger\n id={fieldControlId}\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":"0TA8BA,SAAS,OAAO,CAAE,GAAG,GAAsB,CACzC,OAAO,EAACA,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,UAAW,EAAG,kBAAmB,CAAS,EAAG,GAAI,CAAQ,CAAA,CAClH,CAEA,SAAS,YAAY,CAAE,GAAG,GAA2B,CACnD,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAS,cAAc,CAAE,YAAW,KAAI,OAAO,KAAM,WAAU,GAAG,GAA6B,CAC7F,IAAM,EAAiB,EAAkB,CAAE,EAE3C,OACE,EAACA,EAAgB,QAAjB,CACE,GAAI,EACJ,YAAU,iBACV,YAAW,EACX,UAAW,EACT,qQACA,4EACA,qKACA,4FACA,qJACA,oFACA,kDACA,CACF,EACA,GAAI,EAdN,SAAA,CAgBG,EACD,EAACA,EAAgB,KAAjB,CAAsB,QAAA,GACpB,SAAA,EAAC,EAAD,CAAc,UAAU,kDAAoD,CAAA,CACxD,CAAA,CACC,GAE7B,CAEA,SAAS,cAAc,CACrB,YACA,WACA,WAAW,eACX,QAAQ,SACR,GAAG,GACkB,CACrB,OACE,EAACA,EAAgB,OAAjB,CAAA,SACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,qBAAoB,IAAa,eACjC,UAAW,EACT,2PACA,uIACA,8JACA,yCACA,IAAa,UACX,kIACF,CACF,EACU,WACH,QACP,GAAI,EAdN,SAAA,CAgBE,EAAC,qBAAD,CAAuB,CAAA,EACvB,EAACA,EAAgB,SAAjB,CACE,gBAAe,EACf,UAAW,EACT,2DACA,2FACF,EAEC,UACuB,CAAA,EAC1B,EAAC,uBAAD,CAAyB,CAAA,CACF,CACH,CAAA,CAAA,CAAA,CAE5B,CAEA,SAAS,YAAY,CAAE,YAAW,GAAG,GAA2B,CAC9D,OACE,EAACA,EAAgB,MAAjB,CACE,YAAU,eACV,UAAW,EAAG,4CAA6C,CAAS,EACpE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,WAAW,CAAE,YAAW,WAAU,GAAG,GAA0B,CACtE,OACE,EAACA,EAAgB,KAAjB,CACE,YAAU,cACV,UAAW,EACT,8GACA,0HACA,oEACA,oFACA,6DACA,CACF,EACA,GAAI,EAVN,SAAA,CAYE,EAAC,OAAD,CAAM,UAAU,+EACd,SAAA,EAACA,EAAgB,cAAjB,CAAA,SACE,EAAC,EAAD,CAAW,UAAU,qBAAuB,CAAA,CACf,CAAA,CAC3B,CAAA,EACN,EAACA,EAAgB,SAAjB,CAA2B,UAAmC,CAAA,CAC1C,GAE1B,CAEA,SAAS,gBAAgB,CAAE,YAAW,GAAG,GAA+B,CACtE,OACE,EAACA,EAAgB,UAAjB,CACE,YAAU,mBACV,UAAW,EAAG,gDAAiD,CAAS,EACxE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAG,GAAoC,CAChF,OACE,EAACA,EAAgB,eAAjB,CACE,YAAU,0BACV,UAAW,EACT,uEACA,uCACA,CACF,EACA,GAAI,EAEJ,SAAA,EAAC,EAAD,CAAgB,CAAA,CACc,CAAA,CAEpC,CAEA,SAAS,uBAAuB,CAAE,YAAW,GAAG,GAAsC,CACpF,OACE,EAACA,EAAgB,iBAAjB,CACE,YAAU,4BACV,UAAW,EACT,uEACA,uCACA,CACF,EACA,GAAI,EAEJ,SAAA,EAAC,EAAD,CAAkB,CAAA,CACc,CAAA,CAEtC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { n as __name } from "../rolldown-runtime-Bdj-bS2b.js";
|
|
2
2
|
import { Separator as Separator$1 } from "radix-ui";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/separator.d.ts
|
|
6
5
|
type SeparatorProps = React.ComponentProps<typeof Separator$1.Root>;
|
|
7
|
-
declare function Separator({
|
|
8
|
-
className,
|
|
9
|
-
orientation,
|
|
10
|
-
decorative,
|
|
11
|
-
...props
|
|
12
|
-
}: SeparatorProps): React.JSX.Element;
|
|
6
|
+
declare function Separator({ className, orientation, decorative, ...props }: SeparatorProps): React.JSX.Element;
|
|
13
7
|
//#endregion
|
|
14
8
|
export { Separator, SeparatorProps };
|
|
15
9
|
//# sourceMappingURL=separator.d.ts.map
|