@bi-digital/react 0.3.2 → 0.3.3
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-C6PxDwHt.js.map +1 -1
- package/dist/alert-footer-DL4rCThp.js.map +1 -1
- package/dist/{alert-footer-BS7TXc1g.d.ts → alert-footer-DWZoQIek.d.ts} +67 -67
- package/dist/avatar-6Q2xwviO.js.map +1 -1
- package/dist/badge-D9OVAKG8.js.map +1 -1
- package/dist/button-fhd-JARc.js.map +1 -1
- package/dist/card-QAnFhTk6.js.map +1 -1
- package/dist/card-action-D8M3_IVq.js.map +1 -1
- package/dist/card-actions-CIsnmxsm.js.map +1 -1
- package/dist/card-content-DkEHp8mv.js.map +1 -1
- package/dist/card-date-Bd87BGDE.js.map +1 -1
- package/dist/card-header-D-RMd4xS.js.map +1 -1
- package/dist/card-media-DhU2_Ueq.js.map +1 -1
- package/dist/checkbox-ZR1Z2PCF.js.map +1 -1
- package/dist/checkbox-subsection-BPe5aj-W.js.map +1 -1
- package/dist/chip-b9xUiF7_.js.map +1 -1
- package/dist/components/alert/alert-footer.d.ts +3 -3
- package/dist/components/alert/alert.d.ts +3 -3
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/avatar/avatar.d.ts +3 -3
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/badge/badge.d.ts +3 -3
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/button/button.d.ts +3 -3
- package/dist/components/button/index.d.ts +3 -3
- package/dist/components/card/card-action.d.ts +3 -3
- package/dist/components/card/card-actions.d.ts +3 -3
- package/dist/components/card/card-content.d.ts +3 -3
- package/dist/components/card/card-date.d.ts +3 -3
- package/dist/components/card/card-header.d.ts +3 -3
- package/dist/components/card/card-media.d.ts +3 -3
- package/dist/components/card/card.d.ts +3 -3
- package/dist/components/card/index.d.ts +3 -3
- package/dist/components/checkbox/checkbox-subsection.d.ts +3 -3
- package/dist/components/checkbox/checkbox.d.ts +3 -3
- package/dist/components/checkbox/index.d.ts +3 -3
- package/dist/components/chip/chip.d.ts +3 -3
- package/dist/components/chip/index.d.ts +3 -3
- package/dist/components/dialog/dialog-close-button.d.ts +3 -3
- package/dist/components/dialog/dialog-content.d.ts +3 -3
- package/dist/components/dialog/dialog-footer.d.ts +3 -3
- package/dist/components/dialog/dialog-header.d.ts +3 -3
- package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
- package/dist/components/dialog/dialog-trigger.d.ts +3 -3
- package/dist/components/dialog/dialog.d.ts +3 -3
- package/dist/components/dialog/index.d.ts +3 -3
- package/dist/components/drawer/drawer-close-button.d.ts +3 -3
- package/dist/components/drawer/drawer-content.d.ts +3 -3
- package/dist/components/drawer/drawer-footer.d.ts +3 -3
- package/dist/components/drawer/drawer-header.d.ts +3 -3
- package/dist/components/drawer/drawer-trigger.d.ts +3 -3
- package/dist/components/drawer/drawer.d.ts +3 -3
- package/dist/components/drawer/index.d.ts +3 -3
- package/dist/components/dropdown/dropdown-button.d.ts +3 -3
- package/dist/components/dropdown/dropdown-trigger-context.d.ts +3 -3
- package/dist/components/dropdown/dropdown-trigger.d.ts +3 -3
- package/dist/components/dropdown/dropdown.d.ts +3 -3
- package/dist/components/dropdown/index.d.ts +3 -3
- package/dist/components/field/field-affix.d.ts +3 -3
- package/dist/components/field/field-description.d.ts +3 -3
- package/dist/components/field/field.d.ts +3 -3
- package/dist/components/field/index.d.ts +3 -3
- package/dist/components/fieldset/fieldset-description.d.ts +3 -3
- package/dist/components/fieldset/fieldset-legend.d.ts +3 -3
- package/dist/components/fieldset/fieldset.d.ts +3 -3
- package/dist/components/fieldset/index.d.ts +3 -3
- package/dist/components/filter-group/filter-group.d.ts +3 -3
- package/dist/components/filter-group/index.d.ts +3 -3
- package/dist/components/footer/footer.d.ts +3 -3
- package/dist/components/footer/index.d.ts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/input/index.d.ts +3 -3
- package/dist/components/input/input.d.ts +3 -3
- package/dist/components/label/index.d.ts +3 -3
- package/dist/components/label/label.d.ts +3 -3
- package/dist/components/link/index.d.ts +3 -3
- package/dist/components/link/link.d.ts +3 -3
- package/dist/components/logo/index.d.ts +3 -3
- package/dist/components/logo/logo.d.ts +3 -3
- package/dist/components/navbar/index.d.ts +3 -3
- package/dist/components/navbar/navbar.d.ts +3 -3
- package/dist/components/navbar/sub-navbar.d.ts +3 -3
- package/dist/components/pagination/index.d.ts +3 -3
- package/dist/components/pagination/pagination-button.d.ts +3 -3
- package/dist/components/pagination/pagination.d.ts +3 -3
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/popover-trigger.d.ts +3 -3
- package/dist/components/popover/popover.d.ts +3 -3
- package/dist/components/radio/index.d.ts +3 -3
- package/dist/components/radio/radio.d.ts +3 -3
- package/dist/components/search/index.d.ts +3 -3
- package/dist/components/search/search.d.ts +3 -3
- package/dist/components/select/index.d.ts +3 -3
- package/dist/components/select/select-optgroup.d.ts +3 -3
- package/dist/components/select/select-option.d.ts +3 -3
- package/dist/components/select/select.d.ts +3 -3
- package/dist/components/selectfield/index.d.ts +3 -3
- package/dist/components/selectfield/selectfield.d.ts +3 -3
- package/dist/components/skip-link/index.d.ts +3 -3
- package/dist/components/skip-link/skip-link.d.ts +3 -3
- package/dist/components/spinner/index.d.ts +3 -3
- package/dist/components/spinner/spinner.d.ts +3 -3
- package/dist/components/sticky-header/index.d.ts +1 -1
- package/dist/components/sticky-header/sticky-header.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/tabs/tab.d.ts +3 -3
- package/dist/components/tabs/tabs-list.d.ts +3 -3
- package/dist/components/tabs/tabs-panel.d.ts +3 -3
- package/dist/components/tabs/tabs.d.ts +3 -3
- package/dist/components/textarea/index.d.ts +3 -3
- package/dist/components/textarea/textarea.d.ts +3 -3
- package/dist/components/textfield/index.d.ts +3 -3
- package/dist/components/textfield/textfield.d.ts +3 -3
- package/dist/components/validation-message/index.d.ts +3 -3
- package/dist/components/validation-message/validation-message.d.ts +3 -3
- package/dist/dialog-DzGRZgbP.js.map +1 -1
- package/dist/dialog-close-button-C1omdnIn.js.map +1 -1
- package/dist/dialog-content-R35XpbSj.js.map +1 -1
- package/dist/dialog-footer-AoiCz_Uj.js.map +1 -1
- package/dist/dialog-header-Bbq9DcHX.js.map +1 -1
- package/dist/dialog-trigger-DinHpkua.js.map +1 -1
- package/dist/dialog-trigger-context-51mA5fz3.js.map +1 -1
- package/dist/{dialog-trigger-context-ClG9UVsz.d.ts → dialog-trigger-context-BxroyS54.d.ts} +3 -3
- package/dist/drawer-CZ05Lizo.js.map +1 -1
- package/dist/drawer-close-button-DC39bNW2.js.map +1 -1
- package/dist/drawer-content-CFc-rxBo.js.map +1 -1
- package/dist/drawer-footer-CfHjfvEg.js.map +1 -1
- package/dist/drawer-header-DK4XoaaW.js.map +1 -1
- package/dist/drawer-trigger-Do9Htx5M.js.map +1 -1
- package/dist/drawer-trigger-context-BUWPPdas.js.map +1 -1
- package/dist/dropdown-Fzf2CeX4.js.map +1 -1
- package/dist/dropdown-b7acNLZb.js.map +1 -1
- package/dist/dropdown-button-FQqIwqdp.js.map +1 -1
- package/dist/dropdown-item-DQQXQC4J.js.map +1 -1
- package/dist/dropdown-list-DB1mST67.js.map +1 -1
- package/dist/dropdown-trigger-Fwrigwtg.js.map +1 -1
- package/dist/dropdown-trigger-context-BCcyoZEx.js.map +1 -1
- package/dist/field-DFMMLG-d.js.map +1 -1
- package/dist/field-affix-npc6m7XL.js.map +1 -1
- package/dist/field-description-Dhm1VA08.js.map +1 -1
- package/dist/fieldset-Bpu4CRKG.js.map +1 -1
- package/dist/fieldset-description-DiHvcLh-.js.map +1 -1
- package/dist/fieldset-legend-CR4srn2-.js.map +1 -1
- package/dist/filter-group-Fzw9g6JB.js.map +1 -1
- package/dist/footer-B9sjkncE.js.map +1 -1
- package/dist/footer-links-BIUrxu38.js.map +1 -1
- package/dist/input-Dr7BnTyd.js.map +1 -1
- package/dist/label-DUzvAx-T.js.map +1 -1
- package/dist/link-BqDeZAJF.js.map +1 -1
- package/dist/logo-QKrYvRFP.js.map +1 -1
- package/dist/main.d.ts +3 -3
- package/dist/navbar-Dxv7GQO0.js.map +1 -1
- package/dist/pagination-DH6vZYMO.js.map +1 -1
- package/dist/pagination-button-CMSNwkeT.js.map +1 -1
- package/dist/pagination-item-DzskmZxf.js.map +1 -1
- package/dist/popover-DOMLkRA5.js.map +1 -1
- package/dist/popover-DmA4qMtu.js.map +1 -1
- package/dist/popover-trigger-Chi8uvRM.js.map +1 -1
- package/dist/popover-trigger-context-Cre9Mczn.js.map +1 -1
- package/dist/radio-DAC5mhl3.js.map +1 -1
- package/dist/search-DzjgrvFl.js.map +1 -1
- package/dist/select-R87VdG5U.js.map +1 -1
- package/dist/select-optgroup-jowSQvbc.js.map +1 -1
- package/dist/select-option-WAhhr82L.js.map +1 -1
- package/dist/selectfield-BD-t6Mmm.js.map +1 -1
- package/dist/skip-link-CbdX4Taw.js.map +1 -1
- package/dist/spinner-Ch5bEQBR.js.map +1 -1
- package/dist/{sticky-header-C9uGD3u6.d.ts → sticky-header-BMeHtK7e.d.ts} +3 -3
- package/dist/sticky-header-gE5HX2ug.js.map +1 -1
- package/dist/sub-navbar-BdJ9EKsU.js.map +1 -1
- package/dist/sub-navbar-DkxQv0WJ.js.map +1 -1
- package/dist/tab-BvSndQZ_.js.map +1 -1
- package/dist/tabs-C70z_5SJ.js.map +1 -1
- package/dist/tabs-list-npvK06bl.js.map +1 -1
- package/dist/tabs-panel-L8HovooI.js.map +1 -1
- package/dist/textarea-B1fAOfkt.js.map +1 -1
- package/dist/textfield-DwLkaC2S.js.map +1 -1
- package/dist/useCheckboxGroup-BDH3ewt8.js.map +1 -1
- package/dist/useIsElementAboveViewport-lmdnXDdc.js.map +1 -1
- package/dist/useMediaQuery-ICPWsO_p.js.map +1 -1
- package/dist/useMergeRefs-DC710CHX.js.map +1 -1
- package/dist/usePagination-DQR72JNE.js.map +1 -1
- package/dist/useScrollDirection-C2EmQi0U.js.map +1 -1
- package/dist/utilities/hooks/index.d.ts +3 -3
- package/dist/utilities/hooks/usePagination/usePagination.d.ts +3 -3
- package/dist/utilities/index.d.ts +3 -3
- package/dist/validation-message-CPGA4DxM.js.map +1 -1
- package/package.json +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-group-Fzw9g6JB.js","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,
|
|
1
|
+
{"version":3,"file":"filter-group-Fzw9g6JB.js","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,IACA,GAAG,YACmB;CACtB,MAAM,kBAAkB;CACxB,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;;AAEV,QACE,qBAAC;EAAI,WAAW,KAAK,mBAAmB;EAAY,aAAW;EAAM,iBAAe;EAAQ,GAAI;EAAY;aAC1G,qBAAC;GAAO,eAAe,WAAW,SAAS,CAAC;GAAO,iBAAe;GAAQ,iBAAe;;IACtF;IACD,oBAAC,kBAAI;IACJ,SAAS,oBAAC,qBAAmB,oBAAC;;MAEjC,oBAAC;GAAI,IAAI;GAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-B9sjkncE.js","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,
|
|
1
|
+
{"version":3,"file":"footer-B9sjkncE.js","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,IACA,GAAG,YACc;AACjB,QACE,qBAAC;EAAO,WAAW,KAAK,aAAa;EAAY,aAAW;EAAW;EAAK,GAAI;;GAC9E,oBAAC;IAAI,WAAU;IAA8B;;GAC5C,CAAC,0BACA,qBAAC;IAAI,WAAU;;KACb,oBAAC;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gBAEJ,oBAAC,UAAK,WAAU;;KAElB,oBAAC;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;gBAEJ,oBAAC,UAAK,WAAU;;KAElB,oBAAC;MAAE,cAAW;MAAY,QAAO;MAAS,MAAK;MAAqC,KAAI;gBACtF,oBAAC,UAAK,WAAU;;;;GAIrB,CAAC,wBACA,qBAAC;IAAI,WAAU;;KACb,oBAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gBACrD,oBAAC;OAAE,QAAO;OAAS,MAAK;OAA+C,KAAI;iBACzE,oBAAC,gBAAa,OAAM;;;KAGxB,oBAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gBACrD,oBAAC;OAAE,QAAO;OAAS,MAAK;OAAqC,KAAI;iBAC/D,oBAAC,SAAM,OAAM;;;KAGjB,oBAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gBACrD,oBAAC;OACC,QAAO;OACP,MAAK;OACL,KAAI;iBAEJ,oBAAC,gBAAa,OAAM;;;KAGxB,oBAAC;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;gBACrD,oBAAC;OAAE,QAAO;OAAS,MAAK;OAAsD,KAAI;iBAChF,oBAAC,iBAAc,OAAM;;;;;GAK5B,CAAC,iBAAiB,oBAAC;IAAE,WAAU;cAAwB,sBAAK,IAAI,QAAO,cAAc,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer-links-BIUrxu38.js","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,
|
|
1
|
+
{"version":3,"file":"footer-links-BIUrxu38.js","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,IAAK,GAAG,YAA8B;AACzF,QACE,qBAAC;EAAI,WAAU;EAAwB;EAAK,GAAI;aAC7C,eAAe,qBAAC,kBAAG,aAAY,SAChC,oBAAC,SAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-Dr7BnTyd.js","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 * @note 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,
|
|
1
|
+
{"version":3,"file":"input-Dr7BnTyd.js","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 * @note 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,IACA,GAAG,YACa;AAChB,QACE,oBAAC;EACC,WAAW,KAAK,YAAY;EAC5B,aAAW;EACX,aAAW;EACN;EACC;EACI;EACV,WAAW,UAAU,YAAY,WAAW;EAC5C,UAAU,UAAU;AAClB,OAAI,SAAU,OAAM;AACpB,aAAU;;EAEZ,MAAM;EACN,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-DUzvAx-T.js","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,
|
|
1
|
+
{"version":3,"file":"label-DUzvAx-T.js","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,IAAK,GAAG,YAAwB;CACrG,MAAM,YAAY,UAAU,OAAO;AAEnC,QACE,oBAAC;EAAe;EAAK,WAAW,KAAK,YAAY;EAAY,aAAW;EAAM,eAAa;EAAQ,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-BqDeZAJF.js","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,
|
|
1
|
+
{"version":3,"file":"link-BqDeZAJF.js","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,IAAK,GAAG,WAAsB;CAC/F,MAAM,YAAY,UAAU,OAAO;AAEnC,QACE,oBAAC;EACC,WAAW,KAAK,WAAW;EAC3B,cAAY;EACZ,aAAW;EACX,kBAAgB;EACX;EACL,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-QKrYvRFP.js","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,
|
|
1
|
+
{"version":3,"file":"logo-QKrYvRFP.js","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,IACA,GAAG,YACY;AACf,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,KAAK,WAAW;EAC3B,aAAW;EACX,sBAAoB;EACpB,iBAAe;EACf,aAAW;EACN"}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { UseCheckboxGroupOptions, useCheckboxGroup } from "./useCheckboxGroup-D61FVz37.js";
|
|
2
2
|
import { useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
3
3
|
import "./types-Bga-EYiy.js";
|
|
4
|
-
import { Alert, AlertFooter, AlertFooterProps, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Button, ButtonProps, Card, CardAction, CardActionProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardDate, CardDateProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, Checkbox, CheckboxProps, CheckboxSubsection, CheckboxSubsectionProps, Chip, ChipProps, Dialog, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTrigger, DialogTriggerProps, Drawer, DrawerCloseButton, DrawerCloseButtonProps, DrawerContent, DrawerContentProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, DrawerTrigger, DrawerTriggerProps, Dropdown, DropdownButton, DropdownButtonProps, DropdownProps, DropdownTrigger, DropdownTriggerContext, DropdownTriggerContextProps, DropdownTriggerProps, Field, FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps, FieldDescription, FieldDescriptionProps, FieldProps, Fieldset, FieldsetDescription, FieldsetDescriptionProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, FilterGroup, FilterGroupProps, Footer, FooterProps, Input, InputProps, Label, LabelProps, Link, LinkProps, Logo, LogoProps, Navbar, NavbarProps, Pagination, PaginationButton, PaginationButtonProps, PaginationProps, Popover, PopoverProps, PopoverTrigger, PopoverTriggerProps, Radio, RadioProps, Search, SearchProps, Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps, Selectfield, SelectfieldProps, SkipLink, SkipLinkProps, Spinner, SpinnerProps, SubNavbar, SubNavbarProps, Tab, TabProps, Tabs, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps, Textarea, TextareaProps, Textfield, TextfieldProps, UsePaginationProps, ValidationMessage, ValidationMessageProps, usePagination } from "./alert-footer-
|
|
5
|
-
import { Context, DialogTriggerContext, DialogTriggerContextProps } from "./dialog-trigger-context-
|
|
4
|
+
import { Alert, AlertFooter, AlertFooterProps, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Button, ButtonProps, Card, CardAction, CardActionProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardDate, CardDateProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps, Checkbox, CheckboxProps, CheckboxSubsection, CheckboxSubsectionProps, Chip, ChipProps, Dialog, DialogCloseButton, DialogCloseButtonProps, DialogContent, DialogContentProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTrigger, DialogTriggerProps, Drawer, DrawerCloseButton, DrawerCloseButtonProps, DrawerContent, DrawerContentProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, DrawerTrigger, DrawerTriggerProps, Dropdown, DropdownButton, DropdownButtonProps, DropdownProps, DropdownTrigger, DropdownTriggerContext, DropdownTriggerContextProps, DropdownTriggerProps, Field, FieldAffix, FieldAffixProps, FieldAffixes, FieldAffixesProps, FieldDescription, FieldDescriptionProps, FieldProps, Fieldset, FieldsetDescription, FieldsetDescriptionProps, FieldsetLegend, FieldsetLegendProps, FieldsetProps, FilterGroup, FilterGroupProps, Footer, FooterProps, Input, InputProps, Label, LabelProps, Link, LinkProps, Logo, LogoProps, Navbar, NavbarProps, Pagination, PaginationButton, PaginationButtonProps, PaginationProps, Popover, PopoverProps, PopoverTrigger, PopoverTriggerProps, Radio, RadioProps, Search, SearchProps, Select, SelectOptgroup, SelectOptgroupProps, SelectOption, SelectOptionProps, SelectProps, Selectfield, SelectfieldProps, SkipLink, SkipLinkProps, Spinner, SpinnerProps, SubNavbar, SubNavbarProps, Tab, TabProps, Tabs, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps, Textarea, TextareaProps, Textfield, TextfieldProps, UsePaginationProps, ValidationMessage, ValidationMessageProps, usePagination } from "./alert-footer-DWZoQIek.js";
|
|
5
|
+
import { Context, DialogTriggerContext, DialogTriggerContextProps } from "./dialog-trigger-context-BxroyS54.js";
|
|
6
6
|
import { DrawerTriggerContext, DrawerTriggerContextProps } from "./drawer-trigger-context-CNBRwj7l.js";
|
|
7
7
|
import { PopoverTriggerContext, PopoverTriggerContextProps } from "./popover-trigger-context-8iojEYe0.js";
|
|
8
8
|
import { DropdownItem, DropdownItemProps } from "./dropdown-item-CGg_2cV1.js";
|
|
9
9
|
import { DropdownList, DropdownListProps } from "./dropdown-list-D8szW6_q.js";
|
|
10
10
|
import { FooterLinks, FooterLinksProps } from "./footer-links-DlrXiXOi.js";
|
|
11
11
|
import { PaginationItem, PaginationItemProps } from "./pagination-item-wgtqjgnC.js";
|
|
12
|
-
import { StickyHeader, StickyHeaderProps } from "./sticky-header-
|
|
12
|
+
import { StickyHeader, StickyHeaderProps } from "./sticky-header-BMeHtK7e.js";
|
|
13
13
|
import "./index-Cv0onxlx.js";
|
|
14
14
|
import { useIsElementAboveViewport } from "./useIsElementAboveViewport-C3qzTbfj.js";
|
|
15
15
|
import { useScrollDirection } from "./useScrollDirection-BmllObvZ.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-Dxv7GQO0.js","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,
|
|
1
|
+
{"version":3,"file":"navbar-Dxv7GQO0.js","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,IACA,GAAG,YACc;AACjB,QACE,qBAAC;EAAI,GAAI;EAAO,WAAW,KAAK,aAAa;EAAY,cAAY;EAAO,aAAW;EAAW;aAC/F,UACD,qBAAC,uBACC,oBAAC;GAAE,cAAY;GAAe,MAAM;aACjC,QAAQ,oBAAC,QAAW;MAEtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-DH6vZYMO.js","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,
|
|
1
|
+
{"version":3,"file":"pagination-DH6vZYMO.js","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,SAAU,GAAG,YAA6B;AACnG,QACE,oBAAC;EAAI,WAAW,KAAK,iBAAiB;EAAY,aAAW;EAAW;EAAK,GAAI;YAC/E,oBAAC,QAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-button-CMSNwkeT.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,
|
|
1
|
+
{"version":3,"file":"pagination-button-CMSNwkeT.js","names":[],"sources":["../src/components/pagination/pagination-button.tsx"],"sourcesContent":["import { AriaAttributes } from 'react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type PaginationButtonProps = ButtonProps & {\n /**\n * Toggle button as active\n * @default false\n */\n 'aria-current'?: AriaAttributes['aria-current'];\n};\n\nexport const PaginationButton = ({ ref, ...rest }: PaginationButtonProps) => (\n <Button variant='text' icon ref={ref} {...rest} />\n);\n"],"mappings":";;;;AAWA,MAAa,oBAAoB,EAAE,IAAK,GAAG,WACzC,oBAAC;CAAO,SAAQ;CAAO;CAAU;CAAK,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination-item-DzskmZxf.js","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,
|
|
1
|
+
{"version":3,"file":"pagination-item-DzskmZxf.js","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,SAAU,GAAG,WAAgC;CAC1F,MAAM,YAAY,UAAU,OAAO;AACnC,QACE,oBAAC;EAAe;EAAK,GAAI;EACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-DOMLkRA5.js","names":["cleanup: (() => void) | undefined"
|
|
1
|
+
{"version":3,"file":"popover-DOMLkRA5.js","names":["cleanup: (() => void) | undefined"],"sources":["../src/vanilla/popover/index.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift, hide } from '@floating-ui/dom';\nimport type { Middleware, Placement } from '@floating-ui/dom';\n\nexport type InitPopoverOptions = {\n /** The id of the popover to initialize. The trigger element should have a `aria-controls` attribute with the same id. */\n id: string;\n /**\n * Placement of the popover relative to the trigger.\n * @default 'top'\n */\n placement?: Placement;\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 * Whether to disable auto placement.\n * @default false\n */\n disableAutoPlacement?: boolean;\n /**\n * The padding used by the `offset` middleware.\n * @default '20'\n */\n padding?: number;\n};\n\n/**\n * Initializes the popover.\n * @param options - InitPopoverOptions\n * @returns A function to programmatically toggle the popover.\n */\nexport const initPopover = ({\n id,\n disableAutoPlacement = false,\n placement = 'top',\n positionMiddleware = [],\n padding = 20,\n}: InitPopoverOptions) => {\n let cleanup: (() => void) | undefined;\n const popover = document.getElementById(id);\n const triggerSelector = `[aria-controls=\"${id}\"]`;\n const trigger = document.querySelector(triggerSelector);\n\n if (!popover || !trigger) return;\n\n const togglePopover = (open: boolean) => {\n if (open) {\n cleanup = autoUpdate(trigger, popover, () => {\n computePosition(trigger, popover, {\n middleware: [\n offset(padding),\n ...(disableAutoPlacement ? [] : [flip({ padding }), shift({ padding })]),\n ...positionMiddleware,\n hide({ padding }),\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 popover.setAttribute('aria-hidden', 'false');\n trigger.setAttribute('aria-expanded', 'true');\n } else {\n cleanup?.();\n popover.setAttribute('aria-hidden', 'true');\n trigger.setAttribute('aria-expanded', 'false');\n }\n };\n\n document.addEventListener(\n 'click',\n (event) => {\n const el = event.target as Element | null;\n const isTrigger = el?.closest?.(triggerSelector);\n const isOutside = !isTrigger && !popover.contains(el as Node);\n const isOpen = popover.getAttribute('aria-hidden') === 'false';\n\n if (isTrigger) {\n togglePopover(!isOpen);\n }\n if (isOutside && isOpen) {\n togglePopover(false);\n }\n },\n true,\n );\n\n return togglePopover;\n};\n"],"mappings":";;;;;;;;AAiDA,MAAa,eAAe,EAC1B,IACA,uBAAuB,OACvB,YAAY,OACZ,qBAAqB,IACrB,UAAU,SACc;CACxB,IAAIA;CACJ,MAAM,UAAU,SAAS,eAAe;CACxC,MAAM,kBAAkB,mBAAmB,GAAG;CAC9C,MAAM,UAAU,SAAS,cAAc;AAEvC,KAAI,CAAC,WAAW,CAAC,QAAS;CAE1B,MAAM,iBAAiB,SAAkB;AACvC,MAAI,MAAM;AACR,aAAU,WAAW,SAAS,eAAe;AAC3C,oBAAgB,SAAS,SAAS;KAChC,YAAY;MACV,OAAO;MACP,GAAI,uBAAuB,KAAK,CAAC,KAAK,EAAE,YAAY,MAAM,EAAE;MAC5D,GAAG;MACH,KAAK,EAAE;;KAET,UAAU;KACV;OACC,MAAM,EAAE,GAAG,GAAG,qBAAqB;AACpC,aAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;AACtC,aAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;;;AAGjF,WAAQ,aAAa,eAAe;AACpC,WAAQ,aAAa,iBAAiB;SACjC;AACL;AACA,WAAQ,aAAa,eAAe;AACpC,WAAQ,aAAa,iBAAiB;;;AAI1C,UAAS,iBACP,UACC,UAAU;EACT,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,IAAI,UAAU;EAChC,MAAM,YAAY,CAAC,aAAa,CAAC,QAAQ,SAAS;EAClD,MAAM,SAAS,QAAQ,aAAa,mBAAmB;AAEvD,MAAI,UACF,eAAc,CAAC;AAEjB,MAAI,aAAa,OACf,eAAc;IAGlB;AAGF,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-DmA4qMtu.js","names":["
|
|
1
|
+
{"version":3,"file":"popover-DmA4qMtu.js","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 } 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';\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 * 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 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 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 ],\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]);\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-dark={dark}\n ref={mergedRefs}\n {...rest}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,MAAa,WAAW,EACtB,IACA,WACA,cACA,MACA,YAAY,OACZ,uBAAuB,OACvB,qBAAqB,IACrB,UAAU,IACV,OAAO,OACP,UAAU,OACV,IACA,GAAG,WACe;CAClB,MAAM,YAAY,UAAU,OAAO;CAEnC,MAAM,aAAa,OAAuB;CAC1C,MAAM,eAAe,OAAO,SAAS;CACrC,MAAM,aAAa,aAAa,CAAC,YAAY;CAC7C,MAAM,EAAE,WAAW,cAAc,aAAa,mBAAmB,IAAI;CAErE,MAAM,CAAC,QAAQ,aAAa,qBAAqB;EAC/C,MAAM,aAAa,UAAU,OAAO;EACpC,WAAW,QAAQ;AACjB,kBAAe;AACf,oBAAiB;;EAEnB,aAAa;EACb,QAAQ;;AAGV,iBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,eAAe,UAAsB;GACzC,MAAM,KAAK,MAAM;GACjB,MAAM,YAAY,IAAI,UAAU,mBAAmB,SAAS,GAAG;GAC/D,MAAM,YAAY,CAAC,aAAa,CAAC,SAAS,SAAS;AAEnD,OAAI,UACF,WAAU;;EAId,MAAM,iBAAiB,UAAyB;AAC9C,OAAI,MAAM,QAAQ,YAAY,CAAC,OAAQ;AACvC,SAAM;AACN,aAAU;;AAGZ,WAAS,iBAAiB,SAAS,aAAa;AAChD,WAAS,iBAAiB,WAAW;AACrC,eAAa;AACX,YAAS,oBAAoB,SAAS,aAAa;AACnD,YAAS,oBAAoB,WAAW;;IAEzC,CAAC,QAAQ;AAEZ,iBAAgB;EACd,MAAM,UAAU,WAAW;EAC3B,MAAM,UAAU,SAAS,cAAc,mBAAmB,SAAS,GAAG;AAEtE,MAAI,WAAW,WAAW,OACxB,QAAO,WAAW,SAAS,eAAe;AACxC,mBAAgB,SAAS,SAAS;IAChC,YAAY;KACV,OAAO;KACP,GAAI,uBAAuB,KAAK,CAAC,KAAK,EAAE,YAAY,MAAM,EAAE;KAC5D,GAAG;KACH,KAAK;MAAE;MAAS,UAAU;;;IAE5B,UAAU;IACV;MACC,MAAM,EAAE,GAAG,GAAG,qBAAqB;AACpC,YAAQ,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE;AACtC,YAAQ,MAAM,aAAa,eAAe,MAAM,kBAAkB,WAAW;;;IAGlF;EAAC;EAAQ;EAAW;EAAI;EAAsB;EAAoB;;AAGrE,iBAAgB;AACd,MAAI,GAAI,gBAAe;IACtB,CAAC,IAAI;AAER,QACE,oBAAC;EACC,WAAWA,KAAG,cAAc;EAC5B,IAAI,MAAM;EACV,eAAa,CAAC;EACd,aAAW;EACX,KAAK;EACL,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger-Chi8uvRM.js","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// eslint-disable-next-line @typescript-eslint/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,
|
|
1
|
+
{"version":3,"file":"popover-trigger-Chi8uvRM.js","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// eslint-disable-next-line @typescript-eslint/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,IAAK,GAAG,WAAgC;CAC5F,MAAM,EAAE,WAAW,aAAa,mBAAmB,IAAI;CACvD,MAAM,YAAY,UAAU,OAAO,SAAS,WAAW;CAEvD,MAAM,eAAe,OAAO,OAC1B;EACE,eAAe,kBAAkB,SAAS,CAAC;EAC3C,iBAAiB;EACjB,iBAAiB;EACjB,GAAI,SACA,EACE,gBAAgB,aAElB;IAEN;AAGF,QAAO,oBAAC;EAAe;EAAK,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-trigger-context-Cre9Mczn.js","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
|
|
1
|
+
{"version":3,"file":"popover-trigger-context-Cre9Mczn.js","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;;;;;;;;;;;;AA2BH,MAAa,yBAAyB,EAAE,UAAU,MAAM,mBAA+C;CACrG,MAAM,kBAAkB;CACxB,MAAM,CAAC,WAAW,gBAAgB,SAAS;CAC3C,MAAM,CAAC,aAAa,kBAAkB,qBAAqB;EACzD,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;;AAGV,QAAO,oBAAC;EAAQ,OAAO;GAAE;GAAW;GAAc;GAAa;;EAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-DAC5mhl3.js","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,
|
|
1
|
+
{"version":3,"file":"radio-DAC5mhl3.js","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,oBACpB,GAAG,YACa;CAChB,MAAM,gBAAgB;CAEtB,MAAM,kBAAkB,CAAC,cAAc,gBAAgB,IAAI,qBAAqB,KAAK,KAAK,UAAU;AAEpG,QACE,oBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;EAAW;YAChF,qBAAC;GACC,oBAAC;IACC,MAAK;IACD;IACC;IACL,gBAAc,SAAS;IACvB,oBAAkB;IACZ;IACN,GAAI;;GAEL,SACC,oBAAC;IAAM,QAAO;IAAS,SAAS;IAAI;cAClC,oBAAC,oBAAM;;GAGV,eAGC,oBAAC;IAAiB,eAAY;IAAO,IAAI;cACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-DzjgrvFl.js","names":[
|
|
1
|
+
{"version":3,"file":"search-DzjgrvFl.js","names":[],"sources":["../src/components/search/search.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Field, FieldAffixes, FieldAffix } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { CrossSmallIcon, MagnefyingGlassIcon } from '@bi-digital/icons';\nimport type { MergeRight } from '../../utilities';\nimport { Button } from '../button';\n\nexport type SearchProps = MergeRight<\n Omit<InputProps, 'type' | 'size'>,\n {\n /**\n * Size of the search.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Called when the user presses enter. You can use this to for example navigate on submit. */\n onSubmit?: (value: string) => void;\n /** Called when the user resets the search input. */\n onReset?: (value: string) => void;\n /**\n * Aria-label for the clear button.\n * @defaultValue 'Clear'\n */\n clearAriaLabel?: string;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Search = ({\n className,\n onSubmit,\n onReset,\n clearAriaLabel = 'Clear',\n size = 'medium',\n ref,\n dark,\n style,\n fullwidth,\n ...props\n}: SearchProps) => {\n const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {\n e.preventDefault();\n if (onSubmit) {\n const input = e.currentTarget.querySelector('input');\n onSubmit(input?.value || '');\n }\n };\n const handleReset = () => {\n if (onReset) {\n onReset('');\n }\n };\n return (\n <Field className={clsx('bi-search', className)} data-dark={dark} style={style} fullwidth={fullwidth} asChild>\n <form onSubmit={handleSubmit} onReset={handleReset}>\n <FieldAffixes>\n <FieldAffix>\n <MagnefyingGlassIcon size={size} />\n </FieldAffix>\n <Input type='text' ref={ref} size={size} dark={dark} {...props} />\n <FieldAffix aria-hidden='false'>\n <Button aria-label={clearAriaLabel} icon size={size} dark={dark} variant='text' type='reset'>\n <CrossSmallIcon size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AA6BA,MAAa,UAAU,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,OACA,UACA,GAAG,YACc;CACjB,MAAM,gBAAgB,MAAwC;AAC5D,IAAE;AACF,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc;AAC5C,YAAS,OAAO,SAAS;;;CAG7B,MAAM,oBAAoB;AACxB,MAAI,QACF,SAAQ;;AAGZ,QACE,oBAAC;EAAM,WAAW,KAAK,aAAa;EAAY,aAAW;EAAa;EAAkB;EAAW;YACnG,oBAAC;GAAK,UAAU;GAAc,SAAS;aACrC,qBAAC;IACC,oBAAC,wBACC,oBAAC,uBAA0B;IAE7B,oBAAC;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;;IACzD,oBAAC;KAAW,eAAY;eACtB,oBAAC;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;gBACnF,oBAAC;OAAqB;OAAM,eAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-R87VdG5U.js","names":[],"sources":["../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;AAmBA,MAAa,
|
|
1
|
+
{"version":3,"file":"select-R87VdG5U.js","names":[],"sources":["../src/components/select/select.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, SelectHTMLAttributes } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SelectProps = MergeRight<\n DefaultProps & Omit<SelectHTMLAttributes<HTMLSelectElement>, 'multiple' | 'size'>,\n {\n /**\n * Size of the select.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /** Mark the select as readOnly */\n readOnly?: boolean;\n ref?: Ref<HTMLSelectElement>;\n }\n>;\n\nexport const Select = ({ className, dark, onKeyDown, onMouseDown, size, ref, ...props }: SelectProps) => {\n return (\n <select\n className={clsx('bi-input', className)}\n data-dark={dark}\n data-size={size}\n ref={ref}\n onKeyDown={(event) => {\n if (event.key === 'Tab') return;\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onKeyDown?.(event);\n }}\n onMouseDown={(event) => {\n if (props.readOnly) event.preventDefault(); // Make readOnly work for select\n onMouseDown?.(event);\n }}\n {...props}\n />\n );\n};\n"],"mappings":";;;;AAmBA,MAAa,UAAU,EAAE,WAAW,MAAM,WAAW,aAAa,MAAM,IAAK,GAAG,YAAyB;AACvG,QACE,oBAAC;EACC,WAAW,KAAK,YAAY;EAC5B,aAAW;EACX,aAAW;EACN;EACL,YAAY,UAAU;AACpB,OAAI,MAAM,QAAQ,MAAO;AACzB,OAAI,MAAM,SAAU,OAAM;AAC1B,eAAY;;EAEd,cAAc,UAAU;AACtB,OAAI,MAAM,SAAU,OAAM;AAC1B,iBAAc;;EAEhB,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-optgroup-jowSQvbc.js","names":[],"sources":["../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,
|
|
1
|
+
{"version":3,"file":"select-optgroup-jowSQvbc.js","names":[],"sources":["../src/components/select/select-optgroup.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptgroupHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptgroupProps = MergeRight<\n AsChildProps & OptgroupHTMLAttributes<HTMLOptGroupElement>,\n {\n ref?: Ref<HTMLOptGroupElement>;\n }\n>;\n\nexport const SelectOptgroup = ({ asChild, ref, ...props }: SelectOptgroupProps) => {\n const Component = asChild ? Slot : 'optgroup';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,kBAAkB,EAAE,SAAS,IAAK,GAAG,YAAiC;CACjF,MAAM,YAAY,UAAU,OAAO;AACnC,QAAO,oBAAC;EAAU,GAAI;EAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-option-WAhhr82L.js","names":[],"sources":["../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,
|
|
1
|
+
{"version":3,"file":"select-option-WAhhr82L.js","names":[],"sources":["../src/components/select/select-option.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { OptionHTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps } from '../../types';\n\nexport type SelectOptionProps = MergeRight<\n AsChildProps & OptionHTMLAttributes<HTMLOptionElement>,\n {\n ref?: Ref<HTMLOptionElement>;\n }\n>;\n\nexport const SelectOption = ({ asChild, ref, ...props }: SelectOptionProps) => {\n const Component = asChild ? Slot : 'option';\n return <Component {...props} ref={ref} />;\n};\n"],"mappings":";;;;AAYA,MAAa,gBAAgB,EAAE,SAAS,IAAK,GAAG,YAA+B;CAC7E,MAAM,YAAY,UAAU,OAAO;AACnC,QAAO,oBAAC;EAAU,GAAI;EAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectfield-BD-t6Mmm.js","names":[],"sources":["../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n dark,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n dark={dark}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,
|
|
1
|
+
{"version":3,"file":"selectfield-BD-t6Mmm.js","names":[],"sources":["../src/components/selectfield/selectfield.tsx"],"sourcesContent":["import { useId, type ReactNode } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport { Field, FieldDescription } from '../field';\nimport { Label } from '../label';\nimport { Select, type SelectProps } from '../select';\nimport { ValidationMessage } from '../validation-message';\nimport { MergeRight } from '../../utilities';\n\nexport type SelectfieldProps = MergeRight<\n LabelRequiredProps & SelectProps,\n {\n /** Description */\n description?: ReactNode;\n /** Error message for field */\n error?: ReactNode;\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n }\n>;\n\nexport const Selectfield = ({\n children,\n dark,\n label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: SelectfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <Select\n id={id}\n ref={ref}\n dark={dark}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n {children}\n </Select>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AAqBA,MAAa,eAAe,EAC1B,UACA,MACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,YACmB;CACtB,MAAM,cAAc;CACpB,MAAM,gBAAgB;CACtB,MAAM,eAAe;CACrB,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;GAAqB,KAAK,KAAK,UAAU;AACzG,QACE,qBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,SAAS,oBAAC;IAAM,SAAS;cAAK;;GAC9B,eAAe,oBAAC;IAAiB,IAAI;cAAgB;;GACtD,oBAAC;IACK;IACC;IACC;IACN,gBAAc,QAAQ,UAAU;IAChC,oBAAkB;IAClB,GAAI;IAEH;;GAEF,CAAC,CAAC,SAAS,oBAAC;IAAkB,IAAI;cAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link-CbdX4Taw.js","names":[],"sources":["../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,
|
|
1
|
+
{"version":3,"file":"skip-link-CbdX4Taw.js","names":[],"sources":["../src/components/skip-link/skip-link.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { MergeRight } from '../../utilities';\nimport type { AsChildProps, DefaultProps } from '../../types';\nimport type { AnchorHTMLAttributes, Ref } from 'react';\n\nexport type SkipLinkProps = MergeRight<\n DefaultProps & AsChildProps & AnchorHTMLAttributes<HTMLAnchorElement>,\n {\n ref?: Ref<HTMLAnchorElement>;\n }\n>;\n\nexport const SkipLink = ({ asChild, children, className, dark, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} data-dark={dark} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,KAAM,GAAG,YAA2B;CAC3F,MAAM,YAAY,UAAU,OAAO;AACnC,QACE,oBAAC;EAAU,WAAW,KAAK,gBAAgB;EAAY,aAAW;EAAM,GAAI;EACzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner-Ch5bEQBR.js","names":[],"sources":["../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SpinnerProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Spinner = ({ color = 'inherit', size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAsBA,MAAa,
|
|
1
|
+
{"version":3,"file":"spinner-Ch5bEQBR.js","names":[],"sources":["../src/components/spinner/spinner.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { HTMLAttributes, Ref } from 'react';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type SpinnerProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLSpanElement>,\n {\n /**\n * The color of the spinner.\n * @default 'inherit'\n */\n color?: 'inherit' | 'black';\n /**\n * The size of the spinner.\n * It sets the font-size as the width and height is `1em`. If not set, the spinner will inherit the font size of its parent.\n */\n size?: 'small' | 'medium' | 'large' | 'xl' | '2xl';\n ref?: Ref<HTMLSpanElement>;\n }\n>;\n\nexport const Spinner = ({ color = 'inherit', size, className, ref, ...props }: SpinnerProps) => {\n return <span className={clsx('bi-spinner', className)} data-size={size} data-color={color} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAsBA,MAAa,WAAW,EAAE,QAAQ,WAAW,MAAM,WAAW,IAAK,GAAG,YAA0B;AAC9F,QAAO,oBAAC;EAAK,WAAW,KAAK,cAAc;EAAY,aAAW;EAAM,cAAY;EAAY;EAAK,GAAI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime64 from "react/jsx-runtime";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/sticky-header/sticky-header.d.ts
|
|
@@ -13,7 +13,7 @@ type StickyHeaderProps = {
|
|
|
13
13
|
*/
|
|
14
14
|
declare const StickyHeader: ({
|
|
15
15
|
children
|
|
16
|
-
}: StickyHeaderProps) =>
|
|
16
|
+
}: StickyHeaderProps) => react_jsx_runtime64.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { StickyHeader, StickyHeaderProps };
|
|
19
|
-
//# sourceMappingURL=sticky-header-
|
|
19
|
+
//# sourceMappingURL=sticky-header-BMeHtK7e.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky-header-gE5HX2ug.js","names":[],"sources":["../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAa,
|
|
1
|
+
{"version":3,"file":"sticky-header-gE5HX2ug.js","names":[],"sources":["../src/components/sticky-header/sticky-header.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport type { ReactNode } from 'react';\n\nexport type StickyHeaderProps = {\n children: ReactNode;\n};\n\n/**\n * Make a sticky header that will stay at the top of the viewport when scrolling.\n * It handles different distance to the top based on sub-navbar, navbar and other factors.\n * This element is a Slot which simply adds the correct CSS styles to the children.\n * Make sure that the children passed to this component appends className and not overrides it.\n */\nexport const StickyHeader = ({ children }: StickyHeaderProps) => {\n const Component = Slot;\n return <Component className='bi-sticky-header'>{children}</Component>;\n};\n"],"mappings":";;;;;;;;;;AAaA,MAAa,gBAAgB,EAAE,eAAkC;CAC/D,MAAM,YAAY;AAClB,QAAO,oBAAC;EAAU,WAAU;EAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar-BdJ9EKsU.js","names":["
|
|
1
|
+
{"version":3,"file":"sub-navbar-BdJ9EKsU.js","names":["element: HTMLElement","cleanupFunctions: (() => void)[]"],"sources":["../src/vanilla/sub-navbar/index.ts"],"sourcesContent":["/**\n * Detects the vertical scroll direction of the page.\n * Returns 'up' | 'down' | null. The direction is only updated if the scroll distance\n * exceeds a 5px threshold to prevent sensitivity to minor scroll jitter.\n */\nclass ScrollDirectionTracker {\n private scrollDirection: 'up' | 'down' | null = null;\n private lastScrollY = window.pageYOffset;\n private callbacks = new Set<(direction: 'up' | 'down' | null) => void>();\n\n constructor() {\n this.updateScrollDirection = this.updateScrollDirection.bind(this);\n window.addEventListener('scroll', this.updateScrollDirection);\n }\n\n private updateScrollDirection() {\n const scrollY = window.pageYOffset;\n const direction = scrollY > this.lastScrollY ? 'down' : 'up';\n\n if (direction !== this.scrollDirection && (scrollY - this.lastScrollY > 5 || scrollY - this.lastScrollY < -5)) {\n this.scrollDirection = direction;\n this.callbacks.forEach((callback) => callback(this.scrollDirection));\n }\n\n this.lastScrollY = scrollY > 0 ? scrollY : 0;\n }\n\n subscribe(callback: (direction: 'up' | 'down' | null) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n window.removeEventListener('scroll', this.updateScrollDirection);\n this.callbacks.clear();\n }\n\n getCurrentDirection() {\n return this.scrollDirection;\n }\n}\n\n/**\n * Detects when an element is scrolled past and is no longer in the viewport.\n */\nclass ElementAboveViewportTracker {\n private isAboveViewport = false;\n private observer: IntersectionObserver;\n private callbacks = new Set<(isAbove: boolean) => void>();\n\n constructor(private element: HTMLElement) {\n this.observer = new IntersectionObserver(\n ([entry]) => {\n const newIsAbove = entry.boundingClientRect.y < 0;\n if (newIsAbove !== this.isAboveViewport) {\n this.isAboveViewport = newIsAbove;\n this.callbacks.forEach((callback) => callback(this.isAboveViewport));\n }\n },\n { threshold: [0] },\n );\n\n this.observer.observe(this.element);\n }\n\n subscribe(callback: (isAbove: boolean) => void) {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n destroy() {\n this.observer.disconnect();\n this.callbacks.clear();\n }\n\n getIsAboveViewport() {\n return this.isAboveViewport;\n }\n}\n\nexport type InitSubNavbarOptions = {\n /**\n * Custom selector to find sub-navbars.\n * @default '.bi-sub-navbar'\n */\n selector?: string;\n};\n\n/**\n * Initializes all sub-navbars on the page to handle scroll-based behavior.\n * This includes:\n * - Setting data-fixed attribute when the navbar is scrolled past\n * - Setting data-scroll-dir attribute based on scroll direction when fixed\n *\n * @param options Configuration options\n * @returns Cleanup function to remove all event listeners and observers\n */\nexport const initSubNavbar = ({ selector = '.bi-sub-navbar' }: InitSubNavbarOptions = {}) => {\n const subNavbars = document.querySelectorAll<HTMLElement>(selector);\n\n if (subNavbars.length === 0) {\n console.warn(`No elements found with selector: ${selector}`);\n return () => {};\n }\n\n const scrollTracker = new ScrollDirectionTracker();\n const cleanupFunctions: (() => void)[] = [];\n\n subNavbars.forEach((navbar) => {\n const wrapper = navbar.closest('.bi-sub-navbar--wrapper') as HTMLElement;\n if (!wrapper) {\n console.warn('Sub-navbar must be wrapped in an element with class \"bi-sub-navbar--wrapper\"');\n return;\n }\n\n // Find or create the reference element (empty div) that acts as the scroll trigger\n let referenceElement = wrapper.querySelector<HTMLElement>('div:first-child');\n if (!referenceElement || referenceElement === navbar) {\n referenceElement = document.createElement('div');\n wrapper.insertBefore(referenceElement, navbar);\n }\n\n const viewportTracker = new ElementAboveViewportTracker(referenceElement);\n\n // Subscribe to viewport changes\n const unsubscribeViewport = viewportTracker.subscribe((isAbove) => {\n navbar.setAttribute('data-fixed', String(isAbove));\n\n // Only set scroll direction when fixed\n if (isAbove) {\n const currentDirection = scrollTracker.getCurrentDirection();\n if (currentDirection) {\n navbar.setAttribute('data-scroll-dir', currentDirection);\n }\n } else {\n navbar.removeAttribute('data-scroll-dir');\n }\n });\n\n // Subscribe to scroll direction changes\n const unsubscribeScroll = scrollTracker.subscribe((direction) => {\n const isFixed = navbar.getAttribute('data-fixed') === 'true';\n if (isFixed && direction) {\n navbar.setAttribute('data-scroll-dir', direction);\n }\n });\n\n cleanupFunctions.push(() => {\n unsubscribeViewport();\n unsubscribeScroll();\n viewportTracker.destroy();\n });\n });\n\n // Return cleanup function\n return () => {\n cleanupFunctions.forEach((cleanup) => cleanup());\n scrollTracker.destroy();\n };\n};\n"],"mappings":";;;;;;AAKA,IAAM,yBAAN,MAA6B;CAC3B,AAAQ,kBAAwC;CAChD,AAAQ,cAAc,OAAO;CAC7B,AAAQ,4BAAY,IAAI;CAExB,cAAc;AACZ,OAAK,wBAAwB,KAAK,sBAAsB,KAAK;AAC7D,SAAO,iBAAiB,UAAU,KAAK;;CAGzC,AAAQ,wBAAwB;EAC9B,MAAM,UAAU,OAAO;EACvB,MAAM,YAAY,UAAU,KAAK,cAAc,SAAS;AAExD,MAAI,cAAc,KAAK,oBAAoB,UAAU,KAAK,cAAc,KAAK,UAAU,KAAK,cAAc,KAAK;AAC7G,QAAK,kBAAkB;AACvB,QAAK,UAAU,SAAS,aAAa,SAAS,KAAK;;AAGrD,OAAK,cAAc,UAAU,IAAI,UAAU;;CAG7C,UAAU,UAAqD;AAC7D,OAAK,UAAU,IAAI;AACnB,eAAa,KAAK,UAAU,OAAO;;CAGrC,UAAU;AACR,SAAO,oBAAoB,UAAU,KAAK;AAC1C,OAAK,UAAU;;CAGjB,sBAAsB;AACpB,SAAO,KAAK;;;;;;AAOhB,IAAM,8BAAN,MAAkC;CAChC,AAAQ,kBAAkB;CAC1B,AAAQ;CACR,AAAQ,4BAAY,IAAI;CAExB,YAAY,AAAQA,SAAsB;EAAtB;AAClB,OAAK,WAAW,IAAI,sBACjB,CAAC,WAAW;GACX,MAAM,aAAa,MAAM,mBAAmB,IAAI;AAChD,OAAI,eAAe,KAAK,iBAAiB;AACvC,SAAK,kBAAkB;AACvB,SAAK,UAAU,SAAS,aAAa,SAAS,KAAK;;KAGvD,EAAE,WAAW,CAAC;AAGhB,OAAK,SAAS,QAAQ,KAAK;;CAG7B,UAAU,UAAsC;AAC9C,OAAK,UAAU,IAAI;AACnB,eAAa,KAAK,UAAU,OAAO;;CAGrC,UAAU;AACR,OAAK,SAAS;AACd,OAAK,UAAU;;CAGjB,qBAAqB;AACnB,SAAO,KAAK;;;;;;;;;;;;AAqBhB,MAAa,iBAAiB,EAAE,WAAW,qBAA2C,OAAO;CAC3F,MAAM,aAAa,SAAS,iBAA8B;AAE1D,KAAI,WAAW,WAAW,GAAG;AAC3B,UAAQ,KAAK,oCAAoC;AACjD,eAAa;;CAGf,MAAM,gBAAgB,IAAI;CAC1B,MAAMC,mBAAmC;AAEzC,YAAW,SAAS,WAAW;EAC7B,MAAM,UAAU,OAAO,QAAQ;AAC/B,MAAI,CAAC,SAAS;AACZ,WAAQ,KAAK;AACb;;EAIF,IAAI,mBAAmB,QAAQ,cAA2B;AAC1D,MAAI,CAAC,oBAAoB,qBAAqB,QAAQ;AACpD,sBAAmB,SAAS,cAAc;AAC1C,WAAQ,aAAa,kBAAkB;;EAGzC,MAAM,kBAAkB,IAAI,4BAA4B;EAGxD,MAAM,sBAAsB,gBAAgB,WAAW,YAAY;AACjE,UAAO,aAAa,cAAc,OAAO;AAGzC,OAAI,SAAS;IACX,MAAM,mBAAmB,cAAc;AACvC,QAAI,iBACF,QAAO,aAAa,mBAAmB;SAGzC,QAAO,gBAAgB;;EAK3B,MAAM,oBAAoB,cAAc,WAAW,cAAc;GAC/D,MAAM,UAAU,OAAO,aAAa,kBAAkB;AACtD,OAAI,WAAW,UACb,QAAO,aAAa,mBAAmB;;AAI3C,mBAAiB,WAAW;AAC1B;AACA;AACA,mBAAgB;;;AAKpB,cAAa;AACX,mBAAiB,SAAS,YAAY;AACtC,gBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-navbar-DkxQv0WJ.js","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,
|
|
1
|
+
{"version":3,"file":"sub-navbar-DkxQv0WJ.js","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,IAAK,GAAG,YAA4B;CACjG,MAAM,aAAa,OAAuB;CAC1C,MAAM,QAAQ,0BAA0B;CACxC,MAAM,kBAAkB;AAExB,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC,SAAI,KAAK,eACV,oBAAC;GACC,WAAW,KAAK,iBAAiB;GACjC,cAAY;GACZ,mBAAiB,QAAQ,kBAAkB;GAC3C,aAAW;GACX,GAAI;GACC;GAEJ"}
|
package/dist/tab-BvSndQZ_.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-BvSndQZ_.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,
|
|
1
|
+
{"version":3,"file":"tab-BvSndQZ_.js","names":[],"sources":["../src/components/tabs/tab.tsx"],"sourcesContent":["import type { MergeRight } from '../../utilities';\nimport { Trigger } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\nimport { Button, ButtonProps } from '../button';\n\nexport type TabProps = MergeRight<\n Omit<ButtonProps, 'variant' | 'type'>,\n {\n /** A unique value that associates the trigger with a content. */\n value: string;\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean;\n }\n>;\n\nexport const Tab = ({ className, value, disabled, children, asChild, dark, ref, ...props }: TabProps) => {\n return (\n <Trigger value={value} disabled={disabled} asChild>\n <Button\n ref={ref}\n variant='text'\n className={clsx('bi-tabs--tab', className)}\n disabled={disabled}\n asChild={asChild}\n dark={dark}\n {...props}\n >\n {children}\n </Button>\n </Trigger>\n );\n};\n"],"mappings":";;;;;;AAkBA,MAAa,OAAO,EAAE,WAAW,OAAO,UAAU,UAAU,SAAS,MAAM,IAAK,GAAG,YAAsB;AACvG,QACE,oBAAC;EAAe;EAAiB;EAAU;YACzC,oBAAC;GACM;GACL,SAAQ;GACR,WAAW,KAAK,gBAAgB;GACtB;GACD;GACH;GACN,GAAI;GAEH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-C70z_5SJ.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,
|
|
1
|
+
{"version":3,"file":"tabs-C70z_5SJ.js","names":[],"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Root } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `automatic`, tabs are activated when receiving focus. When `manual`, tabs are activated when clicked.\n * @default 'automatic'\n */\n activationMode?: 'manual' | 'automatic';\n /**\n * The orientation of the component.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /** The value of the tab that should be active when initially rendered. Use when you do not need to control the state of the tabs. */\n defaultValue?: string;\n /** The controlled value of the tab to activate. Should be used together with `onChange`. */\n value?: string;\n /** Event handler called when the value changes. */\n onChange?: (value: string) => void;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const Tabs = ({\n activationMode = 'automatic',\n orientation = 'horizontal',\n defaultValue,\n value,\n onChange,\n children,\n className,\n asChild,\n dark,\n ref,\n ...props\n}: TabsProps) => {\n return (\n <Root\n className={clsx('bi-tabs', className)}\n activationMode={activationMode}\n orientation={orientation}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onChange}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Root>\n );\n};\n"],"mappings":";;;;;AAkCA,MAAa,QAAQ,EACnB,iBAAiB,aACjB,cAAc,cACd,cACA,OACA,UACA,UACA,WACA,SACA,MACA,IACA,GAAG,YACY;AACf,QACE,oBAAC;EACC,WAAW,KAAK,WAAW;EACX;EACH;EACC;EACP;EACP,eAAe;EACN;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-list-npvK06bl.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,
|
|
1
|
+
{"version":3,"file":"tabs-list-npvK06bl.js","names":[],"sources":["../src/components/tabs/tabs-list.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { List } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsListProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /**\n * When `true`, keyboard navigation will loop from last tab to first, and vice versa.\n * @default true\n */\n loop?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsList = ({ className, loop = true, children, asChild, dark, ref, ...props }: TabsListProps) => {\n return (\n <List\n className={clsx('bi-tabs--list', className)}\n loop={loop}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </List>\n );\n};\n"],"mappings":";;;;;AAuBA,MAAa,YAAY,EAAE,WAAW,OAAO,MAAM,UAAU,SAAS,MAAM,IAAK,GAAG,YAA2B;AAC7G,QACE,oBAAC;EACC,WAAW,KAAK,iBAAiB;EAC3B;EACG;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-panel-L8HovooI.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,
|
|
1
|
+
{"version":3,"file":"tabs-panel-L8HovooI.js","names":[],"sources":["../src/components/tabs/tabs-panel.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Content } from '@radix-ui/react-tabs';\nimport clsx from 'clsx/lite';\n\nexport type TabsPanelProps = MergeRight<\n DefaultProps & Omit<HTMLAttributes<HTMLDivElement>, 'dir'>,\n {\n /** A unique value that associates the content with a trigger. */\n value: string;\n /** Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries. */\n forceMount?: boolean;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nexport const TabsPanel = ({ className, value, forceMount, children, asChild, dark, ref, ...props }: TabsPanelProps) => {\n return (\n <Content\n className={clsx('bi-tabs--panel', className)}\n value={value}\n forceMount={forceMount || undefined}\n asChild={asChild}\n data-dark={dark}\n ref={ref}\n {...props}\n >\n {children}\n </Content>\n );\n};\n"],"mappings":";;;;;AAsBA,MAAa,aAAa,EAAE,WAAW,OAAO,YAAY,UAAU,SAAS,MAAM,IAAK,GAAG,YAA4B;AACrH,QACE,oBAAC;EACC,WAAW,KAAK,kBAAkB;EAC3B;EACP,YAAY,cAAc;EACjB;EACT,aAAW;EACN;EACL,GAAI;EAEH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-B1fAOfkt.js","names":[],"sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,
|
|
1
|
+
{"version":3,"file":"textarea-B1fAOfkt.js","names":[],"sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport type { Ref, TextareaHTMLAttributes } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\n\nexport type TextareaProps = MergeRight<\n DefaultProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'prefix'>,\n {\n /**\n * Size of the textarea.\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n ref?: Ref<HTMLTextAreaElement>;\n }\n>;\n\nexport const Textarea = ({ className, dark, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-dark={dark} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,MAAM,IAAK,GAAG,YAA2B;AACnF,QAAO,oBAAC;EAAS,WAAW,KAAK,YAAY;EAAY,aAAW;EAAM,aAAW;EAAW;EAAK,GAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textfield-DwLkaC2S.js","names":[],"sources":["../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps &\n // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AAgDA,MAAa,
|
|
1
|
+
{"version":3,"file":"textfield-DwLkaC2S.js","names":[],"sources":["../src/components/textfield/textfield.tsx"],"sourcesContent":["import { useId, type ReactNode, type Ref } from 'react';\n\nimport type { DefaultProps, LabelRequiredProps } from '../../types';\nimport { Field, FieldAffix, FieldAffixes, FieldDescription } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\nimport { Textarea, type TextareaProps } from '../textarea';\nimport { ValidationMessage } from '../validation-message';\n\ntype InputPropsFiltered = Omit<InputProps, 'prefix' | 'className' | 'style'>;\ntype TextareaPropsFiltered = Omit<TextareaProps, 'prefix' | 'className' | 'style'>;\n\ntype BaseTextfieldProps = LabelRequiredProps &\n DefaultProps & {\n /** Label */\n label?: ReactNode;\n /** Description */\n description?: ReactNode;\n /** Prefix */\n prefix?: string;\n /** Suffix */\n suffix?: string;\n /** Error message for field */\n error?: ReactNode;\n /** `className` for the `Field` element */\n className?: InputProps['className'];\n /** `style` for the `Field` element */\n style?: InputProps['style'];\n /** If true, the selectfield will take up the full available width */\n fullwidth?: boolean;\n };\n\ntype TextfieldTextareaProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline: true;\n} & TextareaPropsFiltered;\n\ntype TextfieldInputProps = {\n /** Render `Textarea` instead of a `Input`. The `Textarea` has support for multiple rows of input. */\n multiline?: never | false;\n} & InputPropsFiltered;\n\nexport type TextfieldProps = BaseTextfieldProps &\n // We use either Textarea or Input props, depending on the `multiline` prop.\n (TextfieldTextareaProps | TextfieldInputProps) & {\n ref?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n };\n\nexport const Textfield = ({\n dark,\n label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'aria-describedby': ariaDescribedByProp,\n ...props\n}: TextfieldProps) => {\n const generatedId = useId();\n const descriptionId = useId();\n const validationId = useId();\n const id = idProp || generatedId;\n\n const ariaDescribedBy =\n [description ? descriptionId : '', error ? validationId : '', ariaDescribedByProp].join(' ').trim() || undefined;\n return (\n <Field className={className} data-dark={dark} style={style} fullwidth={fullwidth}>\n {label && <Label htmlFor={id}>{label}</Label>}\n {description && <FieldDescription id={descriptionId}>{description}</FieldDescription>}\n <FieldAffixes>\n {prefix && <FieldAffix>{prefix}</FieldAffix>}\n {multiline ? (\n <Textarea\n id={id}\n ref={ref as Ref<HTMLTextAreaElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...(props as TextareaPropsFiltered)}\n />\n ) : (\n <Input\n id={id}\n ref={ref as Ref<HTMLInputElement>}\n aria-invalid={Boolean(error) || undefined}\n aria-describedby={ariaDescribedBy}\n dark={dark}\n {...(props as InputPropsFiltered)}\n />\n )}\n {suffix && <FieldAffix>{suffix}</FieldAffix>}\n </FieldAffixes>\n {!!error && <ValidationMessage id={validationId}>{error}</ValidationMessage>}\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;;;AAgDA,MAAa,aAAa,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,YACiB;CACpB,MAAM,cAAc;CACpB,MAAM,gBAAgB;CACtB,MAAM,eAAe;CACrB,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;GAAqB,KAAK,KAAK,UAAU;AACzG,QACE,qBAAC;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,SAAS,oBAAC;IAAM,SAAS;cAAK;;GAC9B,eAAe,oBAAC;IAAiB,IAAI;cAAgB;;GACtD,qBAAC;IACE,UAAU,oBAAC,wBAAY;IACvB,YACC,oBAAC;KACK;KACC;KACL,gBAAc,QAAQ,UAAU;KAChC,oBAAkB;KACZ;KACN,GAAK;SAGP,oBAAC;KACK;KACC;KACL,gBAAc,QAAQ,UAAU;KAChC,oBAAkB;KACZ;KACN,GAAK;;IAGR,UAAU,oBAAC,wBAAY;;GAEzB,CAAC,CAAC,SAAS,oBAAC;IAAkB,IAAI;cAAe"}
|