@bi-digital/react 0.11.11 → 0.12.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/dist/{alert-footer-uyWxrEuB.d.mts → alert-footer-Yb_zpMhd.d.mts} +16 -66
- package/dist/components/alert/alert-footer.d.mts +1 -1
- package/dist/components/alert/alert.d.mts +1 -1
- package/dist/components/alert/alert.mjs +6 -7
- package/dist/components/alert/alert.mjs.map +1 -1
- package/dist/components/alert/index.d.mts +1 -1
- package/dist/components/avatar/avatar.d.mts +1 -1
- package/dist/components/avatar/avatar.mjs +1 -3
- package/dist/components/avatar/avatar.mjs.map +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/badge/badge.d.mts +1 -1
- package/dist/components/badge/badge.mjs +1 -3
- package/dist/components/badge/badge.mjs.map +1 -1
- package/dist/components/badge/index.d.mts +1 -1
- package/dist/components/button/button.d.mts +1 -1
- package/dist/components/button/button.mjs +1 -2
- package/dist/components/button/button.mjs.map +1 -1
- package/dist/components/button/index.d.mts +1 -1
- package/dist/components/card/card-action.d.mts +1 -1
- package/dist/components/card/card-action.mjs +1 -2
- package/dist/components/card/card-action.mjs.map +1 -1
- package/dist/components/card/card-actions.d.mts +1 -1
- package/dist/components/card/card-content.d.mts +1 -1
- package/dist/components/card/card-date.d.mts +1 -1
- package/dist/components/card/card-header.d.mts +1 -1
- package/dist/components/card/card-media.d.mts +1 -1
- package/dist/components/card/card.d.mts +1 -1
- package/dist/components/card/card.mjs +1 -3
- package/dist/components/card/card.mjs.map +1 -1
- package/dist/components/card/index.d.mts +1 -1
- package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
- package/dist/components/checkbox/checkbox-subsection.mjs +1 -2
- package/dist/components/checkbox/checkbox-subsection.mjs.map +1 -1
- package/dist/components/checkbox/checkbox.d.mts +1 -1
- package/dist/components/checkbox/checkbox.mjs +3 -3
- package/dist/components/checkbox/checkbox.mjs.map +1 -1
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/chip/chip.d.mts +1 -1
- package/dist/components/chip/chip.mjs +1 -3
- package/dist/components/chip/chip.mjs.map +1 -1
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/details/details-content.d.mts +1 -1
- package/dist/components/details/details-summary.d.mts +1 -1
- package/dist/components/details/details.d.mts +1 -1
- package/dist/components/details/details.mjs +1 -2
- package/dist/components/details/details.mjs.map +1 -1
- package/dist/components/details/index.d.mts +1 -1
- package/dist/components/dialog/dialog-close-button.d.mts +1 -1
- package/dist/components/dialog/dialog-content.d.mts +1 -1
- package/dist/components/dialog/dialog-footer.d.mts +1 -1
- package/dist/components/dialog/dialog-header.d.mts +1 -1
- package/dist/components/dialog/dialog-trigger.d.mts +1 -1
- package/dist/components/dialog/dialog.d.mts +1 -1
- package/dist/components/dialog/dialog.mjs +1 -2
- package/dist/components/dialog/dialog.mjs.map +1 -1
- package/dist/components/dialog/index.d.mts +1 -1
- package/dist/components/dropdown/dropdown-button.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
- package/dist/components/dropdown/dropdown.d.mts +1 -1
- package/dist/components/dropdown/index.d.mts +1 -1
- package/dist/components/field/field-affix.d.mts +1 -1
- package/dist/components/field/field-description.d.mts +1 -1
- package/dist/components/field/field.d.mts +1 -1
- package/dist/components/field/field.mjs +1 -2
- package/dist/components/field/field.mjs.map +1 -1
- package/dist/components/field/index.d.mts +1 -1
- package/dist/components/fieldset/fieldset-description.d.mts +1 -1
- package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
- package/dist/components/fieldset/fieldset-legend.mjs +1 -2
- package/dist/components/fieldset/fieldset-legend.mjs.map +1 -1
- package/dist/components/fieldset/fieldset.d.mts +1 -1
- package/dist/components/fieldset/fieldset.mjs +1 -2
- package/dist/components/fieldset/fieldset.mjs.map +1 -1
- package/dist/components/fieldset/index.d.mts +1 -1
- package/dist/components/filter-group/filter-group.d.mts +1 -1
- package/dist/components/filter-group/filter-group.mjs +1 -2
- package/dist/components/filter-group/filter-group.mjs.map +1 -1
- package/dist/components/filter-group/index.d.mts +1 -1
- package/dist/components/footer/footer.d.mts +1 -1
- package/dist/components/footer/footer.mjs +1 -6
- package/dist/components/footer/footer.mjs.map +1 -1
- package/dist/components/footer/index.d.mts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/input.d.mts +1 -1
- package/dist/components/input/input.mjs +1 -2
- package/dist/components/input/input.mjs.map +1 -1
- package/dist/components/label/index.d.mts +1 -1
- package/dist/components/label/label.d.mts +1 -1
- package/dist/components/label/label.mjs +1 -2
- package/dist/components/label/label.mjs.map +1 -1
- package/dist/components/link/index.d.mts +1 -1
- package/dist/components/link/link.d.mts +1 -1
- package/dist/components/link/link.mjs +1 -2
- package/dist/components/link/link.mjs.map +1 -1
- package/dist/components/logo/index.d.mts +1 -1
- package/dist/components/logo/logo.d.mts +1 -1
- package/dist/components/logo/logo.mjs +2 -3
- package/dist/components/logo/logo.mjs.map +1 -1
- package/dist/components/navbar/index.d.mts +1 -1
- package/dist/components/navbar/navbar.d.mts +1 -1
- package/dist/components/navbar/navbar.mjs +3 -3
- package/dist/components/navbar/navbar.mjs.map +1 -1
- package/dist/components/navbar/sub-navbar.d.mts +1 -1
- package/dist/components/navbar/sub-navbar.mjs +2 -2
- package/dist/components/navbar/sub-navbar.mjs.map +1 -1
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/pagination-button.d.mts +1 -1
- package/dist/components/pagination/pagination.d.mts +1 -1
- package/dist/components/pagination/pagination.mjs +1 -2
- package/dist/components/pagination/pagination.mjs.map +1 -1
- package/dist/components/popover/index.d.mts +1 -1
- package/dist/components/popover/popover-trigger.d.mts +1 -1
- package/dist/components/popover/popover.d.mts +1 -1
- package/dist/components/popover/popover.mjs +1 -2
- package/dist/components/popover/popover.mjs.map +1 -1
- package/dist/components/radio/index.d.mts +1 -1
- package/dist/components/radio/radio.d.mts +1 -1
- package/dist/components/radio/radio.mjs +3 -3
- package/dist/components/radio/radio.mjs.map +1 -1
- package/dist/components/search/index.d.mts +1 -1
- package/dist/components/search/search.d.mts +1 -1
- package/dist/components/search/search.mjs +3 -4
- package/dist/components/search/search.mjs.map +1 -1
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/select-optgroup.d.mts +1 -1
- package/dist/components/select/select-option.d.mts +1 -1
- package/dist/components/select/select.d.mts +1 -1
- package/dist/components/select/select.mjs +1 -2
- package/dist/components/select/select.mjs.map +1 -1
- package/dist/components/selectfield/index.d.mts +1 -1
- package/dist/components/selectfield/selectfield.d.mts +1 -1
- package/dist/components/selectfield/selectfield.mjs +3 -3
- package/dist/components/selectfield/selectfield.mjs.map +1 -1
- package/dist/components/skip-link/index.d.mts +1 -1
- package/dist/components/skip-link/skip-link.d.mts +1 -1
- package/dist/components/skip-link/skip-link.mjs +1 -2
- package/dist/components/skip-link/skip-link.mjs.map +1 -1
- package/dist/components/spinner/index.d.mts +1 -1
- package/dist/components/spinner/spinner.d.mts +1 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/switch.d.mts +1 -1
- package/dist/components/switch/switch.mjs +3 -3
- package/dist/components/switch/switch.mjs.map +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/tab.d.mts +1 -1
- package/dist/components/tabs/tabs-list.d.mts +1 -1
- package/dist/components/tabs/tabs-panel.d.mts +1 -1
- package/dist/components/tabs/tabs.d.mts +1 -1
- package/dist/components/tabs/tabs.mjs +1 -2
- package/dist/components/tabs/tabs.mjs.map +1 -1
- package/dist/components/textarea/index.d.mts +1 -1
- package/dist/components/textarea/textarea.d.mts +1 -1
- package/dist/components/textarea/textarea.mjs +1 -2
- package/dist/components/textarea/textarea.mjs.map +1 -1
- package/dist/components/textfield/index.d.mts +1 -1
- package/dist/components/textfield/textfield.d.mts +1 -1
- package/dist/components/textfield/textfield.mjs +3 -4
- package/dist/components/textfield/textfield.mjs.map +1 -1
- package/dist/components/tooltip/index.d.mts +1 -1
- package/dist/components/tooltip/tooltip.d.mts +1 -1
- package/dist/components/validation-message/index.d.mts +1 -1
- package/dist/components/validation-message/validation-message.d.mts +1 -1
- package/dist/main.d.mts +1 -1
- package/dist/react-types.d.ts +34 -0
- package/dist/{types-BXsMIYrD.d.mts → types-C0q7hMe_.d.mts} +2 -8
- package/dist/types.d.mts +1 -1
- package/dist/utilities/hooks/index.d.mts +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/package.json +6 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "../alert-footer-
|
|
1
|
+
import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../dialog-trigger-context-DbUhxoNL.mjs";
|
|
3
3
|
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../popover-trigger-context-BLjAozBn.mjs";
|
|
4
4
|
import { n as DropdownItemProps, t as DropdownItem } from "../dropdown-item-bA64wFOZ.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { nn as InputProps, tn as Input } from "../../alert-footer-
|
|
1
|
+
import { nn as InputProps, tn as Input } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Input, InputProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { nn as InputProps, tn as Input } from "../../alert-footer-
|
|
1
|
+
import { nn as InputProps, tn as Input } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Input, InputProps };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/input/input.tsx
|
|
4
|
-
const Input = ({ type = "text", size = "medium", visibleWidth, className, onChange, onClick,
|
|
4
|
+
const Input = ({ type = "text", size = "medium", visibleWidth, className, onChange, onClick, readOnly, ref, ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx("input", {
|
|
6
6
|
className: clsx("bi-input", className),
|
|
7
|
-
"data-dark": dark,
|
|
8
7
|
"data-size": size,
|
|
9
8
|
ref,
|
|
10
9
|
type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type InputProps = MergeRight<\n DefaultProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'type'>,\n {\n /**\n * Size of the input field.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * The `input` type\n * @default 'text'\n * */\n type?:\n | 'checkbox'\n | 'color'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n /** Set the visible width, in characters, of the `Input` component. */\n visibleWidth?: number;\n /**\n * Disable the element.\n * Avoid using if possible for accessibility purposes\n */\n disabled?: boolean;\n /** Toggle `readOnly` */\n readOnly?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Input = ({\n type = 'text',\n size = 'medium',\n visibleWidth,\n className,\n onChange,\n onClick,\n
|
|
1
|
+
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type InputProps = MergeRight<\n DefaultProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'type'>,\n {\n /**\n * Size of the input field.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * The `input` type\n * @default 'text'\n * */\n type?:\n | 'checkbox'\n | 'color'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n /** Set the visible width, in characters, of the `Input` component. */\n visibleWidth?: number;\n /**\n * Disable the element.\n * Avoid using if possible for accessibility purposes\n */\n disabled?: boolean;\n /** Toggle `readOnly` */\n readOnly?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Input = ({\n type = 'text',\n size = 'medium',\n visibleWidth,\n className,\n onChange,\n onClick,\n readOnly,\n ref,\n ...props\n}: InputProps) => {\n return (\n <input\n className={clsx('bi-input', className)}\n data-size={size}\n ref={ref}\n type={type}\n readOnly={readOnly}\n onChange={(event) => readOnly || onChange?.(event)} // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick={(event) => {\n if (readOnly) event.preventDefault(); // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick?.(event);\n }}\n size={visibleWidth}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAgDA,MAAa,SAAS,EACpB,OAAO,QACP,OAAO,UACP,cACA,WACA,UACA,SACA,UACA,KACA,GAAG,YACa;CAChB,OACE,oBAAC,SAAD;EACE,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACN;EACC;EACI;EACV,WAAW,UAAU,YAAY,WAAW,MAAM;EAClD,UAAU,UAAU;GAClB,IAAI,UAAU,MAAM,gBAAgB;GACpC,UAAU,MAAM;;EAElB,MAAM;EACN,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as Label, ot as LabelProps } from "../../alert-footer-
|
|
1
|
+
import { at as Label, ot as LabelProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Label, LabelProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as Label, ot as LabelProps } from "../../alert-footer-
|
|
1
|
+
import { at as Label, ot as LabelProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Label, LabelProps };
|
|
@@ -2,11 +2,10 @@ import clsx from "clsx/lite";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/label/label.tsx
|
|
5
|
-
const Label = ({ className, weight = "semibold",
|
|
5
|
+
const Label = ({ className, weight = "semibold", asChild, ref, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(asChild ? Slot : "label", {
|
|
7
7
|
ref,
|
|
8
8
|
className: clsx("bi-label", className),
|
|
9
|
-
"data-dark": dark,
|
|
10
9
|
"data-weight": weight,
|
|
11
10
|
...props
|
|
12
11
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.mjs","names":[],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { LabelHTMLAttributes, Ref } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LabelProps = MergeRight<\n DefaultProps & AsChildProps & LabelHTMLAttributes<HTMLLabelElement>,\n {\n /**\n * Sets the font weight of the label. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset\n * @default 'semibold'\n */\n weight?: 'regular' | 'medium' | 'semibold';\n ref?: Ref<HTMLLabelElement>;\n }\n>;\n\nexport const Label = ({ className, weight = 'semibold',
|
|
1
|
+
{"version":3,"file":"label.mjs","names":[],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { LabelHTMLAttributes, Ref } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LabelProps = MergeRight<\n DefaultProps & AsChildProps & LabelHTMLAttributes<HTMLLabelElement>,\n {\n /**\n * Sets the font weight of the label. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset\n * @default 'semibold'\n */\n weight?: 'regular' | 'medium' | 'semibold';\n ref?: Ref<HTMLLabelElement>;\n }\n>;\n\nexport const Label = ({ className, weight = 'semibold', asChild, ref, ...props }: LabelProps) => {\n const Component = asChild ? Slot : 'label';\n\n return <Component ref={ref} className={clsx('bi-label', className)} data-weight={weight} {...props} />;\n};\n"],"mappings":";;;;AAkBA,MAAa,SAAS,EAAE,WAAW,SAAS,YAAY,SAAS,KAAK,GAAG,YAAwB;CAG/F,OAAO,oBAFW,UAAU,OAAO,SAE5B;EAAgB;EAAK,WAAW,KAAK,YAAY,UAAU;EAAE,eAAa;EAAQ,GAAI;EAAS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Q as LinkProps, Z as Link } from "../../alert-footer-
|
|
1
|
+
import { Q as LinkProps, Z as Link } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Link, LinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Q as LinkProps, Z as Link } from "../../alert-footer-
|
|
1
|
+
import { Q as LinkProps, Z as Link } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Link, LinkProps };
|
|
@@ -2,11 +2,10 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
//#region src/components/link/link.tsx
|
|
5
|
-
const Link = ({ asChild, className, color,
|
|
5
|
+
const Link = ({ asChild, className, color, underline, ref, ...rest }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
7
7
|
className: clsx("bi-link", className),
|
|
8
8
|
"data-color": color,
|
|
9
|
-
"data-dark": dark,
|
|
10
9
|
"data-underline": underline,
|
|
11
10
|
ref,
|
|
12
11
|
...rest
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.mjs","names":[],"sources":["../../../src/components/link/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { AnchorHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LinkProps = MergeRight<\n DefaultProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Set the color of the link.\n * @default 'primary'\n */\n color?: 'primary' | 'neutral';\n /**\n * Control the underline style of the link.\n * - 'always': The link is always underlined.\n * - 'hover': The link is underlined only on hover.\n * @default 'always'\n */\n underline?: 'always' | 'hover';\n children: ReactNode;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const Link = ({ asChild, className, color,
|
|
1
|
+
{"version":3,"file":"link.mjs","names":[],"sources":["../../../src/components/link/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { AnchorHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LinkProps = MergeRight<\n DefaultProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Set the color of the link.\n * @default 'primary'\n */\n color?: 'primary' | 'neutral';\n /**\n * Control the underline style of the link.\n * - 'always': The link is always underlined.\n * - 'hover': The link is underlined only on hover.\n * @default 'always'\n */\n underline?: 'always' | 'hover';\n children: ReactNode;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const Link = ({ asChild, className, color, underline, ref, ...rest }: LinkProps) => {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={clsx('bi-link', className)}\n data-color={color}\n data-underline={underline}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;AA+BA,MAAa,QAAQ,EAAE,SAAS,WAAW,OAAO,WAAW,KAAK,GAAG,WAAsB;CAGzF,OACE,oBAHgB,UAAU,OAAO,KAGjC;EACE,WAAW,KAAK,WAAW,UAAU;EACrC,cAAY;EACZ,kBAAgB;EACX;EACL,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { X as LogoProps, Y as Logo } from "../../alert-footer-
|
|
1
|
+
import { X as LogoProps, Y as Logo } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Logo, LogoProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { X as LogoProps, Y as Logo } from "../../alert-footer-
|
|
1
|
+
import { X as LogoProps, Y as Logo } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Logo, LogoProps };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
//#region src/components/logo/logo.tsx
|
|
4
|
-
const Logo = ({ pride = false,
|
|
4
|
+
const Logo = ({ pride = false, international = false, vertical = false, size = "medium", className, ref, ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx("span", {
|
|
6
6
|
...props,
|
|
7
7
|
className: clsx("bi-logo", className),
|
|
8
|
-
"data-
|
|
9
|
-
"data-dark": dark,
|
|
8
|
+
"data-pride": pride,
|
|
10
9
|
"data-international": international,
|
|
11
10
|
"data-vertical": vertical,
|
|
12
11
|
"data-size": size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.mjs","names":[],"sources":["../../../src/components/logo/logo.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type LogoProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n {\n /**\n * Enable the pride logo variant. This will override the default logo with a pride-themed logo.\n * @default false\n */\n pride?: boolean;\n /**\n * Determines if the international logo should be used.\n * @default false\n */\n international?: boolean;\n /**\n * Determines if the logo text should be displayed vertically.\n * Only applies when `international` is `true`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Determines the height of the logo.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Logo = ({\n pride = false,\n
|
|
1
|
+
{"version":3,"file":"logo.mjs","names":[],"sources":["../../../src/components/logo/logo.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type LogoProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n {\n /**\n * Enable the pride logo variant. This will override the default logo with a pride-themed logo.\n * @default false\n */\n pride?: boolean;\n /**\n * Determines if the international logo should be used.\n * @default false\n */\n international?: boolean;\n /**\n * Determines if the logo text should be displayed vertically.\n * Only applies when `international` is `true`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Determines the height of the logo.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Logo = ({\n pride = false,\n international = false,\n vertical = false,\n size = 'medium',\n className,\n ref,\n ...props\n}: LogoProps) => {\n return (\n <span\n {...props}\n className={clsx('bi-logo', className)}\n data-pride={pride}\n data-international={international}\n data-vertical={vertical}\n data-size={size}\n ref={ref}\n />\n );\n};\n"],"mappings":";;;AAiCA,MAAa,QAAQ,EACnB,QAAQ,OACR,gBAAgB,OAChB,WAAW,OACX,OAAO,UACP,WACA,KACA,GAAG,YACY;CACf,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,WAAW,KAAK,WAAW,UAAU;EACrC,cAAY;EACZ,sBAAoB;EACpB,iBAAe;EACf,aAAW;EACN;EACL,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as SubNavbar, J as NavbarProps, K as SubNavbarProps, q as Navbar } from "../../alert-footer-
|
|
1
|
+
import { G as SubNavbar, J as NavbarProps, K as SubNavbarProps, q as Navbar } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Navbar, NavbarProps, SubNavbar, SubNavbarProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { J as NavbarProps, q as Navbar } from "../../alert-footer-
|
|
1
|
+
import { J as NavbarProps, q as Navbar } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Navbar, NavbarProps };
|
|
@@ -3,18 +3,18 @@ import "../logo/index.mjs";
|
|
|
3
3
|
import clsx from "clsx/lite";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/navbar/navbar.tsx
|
|
6
|
-
const Navbar = ({
|
|
6
|
+
const Navbar = ({ fixed = false, transparent = false, homeAriaLabel, skipLink, homeHref, logo, children, className, ref, ...props }) => {
|
|
7
7
|
return /* @__PURE__ */ jsxs("nav", {
|
|
8
|
+
"data-color": "primary",
|
|
8
9
|
...props,
|
|
9
10
|
className: clsx("bi-navbar", className),
|
|
10
11
|
"data-fixed": fixed,
|
|
11
|
-
"data-dark": dark,
|
|
12
12
|
"data-transparent": transparent,
|
|
13
13
|
ref,
|
|
14
14
|
children: [skipLink, /* @__PURE__ */ jsxs("header", { children: [/* @__PURE__ */ jsx("a", {
|
|
15
15
|
"aria-label": homeAriaLabel,
|
|
16
16
|
href: homeHref,
|
|
17
|
-
children: logo || /* @__PURE__ */ jsx(Logo, {
|
|
17
|
+
children: logo || /* @__PURE__ */ jsx(Logo, {})
|
|
18
18
|
}), children] })]
|
|
19
19
|
});
|
|
20
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.mjs","names":[],"sources":["../../../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n /**\n * When `true`, the navbar is transparent and does not take up layout height (content may sit behind it).\n * If `fixed` is also `true`, it starts transparent and reveals its background color after the user scrolls a distance equal to the navbar height.\n * Otherwise, it stays transparent.\n * @default false\n */\n transparent?: boolean;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n
|
|
1
|
+
{"version":3,"file":"navbar.mjs","names":[],"sources":["../../../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n /**\n * When `true`, the navbar is transparent and does not take up layout height (content may sit behind it).\n * If `fixed` is also `true`, it starts transparent and reveals its background color after the user scrolls a distance equal to the navbar height.\n * Otherwise, it stays transparent.\n * @default false\n */\n transparent?: boolean;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n fixed = false,\n transparent = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav\n data-color='primary'\n {...props}\n className={clsx('bi-navbar', className)}\n data-fixed={fixed}\n data-transparent={transparent}\n ref={ref}\n >\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAyCA,MAAa,UAAU,EACrB,QAAQ,OACR,cAAc,OACd,eACA,UACA,UACA,MACA,UACA,WACA,KACA,GAAG,YACc;CACjB,OACE,qBAAC,OAAD;EACE,cAAW;EACX,GAAI;EACJ,WAAW,KAAK,aAAa,UAAU;EACvC,cAAY;EACZ,oBAAkB;EACb;YANP,CAQG,UACD,qBAAC,UAAD,EAAA,UAAA,CACE,oBAAC,KAAD;GAAG,cAAY;GAAe,MAAM;aACjC,QAAQ,oBAAC,MAAD,EAAQ,CAAA;GACf,CAAA,EACH,SACM,EAAA,CAAA,CACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as SubNavbar, K as SubNavbarProps } from "../../alert-footer-
|
|
1
|
+
import { G as SubNavbar, K as SubNavbarProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { SubNavbar, SubNavbarProps };
|
|
@@ -5,7 +5,7 @@ import clsx from "clsx/lite";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useRef } from "react";
|
|
7
7
|
//#region src/components/navbar/sub-navbar.tsx
|
|
8
|
-
const SubNavbar = ({
|
|
8
|
+
const SubNavbar = ({ children, className, ref, ...props }) => {
|
|
9
9
|
const elementRef = useRef(null);
|
|
10
10
|
const fixed = useIsElementAboveViewport(elementRef);
|
|
11
11
|
const scrollDirection = useScrollDirection();
|
|
@@ -13,9 +13,9 @@ const SubNavbar = ({ dark = false, children, className, ref, ...props }) => {
|
|
|
13
13
|
className: "bi-sub-navbar--wrapper",
|
|
14
14
|
children: [/* @__PURE__ */ jsx("div", { ref: elementRef }), /* @__PURE__ */ jsx("nav", {
|
|
15
15
|
className: clsx("bi-sub-navbar", className),
|
|
16
|
+
"data-color": "primary",
|
|
16
17
|
"data-fixed": fixed,
|
|
17
18
|
"data-scroll-dir": fixed ? scrollDirection : void 0,
|
|
18
|
-
"data-dark": dark,
|
|
19
19
|
...props,
|
|
20
20
|
ref,
|
|
21
21
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar.mjs","names":[],"sources":["../../../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({
|
|
1
|
+
{"version":3,"file":"sub-navbar.mjs","names":[],"sources":["../../../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-color='primary'\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,aAAa,EAAE,UAAU,WAAW,KAAK,GAAG,YAA4B;CACnF,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;CAE5C,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,OAAD,EAAK,KAAK,YAAc,CAAA,EACxB,oBAAC,OAAD;GACE,WAAW,KAAK,iBAAiB,UAAU;GAC3C,cAAW;GACX,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB,KAAA;GAC3C,GAAI;GACC;GAEJ;GACG,CAAA,CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { H as PaginationButtonProps, U as Pagination, V as PaginationButton, W as PaginationProps } from "../../alert-footer-
|
|
1
|
+
import { H as PaginationButtonProps, U as Pagination, V as PaginationButton, W as PaginationProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-DJicBrIN.mjs";
|
|
3
3
|
export { Pagination, PaginationButton, PaginationButtonProps, PaginationItem, PaginationItemProps, PaginationProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { H as PaginationButtonProps, V as PaginationButton } from "../../alert-footer-
|
|
1
|
+
import { H as PaginationButtonProps, V as PaginationButton } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { PaginationButton, PaginationButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { U as Pagination, W as PaginationProps } from "../../alert-footer-
|
|
1
|
+
import { U as Pagination, W as PaginationProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Pagination, PaginationProps };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/pagination/pagination.tsx
|
|
4
|
-
const Pagination = ({ className,
|
|
4
|
+
const Pagination = ({ className, ref, children, ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx("nav", {
|
|
6
6
|
className: clsx("bi-pagination", className),
|
|
7
|
-
"data-dark": dark,
|
|
8
7
|
ref,
|
|
9
8
|
...props,
|
|
10
9
|
children: /* @__PURE__ */ jsx("ul", { children })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.mjs","names":[],"sources":["../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className,
|
|
1
|
+
{"version":3,"file":"pagination.mjs","names":[],"sources":["../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;AAYA,MAAa,cAAc,EAAE,WAAW,KAAK,UAAU,GAAG,YAA6B;CACrF,OACE,oBAAC,OAAD;EAAK,WAAW,KAAK,iBAAiB,UAAU;EAAO;EAAK,GAAI;YAC9D,oBAAC,MAAD,EAAK,UAAc,CAAA;EACf,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { At as PopoverProps, Dt as PopoverTrigger, Ot as PopoverTriggerProps, kt as Popover } from "../../alert-footer-
|
|
1
|
+
import { At as PopoverProps, Dt as PopoverTrigger, Ot as PopoverTriggerProps, kt as Popover } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../../popover-trigger-context-BLjAozBn.mjs";
|
|
3
3
|
export { Popover, PopoverProps, PopoverTrigger, PopoverTriggerContext, PopoverTriggerContextProps, PopoverTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Dt as PopoverTrigger, Ot as PopoverTriggerProps } from "../../alert-footer-
|
|
1
|
+
import { Dt as PopoverTrigger, Ot as PopoverTriggerProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { PopoverTrigger, PopoverTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { At as PopoverProps, kt as Popover } from "../../alert-footer-
|
|
1
|
+
import { At as PopoverProps, kt as Popover } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Popover, PopoverProps };
|
|
@@ -25,7 +25,7 @@ import { autoUpdate, computePosition, flip, hide, offset, shift, size } from "@f
|
|
|
25
25
|
* Content
|
|
26
26
|
* </Popover>
|
|
27
27
|
*/
|
|
28
|
-
const Popover = ({ id, className, onOpenChange, open, placement = "top", disableAutoPlacement = false, positionMiddleware = [], padding = 20,
|
|
28
|
+
const Popover = ({ id, className, onOpenChange, open, placement = "top", disableAutoPlacement = false, positionMiddleware = [], padding = 20, arrow = false, asChild = false, ref, ...rest }) => {
|
|
29
29
|
const Component = asChild ? Slot : "div";
|
|
30
30
|
const popoverRef = useRef(null);
|
|
31
31
|
const isControlled = useRef(open !== void 0);
|
|
@@ -100,7 +100,6 @@ const Popover = ({ id, className, onOpenChange, open, placement = "top", disable
|
|
|
100
100
|
id: id || popoverId,
|
|
101
101
|
"aria-hidden": !isOpen,
|
|
102
102
|
"data-arrow": arrow || void 0,
|
|
103
|
-
"data-dark": dark,
|
|
104
103
|
ref: mergedRefs,
|
|
105
104
|
...rest
|
|
106
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n
|
|
1
|
+
{"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n arrow = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n // False positive: isControlled will never change, but is just used to store the initial controlled state\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ...(arrow ? [arrowPseudoElement] : []),\n size({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--bic-popover-trigger-width', `${rects.reference.width}px`);\n },\n }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware, padding, arrow]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-arrow={arrow || undefined}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,EAAE,EACvB,UAAU,IACV,QAAQ,OACR,UAAU,OACV,KACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,SAAS,KAAA,EAAU;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,IAAI,CAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAE/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;GACjB,eAAe,IAAI;GACnB,iBAAiB,IAAI;;EAEvB,aAAa;EACb,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GAIjB,IAFkB,CADA,IAAI,UAAU,mBAAmB,SAAS,GAAG,IAAI,IACnC,CAAC,SAAS,SAAS,GAAW,EAG5D,UAAU,MAAM;;EAIpB,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,YAAY,CAAC,QAAQ;GACvC,MAAM,gBAAgB;GACtB,UAAU,MAAM;;EAGlB,SAAS,iBAAiB,SAAS,aAAa,KAAK;EACrD,SAAS,iBAAiB,WAAW,cAAc;EACnD,aAAa;GACX,SAAS,oBAAoB,SAAS,aAAa,KAAK;GACxD,SAAS,oBAAoB,WAAW,cAAc;;IAEvD,CAAC,QAAQ,UAAU,CAAC;CAEvB,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG,IAAI;EAE1E,IAAI,WAAW,WAAW,QACxB,OAAO,WAAW,SAAS,eAAe;GACxC,gBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,EAAE,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;MAAW,CAAC;KACtC,GAAI,QAAQ,CAAC,mBAAmB,GAAG,EAAE;KACrC,KAAK,EACH,MAAM,EAAE,OAAO,YAAY;MACzB,SAAS,SAAS,MAAM,YAAY,+BAA+B,GAAG,MAAM,UAAU,MAAM,IAAI;QAEnG,CAAC;KACH;IACD,UAAU;IACV;IACD,CAAC,CAAC,MAAM,EAAE,GAAG,GAAG,qBAAqB;IACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;IACtC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;KAC7E;IACF;IACH;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;EAAS;EAAM,CAAC;CAGrF,gBAAgB;EACd,IAAI,IAAI,eAAe,GAAG;IACzB,CAAC,IAAI,aAAa,CAAC;CAEtB,OACE,oBAAC,WAAD;EACE,WAAWA,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,eAAa,CAAC;EACd,cAAY,SAAS,KAAA;EACrB,KAAK;EACL,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as RadioProps, z as Radio } from "../../alert-footer-
|
|
1
|
+
import { B as RadioProps, z as Radio } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as RadioProps, z as Radio } from "../../alert-footer-
|
|
1
|
+
import { B as RadioProps, z as Radio } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -8,12 +8,13 @@ import "../label/index.mjs";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useId } from "react";
|
|
10
10
|
//#region src/components/radio/radio.tsx
|
|
11
|
-
const Radio = ({
|
|
11
|
+
const Radio = ({ label, description, error, fullwidth, style, className, ref, id, "data-color": color, "data-color-scheme": colorScheme, "aria-describedby": ariaDescribedByProp, ...props }) => {
|
|
12
12
|
const descriptionId = useId();
|
|
13
13
|
const ariaDescribedBy = [description ? descriptionId : "", ariaDescribedByProp].join(" ").trim() || void 0;
|
|
14
14
|
return /* @__PURE__ */ jsx(Field, {
|
|
15
15
|
className,
|
|
16
|
-
"data-
|
|
16
|
+
"data-color": color,
|
|
17
|
+
"data-color-scheme": colorScheme,
|
|
17
18
|
style,
|
|
18
19
|
fullwidth,
|
|
19
20
|
asChild: true,
|
|
@@ -24,7 +25,6 @@ const Radio = ({ dark, label, description, error, fullwidth, style, className, r
|
|
|
24
25
|
ref,
|
|
25
26
|
"aria-invalid": error || void 0,
|
|
26
27
|
"aria-describedby": ariaDescribedBy,
|
|
27
|
-
dark,
|
|
28
28
|
...props
|
|
29
29
|
}),
|
|
30
30
|
label && /* @__PURE__ */ jsx(Label, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n
|
|
1
|
+
{"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,MAAa,SAAS,EACpB,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,oBAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CAEpG,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;YAEA,qBAAC,SAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,MAAK;IACD;IACC;IACL,gBAAc,SAAS,KAAA;IACvB,oBAAkB;IAClB,GAAI;IACJ,CAAA;GACD,SACC,oBAAC,OAAD;IAAO,QAAO;IAAS,SAAS;IAAI,SAAA;cAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;IACd,CAAA;GAET,eAGC,oBAAC,kBAAD;IAAkB,eAAY;IAAO,IAAI;cACtC;IACgB,CAAA;GAEf,EAAA,CAAA;EACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Search, R as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { L as Search, R as SearchProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Search, SearchProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Search, R as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { L as Search, R as SearchProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Search, SearchProps };
|
|
@@ -9,7 +9,7 @@ import clsx from "clsx/lite";
|
|
|
9
9
|
import { CrossSmallIcon, MagnifyingGlassIcon } from "@bi-digital/icons";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/search/search.tsx
|
|
12
|
-
const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size = "medium", ref,
|
|
12
|
+
const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size = "medium", ref, style, fullwidth, "data-color": color, "data-color-scheme": colorScheme, ...props }) => {
|
|
13
13
|
const handleSubmit = (e) => {
|
|
14
14
|
e.preventDefault();
|
|
15
15
|
if (onSubmit) onSubmit(e.currentTarget.querySelector("input")?.value || "");
|
|
@@ -19,7 +19,8 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
19
19
|
};
|
|
20
20
|
return /* @__PURE__ */ jsx(Field, {
|
|
21
21
|
className: clsx("bi-search", className),
|
|
22
|
-
"data-
|
|
22
|
+
"data-color": color,
|
|
23
|
+
"data-color-scheme": colorScheme,
|
|
23
24
|
style,
|
|
24
25
|
fullwidth,
|
|
25
26
|
asChild: true,
|
|
@@ -32,7 +33,6 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
32
33
|
type: "text",
|
|
33
34
|
ref,
|
|
34
35
|
size,
|
|
35
|
-
dark,
|
|
36
36
|
...props
|
|
37
37
|
}),
|
|
38
38
|
/* @__PURE__ */ jsx(FieldAffix, {
|
|
@@ -41,7 +41,6 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
41
41
|
"aria-label": clearAriaLabel,
|
|
42
42
|
icon: true,
|
|
43
43
|
size,
|
|
44
|
-
dark,
|
|
45
44
|
variant: "text",
|
|
46
45
|
type: "reset",
|
|
47
46
|
children: /* @__PURE__ */ jsx(CrossSmallIcon, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","names":[],"sources":["../../../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { CrossSmallIcon, MagnifyingGlassIcon } from '@bi-digital/icons';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @default 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n
|
|
1
|
+
{"version":3,"file":"search.mjs","names":[],"sources":["../../../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { CrossSmallIcon, MagnifyingGlassIcon } from '@bi-digital/icons';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @default 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n style,\n fullwidth,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field\n className={clsx('bi-search', className)}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n asChild\n >\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnifyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} variant='text' type='reset'>\n <CrossSmallIcon size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,UAAU,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,OACA,WACA,cAAc,OACd,qBAAqB,aACrB,GAAG,YACc;CACjB,MAAM,gBAAgB,MAAwC;EAC5D,EAAE,gBAAgB;EAClB,IAAI,UAEF,SADc,EAAE,cAAc,cAAc,QAC9B,EAAE,SAAS,GAAG;;CAGhC,MAAM,oBAAoB;EACxB,IAAI,SACF,QAAQ,GAAG;;CAGf,OACE,oBAAC,OAAD;EACE,WAAW,KAAK,aAAa,UAAU;EACvC,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;YAEA,oBAAC,QAAD;GAAM,UAAU;GAAc,SAAS;aACrC,qBAAC,cAAD,EAAA,UAAA;IACE,oBAAC,YAAD,EAAA,UACE,oBAAC,qBAAD,EAA2B,MAAQ,CAAA,EACxB,CAAA;IACb,oBAAC,OAAD;KAAO,MAAK;KAAY;KAAW;KAAM,GAAI;KAAS,CAAA;IACtD,oBAAC,YAAD;KAAY,eAAY;eACtB,oBAAC,QAAD;MAAQ,cAAY;MAAgB,MAAA;MAAW;MAAM,SAAQ;MAAO,MAAK;gBACvE,oBAAC,gBAAD;OAAsB;OAAM,eAAY;OAAS,CAAA;MAC1C,CAAA;KACE,CAAA;IACA,EAAA,CAAA;GACV,CAAA;EACD,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Select, I as SelectProps, M as SelectOptgroupProps, N as SelectOption, P as SelectOptionProps, j as SelectOptgroup } from "../../alert-footer-
|
|
1
|
+
import { F as Select, I as SelectProps, M as SelectOptgroupProps, N as SelectOption, P as SelectOptionProps, j as SelectOptgroup } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { M as SelectOptgroupProps, j as SelectOptgroup } from "../../alert-footer-
|
|
1
|
+
import { M as SelectOptgroupProps, j as SelectOptgroup } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { SelectOptgroup, SelectOptgroupProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { N as SelectOption, P as SelectOptionProps } from "../../alert-footer-
|
|
1
|
+
import { N as SelectOption, P as SelectOptionProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { SelectOption, SelectOptionProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Select, I as SelectProps } from "../../alert-footer-
|
|
1
|
+
import { F as Select, I as SelectProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Select, SelectProps };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/select/select.tsx
|
|
4
|
-
const Select = ({ className,
|
|
4
|
+
const Select = ({ className, onKeyDown, onMouseDown, size, ref, ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx("select", {
|
|
6
6
|
className: clsx("bi-input", className),
|
|
7
|
-
"data-dark": dark,
|
|
8
7
|
"data-size": size,
|
|
9
8
|
ref,
|
|
10
9
|
onKeyDown: (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className,
|
|
1
|
+
{"version":3,"file":"select.mjs","names":[],"sources":["../../../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAmBA,MAAa,UAAU,EAAE,WAAW,WAAW,aAAa,MAAM,KAAK,GAAG,YAAyB;CACjG,OACE,oBAAC,UAAD;EACE,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACN;EACL,YAAY,UAAU;GACpB,IAAI,MAAM,QAAQ,OAAO;GACzB,IAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,YAAY,MAAM;;EAEpB,cAAc,UAAU;GACtB,IAAI,MAAM,UAAU,MAAM,gBAAgB;GAC1C,cAAc,MAAM;;EAEtB,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-
|
|
1
|
+
import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Selectfield, SelectfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-
|
|
1
|
+
import { A as SelectfieldProps, k as Selectfield } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Selectfield, SelectfieldProps };
|
|
@@ -10,7 +10,7 @@ import "../validation-message/index.mjs";
|
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useId } from "react";
|
|
12
12
|
//#region src/components/selectfield/selectfield.tsx
|
|
13
|
-
const Selectfield = ({ children,
|
|
13
|
+
const Selectfield = ({ children, label, description, error, style, className, fullwidth, ref, id: idProp, "data-color": color, "data-color-scheme": colorScheme, "aria-describedby": ariaDescribedByProp, ...props }) => {
|
|
14
14
|
const generatedId = useId();
|
|
15
15
|
const descriptionId = useId();
|
|
16
16
|
const validationId = useId();
|
|
@@ -22,7 +22,8 @@ const Selectfield = ({ children, dark, label, description, error, style, classNa
|
|
|
22
22
|
].join(" ").trim() || void 0;
|
|
23
23
|
return /* @__PURE__ */ jsxs(Field, {
|
|
24
24
|
className,
|
|
25
|
-
"data-
|
|
25
|
+
"data-color": color,
|
|
26
|
+
"data-color-scheme": colorScheme,
|
|
26
27
|
style,
|
|
27
28
|
fullwidth,
|
|
28
29
|
children: [
|
|
@@ -37,7 +38,6 @@ const Selectfield = ({ children, dark, label, description, error, style, classNa
|
|
|
37
38
|
/* @__PURE__ */ jsx(Select, {
|
|
38
39
|
id,
|
|
39
40
|
ref,
|
|
40
|
-
dark,
|
|
41
41
|
"aria-invalid": Boolean(error) || void 0,
|
|
42
42
|
"aria-describedby": ariaDescribedBy,
|
|
43
43
|
...props,
|