@bi-digital/react 0.11.3 → 0.11.5
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-Bpq_UTqE.d.mts → alert-footer-D3W7nNsf.d.mts} +4 -2
- 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.map +1 -1
- package/dist/components/alert/index.d.mts +1 -1
- package/dist/components/avatar/avatar.d.mts +1 -1
- package/dist/components/avatar/avatar.mjs.map +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/badge/badge.d.mts +1 -1
- package/dist/components/badge/badge.mjs.map +1 -1
- package/dist/components/badge/index.d.mts +1 -1
- package/dist/components/button/button.d.mts +1 -1
- package/dist/components/button/button.mjs +2 -1
- package/dist/components/button/button.mjs.map +1 -1
- package/dist/components/button/index.d.mts +1 -1
- package/dist/components/card/card-action.d.mts +1 -1
- package/dist/components/card/card-action.mjs.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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.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 +1 -1
- 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-trigger-context.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
- package/dist/components/dropdown/dropdown.d.mts +1 -1
- package/dist/components/dropdown/dropdown.mjs.map +1 -1
- package/dist/components/dropdown/index.d.mts +1 -1
- package/dist/components/field/field-affix.d.mts +1 -1
- package/dist/components/field/field-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 +1 -1
- 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 +1 -1
- 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 +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 +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/input.d.mts +1 -1
- package/dist/components/input/input.mjs.map +1 -1
- package/dist/components/label/index.d.mts +1 -1
- package/dist/components/label/label.d.mts +1 -1
- package/dist/components/label/label.mjs.map +1 -1
- package/dist/components/link/index.d.mts +1 -1
- package/dist/components/link/link.d.mts +1 -1
- package/dist/components/link/link.mjs.map +1 -1
- package/dist/components/logo/index.d.mts +1 -1
- package/dist/components/logo/logo.d.mts +1 -1
- package/dist/components/logo/logo.mjs.map +1 -1
- package/dist/components/navbar/index.d.mts +1 -1
- package/dist/components/navbar/navbar.d.mts +1 -1
- package/dist/components/navbar/navbar.mjs.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 +1 -1
- package/dist/components/pagination/pagination-button.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 +1 -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.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/spinner/spinner.d.mts +1 -1
- package/dist/components/spinner/spinner.mjs.map +1 -1
- package/dist/components/sticky-header/sticky-header.mjs.map +1 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/switch.d.mts +1 -1
- package/dist/components/switch/switch.mjs.map +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/tab.d.mts +1 -1
- package/dist/components/tabs/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 +1 -1
- 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 +1 -1
- package/dist/components/textfield/textfield.d.mts +1 -1
- package/dist/components/textfield/textfield.mjs.map +1 -1
- package/dist/components/validation-message/index.d.mts +1 -1
- package/dist/components/validation-message/validation-message.d.mts +1 -1
- package/dist/components/validation-message/validation-message.mjs.map +1 -1
- package/dist/main.d.mts +1 -1
- package/dist/utilities/hooks/index.d.mts +1 -1
- package/dist/utilities/hooks/useCheckboxGroup/useCheckboxGroup.mjs.map +1 -1
- package/dist/utilities/hooks/useIsElementAboveViewport/useIsElementAboveViewport.mjs.map +1 -1
- package/dist/utilities/hooks/useMediaQuery/useMediaQuery.mjs.map +1 -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 +8 -0
- package/dist/utilities/hooks/usePagination/usePagination.mjs.map +1 -1
- package/dist/utilities/hooks/useScrollDirection/useScrollDirection.mjs.map +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/vanilla/popover/index.mjs.map +1 -1
- package/dist/vanilla/sub-navbar/index.mjs +1 -0
- package/dist/vanilla/sub-navbar/index.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { St as DropdownButtonProps, xt as DropdownButton } from "../../alert-footer-
|
|
1
|
+
import { St as DropdownButtonProps, xt as DropdownButton } from "../../alert-footer-D3W7nNsf.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;
|
|
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;EAAQ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _t as DropdownTriggerContext, vt as DropdownTriggerContextProps } from "../../alert-footer-
|
|
1
|
+
import { _t as DropdownTriggerContext, vt as DropdownTriggerContextProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { DropdownTriggerContext, DropdownTriggerContextProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { bt as DropdownTriggerProps, yt as DropdownTrigger } from "../../alert-footer-
|
|
1
|
+
import { bt as DropdownTriggerProps, yt as DropdownTrigger } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { DropdownTrigger, DropdownTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ct as Dropdown, wt as DropdownProps } from "../../alert-footer-
|
|
1
|
+
import { Ct as Dropdown, wt as DropdownProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Dropdown, DropdownProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../src/components/dropdown/dropdown.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Popover, type PopoverProps } from '../popover';\n\nexport type DropdownProps = MergeRight<\n DefaultProps & PopoverProps,\n {\n /**\n * The placement of the dropdown\n * @default bottom-end\n */\n placement?: PopoverProps['placement'];\n }\n>;\n\n/**\n * Dropdown component, used to display a list of options.\n *\n * @example with TriggerContext\n * <DropdownTriggerContext>\n * <DropdownTrigger>Dropdown trigger</DropdownTrigger>\n * <Dropdown placement='bottom-end'>\n * <DropdownHeading>Dropdown</DropdownHeading>\n * <DropdownList>\n * <DropdownItem>\n * <DropdownButton>Item</DropdownButton>\n * </DropdownItem>\n * </DropdownList>\n * </Dropdown>\n * </DropdownTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"some-dropdown\" aria-expanded={open}>Trigger</Button>\n * <Dropdown id=\"some-dropdown\" open={open} onOpenChange={onOpenChange}>\n * <DropdownHeading>Heading</DropdownHeading>\n * <DropdownList>\n * <DropdownItem>\n * <DropdownButton>Item</DropdownButton>\n * </DropdownItem>\n * </DropdownList>\n * </Dropdown>\n */\nexport const Dropdown = ({ placement = 'bottom-end', className, ref, ...rest }: DropdownProps) => {\n return <Popover className={clsx('bi-dropdown', className)} placement={placement} ref={ref} {...rest} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,YAAY,EAAE,YAAY,cAAc,WAAW,KAAK,GAAG,WAA0B;
|
|
1
|
+
{"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../src/components/dropdown/dropdown.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Popover, type PopoverProps } from '../popover';\n\nexport type DropdownProps = MergeRight<\n DefaultProps & PopoverProps,\n {\n /**\n * The placement of the dropdown\n * @default bottom-end\n */\n placement?: PopoverProps['placement'];\n }\n>;\n\n/**\n * Dropdown component, used to display a list of options.\n *\n * @example with TriggerContext\n * <DropdownTriggerContext>\n * <DropdownTrigger>Dropdown trigger</DropdownTrigger>\n * <Dropdown placement='bottom-end'>\n * <DropdownHeading>Dropdown</DropdownHeading>\n * <DropdownList>\n * <DropdownItem>\n * <DropdownButton>Item</DropdownButton>\n * </DropdownItem>\n * </DropdownList>\n * </Dropdown>\n * </DropdownTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"some-dropdown\" aria-expanded={open}>Trigger</Button>\n * <Dropdown id=\"some-dropdown\" open={open} onOpenChange={onOpenChange}>\n * <DropdownHeading>Heading</DropdownHeading>\n * <DropdownList>\n * <DropdownItem>\n * <DropdownButton>Item</DropdownButton>\n * </DropdownItem>\n * </DropdownList>\n * </Dropdown>\n */\nexport const Dropdown = ({ placement = 'bottom-end', className, ref, ...rest }: DropdownProps) => {\n return <Popover className={clsx('bi-dropdown', className)} placement={placement} ref={ref} {...rest} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAa,YAAY,EAAE,YAAY,cAAc,WAAW,KAAK,GAAG,WAA0B;CAChG,OAAO,oBAAC,SAAD;EAAS,WAAW,KAAK,eAAe,UAAU;EAAa;EAAgB;EAAK,GAAI;EAAQ,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as Dropdown, St as DropdownButtonProps, _t as DropdownTriggerContext, bt as DropdownTriggerProps, vt as DropdownTriggerContextProps, wt as DropdownProps, xt as DropdownButton, yt as DropdownTrigger } from "../../alert-footer-
|
|
1
|
+
import { Ct as Dropdown, St as DropdownButtonProps, _t as DropdownTriggerContext, bt as DropdownTriggerProps, vt as DropdownTriggerContextProps, wt as DropdownProps, xt as DropdownButton, yt as DropdownTrigger } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
import { n as DropdownItemProps, t as DropdownItem } from "../../dropdown-item-bA64wFOZ.mjs";
|
|
3
3
|
import { n as DropdownListProps, t as DropdownList } from "../../dropdown-list-CaYz-O1j.mjs";
|
|
4
4
|
export { Dropdown, DropdownButton, DropdownButtonProps, DropdownItem, DropdownItemProps, DropdownList, DropdownListProps, DropdownProps, DropdownTrigger, DropdownTriggerContext, DropdownTriggerContextProps, DropdownTriggerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { dt as FieldAffixes, ft as FieldAffixesProps, lt as FieldAffix, ut as FieldAffixProps } from "../../alert-footer-
|
|
1
|
+
import { dt as FieldAffixes, ft as FieldAffixesProps, lt as FieldAffix, ut as FieldAffixProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-affix.mjs","names":[],"sources":["../../../src/components/field/field-affix.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type FieldAffixesProps = MergeRight<\n AsChildProps & Omit<HTMLAttributes<HTMLDivElement>, 'prefix'>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * FieldAffixes component, used to wrap a form field.\n *\n * @example\n * <FieldAffixes>\n * <FieldAffix>+47</FieldAffix>\n * <Input />\n * <FieldAffix>kr</FieldAffix>\n * </FieldAffixes>\n */\nexport const FieldAffixes = ({ className, asChild, ref, ...rest }: FieldAffixesProps) => {\n const Component = asChild ? Slot : 'div';\n return <Component className={clsx('bi-field--affixes', className)} ref={ref} {...rest} />;\n};\n\nexport type FieldAffixProps = MergeRight<\n AsChildProps & Omit<HTMLAttributes<HTMLSpanElement>, 'prefix'>,\n {\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * FieldAffix component, used to display prefix/suffix for a form field.\n * Use inside the `FieldAffixes` component.\n *\n * @example\n * <FieldAffixes>\n * <FieldAffix>+47</FieldAffix>\n * <Input />\n * <FieldAffix>kr</FieldAffix>\n * </FieldAffixes>\n */\nexport const FieldAffix = ({ className, asChild, ref, ...rest }: FieldAffixProps) => {\n const Component = asChild ? Slot : 'span';\n return <Component className={clsx('bi-field--affix', className)} aria-hidden='true' ref={ref} {...rest} />;\n};\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB,EAAE,WAAW,SAAS,KAAK,GAAG,WAA8B;
|
|
1
|
+
{"version":3,"file":"field-affix.mjs","names":[],"sources":["../../../src/components/field/field-affix.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\nimport { Slot } from '@radix-ui/react-slot';\n\nexport type FieldAffixesProps = MergeRight<\n AsChildProps & Omit<HTMLAttributes<HTMLDivElement>, 'prefix'>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * FieldAffixes component, used to wrap a form field.\n *\n * @example\n * <FieldAffixes>\n * <FieldAffix>+47</FieldAffix>\n * <Input />\n * <FieldAffix>kr</FieldAffix>\n * </FieldAffixes>\n */\nexport const FieldAffixes = ({ className, asChild, ref, ...rest }: FieldAffixesProps) => {\n const Component = asChild ? Slot : 'div';\n return <Component className={clsx('bi-field--affixes', className)} ref={ref} {...rest} />;\n};\n\nexport type FieldAffixProps = MergeRight<\n AsChildProps & Omit<HTMLAttributes<HTMLSpanElement>, 'prefix'>,\n {\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\n/**\n * FieldAffix component, used to display prefix/suffix for a form field.\n * Use inside the `FieldAffixes` component.\n *\n * @example\n * <FieldAffixes>\n * <FieldAffix>+47</FieldAffix>\n * <Input />\n * <FieldAffix>kr</FieldAffix>\n * </FieldAffixes>\n */\nexport const FieldAffix = ({ className, asChild, ref, ...rest }: FieldAffixProps) => {\n const Component = asChild ? Slot : 'span';\n return <Component className={clsx('bi-field--affix', className)} aria-hidden='true' ref={ref} {...rest} />;\n};\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAa,gBAAgB,EAAE,WAAW,SAAS,KAAK,GAAG,WAA8B;CAEvF,OAAO,oBADW,UAAU,OAAO,OAC5B;EAAW,WAAW,KAAK,qBAAqB,UAAU;EAAO;EAAK,GAAI;EAAQ,CAAA;;;;;;;;;;;;;AAqB3F,MAAa,cAAc,EAAE,WAAW,SAAS,KAAK,GAAG,WAA4B;CAEnF,OAAO,oBADW,UAAU,OAAO,QAC5B;EAAW,WAAW,KAAK,mBAAmB,UAAU;EAAE,eAAY;EAAY;EAAK,GAAI;EAAQ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { mt as FieldDescriptionProps, pt as FieldDescription } from "../../alert-footer-
|
|
1
|
+
import { mt as FieldDescriptionProps, pt as FieldDescription } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FieldDescription, FieldDescriptionProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-description.mjs","names":[],"sources":["../../../src/components/field/field-description.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type FieldDescriptionProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FieldDescription = ({ asChild, className, ref, ...props }: FieldDescriptionProps) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component className={clsx('bi-field--description', className)} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAaA,MAAa,oBAAoB,EAAE,SAAS,WAAW,KAAK,GAAG,YAAmC;
|
|
1
|
+
{"version":3,"file":"field-description.mjs","names":[],"sources":["../../../src/components/field/field-description.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type FieldDescriptionProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FieldDescription = ({ asChild, className, ref, ...props }: FieldDescriptionProps) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component className={clsx('bi-field--description', className)} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAaA,MAAa,oBAAoB,EAAE,SAAS,WAAW,KAAK,GAAG,YAAmC;CAGhG,OAAO,oBAFW,UAAU,OAAO,OAE5B;EAAW,WAAW,KAAK,yBAAyB,UAAU;EAAO;EAAK,GAAI;EAAS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { gt as FieldProps, ht as Field } from "../../alert-footer-
|
|
1
|
+
import { gt as FieldProps, ht as Field } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Field, FieldProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.mjs","names":[],"sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps, AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type FieldProps = MergeRight<\n DefaultProps & AsChildProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Position of toggle-type inputs (radio, checkbox) in the field\n * @default start\n */\n position?: 'start' | 'end';\n /** Set width: 100% */\n fullwidth?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * The Field component is used to wrap a form field.\n *\n * @example\n * <Field>\n * <Label>Kort beskrivelse</Label>\n * <FieldDescription>Beskrivelse</FieldDescription>\n * <Input />\n * <ValidationMessage>Feilmelding</ValidationMessage>\n * </Field>\n */\nexport const Field = ({ className, dark, position, fullwidth, asChild, ref, ...props }: FieldProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-field', className)}\n data-dark={dark}\n data-position={position}\n data-fullwidth={fullwidth}\n ref={ref}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAa,SAAS,EAAE,WAAW,MAAM,UAAU,WAAW,SAAS,KAAK,GAAG,YAAwB;
|
|
1
|
+
{"version":3,"file":"field.mjs","names":[],"sources":["../../../src/components/field/field.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps, AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type FieldProps = MergeRight<\n DefaultProps & AsChildProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Position of toggle-type inputs (radio, checkbox) in the field\n * @default start\n */\n position?: 'start' | 'end';\n /** Set width: 100% */\n fullwidth?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * The Field component is used to wrap a form field.\n *\n * @example\n * <Field>\n * <Label>Kort beskrivelse</Label>\n * <FieldDescription>Beskrivelse</FieldDescription>\n * <Input />\n * <ValidationMessage>Feilmelding</ValidationMessage>\n * </Field>\n */\nexport const Field = ({ className, dark, position, fullwidth, asChild, ref, ...props }: FieldProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-field', className)}\n data-dark={dark}\n data-position={position}\n data-fullwidth={fullwidth}\n ref={ref}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAa,SAAS,EAAE,WAAW,MAAM,UAAU,WAAW,SAAS,KAAK,GAAG,YAAwB;CAGrG,OACE,oBAHgB,UAAU,OAAO,OAGjC;EACE,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,iBAAe;EACf,kBAAgB;EACX;EACL,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { dt as FieldAffixes, ft as FieldAffixesProps, gt as FieldProps, ht as Field, lt as FieldAffix, mt as FieldDescriptionProps, pt as FieldDescription, ut as FieldAffixProps } from "../../alert-footer-
|
|
1
|
+
import { dt as FieldAffixes, ft as FieldAffixesProps, gt as FieldProps, ht as Field, lt as FieldAffix, mt as FieldDescriptionProps, pt as FieldDescription, ut as FieldAffixProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Field, FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps, FieldDescription, FieldDescriptionProps, FieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as FieldsetDescription, ot as FieldsetDescriptionProps } from "../../alert-footer-
|
|
1
|
+
import { at as FieldsetDescription, ot as FieldsetDescriptionProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FieldsetDescription, FieldsetDescriptionProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset-description.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset-description.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type FieldsetDescriptionProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FieldsetDescription = ({ asChild, ref, ...props }: FieldsetDescriptionProps) => {\n const Component = asChild ? Slot : 'p';\n\n return <Component ref={ref} {...props} />;\n};\n"],"mappings":";;;AAYA,MAAa,uBAAuB,EAAE,SAAS,KAAK,GAAG,YAAsC;
|
|
1
|
+
{"version":3,"file":"fieldset-description.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset-description.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type FieldsetDescriptionProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FieldsetDescription = ({ asChild, ref, ...props }: FieldsetDescriptionProps) => {\n const Component = asChild ? Slot : 'p';\n\n return <Component ref={ref} {...props} />;\n};\n"],"mappings":";;;AAYA,MAAa,uBAAuB,EAAE,SAAS,KAAK,GAAG,YAAsC;CAG3F,OAAO,oBAFW,UAAU,OAAO,KAE5B;EAAgB;EAAK,GAAI;EAAS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { nt as FieldsetLegendProps, tt as FieldsetLegend } from "../../alert-footer-
|
|
1
|
+
import { nt as FieldsetLegendProps, tt as FieldsetLegend } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FieldsetLegend, FieldsetLegendProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset-legend.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset-legend.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Label, type LabelProps } from '../label';\n\nexport type FieldsetLegendProps = MergeRight<\n LabelProps & HTMLAttributes<HTMLLegendElement>,\n {\n ref?: Ref<HTMLLegendElement>;\n }\n>;\n\nexport const FieldsetLegend = ({ children, dark, ref, ...props }: FieldsetLegendProps) => {\n return (\n <Label asChild dark={dark}>\n <legend ref={ref} {...props}>\n {children}\n </legend>\n </Label>\n );\n};\n"],"mappings":";;;;AAWA,MAAa,kBAAkB,EAAE,UAAU,MAAM,KAAK,GAAG,YAAiC;
|
|
1
|
+
{"version":3,"file":"fieldset-legend.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset-legend.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport { Label, type LabelProps } from '../label';\n\nexport type FieldsetLegendProps = MergeRight<\n LabelProps & HTMLAttributes<HTMLLegendElement>,\n {\n ref?: Ref<HTMLLegendElement>;\n }\n>;\n\nexport const FieldsetLegend = ({ children, dark, ref, ...props }: FieldsetLegendProps) => {\n return (\n <Label asChild dark={dark}>\n <legend ref={ref} {...props}>\n {children}\n </legend>\n </Label>\n );\n};\n"],"mappings":";;;;AAWA,MAAa,kBAAkB,EAAE,UAAU,MAAM,KAAK,GAAG,YAAiC;CACxF,OACE,oBAAC,OAAD;EAAO,SAAA;EAAc;YACnB,oBAAC,UAAD;GAAa;GAAK,GAAI;GACnB;GACM,CAAA;EACH,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ct as FieldsetProps, st as Fieldset } from "../../alert-footer-
|
|
1
|
+
import { ct as FieldsetProps, st as Fieldset } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Fieldset, FieldsetProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fieldset.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { FieldsetHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type FieldsetProps = MergeRight<\n DefaultProps & FieldsetHTMLAttributes<HTMLFieldSetElement>,\n {\n ref?: Ref<HTMLFieldSetElement>;\n }\n>;\n\nexport const Fieldset = ({ children, className, dark, ref, ...props }: FieldsetProps) => {\n return (\n <fieldset className={clsx('bi-fieldset', className)} data-dark={dark} ref={ref} {...props}>\n {children}\n </fieldset>\n );\n};\n"],"mappings":";;;AAYA,MAAa,YAAY,EAAE,UAAU,WAAW,MAAM,KAAK,GAAG,YAA2B;
|
|
1
|
+
{"version":3,"file":"fieldset.mjs","names":[],"sources":["../../../src/components/fieldset/fieldset.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { FieldsetHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type FieldsetProps = MergeRight<\n DefaultProps & FieldsetHTMLAttributes<HTMLFieldSetElement>,\n {\n ref?: Ref<HTMLFieldSetElement>;\n }\n>;\n\nexport const Fieldset = ({ children, className, dark, ref, ...props }: FieldsetProps) => {\n return (\n <fieldset className={clsx('bi-fieldset', className)} data-dark={dark} ref={ref} {...props}>\n {children}\n </fieldset>\n );\n};\n"],"mappings":";;;AAYA,MAAa,YAAY,EAAE,UAAU,WAAW,MAAM,KAAK,GAAG,YAA2B;CACvF,OACE,oBAAC,YAAD;EAAU,WAAW,KAAK,eAAe,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;EACjF;EACQ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { at as FieldsetDescription, ct as FieldsetProps, nt as FieldsetLegendProps, ot as FieldsetDescriptionProps, st as Fieldset, tt as FieldsetLegend } from "../../alert-footer-
|
|
1
|
+
import { at as FieldsetDescription, ct as FieldsetProps, nt as FieldsetLegendProps, ot as FieldsetDescriptionProps, st as Fieldset, tt as FieldsetLegend } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Fieldset, FieldsetDescription, FieldsetDescriptionProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as FilterGroup, et as FilterGroupProps } from "../../alert-footer-
|
|
1
|
+
import { $ as FilterGroup, et as FilterGroupProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FilterGroup, FilterGroupProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-group.mjs","names":[],"sources":["../../../src/components/filter-group/filter-group.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport clsx from 'clsx';\nimport { type Ref, useId, type HtmlHTMLAttributes, type ReactNode } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ChevronDownIcon, ChevronUpIcon } from '@bi-digital/icons';\n\nexport type FilterGroupProps = MergeRight<\n DefaultProps & AsChildProps & HtmlHTMLAttributes<HTMLDivElement>,\n {\n /** Icon displayed in the filter group */\n icon: ReactNode;\n /** Label of the filter group */\n label: ReactNode;\n /** Default open state of the filter group, should not be used together with `open` */\n defaultOpen?: boolean;\n /** Control the open state of the filter group */\n open?: boolean;\n /** Callback when the open state changes */\n onOpenChange?: (open: boolean) => void;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FilterGroup = ({\n dark,\n icon,\n label,\n defaultOpen = false,\n open,\n onOpenChange,\n children,\n className,\n ref,\n ...props\n}: FilterGroupProps) => {\n const filterContentId = useId();\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: defaultOpen,\n caller: 'FilterGroup',\n });\n return (\n <div className={clsx('bi-filter-group', className)} data-dark={dark} data-expanded={isOpen} {...props} ref={ref}>\n <button onClick={() => setIsOpen((prev) => !prev)} aria-expanded={isOpen} aria-controls={filterContentId}>\n {icon}\n <h3>{label}</h3>\n {isOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </button>\n <div id={filterContentId}>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;;;AAwBA,MAAa,eAAe,EAC1B,MACA,MACA,OACA,cAAc,OACd,MACA,cACA,UACA,WACA,KACA,GAAG,YACmB;CACtB,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;EACT,CAAC;
|
|
1
|
+
{"version":3,"file":"filter-group.mjs","names":[],"sources":["../../../src/components/filter-group/filter-group.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport clsx from 'clsx';\nimport { type Ref, useId, type HtmlHTMLAttributes, type ReactNode } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ChevronDownIcon, ChevronUpIcon } from '@bi-digital/icons';\n\nexport type FilterGroupProps = MergeRight<\n DefaultProps & AsChildProps & HtmlHTMLAttributes<HTMLDivElement>,\n {\n /** Icon displayed in the filter group */\n icon: ReactNode;\n /** Label of the filter group */\n label: ReactNode;\n /** Default open state of the filter group, should not be used together with `open` */\n defaultOpen?: boolean;\n /** Control the open state of the filter group */\n open?: boolean;\n /** Callback when the open state changes */\n onOpenChange?: (open: boolean) => void;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const FilterGroup = ({\n dark,\n icon,\n label,\n defaultOpen = false,\n open,\n onOpenChange,\n children,\n className,\n ref,\n ...props\n}: FilterGroupProps) => {\n const filterContentId = useId();\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: defaultOpen,\n caller: 'FilterGroup',\n });\n return (\n <div className={clsx('bi-filter-group', className)} data-dark={dark} data-expanded={isOpen} {...props} ref={ref}>\n <button onClick={() => setIsOpen((prev) => !prev)} aria-expanded={isOpen} aria-controls={filterContentId}>\n {icon}\n <h3>{label}</h3>\n {isOpen ? <ChevronUpIcon /> : <ChevronDownIcon />}\n </button>\n <div id={filterContentId}>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;;;AAwBA,MAAa,eAAe,EAC1B,MACA,MACA,OACA,cAAc,OACd,MACA,cACA,UACA,WACA,KACA,GAAG,YACmB;CACtB,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;EACT,CAAC;CACF,OACE,qBAAC,OAAD;EAAK,WAAW,KAAK,mBAAmB,UAAU;EAAE,aAAW;EAAM,iBAAe;EAAQ,GAAI;EAAY;YAA5G,CACE,qBAAC,UAAD;GAAQ,eAAe,WAAW,SAAS,CAAC,KAAK;GAAE,iBAAe;GAAQ,iBAAe;aAAzF;IACG;IACD,oBAAC,MAAD,EAAA,UAAK,OAAW,CAAA;IACf,SAAS,oBAAC,eAAD,EAAiB,CAAA,GAAG,oBAAC,iBAAD,EAAmB,CAAA;IAC1C;MACT,oBAAC,OAAD;GAAK,IAAI;GAAkB;GAAe,CAAA,CACtC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as FilterGroup, et as FilterGroupProps } from "../../alert-footer-
|
|
1
|
+
import { $ as FilterGroup, et as FilterGroupProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { FilterGroup, FilterGroupProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-links.mjs","names":[],"sources":["../../../src/components/footer/footer-links.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\n\nexport type FooterLinksProps = HTMLAttributes<HTMLDivElement> & {\n /**\n * Optional leading text to display before the links.\n */\n leadingText?: string;\n ref?: Ref<HTMLDivElement>;\n};\n\nexport const FooterLinks = ({ leadingText, children, ref, ...props }: FooterLinksProps) => {\n return (\n <div className='bi-footer--links' ref={ref} {...props}>\n {leadingText && <p>{leadingText}:</p>}\n <div>{children}</div>\n </div>\n );\n};\n"],"mappings":";;AAUA,MAAa,eAAe,EAAE,aAAa,UAAU,KAAK,GAAG,YAA8B;
|
|
1
|
+
{"version":3,"file":"footer-links.mjs","names":[],"sources":["../../../src/components/footer/footer-links.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\n\nexport type FooterLinksProps = HTMLAttributes<HTMLDivElement> & {\n /**\n * Optional leading text to display before the links.\n */\n leadingText?: string;\n ref?: Ref<HTMLDivElement>;\n};\n\nexport const FooterLinks = ({ leadingText, children, ref, ...props }: FooterLinksProps) => {\n return (\n <div className='bi-footer--links' ref={ref} {...props}>\n {leadingText && <p>{leadingText}:</p>}\n <div>{children}</div>\n </div>\n );\n};\n"],"mappings":";;AAUA,MAAa,eAAe,EAAE,aAAa,UAAU,KAAK,GAAG,YAA8B;CACzF,OACE,qBAAC,OAAD;EAAK,WAAU;EAAwB;EAAK,GAAI;YAAhD,CACG,eAAe,qBAAC,KAAD,EAAA,UAAA,CAAI,aAAY,IAAK,EAAA,CAAA,EACrC,oBAAC,OAAD,EAAM,UAAe,CAAA,CACjB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Q as FooterProps, Z as Footer } from "../../alert-footer-
|
|
1
|
+
import { Q as FooterProps, Z as Footer } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Footer, FooterProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.mjs","names":[],"sources":["../../../src/components/footer/footer.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { FacebookIcon, XIcon, LinkedinIcon, InstagramIcon } from '@bi-digital/icons';\nimport { Button } from '../button';\n\nexport type FooterProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The text to display in the copyright section.\n * @default 'Handelshøyskolen BI'\n */\n copyRightText?: string;\n /**\n * Whether to hide the accreditation icons.\n * @default false\n */\n hideAccreditationIcons?: boolean;\n /**\n * Whether to hide the social media icons.\n * @default false\n */\n hideSocialMediaIcons?: boolean;\n /**\n * Whether to hide the copyright text.\n * @default false\n */\n hideCopyRight?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Footer = ({\n dark,\n copyRightText = 'Handelshøyskolen BI',\n hideAccreditationIcons = false,\n hideSocialMediaIcons = false,\n hideCopyRight = false,\n className,\n children,\n ref,\n ...props\n}: FooterProps) => {\n return (\n <footer className={clsx('bi-footer', className)} data-dark={dark} ref={ref} {...props}>\n <div className='bi-footer--links-container'>{children}</div>\n {!hideAccreditationIcons && (\n <div className='bi-footer--accreditations'>\n <a\n aria-label='AACSB-link'\n target='_blank'\n href='https://www.aacsb.edu/accreditation'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--aacsb' />\n </a>\n <a\n aria-label='Equis-link'\n target='_blank'\n href='https://www.efmdglobal.org/accreditations/business-schools/equis/'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--equis' />\n </a>\n <a aria-label='AMBA-link' target='_blank' href='https://www.associationofmbas.com/' rel='noopener noreferrer'>\n <span className='bi-footer--amba' />\n </a>\n </div>\n )}\n {!hideSocialMediaIcons && (\n <div className='bi-footer--socials'>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.facebook.com/HandelshoyskolenBI/' rel='noopener noreferrer'>\n <FacebookIcon title='BI Facebook' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://twitter.com/handelshoyskbi' rel='noopener noreferrer'>\n <XIcon title='BI X' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a\n target='_blank'\n href='https://www.linkedin.com/school/bi-norwegian-business-school/'\n rel='noopener noreferrer'\n >\n <LinkedinIcon title='BI LinkedIn' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.instagram.com/binorwegianbusinesschool/' rel='noopener noreferrer'>\n <InstagramIcon title='BI Instagram' />\n </a>\n </Button>\n </div>\n )}\n {!hideCopyRight && <p className='bi-footer--copyright'>{`© ${new Date().getFullYear()} ${copyRightText}`}</p>}\n </footer>\n );\n};\n"],"mappings":";;;;;;AAkCA,MAAa,UAAU,EACrB,MACA,gBAAgB,uBAChB,yBAAyB,OACzB,uBAAuB,OACvB,gBAAgB,OAChB,WACA,UACA,KACA,GAAG,YACc;
|
|
1
|
+
{"version":3,"file":"footer.mjs","names":[],"sources":["../../../src/components/footer/footer.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { FacebookIcon, XIcon, LinkedinIcon, InstagramIcon } from '@bi-digital/icons';\nimport { Button } from '../button';\n\nexport type FooterProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The text to display in the copyright section.\n * @default 'Handelshøyskolen BI'\n */\n copyRightText?: string;\n /**\n * Whether to hide the accreditation icons.\n * @default false\n */\n hideAccreditationIcons?: boolean;\n /**\n * Whether to hide the social media icons.\n * @default false\n */\n hideSocialMediaIcons?: boolean;\n /**\n * Whether to hide the copyright text.\n * @default false\n */\n hideCopyRight?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Footer = ({\n dark,\n copyRightText = 'Handelshøyskolen BI',\n hideAccreditationIcons = false,\n hideSocialMediaIcons = false,\n hideCopyRight = false,\n className,\n children,\n ref,\n ...props\n}: FooterProps) => {\n return (\n <footer className={clsx('bi-footer', className)} data-dark={dark} ref={ref} {...props}>\n <div className='bi-footer--links-container'>{children}</div>\n {!hideAccreditationIcons && (\n <div className='bi-footer--accreditations'>\n <a\n aria-label='AACSB-link'\n target='_blank'\n href='https://www.aacsb.edu/accreditation'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--aacsb' />\n </a>\n <a\n aria-label='Equis-link'\n target='_blank'\n href='https://www.efmdglobal.org/accreditations/business-schools/equis/'\n rel='noopener noreferrer'\n >\n <span className='bi-footer--equis' />\n </a>\n <a aria-label='AMBA-link' target='_blank' href='https://www.associationofmbas.com/' rel='noopener noreferrer'>\n <span className='bi-footer--amba' />\n </a>\n </div>\n )}\n {!hideSocialMediaIcons && (\n <div className='bi-footer--socials'>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.facebook.com/HandelshoyskolenBI/' rel='noopener noreferrer'>\n <FacebookIcon title='BI Facebook' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://twitter.com/handelshoyskbi' rel='noopener noreferrer'>\n <XIcon title='BI X' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a\n target='_blank'\n href='https://www.linkedin.com/school/bi-norwegian-business-school/'\n rel='noopener noreferrer'\n >\n <LinkedinIcon title='BI LinkedIn' />\n </a>\n </Button>\n <Button size='large' variant='text' icon asChild dark={dark}>\n <a target='_blank' href='https://www.instagram.com/binorwegianbusinesschool/' rel='noopener noreferrer'>\n <InstagramIcon title='BI Instagram' />\n </a>\n </Button>\n </div>\n )}\n {!hideCopyRight && <p className='bi-footer--copyright'>{`© ${new Date().getFullYear()} ${copyRightText}`}</p>}\n </footer>\n );\n};\n"],"mappings":";;;;;;AAkCA,MAAa,UAAU,EACrB,MACA,gBAAgB,uBAChB,yBAAyB,OACzB,uBAAuB,OACvB,gBAAgB,OAChB,WACA,UACA,KACA,GAAG,YACc;CACjB,OACE,qBAAC,UAAD;EAAQ,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;YAAhF;GACE,oBAAC,OAAD;IAAK,WAAU;IAA8B;IAAe,CAAA;GAC3D,CAAC,0BACA,qBAAC,OAAD;IAAK,WAAU;cAAf;KACE,oBAAC,KAAD;MACE,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gBAEJ,oBAAC,QAAD,EAAM,WAAU,oBAAqB,CAAA;MACnC,CAAA;KACJ,oBAAC,KAAD;MACE,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gBAEJ,oBAAC,QAAD,EAAM,WAAU,oBAAqB,CAAA;MACnC,CAAA;KACJ,oBAAC,KAAD;MAAG,cAAW;MAAY,QAAO;MAAS,MAAK;MAAqC,KAAI;gBACtF,oBAAC,QAAD,EAAM,WAAU,mBAAoB,CAAA;MAClC,CAAA;KACA;;GAEP,CAAC,wBACA,qBAAC,OAAD;IAAK,WAAU;cAAf;KACE,oBAAC,QAAD;MAAQ,MAAK;MAAQ,SAAQ;MAAO,MAAA;MAAK,SAAA;MAAc;gBACrD,oBAAC,KAAD;OAAG,QAAO;OAAS,MAAK;OAA+C,KAAI;iBACzE,oBAAC,cAAD,EAAc,OAAM,eAAgB,CAAA;OAClC,CAAA;MACG,CAAA;KACT,oBAAC,QAAD;MAAQ,MAAK;MAAQ,SAAQ;MAAO,MAAA;MAAK,SAAA;MAAc;gBACrD,oBAAC,KAAD;OAAG,QAAO;OAAS,MAAK;OAAqC,KAAI;iBAC/D,oBAAC,OAAD,EAAO,OAAM,QAAS,CAAA;OACpB,CAAA;MACG,CAAA;KACT,oBAAC,QAAD;MAAQ,MAAK;MAAQ,SAAQ;MAAO,MAAA;MAAK,SAAA;MAAc;gBACrD,oBAAC,KAAD;OACE,QAAO;OACP,MAAK;OACL,KAAI;iBAEJ,oBAAC,cAAD,EAAc,OAAM,eAAgB,CAAA;OAClC,CAAA;MACG,CAAA;KACT,oBAAC,QAAD;MAAQ,MAAK;MAAQ,SAAQ;MAAO,MAAA;MAAK,SAAA;MAAc;gBACrD,oBAAC,KAAD;OAAG,QAAO;OAAS,MAAK;OAAsD,KAAI;iBAChF,oBAAC,eAAD,EAAe,OAAM,gBAAiB,CAAA;OACpC,CAAA;MACG,CAAA;KACL;;GAEP,CAAC,iBAAiB,oBAAC,KAAD;IAAG,WAAU;cAAwB,sBAAK,IAAI,MAAM,EAAC,aAAa,CAAC,GAAG;IAAoB,CAAA;GACtG"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Q as FooterProps, Z as Footer } from "../../alert-footer-
|
|
1
|
+
import { Q as FooterProps, Z as Footer } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
import { n as FooterLinksProps, t as FooterLinks } from "../../footer-links-DwBghNrz.mjs";
|
|
3
3
|
export { Footer, FooterLinks, FooterLinksProps, FooterProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as FilterGroup, $t as Input, A as SelectOptgroupProps, At as DialogCloseButtonProps, B as PaginationButtonProps, Bt as DialogProps, C as Spinner, Ct as Dropdown, D as Selectfield, Dt as Popover, E as SkipLinkProps, Et as PopoverTriggerProps, F as Search, Ft as DialogHeader, G as Navbar, Gt as Details, H as PaginationProps, Ht as DetailsSummaryProps, I as SearchProps, It as DialogHeaderProps, J as LogoProps, Jt as ChipProps, K as NavbarProps, Kt as DetailsProps, L as Radio, Lt as DialogContent, M as SelectOptionProps, Mt as DialogTriggerProps, N as Select, Nt as DialogFooter, O as SelectfieldProps, Ot as PopoverProps, P as SelectProps, Pt as DialogFooterProps, Q as FooterProps, Qt as CheckboxProps, R as RadioProps, Rt as DialogContentProps, S as SwitchProps, Sn as AlertProps, St as DropdownButtonProps, T as SkipLink, Tt as PopoverTrigger, U as SubNavbar, Ut as DetailsContent, V as Pagination, Vt as DetailsSummary, W as SubNavbarProps, Wt as DetailsContentProps, X as LinkProps, Xt as CheckboxSubsectionProps, Y as Link, Yt as CheckboxSubsection, Z as Footer, Zt as Checkbox, _n as Badge, _t as DropdownTriggerContext, a as ValidationMessage, an as CardHeader, at as FieldsetDescription, b as TabsProps, bn as AvatarProps, bt as DropdownTriggerProps, c as TextfieldProps, cn as CardContentProps, ct as FieldsetProps, d as TabsPanel, dn as CardActions, dt as FieldAffixes, en as InputProps, et as FilterGroupProps, f as TabsPanelProps, fn as CardActionsProps, ft as FieldAffixesProps, g as TabProps, gn as ButtonProps, gt as FieldProps, h as Tab, hn as Button, ht as Field, in as CardMediaProps, it as LabelProps, j as SelectOption, jt as DialogTrigger, k as SelectOptgroup, kt as DialogCloseButton, l as Textarea, ln as CardAction, lt as FieldAffix, m as TabsListProps, mn as CardProps, mt as FieldDescriptionProps, n as AlertFooterProps, nn as CardDateProps, nt as FieldsetLegendProps, o as ValidationMessageProps, on as CardHeaderProps, ot as FieldsetDescriptionProps, p as TabsList, pn as Card, pt as FieldDescription, q as Logo, qt as Chip, rn as CardMedia, rt as Label, s as Textfield, sn as CardContent, st as Fieldset, t as AlertFooter, tn as CardDate, tt as FieldsetLegend, u as TextareaProps, un as CardActionProps, ut as FieldAffixProps, v as Tabs, vn as BadgeProps, vt as DropdownTriggerContextProps, w as SpinnerProps, wt as DropdownProps, x as Switch, xn as Alert, xt as DropdownButton, y as TabsContext, yn as Avatar, yt as DropdownTrigger, z as PaginationButton, zt as Dialog } from "../alert-footer-
|
|
1
|
+
import { $ as FilterGroup, $t as Input, A as SelectOptgroupProps, At as DialogCloseButtonProps, B as PaginationButtonProps, Bt as DialogProps, C as Spinner, Ct as Dropdown, D as Selectfield, Dt as Popover, E as SkipLinkProps, Et as PopoverTriggerProps, F as Search, Ft as DialogHeader, G as Navbar, Gt as Details, H as PaginationProps, Ht as DetailsSummaryProps, I as SearchProps, It as DialogHeaderProps, J as LogoProps, Jt as ChipProps, K as NavbarProps, Kt as DetailsProps, L as Radio, Lt as DialogContent, M as SelectOptionProps, Mt as DialogTriggerProps, N as Select, Nt as DialogFooter, O as SelectfieldProps, Ot as PopoverProps, P as SelectProps, Pt as DialogFooterProps, Q as FooterProps, Qt as CheckboxProps, R as RadioProps, Rt as DialogContentProps, S as SwitchProps, Sn as AlertProps, St as DropdownButtonProps, T as SkipLink, Tt as PopoverTrigger, U as SubNavbar, Ut as DetailsContent, V as Pagination, Vt as DetailsSummary, W as SubNavbarProps, Wt as DetailsContentProps, X as LinkProps, Xt as CheckboxSubsectionProps, Y as Link, Yt as CheckboxSubsection, Z as Footer, Zt as Checkbox, _n as Badge, _t as DropdownTriggerContext, a as ValidationMessage, an as CardHeader, at as FieldsetDescription, b as TabsProps, bn as AvatarProps, bt as DropdownTriggerProps, c as TextfieldProps, cn as CardContentProps, ct as FieldsetProps, d as TabsPanel, dn as CardActions, dt as FieldAffixes, en as InputProps, et as FilterGroupProps, f as TabsPanelProps, fn as CardActionsProps, ft as FieldAffixesProps, g as TabProps, gn as ButtonProps, gt as FieldProps, h as Tab, hn as Button, ht as Field, in as CardMediaProps, it as LabelProps, j as SelectOption, jt as DialogTrigger, k as SelectOptgroup, kt as DialogCloseButton, l as Textarea, ln as CardAction, lt as FieldAffix, m as TabsListProps, mn as CardProps, mt as FieldDescriptionProps, n as AlertFooterProps, nn as CardDateProps, nt as FieldsetLegendProps, o as ValidationMessageProps, on as CardHeaderProps, ot as FieldsetDescriptionProps, p as TabsList, pn as Card, pt as FieldDescription, q as Logo, qt as Chip, rn as CardMedia, rt as Label, s as Textfield, sn as CardContent, st as Fieldset, t as AlertFooter, tn as CardDate, tt as FieldsetLegend, u as TextareaProps, un as CardActionProps, ut as FieldAffixProps, v as Tabs, vn as BadgeProps, vt as DropdownTriggerContextProps, w as SpinnerProps, wt as DropdownProps, x as Switch, xn as Alert, xt as DropdownButton, y as TabsContext, yn as Avatar, yt as DropdownTrigger, z as PaginationButton, zt as Dialog } from "../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "../dialog-trigger-context-DbUhxoNL.mjs";
|
|
3
3
|
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../popover-trigger-context-BLjAozBn.mjs";
|
|
4
4
|
import { n as DropdownItemProps, t as DropdownItem } from "../dropdown-item-bA64wFOZ.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as Input, en as InputProps } from "../../alert-footer-
|
|
1
|
+
import { $t as Input, en as InputProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Input, InputProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as Input, en as InputProps } from "../../alert-footer-
|
|
1
|
+
import { $t as Input, en as InputProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Input, InputProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type InputProps = MergeRight<\n DefaultProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'type'>,\n {\n /**\n * Size of the input field.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * The `input` type\n * @default 'text'\n * */\n type?:\n | 'checkbox'\n | 'color'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n /** Set the visible width, in characters, of the `Input` component. */\n visibleWidth?: number;\n /**\n * Disable the element.\n * Avoid using if possible for accessibility purposes\n */\n disabled?: boolean;\n /** Toggle `readOnly` */\n readOnly?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Input = ({\n type = 'text',\n size = 'medium',\n visibleWidth,\n className,\n onChange,\n onClick,\n dark,\n readOnly,\n ref,\n ...props\n}: InputProps) => {\n return (\n <input\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n type={type}\n readOnly={readOnly}\n onChange={(event) => readOnly || onChange?.(event)} // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick={(event) => {\n if (readOnly) event.preventDefault(); // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick?.(event);\n }}\n size={visibleWidth}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAgDA,MAAa,SAAS,EACpB,OAAO,QACP,OAAO,UACP,cACA,WACA,UACA,SACA,MACA,UACA,KACA,GAAG,YACa;
|
|
1
|
+
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { InputHTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type InputProps = MergeRight<\n DefaultProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'type'>,\n {\n /**\n * Size of the input field.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * The `input` type\n * @default 'text'\n * */\n type?:\n | 'checkbox'\n | 'color'\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'file'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'radio'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url'\n | 'week';\n /** Set the visible width, in characters, of the `Input` component. */\n visibleWidth?: number;\n /**\n * Disable the element.\n * Avoid using if possible for accessibility purposes\n */\n disabled?: boolean;\n /** Toggle `readOnly` */\n readOnly?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Input = ({\n type = 'text',\n size = 'medium',\n visibleWidth,\n className,\n onChange,\n onClick,\n dark,\n readOnly,\n ref,\n ...props\n}: InputProps) => {\n return (\n <input\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n type={type}\n readOnly={readOnly}\n onChange={(event) => readOnly || onChange?.(event)} // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick={(event) => {\n if (readOnly) event.preventDefault(); // Make readonly work for [type=\"checkbox\"]/[type=\"radio\"]\n onClick?.(event);\n }}\n size={visibleWidth}\n {...props}\n />\n );\n};\n"],"mappings":";;;AAgDA,MAAa,SAAS,EACpB,OAAO,QACP,OAAO,UACP,cACA,WACA,UACA,SACA,MACA,UACA,KACA,GAAG,YACa;CAChB,OACE,oBAAC,SAAD;EACE,WAAW,KAAK,YAAY,UAAU;EACtC,aAAW;EACX,aAAW;EACN;EACC;EACI;EACV,WAAW,UAAU,YAAY,WAAW,MAAM;EAClD,UAAU,UAAU;GAClB,IAAI,UAAU,MAAM,gBAAgB;GACpC,UAAU,MAAM;;EAElB,MAAM;EACN,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { it as LabelProps, rt as Label } from "../../alert-footer-
|
|
1
|
+
import { it as LabelProps, rt as Label } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Label, LabelProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { it as LabelProps, rt as Label } from "../../alert-footer-
|
|
1
|
+
import { it as LabelProps, rt as Label } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Label, LabelProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.mjs","names":[],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { LabelHTMLAttributes, Ref } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LabelProps = MergeRight<\n DefaultProps & AsChildProps & LabelHTMLAttributes<HTMLLabelElement>,\n {\n /**\n * Sets the font weight of the label. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset\n * @default 'semibold'\n */\n weight?: 'regular' | 'medium' | 'semibold';\n ref?: Ref<HTMLLabelElement>;\n }\n>;\n\nexport const Label = ({ className, weight = 'semibold', dark, asChild, ref, ...props }: LabelProps) => {\n const Component = asChild ? Slot : 'label';\n\n return (\n <Component ref={ref} className={clsx('bi-label', className)} data-dark={dark} data-weight={weight} {...props} />\n );\n};\n"],"mappings":";;;;AAkBA,MAAa,SAAS,EAAE,WAAW,SAAS,YAAY,MAAM,SAAS,KAAK,GAAG,YAAwB;
|
|
1
|
+
{"version":3,"file":"label.mjs","names":[],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { LabelHTMLAttributes, Ref } from 'react';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LabelProps = MergeRight<\n DefaultProps & AsChildProps & LabelHTMLAttributes<HTMLLabelElement>,\n {\n /**\n * Sets the font weight of the label. Use this when you have a label hierarchy, such as checkboxes/radios in a fieldset\n * @default 'semibold'\n */\n weight?: 'regular' | 'medium' | 'semibold';\n ref?: Ref<HTMLLabelElement>;\n }\n>;\n\nexport const Label = ({ className, weight = 'semibold', dark, asChild, ref, ...props }: LabelProps) => {\n const Component = asChild ? Slot : 'label';\n\n return (\n <Component ref={ref} className={clsx('bi-label', className)} data-dark={dark} data-weight={weight} {...props} />\n );\n};\n"],"mappings":";;;;AAkBA,MAAa,SAAS,EAAE,WAAW,SAAS,YAAY,MAAM,SAAS,KAAK,GAAG,YAAwB;CAGrG,OACE,oBAHgB,UAAU,OAAO,SAGjC;EAAgB;EAAK,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAM,eAAa;EAAQ,GAAI;EAAS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { X as LinkProps, Y as Link } from "../../alert-footer-
|
|
1
|
+
import { X as LinkProps, Y as Link } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Link, LinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { X as LinkProps, Y as Link } from "../../alert-footer-
|
|
1
|
+
import { X as LinkProps, Y as Link } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Link, LinkProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.mjs","names":[],"sources":["../../../src/components/link/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { AnchorHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LinkProps = MergeRight<\n DefaultProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Set the color of the link.\n * @default 'primary'\n */\n color?: 'primary' | 'neutral';\n /**\n * Control the underline style of the link.\n * - 'always': The link is always underlined.\n * - 'hover': The link is underlined only on hover.\n * @default 'always'\n */\n underline?: 'always' | 'hover';\n children: ReactNode;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const Link = ({ asChild, className, color, dark, underline, ref, ...rest }: LinkProps) => {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={clsx('bi-link', className)}\n data-color={color}\n data-dark={dark}\n data-underline={underline}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;AA+BA,MAAa,QAAQ,EAAE,SAAS,WAAW,OAAO,MAAM,WAAW,KAAK,GAAG,WAAsB;
|
|
1
|
+
{"version":3,"file":"link.mjs","names":[],"sources":["../../../src/components/link/link.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { AnchorHTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type LinkProps = MergeRight<\n DefaultProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n /**\n * Set the color of the link.\n * @default 'primary'\n */\n color?: 'primary' | 'neutral';\n /**\n * Control the underline style of the link.\n * - 'always': The link is always underlined.\n * - 'hover': The link is underlined only on hover.\n * @default 'always'\n */\n underline?: 'always' | 'hover';\n children: ReactNode;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const Link = ({ asChild, className, color, dark, underline, ref, ...rest }: LinkProps) => {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={clsx('bi-link', className)}\n data-color={color}\n data-dark={dark}\n data-underline={underline}\n ref={ref}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;AA+BA,MAAa,QAAQ,EAAE,SAAS,WAAW,OAAO,MAAM,WAAW,KAAK,GAAG,WAAsB;CAG/F,OACE,oBAHgB,UAAU,OAAO,KAGjC;EACE,WAAW,KAAK,WAAW,UAAU;EACrC,cAAY;EACZ,aAAW;EACX,kBAAgB;EACX;EACL,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { J as LogoProps, q as Logo } from "../../alert-footer-
|
|
1
|
+
import { J as LogoProps, q as Logo } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Logo, LogoProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { J as LogoProps, q as Logo } from "../../alert-footer-
|
|
1
|
+
import { J as LogoProps, q as Logo } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Logo, LogoProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.mjs","names":[],"sources":["../../../src/components/logo/logo.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type LogoProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n {\n /**\n * Determines if the international logo should be used.\n * @default false\n */\n international?: boolean;\n /**\n * Determines if the logo text should be displayed vertically.\n * Only applies when `international` is `true`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Determines the height of the logo.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Logo = ({\n dark = false,\n international = false,\n vertical = false,\n size = 'medium',\n className,\n ref,\n ...props\n}: LogoProps) => {\n return (\n <span\n {...props}\n className={clsx('bi-logo', className)}\n data-dark={dark}\n data-international={international}\n data-vertical={vertical}\n data-size={size}\n ref={ref}\n />\n );\n};\n"],"mappings":";;;AA4BA,MAAa,QAAQ,EACnB,OAAO,OACP,gBAAgB,OAChB,WAAW,OACX,OAAO,UACP,WACA,KACA,GAAG,YACY;
|
|
1
|
+
{"version":3,"file":"logo.mjs","names":[],"sources":["../../../src/components/logo/logo.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type LogoProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>,\n {\n /**\n * Determines if the international logo should be used.\n * @default false\n */\n international?: boolean;\n /**\n * Determines if the logo text should be displayed vertically.\n * Only applies when `international` is `true`.\n * @default false\n */\n vertical?: boolean;\n /**\n * Determines the height of the logo.\n * @default 'medium'\n */\n size?: 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Logo = ({\n dark = false,\n international = false,\n vertical = false,\n size = 'medium',\n className,\n ref,\n ...props\n}: LogoProps) => {\n return (\n <span\n {...props}\n className={clsx('bi-logo', className)}\n data-dark={dark}\n data-international={international}\n data-vertical={vertical}\n data-size={size}\n ref={ref}\n />\n );\n};\n"],"mappings":";;;AA4BA,MAAa,QAAQ,EACnB,OAAO,OACP,gBAAgB,OAChB,WAAW,OACX,OAAO,UACP,WACA,KACA,GAAG,YACY;CACf,OACE,oBAAC,QAAD;EACE,GAAI;EACJ,WAAW,KAAK,WAAW,UAAU;EACrC,aAAW;EACX,sBAAoB;EACpB,iBAAe;EACf,aAAW;EACN;EACL,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as Navbar, K as NavbarProps, U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-
|
|
1
|
+
import { G as Navbar, K as NavbarProps, U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Navbar, NavbarProps, SubNavbar, SubNavbarProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { G as Navbar, K as NavbarProps } from "../../alert-footer-
|
|
1
|
+
import { G as Navbar, K as NavbarProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Navbar, NavbarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.mjs","names":[],"sources":["../../../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,UAAU,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,KACA,GAAG,YACc;
|
|
1
|
+
{"version":3,"file":"navbar.mjs","names":[],"sources":["../../../src/components/navbar/navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Logo } from '../logo';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type NavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * Skip link.\n */\n skipLink?: ReactNode;\n /**\n * Determines if the navbar should be fixed.\n * @default false\n */\n fixed?: boolean;\n /**\n * Aria label for the home link.\n */\n homeAriaLabel: string;\n /**\n * Href for the home link.\n */\n homeHref: string;\n /**\n * Override the default logo\n */\n logo?: ReactNode;\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const Navbar = ({\n dark = false,\n fixed = false,\n homeAriaLabel,\n skipLink,\n homeHref,\n logo,\n children,\n className,\n ref,\n ...props\n}: NavbarProps) => {\n return (\n <nav {...props} className={clsx('bi-navbar', className)} data-fixed={fixed} data-dark={dark} ref={ref}>\n {skipLink}\n <header>\n <a aria-label={homeAriaLabel} href={homeHref}>\n {logo || <Logo dark={dark} />}\n </a>\n {children}\n </header>\n </nav>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,UAAU,EACrB,OAAO,OACP,QAAQ,OACR,eACA,UACA,UACA,MACA,UACA,WACA,KACA,GAAG,YACc;CACjB,OACE,qBAAC,OAAD;EAAK,GAAI;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,cAAY;EAAO,aAAW;EAAW;YAAlG,CACG,UACD,qBAAC,UAAD,EAAA,UAAA,CACE,oBAAC,KAAD;GAAG,cAAY;GAAe,MAAM;aACjC,QAAQ,oBAAC,MAAD,EAAY,MAAQ,CAAA;GAC3B,CAAA,EACH,SACM,EAAA,CAAA,CACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-
|
|
1
|
+
import { U as SubNavbar, W as SubNavbarProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { SubNavbar, SubNavbarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar.mjs","names":[],"sources":["../../../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,aAAa,EAAE,OAAO,OAAO,UAAU,WAAW,KAAK,GAAG,YAA4B;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"sub-navbar.mjs","names":[],"sources":["../../../src/components/navbar/sub-navbar.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { useRef, type HTMLAttributes, type Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\nimport { useIsElementAboveViewport, useScrollDirection } from '../../utilities/hooks';\n\nexport type SubNavbarProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLElement>;\n }\n>;\n\nexport const SubNavbar = ({ dark = false, children, className, ref, ...props }: SubNavbarProps) => {\n const elementRef = useRef<HTMLDivElement>(null);\n const fixed = useIsElementAboveViewport(elementRef);\n const scrollDirection = useScrollDirection();\n\n return (\n <div className='bi-sub-navbar--wrapper'>\n <div ref={elementRef} />\n <nav\n className={clsx('bi-sub-navbar', className)}\n data-fixed={fixed}\n data-scroll-dir={fixed ? scrollDirection : undefined}\n data-dark={dark}\n {...props}\n ref={ref}\n >\n {children}\n </nav>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAaA,MAAa,aAAa,EAAE,OAAO,OAAO,UAAU,WAAW,KAAK,GAAG,YAA4B;CACjG,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,QAAQ,0BAA0B,WAAW;CACnD,MAAM,kBAAkB,oBAAoB;CAE5C,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf,CACE,oBAAC,OAAD,EAAK,KAAK,YAAc,CAAA,EACxB,oBAAC,OAAD;GACE,WAAW,KAAK,iBAAiB,UAAU;GAC3C,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB,KAAA;GAC3C,aAAW;GACX,GAAI;GACC;GAEJ;GACG,CAAA,CACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as PaginationButtonProps, H as PaginationProps, V as Pagination, z as PaginationButton } from "../../alert-footer-
|
|
1
|
+
import { B as PaginationButtonProps, H as PaginationProps, V as Pagination, z as PaginationButton } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
import { n as PaginationItemProps, t as PaginationItem } from "../../pagination-item-DJicBrIN.mjs";
|
|
3
3
|
export { Pagination, PaginationButton, PaginationButtonProps, PaginationItem, PaginationItemProps, PaginationProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { B as PaginationButtonProps, z as PaginationButton } from "../../alert-footer-
|
|
1
|
+
import { B as PaginationButtonProps, z as PaginationButton } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { PaginationButton, PaginationButtonProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-item.mjs","names":[],"sources":["../../../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;AAYA,MAAa,kBAAkB,EAAE,KAAK,SAAS,UAAU,GAAG,WAAgC;
|
|
1
|
+
{"version":3,"file":"pagination-item.mjs","names":[],"sources":["../../../src/components/pagination/pagination-item.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { HTMLAttributes, Ref } from 'react';\n\nexport type PaginationItemProps = HTMLAttributes<HTMLLIElement> & {\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<HTMLLIElement>;\n};\n\nexport const PaginationItem = ({ ref, asChild, children, ...rest }: PaginationItemProps) => {\n const Component = asChild ? Slot : 'li';\n return (\n <Component ref={ref} {...rest}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;AAYA,MAAa,kBAAkB,EAAE,KAAK,SAAS,UAAU,GAAG,WAAgC;CAE1F,OACE,oBAFgB,UAAU,OAAO,MAEjC;EAAgB;EAAK,GAAI;EACtB;EACS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { H as PaginationProps, V as Pagination } from "../../alert-footer-
|
|
1
|
+
import { H as PaginationProps, V as Pagination } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Pagination, PaginationProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.mjs","names":[],"sources":["../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;AAYA,MAAa,cAAc,EAAE,WAAW,OAAO,OAAO,KAAK,UAAU,GAAG,YAA6B;
|
|
1
|
+
{"version":3,"file":"pagination.mjs","names":[],"sources":["../../../src/components/pagination/pagination.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type PaginationProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n ref?: Ref<HTMLUListElement>;\n }\n>;\n\nexport const Pagination = ({ className, dark = false, ref, children, ...props }: PaginationProps) => {\n return (\n <nav className={clsx('bi-pagination', className)} data-dark={dark} ref={ref} {...props}>\n <ul>{children}</ul>\n </nav>\n );\n};\n"],"mappings":";;;AAYA,MAAa,cAAc,EAAE,WAAW,OAAO,OAAO,KAAK,UAAU,GAAG,YAA6B;CACnG,OACE,oBAAC,OAAD;EAAK,WAAW,KAAK,iBAAiB,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;YAC/E,oBAAC,MAAD,EAAK,UAAc,CAAA;EACf,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Dt as Popover, Et as PopoverTriggerProps, Ot as PopoverProps, Tt as PopoverTrigger } from "../../alert-footer-
|
|
1
|
+
import { Dt as Popover, Et as PopoverTriggerProps, Ot as PopoverProps, Tt as PopoverTrigger } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "../../popover-trigger-context-BLjAozBn.mjs";
|
|
3
3
|
export { Popover, PopoverProps, PopoverTrigger, PopoverTriggerContext, PopoverTriggerContextProps, PopoverTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger-context.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAIA,MAAa,UAAU,cAKpB,EAAE,CAAC;;;;;;;;;;;;AA2BN,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CAErG,MAAM,CAAC,WAAW,gBAAgB,SADV,
|
|
1
|
+
{"version":3,"file":"popover-trigger-context.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger-context.tsx"],"sourcesContent":["import { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { createContext, useId, useState } from 'react';\nimport type { ReactNode } from 'react';\n\nexport const Context = createContext<{\n popoverId?: string;\n setPopoverId?: (id: string) => void;\n popoverOpen?: boolean;\n setPopoverOpen?: React.Dispatch<React.SetStateAction<boolean>>;\n}>({});\n\nexport type PopoverTriggerContextProps = {\n children: ReactNode;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n};\n\n/**\n * PopoverTriggerContext component, use to wrap a PopoverTrigger and Popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\nexport const PopoverTriggerContext = ({ children, open, onOpenChange }: PopoverTriggerContextProps) => {\n const randomPopoverId = useId();\n const [popoverId, setPopoverId] = useState(randomPopoverId);\n const [popoverOpen, setPopoverOpen] = useControllableState({\n prop: open,\n onChange: onOpenChange,\n defaultProp: false,\n caller: 'PopoverTriggerContext',\n });\n\n return <Context value={{ popoverId, setPopoverId, popoverOpen, setPopoverOpen }}>{children}</Context>;\n};\n"],"mappings":";;;;AAIA,MAAa,UAAU,cAKpB,EAAE,CAAC;;;;;;;;;;;;AA2BN,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CAErG,MAAM,CAAC,WAAW,gBAAgB,SADV,OACkC,CAAC;CAC3D,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;EACT,CAAC;CAEF,OAAO,oBAAC,SAAD;EAAS,OAAO;GAAE;GAAW;GAAc;GAAa;GAAgB;EAAG;EAAmB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Et as PopoverTriggerProps, Tt as PopoverTrigger } from "../../alert-footer-
|
|
1
|
+
import { Et as PopoverTriggerProps, Tt as PopoverTrigger } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { PopoverTrigger, PopoverTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\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<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// oxlint-disable-next-line no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,kBAAkB,EAAE,IAAI,QAAQ,SAAS,KAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI,QAAQ;
|
|
1
|
+
{"version":3,"file":"popover-trigger.mjs","names":[],"sources":["../../../src/components/popover/popover-trigger.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { type HTMLAttributes, Ref, use } from 'react';\nimport type { DefaultProps } from '../../types';\nimport { Button, type ButtonProps } from '../button';\nimport { Context } from './popover-trigger-context';\n\nexport type PopoverTriggerProps =\n | ({\n /**\n * Will render the trigger as inline text.\n * @default false\n */\n inline?: true;\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<HTMLButtonElement>;\n } & HTMLAttributes<HTMLButtonElement> &\n DefaultProps)\n | ({\n /**\n * Will not render the trigger as inline text.\n * @default false\n */\n inline?: false;\n } & ButtonProps);\n\n/**\n * PopoverTrigger component, used to trigger a popover.\n *\n * @example\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example inline\n * <PopoverTriggerContext>\n * <Paragraph>\n * We can use it <PopoverTrigger inline={true}>inline</PopoverTrigger>.\n * </Paragraph>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n */\n// oxlint-disable-next-line no-unused-vars\nexport const PopoverTrigger = ({ id, inline, asChild, ref, ...rest }: PopoverTriggerProps) => {\n const { popoverId, popoverOpen, setPopoverOpen } = use(Context);\n const Component = asChild ? Slot : inline ? 'button' : Button;\n\n const popoverProps = Object.assign(\n {\n onClick: () => setPopoverOpen?.((prev) => !prev),\n 'aria-controls': popoverId,\n 'aria-expanded': popoverOpen,\n ...(inline\n ? {\n 'data-popover': 'inline',\n }\n : {}),\n },\n rest,\n );\n\n return <Component ref={ref} {...popoverProps} />;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,MAAa,kBAAkB,EAAE,IAAI,QAAQ,SAAS,KAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI,QAAQ;CAiB/D,OAAO,oBAhBW,UAAU,OAAO,SAAS,WAAW,QAgBhD;EAAgB;EAAK,GAdP,OAAO,OAC1B;GACE,eAAe,kBAAkB,SAAS,CAAC,KAAK;GAChD,iBAAiB;GACjB,iBAAiB;GACjB,GAAI,SACA,EACE,gBAAgB,UACjB,GACD,EAAE;GACP,EACD,KAG0C;EAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Dt as Popover, Ot as PopoverProps } from "../../alert-footer-
|
|
1
|
+
import { Dt as Popover, Ot as PopoverProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Popover, PopoverProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n dark = false,\n arrow = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n // False positive: isControlled will never change, but is just used to store the initial controlled state\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ...(arrow ? [arrowPseudoElement] : []),\n size({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--bic-popover-trigger-width', `${rects.reference.width}px`);\n },\n }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware, padding, arrow]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-arrow={arrow || undefined}\n data-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,EAAE,EACvB,UAAU,IACV,OAAO,OACP,QAAQ,OACR,UAAU,OACV,KACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,SAAS,KAAA,EAAU;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,IAAI,CAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAE/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;
|
|
1
|
+
{"version":3,"file":"popover.mjs","names":["cl"],"sources":["../../../src/components/popover/popover.tsx"],"sourcesContent":["// Thanks to Designsystemet:\n// https://github.com/digdir/designsystemet/blob/8aa6dc274e5b0338d15572f44b5dd3fab6fa4eb1/packages/react/src/components/Popover/Popover.tsx\n\nimport { autoUpdate, computePosition, flip, offset, shift, hide, size } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\nimport { Slot } from '@radix-ui/react-slot';\nimport cl from 'clsx/lite';\nimport { use, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useEffect } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\nimport { Context } from './popover-trigger-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { arrowPseudoElement } from '../../vanilla/popover';\n\nexport type PopoverProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * `id` to connect the trigger with the popover - required when not using PopoverContext.\n */\n id?: string;\n /**\n * Placement of the popover on the trigger.\n * @default 'top'\n */\n placement?: Placement;\n /**\n * When a boolean is provided, the popover will be controlled.\n * @default undefined\n */\n open?: boolean;\n /**\n * Callback when the open state changes.\n * @param open - The new open state of the popover.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * Additional middleware to use for positioning the popover.\n *\n * @example\n * Prevent the popover from overflowing the navbar by using the `size` middleware:\n * ```ts\n * positionMiddleware={[\n * size({\n * apply: ({ availableHeight, elements, ...state }) => {\n * const available = `${Math.max(0, availableHeight)}px`;\n * const maxHeight = state.placement.includes('top')\n * ? `calc(${available} - var(--bi-layout-navbar-height, 0))`\n * : available;\n * elements.floating.style.maxHeight = maxHeight;\n * },\n * padding,\n * })\n * ]}\n * ```\n */\n positionMiddleware?: Middleware[];\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n /**\n * Show an arrow on the popover, pointing toward the center of the reference element.\n * @default false\n */\n arrow?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\n/**\n * Popover component, used to display content in a popover over an element.\n *\n * @example with TriggerContext\n * <PopoverTriggerContext>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <Popover>\n * Content\n * </Popover>\n * </PopoverTriggerContext>\n *\n * @example without TriggerContext\n * <Button aria-controls=\"my-popover\" aria-expanded={open}>Open Popover</Button>\n * <Popover open={open} onOpenChange={onOpenChange} id=\"my-popover\">\n * Content\n * </Popover>\n */\nexport const Popover = ({\n id,\n className,\n onOpenChange,\n open,\n placement = 'top',\n disableAutoPlacement = false,\n positionMiddleware = [],\n padding = 20,\n dark = false,\n arrow = false,\n asChild = false,\n ref,\n ...rest\n}: PopoverProps) => {\n const Component = asChild ? Slot : 'div';\n\n const popoverRef = useRef<HTMLDivElement>(null);\n const isControlled = useRef(open !== undefined);\n const mergedRefs = useMergeRefs([popoverRef, ref]);\n const { popoverId, setPopoverId, popoverOpen, setPopoverOpen } = use(Context);\n\n const [isOpen, setIsOpen] = useControllableState({\n // False positive: isControlled will never change, but is just used to store the initial controlled state\n prop: isControlled.current ? open : popoverOpen,\n onChange: (val) => {\n onOpenChange?.(val);\n setPopoverOpen?.(val);\n },\n defaultProp: false,\n caller: 'Popover',\n });\n\n useEffect(() => {\n const popover = popoverRef.current;\n const handleClick = (event: MouseEvent) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(`[aria-controls=\"${popover?.id}\"]`);\n const isOutside = !isTrigger && !popover?.contains(el as Node);\n\n if (isOutside) {\n setIsOpen(false);\n }\n };\n\n const handleKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || !isOpen) return;\n event.preventDefault(); // Prevent closing fullscreen in Safari\n setIsOpen(false);\n };\n\n document.addEventListener('click', handleClick, true); // Use capture to execute before React event API\n document.addEventListener('keydown', handleKeydown);\n return () => {\n document.removeEventListener('click', handleClick, true);\n document.removeEventListener('keydown', handleKeydown);\n };\n }, [isOpen, setIsOpen]);\n\n useEffect(() => {\n const popover = popoverRef.current;\n const trigger = document.querySelector(`[aria-controls=\"${popover?.id}\"]`);\n\n if (popover && trigger && isOpen)\n return autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding, strategy: 'escaped' }),\n ...(arrow ? [arrowPseudoElement] : []),\n size({\n apply({ rects, elements }) {\n elements.floating.style.setProperty('--bic-popover-trigger-width', `${rects.reference.width}px`);\n },\n }),\n ],\n strategy: 'fixed',\n placement,\n }).then(({ x, y, middlewareData }) => {\n popover.style.translate = `${x}px ${y}px`;\n popover.style.visibility = middlewareData.hide?.referenceHidden ? 'hidden' : 'visible';\n });\n });\n }, [isOpen, placement, id, disableAutoPlacement, positionMiddleware, padding, arrow]);\n\n // Update context with id\n useEffect(() => {\n if (id) setPopoverId?.(id);\n }, [id, setPopoverId]);\n\n return (\n <Component\n className={cl('bi-popover', className)}\n id={id || popoverId}\n aria-hidden={!isOpen}\n data-arrow={arrow || undefined}\n data-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,EAAE,EACvB,UAAU,IACV,OAAO,OACP,QAAQ,OACR,UAAU,OACV,KACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB,KAAK;CAC/C,MAAM,eAAe,OAAO,SAAS,KAAA,EAAU;CAC/C,MAAM,aAAa,aAAa,CAAC,YAAY,IAAI,CAAC;CAClD,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI,QAAQ;CAE7E,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAE/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;GACjB,eAAe,IAAI;GACnB,iBAAiB,IAAI;;EAEvB,aAAa;EACb,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GAIjB,IAFkB,CADA,IAAI,UAAU,mBAAmB,SAAS,GAAG,IAAI,IACnC,CAAC,SAAS,SAAS,GAAW,EAG5D,UAAU,MAAM;;EAIpB,MAAM,iBAAiB,UAAyB;GAC9C,IAAI,MAAM,QAAQ,YAAY,CAAC,QAAQ;GACvC,MAAM,gBAAgB;GACtB,UAAU,MAAM;;EAGlB,SAAS,iBAAiB,SAAS,aAAa,KAAK;EACrD,SAAS,iBAAiB,WAAW,cAAc;EACnD,aAAa;GACX,SAAS,oBAAoB,SAAS,aAAa,KAAK;GACxD,SAAS,oBAAoB,WAAW,cAAc;;IAEvD,CAAC,QAAQ,UAAU,CAAC;CAEvB,gBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG,IAAI;EAE1E,IAAI,WAAW,WAAW,QACxB,OAAO,WAAW,SAAS,eAAe;GACxC,gBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO,QAAQ;KACf,GAAI,uBAAuB,EAAE,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;KACvE,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;MAAW,CAAC;KACtC,GAAI,QAAQ,CAAC,mBAAmB,GAAG,EAAE;KACrC,KAAK,EACH,MAAM,EAAE,OAAO,YAAY;MACzB,SAAS,SAAS,MAAM,YAAY,+BAA+B,GAAG,MAAM,UAAU,MAAM,IAAI;QAEnG,CAAC;KACH;IACD,UAAU;IACV;IACD,CAAC,CAAC,MAAM,EAAE,GAAG,GAAG,qBAAqB;IACpC,QAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;IACtC,QAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;KAC7E;IACF;IACH;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;EAAS;EAAM,CAAC;CAGrF,gBAAgB;EACd,IAAI,IAAI,eAAe,GAAG;IACzB,CAAC,IAAI,aAAa,CAAC;CAEtB,OACE,oBAAC,WAAD;EACE,WAAWA,KAAG,cAAc,UAAU;EACtC,IAAI,MAAM;EACV,eAAa,CAAC;EACd,cAAY,SAAS,KAAA;EACrB,aAAW;EACX,KAAK;EACL,GAAI;EACJ,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Radio, R as RadioProps } from "../../alert-footer-
|
|
1
|
+
import { L as Radio, R as RadioProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { L as Radio, R as RadioProps } from "../../alert-footer-
|
|
1
|
+
import { L as Radio, R as RadioProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Radio, RadioProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,MAAa,SAAS,EACpB,MACA,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,oBAAoB,qBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,oBAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;
|
|
1
|
+
{"version":3,"file":"radio.mjs","names":[],"sources":["../../../src/components/radio/radio.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type RadioProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'>,\n {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Add error indication to the radio. */\n error?: boolean;\n /** If true, the radio will take up the full width of the container, and not just \"fit-content\" which is default */\n fullwidth?: boolean;\n ref?: Ref<HTMLInputElement>;\n }\n>;\n\nexport const Radio = ({\n dark,\n label,\n description,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: RadioProps) => {\n const descriptionId = useId();\n\n const ariaDescribedBy = [description ? descriptionId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <label>\n <Input\n type='radio'\n id={id}\n ref={ref}\n aria-invalid={error || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...props}\n />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n {description && (\n // Aria-hidden is used to prevent screen readers from reading the description twice:\n // once as part of the label and once from being connected through aria-describedby.\n <FieldDescription aria-hidden='true' id={descriptionId}>\n {description}\n </FieldDescription>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;AAuBA,MAAa,SAAS,EACpB,MACA,OACA,aACA,OACA,WACA,OACA,WACA,KACA,IACA,oBAAoB,qBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB,OAAO;CAE7B,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,oBAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CAEpG,OACE,oBAAC,OAAD;EAAkB;EAAW,aAAW;EAAa;EAAkB;EAAW,SAAA;YAChF,qBAAC,SAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,MAAK;IACD;IACC;IACL,gBAAc,SAAS,KAAA;IACvB,oBAAkB;IACZ;IACN,GAAI;IACJ,CAAA;GACD,SACC,oBAAC,OAAD;IAAO,QAAO;IAAS,SAAS;IAAI,SAAA;cAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;IACd,CAAA;GAET,eAGC,oBAAC,kBAAD;IAAkB,eAAY;IAAO,IAAI;cACtC;IACgB,CAAA;GAEf,EAAA,CAAA;EACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Search, I as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { F as Search, I as SearchProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Search, SearchProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { F as Search, I as SearchProps } from "../../alert-footer-
|
|
1
|
+
import { F as Search, I as SearchProps } from "../../alert-footer-D3W7nNsf.mjs";
|
|
2
2
|
export { Search, SearchProps };
|