@bi-digital/react 0.12.2 → 0.12.4
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-Yb_zpMhd.d.mts → alert-footer-BoTu7E1s.d.mts} +194 -605
- package/dist/components/alert/alert-footer.d.mts +1 -1
- package/dist/components/alert/alert-footer.mjs.map +1 -1
- package/dist/components/alert/alert.d.mts +1 -1
- package/dist/components/alert/alert.mjs +1 -1
- package/dist/components/alert/alert.mjs.map +1 -1
- package/dist/components/alert/index.d.mts +2 -2
- package/dist/components/avatar/avatar.d.mts +1 -1
- package/dist/components/avatar/avatar.mjs.map +1 -1
- package/dist/components/avatar/index.d.mts +2 -2
- package/dist/components/badge/badge.d.mts +1 -1
- package/dist/components/badge/badge.mjs.map +1 -1
- package/dist/components/badge/index.d.mts +2 -2
- package/dist/components/button/button.d.mts +1 -1
- package/dist/components/button/button.mjs.map +1 -1
- package/dist/components/button/index.d.mts +2 -2
- package/dist/components/card/card-action.d.mts +1 -1
- 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-actions.mjs.map +1 -1
- package/dist/components/card/card-content.d.mts +1 -1
- package/dist/components/card/card-content.mjs.map +1 -1
- package/dist/components/card/card-date.d.mts +1 -1
- package/dist/components/card/card-date.mjs.map +1 -1
- package/dist/components/card/card-header.d.mts +1 -1
- package/dist/components/card/card-header.mjs.map +1 -1
- package/dist/components/card/card-media.d.mts +1 -1
- package/dist/components/card/card-media.mjs.map +1 -1
- package/dist/components/card/card.d.mts +1 -1
- package/dist/components/card/card.mjs.map +1 -1
- package/dist/components/card/index.d.mts +2 -2
- package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
- 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.map +1 -1
- package/dist/components/checkbox/index.d.mts +2 -2
- package/dist/components/chip/chip.d.mts +1 -1
- package/dist/components/chip/chip.mjs.map +1 -1
- package/dist/components/chip/index.d.mts +2 -2
- package/dist/components/details/details-content.d.mts +1 -1
- package/dist/components/details/details-content.mjs.map +1 -1
- package/dist/components/details/details-summary.d.mts +1 -1
- package/dist/components/details/details-summary.mjs.map +1 -1
- package/dist/components/details/details.d.mts +1 -1
- package/dist/components/details/details.mjs.map +1 -1
- package/dist/components/details/index.d.mts +2 -2
- package/dist/components/dialog/dialog-close-button.d.mts +1 -1
- package/dist/components/dialog/dialog-close-button.mjs.map +1 -1
- package/dist/components/dialog/dialog-content.d.mts +1 -1
- package/dist/components/dialog/dialog-content.mjs.map +1 -1
- package/dist/components/dialog/dialog-footer.d.mts +1 -1
- package/dist/components/dialog/dialog-footer.mjs.map +1 -1
- package/dist/components/dialog/dialog-header.d.mts +1 -1
- package/dist/components/dialog/dialog-header.mjs.map +1 -1
- package/dist/components/dialog/dialog-trigger-context.d.mts +1 -1
- package/dist/components/dialog/dialog-trigger-context.mjs.map +1 -1
- package/dist/components/dialog/dialog-trigger.d.mts +1 -1
- package/dist/components/dialog/dialog-trigger.mjs.map +1 -1
- package/dist/components/dialog/dialog.d.mts +1 -1
- package/dist/components/dialog/dialog.mjs.map +1 -1
- package/dist/components/dialog/index.d.mts +3 -3
- package/dist/components/dropdown/dropdown-button.d.mts +1 -1
- package/dist/components/dropdown/dropdown-button.mjs.map +1 -1
- package/dist/components/dropdown/dropdown-item.d.mts +1 -1
- package/dist/components/dropdown/dropdown-item.mjs.map +1 -1
- package/dist/components/dropdown/dropdown-list.d.mts +1 -1
- package/dist/components/dropdown/dropdown-list.mjs.map +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.mjs.map +1 -1
- package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger.mjs.map +1 -1
- package/dist/components/dropdown/dropdown.d.mts +1 -1
- package/dist/components/dropdown/dropdown.mjs.map +1 -1
- package/dist/components/dropdown/index.d.mts +4 -4
- package/dist/components/field/field-affix.d.mts +1 -1
- package/dist/components/field/field-affix.mjs.map +1 -1
- package/dist/components/field/field-description.d.mts +1 -1
- package/dist/components/field/field-description.mjs.map +1 -1
- package/dist/components/field/field.d.mts +1 -1
- package/dist/components/field/field.mjs.map +1 -1
- package/dist/components/field/index.d.mts +2 -2
- package/dist/components/fieldset/fieldset-description.d.mts +1 -1
- package/dist/components/fieldset/fieldset-description.mjs.map +1 -1
- package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
- 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.map +1 -1
- package/dist/components/fieldset/index.d.mts +2 -2
- package/dist/components/filter-group/filter-group.d.mts +1 -1
- package/dist/components/filter-group/filter-group.mjs.map +1 -1
- package/dist/components/filter-group/index.d.mts +2 -2
- package/dist/components/footer/footer-links.d.mts +1 -1
- package/dist/components/footer/footer-links.mjs.map +1 -1
- package/dist/components/footer/footer.d.mts +1 -1
- package/dist/components/footer/footer.mjs.map +1 -1
- package/dist/components/footer/index.d.mts +3 -3
- package/dist/components/index.d.mts +9 -9
- package/dist/components/input/index.d.mts +2 -2
- package/dist/components/input/input.d.mts +1 -1
- package/dist/components/input/input.mjs.map +1 -1
- package/dist/components/label/index.d.mts +2 -2
- package/dist/components/label/label.d.mts +1 -1
- package/dist/components/label/label.mjs.map +1 -1
- package/dist/components/link/index.d.mts +2 -2
- 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 +2 -2
- package/dist/components/logo/logo.d.mts +1 -1
- package/dist/components/logo/logo.mjs.map +1 -1
- package/dist/components/navbar/index.d.mts +2 -2
- package/dist/components/navbar/navbar.d.mts +1 -1
- 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.map +1 -1
- package/dist/components/pagination/index.d.mts +3 -3
- package/dist/components/pagination/pagination-button.d.mts +1 -1
- package/dist/components/pagination/pagination-button.mjs.map +1 -1
- package/dist/components/pagination/pagination-item.d.mts +1 -1
- package/dist/components/pagination/pagination-item.mjs.map +1 -1
- package/dist/components/pagination/pagination.d.mts +1 -1
- package/dist/components/pagination/pagination.mjs.map +1 -1
- package/dist/components/popover/index.d.mts +3 -3
- package/dist/components/popover/popover-trigger-context.d.mts +1 -1
- package/dist/components/popover/popover-trigger-context.mjs +2 -1
- package/dist/components/popover/popover-trigger-context.mjs.map +1 -1
- package/dist/components/popover/popover-trigger.d.mts +1 -1
- package/dist/components/popover/popover-trigger.mjs +9 -7
- package/dist/components/popover/popover-trigger.mjs.map +1 -1
- package/dist/components/popover/popover.d.mts +1 -1
- package/dist/components/popover/popover.mjs.map +1 -1
- package/dist/components/radio/index.d.mts +2 -2
- package/dist/components/radio/radio.d.mts +1 -1
- package/dist/components/radio/radio.mjs.map +1 -1
- package/dist/components/search/index.d.mts +2 -2
- package/dist/components/search/search.d.mts +1 -1
- package/dist/components/search/search.mjs.map +1 -1
- package/dist/components/select/index.d.mts +2 -2
- package/dist/components/select/select-optgroup.d.mts +1 -1
- package/dist/components/select/select-optgroup.mjs.map +1 -1
- package/dist/components/select/select-option.d.mts +1 -1
- package/dist/components/select/select-option.mjs.map +1 -1
- package/dist/components/select/select.d.mts +1 -1
- package/dist/components/select/select.mjs.map +1 -1
- package/dist/components/selectfield/index.d.mts +2 -2
- package/dist/components/selectfield/selectfield.d.mts +1 -1
- package/dist/components/selectfield/selectfield.mjs.map +1 -1
- package/dist/components/skip-link/index.d.mts +2 -2
- package/dist/components/skip-link/skip-link.d.mts +1 -1
- package/dist/components/skip-link/skip-link.mjs.map +1 -1
- package/dist/components/spinner/index.d.mts +2 -2
- package/dist/components/spinner/spinner.d.mts +1 -1
- package/dist/components/spinner/spinner.mjs +1 -2
- package/dist/components/spinner/spinner.mjs.map +1 -1
- package/dist/components/sticky-header/index.d.mts +3 -2
- package/dist/components/sticky-header/sticky-header.d.mts +1 -1
- package/dist/components/sticky-header/sticky-header.mjs.map +1 -1
- package/dist/components/switch/index.d.mts +2 -2
- package/dist/components/switch/switch.d.mts +1 -1
- package/dist/components/switch/switch.mjs.map +1 -1
- package/dist/components/tabs/index.d.mts +2 -2
- package/dist/components/tabs/tab.d.mts +1 -1
- package/dist/components/tabs/tab.mjs.map +1 -1
- package/dist/components/tabs/tabs-list.d.mts +1 -1
- package/dist/components/tabs/tabs-list.mjs.map +1 -1
- package/dist/components/tabs/tabs-panel.d.mts +1 -1
- package/dist/components/tabs/tabs-panel.mjs.map +1 -1
- package/dist/components/tabs/tabs.d.mts +1 -1
- package/dist/components/tabs/tabs.mjs.map +1 -1
- package/dist/components/textarea/index.d.mts +2 -2
- package/dist/components/textarea/textarea.d.mts +1 -1
- package/dist/components/textarea/textarea.mjs.map +1 -1
- package/dist/components/textfield/index.d.mts +2 -2
- package/dist/components/textfield/textfield.d.mts +1 -1
- package/dist/components/textfield/textfield.mjs.map +1 -1
- package/dist/components/tooltip/index.d.mts +2 -2
- package/dist/components/tooltip/tooltip.d.mts +1 -1
- package/dist/components/tooltip/tooltip.mjs.map +1 -1
- package/dist/components/validation-message/index.d.mts +2 -2
- package/dist/components/validation-message/validation-message.d.mts +1 -1
- package/dist/components/validation-message/validation-message.mjs.map +1 -1
- package/dist/{dialog-trigger-context-DbUhxoNL.d.mts → dialog-trigger-context-Orqo_NHj.d.mts} +3 -8
- package/dist/{dropdown-item-bA64wFOZ.d.mts → dropdown-item-B6Ahk6en.d.mts} +2 -7
- package/dist/{dropdown-list-CaYz-O1j.d.mts → dropdown-list-CXM9VhRl.d.mts} +2 -7
- package/dist/{footer-links-DwBghNrz.d.mts → footer-links-Dk977Qoi.d.mts} +2 -9
- package/dist/index-CaxrMD1A.d.mts +1 -0
- package/dist/index-Dqg5-Rt-.d.mts +1 -0
- package/dist/main.d.mts +15 -15
- package/dist/{pagination-item-DJicBrIN.d.mts → pagination-item-DqbKxAHU.d.mts} +2 -9
- package/dist/{popover-trigger-context-BLjAozBn.d.mts → popover-trigger-context-DeCbAC6V.d.mts} +3 -10
- package/dist/react-types.d.ts +43 -1
- package/dist/{sticky-header-CVfE0TUC.d.mts → sticky-header-BXlBWEWo.d.mts} +2 -6
- package/dist/{types-C0q7hMe_.d.mts → types-BoBDvyAZ.d.mts} +1 -2
- package/dist/{types-74lJC5tL.d.mts → types-oMo2uOVa.d.mts} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/{useCheckboxGroup-Boc_tLJ3.d.mts → useCheckboxGroup-BTzX7PfS.d.mts} +4 -7
- package/dist/{useIsElementAboveViewport-Cxt9TwLS.d.mts → useIsElementAboveViewport-Db7ndg3S.d.mts} +1 -2
- package/dist/{useIsomorphicLayoutEffect-DXCY5AxR.d.mts → useIsomorphicLayoutEffect-D-Mi76vH.d.mts} +1 -2
- package/dist/{useMediaQuery-Di0fXraw.d.mts → useMediaQuery-c1R0kas_.d.mts} +2 -5
- package/dist/{useScrollDirection-6pq5a8B3.d.mts → useScrollDirection-DS9Rfs_K.d.mts} +1 -1
- package/dist/utilities/hooks/index.d.mts +7 -7
- package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.mts +1 -1
- package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.mjs.map +1 -1
- package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.d.mts +1 -1
- package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.mjs.map +1 -1
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.mts +1 -1
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.d.mts +1 -1
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.mjs +2 -4
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.mjs.map +1 -1
- package/dist/utilities/hooks/useMergeRefs/useMergeRefs.d.mts +0 -1
- package/dist/utilities/hooks/useMergeRefs/useMergeRefs.mjs.map +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.mjs.map +1 -1
- package/dist/utilities/hooks/useScrollDirection/useScrollDirection.d.mts +1 -1
- package/dist/utilities/hooks/useScrollDirection/useScrollDirection.mjs.map +1 -1
- package/dist/utilities/index.d.mts +8 -8
- package/dist/utilities/types.d.mts +1 -1
- package/dist/vanilla/dropdown/index.d.mts +3 -9
- package/dist/vanilla/dropdown/index.mjs.map +1 -1
- package/dist/vanilla/index.d.mts +1 -0
- package/dist/vanilla/popover/index.d.mts +3 -9
- package/dist/vanilla/popover/index.mjs +1 -3
- package/dist/vanilla/popover/index.mjs.map +1 -1
- package/dist/vanilla/sub-navbar/index.d.mts +1 -3
- package/dist/vanilla/sub-navbar/index.mjs.map +1 -1
- package/dist/vanilla/tooltip/index.d.mts +1 -1
- package/dist/vanilla/tooltip/index.mjs.map +1 -1
- package/dist/vite-env.d.mts +1 -1
- package/package.json +19 -19
- package/dist/index-D9zIjQH9.d.mts +0 -1
- package/dist/index-Dc-SdpIe.d.mts +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as AlertFooterProps, t as AlertFooter } from "../../alert-footer-
|
|
1
|
+
import { n as AlertFooterProps, t as AlertFooter } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { AlertFooter, AlertFooterProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-footer.mjs","names":[],"sources":["../../../src/components/alert/alert-footer.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\n\nexport type AlertFooterProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\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\nexport const AlertFooter = ({ className, children, asChild, ref, ...rest }: AlertFooterProps) => {\n const Component = asChild ? Slot : 'div';\n return (\n <Component className={clsx('bi-alert--footer', className)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAiBA,MAAa,eAAe,EAAE,WAAW,UAAU,SAAS,KAAK,GAAG,WAA6B;CAE/F,OACE,oBAFgB,UAAU,OAAO,OAEjC;EAAW,WAAW,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"alert-footer.mjs","names":[],"sources":["../../../src/components/alert/alert-footer.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\n\nexport type AlertFooterProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\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\nexport const AlertFooter = ({ className, children, asChild, ref, ...rest }: AlertFooterProps) => {\n const Component = asChild ? Slot : 'div';\n return (\n <Component className={clsx('bi-alert--footer', className)} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAiBA,MAAa,eAAe,EAAE,WAAW,UAAU,SAAS,KAAK,GAAG,WAA6B;CAE/F,OACE,oBAFgB,UAAU,OAAO,OAEjC;EAAW,WAAW,KAAK,oBAAoB,SAAS;EAAQ;EAAK,GAAI;EACtE;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cn as Alert, wn as AlertProps } from "../../alert-footer-
|
|
1
|
+
import { Cn as Alert, wn as AlertProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Alert, AlertProps };
|
|
@@ -13,7 +13,7 @@ const colorIcons = {
|
|
|
13
13
|
};
|
|
14
14
|
const Alert = ({ className, children, closeButton, "data-color": color = "primary", icon, asChild, size, ref, ...rest }) => {
|
|
15
15
|
const Component = asChild ? Slot : "div";
|
|
16
|
-
const DefaultIcon = colorIcons[color];
|
|
16
|
+
const DefaultIcon = colorIcons[color] ?? InfoIcon;
|
|
17
17
|
return /* @__PURE__ */ jsxs(Component, {
|
|
18
18
|
className: clsx("bi-alert", className),
|
|
19
19
|
"data-color": color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from '@bi-digital/icons';\n\nexport type AlertProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Size of the alert.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Custom close button. It's your responsibility to make the button close the alert. */\n closeButton?: ReactNode;\n /** Override the default icon which is decided by the `variant`. Set to `null` to remove the icon. */\n icon?: 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<HTMLDivElement>;\n }\n>;\n\nconst colorIcons: Record<NonNullable<AlertProps['data-color']>, React.ComponentType> = {\n info: InfoIcon,\n success: SuccessIcon,\n warning: WarningIcon,\n alert: ErrorIcon,\n primary: InfoIcon,\n neutral: InfoIcon,\n};\n\nexport const Alert = ({\n className,\n children,\n closeButton,\n 'data-color': color = 'primary',\n icon,\n asChild,\n size,\n ref,\n ...rest\n}: AlertProps) => {\n const Component = asChild ? Slot : 'div';\n const DefaultIcon = colorIcons[color];\n return (\n <Component className={clsx('bi-alert', className)} data-color={color} data-size={size} ref={ref} {...rest}>\n {icon === null ? null : (icon ?? <DefaultIcon />)}\n {children}\n {closeButton}\n </Component>\n );\n};\n"],"mappings":";;;;;AA4BA,MAAM,aAAiF;CACrF,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;
|
|
1
|
+
{"version":3,"file":"alert.mjs","names":[],"sources":["../../../src/components/alert/alert.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from '@bi-digital/icons';\n\nexport type AlertProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Size of the alert.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Custom close button. It's your responsibility to make the button close the alert. */\n closeButton?: ReactNode;\n /** Override the default icon which is decided by the `variant`. Set to `null` to remove the icon. */\n icon?: 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<HTMLDivElement>;\n }\n>;\n\nconst colorIcons: Record<NonNullable<AlertProps['data-color']>, React.ComponentType> = {\n info: InfoIcon,\n success: SuccessIcon,\n warning: WarningIcon,\n alert: ErrorIcon,\n primary: InfoIcon,\n neutral: InfoIcon,\n};\n\nexport const Alert = ({\n className,\n children,\n closeButton,\n 'data-color': color = 'primary',\n icon,\n asChild,\n size,\n ref,\n ...rest\n}: AlertProps) => {\n const Component = asChild ? Slot : 'div';\n // A custom color set added by a consumer has no entry here, so fall back to\n // the neutral icon rather than rendering nothing.\n const DefaultIcon = colorIcons[color] ?? InfoIcon;\n return (\n <Component className={clsx('bi-alert', className)} data-color={color} data-size={size} ref={ref} {...rest}>\n {icon === null ? null : (icon ?? <DefaultIcon />)}\n {children}\n {closeButton}\n </Component>\n );\n};\n"],"mappings":";;;;;AA4BA,MAAM,aAAiF;CACrF,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;CACT,SAAS;AACX;AAEA,MAAa,SAAS,EACpB,WACA,UACA,aACA,cAAc,QAAQ,WACtB,MACA,SACA,MACA,KACA,GAAG,WACa;CAChB,MAAM,YAAY,UAAU,OAAO;CAGnC,MAAM,cAAc,WAAW,UAAU;CACzC,OACE,qBAAC,WAAD;EAAW,WAAW,KAAK,YAAY,SAAS;EAAG,cAAY;EAAO,aAAW;EAAW;EAAK,GAAI;EAArG,UAAA;GACG,SAAS,OAAO,OAAQ,QAAQ,oBAAC,aAAD,CAAc,CAAA;GAC9C;GACA;EACQ;;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cn as Alert, n as AlertFooterProps, t as AlertFooter, wn as AlertProps } from "../../alert-footer-
|
|
2
|
-
export { Alert, AlertFooter, AlertFooterProps, AlertProps };
|
|
1
|
+
import { Cn as Alert, n as AlertFooterProps, t as AlertFooter, wn as AlertProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Alert, AlertFooter, type AlertFooterProps, type AlertProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Sn as AvatarProps, xn as Avatar } from "../../alert-footer-
|
|
1
|
+
import { Sn as AvatarProps, xn as Avatar } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Avatar, AvatarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.mjs","names":[],"sources":["../../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { Fragment, type HTMLAttributes, type Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type AvatarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * Name of the person the avatar represents.\n */\n 'aria-label': string;\n /**\n * Size of the avatar.\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * An Avatar represents a person.\n *\n * @example\n * <Avatar aria-label=\"Ola Nordmann\">ON</Avatar>\n *\n * @example\n * <Avatar aria-label=\"Ola Nordmann\">\n * <img src='…' alt='Ola Nordmann' />\n * </Avatar>\n */\nexport const Avatar = ({ 'aria-label': ariaLabel, className, ref, size, children, ...props }: AvatarProps) => {\n const isSlotInUse = children && typeof children !== 'string';\n const Component = isSlotInUse ? Slot : Fragment;\n return (\n <span\n className={clsx('bi-avatar', className)}\n aria-label={ariaLabel}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role='img'\n data-size={size}\n ref={ref}\n {...props}\n >\n <Component {...(isSlotInUse ? { 'aria-hidden': true } : {})}>{children}</Component>\n </span>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiCA,MAAa,UAAU,EAAE,cAAc,WAAW,WAAW,KAAK,MAAM,UAAU,GAAG,YAAyB;CAC5G,MAAM,cAAc,YAAY,OAAO,aAAa;CACpD,MAAM,YAAY,cAAc,OAAO;CACvC,OACE,oBAAC,QAAD;EACE,WAAW,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"avatar.mjs","names":[],"sources":["../../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { Fragment, type HTMLAttributes, type Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type AvatarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * Name of the person the avatar represents.\n */\n 'aria-label': string;\n /**\n * Size of the avatar.\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * An Avatar represents a person.\n *\n * @example\n * <Avatar aria-label=\"Ola Nordmann\">ON</Avatar>\n *\n * @example\n * <Avatar aria-label=\"Ola Nordmann\">\n * <img src='…' alt='Ola Nordmann' />\n * </Avatar>\n */\nexport const Avatar = ({ 'aria-label': ariaLabel, className, ref, size, children, ...props }: AvatarProps) => {\n const isSlotInUse = children && typeof children !== 'string';\n const Component = isSlotInUse ? Slot : Fragment;\n return (\n <span\n className={clsx('bi-avatar', className)}\n aria-label={ariaLabel}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role\n role='img'\n data-size={size}\n ref={ref}\n {...props}\n >\n <Component {...(isSlotInUse ? { 'aria-hidden': true } : {})}>{children}</Component>\n </span>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiCA,MAAa,UAAU,EAAE,cAAc,WAAW,WAAW,KAAK,MAAM,UAAU,GAAG,YAAyB;CAC5G,MAAM,cAAc,YAAY,OAAO,aAAa;CACpD,MAAM,YAAY,cAAc,OAAO;CACvC,OACE,oBAAC,QAAD;EACE,WAAW,KAAK,aAAa,SAAS;EACtC,cAAY;EAEZ,MAAK;EACL,aAAW;EACN;EACL,GAAI;EAEJ,UAAA,oBAAC,WAAD;GAAW,GAAK,cAAc,EAAE,eAAe,KAAK,IAAI,CAAC;GAAK;EAAoB,CAAA;CAC9E,CAAA;AAEV"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Sn as AvatarProps, xn as Avatar } from "../../alert-footer-
|
|
2
|
-
export { Avatar, AvatarProps };
|
|
1
|
+
import { Sn as AvatarProps, xn as Avatar } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Avatar, type AvatarProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { bn as BadgeProps, yn as Badge } from "../../alert-footer-
|
|
1
|
+
import { bn as BadgeProps, yn as Badge } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Badge, BadgeProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.mjs","names":[],"sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import { HTMLAttributes, Ref } from 'react';\nimport { AsChildProps, DefaultProps } from '../../types';\nimport { MergeRight } from '../../utilities';\nimport { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\n\nexport type BadgeProps = MergeRight<\n DefaultProps & AsChildProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * Size of the badge.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium';\n /**\n * Makes the badge have the same height/width. Use for single-letter badges.\n * @default false\n */\n singleLetter?: boolean;\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Badge = ({\n className,\n children,\n size = 'medium',\n singleLetter = false,\n asChild,\n ref,\n ...props\n}: BadgeProps) => {\n const Component = asChild ? Slot : 'span';\n\n return (\n <Component\n className={clsx('bi-badge', className)}\n data-size={size}\n data-single-letter={singleLetter}\n ref={ref}\n {...props}\n >\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAuBA,MAAa,SAAS,EACpB,WACA,UACA,OAAO,UACP,eAAe,OACf,SACA,KACA,GAAG,YACa;CAGhB,OACE,oBAHgB,UAAU,OAAO,QAGjC;EACE,WAAW,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"badge.mjs","names":[],"sources":["../../../src/components/badge/badge.tsx"],"sourcesContent":["import { HTMLAttributes, Ref } from 'react';\nimport { AsChildProps, DefaultProps } from '../../types';\nimport { MergeRight } from '../../utilities';\nimport { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\n\nexport type BadgeProps = MergeRight<\n DefaultProps & AsChildProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * Size of the badge.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium';\n /**\n * Makes the badge have the same height/width. Use for single-letter badges.\n * @default false\n */\n singleLetter?: boolean;\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Badge = ({\n className,\n children,\n size = 'medium',\n singleLetter = false,\n asChild,\n ref,\n ...props\n}: BadgeProps) => {\n const Component = asChild ? Slot : 'span';\n\n return (\n <Component\n className={clsx('bi-badge', className)}\n data-size={size}\n data-single-letter={singleLetter}\n ref={ref}\n {...props}\n >\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAuBA,MAAa,SAAS,EACpB,WACA,UACA,OAAO,UACP,eAAe,OACf,SACA,KACA,GAAG,YACa;CAGhB,OACE,oBAHgB,UAAU,OAAO,QAGjC;EACE,WAAW,KAAK,YAAY,SAAS;EACrC,aAAW;EACX,sBAAoB;EACf;EACL,GAAI;EAEH;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { bn as BadgeProps, yn as Badge } from "../../alert-footer-
|
|
2
|
-
export { Badge, BadgeProps };
|
|
1
|
+
import { bn as BadgeProps, yn as Badge } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Badge, type BadgeProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _n as Button, vn as ButtonProps } from "../../alert-footer-
|
|
1
|
+
import { _n as Button, vn as ButtonProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Button, ButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","names":[],"sources":["../../../src/components/button/button.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { Spinner } from '../spinner';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type ButtonProps = MergeRight<\n DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>,\n {\n /**\n * The button size.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The button variant.\n * @default 'filled'\n */\n variant?: 'filled' | 'outlined' | 'text' | 'flat';\n /**\n * Stretch the button to the full width.\n * @default false\n */\n fullwidth?: boolean;\n /**\n * Display a loading animation with the Spinner-component.\n * Replaces the `startIcon` if used\n * @default false\n */\n submitting?: boolean;\n /**\n * Display as icon-button, only use when showing an icon as the label.\n * Not compatible with the `startIcon`, `endIcon` and `fullwidth` props.\n * Always provide a descriptive aria-label for accessibility when set to true.\n * @default false\n */\n icon?: boolean;\n /** Set an icon before the button label, no effect if `icon=true` */\n startIcon?: ReactNode;\n /** Set an icon after the button label, no effect if `icon=true` */\n endIcon?: ReactNode;\n /** Skew the button */\n skewed?: 'start' | 'end';\n /** Make the button active by showing an active state. */\n active?: boolean;\n ref?: Ref<HTMLButtonElement>;\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 /**\n * Specify the type of button. Unset when `asChild` is true\n * @default 'button'\n */\n type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];\n }\n>;\n\nexport const Button = ({\n asChild,\n variant = 'filled',\n size = 'medium',\n fullwidth,\n submitting,\n icon,\n children,\n className,\n startIcon,\n endIcon,\n skewed,\n active,\n ref,\n ...props\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button';\n\n return (\n <Component\n aria-busy={Boolean(submitting) || undefined}\n aria-disabled={Boolean(submitting) || undefined}\n className={clsx('bi-button', className)}\n data-variant={variant}\n data-size={size}\n data-fullwidth={fullwidth || undefined}\n data-icon={icon || undefined}\n data-active={active || undefined}\n data-skewed={skewed || undefined}\n ref={ref}\n /* don't set type when we use `asChild` */\n type={asChild ? undefined : 'button'}\n /* if consumers set type, our default does not set anything, as `rest` contains this */\n {...props}\n >\n {!icon &&\n (submitting ? (\n <Spinner aria-hidden='true' className='bi-button--start-icon' />\n ) : (\n startIcon && <span className='bi-button--start-icon'>{startIcon}</span>\n ))}\n <Slottable>{icon && submitting ? <Spinner aria-hidden='true' /> : children}</Slottable>\n {!icon && endIcon && <span className='bi-button--end-icon'>{endIcon}</span>}\n </Component>\n );\n};\n"],"mappings":";;;;;;AA4DA,MAAa,UAAU,EACrB,SACA,UAAU,UACV,OAAO,UACP,WACA,YACA,MACA,UACA,WACA,WACA,SACA,QACA,QACA,KACA,GAAG,YACc;CAGjB,OACE,qBAHgB,UAAU,OAAO,UAGjC;EACE,aAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"button.mjs","names":[],"sources":["../../../src/components/button/button.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { ButtonHTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { Spinner } from '../spinner';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type ButtonProps = MergeRight<\n DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>,\n {\n /**\n * The button size.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The button variant.\n * @default 'filled'\n */\n variant?: 'filled' | 'outlined' | 'text' | 'flat';\n /**\n * Stretch the button to the full width.\n * @default false\n */\n fullwidth?: boolean;\n /**\n * Display a loading animation with the Spinner-component.\n * Replaces the `startIcon` if used\n * @default false\n */\n submitting?: boolean;\n /**\n * Display as icon-button, only use when showing an icon as the label.\n * Not compatible with the `startIcon`, `endIcon` and `fullwidth` props.\n * Always provide a descriptive aria-label for accessibility when set to true.\n * @default false\n */\n icon?: boolean;\n /** Set an icon before the button label, no effect if `icon=true` */\n startIcon?: ReactNode;\n /** Set an icon after the button label, no effect if `icon=true` */\n endIcon?: ReactNode;\n /** Skew the button */\n skewed?: 'start' | 'end';\n /** Make the button active by showing an active state. */\n active?: boolean;\n ref?: Ref<HTMLButtonElement>;\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 /**\n * Specify the type of button. Unset when `asChild` is true\n * @default 'button'\n */\n type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];\n }\n>;\n\nexport const Button = ({\n asChild,\n variant = 'filled',\n size = 'medium',\n fullwidth,\n submitting,\n icon,\n children,\n className,\n startIcon,\n endIcon,\n skewed,\n active,\n ref,\n ...props\n}: ButtonProps) => {\n const Component = asChild ? Slot : 'button';\n\n return (\n <Component\n aria-busy={Boolean(submitting) || undefined}\n aria-disabled={Boolean(submitting) || undefined}\n className={clsx('bi-button', className)}\n data-variant={variant}\n data-size={size}\n data-fullwidth={fullwidth || undefined}\n data-icon={icon || undefined}\n data-active={active || undefined}\n data-skewed={skewed || undefined}\n ref={ref}\n /* don't set type when we use `asChild` */\n type={asChild ? undefined : 'button'}\n /* if consumers set type, our default does not set anything, as `rest` contains this */\n {...props}\n >\n {!icon &&\n (submitting ? (\n <Spinner aria-hidden='true' className='bi-button--start-icon' />\n ) : (\n startIcon && <span className='bi-button--start-icon'>{startIcon}</span>\n ))}\n <Slottable>{icon && submitting ? <Spinner aria-hidden='true' /> : children}</Slottable>\n {!icon && endIcon && <span className='bi-button--end-icon'>{endIcon}</span>}\n </Component>\n );\n};\n"],"mappings":";;;;;;AA4DA,MAAa,UAAU,EACrB,SACA,UAAU,UACV,OAAO,UACP,WACA,YACA,MACA,UACA,WACA,WACA,SACA,QACA,QACA,KACA,GAAG,YACc;CAGjB,OACE,qBAHgB,UAAU,OAAO,UAGjC;EACE,aAAW,QAAQ,UAAU,KAAK,KAAA;EAClC,iBAAe,QAAQ,UAAU,KAAK,KAAA;EACtC,WAAW,KAAK,aAAa,SAAS;EACtC,gBAAc;EACd,aAAW;EACX,kBAAgB,aAAa,KAAA;EAC7B,aAAW,QAAQ,KAAA;EACnB,eAAa,UAAU,KAAA;EACvB,eAAa,UAAU,KAAA;EAClB;EAEL,MAAM,UAAU,KAAA,IAAY;EAE5B,GAAI;EAdN,UAAA;GAgBG,CAAC,SACC,aACC,oBAAC,SAAD;IAAS,eAAY;IAAO,WAAU;GAAyB,CAAA,IAE/D,aAAa,oBAAC,QAAD;IAAM,WAAU;IAAyB,UAAA;GAAgB,CAAA;GAE1E,oBAAC,WAAD,EAAA,UAAY,QAAQ,aAAa,oBAAC,SAAD,EAAS,eAAY,OAAQ,CAAA,IAAI,SAAoB,CAAA;GACrF,CAAC,QAAQ,WAAW,oBAAC,QAAD;IAAM,WAAU;IAAuB,UAAA;GAAc,CAAA;EACjE;;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _n as Button, vn as ButtonProps } from "../../alert-footer-
|
|
2
|
-
export { Button, ButtonProps };
|
|
1
|
+
import { _n as Button, vn as ButtonProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Button, type ButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { dn as CardAction, fn as CardActionProps } from "../../alert-footer-
|
|
1
|
+
import { dn as CardAction, fn as CardActionProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardAction, CardActionProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-action.mjs","names":[],"sources":["../../../src/components/card/card-action.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Button, type ButtonProps } from '../button';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type CardActionProps = ButtonProps;\n\nexport const CardAction = ({ asChild, ref, children, className, ...props }: CardActionProps) => {\n const Component = asChild ? Slot : Button;\n return (\n <Component variant='text' size='large' icon className={clsx('bi-card--action', className)} ref={ref} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAMA,MAAa,cAAc,EAAE,SAAS,KAAK,UAAU,WAAW,GAAG,YAA6B;CAE9F,OACE,oBAFgB,UAAU,OAAO,QAEjC;EAAW,SAAQ;EAAO,MAAK;EAAQ,MAAA;EAAK,WAAW,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"card-action.mjs","names":[],"sources":["../../../src/components/card/card-action.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Button, type ButtonProps } from '../button';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type CardActionProps = ButtonProps;\n\nexport const CardAction = ({ asChild, ref, children, className, ...props }: CardActionProps) => {\n const Component = asChild ? Slot : Button;\n return (\n <Component variant='text' size='large' icon className={clsx('bi-card--action', className)} ref={ref} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAMA,MAAa,cAAc,EAAE,SAAS,KAAK,UAAU,WAAW,GAAG,YAA6B;CAE9F,OACE,oBAFgB,UAAU,OAAO,QAEjC;EAAW,SAAQ;EAAO,MAAK;EAAQ,MAAA;EAAK,WAAW,KAAK,mBAAmB,SAAS;EAAQ;EAAK,GAAI;EACtG;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { mn as CardActionsProps, pn as CardActions } from "../../alert-footer-
|
|
1
|
+
import { mn as CardActionsProps, pn as CardActions } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardActions, CardActionsProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-actions.mjs","names":[],"sources":["../../../src/components/card/card-actions.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardActionsProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardActions = ({ className, ref, children, ...props }: CardActionsProps) => {\n return (\n <div className={clsx('bi-card--actions', className)} ref={ref} {...props}>\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAWA,MAAa,eAAe,EAAE,WAAW,KAAK,UAAU,GAAG,YAA8B;CACvF,OACE,oBAAC,OAAD;EAAK,WAAW,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"card-actions.mjs","names":[],"sources":["../../../src/components/card/card-actions.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardActionsProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardActions = ({ className, ref, children, ...props }: CardActionsProps) => {\n return (\n <div className={clsx('bi-card--actions', className)} ref={ref} {...props}>\n {children}\n </div>\n );\n};\n"],"mappings":";;;AAWA,MAAa,eAAe,EAAE,WAAW,KAAK,UAAU,GAAG,YAA8B;CACvF,OACE,oBAAC,OAAD;EAAK,WAAW,KAAK,oBAAoB,SAAS;EAAQ;EAAK,GAAI;EAChE;CACE,CAAA;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ln as CardContent, un as CardContentProps } from "../../alert-footer-
|
|
1
|
+
import { ln as CardContent, un as CardContentProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardContent, CardContentProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-content.mjs","names":[],"sources":["../../../src/components/card/card-content.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type CardContentProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\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
|
|
1
|
+
{"version":3,"file":"card-content.mjs","names":[],"sources":["../../../src/components/card/card-content.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type CardContentProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\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\nexport const CardContent = ({ className, ref, children, asChild, ...props }: CardContentProps) => {\n const Component = asChild ? Slot : 'div';\n return (\n <Component className={clsx('bi-card--content', className)} ref={ref} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAiBA,MAAa,eAAe,EAAE,WAAW,KAAK,UAAU,SAAS,GAAG,YAA8B;CAEhG,OACE,oBAFgB,UAAU,OAAO,OAEjC;EAAW,WAAW,KAAK,oBAAoB,SAAS;EAAQ;EAAK,GAAI;EACtE;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { in as CardDateProps, rn as CardDate } from "../../alert-footer-
|
|
1
|
+
import { in as CardDateProps, rn as CardDate } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardDate, CardDateProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-date.mjs","names":[],"sources":["../../../src/components/card/card-date.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardDateProps = MergeRight<\n Omit<HTMLAttributes<HTMLParagraphElement>, 'children'>,\n {\n /**\n * The day of the month.\n */\n day: number;\n /**\n * The month, should be a short string like \"Jan\", \"Feb\", etc.\n */\n month: string;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const CardDate = ({ className, ref, day, month, ...props }: CardDateProps) => {\n return (\n <p className={clsx('bi-card--date', className)} ref={ref} {...props}>\n {day}\n <span>{month}</span>\n </p>\n );\n};\n"],"mappings":";;;AAmBA,MAAa,YAAY,EAAE,WAAW,KAAK,KAAK,OAAO,GAAG,YAA2B;CACnF,OACE,qBAAC,KAAD;EAAG,WAAW,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"card-date.mjs","names":[],"sources":["../../../src/components/card/card-date.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardDateProps = MergeRight<\n Omit<HTMLAttributes<HTMLParagraphElement>, 'children'>,\n {\n /**\n * The day of the month.\n */\n day: number;\n /**\n * The month, should be a short string like \"Jan\", \"Feb\", etc.\n */\n month: string;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const CardDate = ({ className, ref, day, month, ...props }: CardDateProps) => {\n return (\n <p className={clsx('bi-card--date', className)} ref={ref} {...props}>\n {day}\n <span>{month}</span>\n </p>\n );\n};\n"],"mappings":";;;AAmBA,MAAa,YAAY,EAAE,WAAW,KAAK,KAAK,OAAO,GAAG,YAA2B;CACnF,OACE,qBAAC,KAAD;EAAG,WAAW,KAAK,iBAAiB,SAAS;EAAQ;EAAK,GAAI;EAA9D,UAAA,CACG,KACD,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,CAClB;;AAEP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { cn as CardHeaderProps, sn as CardHeader } from "../../alert-footer-
|
|
1
|
+
import { cn as CardHeaderProps, sn as CardHeader } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardHeader, CardHeaderProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-header.mjs","names":[],"sources":["../../../src/components/card/card-header.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx';\n\nexport type CardHeaderProps = MergeRight<\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n {\n /**\n * The header of the card\n */\n header?: ReactNode;\n /**\n * The label of the card, displayed above the header\n */\n label?: ReactNode;\n /**\n * The sublabel of the card, displayed next to the label\n */\n subLabel?: ReactNode;\n /**\n * The description of the card, displayed below the header\n */\n description?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardHeader = ({ className, ref, header, label, subLabel, description, ...props }: CardHeaderProps) => {\n return (\n <div className={clsx('bi-card--header', className)} ref={ref} {...props}>\n {(label || subLabel) && (\n <p className='bi-card--header-label'>\n {label && <span className='bi-card--header-bold'>{label}</span>}\n {label && subLabel && <span aria-hidden='true' className='bi-card--header-dot'></span>}\n {subLabel && <span>{subLabel}</span>}\n </p>\n )}\n {header && <h3 className='bi-card--header-title'>{header}</h3>}\n {description && <p className='bi-card--header-label'>{description}</p>}\n </div>\n );\n};\n"],"mappings":";;;AA2BA,MAAa,cAAc,EAAE,WAAW,KAAK,QAAQ,OAAO,UAAU,aAAa,GAAG,YAA6B;CACjH,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,mBAAmB,
|
|
1
|
+
{"version":3,"file":"card-header.mjs","names":[],"sources":["../../../src/components/card/card-header.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx';\n\nexport type CardHeaderProps = MergeRight<\n Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n {\n /**\n * The header of the card\n */\n header?: ReactNode;\n /**\n * The label of the card, displayed above the header\n */\n label?: ReactNode;\n /**\n * The sublabel of the card, displayed next to the label\n */\n subLabel?: ReactNode;\n /**\n * The description of the card, displayed below the header\n */\n description?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardHeader = ({ className, ref, header, label, subLabel, description, ...props }: CardHeaderProps) => {\n return (\n <div className={clsx('bi-card--header', className)} ref={ref} {...props}>\n {(label || subLabel) && (\n <p className='bi-card--header-label'>\n {label && <span className='bi-card--header-bold'>{label}</span>}\n {label && subLabel && <span aria-hidden='true' className='bi-card--header-dot'></span>}\n {subLabel && <span>{subLabel}</span>}\n </p>\n )}\n {header && <h3 className='bi-card--header-title'>{header}</h3>}\n {description && <p className='bi-card--header-label'>{description}</p>}\n </div>\n );\n};\n"],"mappings":";;;AA2BA,MAAa,cAAc,EAAE,WAAW,KAAK,QAAQ,OAAO,UAAU,aAAa,GAAG,YAA6B;CACjH,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,mBAAmB,SAAS;EAAQ;EAAK,GAAI;EAAlE,UAAA;IACI,SAAS,aACT,qBAAC,KAAD;IAAG,WAAU;IAAb,UAAA;KACG,SAAS,oBAAC,QAAD;MAAM,WAAU;MAAwB,UAAA;KAAY,CAAA;KAC7D,SAAS,YAAY,oBAAC,QAAD;MAAM,eAAY;MAAO,WAAU;KAA4B,CAAA;KACpF,YAAY,oBAAC,QAAD,EAAA,UAAO,SAAe,CAAA;IAClC;;GAEJ,UAAU,oBAAC,MAAD;IAAI,WAAU;IAAyB,UAAA;GAAW,CAAA;GAC5D,eAAe,oBAAC,KAAD;IAAG,WAAU;IAAyB,UAAA;GAAe,CAAA;EAClE;;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { an as CardMedia, on as CardMediaProps } from "../../alert-footer-
|
|
1
|
+
import { an as CardMedia, on as CardMediaProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CardMedia, CardMediaProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-media.mjs","names":[],"sources":["../../../src/components/card/card-media.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardMediaProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The media to display. Must be audio, figure, iframe, img or video-tag to get correct styles.\n */\n children?: ReactNode;\n /**\n * Optional content to overlay on top of the media.\n */\n overlay?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardMedia = ({ className, ref, children, overlay, ...props }: CardMediaProps) => {\n return (\n <div className={clsx('bi-card--media', className)} ref={ref} {...props}>\n {children}\n <div className='bi-card--media-overlay'>{overlay}</div>\n </div>\n );\n};\n"],"mappings":";;;AAmBA,MAAa,aAAa,EAAE,WAAW,KAAK,UAAU,SAAS,GAAG,YAA4B;CAC5F,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"card-media.mjs","names":[],"sources":["../../../src/components/card/card-media.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\n\nexport type CardMediaProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The media to display. Must be audio, figure, iframe, img or video-tag to get correct styles.\n */\n children?: ReactNode;\n /**\n * Optional content to overlay on top of the media.\n */\n overlay?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const CardMedia = ({ className, ref, children, overlay, ...props }: CardMediaProps) => {\n return (\n <div className={clsx('bi-card--media', className)} ref={ref} {...props}>\n {children}\n <div className='bi-card--media-overlay'>{overlay}</div>\n </div>\n );\n};\n"],"mappings":";;;AAmBA,MAAa,aAAa,EAAE,WAAW,KAAK,UAAU,SAAS,GAAG,YAA4B;CAC5F,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,kBAAkB,SAAS;EAAQ;EAAK,GAAI;EAAjE,UAAA,CACG,UACD,oBAAC,OAAD;GAAK,WAAU;GAA0B,UAAA;EAAa,CAAA,CACnD;;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { gn as CardProps, hn as Card } from "../../alert-footer-
|
|
1
|
+
import { gn as CardProps, hn as Card } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Card, CardProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.mjs","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\n\nexport type CardProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The orientation of the card\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n error?: 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\nexport const Card = ({\n orientation = 'horizontal',\n error = false,\n className,\n ref,\n children,\n asChild,\n ...props\n}: CardProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-card', className)}\n data-orientation={orientation}\n data-error={error}\n ref={ref}\n {...props}\n >\n <Slottable>{children}</Slottable>\n </Component>\n );\n};\n"],"mappings":";;;;AAwBA,MAAa,QAAQ,EACnB,cAAc,cACd,QAAQ,OACR,WACA,KACA,UACA,SACA,GAAG,YACY;CAGf,OACE,oBAHgB,UAAU,OAAO,OAGjC;EACE,WAAW,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"card.mjs","names":[],"sources":["../../../src/components/card/card.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport clsx from 'clsx/lite';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\n\nexport type CardProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The orientation of the card\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n error?: 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\nexport const Card = ({\n orientation = 'horizontal',\n error = false,\n className,\n ref,\n children,\n asChild,\n ...props\n}: CardProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-card', className)}\n data-orientation={orientation}\n data-error={error}\n ref={ref}\n {...props}\n >\n <Slottable>{children}</Slottable>\n </Component>\n );\n};\n"],"mappings":";;;;AAwBA,MAAa,QAAQ,EACnB,cAAc,cACd,QAAQ,OACR,WACA,KACA,UACA,SACA,GAAG,YACY;CAGf,OACE,oBAHgB,UAAU,OAAO,OAGjC;EACE,WAAW,KAAK,WAAW,SAAS;EACpC,oBAAkB;EAClB,cAAY;EACP;EACL,GAAI;EAEJ,UAAA,oBAAC,WAAD,EAAY,SAAoB,CAAA;CACvB,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { an as CardMedia, cn as CardHeaderProps, dn as CardAction, fn as CardActionProps, gn as CardProps, hn as Card, in as CardDateProps, ln as CardContent, mn as CardActionsProps, on as CardMediaProps, pn as CardActions, rn as CardDate, sn as CardHeader, un as CardContentProps } from "../../alert-footer-
|
|
2
|
-
export { Card, CardAction, CardActionProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardDate, CardDateProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps };
|
|
1
|
+
import { an as CardMedia, cn as CardHeaderProps, dn as CardAction, fn as CardActionProps, gn as CardProps, hn as Card, in as CardDateProps, ln as CardContent, mn as CardActionsProps, on as CardMediaProps, pn as CardActions, rn as CardDate, sn as CardHeader, un as CardContentProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Card, CardAction, type CardActionProps, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDate, type CardDateProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Qt as CheckboxSubsectionProps, Zt as CheckboxSubsection } from "../../alert-footer-
|
|
1
|
+
import { Qt as CheckboxSubsectionProps, Zt as CheckboxSubsection } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { CheckboxSubsection, CheckboxSubsectionProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-subsection.mjs","names":[],"sources":["../../../src/components/checkbox/checkbox-subsection.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HtmlHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type CheckboxSubsectionProps = MergeRight<\n DefaultProps & HtmlHTMLAttributes<HTMLDivElement>,\n { ref?: Ref<HTMLDivElement> }\n>;\n\nexport const CheckboxSubsection = ({ children, className, ref, ...props }: CheckboxSubsectionProps) => {\n return (\n <div className={clsx('bi-checkbox-subsection', className)} {...props} ref={ref}>\n <div />\n <div>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAUA,MAAa,sBAAsB,EAAE,UAAU,WAAW,KAAK,GAAG,YAAqC;CACrG,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,0BAA0B,
|
|
1
|
+
{"version":3,"file":"checkbox-subsection.mjs","names":[],"sources":["../../../src/components/checkbox/checkbox-subsection.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HtmlHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type CheckboxSubsectionProps = MergeRight<\n DefaultProps & HtmlHTMLAttributes<HTMLDivElement>,\n { ref?: Ref<HTMLDivElement> }\n>;\n\nexport const CheckboxSubsection = ({ children, className, ref, ...props }: CheckboxSubsectionProps) => {\n return (\n <div className={clsx('bi-checkbox-subsection', className)} {...props} ref={ref}>\n <div />\n <div>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;AAUA,MAAa,sBAAsB,EAAE,UAAU,WAAW,KAAK,GAAG,YAAqC;CACrG,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,0BAA0B,SAAS;EAAG,GAAI;EAAY;EAA3E,UAAA,CACE,oBAAC,OAAD,CAAM,CAAA,GACN,oBAAC,OAAD,EAAM,SAAc,CAAA,CACjB;;AAET"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as Checkbox, en as CheckboxProps } from "../../alert-footer-
|
|
1
|
+
import { $t as Checkbox, en as CheckboxProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Checkbox, CheckboxProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { useEffect, useId, useRef, 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';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type CheckboxProps = 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 checkbox. */\n error?: boolean;\n /** Specify whether the Checkbox is indeterminate */\n indeterminate?: boolean;\n /** If true, the checkbox 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 Checkbox = ({\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n indeterminate,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: CheckboxProps) => {\n const checkRef = useRef<HTMLInputElement>(null);\n const refs = useMergeRefs([checkRef, ref]);\n const descriptionId = useId();\n\n useEffect(() => {\n let input: HTMLInputElement | null;\n if (ref && typeof ref !== 'function') {\n input = ref.current;\n } else {\n input = checkRef.current;\n }\n\n if (input) {\n input.indeterminate = indeterminate || false;\n }\n }, [indeterminate, checkRef, ref]);\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='checkbox'\n id={id}\n ref={refs}\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":";;;;;;;;;;;AA0BA,MAAa,YAAY,EACvB,OACA,aACA,OACA,WACA,OACA,WACA,eACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACgB;CACnB,MAAM,WAAW,OAAyB,
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { useEffect, useId, useRef, 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';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type CheckboxProps = 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 checkbox. */\n error?: boolean;\n /** Specify whether the Checkbox is indeterminate */\n indeterminate?: boolean;\n /** If true, the checkbox 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 Checkbox = ({\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n indeterminate,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: CheckboxProps) => {\n const checkRef = useRef<HTMLInputElement>(null);\n const refs = useMergeRefs([checkRef, ref]);\n const descriptionId = useId();\n\n useEffect(() => {\n let input: HTMLInputElement | null;\n if (ref && typeof ref !== 'function') {\n input = ref.current;\n } else {\n input = checkRef.current;\n }\n\n if (input) {\n input.indeterminate = indeterminate || false;\n }\n }, [indeterminate, checkRef, ref]);\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='checkbox'\n id={id}\n ref={refs}\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":";;;;;;;;;;;AA0BA,MAAa,YAAY,EACvB,OACA,aACA,OACA,WACA,OACA,WACA,eACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACgB;CACnB,MAAM,WAAW,OAAyB,IAAI;CAC9C,MAAM,OAAO,aAAa,CAAC,UAAU,GAAG,CAAC;CACzC,MAAM,gBAAgB,MAAM;CAE5B,gBAAgB;EACd,IAAI;EACJ,IAAI,OAAO,OAAO,QAAQ,YACxB,QAAQ,IAAI;OAEZ,QAAQ,SAAS;EAGnB,IAAI,OACF,MAAM,gBAAgB,iBAAiB;CAE3C,GAAG;EAAC;EAAe;EAAU;CAAG,CAAC;CAEjC,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,mBAAmB,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,KAAA;CAEpG,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACX,SAAA;EAEA,UAAA,qBAAC,SAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,MAAK;IACD;IACJ,KAAK;IACL,gBAAc,SAAS,KAAA;IACvB,oBAAkB;IAClB,GAAI;GACL,CAAA;GACA,SACC,oBAAC,OAAD;IAAO,QAAO;IAAS,SAAS;IAAI,SAAA;IAClC,UAAA,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA;GACd,CAAA;GAER,eAGC,oBAAC,kBAAD;IAAkB,eAAY;IAAO,IAAI;IACtC,UAAA;GACe,CAAA;EAEf,EAAA,CAAA;CACF,CAAA;AAEX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as Checkbox, Qt as CheckboxSubsectionProps, Zt as CheckboxSubsection, en as CheckboxProps } from "../../alert-footer-
|
|
2
|
-
export { Checkbox, CheckboxProps, CheckboxSubsection, CheckboxSubsectionProps };
|
|
1
|
+
import { $t as Checkbox, Qt as CheckboxSubsectionProps, Zt as CheckboxSubsection, en as CheckboxProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Checkbox, type CheckboxProps, CheckboxSubsection, type CheckboxSubsectionProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Xt as ChipProps, Yt as Chip } from "../../alert-footer-
|
|
1
|
+
import { Xt as ChipProps, Yt as Chip } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Chip, ChipProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.mjs","names":[],"sources":["../../../src/components/chip/chip.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { CheckThickIcon } from '@bi-digital/icons';\n\nexport type ChipProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The chip size\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Set an icon before the chip label */\n startIcon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n /**\n * If true, the chip will be displayed as selected.\n * @default false\n */\n selected?: 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 }\n>;\n\nexport const Chip = ({\n children,\n size = 'medium',\n startIcon,\n selected = false,\n asChild,\n className,\n ref,\n ...props\n}: ChipProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-chip', className)}\n data-size={size}\n data-selected={selected || undefined}\n ref={ref}\n {...props}\n >\n {startIcon}\n <Slottable>{children}</Slottable>\n {selected && <CheckThickIcon aria-hidden='true' />}\n </Component>\n );\n};\n"],"mappings":";;;;;AA+BA,MAAa,QAAQ,EACnB,UACA,OAAO,UACP,WACA,WAAW,OACX,SACA,WACA,KACA,GAAG,YACY;CAGf,OACE,qBAHgB,UAAU,OAAO,OAGjC;EACE,WAAW,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"chip.mjs","names":[],"sources":["../../../src/components/chip/chip.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { CheckThickIcon } from '@bi-digital/icons';\n\nexport type ChipProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The chip size\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Set an icon before the chip label */\n startIcon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n /**\n * If true, the chip will be displayed as selected.\n * @default false\n */\n selected?: 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 }\n>;\n\nexport const Chip = ({\n children,\n size = 'medium',\n startIcon,\n selected = false,\n asChild,\n className,\n ref,\n ...props\n}: ChipProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-chip', className)}\n data-size={size}\n data-selected={selected || undefined}\n ref={ref}\n {...props}\n >\n {startIcon}\n <Slottable>{children}</Slottable>\n {selected && <CheckThickIcon aria-hidden='true' />}\n </Component>\n );\n};\n"],"mappings":";;;;;AA+BA,MAAa,QAAQ,EACnB,UACA,OAAO,UACP,WACA,WAAW,OACX,SACA,WACA,KACA,GAAG,YACY;CAGf,OACE,qBAHgB,UAAU,OAAO,OAGjC;EACE,WAAW,KAAK,WAAW,SAAS;EACpC,aAAW;EACX,iBAAe,YAAY,KAAA;EACtB;EACL,GAAI;EALN,UAAA;GAOG;GACD,oBAAC,WAAD,EAAY,SAAoB,CAAA;GAC/B,YAAY,oBAAC,gBAAD,EAAgB,eAAY,OAAQ,CAAA;EACxC;;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Xt as ChipProps, Yt as Chip } from "../../alert-footer-
|
|
2
|
-
export { Chip, ChipProps };
|
|
1
|
+
import { Xt as ChipProps, Yt as Chip } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Chip, type ChipProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Gt as DetailsContent, Kt as DetailsContentProps } from "../../alert-footer-
|
|
1
|
+
import { Gt as DetailsContent, Kt as DetailsContentProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DetailsContent, DetailsContentProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details-content.mjs","names":[],"sources":["../../../src/components/details/details-content.tsx"],"sourcesContent":["import { type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type DetailsContentProps = MergeRight<\n HTMLAttributes<HTMLParagraphElement>,\n {\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<HTMLParagraphElement>;\n }\n>;\n\n/**\n * Details content component, contains the content to be shown or hidden.\n *\n * @example\n * <DetailsContent><p>Some content</p></DetailsContent>\n */\nexport const DetailsContent = ({ className, asChild, children, ref, ...rest }: DetailsContentProps) => {\n const Component = asChild ? Slot : 'p';\n return (\n <Component ref={ref} className={className} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAa,kBAAkB,EAAE,WAAW,SAAS,UAAU,KAAK,GAAG,WAAgC;CAErG,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAgB;EAAgB;EAAW,GAAI;EAC5C;
|
|
1
|
+
{"version":3,"file":"details-content.mjs","names":[],"sources":["../../../src/components/details/details-content.tsx"],"sourcesContent":["import { type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type DetailsContentProps = MergeRight<\n HTMLAttributes<HTMLParagraphElement>,\n {\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<HTMLParagraphElement>;\n }\n>;\n\n/**\n * Details content component, contains the content to be shown or hidden.\n *\n * @example\n * <DetailsContent><p>Some content</p></DetailsContent>\n */\nexport const DetailsContent = ({ className, asChild, children, ref, ...rest }: DetailsContentProps) => {\n const Component = asChild ? Slot : 'p';\n return (\n <Component ref={ref} className={className} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAa,kBAAkB,EAAE,WAAW,SAAS,UAAU,KAAK,GAAG,WAAgC;CAErG,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAgB;EAAgB;EAAW,GAAI;EAC5C;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ut as DetailsSummary, Wt as DetailsSummaryProps } from "../../alert-footer-
|
|
1
|
+
import { Ut as DetailsSummary, Wt as DetailsSummaryProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DetailsSummary, DetailsSummaryProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details-summary.mjs","names":[],"sources":["../../../src/components/details/details-summary.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { ChevronDownIcon } from '@bi-digital/icons';\n\nexport type DetailsSummaryProps = MergeRight<\n HTMLAttributes<HTMLElement>,\n {\n /** Header */\n children: ReactNode;\n /** Optionally replace the default icon. It will be rotated 180 degrees when the content is expanded */\n icon?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\n/**\n * Details summary component, contains a the heading to toggle the content.\n *\n * @example\n * <DetailsSummary>Heading</DetailsSummary>\n */\nexport const DetailsSummary = ({ className, children, icon, ref, ...rest }: DetailsSummaryProps) => {\n return (\n <summary ref={ref} className={className} {...rest}>\n {children}\n {icon ?? <ChevronDownIcon aria-hidden='true' />}\n </summary>\n );\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,kBAAkB,EAAE,WAAW,UAAU,MAAM,KAAK,GAAG,WAAgC;CAClG,OACE,qBAAC,WAAD;EAAc;EAAgB;EAAW,GAAI;
|
|
1
|
+
{"version":3,"file":"details-summary.mjs","names":[],"sources":["../../../src/components/details/details-summary.tsx"],"sourcesContent":["import { type HTMLAttributes, type ReactNode, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { ChevronDownIcon } from '@bi-digital/icons';\n\nexport type DetailsSummaryProps = MergeRight<\n HTMLAttributes<HTMLElement>,\n {\n /** Header */\n children: ReactNode;\n /** Optionally replace the default icon. It will be rotated 180 degrees when the content is expanded */\n icon?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\n/**\n * Details summary component, contains a the heading to toggle the content.\n *\n * @example\n * <DetailsSummary>Heading</DetailsSummary>\n */\nexport const DetailsSummary = ({ className, children, icon, ref, ...rest }: DetailsSummaryProps) => {\n return (\n <summary ref={ref} className={className} {...rest}>\n {children}\n {icon ?? <ChevronDownIcon aria-hidden='true' />}\n </summary>\n );\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,kBAAkB,EAAE,WAAW,UAAU,MAAM,KAAK,GAAG,WAAgC;CAClG,OACE,qBAAC,WAAD;EAAc;EAAgB;EAAW,GAAI;EAA7C,UAAA,CACG,UACA,QAAQ,oBAAC,iBAAD,EAAiB,eAAY,OAAQ,CAAA,CACvC;;AAEb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Jt as DetailsProps, qt as Details } from "../../alert-footer-
|
|
1
|
+
import { Jt as DetailsProps, qt as Details } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Details, DetailsProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"details.mjs","names":[],"sources":["../../../src/components/details/details.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { type HTMLAttributes, type ReactNode, type Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nexport type DetailsProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDetailsElement>,\n {\n /**\n * Controls open-state.\n * Using this removes automatic control of open-state\n *\n * @default undefined\n */\n open?: boolean;\n /**\n * Defaults the details to open if not controlled\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback function when Details toggles due to click on summary or find in page-search\n * Must be defined if `open` prop is used\n */\n onToggle?: (open: boolean) => void;\n /**\n * Content should be one `<DetailsSummary>` and one `<DetailsContent>`\n */\n children?: ReactNode;\n /**\n * This attribute enables multiple `<Details>` elements to be connected, with only one open at a time.\n * The name attribute specifies a group name — give multiple `<Details>` elements the same name value to group them.\n * Only one of the grouped `<Details>` elements can be open at a time — opening one will cause another to close.\n * If multiple grouped `<Details>` elements are given the open attribute, only the first one in the source order will be rendered open.\n */\n name?: string;\n ref?: Ref<HTMLDetailsElement>;\n }\n>;\n\n/**\n * Details component, built on top of the native `<details>` element.\n *\n * @example\n * <Details open={isOpen} onToggle={setIsOpen} name='optional-group-name'>\n * <DetailsSummary>Heading</DetailsSummary>\n * <DetailsContent>Content</DetailsContent>\n * </Details>\n */\nexport const Details = ({ className, children, open, defaultOpen = false, onToggle, ref, ...rest }: DetailsProps) => {\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n onChange: onToggle,\n defaultProp: defaultOpen,\n caller: 'Details',\n });\n\n return (\n <details\n className={clsx('bi-details', className)}\n open={isOpen || undefined} // Fallback to undefined to prevent rendering open=\"false\"\n ref={ref}\n onToggle={(e) => setIsOpen(e.currentTarget.open)}\n {...rest}\n >\n {children}\n </details>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAkDA,MAAa,WAAW,EAAE,WAAW,UAAU,MAAM,cAAc,OAAO,UAAU,KAAK,GAAG,WAAyB;CACnH,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;
|
|
1
|
+
{"version":3,"file":"details.mjs","names":[],"sources":["../../../src/components/details/details.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { type HTMLAttributes, type ReactNode, type Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nexport type DetailsProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDetailsElement>,\n {\n /**\n * Controls open-state.\n * Using this removes automatic control of open-state\n *\n * @default undefined\n */\n open?: boolean;\n /**\n * Defaults the details to open if not controlled\n * @default false\n */\n defaultOpen?: boolean;\n /**\n * Callback function when Details toggles due to click on summary or find in page-search\n * Must be defined if `open` prop is used\n */\n onToggle?: (open: boolean) => void;\n /**\n * Content should be one `<DetailsSummary>` and one `<DetailsContent>`\n */\n children?: ReactNode;\n /**\n * This attribute enables multiple `<Details>` elements to be connected, with only one open at a time.\n * The name attribute specifies a group name — give multiple `<Details>` elements the same name value to group them.\n * Only one of the grouped `<Details>` elements can be open at a time — opening one will cause another to close.\n * If multiple grouped `<Details>` elements are given the open attribute, only the first one in the source order will be rendered open.\n */\n name?: string;\n ref?: Ref<HTMLDetailsElement>;\n }\n>;\n\n/**\n * Details component, built on top of the native `<details>` element.\n *\n * @example\n * <Details open={isOpen} onToggle={setIsOpen} name='optional-group-name'>\n * <DetailsSummary>Heading</DetailsSummary>\n * <DetailsContent>Content</DetailsContent>\n * </Details>\n */\nexport const Details = ({ className, children, open, defaultOpen = false, onToggle, ref, ...rest }: DetailsProps) => {\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n onChange: onToggle,\n defaultProp: defaultOpen,\n caller: 'Details',\n });\n\n return (\n <details\n className={clsx('bi-details', className)}\n open={isOpen || undefined} // Fallback to undefined to prevent rendering open=\"false\"\n ref={ref}\n onToggle={(e) => setIsOpen(e.currentTarget.open)}\n {...rest}\n >\n {children}\n </details>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAkDA,MAAa,WAAW,EAAE,WAAW,UAAU,MAAM,cAAc,OAAO,UAAU,KAAK,GAAG,WAAyB;CACnH,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACV,CAAC;CAED,OACE,oBAAC,WAAD;EACE,WAAW,KAAK,cAAc,SAAS;EACvC,MAAM,UAAU,KAAA;EACX;EACL,WAAW,MAAM,UAAU,EAAE,cAAc,IAAI;EAC/C,GAAI;EAEH;CACM,CAAA;AAEb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Gt as DetailsContent, Jt as DetailsProps, Kt as DetailsContentProps, Ut as DetailsSummary, Wt as DetailsSummaryProps, qt as Details } from "../../alert-footer-
|
|
2
|
-
export { Details, DetailsContent, DetailsContentProps, DetailsProps, DetailsSummary, DetailsSummaryProps };
|
|
1
|
+
import { Gt as DetailsContent, Jt as DetailsProps, Kt as DetailsContentProps, Ut as DetailsSummary, Wt as DetailsSummaryProps, qt as Details } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
export { Details, DetailsContent, type DetailsContentProps, type DetailsProps, DetailsSummary, type DetailsSummaryProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Mt as DialogCloseButtonProps, jt as DialogCloseButton } from "../../alert-footer-
|
|
1
|
+
import { Mt as DialogCloseButtonProps, jt as DialogCloseButton } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DialogCloseButton, DialogCloseButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close-button.mjs","names":[],"sources":["../../../src/components/dialog/dialog-close-button.tsx"],"sourcesContent":["import { CrossSmallIcon } from '@bi-digital/icons';\nimport { Button, type ButtonProps } from '../button';\nimport { use } from 'react';\nimport { Context } from './dialog-trigger-context';\nimport clsx from 'clsx/lite';\n\nexport type DialogCloseButtonProps = Omit<ButtonProps, 'asChild' | 'type' | 'name'>;\n\n/**\n * A button that can be used to close the dialog. Must be used inside a `Dialog` that is wrapped in a `DialogTriggerContext`.\n * When placed as a direct child of `Dialog`, it will be positioned absolutely in the top right corner.\n */\nexport const DialogCloseButton = ({ children, ref, className, ...props }: DialogCloseButtonProps) => {\n const { id } = use(Context);\n return (\n <Button\n ref={ref}\n icon\n variant='text'\n className={clsx('bi-dialog--close', className)}\n command={id ? 'close' : undefined}\n commandfor={id}\n {...props}\n >\n {children || <CrossSmallIcon aria-hidden='true' />}\n </Button>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,qBAAqB,EAAE,UAAU,KAAK,WAAW,GAAG,YAAoC;CACnG,MAAM,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"dialog-close-button.mjs","names":[],"sources":["../../../src/components/dialog/dialog-close-button.tsx"],"sourcesContent":["import { CrossSmallIcon } from '@bi-digital/icons';\nimport { Button, type ButtonProps } from '../button';\nimport { use } from 'react';\nimport { Context } from './dialog-trigger-context';\nimport clsx from 'clsx/lite';\n\nexport type DialogCloseButtonProps = Omit<ButtonProps, 'asChild' | 'type' | 'name'>;\n\n/**\n * A button that can be used to close the dialog. Must be used inside a `Dialog` that is wrapped in a `DialogTriggerContext`.\n * When placed as a direct child of `Dialog`, it will be positioned absolutely in the top right corner.\n */\nexport const DialogCloseButton = ({ children, ref, className, ...props }: DialogCloseButtonProps) => {\n const { id } = use(Context);\n return (\n <Button\n ref={ref}\n icon\n variant='text'\n className={clsx('bi-dialog--close', className)}\n command={id ? 'close' : undefined}\n commandfor={id}\n {...props}\n >\n {children || <CrossSmallIcon aria-hidden='true' />}\n </Button>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,qBAAqB,EAAE,UAAU,KAAK,WAAW,GAAG,YAAoC;CACnG,MAAM,EAAE,OAAO,IAAI,OAAO;CAC1B,OACE,oBAAC,QAAD;EACO;EACL,MAAA;EACA,SAAQ;EACR,WAAW,KAAK,oBAAoB,SAAS;EAC7C,SAAS,KAAK,UAAU,KAAA;EACxB,YAAY;EACZ,GAAI;EAEH,UAAA,YAAY,oBAAC,gBAAD,EAAgB,eAAY,OAAQ,CAAA;CAC3C,CAAA;AAEZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bt as DialogContentProps, zt as DialogContent } from "../../alert-footer-
|
|
1
|
+
import { Bt as DialogContentProps, zt as DialogContent } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DialogContent, DialogContentProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-content.mjs","names":[],"sources":["../../../src/components/dialog/dialog-content.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogContentProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Don't render a border to separate the content from the other content.\n * @default false\n */\n noBorder?: 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\nexport const DialogContent = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogContentProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component className={clsx('bi-dialog--content', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,iBAAiB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA+B;CAGrH,OACE,oBAHgB,UAAU,OAAO,OAGjC;EAAW,WAAW,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"dialog-content.mjs","names":[],"sources":["../../../src/components/dialog/dialog-content.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogContentProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Don't render a border to separate the content from the other content.\n * @default false\n */\n noBorder?: 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\nexport const DialogContent = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogContentProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component className={clsx('bi-dialog--content', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,iBAAiB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA+B;CAGrH,OACE,oBAHgB,UAAU,OAAO,OAGjC;EAAW,WAAW,KAAK,sBAAsB,SAAS;EAAG,kBAAgB;EAAe;EAAK,GAAI;EAClG;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ft as DialogFooter, It as DialogFooterProps } from "../../alert-footer-
|
|
1
|
+
import { Ft as DialogFooter, It as DialogFooterProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DialogFooter, DialogFooterProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-footer.mjs","names":[],"sources":["../../../src/components/dialog/dialog-footer.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogFooterProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Don't render a border to separate the footer from the other content.\n * @default false\n */\n noBorder?: 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\nexport const DialogFooter = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogFooterProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component className={clsx('bi-dialog--footer', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,gBAAgB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA8B;CAGnH,OACE,oBAHgB,UAAU,OAAO,OAGjC;EAAW,WAAW,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"dialog-footer.mjs","names":[],"sources":["../../../src/components/dialog/dialog-footer.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogFooterProps = MergeRight<\n HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Don't render a border to separate the footer from the other content.\n * @default false\n */\n noBorder?: 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\nexport const DialogFooter = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogFooterProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component className={clsx('bi-dialog--footer', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,gBAAgB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA8B;CAGnH,OACE,oBAHgB,UAAU,OAAO,OAGjC;EAAW,WAAW,KAAK,qBAAqB,SAAS;EAAG,kBAAgB;EAAe;EAAK,GAAI;EACjG;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Lt as DialogHeader, Rt as DialogHeaderProps } from "../../alert-footer-
|
|
1
|
+
import { Lt as DialogHeader, Rt as DialogHeaderProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DialogHeader, DialogHeaderProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-header.mjs","names":[],"sources":["../../../src/components/dialog/dialog-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogHeaderProps = MergeRight<\n HTMLAttributes<HTMLHeadingElement>,\n {\n /**\n * Don't render a border to separate the header from the other content.\n * @default false\n */\n noBorder?: 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<HTMLHeadingElement>;\n }\n>;\n\nexport const DialogHeader = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogHeaderProps) => {\n const Component = asChild ? Slot : 'h2';\n\n return (\n <Component className={clsx('bi-dialog--header', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,gBAAgB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA8B;CAGnH,OACE,oBAHgB,UAAU,OAAO,MAGjC;EAAW,WAAW,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"dialog-header.mjs","names":[],"sources":["../../../src/components/dialog/dialog-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport clsx from 'clsx/lite';\nimport type { MergeRight } from '../../utilities';\n\nexport type DialogHeaderProps = MergeRight<\n HTMLAttributes<HTMLHeadingElement>,\n {\n /**\n * Don't render a border to separate the header from the other content.\n * @default false\n */\n noBorder?: 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<HTMLHeadingElement>;\n }\n>;\n\nexport const DialogHeader = ({ asChild, ref, children, className, noBorder = false, ...rest }: DialogHeaderProps) => {\n const Component = asChild ? Slot : 'h2';\n\n return (\n <Component className={clsx('bi-dialog--header', className)} data-no-border={noBorder} ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAsBA,MAAa,gBAAgB,EAAE,SAAS,KAAK,UAAU,WAAW,WAAW,OAAO,GAAG,WAA8B;CAGnH,OACE,oBAHgB,UAAU,OAAO,MAGjC;EAAW,WAAW,KAAK,qBAAqB,SAAS;EAAG,kBAAgB;EAAe;EAAK,GAAI;EACjG;CACQ,CAAA;AAEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../../dialog-trigger-context-
|
|
1
|
+
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../../dialog-trigger-context-Orqo_NHj.mjs";
|
|
2
2
|
export { Context, DialogTriggerContext, DialogTriggerContextProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger-context.mjs","names":[],"sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"sourcesContent":["import { createContext, useState } from 'react';\nimport type { ReactNode } from 'react';\n\ntype DialogContext = { id?: string };\nexport const Context = createContext<DialogContext & { setContext?: (context: DialogContext) => void }>({});\n\nexport type DialogTriggerContextProps = { children: ReactNode };\n\nexport const DialogTriggerContext = ({ children }: DialogTriggerContextProps) => {\n const [state, setState] = useState<DialogContext>({});\n const setContext = (next: DialogContext) => setState({ ...state, ...next });\n\n return <Context.Provider value={{ ...state, setContext }}>{children}</Context.Provider>;\n};\n"],"mappings":";;;AAIA,MAAa,UAAU,cAAiF,
|
|
1
|
+
{"version":3,"file":"dialog-trigger-context.mjs","names":[],"sources":["../../../src/components/dialog/dialog-trigger-context.tsx"],"sourcesContent":["import { createContext, useState } from 'react';\nimport type { ReactNode } from 'react';\n\ntype DialogContext = { id?: string };\nexport const Context = createContext<DialogContext & { setContext?: (context: DialogContext) => void }>({});\n\nexport type DialogTriggerContextProps = { children: ReactNode };\n\nexport const DialogTriggerContext = ({ children }: DialogTriggerContextProps) => {\n const [state, setState] = useState<DialogContext>({});\n const setContext = (next: DialogContext) => setState({ ...state, ...next });\n\n return <Context.Provider value={{ ...state, setContext }}>{children}</Context.Provider>;\n};\n"],"mappings":";;;AAIA,MAAa,UAAU,cAAiF,CAAC,CAAC;AAI1G,MAAa,wBAAwB,EAAE,eAA0C;CAC/E,MAAM,CAAC,OAAO,YAAY,SAAwB,CAAC,CAAC;CACpD,MAAM,cAAc,SAAwB,SAAS;EAAE,GAAG;EAAO,GAAG;CAAK,CAAC;CAE1E,OAAO,oBAAC,QAAQ,UAAT;EAAkB,OAAO;GAAE,GAAG;GAAO;EAAW;EAAI;CAA2B,CAAA;AACxF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Nt as DialogTrigger, Pt as DialogTriggerProps } from "../../alert-footer-
|
|
1
|
+
import { Nt as DialogTrigger, Pt as DialogTriggerProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DialogTrigger, DialogTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-trigger.mjs","names":[],"sources":["../../../src/components/dialog/dialog-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { use } from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './dialog-trigger-context';\n\nexport type DialogTriggerProps = ButtonProps;\n\nexport const DialogTrigger = ({ asChild, ref, ...rest }: DialogTriggerProps) => {\n const { id } = use(Context);\n const Component = asChild ? Slot : Button;\n\n return (\n <Component\n suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup\n command={id ? 'show-modal' : undefined}\n commandfor={id}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;AAQA,MAAa,iBAAiB,EAAE,SAAS,KAAK,GAAG,WAA+B;CAC9E,MAAM,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"dialog-trigger.mjs","names":[],"sources":["../../../src/components/dialog/dialog-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { use } from 'react';\n\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './dialog-trigger-context';\n\nexport type DialogTriggerProps = ButtonProps;\n\nexport const DialogTrigger = ({ asChild, ref, ...rest }: DialogTriggerProps) => {\n const { id } = use(Context);\n const Component = asChild ? Slot : Button;\n\n return (\n <Component\n suppressHydrationWarning // Might get augmented through designsystemet-web with aria-haspopup\n command={id ? 'show-modal' : undefined}\n commandfor={id}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;AAQA,MAAa,iBAAiB,EAAE,SAAS,KAAK,GAAG,WAA+B;CAC9E,MAAM,EAAE,OAAO,IAAI,OAAO;CAG1B,OACE,oBAHgB,UAAU,OAAO,QAGjC;EACE,0BAAA;EACA,SAAS,KAAK,eAAe,KAAA;EAC7B,YAAY;EACP;EACL,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ht as DialogProps, Vt as Dialog } from "../../alert-footer-
|
|
1
|
+
import { Ht as DialogProps, Vt as Dialog } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { Dialog, DialogProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.mjs","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/e2d4371890e9b3aa47901f7b6d5d194037856c79/packages/react/src/components/dialog/dialog.tsx\n\nimport clsx from 'clsx/lite';\nimport type { DialogHTMLAttributes, Ref } from 'react';\nimport { use, useEffect, useId, useRef } from 'react';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './dialog-trigger-context';\n\nexport type DialogProps = MergeRight<\n DefaultProps & DialogHTMLAttributes<HTMLDialogElement>,\n {\n /**\n * When not \"center\", displays the dialog as a \"drawer\" from the specified side.\n * @default 'center'\n */\n anchor?: 'center' | 'left' | 'right' | 'top' | 'bottom';\n /**\n * Dismiss behavior.\n *\n * - `closedby=\"any\"`: Close dialog on close button click, backdrop click or ESC key.\n * - `closedby=\"closerequest\"`: Close dialog on close button click or ESC key.\n * - `closedby=\"none\"`: Close dialog on close button click.\n *\n * @default 'any'\n */\n closedby?: 'none' | 'closerequest' | 'any';\n /**\n * Determines if the dialog is open or not.\n */\n open?: boolean;\n /**\n * Callback that is called when the dialog is closed.\n */\n onClose?: (event: Event) => void;\n ref?: Ref<HTMLDialogElement>;\n }\n>;\n\n/**\n * Dialog component, used to display a dialog.\n *\n * @example With TriggerContext:\n * <DialogTriggerContext>\n * <DialogTrigger>Open Dialog</DialogTrigger>\n * <Dialog>\n * <DialogHeader>Dialog Header</DialogHeader>\n * <DialogContent>Dialog Content</DialogContent>\n * <DialogFooter>\n * <DialogCloseButton variant='text'>Cancel</DialogCloseButton>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </Dialog>\n * </DialogTriggerContext>\n *\n * @example Without TriggerContext:\n * <Button command=\"show-modal\" commandfor=\"my-dialog\">Open Dialog</Button>\n * <Dialog id=\"my-dialog\">\n * <DialogHeader>Dialog Header</DialogHeader>\n * <DialogContent>Dialog Content</DialogContent>\n * <DialogFooter>\n * <Button variant=\"text\" command=\"close\" commandfor=\"my-dialog\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </Dialog>\n */\nexport const Dialog = ({\n anchor,\n children,\n className,\n closedby = 'any',\n id,\n onAnimationEnd,\n onClose,\n open,\n ref,\n ...rest\n}: DialogProps) => {\n const { setContext } = use(Context);\n const dialogRef = useRef<HTMLDialogElement>(null); // This local ref is used to make sure the dialog works without a DialogTriggerContext\n const mergedRefs = useMergeRefs([ref, dialogRef]);\n const autoId = useId();\n const usedId = id ?? autoId;\n\n // Toggle open based on prop\n useEffect(() => dialogRef.current?.[open ? 'showModal' : 'close'](), [open]);\n // Store context for DialogTrigger to consume, so it can open the dialog when the trigger is clicked\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n useEffect(() => setContext?.({ id: usedId }), [usedId]);\n\n return (\n <dialog\n closedby={closedby}\n className={clsx('bi-dialog', className)}\n data-anchor={anchor}\n id={usedId}\n onClose={(event) => onClose?.(event.nativeEvent)} // Backward compatibility: expose native event\n onAnimationEnd={(event: React.AnimationEvent<HTMLDialogElement>) => {\n const { currentTarget: dialog } = event;\n const autofocus = dialog.querySelector<HTMLElement>('[autofocus]');\n if (document.activeElement !== autofocus) autofocus?.focus(); // Handle autofocus on open\n onAnimationEnd?.(event);\n }}\n ref={mergedRefs}\n {...rest}\n >\n {children}\n </dialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa,UAAU,EACrB,QACA,UACA,WACA,WAAW,OACX,IACA,gBACA,SACA,MACA,KACA,GAAG,WACc;CACjB,MAAM,EAAE,eAAe,IAAI,
|
|
1
|
+
{"version":3,"file":"dialog.mjs","names":[],"sources":["../../../src/components/dialog/dialog.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/e2d4371890e9b3aa47901f7b6d5d194037856c79/packages/react/src/components/dialog/dialog.tsx\n\nimport clsx from 'clsx/lite';\nimport type { DialogHTMLAttributes, Ref } from 'react';\nimport { use, useEffect, useId, useRef } from 'react';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Context } from './dialog-trigger-context';\n\nexport type DialogProps = MergeRight<\n DefaultProps & DialogHTMLAttributes<HTMLDialogElement>,\n {\n /**\n * When not \"center\", displays the dialog as a \"drawer\" from the specified side.\n * @default 'center'\n */\n anchor?: 'center' | 'left' | 'right' | 'top' | 'bottom';\n /**\n * Dismiss behavior.\n *\n * - `closedby=\"any\"`: Close dialog on close button click, backdrop click or ESC key.\n * - `closedby=\"closerequest\"`: Close dialog on close button click or ESC key.\n * - `closedby=\"none\"`: Close dialog on close button click.\n *\n * @default 'any'\n */\n closedby?: 'none' | 'closerequest' | 'any';\n /**\n * Determines if the dialog is open or not.\n */\n open?: boolean;\n /**\n * Callback that is called when the dialog is closed.\n */\n onClose?: (event: Event) => void;\n ref?: Ref<HTMLDialogElement>;\n }\n>;\n\n/**\n * Dialog component, used to display a dialog.\n *\n * @example With TriggerContext:\n * <DialogTriggerContext>\n * <DialogTrigger>Open Dialog</DialogTrigger>\n * <Dialog>\n * <DialogHeader>Dialog Header</DialogHeader>\n * <DialogContent>Dialog Content</DialogContent>\n * <DialogFooter>\n * <DialogCloseButton variant='text'>Cancel</DialogCloseButton>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </Dialog>\n * </DialogTriggerContext>\n *\n * @example Without TriggerContext:\n * <Button command=\"show-modal\" commandfor=\"my-dialog\">Open Dialog</Button>\n * <Dialog id=\"my-dialog\">\n * <DialogHeader>Dialog Header</DialogHeader>\n * <DialogContent>Dialog Content</DialogContent>\n * <DialogFooter>\n * <Button variant=\"text\" command=\"close\" commandfor=\"my-dialog\">Cancel</Button>\n * <Button>Confirm</Button>\n * </DialogFooter>\n * </Dialog>\n */\nexport const Dialog = ({\n anchor,\n children,\n className,\n closedby = 'any',\n id,\n onAnimationEnd,\n onClose,\n open,\n ref,\n ...rest\n}: DialogProps) => {\n const { setContext } = use(Context);\n const dialogRef = useRef<HTMLDialogElement>(null); // This local ref is used to make sure the dialog works without a DialogTriggerContext\n const mergedRefs = useMergeRefs([ref, dialogRef]);\n const autoId = useId();\n const usedId = id ?? autoId;\n\n // Toggle open based on prop\n useEffect(() => dialogRef.current?.[open ? 'showModal' : 'close'](), [open]);\n // Store context for DialogTrigger to consume, so it can open the dialog when the trigger is clicked\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n useEffect(() => setContext?.({ id: usedId }), [usedId]);\n\n return (\n <dialog\n closedby={closedby}\n className={clsx('bi-dialog', className)}\n data-anchor={anchor}\n id={usedId}\n onClose={(event) => onClose?.(event.nativeEvent)} // Backward compatibility: expose native event\n onAnimationEnd={(event: React.AnimationEvent<HTMLDialogElement>) => {\n const { currentTarget: dialog } = event;\n const autofocus = dialog.querySelector<HTMLElement>('[autofocus]');\n if (document.activeElement !== autofocus) autofocus?.focus(); // Handle autofocus on open\n onAnimationEnd?.(event);\n }}\n ref={mergedRefs}\n {...rest}\n >\n {children}\n </dialog>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,MAAa,UAAU,EACrB,QACA,UACA,WACA,WAAW,OACX,IACA,gBACA,SACA,MACA,KACA,GAAG,WACc;CACjB,MAAM,EAAE,eAAe,IAAI,OAAO;CAClC,MAAM,YAAY,OAA0B,IAAI;CAChD,MAAM,aAAa,aAAa,CAAC,KAAK,SAAS,CAAC;CAChD,MAAM,SAAS,MAAM;CACrB,MAAM,SAAS,MAAM;CAGrB,gBAAgB,UAAU,UAAU,OAAO,cAAc,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;CAG3E,gBAAgB,aAAa,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;CAEtD,OACE,oBAAC,UAAD;EACY;EACV,WAAW,KAAK,aAAa,SAAS;EACtC,eAAa;EACb,IAAI;EACJ,UAAU,UAAU,UAAU,MAAM,WAAW;EAC/C,iBAAiB,UAAmD;GAClE,MAAM,EAAE,eAAe,WAAW;GAClC,MAAM,YAAY,OAAO,cAA2B,aAAa;GACjE,IAAI,SAAS,kBAAkB,WAAW,WAAW,MAAM;GAC3D,iBAAiB,KAAK;EACxB;EACA,KAAK;EACL,GAAI;EAEH;CACK,CAAA;AAEZ"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Bt as DialogContentProps, Ft as DialogFooter, Ht as DialogProps, It as DialogFooterProps, Lt as DialogHeader, Mt as DialogCloseButtonProps, Nt as DialogTrigger, Pt as DialogTriggerProps, Rt as DialogHeaderProps, Vt as Dialog, jt as DialogCloseButton, zt as DialogContent } from "../../alert-footer-
|
|
2
|
-
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../../dialog-trigger-context-
|
|
3
|
-
export { Context, Dialog, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTrigger, DialogTriggerContext, DialogTriggerContextProps, DialogTriggerProps };
|
|
1
|
+
import { Bt as DialogContentProps, Ft as DialogFooter, Ht as DialogProps, It as DialogFooterProps, Lt as DialogHeader, Mt as DialogCloseButtonProps, Nt as DialogTrigger, Pt as DialogTriggerProps, Rt as DialogHeaderProps, Vt as Dialog, jt as DialogCloseButton, zt as DialogContent } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
|
+
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../../dialog-trigger-context-Orqo_NHj.mjs";
|
|
3
|
+
export { type Context, Dialog, DialogCloseButton, type DialogCloseButtonProps, DialogContent, type DialogContentProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, DialogTrigger, DialogTriggerContext, type DialogTriggerContextProps, type DialogTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as DropdownButton, wt as DropdownButtonProps } from "../../alert-footer-
|
|
1
|
+
import { Ct as DropdownButton, wt as DropdownButtonProps } from "../../alert-footer-BoTu7E1s.mjs";
|
|
2
2
|
export { DropdownButton, DropdownButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-button.mjs","names":[],"sources":["../../../src/components/dropdown/dropdown-button.tsx"],"sourcesContent":["import { Button, type ButtonProps } from '../button';\n\nexport type DropdownButtonProps = Omit<ButtonProps, 'variant'>;\n\nexport const DropdownButton = ({ ref, ...rest }: DropdownButtonProps) => {\n return <Button ref={ref} variant='text' {...rest} />;\n};\n"],"mappings":";;;;AAIA,MAAa,kBAAkB,EAAE,KAAK,GAAG,WAAgC;CACvE,OAAO,oBAAC,QAAD;EAAa;EAAK,SAAQ;EAAO,GAAI;
|
|
1
|
+
{"version":3,"file":"dropdown-button.mjs","names":[],"sources":["../../../src/components/dropdown/dropdown-button.tsx"],"sourcesContent":["import { Button, type ButtonProps } from '../button';\n\nexport type DropdownButtonProps = Omit<ButtonProps, 'variant'>;\n\nexport const DropdownButton = ({ ref, ...rest }: DropdownButtonProps) => {\n return <Button ref={ref} variant='text' {...rest} />;\n};\n"],"mappings":";;;;AAIA,MAAa,kBAAkB,EAAE,KAAK,GAAG,WAAgC;CACvE,OAAO,oBAAC,QAAD;EAAa;EAAK,SAAQ;EAAO,GAAI;CAAO,CAAA;AACrD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DropdownItemProps, t as DropdownItem } from "../../dropdown-item-
|
|
1
|
+
import { n as DropdownItemProps, t as DropdownItem } from "../../dropdown-item-B6Ahk6en.mjs";
|
|
2
2
|
export { DropdownItem, DropdownItemProps };
|