@storepass/components 0.3.0 → 0.5.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/CHANGELOG.md +26 -0
- package/README.md +105 -66
- package/dist/components/Accordion/Accordion.d.ts +5 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +14 -9
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/index.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +17 -2
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/Badge.d.ts +4 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -7
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/Button.d.ts +9 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +5 -2
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Card/Card.d.ts +11 -8
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Carousel/Carousel.d.ts +14 -6
- package/dist/components/Carousel/Carousel.d.ts.map +1 -1
- package/dist/components/Carousel/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +4 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Collapsible/Collapsible.d.ts +8 -4
- package/dist/components/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/Collapsible/index.js +1 -1
- package/dist/components/Combobox/Combobox.d.ts +27 -19
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +1 -1
- package/dist/components/Command/Command.d.ts +39 -2
- package/dist/components/Command/Command.d.ts.map +1 -1
- package/dist/components/Command/index.d.ts +1 -1
- package/dist/components/Command/index.d.ts.map +1 -1
- package/dist/components/Command/index.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +9 -2
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +14 -9
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +15 -12
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/index.js +1 -1
- package/dist/components/FeaturedIcon/FeaturedIcon.d.ts +7 -2
- package/dist/components/FeaturedIcon/FeaturedIcon.d.ts.map +1 -1
- package/dist/components/FeaturedIcon/index.js +1 -1
- package/dist/components/Field/Field.d.ts +18 -11
- package/dist/components/Field/Field.d.ts.map +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +4 -1
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/index.js +1 -1
- package/dist/components/Footer/Footer.d.ts +26 -0
- package/dist/components/Footer/Footer.d.ts.map +1 -0
- package/dist/components/Footer/index.d.ts +3 -0
- package/dist/components/Footer/index.d.ts.map +1 -0
- package/dist/components/Footer/index.js +1 -0
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/FormField.d.ts +1 -1
- package/dist/components/Form/FormField.d.ts.map +1 -1
- package/dist/components/Form/FormLayout.d.ts +53 -0
- package/dist/components/Form/FormLayout.d.ts.map +1 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Form/index.d.ts.map +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/ImperativeDialog/ImperativeDialog.d.ts +4 -1
- package/dist/components/ImperativeDialog/ImperativeDialog.d.ts.map +1 -1
- package/dist/components/ImperativeDialog/index.js +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +22 -0
- package/dist/components/InlineAlert/InlineAlert.d.ts.map +1 -0
- package/dist/components/InlineAlert/index.d.ts +3 -0
- package/dist/components/InlineAlert/index.d.ts.map +1 -0
- package/dist/components/InlineAlert/index.js +1 -0
- package/dist/components/Input/Input.d.ts +8 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +14 -4
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/components/InputGroup/index.js +1 -1
- package/dist/components/Item/Item.d.ts +13 -9
- package/dist/components/Item/Item.d.ts.map +1 -1
- package/dist/components/Item/index.js +1 -1
- package/dist/components/Kbd/Kbd.d.ts +5 -2
- package/dist/components/Kbd/Kbd.d.ts.map +1 -1
- package/dist/components/Kbd/index.js +1 -1
- package/dist/components/Label/Label.d.ts +4 -1
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +4 -1
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/LoadingIndicator/index.js +1 -1
- package/dist/components/MoneyAmount/MoneyAmount.d.ts +34 -0
- package/dist/components/MoneyAmount/MoneyAmount.d.ts.map +1 -0
- package/dist/components/MoneyAmount/formatMoney.d.ts +43 -0
- package/dist/components/MoneyAmount/formatMoney.d.ts.map +1 -0
- package/dist/components/MoneyAmount/index.d.ts +5 -0
- package/dist/components/MoneyAmount/index.d.ts.map +1 -0
- package/dist/components/MoneyAmount/index.js +1 -0
- package/dist/components/Navbar/Navbar.d.ts +19 -10
- package/dist/components/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/Navbar/index.js +1 -1
- package/dist/components/NumberField/NumberField.d.ts +10 -4
- package/dist/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/PageHeading/PageHeading.d.ts +83 -0
- package/dist/components/PageHeading/PageHeading.d.ts.map +1 -0
- package/dist/components/PageHeading/index.d.ts +3 -0
- package/dist/components/PageHeading/index.d.ts.map +1 -0
- package/dist/components/PageHeading/index.js +1 -0
- package/dist/components/PageLayout/PageLayout.d.ts +29 -0
- package/dist/components/PageLayout/PageLayout.d.ts.map +1 -0
- package/dist/components/PageLayout/index.d.ts +2 -0
- package/dist/components/PageLayout/index.d.ts.map +1 -0
- package/dist/components/PageLayout/index.js +1 -0
- package/dist/components/Pagination/Pagination.d.ts +10 -7
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Panel/Panel.d.ts +5 -5
- package/dist/components/Panel/Panel.d.ts.map +1 -1
- package/dist/components/Panel/index.js +1 -1
- package/dist/components/PinInput/PinInput.d.ts +5 -2
- package/dist/components/PinInput/PinInput.d.ts.map +1 -1
- package/dist/components/PinInput/index.js +1 -1
- package/dist/components/Progress/Progress.d.ts +4 -1
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +5 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/Rating/Rating.d.ts +7 -1
- package/dist/components/Rating/Rating.d.ts.map +1 -1
- package/dist/components/Rating/index.js +1 -1
- package/dist/components/Select/Select.d.ts +8 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Settings/Settings.d.ts +120 -0
- package/dist/components/Settings/Settings.d.ts.map +1 -0
- package/dist/components/Settings/index.d.ts +3 -0
- package/dist/components/Settings/index.d.ts.map +1 -0
- package/dist/components/Settings/index.js +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +24 -10
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/Slider/Slider.d.ts +4 -1
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Table/Table.d.ts +11 -8
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +16 -6
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Tags/Tags.d.ts +4 -1
- package/dist/components/Tags/Tags.d.ts.map +1 -1
- package/dist/components/Tags/index.js +1 -1
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +3 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/Toast/Toast.d.ts +7 -2
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toggle/Toggle.d.ts +5 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +9 -4
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/VideoDialog/VideoDialog.d.ts +10 -9
- package/dist/components/VideoDialog/VideoDialog.d.ts.map +1 -1
- package/dist/components/VideoDialog/index.js +1 -1
- package/dist/components/index.d.ts +7 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/index-27w72p7z.js +2 -0
- package/dist/{index-25w1pfzg.js → index-7abyvs9n.js} +1 -1
- package/dist/index-8b3c6nnb.js +2 -0
- package/dist/index-9v1g4s39.js +2 -0
- package/dist/index-f862wbmh.js +2 -0
- package/dist/index-qfdc271j.js +2 -0
- package/dist/index-s2mc6jzt.js +2 -0
- package/dist/index-st80n69g.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/controlSize.d.ts +59 -0
- package/dist/lib/controlSize.d.ts.map +1 -0
- package/dist/lib/utils.js +2 -1
- package/dist/theme.css +212 -147
- package/package.json +32 -13
- package/dist/index-0ctxfsd7.js +0 -1
- package/dist/index-1fd47f5y.js +0 -1
- package/dist/index-22kkds9g.js +0 -0
- package/dist/index-2m3xy8p4.js +0 -1
- package/dist/index-2rp207rw.js +0 -2
- package/dist/index-2wpth8xr.js +0 -1
- package/dist/index-3k9xy0v9.js +0 -1
- package/dist/index-4dw1tfwb.js +0 -1
- package/dist/index-4x05g3vr.js +0 -1
- package/dist/index-5e0zx00q.js +0 -1
- package/dist/index-5g1h0raq.js +0 -1
- package/dist/index-70s966fy.js +0 -1
- package/dist/index-7mxk2r0a.js +0 -1
- package/dist/index-7tcckc48.js +0 -1
- package/dist/index-8c8ehjkc.js +0 -1
- package/dist/index-8cy2sgh0.js +0 -1
- package/dist/index-8gm2rxtq.js +0 -1
- package/dist/index-ah7cbd07.js +0 -1
- package/dist/index-ahz43gdp.js +0 -1
- package/dist/index-arpqzy5c.js +0 -1
- package/dist/index-bespbh11.js +0 -1
- package/dist/index-bnsfdvh5.js +0 -1
- package/dist/index-bpcynn56.js +0 -1
- package/dist/index-brksk1am.js +0 -1
- package/dist/index-caq9qzt1.js +0 -1
- package/dist/index-cp373wnj.js +0 -2
- package/dist/index-cr59zcha.js +0 -1
- package/dist/index-ct209x9n.js +0 -1
- package/dist/index-d3gjt5ee.js +0 -1
- package/dist/index-e8yrbg3r.js +0 -1
- package/dist/index-fbn1rd3s.js +0 -1
- package/dist/index-fgvvr0g6.js +0 -1
- package/dist/index-g7q96a0a.js +0 -1
- package/dist/index-gt5qfkt1.js +0 -1
- package/dist/index-j0gmrg5e.js +0 -0
- package/dist/index-jbzckcy9.js +0 -1
- package/dist/index-jwm4bwn3.js +0 -1
- package/dist/index-ktj07kw9.js +0 -1
- package/dist/index-mqyj3qgp.js +0 -1
- package/dist/index-mx2ee05d.js +0 -1
- package/dist/index-nbf81tzs.js +0 -1
- package/dist/index-pagn0z78.js +0 -1
- package/dist/index-q0b9mxmg.js +0 -1
- package/dist/index-r30b9hjw.js +0 -1
- package/dist/index-reeqt38g.js +0 -1
- package/dist/index-tnbcwg9p.js +0 -1
- package/dist/index-v0dbh5ep.js +0 -1
- package/dist/index-vvj2x8rm.js +0 -1
- package/dist/index-x35yxxgc.js +0 -1
- package/dist/index-xqdce72y.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import"../Icon/index.js";import{se as J}from"../../index-7abyvs9n.js";import{te as z}from"../../lib/utils.js";import{Menu as y}from"@base-ui/react/menu";import{faChevronRight as _}from"@fortawesome/pro-solid-svg-icons";import{cva as E}from"class-variance-authority";import{jsx as q,jsxs as B}from"react/jsx-runtime";var K=E(["bg-background text-foreground","z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border p-1.5 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0 data-[starting-style]:scale-95","data-[ending-style]:opacity-0 data-[ending-style]:scale-95"]),Q=E(["relative flex w-full cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium outline-hidden select-none","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground"]),U=E(["px-2 py-1.5 text-xs font-medium text-muted-foreground"]),W=E(["-mx-1.5 my-1 h-px bg-border"]),X=E(["ml-auto text-xs tracking-widest text-muted-foreground"]),Y=E(["relative flex w-full cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium outline-hidden select-none","data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground","data-[popup-open]:bg-accent data-[popup-open]:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"]),Z=E(["bg-background text-foreground","z-50 min-w-[8rem] overflow-hidden rounded-xl border border-border p-1.5 shadow-lg","origin-[var(--transform-origin)]","outline-none","transition-[transform,scale,opacity]","data-[starting-style]:opacity-0 data-[starting-style]:scale-95","data-[ending-style]:opacity-0 data-[ending-style]:scale-95"]);function $({children:D,...P}){return q(y.Root,{...P,children:D})}function L({className:D,children:P,asChild:k,...A}){return q(y.Trigger,{"data-slot":"dropdown-menu-trigger",className:z(D),render:k?P:void 0,...A,children:k?void 0:P})}function R({children:D,...P}){return q(y.Portal,{...P,children:D})}function T({className:D,children:P,side:k="bottom",align:A="start",sideOffset:F=4,alignOffset:G,...H}){return q(y.Portal,{children:q(y.Positioner,{className:"outline-none z-50",side:k,sideOffset:F,align:A,alignOffset:G,children:q(y.Popup,{"data-slot":"dropdown-menu-content",className:z(K(),D),...H,children:P})})})}function I({className:D,children:P,disabled:k,...A}){return q(y.Item,{"data-slot":"dropdown-menu-item",className:z(Q(),D),disabled:k,...A,children:P})}function S({className:D,children:P,...k}){return q("fieldset",{"data-slot":"dropdown-menu-group",className:z("border-0 p-0 m-0",D),...k,children:P})}function b({className:D,children:P,...k}){return q("div",{"data-slot":"dropdown-menu-label",className:z(U(),D),...k,children:P})}function w({className:D,...P}){return q(y.Separator,{"data-slot":"dropdown-menu-separator",className:z(W(),D),...P})}function C({className:D,children:P,...k}){return q("span",{"data-slot":"dropdown-menu-shortcut",className:z(X(),D),...k,children:P})}function V({children:D,...P}){return q(y.SubmenuRoot,{...P,children:D})}function O({className:D,children:P,...k}){return B(y.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger",className:z(Y(),D),...k,children:[P,q(J,{icon:_,className:"ml-auto size-4"})]})}function v({className:D,children:P,side:k,align:A,sideOffset:F=2,alignOffset:G=-4,...H}){return q(y.Portal,{children:q(y.Positioner,{className:"outline-none z-50",side:k,align:A,sideOffset:F,alignOffset:G,children:q(y.Popup,{"data-slot":"dropdown-menu-sub-content",className:z(Z(),D),...H,children:P})})})}var g={Root:$,Trigger:L,Portal:R,Content:T,Item:I,Group:S,Label:b,Separator:w,Shortcut:C,Sub:V,SubTrigger:O,SubContent:v};export{Y as dropdownMenuSubTriggerVariants,Z as dropdownMenuSubContentVariants,X as dropdownMenuShortcutVariants,W as dropdownMenuSeparatorVariants,U as dropdownMenuLabelVariants,Q as dropdownMenuItemVariants,K as dropdownMenuContentVariants,g as DropdownMenu};export{K as Wb,Q as Xb,U as Yb,W as Zb,X as _b,Y as $b,Z as ac,g as bc};
|
|
@@ -3,12 +3,17 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import type * as React from "react";
|
|
4
4
|
declare const featuredIconVariants: (props?: ({
|
|
5
5
|
color?: "info" | "warning" | "success" | "error" | "brand" | "gray" | null | undefined;
|
|
6
|
-
variant?: "light" | "modern" | "solid" | null | undefined;
|
|
6
|
+
variant?: "ghost" | "light" | "modern" | "solid" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export interface FeaturedIconProps extends Omit<React.ComponentProps<"div">, "color">, VariantProps<typeof featuredIconVariants> {
|
|
10
10
|
icon: IconDefinition;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* An icon centered in a themed container. Used at the top of empty states, modals, alerts, and feature lists.
|
|
14
|
+
*
|
|
15
|
+
* variant: light is a soft tinted background with a colored icon, modern is a white background with a border and shadow with a colored icon only, solid is a filled background with a contrasting icon, and ghost is the colored icon alone with no container fill (the container still reserves its size for alignment).
|
|
16
|
+
*/
|
|
17
|
+
export declare function FeaturedIcon({ color, variant, size, icon, className, ...props }: FeaturedIconProps): React.JSX.Element;
|
|
13
18
|
export { featuredIconVariants };
|
|
14
19
|
//# sourceMappingURL=FeaturedIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeaturedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/FeaturedIcon/FeaturedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,oBAAoB;;;;
|
|
1
|
+
{"version":3,"file":"FeaturedIcon.d.ts","sourceRoot":"","sources":["../../../src/components/FeaturedIcon/FeaturedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAIpC,QAAA,MAAM,oBAAoB;;;;8EAyJzB,CAAC;AAEF,MAAM,WAAW,iBAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EACjD,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC1C,IAAI,EAAE,cAAc,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACR,EAAE,iBAAiB,qBAUnB;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{se as q}from"../../index-7abyvs9n.js";import{te as P}from"../../lib/utils.js";import{cva as K}from"class-variance-authority";import{jsx as F}from"react/jsx-runtime";var B=K("inline-flex items-center justify-center shrink-0 [&_[data-slot=icon]]:shrink-0",{variants:{color:{brand:"",gray:"",success:"",warning:"",error:"",info:""},variant:{light:"",modern:"bg-background border border-input shadow-xs",solid:"",ghost:""},size:{sm:"size-8 rounded-lg [&_[data-slot=icon]]:text-sm",md:"size-10 rounded-lg [&_[data-slot=icon]]:text-base",lg:"size-12 rounded-xl [&_[data-slot=icon]]:text-lg",xl:"size-14 rounded-xl [&_[data-slot=icon]]:text-xl"}},compoundVariants:[{color:"brand",variant:"light",className:"bg-utility-brand-50 text-utility-brand-600"},{color:"gray",variant:"light",className:"bg-utility-gray-100 text-utility-gray-600"},{color:"success",variant:"light",className:"bg-utility-success-50 text-utility-success-600"},{color:"warning",variant:"light",className:"bg-utility-warning-50 text-utility-warning-600"},{color:"error",variant:"light",className:"bg-utility-error-50 text-utility-error-600"},{color:"info",variant:"light",className:"bg-utility-blue-50 text-utility-blue-600"},{color:"brand",variant:"modern",className:"text-utility-brand-600"},{color:"gray",variant:"modern",className:"text-utility-gray-600"},{color:"success",variant:"modern",className:"text-utility-success-600"},{color:"warning",variant:"modern",className:"text-utility-warning-600"},{color:"error",variant:"modern",className:"text-utility-error-600"},{color:"info",variant:"modern",className:"text-utility-blue-600"},{color:"brand",variant:"solid",className:"bg-primary text-primary-foreground"},{color:"gray",variant:"solid",className:"bg-utility-gray-600 text-white"},{color:"success",variant:"solid",className:"bg-success text-white"},{color:"warning",variant:"solid",className:"bg-warning text-warning-foreground"},{color:"error",variant:"solid",className:"bg-destructive text-white"},{color:"info",variant:"solid",className:"bg-info text-white"},{color:"brand",variant:"ghost",className:"text-utility-brand-600"},{color:"gray",variant:"ghost",className:"text-utility-gray-600"},{color:"success",variant:"ghost",className:"text-utility-success-600"},{color:"warning",variant:"ghost",className:"text-utility-warning-600"},{color:"error",variant:"ghost",className:"text-utility-error-600"},{color:"info",variant:"ghost",className:"text-utility-blue-600"}],defaultVariants:{color:"brand",variant:"light",size:"md"}});function L({color:C,variant:D,size:E,icon:G,className:H,...J}){return F("div",{"data-slot":"featured-icon",className:P(B({color:C,variant:D,size:E}),H),...J,children:F(q,{icon:G})})}export{B as featuredIconVariants,L as FeaturedIcon};export{B as hc,L as ic};
|
|
@@ -4,47 +4,54 @@ import { type ReactNode } from "react";
|
|
|
4
4
|
declare function useInFieldContainer(): boolean;
|
|
5
5
|
declare function FieldContainerProvider({ children }: {
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
}): import("react
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
8
|
declare const fieldVariants: (props?: ({
|
|
9
9
|
orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export interface FieldProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseField.Root>, "className">, VariantProps<typeof fieldVariants> {
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The composition layer for a single form control: label, description, and error
|
|
16
|
+
* built on Base UI Field. Field-aware controls (Input/Textarea/Select) render bare
|
|
17
|
+
* inside it. For full form wiring (validation, submit, server errors) wrap fields
|
|
18
|
+
* in a Form and reach for FormField; use these primitives directly when you need
|
|
19
|
+
* custom layouts.
|
|
20
|
+
*/
|
|
21
|
+
declare function Field({ className, orientation, children, ...props }: FieldProps): import("react").JSX.Element;
|
|
15
22
|
export interface FieldSetProps extends React.ComponentPropsWithoutRef<"fieldset"> {
|
|
16
23
|
}
|
|
17
|
-
declare function FieldSet({ className, ...props }: FieldSetProps): import("react
|
|
24
|
+
declare function FieldSet({ className, ...props }: FieldSetProps): import("react").JSX.Element;
|
|
18
25
|
export interface FieldLegendProps extends React.ComponentPropsWithoutRef<"legend"> {
|
|
19
26
|
variant?: "legend" | "label";
|
|
20
27
|
}
|
|
21
|
-
declare function FieldLegend({ className, variant, ...props }: FieldLegendProps): import("react
|
|
28
|
+
declare function FieldLegend({ className, variant, ...props }: FieldLegendProps): import("react").JSX.Element;
|
|
22
29
|
export interface FieldGroupProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
23
30
|
}
|
|
24
|
-
declare function FieldGroup({ className, ...props }: FieldGroupProps): import("react
|
|
31
|
+
declare function FieldGroup({ className, ...props }: FieldGroupProps): import("react").JSX.Element;
|
|
25
32
|
export interface FieldContentProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
26
33
|
}
|
|
27
|
-
declare function FieldContent({ className, ...props }: FieldContentProps): import("react
|
|
34
|
+
declare function FieldContent({ className, ...props }: FieldContentProps): import("react").JSX.Element;
|
|
28
35
|
export interface FieldLabelProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseField.Label>, "className"> {
|
|
29
36
|
className?: string;
|
|
30
37
|
}
|
|
31
|
-
declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react
|
|
38
|
+
declare function FieldLabel({ className, ...props }: FieldLabelProps): import("react").JSX.Element;
|
|
32
39
|
export interface FieldTitleProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
33
40
|
}
|
|
34
|
-
declare function FieldTitle({ className, ...props }: FieldTitleProps): import("react
|
|
41
|
+
declare function FieldTitle({ className, ...props }: FieldTitleProps): import("react").JSX.Element;
|
|
35
42
|
export interface FieldDescriptionProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseField.Description>, "className"> {
|
|
36
43
|
className?: string;
|
|
37
44
|
}
|
|
38
|
-
declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react
|
|
45
|
+
declare function FieldDescription({ className, ...props }: FieldDescriptionProps): import("react").JSX.Element;
|
|
39
46
|
export interface FieldSeparatorProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
40
47
|
}
|
|
41
|
-
declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): import("react
|
|
48
|
+
declare function FieldSeparator({ children, className, ...props }: FieldSeparatorProps): import("react").JSX.Element;
|
|
42
49
|
export interface FieldErrorProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseField.Error>, "className"> {
|
|
43
50
|
className?: string;
|
|
44
51
|
errors?: Array<{
|
|
45
52
|
message?: string;
|
|
46
53
|
} | undefined>;
|
|
47
54
|
}
|
|
48
|
-
declare function FieldError({ className, children, errors, ...props }: FieldErrorProps): import("react
|
|
55
|
+
declare function FieldError({ className, children, errors, ...props }: FieldErrorProps): import("react").JSX.Element | null;
|
|
49
56
|
export { Field, FieldContainerProvider, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, fieldVariants, useInFieldContainer, };
|
|
50
57
|
//# sourceMappingURL=Field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAiB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAY3E,iBAAS,mBAAmB,IAAI,OAAO,CAEtC;AAED,iBAAS,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAiB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAY3E,iBAAS,mBAAmB,IAAI,OAAO,CAEtC;AAED,iBAAS,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAMpE;AAED,QAAA,MAAM,aAAa;;8EA2BlB,CAAC;AAEF,MAAM,WAAW,UAChB,SAAQ,IAAI,CACV,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EACrD,WAAW,CACX,EACD,YAAY,CAAC,OAAO,aAAa,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,iBAAS,KAAK,CAAC,EACd,SAAS,EACT,WAAwB,EACxB,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,UAAU,+BAYZ;AAED,MAAM,WAAW,aAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC;CAAG;AAEtD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,+BAYvD;AAED,MAAM,WAAW,gBAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC;IAChD,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC7B;AAED,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,OAAkB,EAClB,GAAG,KAAK,EACR,EAAE,gBAAgB,+BAclB;AAED,MAAM,WAAW,eAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEjD,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAW3D;AAED,MAAM,WAAW,iBAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEjD,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAW/D;AAED,MAAM,WAAW,eAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EACtD,WAAW,CACX;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAc3D;AAED,MAAM,WAAW,eAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEjD,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAW3D;AAED,MAAM,WAAW,qBAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,WAAW,CAAC,EAC5D,WAAW,CACX;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAavE;AAED,MAAM,WAAW,mBAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEjD,iBAAS,cAAc,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACR,EAAE,mBAAmB,+BAsBrB;AAED,MAAM,WAAW,eAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EACtD,WAAW,CACX;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;CACjD;AAED,iBAAS,UAAU,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACR,EAAE,eAAe,sCAyCjB;AAED,OAAO,EACN,KAAK,EACL,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,UAAU,EACV,aAAa,EACb,mBAAmB,GACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{te as G}from"../../lib/utils.js";import{Field as A}from"@base-ui/react/field";import{cva as R}from"class-variance-authority";import{createContext as W,useContext as X,useMemo as Y}from"react";import{jsx as D,jsxs as q}from"react/jsx-runtime";var K=W(!1);function Z(){return X(K)}function O({children:P}){return D(K.Provider,{value:!0,children:P})}var Q=R("group/field flex w-full gap-3 border-0 p-0 m-0 data-[invalid]:text-destructive",{variants:{orientation:{vertical:["flex-col [&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-full [&>.sr-only]:w-auto"],horizontal:["flex-row items-center","[&>[data-slot=field-label]]:flex-auto","has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"],responsive:["flex-col [&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*:not([role=checkbox]):not([role=radio]):not([role=switch])]:w-auto","@md/field-group:[&>[data-slot=field-label]]:flex-auto","@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"]}},defaultVariants:{orientation:"vertical"}});function _({className:P,orientation:L="vertical",children:S,...z}){return D(A.Root,{"data-slot":"field","data-orientation":L,className:G(Q({orientation:L}),P),render:D("fieldset",{}),...z,children:D(O,{children:S})})}function $({className:P,...L}){return D("fieldset",{"data-slot":"field-set",className:G("flex flex-col gap-6","has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",P),...L})}function g({className:P,variant:L="legend",...S}){return D("legend",{"data-slot":"field-legend","data-variant":L,className:G("mb-3 font-medium text-foreground","data-[variant=legend]:text-base","data-[variant=label]:text-sm",P),...S})}function M({className:P,...L}){return D("div",{"data-slot":"field-group",className:G("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",P),...L})}function T({className:P,...L}){return D("div",{"data-slot":"field-content",className:G("group/field-content flex flex-1 flex-col gap-1.5 leading-snug",P),...L})}function U({className:P,...L}){return D(A.Label,{"data-slot":"field-label",className:G("flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none","group/field-label peer/field-label w-fit leading-snug group-data-[disabled]/field:opacity-50","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4","has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary",P),...L})}function V({className:P,...L}){return D("div",{"data-slot":"field-label",className:G("flex w-fit items-center gap-2 text-sm leading-snug font-medium text-foreground group-data-[disabled]/field:opacity-50",P),...L})}function E({className:P,...L}){return D(A.Description,{"data-slot":"field-description",className:G("text-muted-foreground text-[13px] leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance","last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",P),...L})}function F({children:P,className:L,...S}){return q("div",{"data-slot":"field-separator","data-content":!!P,className:G("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",L),...S,children:[D("div",{className:"absolute inset-0 top-1/2 h-px bg-border"}),P&&D("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:P})]})}function I({className:P,children:L,errors:S,...z}){let J=Y(()=>{if(L)return L;if(!S?.length)return null;let H=[...new Map(S.map((k)=>[k?.message,k])).values()];if(H?.length===1)return H[0]?.message;return D("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:H.map((k)=>k?.message&&D("li",{children:k.message},k.message))})},[L,S]);if(!J&&!z.match)return null;return D(A.Error,{"data-slot":"field-error",className:G("text-destructive text-sm font-normal",P),...z,children:J})}export{Z as useInFieldContainer,Q as fieldVariants,V as FieldTitle,$ as FieldSet,F as FieldSeparator,g as FieldLegend,U as FieldLabel,M as FieldGroup,I as FieldError,E as FieldDescription,T as FieldContent,O as FieldContainerProvider,_ as Field};export{Z as tc,O as uc,Q as vc,_ as wc,$ as xc,g as yc,M as zc,T as Ac,U as Bc,V as Cc,E as Dc,F as Ec,I as Fc};
|
|
@@ -13,6 +13,9 @@ export interface FileUploadProps extends Omit<React.ComponentProps<"div">, "onCh
|
|
|
13
13
|
label?: ReactNode;
|
|
14
14
|
hint?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A drag-and-drop dropzone with a hidden file input and an upload queue showing each file's name, size, optional progress, and a remove action.
|
|
18
|
+
*/
|
|
19
|
+
export declare function FileUpload({ value, defaultValue, onFilesChange, multiple, accept, maxSize, disabled, progress, label, hint, className, ...props }: FileUploadProps): import("react").JSX.Element;
|
|
17
20
|
export { fileUploadVariants };
|
|
18
21
|
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAGN,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AAOf,QAAA,MAAM,kBAAkB,2FAMvB,CAAC;AAiBF,MAAM,WAAW,eAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC,EACrE,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACxC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACR,EAAE,eAAe
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAGN,KAAK,SAAS,EAId,MAAM,OAAO,CAAC;AAOf,QAAA,MAAM,kBAAkB,2FAMvB,CAAC;AAiBF,MAAM,WAAW,eAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC,EACrE,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACxC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACR,EAAE,eAAe,+BA0NjB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gc as k}from"../Progress/index.js";import{ic as S}from"../FeaturedIcon/index.js";import"../Button/index.js";import{ad as I}from"../../index-8b3c6nnb.js";import"../../index-st80n69g.js";import"../Icon/index.js";import{se as V}from"../../index-7abyvs9n.js";import{te as L}from"../../lib/utils.js";import{faCloudArrowUp as r,faFile as n,faXmark as t}from"@fortawesome/pro-solid-svg-icons";import{cva as d}from"class-variance-authority";import{useCallback as H,useRef as a,useState as w}from"react";import{jsx as G,jsxs as Y,Fragment as s}from"react/jsx-runtime";var h=d("flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed border-input bg-background p-6 text-center transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 hover:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[dragging]:border-primary data-[dragging]:bg-utility-brand-50",{variants:{},defaultVariants:{}});function i(Q){if(Q<1000)return`${Q} B`;let _=["KB","MB","GB","TB"],J=Q/1000,M=0;while(J>=1000&&M<_.length-1)J/=1000,M+=1;return`${J<10?J.toFixed(1):Math.round(J).toString()} ${_[M]}`}function l({value:Q,defaultValue:_,onFilesChange:J,multiple:M,accept:P,maxSize:K,disabled:q,progress:R,label:v,hint:y,className:F,...C}){let O=Q!==void 0,[m,p]=w(_??[]),[j,$]=w(!1),[A,f]=w([]),z=a(null),T=O?Q:m,E=H((U)=>{if(!O)p(U);J?.(U)},[O,J]),X=H((U)=>{let Z=Array.from(U),W=[],D=[];for(let N of Z){if(K!==void 0&&N.size>K){D.push(N.name);continue}W.push(N)}if(f(D),W.length===0)return;E(M?[...T,...W]:W.slice(0,1))},[T,K,M,E]),g=H((U)=>{E(T.filter((Z,W)=>W!==U))},[T,E]),B=H(()=>{if(q)return;z.current?.click()},[q]),x=H((U)=>{if(U.key==="Enter"||U.key===" ")U.preventDefault(),B()},[B]),o=H((U)=>{if(q)return;U.preventDefault(),$(!0)},[q]),b=H((U)=>{if(q)return;U.preventDefault(),$(!0)},[q]),c=H((U)=>{if(U.preventDefault(),U.currentTarget.contains(U.relatedTarget))return;$(!1)},[]),u=H((U)=>{if(U.preventDefault(),$(!1),q)return;if(U.dataTransfer.files.length>0)X(U.dataTransfer.files)},[X,q]);return Y("div",{"data-slot":"file-upload-root",className:L("flex flex-col gap-3"),children:[Y("div",{"data-slot":"file-upload",role:"button",tabIndex:q?-1:0,"aria-disabled":q||void 0,"data-disabled":q?"":void 0,"data-dragging":j?"":void 0,className:L(h(),F),onClick:B,onKeyDown:x,onDragEnter:b,onDragOver:o,onDragLeave:c,onDrop:u,...C,children:[G("input",{ref:z,"data-slot":"file-upload-input",type:"file",className:"sr-only",accept:P,multiple:M,disabled:q,onChange:(U)=>{if(U.target.files&&U.target.files.length>0)X(U.target.files);U.target.value=""}}),G(S,{icon:r,color:"brand",variant:"light"}),G("div",{"data-slot":"file-upload-text",className:"text-sm text-foreground",children:v??Y(s,{children:[G("span",{className:"font-semibold text-primary",children:"Click to upload"})," ","or drag and drop"]})}),y&&G("div",{"data-slot":"file-upload-hint",className:"text-sm text-muted-foreground",children:y})]}),A.length>0&&G("div",{"data-slot":"file-upload-error",className:"text-sm text-destructive",children:A.length===1?`${A[0]} is too large.`:`${A.length} files are too large.`}),T.length>0&&G("ul",{"data-slot":"file-upload-list",className:"flex flex-col gap-2",children:T.map((U,Z)=>Y("li",{"data-slot":"file-upload-item",className:"flex items-center gap-3 rounded-lg border border-input bg-background p-3",children:[G(V,{icon:n,"data-slot":"file-upload-item-icon",className:"size-5 shrink-0 text-muted-foreground"}),Y("div",{"data-slot":"file-upload-item-info",className:"flex min-w-0 flex-1 flex-col gap-1",children:[Y("div",{className:"flex items-baseline justify-between gap-2",children:[G("span",{className:"truncate text-sm font-medium text-foreground",children:U.name}),G("span",{className:"shrink-0 text-sm text-muted-foreground tabular-nums",children:i(U.size)})]}),R?.[U.name]!==void 0&&G(k,{size:"sm",value:R[U.name]??null})]}),G(I,{type:"button",variant:"ghost",size:"icon-sm",disabled:q,"aria-label":`Remove ${U.name}`,onClick:()=>g(Z),children:G(V,{icon:t})})]},`${U.name}-${U.size}-${Z}`))})]})}export{h as fileUploadVariants,l as FileUpload};export{h as cc,l as dc};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface FooterProps extends React.ComponentProps<"footer"> {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Quiet meta row for the end of a scroll area: copyright/version on the
|
|
6
|
+
* left, a link list on the right. Compose FooterMeta and FooterNav
|
|
7
|
+
* (FooterLink leaves) inside — no chrome of its own beyond the layout, so it
|
|
8
|
+
* reads as inset text on whatever surface it sits on rather than another
|
|
9
|
+
* bordered block.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Footer({ className, ...props }: FooterProps): React.JSX.Element;
|
|
12
|
+
export interface FooterRowProps extends React.ComponentProps<"div"> {
|
|
13
|
+
}
|
|
14
|
+
export declare function FooterRow({ className, ...props }: FooterRowProps): React.JSX.Element;
|
|
15
|
+
export interface FooterMetaProps extends React.ComponentProps<"div"> {
|
|
16
|
+
}
|
|
17
|
+
/** Left-aligned meta text — copyright, build version, and the like. */
|
|
18
|
+
export declare function FooterMeta({ className, ...props }: FooterMetaProps): React.JSX.Element;
|
|
19
|
+
export interface FooterNavProps extends React.ComponentProps<"nav"> {
|
|
20
|
+
}
|
|
21
|
+
/** Right-aligned link list; leaves are FooterLink. */
|
|
22
|
+
export declare function FooterNav({ className, "aria-label": ariaLabel, ...props }: FooterNavProps): React.JSX.Element;
|
|
23
|
+
export interface FooterLinkProps extends React.ComponentProps<"a"> {
|
|
24
|
+
}
|
|
25
|
+
export declare function FooterLink({ className, ...props }: FooterLinkProps): React.JSX.Element;
|
|
26
|
+
//# sourceMappingURL=Footer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/Footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC;CAAG;AAEtE;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAQ1D;AAED,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;CAAG;AAEtE,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,qBAWhE;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;CAAG;AAEvE,uEAAuE;AACvE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,qBAWlE;AAED,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;CAAG;AAEtE,sDAAsD;AACtD,wBAAgB,SAAS,CAAC,EACzB,SAAS,EACT,YAAY,EAAE,SAAoB,EAClC,GAAG,KAAK,EACR,EAAE,cAAc,qBAShB;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC;CAAG;AAErE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,qBAWlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Footer/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,eAAe,EACf,eAAe,EACf,cAAc,EACd,WAAW,EACX,cAAc,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{te as F}from"../../lib/utils.js";import{jsx as P}from"react/jsx-runtime";function f({className:o,...t}){return P("footer",{"data-slot":"footer",className:F("select-none",o),...t})}function w({className:o,...t}){return P("div",{"data-slot":"footer-row",className:F("flex flex-wrap items-center justify-between gap-2",o),...t})}function M({className:o,...t}){return P("div",{"data-slot":"footer-meta",className:F("flex flex-wrap items-center gap-3 text-xs text-quaternary",o),...t})}function v({className:o,"aria-label":t="Footer",...r}){return P("nav",{"data-slot":"footer-nav","aria-label":t,className:F("flex flex-wrap gap-4",o),...r})}function y({className:o,...t}){return P("a",{"data-slot":"footer-link",className:F("text-xs text-quaternary transition-colors hover:text-tertiary",o),...t})}export{w as FooterRow,v as FooterNav,M as FooterMeta,y as FooterLink,f as Footer};export{f as jc,w as kc,M as lc,v as mc,y as nc};
|
|
@@ -21,6 +21,6 @@ export interface FormProps<FormValues extends Record<string, any> = Record<strin
|
|
|
21
21
|
* </Form>
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
|
-
declare function Form<FormValues extends Record<string, any> = Record<string, any>>({ className, ...props }: FormProps<FormValues>): import("react
|
|
24
|
+
declare function Form<FormValues extends Record<string, any> = Record<string, any>>({ className, ...props }: FormProps<FormValues>): import("react").JSX.Element;
|
|
25
25
|
export { Form };
|
|
26
26
|
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,SAAS,CAEzB,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC3D,SAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,IAAI,CAEZ,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3D,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,CAAC,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,SAAS,CAEzB,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAC3D,SAAQ,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,IAAI,CAEZ,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3D,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,CAAC,UAAU,CAAC,+BAa/C;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -46,6 +46,6 @@ export interface FormFieldProps extends Omit<React.ComponentPropsWithoutRef<type
|
|
|
46
46
|
* </FormField>
|
|
47
47
|
* ```
|
|
48
48
|
*/
|
|
49
|
-
declare function FormField({ name, label, description, error, required, orientation, className, children, ...props }: FormFieldProps): import("react
|
|
49
|
+
declare function FormField({ name, label, description, error, required, orientation, className, children, ...props }: FormFieldProps): import("react").JSX.Element;
|
|
50
50
|
export { FormField };
|
|
51
51
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,MAAM,WAAW,cAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EACrD,WAAW,GAAG,QAAQ,GAAG,aAAa,CACtC;IACD,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,SAAS,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,cAAc
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormField.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,MAAM,WAAW,cAChB,SAAQ,IAAI,CACX,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,IAAI,CAAC,EACrD,WAAW,GAAG,QAAQ,GAAG,aAAa,CACtC;IACD,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,SAAS,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,cAAc,+BAyDhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
3
|
+
export interface FormSectionProps extends Omit<ComponentPropsWithoutRef<"section">, "className" | "title"> {
|
|
4
|
+
/** Section heading, text-base semibold (the Card title scale). */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** Quiet sub-copy under the heading. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
/** The section's fields: FormFields, FormRows, FieldSets. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A titled group of fields inside a long form. Consecutive sections divide
|
|
14
|
+
* themselves with a full-width rule (border-top on the following section) —
|
|
15
|
+
* no wrapper or separator element needed; a lone section renders no rule.
|
|
16
|
+
*
|
|
17
|
+
* The between-section gap comes from the parent: Form widens to gap-10
|
|
18
|
+
* automatically when sections are direct children. In a custom container,
|
|
19
|
+
* stack sections on a gap-10 column for the same rhythm.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FormSection({ title, description, className, children, ...props }: FormSectionProps): import("react").JSX.Element;
|
|
22
|
+
declare const formRowColumns: {
|
|
23
|
+
readonly 2: "sm:grid-cols-2";
|
|
24
|
+
readonly 3: "sm:grid-cols-3";
|
|
25
|
+
readonly 4: "sm:grid-cols-4";
|
|
26
|
+
};
|
|
27
|
+
export interface FormRowProps extends Omit<ComponentPropsWithoutRef<"div">, "className"> {
|
|
28
|
+
/** Equal columns at the sm breakpoint and up; single column below. */
|
|
29
|
+
columns?: keyof typeof formRowColumns;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fields side by side: equal columns on a 24px gutter from the sm breakpoint,
|
|
34
|
+
* a plain stack below it. For asymmetric widths, span a child across columns
|
|
35
|
+
* (`columns={3}` + `className="sm:col-span-2"` on the field = a 2/3-width
|
|
36
|
+
* field); extra children wrap onto new rows on the same rhythm.
|
|
37
|
+
*/
|
|
38
|
+
export declare function FormRow({ columns, className, ...props }: FormRowProps): import("react").JSX.Element;
|
|
39
|
+
declare const formActionsVariants: (props?: ({
|
|
40
|
+
justify?: "center" | "end" | "start" | "between" | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
42
|
+
export interface FormActionsProps extends Omit<ComponentPropsWithoutRef<"div">, "className">, VariantProps<typeof formActionsVariants> {
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The form's footer row: actions right-aligned by default (quiet action
|
|
47
|
+
* before the primary). Directly after a FormSection it closes the sectioned
|
|
48
|
+
* rhythm with the same full-width rule the sections divide with; after a
|
|
49
|
+
* plain field stack it renders bare.
|
|
50
|
+
*/
|
|
51
|
+
export declare function FormActions({ justify, className, ...props }: FormActionsProps): import("react").JSX.Element;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=FormLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBjE,MAAM,WAAW,gBAChB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACxE,kEAAkE;IAClE,KAAK,EAAE,SAAS,CAAC;IACjB,wCAAwC;IACxC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,gBAAgB,+BAsBlB;AAED,QAAA,MAAM,cAAc;;;;CAIV,CAAC;AAEX,MAAM,WAAW,YAChB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC1D,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,EAAE,OAAW,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,+BAYzE;AAED,QAAA,MAAM,mBAAmB;;8EAYvB,CAAC;AAEH,MAAM,WAAW,gBAChB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,EACzD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACR,EAAE,gBAAgB,+BAYlB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Form, type FormProps } from "./Form";
|
|
2
2
|
export { FormField, type FormFieldProps } from "./FormField";
|
|
3
|
+
export { FormActions, type FormActionsProps, FormRow, type FormRowProps, FormSection, type FormSectionProps, } from "./FormLayout";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACN,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACrB,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bc as _,Dc as $,Fc as k,uc as Z}from"../Field/index.js";import{te as z}from"../../lib/utils.js";import{Form as V}from"@base-ui/react/form";import{jsx as D}from"react/jsx-runtime";function C({className:R,...P}){return D(V,{"data-slot":"form",className:z("flex w-full flex-col gap-6 has-[>[data-slot=form-section]]:gap-10",R),...P})}import{Field as X}from"@base-ui/react/field";import{jsx as A,jsxs as G,Fragment as Y}from"react/jsx-runtime";function E({name:R,label:P,description:S,error:J,required:K,orientation:L="vertical",className:T,children:Q,...U}){let M=P&&G(_,{children:[P,K&&A("span",{className:"text-destructive",children:" *"})]}),O=S&&A($,{children:S}),W=J?A(k,{match:!0,className:"text-sm text-destructive",children:J}):A(X.Error,{"data-slot":"field-error",className:"text-sm text-destructive"});return A(X.Root,{name:R,"data-slot":"form-field",className:z("group/field flex w-full flex-col gap-1.5",T),...U,children:A(Z,{children:L==="horizontal"?G(Y,{children:[G("div",{className:"flex items-start gap-3",children:[Q,(M||O)&&G("div",{className:"flex flex-1 flex-col gap-1 leading-snug",children:[M,O]})]}),W]}):G(Y,{children:[M,Q,O,W]})})})}import{cva as F}from"class-variance-authority";import{jsx as H,jsxs as I}from"react/jsx-runtime";function q({title:R,description:P,className:S,children:J,...K}){return I("section",{"data-slot":"form-section",className:z("flex flex-col gap-8","[[data-slot=form-section]+&]:border-t [[data-slot=form-section]+&]:border-border [[data-slot=form-section]+&]:pt-10",S),...K,children:[I("div",{className:"flex flex-col gap-1",children:[H("h3",{className:"text-base font-semibold text-foreground",children:R}),P&&H("p",{className:"max-w-2xl text-sm text-muted-foreground",children:P})]}),H("div",{className:"flex flex-col gap-6",children:J})]})}var w={2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4"};function B({columns:R=2,className:P,...S}){return H("div",{"data-slot":"form-row",className:z("grid grid-cols-1 gap-6",w[R],P),...S})}var y=F("flex items-center gap-3",{variants:{justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between"}},defaultVariants:{justify:"end"}});function g({justify:R,className:P,...S}){return H("div",{"data-slot":"form-actions",className:z(y({justify:R}),"[[data-slot=form-section]+&]:border-t [[data-slot=form-section]+&]:border-border [[data-slot=form-section]+&]:pt-6",P),...S})}export{q as FormSection,B as FormRow,E as FormField,g as FormActions,C as Form};export{C as oc,E as pc,q as qc,B as rc,g as sc};
|
|
@@ -30,5 +30,5 @@ export interface IconProps extends Omit<FontAwesomeIconProps, "icon"> {
|
|
|
30
30
|
* `flex items-center justify-center` box (flex ignores vertical-align), or give
|
|
31
31
|
* the wrapper those flex classes.
|
|
32
32
|
*/
|
|
33
|
-
export declare function Icon({ icon, ...props }: IconProps): import("react
|
|
33
|
+
export declare function Icon({ icon, ...props }: IconProps): import("react").JSX.Element;
|
|
34
34
|
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAEN,KAAK,oBAAoB,EACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACpE,IAAI,EAAE,cAAc,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAEN,KAAK,oBAAoB,EACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACpE,IAAI,EAAE,cAAc,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,+BAEjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{se as o}from"../../index-7abyvs9n.js";export{o as Icon};
|
|
@@ -18,7 +18,10 @@ interface ImperativeDialogContextValue {
|
|
|
18
18
|
export interface ImperativeDialogProviderProps {
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* A hook-based alternative to browser alert() and confirm() dialogs. Wrap your app with ImperativeDialogProvider and use useAlert() and useConfirm() hooks.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ImperativeDialogProvider({ children, }: ImperativeDialogProviderProps): import("react").JSX.Element;
|
|
22
25
|
export declare function useImperativeDialog(): ImperativeDialogContextValue;
|
|
23
26
|
export declare function useAlert(): (options: AlertOptions | string) => Promise<void>;
|
|
24
27
|
export declare function useConfirm(): (options: ConfirmOptions | string) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImperativeDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ImperativeDialog/ImperativeDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EAKd,MAAM,OAAO,CAAC;AAIf,UAAU,YAAY;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACpC;AAQD,UAAU,4BAA4B;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AAKD,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,wBAAwB,CAAC,EACxC,QAAQ,GACR,EAAE,6BAA6B
|
|
1
|
+
{"version":3,"file":"ImperativeDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ImperativeDialog/ImperativeDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EAKd,MAAM,OAAO,CAAC;AAIf,UAAU,YAAY;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACpC;AAQD,UAAU,4BAA4B;IACrC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE;AAKD,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACxC,QAAQ,GACR,EAAE,6BAA6B,+BA8F/B;AAED,wBAAgB,mBAAmB,IAAI,4BAA4B,CAQlE;AAED,wBAAgB,QAAQ,cA1HN,YAAY,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CA6HxD;AAED,wBAAgB,UAAU,cA9HN,cAAc,GAAG,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAiI/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import"../Button/index.js";import{ad as T}from"../../index-8b3c6nnb.js";import"../../index-st80n69g.js";import{fe as y}from"../AlertDialog/index.js";import"../../lib/utils.js";import{createContext as z,useCallback as Q,useContext as I,useRef as S,useState as _}from"react";import{jsx as E,jsxs as K,Fragment as k}from"react/jsx-runtime";var $=z(null);function B({children:q}){let[J,V]=_(null),[F,L]=_(!1),X=S(null),W=Q((P)=>{let N=typeof P==="string"?{title:P}:P;return new Promise((H)=>{X.current=()=>H(),V({type:"alert",options:N,resolve:()=>H()}),L(!0)})},[]),w=Q((P)=>{let N=typeof P==="string"?{title:P}:P;return new Promise((H)=>{X.current=H,V({type:"confirm",options:N,resolve:H}),L(!0)})},[]),M=Q((P)=>{J?.resolve(P),L(!1)},[J]),Y=J?.type==="confirm",G=J?.options,Z=G;return K($.Provider,{value:{alert:W,confirm:w},children:[q,E(y.Root,{open:F,onOpenChange:(P)=>{if(!P)M(!1)},children:K(y.Portal,{children:[E(y.Backdrop,{}),E(y.Popup,{children:G&&K(k,{children:[E(y.Title,{children:G.title}),G.description&&E(y.Description,{children:G.description}),K(y.Actions,{children:[Y&&E(T,{variant:"ghost",onClick:()=>M(!1),children:Z?.cancelLabel??"Cancel"}),E(T,{variant:Y?Z?.variant??"primary":"primary",onClick:()=>M(!0),children:G.confirmLabel??"OK"})]})]})})]})})]})}function U(){let q=I($);if(!q)throw Error("useImperativeDialog must be used within an ImperativeDialogProvider");return q}function R(){let{alert:q}=U();return q}function b(){let{confirm:q}=U();return q}export{U as useImperativeDialog,b as useConfirm,R as useAlert,B as ImperativeDialogProvider};export{B as qb,U as rb,R as sb,b as tb};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
3
|
+
declare const inlineAlertVariants: (props?: ({
|
|
4
|
+
variant?: "info" | "warning" | "success" | "error" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface InlineAlertProps extends Omit<ComponentPropsWithoutRef<"div">, "className">, VariantProps<typeof inlineAlertVariants> {
|
|
7
|
+
variant: NonNullable<VariantProps<typeof inlineAlertVariants>["variant"]>;
|
|
8
|
+
className?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Inline alert strip for status and validation messages that belong in the
|
|
13
|
+
* page flow — the modern form of the legacy Bootstrap .alert. A quiet band:
|
|
14
|
+
* faint tint, hairline border, and a leading status icon that carries the
|
|
15
|
+
* color (the Toast convention), so it sits in the integrated page language
|
|
16
|
+
* without shouting over the content. For page-level feedback inside a
|
|
17
|
+
* SettingsContainer or SettingsSection. Transient feedback should use Toast
|
|
18
|
+
* instead.
|
|
19
|
+
*/
|
|
20
|
+
export declare function InlineAlert({ variant, className, children, ...props }: InlineAlertProps): import("react").JSX.Element;
|
|
21
|
+
export { inlineAlertVariants };
|
|
22
|
+
//# sourceMappingURL=InlineAlert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineAlert.d.ts","sourceRoot":"","sources":["../../../src/components/InlineAlert/InlineAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjE,QAAA,MAAM,mBAAmB;;8EAqBxB,CAAC;AASF,MAAM,WAAW,gBAChB,SAAQ,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,EACzD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IACzC,OAAO,EAAE,WAAW,CAAC,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,gBAAgB,+BAWlB;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/InlineAlert/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{se as y}from"../../index-7abyvs9n.js";import{te as q}from"../../lib/utils.js";import{faCircleCheck as G,faCircleExclamation as H,faCircleInfo as J,faTriangleExclamation as K}from"@fortawesome/pro-solid-svg-icons";import{cva as L}from"class-variance-authority";import{jsx as P,jsxs as Q}from"react/jsx-runtime";var z=L(["flex items-start gap-2.5 rounded-lg border px-3 py-2.5 text-sm","[&_[data-slot=icon]]:mt-0.5 [&_[data-slot=icon]]:shrink-0"],{variants:{variant:{error:"border-utility-error-200 bg-utility-error-50 text-error-primary [&_[data-slot=icon]]:text-utility-error-600",warning:"border-utility-warning-200 bg-utility-warning-50 text-warning-primary [&_[data-slot=icon]]:text-utility-warning-600",success:"border-utility-success-200 bg-utility-success-50 text-success-primary [&_[data-slot=icon]]:text-utility-success-600",info:"border-utility-blue-200 bg-utility-blue-50 text-secondary [&_[data-slot=icon]]:text-utility-blue-600"}},defaultVariants:{variant:"info"}}),M={error:H,warning:K,success:G,info:J};function O({variant:A,className:B,children:D,...F}){return Q("div",{"data-slot":"inline-alert",className:q(z({variant:A}),B),...F,children:[P(y,{icon:M[A??"info"]}),P("div",{className:"min-w-0",children:D})]})}export{z as inlineAlertVariants,O as InlineAlert};export{z as ub,O as vb};
|
|
@@ -15,6 +15,14 @@ export interface InputProps extends Omit<React.ComponentPropsWithoutRef<typeof B
|
|
|
15
15
|
addonBefore?: ReactNode;
|
|
16
16
|
addonAfter?: ReactNode;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A text input component with label and error state support.
|
|
20
|
+
*
|
|
21
|
+
* Size follows the shared control-size contract (h-8 / h-9 / h-10,
|
|
22
|
+
* text-sm/font-medium) so inputs align with Button, Select, Combobox, and
|
|
23
|
+
* NumberField in a row. Leading/trailing icons use the same optical edge
|
|
24
|
+
* inset as Select's chevron.
|
|
25
|
+
*/
|
|
18
26
|
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
27
|
export { inputVariants, inputWrapperVariants };
|
|
20
28
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWnD,QAAA,MAAM,aAAa;;8EAUlB,CAAC;AAMF,QAAA,MAAM,oBAAoB;;8EAUzB,CAAC;AAEF,MAAM,WAAW,UAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,SAAS,CAAC,EAAE,MAAM,CAAC,EACrE,YAAY,CAAC,OAAO,aAAa,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,yGA4HjB,CAAC;AAIF,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{tc as V}from"../Field/index.js";import{Cd as S,Fd as h,Hd as Z,Md as L}from"../../index-st80n69g.js";import{te as q}from"../../lib/utils.js";import{Field as $}from"@base-ui/react/field";import{Input as b}from"@base-ui/react/input";import{cva as w}from"class-variance-authority";import{forwardRef as I}from"react";import{jsx as k,jsxs as m}from"react/jsx-runtime";var F=w("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground w-full min-w-0 bg-background outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",{variants:{size:h},defaultVariants:{size:"md"}}),N=w(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground h-full min-w-0 flex-1 bg-transparent outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium ${S}`),R=w("border-input flex w-full items-center rounded-lg border bg-background shadow-xs transition-[color,box-shadow]",{variants:{size:L},defaultVariants:{size:"md"}}),B=I(({label:K,error:D,leading:y,trailing:J,addonBefore:M,addonAfter:Q,className:x,id:z,value:P,defaultValue:A,size:Y,...C},j)=>{let v=V(),U=z||K?.toLowerCase().replace(/\s+/g,"-"),W=y||J||M||Q,X=Y??"md",E=P!==void 0?{value:P}:{defaultValue:A??""},G=k(b,{ref:j,id:U,"data-slot":"input",className:q(W?[N(),y?"pl-2":"pl-3",J?"pr-2":"pr-3"]:[F({size:Y}),"rounded-lg border border-input shadow-xs transition-[color,box-shadow]","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","data-[invalid]:ring-destructive/20 data-[invalid]:border-destructive","data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"],x),...E,...C}),H=W?m("div",{"data-slot":"input-wrapper",className:q(R({size:Y}),"overflow-hidden","has-[input:focus-visible]:border-ring has-[input:focus-visible]:ring-ring/50 has-[input:focus-visible]:ring-[3px]","has-[[data-disabled]]:pointer-events-none has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50","has-[[data-invalid]]:ring-destructive/20 has-[[data-invalid]]:border-destructive","[&_[data-slot=icon]]:shrink-0 [&_[data-slot=icon]]:text-muted-foreground/60"),children:[M&&k("span",{className:"flex items-center self-stretch border-r border-input bg-muted px-3 text-muted-foreground",children:M}),y&&k("span",{className:q("flex items-center",Z[X].leading),children:y}),G,J&&k("span",{className:q("flex items-center",Z[X].trailing),children:J}),Q&&k("span",{className:"flex items-center self-stretch border-l border-input bg-muted px-3 text-muted-foreground",children:Q})]}):G;if(v)return H;return m($.Root,{invalid:D?!0:void 0,className:"flex flex-col gap-1",children:[K&&k($.Label,{htmlFor:U,className:"text-sm font-medium text-foreground",children:K}),H,k($.Error,{className:"text-sm text-destructive",children:D})]})});B.displayName="Input";export{R as inputWrapperVariants,F as inputVariants,B as Input};export{B as wb};
|
|
@@ -5,23 +5,33 @@ declare const inputGroupVariants: (props?: ({
|
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export interface InputGroupProps extends Omit<React.ComponentProps<"div">, "size">, VariantProps<typeof inputGroupVariants> {
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* A compound component for composing inputs with addons such as icons, buttons, text, and keyboard shortcuts.
|
|
10
|
+
*
|
|
11
|
+
* InputGroup's sm/md/lg sizes follow the shared control-size contract
|
|
12
|
+
* (h-8 / h-9 / h-10, text-sm/font-medium) so groups align with Button, Input,
|
|
13
|
+
* and Select in a row. Decorative icons use the same optical edge inset as
|
|
14
|
+
* Input/Select. InputGroupButton icon sizes nest into the field like Combobox
|
|
15
|
+
* triggers (`p-0.5`); labeled chips stay compact (xs/sm). Disabling the inner
|
|
16
|
+
* control also propagates the disabled visual state to the whole group.
|
|
17
|
+
*/
|
|
18
|
+
declare function InputGroup({ className, size, ...props }: InputGroupProps): import("react").JSX.Element;
|
|
9
19
|
declare const inputGroupAddonVariants: (props?: ({
|
|
10
20
|
align?: "inline-end" | "inline-start" | "block-start" | "block-end" | null | undefined;
|
|
11
21
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
22
|
export interface InputGroupAddonProps extends React.ComponentProps<"div">, VariantProps<typeof inputGroupAddonVariants> {
|
|
13
23
|
}
|
|
14
|
-
declare function InputGroupAddon({ className, align, ...props }: InputGroupAddonProps): import("react
|
|
24
|
+
declare function InputGroupAddon({ className, align, ...props }: InputGroupAddonProps): import("react").JSX.Element;
|
|
15
25
|
declare const inputGroupButtonVariants: (props?: ({
|
|
16
26
|
size?: "sm" | "xs" | "icon-sm" | "icon-xs" | null | undefined;
|
|
17
27
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
28
|
export interface InputGroupButtonProps extends Omit<ButtonProps, "type" | "size">, VariantProps<typeof inputGroupButtonVariants> {
|
|
19
29
|
type?: "button" | "submit" | "reset";
|
|
20
30
|
}
|
|
21
|
-
declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): import("react
|
|
31
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: InputGroupButtonProps): import("react").JSX.Element;
|
|
22
32
|
export interface InputGroupTextProps extends React.ComponentProps<"span"> {
|
|
23
33
|
}
|
|
24
|
-
declare function InputGroupText({ className, ...props }: InputGroupTextProps): import("react
|
|
34
|
+
declare function InputGroupText({ className, ...props }: InputGroupTextProps): import("react").JSX.Element;
|
|
25
35
|
export interface InputGroupInputProps extends React.ComponentPropsWithoutRef<"input"> {
|
|
26
36
|
}
|
|
27
37
|
declare const InputGroupInput: import("react").ForwardRefExoticComponent<InputGroupInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.d.ts","sourceRoot":"","sources":["../../../src/components/InputGroup/InputGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"InputGroup.d.ts","sourceRoot":"","sources":["../../../src/components/InputGroup/InputGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE5D,QAAA,MAAM,kBAAkB;;8EAyBvB,CAAC;AAEF,MAAM,WAAW,eAChB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,EAChD,YAAY,CAAC,OAAO,kBAAkB,CAAC;CAAG;AAE5C;;;;;;;;;GASG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAWjE;AAED,QAAA,MAAM,uBAAuB;;8EAmB5B,CAAC;AAEF,MAAM,WAAW,oBAChB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAClC,YAAY,CAAC,OAAO,uBAAuB,CAAC;CAAG;AAEjD,iBAAS,eAAe,CAAC,EACxB,SAAS,EACT,KAAsB,EACtB,GAAG,KAAK,EACR,EAAE,oBAAoB,+BAqBtB;AAMD,QAAA,MAAM,wBAAwB;;8EAc5B,CAAC;AAEH,MAAM,WAAW,qBAChB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,EACzC,YAAY,CAAC,OAAO,wBAAwB,CAAC;IAC9C,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED,iBAAS,gBAAgB,CAAC,EACzB,SAAS,EACT,IAAe,EACf,OAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACR,EAAE,qBAAqB,+BAUvB;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;CAAG;AAE5E,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,+BAUnE;AAED,MAAM,WAAW,oBAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;CAAG;AAEnD,QAAA,MAAM,eAAe,mHAkBpB,CAAC;AAIF,MAAM,WAAW,uBAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC;CAAG;AAEtD,QAAA,MAAM,kBAAkB,yHAkBtB,CAAC;AAIH,OAAO,EACN,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,GAClB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ad as Y}from"../../index-8b3c6nnb.js";import{Cd as J,Md as Q}from"../../index-st80n69g.js";import{te as A}from"../../lib/utils.js";import{Field as W}from"@base-ui/react/field";import{cva as K}from"class-variance-authority";import{forwardRef as Z}from"react";import{jsx as q}from"react/jsx-runtime";var $=K(["group/input-group relative flex w-full min-w-0 items-center rounded-lg border border-input bg-background shadow-xs outline-none","transition-[color,box-shadow]","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:ring-3","has-disabled:bg-input/50 has-disabled:opacity-50","in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0","has-[>textarea]:h-auto","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col","has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3","has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3","has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2","has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2"],{variants:{size:Q},defaultVariants:{size:"md"}});function h({className:y,size:P,...k}){return q("div",{"data-slot":"input-group","data-size":P??"md",role:"group",className:A($({size:P}),y),...k})}var F=K("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] flex cursor-text items-center justify-center select-none [&_[data-slot=icon]]:shrink-0",{variants:{align:{"inline-start":"pl-2 group-data-[size=lg]/input-group:pl-2.5 has-[>button]:self-stretch has-[>button]:p-0.5 group-data-[size=lg]/input-group:has-[>button]:p-0.5 has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 group-data-[size=lg]/input-group:pr-2.5 has-[>button]:self-stretch has-[>button]:p-0.5 group-data-[size=lg]/input-group:has-[>button]:p-0.5 has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function w({className:y,align:P="inline-start",...k}){return q("div",{role:"group","data-slot":"input-group-addon","data-align":P,className:A(F({align:P}),y),onClick:(D)=>{if(D.target.closest("button"))return;let G=D.currentTarget.parentElement;(G?.querySelector("input")??G?.querySelector("textarea"))?.focus()},...k})}var I=K("shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>[data-slot=icon]]:gap-1 [&_[data-slot=icon]]:size-3.5",sm:"h-8 gap-1.5 rounded-md px-2.5 text-sm has-[>[data-slot=icon]]:gap-1.5 [&_[data-slot=icon]]:size-4","icon-xs":"h-full w-auto aspect-square rounded-md p-0 px-0 has-[[data-slot=icon]]:px-0 [&_[data-slot=icon]]:size-3.5","icon-sm":"h-full w-auto aspect-square rounded-md p-0 px-0 has-[[data-slot=icon]]:px-0 [&_[data-slot=icon]]:size-4"}},defaultVariants:{size:"xs"}});function U({className:y,type:P="button",variant:k="ghost",size:D="xs",...G}){return q(Y,{type:P,variant:k,size:"sm",className:A(I({size:D}),y),...G})}function B({className:y,...P}){return q("span",{className:A("text-muted-foreground gap-2 text-sm font-medium flex items-center [&_[data-slot=icon]]:pointer-events-none [&_[data-slot=icon]]:shrink-0",y),...P})}var M=Z(({className:y,...P},k)=>{return q(W.Control,{ref:k,"data-slot":"input-group-control",render:q("input",{}),className:A("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",`w-full min-w-0 bg-transparent px-3 outline-none ${J}`,"rounded-none border-0 shadow-none ring-0 focus-visible:ring-0","disabled:bg-transparent aria-invalid:ring-0 flex-1",y),...P})});M.displayName="InputGroupInput";var S=Z(({className:y,...P},k)=>{return q("textarea",{ref:k,"data-slot":"input-group-control",className:A("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",`w-full min-w-0 bg-transparent px-3 py-2 outline-none ${J}`,"rounded-none border-0 shadow-none ring-0 focus-visible:ring-0","disabled:bg-transparent aria-invalid:ring-0 flex-1 resize-none",y),...P})});S.displayName="InputGroupTextarea";export{$ as inputGroupVariants,I as inputGroupButtonVariants,F as inputGroupAddonVariants,S as InputGroupTextarea,B as InputGroupText,M as InputGroupInput,U as InputGroupButton,w as InputGroupAddon,h as InputGroup};export{h as xb,F as yb,w as zb,I as Ab,U as Bb,B as Cb,M as Db,S as Eb};
|