@uselets/ui 1.20.3 → 2.0.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 +322 -425
- package/dist/as-child-Dxg3Xo1G.d.ts +41 -0
- package/dist/cli/uselets.mjs +5 -4
- package/dist/cli/uselets.mjs.map +1 -1
- package/dist/components/accordion.d.ts +12 -8
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +20 -15
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/alert.js.map +1 -1
- package/dist/components/anchor.d.ts +3 -5
- package/dist/components/anchor.js +1 -1
- package/dist/components/anchor.js.map +1 -1
- package/dist/components/area-chart.d.ts +54 -0
- package/dist/components/area-chart.js +1 -1
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +12 -7
- package/dist/components/avatar.js +1 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +3 -5
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/bar-chart.d.ts +48 -0
- package/dist/components/bar-chart.js +1 -1
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/bottom-nav.d.ts +7 -3
- package/dist/components/bottom-nav.js +1 -1
- package/dist/components/bottom-nav.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +3 -4
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -4
- package/dist/components/button-group.js +1 -1
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.d.ts +8 -4
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +4 -0
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +4 -0
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/carousel.d.ts +11 -3
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/center.d.ts +1 -1
- package/dist/components/center.js +1 -1
- package/dist/components/center.js.map +1 -1
- package/dist/components/chart.js +4 -4
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +14 -4
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/code.js.map +1 -1
- package/dist/components/collapsible.d.ts +8 -7
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +48 -26
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +16 -2
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +1 -1
- package/dist/components/container.js +1 -1
- package/dist/components/container.js.map +1 -1
- package/dist/components/data-table.d.ts +177 -2
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +24 -2
- 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 +33 -15
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/direction.d.ts +7 -0
- package/dist/components/direction.js +1 -0
- package/dist/components/donut-chart.d.ts +12 -0
- package/dist/components/donut-chart.js +1 -1
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +33 -15
- package/dist/components/drawer.js +1 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +36 -26
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +19 -0
- package/dist/components/dropzone.js +1 -1
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.d.ts +16 -4
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/flex.d.ts +1 -1
- package/dist/components/flex.js +1 -1
- package/dist/components/flex.js.map +1 -1
- package/dist/components/grid.d.ts +13 -0
- package/dist/components/grid.js +1 -1
- package/dist/components/grid.js.map +1 -1
- package/dist/components/group.d.ts +1 -1
- package/dist/components/group.js +1 -1
- package/dist/components/group.js.map +1 -1
- package/dist/components/heading.d.ts +3 -5
- package/dist/components/heading.js +1 -1
- package/dist/components/heading.js.map +1 -1
- package/dist/components/hover-card.d.ts +7 -6
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +2 -2
- package/dist/components/input-group.js +1 -1
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.d.ts +4 -2
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.d.ts +3 -4
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/list.d.ts +8 -5
- package/dist/components/list.js +1 -1
- package/dist/components/list.js.map +1 -1
- package/dist/components/logo.d.ts +113 -0
- package/dist/components/logo.js +1 -1
- package/dist/components/marker.d.ts +4 -5
- package/dist/components/marker.js +1 -1
- package/dist/components/marker.js.map +1 -1
- package/dist/components/mask-input.d.ts +6 -0
- package/dist/components/mask-input.js +1 -1
- package/dist/components/mask-input.js.map +1 -1
- package/dist/components/native-select.d.ts +5 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +19 -20
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-field.d.ts +18 -13
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/pagination.d.ts +9 -0
- package/dist/components/pagination.js +1 -1
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/phone-input.d.ts +6 -0
- package/dist/components/phone-input.js +1 -1
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pie-chart.d.ts +53 -0
- package/dist/components/pie-chart.js +1 -1
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +13 -12
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +9 -3
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +20 -6
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +1 -0
- package/dist/components/resizable.js +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +9 -1
- package/dist/components/ring-progress.js +1 -1
- package/dist/components/ring-progress.js.map +1 -1
- package/dist/components/scroll-area.d.ts +3 -3
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +25 -20
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +9 -4
- package/dist/components/separator.js +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sidebar.d.ts +63 -18
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +7 -0
- package/dist/components/simple-grid.js +1 -1
- package/dist/components/simple-grid.js.map +1 -1
- package/dist/components/skeleton.d.ts +4 -0
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +1 -1
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stack.d.ts +1 -1
- package/dist/components/stack.js +1 -1
- package/dist/components/stack.js.map +1 -1
- package/dist/components/stepper.d.ts +46 -25
- package/dist/components/stepper.js +1 -1
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.d.ts +17 -3
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +14 -10
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.d.ts +3 -5
- package/dist/components/text.js +1 -1
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.d.ts +12 -0
- package/dist/components/theme.js +1 -1
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +25 -1
- package/dist/components/timeline.js +1 -1
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +16 -6
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -4
- package/dist/components/toggle.js +1 -1
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.d.ts +15 -8
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +3 -5
- package/dist/components/unstyled-button.js +1 -1
- package/dist/components/unstyled-button.js.map +1 -1
- package/dist/components/visibility.d.ts +2 -0
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.js.map +1 -1
- package/dist/hooks/use-breakpoint-value.d.ts +1 -0
- package/dist/hooks/use-breakpoint-value.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +1 -0
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-disclosure.d.ts +3 -0
- package/dist/hooks/use-disclosure.js +1 -1
- package/dist/hooks/use-disclosure.js.map +1 -1
- package/dist/hooks/use-document-visibility.d.ts +1 -0
- package/dist/hooks/use-document-visibility.js.map +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-idle.d.ts +9 -0
- package/dist/hooks/use-idle.js.map +1 -1
- package/dist/hooks/use-interval.d.ts +1 -0
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-local-storage.d.ts +6 -0
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/hooks/use-local-storage.js.map +1 -1
- package/dist/hooks/use-mask.d.ts +1 -0
- package/dist/hooks/use-mask.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.js +1 -1
- package/dist/lib/as-child.d.ts +2 -0
- package/dist/lib/as-child.js +2 -0
- package/dist/lib/as-child.js.map +1 -0
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/color.js.map +1 -1
- package/dist/lib/compose-refs.js +1 -1
- package/dist/lib/compose-refs.js.map +1 -1
- package/dist/lib/progress.js.map +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/logo--R3_XDgA.js +2 -0
- package/dist/logo--R3_XDgA.js.map +1 -0
- package/dist/postcss.config.js.map +1 -1
- package/dist/resolve-class-name-BurP8ngI.js +2 -0
- package/dist/resolve-class-name-BurP8ngI.js.map +1 -0
- package/dist/skills/uselets-ui/SKILL.md +9 -3
- package/dist/skills/uselets-ui/references/component-catalog.md +31 -16
- package/dist/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
- package/dist/skills/uselets-ui/references/package-guide.md +23 -7
- package/dist/styles/base.css +21 -0
- package/dist/{use-hotkeys-DOjcX9Tt.d.ts → use-hotkeys-D1_TEIwN.d.ts} +2 -1
- package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
- package/package.json +18 -19
- package/skills/uselets-ui/SKILL.md +9 -3
- package/skills/uselets-ui/references/component-catalog.md +31 -16
- package/skills/uselets-ui/references/migration-v1-to-v2.md +599 -0
- package/skills/uselets-ui/references/package-guide.md +23 -7
- package/dist/data-table-DWWVGWbU.d.ts +0 -4184
- package/dist/logo-B0thHtTS.js +0 -2
- package/dist/logo-B0thHtTS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","names":[],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId } from './field'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, id, type, ...props }: InputProps) {\n const fieldControlId = useFieldControlId(id)\n\n return (\n <input\n id={fieldControlId}\n type={type}\n data-slot=\"input\"\n className={cn(\n 'border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors',\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-placeholder',\n 'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80',\n '[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.js","names":["ariaInvalid","props","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","cn","className"],"sources":["../../src/components/input.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type InputProps = React.ComponentProps<'input'>\n\nfunction Input({ className, id, type, 'aria-invalid': ariaInvalid, ...props }: InputProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\n return (\n <input\n id={fieldControlId}\n aria-invalid={invalid}\n type={type}\n data-slot=\"input\"\n className={cn(\n 'border-input dark:bg-input/30 h-8 w-full min-w-0 rounded-lg border bg-transparent px-2.5 py-1 text-base md:text-sm transition-colors',\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-placeholder',\n 'file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',\n 'outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-input/50 dark:disabled:bg-input/80',\n '[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"mappings":"yLAOA,SAAS,MAAM,CAAE,YAAW,KAAI,OAAM,eAAgBA,EAAa,GAAGC,GAAqB,CACzF,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAUC,EAAgBN,CAAW,EAE3C,MACE,kBAAC,QAAD,CACE,GAAIE,EACJ,eAAcG,EACR,OACN,YAAU,QACV,UAAWE,EACT,uIACA,4EACA,qKACA,+BACA,iHACA,2IACA,mGACAC,CACF,EACA,GAAIP,CACL,CAAA,CAEL"}
|
package/dist/components/kbd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";function Kbd({className:n,...r}){return t(`kbd`,{"data-slot":`kbd`,className:e(`bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none`,n),...r})}function KbdGroup({className:n,...r}){return t(`kbd`,{"data-slot":`kbd-group`,className:e(`gap-1 inline-flex items-center`,n),...r})}export{Kbd,KbdGroup};
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{jsx as t}from"react/jsx-runtime";function Kbd({className:n,...r}){return/* @__PURE__ */ t(`kbd`,{"data-slot":`kbd`,className:e(`bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none`,n),...r})}function KbdGroup({className:n,...r}){return/* @__PURE__ */ t(`kbd`,{"data-slot":`kbd-group`,className:e(`gap-1 inline-flex items-center`,n),...r})}export{Kbd,KbdGroup};
|
|
2
2
|
//# sourceMappingURL=kbd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.js","names":[],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type KbdProps = React.ComponentProps<'kbd'>\n\nexport type KbdGroupProps = React.ComponentProps<'div'>\n\nfunction Kbd({ className, ...props }: KbdProps) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n return <kbd data-slot=\"kbd-group\" className={cn('gap-1 inline-flex items-center', className)} {...props} />\n}\n\nexport { Kbd, KbdGroup }\n"],"mappings":"qHAQA,SAAS,IAAI,CAAE,YAAW,
|
|
1
|
+
{"version":3,"file":"kbd.js","names":["props","cn","className"],"sources":["../../src/components/kbd.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\nexport type KbdProps = React.ComponentProps<'kbd'>\n\nexport type KbdGroupProps = React.ComponentProps<'div'>\n\nfunction Kbd({ className, ...props }: KbdProps) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n return <kbd data-slot=\"kbd-group\" className={cn('gap-1 inline-flex items-center', className)} {...props} />\n}\n\nexport { Kbd, KbdGroup }\n"],"mappings":"qHAQA,SAAS,IAAI,CAAE,YAAW,GAAGA,GAAmB,CAC9C,MACE,kBAAC,MAAD,CACE,YAAU,MACV,UAAWC,EACT,wWACAC,CACF,EACA,GAAIF,CACL,CAAA,CAEL,CAEA,SAAS,SAAS,CAAE,YAAW,GAAGA,GAAwB,CACxD,MAAO,kBAAC,MAAD,CAAK,YAAU,YAAY,UAAWC,EAAG,iCAAkCC,CAAS,EAAG,GAAIF,CAAQ,CAAA,CAC5G"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
3
|
-
import * as React from "react";
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
4
3
|
//#region src/components/label.d.ts
|
|
5
|
-
export type LabelProps =
|
|
6
|
-
declare function Label({ className, ...props }: LabelProps):
|
|
4
|
+
export type LabelProps = AsChildProps<'label'>;
|
|
5
|
+
declare function Label({ className, ...props }: LabelProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
7
6
|
//#endregion
|
|
8
7
|
export { Label };
|
|
9
8
|
//# sourceMappingURL=label.d.ts.map
|
package/dist/components/label.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";function Label({className:n,...r}){return e(`label`,{"data-slot":`label`,className:t(`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`,`peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50`,n),...r})}export{Label};
|
|
2
2
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","names":["
|
|
1
|
+
{"version":3,"file":"label.js","names":["props","useAsChild","cn","className"],"sources":["../../src/components/label.tsx"],"sourcesContent":["import { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nexport type LabelProps = AsChildProps<'label'>\n\nfunction Label({ className, ...props }: LabelProps) {\n return useAsChild('label', {\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 'peer-data-disabled:cursor-not-allowed peer-data-disabled:opacity-50',\n className\n ),\n ...props\n })\n}\n\nexport { Label }\n"],"mappings":"6HAKA,SAAS,MAAM,CAAE,YAAW,GAAGA,GAAqB,CAClD,OAAOC,EAAW,QAAS,CACzB,YAAa,QACb,UAAWC,EACT,2DACA,uFACA,4DACA,sEACAC,CACF,EACA,GAAGH,CACL,CAAC,CACH"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
//#region src/components/list.d.ts
|
|
5
6
|
type ListType = 'unordered' | 'ordered';
|
|
6
7
|
type InternalListItemProps = {
|
|
@@ -11,15 +12,17 @@ declare const listVariants: (props?: ({
|
|
|
11
12
|
spacing?: "lg" | "md" | "sm" | "xl" | "xs" | null | undefined;
|
|
12
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
14
|
export type ListProps = Omit<React.ComponentProps<'ul'>, 'ref' | 'type'> & Omit<React.ComponentProps<'ol'>, 'ref' | 'type'> & VariantProps<typeof listVariants> & {
|
|
15
|
+
/**
|
|
16
|
+
* `ordered` renders an `<ol>`; `unordered` renders a `<ul>`.
|
|
17
|
+
* @default 'unordered'
|
|
18
|
+
*/
|
|
14
19
|
type?: ListType;
|
|
15
20
|
};
|
|
16
21
|
export type ListItemProps = React.ComponentProps<'li'>;
|
|
17
|
-
export type ListIconProps =
|
|
18
|
-
asChild?: boolean;
|
|
19
|
-
};
|
|
22
|
+
export type ListIconProps = AsChildProps<'span'>;
|
|
20
23
|
declare function List({ className, children, type, size, spacing, ...props }: ListProps): React.JSX.Element;
|
|
21
24
|
declare function ListItem({ className, children, __index, ...props }: ListItemProps & InternalListItemProps): React.JSX.Element;
|
|
22
|
-
declare function ListIcon({ className, asChild, ...props }: ListIconProps): React.
|
|
25
|
+
declare function ListIcon({ className, asChild, ...props }: ListIconProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
23
26
|
//#endregion
|
|
24
27
|
export { List, ListIcon, ListItem, listVariants };
|
|
25
28
|
//# sourceMappingURL=list.d.ts.map
|
package/dist/components/list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";import*as n from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";const o=n.createContext({type:`unordered`}),s=a(`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:e,children:n,type:i=`unordered`,size:a=`md`,spacing:c=`md`,...l}){let u=i===`ordered`?`ol`:`ul`;return/* @__PURE__ */ r(o.Provider,{value:{type:i},children:/* @__PURE__ */ r(u,{"data-slot":`list`,"data-type":i,"data-size":a,"data-spacing":c,className:t(s({size:a,spacing:c}),e),...l,children:injectListItemIndices(n)})})}function ListItem({className:e,children:a,__index:s,...c}){let{type:l}=n.useContext(o),u=n.Children.toArray(a),d=u.find(isListIconElement)??null,f=d?u.filter(e=>e!==d):u,p=l===`ordered`;return/* @__PURE__ */ i(`li`,{"data-slot":`list-item`,"data-type":l,"data-has-icon":d?`true`:`false`,className:t(`grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3`,e),...c,children:[/* @__PURE__ */ r(`span`,{"aria-hidden":`true`,className:t(`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}.`:/* @__PURE__ */ r(`span`,{className:`size-1.5 rounded-full bg-current`}))}),/* @__PURE__ */ r(`div`,{className:`min-w-0`,children:f})]})}function ListIcon({className:n,asChild:r=!1,...i}){return e(`span`,{asChild:r,"data-slot":`list-icon`,className:t(`inline-flex shrink-0 items-center justify-center text-primary [&>svg]:size-4`,r&&`size-4`,n),...i})}function injectListItemIndices(e,t={current:0}){return n.Children.map(e,e=>{if(!n.isValidElement(e))return e;if(e.type===n.Fragment){let i=e;return/* @__PURE__ */ r(n.Fragment,{children:injectListItemIndices(i.props.children,t)},e.key)}return e.type===ListItem?n.cloneElement(e,{__index:t.current++}):e})}function isListIconElement(e){return n.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 {
|
|
1
|
+
{"version":3,"file":"list.js","names":["React","ListContext","listVariants","cva","props","Comp","type","size","spacing","cn","className","children","items","icon","content","item","isOrdered","__index","useAsChild","asChild","child","fragment","indexRef"],"sources":["../../src/components/list.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\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 /**\n * `ordered` renders an `<ol>`; `unordered` renders a `<ul>`.\n * @default 'unordered'\n */\n type?: ListType\n }\n\nexport type ListItemProps = React.ComponentProps<'li'>\n\nexport type ListIconProps = AsChildProps<'span'>\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 return useAsChild('span', {\n asChild,\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\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":"sPAiBA,MAAMC,EAAcD,EAAM,cAAgC,CACxD,KAAM,WACR,CAAC,EAEKE,EAAeC,EAAI,kDAAmD,CAC1E,SAAU,CACR,KAAM,CACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACJ,GAAI,UACJ,GAAI,SACN,EACA,QAAS,CACP,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,OACN,CACF,EACA,gBAAiB,CACf,KAAM,KACN,QAAS,IACX,CACF,CAAC,EAgBD,SAAS,KAAK,CAAE,YAAW,WAAU,OAAO,YAAa,OAAO,KAAM,UAAU,KAAM,GAAGC,GAAoB,CAC3G,IAAMC,EAAOC,IAAS,UAAY,KAAO,KAEzC,MACE,kBAACL,EAAY,SAAb,CAAsB,MAAO,CAAE,MAAK,EAClC,SAAA,kBAACI,EAAD,CACE,YAAU,OACV,YAAWC,EACX,YAAWC,EACX,eAAcC,EACd,UAAWC,EAAGP,EAAa,CAAE,OAAM,SAAQ,CAAC,EAAGQ,CAAS,EACxD,GAAIN,EAEH,SAAA,sBAAsBO,CAAQ,CAC3B,CAAA,CACc,CAAA,CAE1B,CAEA,SAAS,SAAS,CAAE,YAAW,WAAU,UAAS,GAAGP,GAAgD,CACnG,GAAM,CAAE,QAASJ,EAAM,WAAWC,CAAW,EACvCW,EAAQZ,EAAM,SAAS,QAAQW,CAAQ,EACvCE,EAAOD,EAAM,KAAK,iBAAiB,GAAK,KACxCE,EAAUD,EAAOD,EAAM,OAAQ,GAASG,IAASF,CAAI,EAAID,EACzDI,EAAYV,IAAS,UAE3B,MACE,kBAAC,KAAD,CACE,YAAU,YACV,YAAWA,EACX,gBAAeO,EAAO,OAAS,QAC/B,UAAWJ,EAAG,0DAA2DC,CAAS,EAClF,GAAIN,EALN,SAAA,CAOE,kBAAC,OAAD,CACE,cAAY,OACZ,UAAWK,EACT,WACAI,GAAQ,0FACR,CAACA,GAAQG,GAAa,2EACtB,CAACH,GAAQ,CAACG,GAAa,mFACzB,EAEC,SAAAH,IAASG,EAAY,IAAIC,GAAW,GAAK,EAAE,GAAK,kBAAC,OAAD,CAAM,UAAU,kCAAoC,CAAA,EACjG,CAAA,EACN,kBAAC,MAAD,CAAK,UAAU,UAAW,SAAAH,CAAa,CAAA,CACrC,GAER,CAEA,SAAS,SAAS,CAAE,YAAW,UAAU,GAAO,GAAGV,GAAwB,CACzE,OAAOc,EAAW,OAAQ,CACxB,UACA,YAAa,YACb,UAAWT,EACT,+EACAU,GAAW,SACXT,CACF,EACA,GAAGN,CACL,CAAC,CACH,CAEA,SAAS,sBAAsB,EAA2B,EAAW,CAAE,QAAS,CAAE,EAAoB,CACpG,OAAOJ,EAAM,SAAS,IAAIW,EAAW,GAAU,CAC7C,GAAI,CAACX,EAAM,eAAeoB,CAAK,EAC7B,OAAOA,EAGT,GAAIA,EAAM,OAASpB,EAAM,SAAU,CACjC,IAAMqB,EAAWD,EAEjB,MAAO,kBAACpB,EAAM,SAAP,CAAA,SAAiC,sBAAsBqB,EAAS,MAAM,SAAUC,CAAQ,CAAkB,EAArFF,EAAM,GAA+E,CACnH,CAQA,OANIA,EAAM,OAAS,SACVpB,EAAM,aAAaoB,EAAoE,CAC5F,QAAS,EAAS,SACpB,CAAC,EAGIA,CACT,CAAC,CACH,CAEA,SAAS,kBAAkB,EAAoE,CAC7F,OAAOpB,EAAM,eAAeoB,CAAK,GAAKA,EAAM,OAAS,QACvD"}
|
|
@@ -3,64 +3,177 @@ import * as React from "react";
|
|
|
3
3
|
//#region src/components/logo.d.ts
|
|
4
4
|
type LogoSize = 'sm' | 'md' | 'lg' | number;
|
|
5
5
|
export type MaxLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
6
|
+
/**
|
|
7
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
8
|
+
* @default 'full'
|
|
9
|
+
*/
|
|
6
10
|
variant?: 'icon' | 'full';
|
|
11
|
+
/**
|
|
12
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
13
|
+
* @default 'color'
|
|
14
|
+
*/
|
|
7
15
|
tone?: 'color' | 'mono';
|
|
16
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
8
17
|
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
20
|
+
* @default 'md'
|
|
21
|
+
*/
|
|
9
22
|
size?: LogoSize;
|
|
10
23
|
};
|
|
11
24
|
declare function MaxLogo({ variant, tone, color, size, className, style, ...props }: MaxLogoProps): React.JSX.Element;
|
|
12
25
|
export type GomaxLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
26
|
+
/**
|
|
27
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
28
|
+
* @default 'full'
|
|
29
|
+
*/
|
|
13
30
|
variant?: 'icon' | 'full';
|
|
31
|
+
/**
|
|
32
|
+
* `color` uses the brand colors; `mono` a single color; `reversed` is a white lockup with an orange accent for dark backgrounds.
|
|
33
|
+
* @default 'color'
|
|
34
|
+
*/
|
|
14
35
|
tone?: 'color' | 'mono' | 'reversed';
|
|
36
|
+
/** Color of the `mono` and `reversed` tone. Defaults to white. */
|
|
15
37
|
color?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
40
|
+
* @default 'md'
|
|
41
|
+
*/
|
|
16
42
|
size?: LogoSize;
|
|
17
43
|
};
|
|
18
44
|
declare function GomaxLogo({ variant, tone, color, size, className, style, ...props }: GomaxLogoProps): React.JSX.Element;
|
|
19
45
|
export type BippiLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
46
|
+
/**
|
|
47
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
48
|
+
* @default 'full'
|
|
49
|
+
*/
|
|
20
50
|
variant?: 'icon' | 'full';
|
|
51
|
+
/**
|
|
52
|
+
* `color` uses the brand colors; `mono` a single color; `reversed` is a white lockup with an orange accent for dark backgrounds.
|
|
53
|
+
* @default 'color'
|
|
54
|
+
*/
|
|
21
55
|
tone?: 'color' | 'mono' | 'reversed';
|
|
56
|
+
/** Color of the `mono` and `reversed` tone. Defaults to white. */
|
|
22
57
|
color?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
60
|
+
* @default 'md'
|
|
61
|
+
*/
|
|
23
62
|
size?: LogoSize;
|
|
24
63
|
};
|
|
25
64
|
declare function BippiLogo({ variant, tone, color, size, className, style, ...props }: BippiLogoProps): React.JSX.Element;
|
|
26
65
|
export type IntelitrackLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
66
|
+
/**
|
|
67
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
68
|
+
* @default 'full'
|
|
69
|
+
*/
|
|
27
70
|
variant?: 'icon' | 'full';
|
|
71
|
+
/**
|
|
72
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
73
|
+
* @default 'color'
|
|
74
|
+
*/
|
|
28
75
|
tone?: 'color' | 'mono';
|
|
76
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
29
77
|
color?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
80
|
+
* @default 'md'
|
|
81
|
+
*/
|
|
30
82
|
size?: LogoSize;
|
|
31
83
|
};
|
|
32
84
|
declare function IntelitrackLogo({ variant, tone, color, size, className, style, ...props }: IntelitrackLogoProps): React.JSX.Element;
|
|
33
85
|
export type KovraLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
86
|
+
/**
|
|
87
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
88
|
+
* @default 'full'
|
|
89
|
+
*/
|
|
34
90
|
variant?: 'icon' | 'full';
|
|
91
|
+
/**
|
|
92
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
93
|
+
* @default 'color'
|
|
94
|
+
*/
|
|
35
95
|
tone?: 'color' | 'mono';
|
|
96
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
36
97
|
color?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
100
|
+
* @default 'md'
|
|
101
|
+
*/
|
|
37
102
|
size?: LogoSize;
|
|
38
103
|
};
|
|
39
104
|
declare function KovraLogo({ variant, tone, color, size, className, style, ...props }: KovraLogoProps): React.JSX.Element;
|
|
40
105
|
export type NeutraLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
106
|
+
/**
|
|
107
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
108
|
+
* @default 'full'
|
|
109
|
+
*/
|
|
41
110
|
variant?: 'icon' | 'full';
|
|
111
|
+
/**
|
|
112
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
113
|
+
* @default 'color'
|
|
114
|
+
*/
|
|
42
115
|
tone?: 'color' | 'mono';
|
|
116
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
43
117
|
color?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
120
|
+
* @default 'md'
|
|
121
|
+
*/
|
|
44
122
|
size?: LogoSize;
|
|
45
123
|
};
|
|
46
124
|
declare function NeutraLogo({ variant, tone, color, size, className, style, ...props }: NeutraLogoProps): React.JSX.Element;
|
|
47
125
|
export type RdLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
126
|
+
/**
|
|
127
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
128
|
+
* @default 'full'
|
|
129
|
+
*/
|
|
48
130
|
variant?: 'icon' | 'full';
|
|
131
|
+
/**
|
|
132
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
133
|
+
* @default 'color'
|
|
134
|
+
*/
|
|
49
135
|
tone?: 'color' | 'mono';
|
|
136
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
50
137
|
color?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
140
|
+
* @default 'md'
|
|
141
|
+
*/
|
|
51
142
|
size?: LogoSize;
|
|
52
143
|
};
|
|
53
144
|
declare function RdLogo({ variant, tone, color, size, className, style, ...props }: RdLogoProps): React.JSX.Element;
|
|
54
145
|
export type FibonashLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
146
|
+
/**
|
|
147
|
+
* `full` shows the symbol and the name; `icon` only the symbol.
|
|
148
|
+
* @default 'full'
|
|
149
|
+
*/
|
|
55
150
|
variant?: 'icon' | 'full';
|
|
151
|
+
/**
|
|
152
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
153
|
+
* @default 'color'
|
|
154
|
+
*/
|
|
56
155
|
tone?: 'color' | 'mono';
|
|
156
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
57
157
|
color?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
160
|
+
* @default 'md'
|
|
161
|
+
*/
|
|
58
162
|
size?: LogoSize;
|
|
59
163
|
};
|
|
60
164
|
declare function FibonashLogo({ variant, tone, color, size, className, style, ...props }: FibonashLogoProps): React.JSX.Element;
|
|
61
165
|
export type LetsLogoProps = Omit<React.ComponentProps<'svg'>, 'color'> & {
|
|
166
|
+
/**
|
|
167
|
+
* `color` uses the brand colors; `mono` a single color.
|
|
168
|
+
* @default 'color'
|
|
169
|
+
*/
|
|
62
170
|
tone?: 'color' | 'mono';
|
|
171
|
+
/** Color of the `mono` tone. Defaults to white. */
|
|
63
172
|
color?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Height preset, or a number in px. The width follows the logo proportions.
|
|
175
|
+
* @default 'md'
|
|
176
|
+
*/
|
|
64
177
|
size?: LogoSize;
|
|
65
178
|
};
|
|
66
179
|
declare function LetsLogo({ tone, color, size, className, style, ...props }: LetsLogoProps): React.JSX.Element;
|
package/dist/components/logo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as BippiLogo,n as FibonashLogo,r as GomaxLogo,i as IntelitrackLogo,a as KovraLogo,o as LetsLogo,s as MaxLogo,c as NeutraLogo,l as RdLogo}from"../logo--R3_XDgA.js";
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
5
|
//#region src/components/marker.d.ts
|
|
5
6
|
declare const markerVariants: (props?: ({
|
|
6
7
|
variant?: "border" | "default" | "separator" | null | undefined;
|
|
7
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
export type MarkerProps =
|
|
9
|
-
asChild?: boolean;
|
|
10
|
-
};
|
|
9
|
+
export type MarkerProps = AsChildProps<'div'> & VariantProps<typeof markerVariants>;
|
|
11
10
|
export type MarkerIconProps = React.ComponentProps<'span'>;
|
|
12
11
|
export type MarkerContentProps = React.ComponentProps<'span'>;
|
|
13
|
-
declare function Marker({ className, variant,
|
|
12
|
+
declare function Marker({ className, variant, ...props }: MarkerProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
14
13
|
declare function MarkerIcon({ className, ...props }: MarkerIconProps): React.JSX.Element;
|
|
15
14
|
declare function MarkerContent({ className, ...props }: MarkerContentProps): React.JSX.Element;
|
|
16
15
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{useAsChild as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";import{jsx as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(`group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground`,{variants:{variant:{default:``,separator:`before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border`,border:`border-b border-border pb-2`}}});function Marker({className:n,variant:r=`default`,...a}){return e(`div`,{"data-slot":`marker`,"data-variant":r,className:t(i({variant:r,className:n})),...a})}function MarkerIcon({className:e,...r}){return/* @__PURE__ */ n(`span`,{"data-slot":`marker-icon`,"aria-hidden":`true`,className:t(`size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function MarkerContent({className:e,...r}){return/* @__PURE__ */ n(`span`,{"data-slot":`marker-content`,className:t(`min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...r})}export{Marker,MarkerContent,MarkerIcon,i as markerVariants};
|
|
2
2
|
//# sourceMappingURL=marker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.js","names":[],"sources":["../../src/components/marker.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport {
|
|
1
|
+
{"version":3,"file":"marker.js","names":["markerVariants","cva","props","useAsChild","variant","cn","className"],"sources":["../../src/components/marker.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nconst markerVariants = cva(\n \"group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground\",\n {\n variants: {\n variant: {\n default: '',\n separator:\n 'before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border',\n border: 'border-b border-border pb-2'\n }\n }\n }\n)\n\nexport type MarkerProps = AsChildProps<'div'> & VariantProps<typeof markerVariants>\n\nexport type MarkerIconProps = React.ComponentProps<'span'>\n\nexport type MarkerContentProps = React.ComponentProps<'span'>\n\nfunction Marker({ className, variant = 'default', ...props }: MarkerProps) {\n return useAsChild('div', {\n 'data-slot': 'marker',\n 'data-variant': variant,\n className: cn(markerVariants({ variant, className })),\n ...props\n })\n}\n\nfunction MarkerIcon({ className, ...props }: MarkerIconProps) {\n return (\n <span\n data-slot=\"marker-icon\"\n aria-hidden=\"true\"\n className={cn(\"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n />\n )\n}\n\nfunction MarkerContent({ className, ...props }: MarkerContentProps) {\n return (\n <span\n data-slot=\"marker-content\"\n className={cn(\n 'min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Marker, MarkerContent, MarkerIcon, markerVariants }\n"],"mappings":"oNAOA,MAAMA,EAAiBC,EACrB,2MACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,GACT,UACE,yIACF,OAAQ,6BACV,CACF,CACF,CACF,EAQA,SAAS,OAAO,CAAE,YAAW,UAAU,UAAW,GAAGC,GAAsB,CACzE,OAAOC,EAAW,MAAO,CACvB,YAAa,SACb,eAAgBC,EAChB,UAAWC,EAAGL,EAAe,CAAE,UAAS,WAAU,CAAC,CAAC,EACpD,GAAGE,CACL,CAAC,CACH,CAEA,SAAS,WAAW,CAAE,YAAW,GAAGA,GAA0B,CAC5D,MACE,kBAAC,OAAD,CACE,YAAU,cACV,cAAY,OACZ,UAAWG,EAAG,uDAAwDC,CAAS,EAC/E,GAAIJ,CACL,CAAA,CAEL,CAEA,SAAS,cAAc,CAAE,YAAW,GAAGA,GAA6B,CAClE,MACE,kBAAC,OAAD,CACE,YAAU,iBACV,UAAWG,EACT,iMACAC,CACF,EACA,GAAIJ,CACL,CAAA,CAEL"}
|
|
@@ -3,11 +3,17 @@ import { InputProps } from "./input.js";
|
|
|
3
3
|
import { Modify, Replacement, Track } from "../hooks/use-mask.js";
|
|
4
4
|
//#region src/components/mask-input.d.ts
|
|
5
5
|
export type MaskInputProps = InputProps & {
|
|
6
|
+
/** Mask pattern. `_` is a digit, `#` a letter, `*` any character; everything else is fixed. */
|
|
6
7
|
mask: string;
|
|
8
|
+
/** Custom tokens for `mask`, mapping each character to the pattern it accepts. */
|
|
7
9
|
replacement?: string | Replacement;
|
|
10
|
+
/** Shows the whole mask, with placeholders for the characters not typed yet. */
|
|
8
11
|
showMask?: boolean;
|
|
12
|
+
/** Keeps each character in its position when another one is deleted, instead of shifting the rest left. */
|
|
9
13
|
separate?: boolean;
|
|
14
|
+
/** Changes the typed or pasted text before it is masked. */
|
|
10
15
|
track?: Track;
|
|
16
|
+
/** Changes the mask options on each input, for masks that depend on the current value. */
|
|
11
17
|
modify?: Modify;
|
|
12
18
|
};
|
|
13
19
|
declare function MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{Input as e}from"./input.js";import{composeRefs as t}from"../lib/compose-refs.js";import{useMask as n}from"../hooks/use-mask.js";import{jsx as r}from"react/jsx-runtime";function MaskInput({ref:i,mask:a,replacement:o,showMask:s,separate:c,track:l,modify:u,...d}){let f=n({mask:a,replacement:o,showMask:s,separate:c,track:l,modify:u});return r(e,{"data-slot":`mask-input`,...d,ref:t(i,f)})}export{MaskInput};
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{Input as e}from"./input.js";import{composeRefs as t}from"../lib/compose-refs.js";import{useMask as n}from"../hooks/use-mask.js";import{jsx as r}from"react/jsx-runtime";function MaskInput({ref:i,mask:a,replacement:o,showMask:s,separate:c,track:l,modify:u,...d}){let f=n({mask:a,replacement:o,showMask:s,separate:c,track:l,modify:u});return/* @__PURE__ */ r(e,{"data-slot":`mask-input`,...d,ref:t(i,f)})}export{MaskInput};
|
|
2
2
|
//# sourceMappingURL=mask-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-input.js","names":[],"sources":["../../src/components/mask-input.tsx"],"sourcesContent":["import { type Modify, type Replacement, type Track, useMask } from '../hooks/use-mask'\nimport { composeRefs } from '../lib/compose-refs'\nimport { Input, type InputProps } from './input'\n\nexport type MaskInputProps = InputProps & {\n mask: string\n replacement?: string | Replacement\n showMask?: boolean\n separate?: boolean\n track?: Track\n modify?: Modify\n}\n\nfunction MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps) {\n const maskRef = useMask({ mask, replacement, showMask, separate, track, modify })\n\n return <Input data-slot=\"mask-input\" {...props} ref={composeRefs<HTMLInputElement>(ref, maskRef)} />\n}\n\nexport { MaskInput }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"mask-input.js","names":["props","maskRef","useMask","Input","composeRefs","ref"],"sources":["../../src/components/mask-input.tsx"],"sourcesContent":["import { type Modify, type Replacement, type Track, useMask } from '../hooks/use-mask'\nimport { composeRefs } from '../lib/compose-refs'\nimport { Input, type InputProps } from './input'\n\nexport type MaskInputProps = InputProps & {\n /** Mask pattern. `_` is a digit, `#` a letter, `*` any character; everything else is fixed. */\n mask: string\n /** Custom tokens for `mask`, mapping each character to the pattern it accepts. */\n replacement?: string | Replacement\n /** Shows the whole mask, with placeholders for the characters not typed yet. */\n showMask?: boolean\n /** Keeps each character in its position when another one is deleted, instead of shifting the rest left. */\n separate?: boolean\n /** Changes the typed or pasted text before it is masked. */\n track?: Track\n /** Changes the mask options on each input, for masks that depend on the current value. */\n modify?: Modify\n}\n\nfunction MaskInput({ ref, mask, replacement, showMask, separate, track, modify, ...props }: MaskInputProps) {\n const maskRef = useMask({ mask, replacement, showMask, separate, track, modify })\n\n return <Input data-slot=\"mask-input\" {...props} ref={composeRefs<HTMLInputElement>(ref, maskRef)} />\n}\n\nexport { MaskInput }\n"],"mappings":"uNAmBA,SAAS,UAAU,CAAE,MAAK,OAAM,cAAa,WAAU,WAAU,QAAO,SAAQ,GAAGA,GAAyB,CAC1G,IAAMC,EAAUC,EAAQ,CAAE,OAAM,cAAa,WAAU,WAAU,QAAO,QAAO,CAAC,EAEhF,MAAO,kBAACC,EAAD,CAAO,YAAU,aAAa,GAAIH,EAAO,IAAKI,EAA8BC,EAAKJ,CAAO,CAAI,CAAA,CACrG"}
|
|
@@ -2,11 +2,15 @@ import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
//#region src/components/native-select.d.ts
|
|
4
4
|
export type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Height of the select.
|
|
7
|
+
* @default 'md'
|
|
8
|
+
*/
|
|
5
9
|
size?: 'sm' | 'md';
|
|
6
10
|
};
|
|
7
11
|
export type NativeSelectOptionProps = React.ComponentProps<'option'>;
|
|
8
12
|
export type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>;
|
|
9
|
-
declare function NativeSelect({ className, id, size, ...props }: NativeSelectProps): React.JSX.Element;
|
|
13
|
+
declare function NativeSelect({ className, id, size, 'aria-invalid': ariaInvalid, ...props }: NativeSelectProps): React.JSX.Element;
|
|
10
14
|
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): React.JSX.Element;
|
|
11
15
|
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): React.JSX.Element;
|
|
12
16
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t}from"./field.js";import{IconSelector as
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{cn as e}from"../lib/utils.js";import{useFieldControlId as t,useFieldInvalid as n}from"./field.js";import{IconSelector as r}from"@tabler/icons-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function NativeSelect({className:o,id:s,size:c=`md`,"aria-invalid":l,...u}){let d=t(s),f=n(l);return/* @__PURE__ */ a(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,o),"data-slot":`native-select-wrapper`,"data-size":c,children:[/* @__PURE__ */ i(`select`,{id:d,"aria-invalid":f,"data-slot":`native-select`,"data-size":c,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-placeholder 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`),...u}),/* @__PURE__ */ i(r,{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/* @__PURE__ */ i(`option`,{"data-slot":`native-select-option`,...e})}function NativeSelectOptGroup({className:t,...n}){return/* @__PURE__ */ i(`optgroup`,{"data-slot":`native-select-optgroup`,className:e(t),...n})}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'\nimport { useFieldControlId } from './field'\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, id, size = 'md', ...props }: NativeSelectProps) {\n const fieldControlId = useFieldControlId(id)\n\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 id={fieldControlId}\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-placeholder 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":"
|
|
1
|
+
{"version":3,"file":"native-select.js","names":["ariaInvalid","props","fieldControlId","useFieldControlId","id","invalid","useFieldInvalid","cn","className","size","IconSelector"],"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'\nimport { useFieldControlId, useFieldInvalid } from './field'\n\nexport type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {\n /**\n * Height of the select.\n * @default 'md'\n */\n size?: 'sm' | 'md'\n}\n\nexport type NativeSelectOptionProps = React.ComponentProps<'option'>\n\nexport type NativeSelectOptGroupProps = React.ComponentProps<'optgroup'>\n\nfunction NativeSelect({ className, id, size = 'md', 'aria-invalid': ariaInvalid, ...props }: NativeSelectProps) {\n const fieldControlId = useFieldControlId(id)\n const invalid = useFieldInvalid(ariaInvalid)\n\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 id={fieldControlId}\n aria-invalid={invalid}\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-placeholder 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":"sPAmBA,SAAS,aAAa,CAAE,YAAW,KAAI,OAAO,KAAM,eAAgBA,EAAa,GAAGC,GAA4B,CAC9G,IAAMC,EAAiBC,EAAkBC,CAAE,EACrCC,EAAUC,EAAgBN,CAAW,EAE3C,MACE,kBAAC,MAAD,CACE,UAAWO,EAAG,sEAAuEC,CAAS,EAC9F,YAAU,wBACV,YAAWC,EAHb,SAAA,CAKE,kBAAC,SAAD,CACE,GAAIP,EACJ,eAAcG,EACd,YAAU,gBACV,YAAWI,EACX,UAAWF,EACT,+LACA,4EACA,qKACA,sFACA,+FACA,0DACF,EACA,GAAIN,CACL,CAAA,EACD,kBAACS,EAAD,CACE,UAAU,2GACV,cAAY,OACZ,YAAU,oBACX,CAAA,CACE,GAET,CAEA,SAAS,mBAAmB,CAAE,GAAGT,GAAkC,CACjE,MAAO,kBAAC,SAAD,CAAQ,YAAU,uBAAuB,GAAIA,CAAQ,CAAA,CAC9D,CAEA,SAAS,qBAAqB,CAAE,YAAW,GAAGA,GAAoC,CAChF,MAAO,kBAAC,WAAD,CAAU,YAAU,yBAAyB,UAAWM,EAAGC,CAAS,EAAG,GAAIP,CAAQ,CAAA,CAC5F"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { NavigationMenu as NavigationMenu$1 } from "@base-ui/react/navigation-menu";
|
|
4
5
|
//#region src/components/navigation-menu.d.ts
|
|
5
|
-
export type NavigationMenuProps = React.ComponentProps<typeof NavigationMenu$1.Root> &
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
declare function
|
|
16
|
-
declare function NavigationMenuList({ className, ...props }: NavigationMenuListProps): React.JSX.Element;
|
|
17
|
-
declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): React.JSX.Element;
|
|
6
|
+
export type NavigationMenuProps = Omit<React.ComponentProps<typeof NavigationMenu$1.Root>, 'render'> & Pick<React.ComponentProps<typeof NavigationMenu$1.Positioner>, 'align'>;
|
|
7
|
+
export type NavigationMenuListProps = AsChildPrimitiveProps<typeof NavigationMenu$1.List>;
|
|
8
|
+
export type NavigationMenuItemProps = AsChildPrimitiveProps<typeof NavigationMenu$1.Item>;
|
|
9
|
+
export type NavigationMenuTriggerProps = AsChildPrimitiveProps<typeof NavigationMenu$1.Trigger>;
|
|
10
|
+
export type NavigationMenuContentProps = AsChildPrimitiveProps<typeof NavigationMenu$1.Content>;
|
|
11
|
+
export type NavigationMenuPositionerProps = Omit<React.ComponentProps<typeof NavigationMenu$1.Positioner>, 'render'> & Pick<React.ComponentProps<typeof NavigationMenu$1.Portal>, 'keepMounted'>;
|
|
12
|
+
export type NavigationMenuLinkProps = AsChildPrimitiveProps<typeof NavigationMenu$1.Link>;
|
|
13
|
+
export type NavigationMenuIndicatorProps = AsChildPrimitiveProps<typeof NavigationMenu$1.Icon>;
|
|
14
|
+
declare function NavigationMenu({ align, className, children, ...props }: NavigationMenuProps): React.JSX.Element;
|
|
15
|
+
declare function NavigationMenuList({ className, asChild, children, ...props }: NavigationMenuListProps): React.JSX.Element;
|
|
16
|
+
declare function NavigationMenuItem({ className, asChild, children, ...props }: NavigationMenuItemProps): React.JSX.Element;
|
|
18
17
|
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
19
|
-
declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps): React.JSX.Element;
|
|
20
|
-
declare function NavigationMenuContent({ className, ...props }: NavigationMenuContentProps): React.JSX.Element;
|
|
21
|
-
declare function
|
|
22
|
-
declare function NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps): React.JSX.Element;
|
|
23
|
-
declare function NavigationMenuIndicator({ className, ...props }: NavigationMenuIndicatorProps): React.JSX.Element;
|
|
18
|
+
declare function NavigationMenuTrigger({ className, children, asChild, ...props }: NavigationMenuTriggerProps): React.JSX.Element;
|
|
19
|
+
declare function NavigationMenuContent({ className, asChild, children, ...props }: NavigationMenuContentProps): React.JSX.Element;
|
|
20
|
+
declare function NavigationMenuPositioner({ className, side, sideOffset, align, alignOffset, keepMounted, ...props }: NavigationMenuPositionerProps): React.JSX.Element;
|
|
21
|
+
declare function NavigationMenuLink({ className, asChild, children, ...props }: NavigationMenuLinkProps): React.JSX.Element;
|
|
22
|
+
declare function NavigationMenuIndicator({ className, asChild, children, ...props }: NavigationMenuIndicatorProps): React.JSX.Element;
|
|
24
23
|
//#endregion
|
|
25
|
-
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList,
|
|
24
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle };
|
|
26
25
|
//# sourceMappingURL=navigation-menu.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../rolldown-runtime-BhWHdk3m.js";import{
|
|
1
|
+
import"../rolldown-runtime-BhWHdk3m.js";import{toAsChildRenderProps as e}from"../lib/as-child.js";import{cn as t}from"../lib/utils.js";import{t as n}from"../resolve-class-name-BurP8ngI.js";import{IconChevronDown as r}from"@tabler/icons-react";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";import{cva as s}from"class-variance-authority";import{NavigationMenu as c}from"@base-ui/react/navigation-menu";function NavigationMenu({align:e=`start`,className:r,children:i,...s}){return/* @__PURE__ */ o(c.Root,{"data-slot":`navigation-menu`,className:e=>t(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,n(r,e)),...s,children:[i,/* @__PURE__ */ a(NavigationMenuPositioner,{align:e})]})}function NavigationMenuList({className:r,asChild:i,children:o,...s}){return/* @__PURE__ */ a(c.List,{"data-slot":`navigation-menu-list`,className:e=>t(`group flex flex-1 list-none items-center justify-center gap-0`,n(r,e)),...s,...e(i,o)})}function NavigationMenuItem({className:r,asChild:i,children:o,...s}){return/* @__PURE__ */ a(c.Item,{"data-slot":`navigation-menu-item`,className:e=>t(`relative`,n(r,e)),...s,...e(i,o)})}const l=s(`group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted`);function NavigationMenuTrigger({className:s,children:u,asChild:d,...f}){return/* @__PURE__ */ o(c.Trigger,{"data-slot":`navigation-menu-trigger`,className:e=>t(l(),`group`,n(s,e)),...f,...e(d,u),children:[!d&&u,!d&&/* @__PURE__ */ o(i,{children:[` `,/* @__PURE__ */ a(r,{className:t(`relative top-px ml-1 size-3 transition duration-300`,`group-data-popup-open/navigation-menu-trigger:rotate-180`,`group-data-open/navigation-menu-trigger:rotate-180`),"aria-hidden":`true`})]})]})}function NavigationMenuContent({className:r,asChild:i,children:o,...s}){return/* @__PURE__ */ a(c.Content,{"data-slot":`navigation-menu-content`,className:e=>t(`h-full w-auto p-1 ease-[cubic-bezier(0.22,1,0.36,1)]`,`transition-[opacity,transform,translate] duration-[0.35s]`,`data-starting-style:opacity-0 data-ending-style:opacity-0`,`data-[activation-direction=left]:data-starting-style:-translate-x-1/2 data-[activation-direction=right]:data-starting-style:translate-x-1/2`,`data-[activation-direction=left]:data-ending-style:translate-x-1/2 data-[activation-direction=right]:data-ending-style:-translate-x-1/2`,`**:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none`,n(r,e)),...s,...e(i,o)})}function NavigationMenuPositioner({className:e,side:r=`bottom`,sideOffset:i=6,align:o=`start`,alignOffset:s=0,keepMounted:l,...u}){return/* @__PURE__ */ a(c.Portal,{keepMounted:l,children:/* @__PURE__ */ a(c.Positioner,{"data-slot":`navigation-menu-positioner`,side:r,sideOffset:i,align:o,alignOffset:s,className:r=>t(`isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width)`,`transition-[top,left,right,bottom] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none`,n(e,r)),...u,children:/* @__PURE__ */ a(c.Popup,{"data-slot":`navigation-menu-popup`,className:t(`relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) overflow-hidden rounded-lg outline-none`,`bg-popover text-popover-foreground shadow ring-1 ring-foreground/10`,`transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]`,`data-starting-style:scale-90 data-starting-style:opacity-0`,`data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150`),children:/* @__PURE__ */ a(c.Viewport,{"data-slot":`navigation-menu-viewport`,className:`relative size-full overflow-hidden`})})})})}function NavigationMenuLink({className:r,asChild:i,children:o,...s}){return/* @__PURE__ */ a(c.Link,{"data-slot":`navigation-menu-link`,className:e=>t(`flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4`,n(r,e)),...s,...e(i,o)})}function NavigationMenuIndicator({className:r,asChild:i,children:o,...s}){return/* @__PURE__ */ a(c.Icon,{"data-slot":`navigation-menu-indicator`,className:e=>t(`top-full z-1 flex h-1.5 items-end justify-center overflow-hidden`,n(r,e)),...s,...e(i,o),children:!i&&/* @__PURE__ */ a(`div`,{className:`relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md`})})}export{NavigationMenu,NavigationMenuContent,NavigationMenuIndicator,NavigationMenuItem,NavigationMenuLink,NavigationMenuList,NavigationMenuPositioner,NavigationMenuTrigger,l as navigationMenuTriggerStyle};
|
|
2
2
|
//# sourceMappingURL=navigation-menu.js.map
|