@bi-digital/react 0.2.24 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alert-B0SyUQVj.js → alert-C6PxDwHt.js} +6 -6
- package/dist/alert-C6PxDwHt.js.map +1 -0
- package/dist/{alert-footer-D9CtX3s3.d.ts → alert-footer-BS7TXc1g.d.ts} +2 -2
- package/dist/components/alert/alert-footer.d.ts +7 -7
- package/dist/components/alert/alert.d.ts +7 -7
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/index.d.ts +7 -7
- package/dist/components/alert/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +7 -7
- package/dist/components/avatar/index.d.ts +7 -7
- package/dist/components/badge/badge.d.ts +7 -7
- package/dist/components/badge/index.d.ts +7 -7
- package/dist/components/button/button.d.ts +7 -7
- package/dist/components/button/index.d.ts +7 -7
- package/dist/components/card/card-action.d.ts +7 -7
- package/dist/components/card/card-actions.d.ts +7 -7
- package/dist/components/card/card-content.d.ts +7 -7
- package/dist/components/card/card-date.d.ts +7 -7
- package/dist/components/card/card-header.d.ts +7 -7
- package/dist/components/card/card-media.d.ts +7 -7
- package/dist/components/card/card.d.ts +7 -7
- package/dist/components/card/index.d.ts +7 -7
- package/dist/components/checkbox/checkbox-subsection.d.ts +7 -7
- package/dist/components/checkbox/checkbox.d.ts +7 -7
- package/dist/components/checkbox/index.d.ts +7 -7
- package/dist/components/chip/chip.d.ts +7 -7
- package/dist/components/chip/index.d.ts +7 -7
- package/dist/components/dialog/dialog-close-button.d.ts +7 -7
- package/dist/components/dialog/dialog-close-button.js +1 -1
- package/dist/components/dialog/dialog-content.d.ts +7 -7
- package/dist/components/dialog/dialog-footer.d.ts +7 -7
- package/dist/components/dialog/dialog-header.d.ts +7 -7
- package/dist/components/dialog/dialog-trigger.d.ts +7 -7
- package/dist/components/dialog/dialog.d.ts +7 -7
- package/dist/components/dialog/index.d.ts +7 -7
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/drawer/drawer-close-button.d.ts +7 -7
- package/dist/components/drawer/drawer-close-button.js +2 -2
- package/dist/components/drawer/drawer-content.d.ts +7 -7
- package/dist/components/drawer/drawer-content.js +1 -1
- package/dist/components/drawer/drawer-footer.d.ts +7 -7
- package/dist/components/drawer/drawer-footer.js +1 -1
- package/dist/components/drawer/drawer-header.d.ts +7 -7
- package/dist/components/drawer/drawer-header.js +1 -1
- package/dist/components/drawer/drawer-trigger-context.js +1 -1
- package/dist/components/drawer/drawer-trigger.d.ts +7 -7
- package/dist/components/drawer/drawer-trigger.js +1 -1
- package/dist/components/drawer/drawer.d.ts +7 -7
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/drawer/index.d.ts +7 -7
- package/dist/components/drawer/index.js +2 -2
- package/dist/components/dropdown/dropdown-button.d.ts +7 -7
- package/dist/components/dropdown/dropdown-item.d.ts +1 -1
- package/dist/components/dropdown/dropdown-list.d.ts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.ts +7 -7
- package/dist/components/dropdown/dropdown-trigger.d.ts +7 -7
- package/dist/components/dropdown/dropdown.d.ts +7 -7
- package/dist/components/dropdown/index.d.ts +7 -7
- package/dist/components/field/field-affix.d.ts +7 -7
- package/dist/components/field/field-description.d.ts +7 -7
- package/dist/components/field/field.d.ts +7 -7
- package/dist/components/field/index.d.ts +7 -7
- package/dist/components/fieldset/fieldset-description.d.ts +7 -7
- package/dist/components/fieldset/fieldset-legend.d.ts +7 -7
- package/dist/components/fieldset/fieldset.d.ts +7 -7
- package/dist/components/fieldset/index.d.ts +7 -7
- package/dist/components/filter-group/filter-group.d.ts +7 -7
- package/dist/components/filter-group/filter-group.js +1 -1
- package/dist/components/filter-group/index.d.ts +7 -7
- package/dist/components/filter-group/index.js +1 -1
- package/dist/components/footer/footer-links.d.ts +1 -1
- package/dist/components/footer/footer.d.ts +7 -7
- package/dist/components/footer/footer.js +1 -1
- package/dist/components/footer/index.d.ts +7 -7
- package/dist/components/footer/index.js +1 -1
- package/dist/components/index.d.ts +7 -7
- package/dist/components/index.js +9 -9
- package/dist/components/input/index.d.ts +7 -7
- package/dist/components/input/input.d.ts +7 -7
- package/dist/components/label/index.d.ts +7 -7
- package/dist/components/label/label.d.ts +7 -7
- package/dist/components/link/index.d.ts +7 -7
- package/dist/components/link/link.d.ts +7 -7
- package/dist/components/logo/index.d.ts +7 -7
- package/dist/components/logo/logo.d.ts +7 -7
- package/dist/components/navbar/index.d.ts +7 -7
- package/dist/components/navbar/navbar.d.ts +7 -7
- package/dist/components/navbar/sub-navbar.d.ts +7 -7
- package/dist/components/pagination/index.d.ts +7 -7
- package/dist/components/pagination/pagination-button.d.ts +7 -7
- package/dist/components/pagination/pagination-item.d.ts +1 -1
- package/dist/components/pagination/pagination.d.ts +7 -7
- package/dist/components/popover/index.d.ts +7 -7
- package/dist/components/popover/popover-trigger-context.d.ts +1 -1
- package/dist/components/popover/popover-trigger.d.ts +7 -7
- package/dist/components/popover/popover.d.ts +7 -7
- package/dist/components/radio/index.d.ts +7 -7
- package/dist/components/radio/radio.d.ts +7 -7
- package/dist/components/search/index.d.ts +7 -7
- package/dist/components/search/index.js +1 -1
- package/dist/components/search/search.d.ts +7 -7
- package/dist/components/search/search.js +1 -1
- package/dist/components/select/index.d.ts +7 -7
- package/dist/components/select/select-optgroup.d.ts +7 -7
- package/dist/components/select/select-option.d.ts +7 -7
- package/dist/components/select/select.d.ts +7 -7
- package/dist/components/selectfield/index.d.ts +7 -7
- package/dist/components/selectfield/index.js +2 -2
- package/dist/components/selectfield/selectfield.d.ts +7 -7
- package/dist/components/selectfield/selectfield.js +2 -2
- package/dist/components/skip-link/index.d.ts +7 -7
- package/dist/components/skip-link/skip-link.d.ts +7 -7
- package/dist/components/spinner/index.d.ts +7 -7
- package/dist/components/spinner/spinner.d.ts +7 -7
- 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 +7 -7
- package/dist/components/tabs/tab.d.ts +7 -7
- package/dist/components/tabs/tabs-list.d.ts +7 -7
- package/dist/components/tabs/tabs-panel.d.ts +7 -7
- package/dist/components/tabs/tabs.d.ts +7 -7
- package/dist/components/textarea/index.d.ts +7 -7
- package/dist/components/textarea/textarea.d.ts +7 -7
- package/dist/components/textfield/index.d.ts +7 -7
- package/dist/components/textfield/index.js +2 -2
- package/dist/components/textfield/textfield.d.ts +7 -7
- package/dist/components/textfield/textfield.js +2 -2
- package/dist/components/validation-message/index.d.ts +7 -7
- package/dist/components/validation-message/index.js +1 -1
- package/dist/components/validation-message/validation-message.d.ts +7 -7
- package/dist/components/validation-message/validation-message.js +1 -1
- package/dist/{dialog-close-button-B4zf0hvt.js → dialog-close-button-C1omdnIn.js} +3 -3
- package/dist/dialog-close-button-C1omdnIn.js.map +1 -0
- package/dist/{drawer-close-button-DigcuqLc.js → drawer-close-button-DC39bNW2.js} +2 -2
- package/dist/{drawer-close-button-DigcuqLc.js.map → drawer-close-button-DC39bNW2.js.map} +1 -1
- package/dist/{dropdown-item-BEXQ7dGm.d.ts → dropdown-item-CGg_2cV1.d.ts} +3 -3
- package/dist/{dropdown-list-B7sSmFJ3.d.ts → dropdown-list-D8szW6_q.d.ts} +3 -3
- package/dist/{filter-group-DMSPaCQt.js → filter-group-Fzw9g6JB.js} +3 -3
- package/dist/filter-group-Fzw9g6JB.js.map +1 -0
- package/dist/{footer-CU7LdbPO.js → footer-B9sjkncE.js} +6 -6
- package/dist/footer-B9sjkncE.js.map +1 -0
- package/dist/{footer-links-BxIXKTE0.d.ts → footer-links-DlrXiXOi.d.ts} +3 -3
- package/dist/main.d.ts +7 -7
- package/dist/main.js +9 -9
- package/dist/{pagination-item-CMV8GBbx.d.ts → pagination-item-wgtqjgnC.d.ts} +3 -3
- package/dist/{popover-trigger-context-CyMKQtlR.d.ts → popover-trigger-context-8iojEYe0.d.ts} +3 -3
- package/dist/{search-DwL2xIaj.js → search-DzjgrvFl.js} +4 -4
- package/dist/search-DzjgrvFl.js.map +1 -0
- package/dist/{selectfield-C1wWqK0O.js → selectfield-BD-t6Mmm.js} +2 -2
- package/dist/{selectfield-C1wWqK0O.js.map → selectfield-BD-t6Mmm.js.map} +1 -1
- package/dist/{sticky-header-BAnynSsK.d.ts → sticky-header-BMeHtK7e.d.ts} +3 -3
- package/dist/{textfield-Dt_vYPpu.js → textfield-DwLkaC2S.js} +2 -2
- package/dist/{textfield-Dt_vYPpu.js.map → textfield-DwLkaC2S.js.map} +1 -1
- package/dist/utilities/hooks/index.d.ts +7 -7
- package/dist/utilities/hooks/usePagination/usePagination.d.ts +7 -7
- package/dist/utilities/index.d.ts +7 -7
- package/dist/{validation-message-BAGjCQy3.js → validation-message-CPGA4DxM.js} +3 -3
- package/dist/validation-message-CPGA4DxM.js.map +1 -0
- package/package.json +6 -6
- package/dist/alert-B0SyUQVj.js.map +0 -1
- package/dist/dialog-close-button-B4zf0hvt.js.map +0 -1
- package/dist/filter-group-DMSPaCQt.js.map +0 -1
- package/dist/footer-CU7LdbPO.js.map +0 -1
- package/dist/search-DwL2xIaj.js.map +0 -1
- package/dist/validation-message-BAGjCQy3.js.map +0 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Alert } from "./alert-
|
|
1
|
+
import { Alert } from "./alert-C6PxDwHt.js";
|
|
2
2
|
import { AlertFooter } from "./alert-footer-DL4rCThp.js";
|
|
3
3
|
import "./alert-BubQTdmN.js";
|
|
4
4
|
import { Avatar } from "./avatar-6Q2xwviO.js";
|
|
@@ -37,7 +37,7 @@ import { DialogContent } from "./dialog-content-R35XpbSj.js";
|
|
|
37
37
|
import { DialogHeader } from "./dialog-header-Bbq9DcHX.js";
|
|
38
38
|
import { DialogFooter } from "./dialog-footer-AoiCz_Uj.js";
|
|
39
39
|
import { DialogTrigger } from "./dialog-trigger-DinHpkua.js";
|
|
40
|
-
import { DialogCloseButton } from "./dialog-close-button-
|
|
40
|
+
import { DialogCloseButton } from "./dialog-close-button-C1omdnIn.js";
|
|
41
41
|
import "./dialog-CbLuKrFn.js";
|
|
42
42
|
import { Drawer } from "./drawer-CZ05Lizo.js";
|
|
43
43
|
import { DrawerContent } from "./drawer-content-CFc-rxBo.js";
|
|
@@ -45,7 +45,7 @@ import { DrawerHeader } from "./drawer-header-DK4XoaaW.js";
|
|
|
45
45
|
import { DrawerFooter } from "./drawer-footer-CfHjfvEg.js";
|
|
46
46
|
import { DrawerTrigger } from "./drawer-trigger-Do9Htx5M.js";
|
|
47
47
|
import { DrawerTriggerContext } from "./drawer-trigger-context-BUWPPdas.js";
|
|
48
|
-
import { DrawerCloseButton } from "./drawer-close-button-
|
|
48
|
+
import { DrawerCloseButton } from "./drawer-close-button-DC39bNW2.js";
|
|
49
49
|
import "./drawer-CpPzCsLG.js";
|
|
50
50
|
import { PopoverTriggerContext } from "./popover-trigger-context-Cre9Mczn.js";
|
|
51
51
|
import { Popover } from "./popover-DmA4qMtu.js";
|
|
@@ -62,9 +62,9 @@ import { Fieldset } from "./fieldset-Bpu4CRKG.js";
|
|
|
62
62
|
import { FieldsetDescription } from "./fieldset-description-DiHvcLh-.js";
|
|
63
63
|
import { FieldsetLegend } from "./fieldset-legend-CR4srn2-.js";
|
|
64
64
|
import "./fieldset-CKQ2RG9n.js";
|
|
65
|
-
import { FilterGroup } from "./filter-group-
|
|
65
|
+
import { FilterGroup } from "./filter-group-Fzw9g6JB.js";
|
|
66
66
|
import "./filter-group-DfuKXzU3.js";
|
|
67
|
-
import { Footer } from "./footer-
|
|
67
|
+
import { Footer } from "./footer-B9sjkncE.js";
|
|
68
68
|
import { FooterLinks } from "./footer-links-BIUrxu38.js";
|
|
69
69
|
import "./footer-C8UL4KnN.js";
|
|
70
70
|
import { Link } from "./link-BqDeZAJF.js";
|
|
@@ -87,15 +87,15 @@ import { PaginationItem } from "./pagination-item-DzskmZxf.js";
|
|
|
87
87
|
import "./pagination-COuMArW_.js";
|
|
88
88
|
import { Radio } from "./radio-DAC5mhl3.js";
|
|
89
89
|
import "./radio-rO-tWKD5.js";
|
|
90
|
-
import { Search } from "./search-
|
|
90
|
+
import { Search } from "./search-DzjgrvFl.js";
|
|
91
91
|
import "./search-Djix7Xme.js";
|
|
92
92
|
import { Select } from "./select-R87VdG5U.js";
|
|
93
93
|
import { SelectOption } from "./select-option-WAhhr82L.js";
|
|
94
94
|
import { SelectOptgroup } from "./select-optgroup-jowSQvbc.js";
|
|
95
95
|
import "./select-DcvVj8YT.js";
|
|
96
|
-
import { ValidationMessage } from "./validation-message-
|
|
96
|
+
import { ValidationMessage } from "./validation-message-CPGA4DxM.js";
|
|
97
97
|
import "./validation-message-DHR3NN8N.js";
|
|
98
|
-
import { Selectfield } from "./selectfield-
|
|
98
|
+
import { Selectfield } from "./selectfield-BD-t6Mmm.js";
|
|
99
99
|
import "./selectfield-DtSsNu0C.js";
|
|
100
100
|
import { SkipLink } from "./skip-link-CbdX4Taw.js";
|
|
101
101
|
import "./skip-link-DHDiOrN_.js";
|
|
@@ -108,7 +108,7 @@ import { TabsPanel } from "./tabs-panel-L8HovooI.js";
|
|
|
108
108
|
import "./tabs-CRLePQH9.js";
|
|
109
109
|
import { Textarea } from "./textarea-B1fAOfkt.js";
|
|
110
110
|
import "./textarea-cP6IV0Lb.js";
|
|
111
|
-
import { Textfield } from "./textfield-
|
|
111
|
+
import { Textfield } from "./textfield-DwLkaC2S.js";
|
|
112
112
|
import "./textfield-s5xGjX-B.js";
|
|
113
113
|
import "./components-CouSGV6e.js";
|
|
114
114
|
import "./utilities-DanMK0XE.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime51 from "react/jsx-runtime";
|
|
2
2
|
import { HTMLAttributes, Ref } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pagination/pagination-item.d.ts
|
|
@@ -15,7 +15,7 @@ declare const PaginationItem: ({
|
|
|
15
15
|
asChild,
|
|
16
16
|
children,
|
|
17
17
|
...rest
|
|
18
|
-
}: PaginationItemProps) =>
|
|
18
|
+
}: PaginationItemProps) => react_jsx_runtime51.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { PaginationItem, PaginationItemProps };
|
|
21
|
-
//# sourceMappingURL=pagination-item-
|
|
21
|
+
//# sourceMappingURL=pagination-item-wgtqjgnC.d.ts.map
|
package/dist/{popover-trigger-context-CyMKQtlR.d.ts → popover-trigger-context-8iojEYe0.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
@@ -37,7 +37,7 @@ declare const PopoverTriggerContext: ({
|
|
|
37
37
|
children,
|
|
38
38
|
open,
|
|
39
39
|
onOpenChange
|
|
40
|
-
}: PopoverTriggerContextProps) =>
|
|
40
|
+
}: PopoverTriggerContextProps) => react_jsx_runtime53.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { Context, PopoverTriggerContext, PopoverTriggerContextProps };
|
|
43
|
-
//# sourceMappingURL=popover-trigger-context-
|
|
43
|
+
//# sourceMappingURL=popover-trigger-context-8iojEYe0.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { Field } from "./field-DFMMLG-d.js";
|
|
|
3
3
|
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
4
|
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
5
|
import clsx from "clsx/lite";
|
|
6
|
-
import {
|
|
6
|
+
import { CrossSmallIcon, MagnefyingGlassIcon } from "@bi-digital/icons";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/search/search.tsx
|
|
@@ -28,7 +28,7 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
28
28
|
onSubmit: handleSubmit,
|
|
29
29
|
onReset: handleReset,
|
|
30
30
|
children: /* @__PURE__ */ jsxs(FieldAffixes, { children: [
|
|
31
|
-
/* @__PURE__ */ jsx(FieldAffix, { children: /* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(FieldAffix, { children: /* @__PURE__ */ jsx(MagnefyingGlassIcon, { size }) }),
|
|
32
32
|
/* @__PURE__ */ jsx(Input, {
|
|
33
33
|
type: "text",
|
|
34
34
|
ref,
|
|
@@ -45,7 +45,7 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
45
45
|
dark,
|
|
46
46
|
variant: "text",
|
|
47
47
|
type: "reset",
|
|
48
|
-
children: /* @__PURE__ */ jsx(
|
|
48
|
+
children: /* @__PURE__ */ jsx(CrossSmallIcon, {
|
|
49
49
|
size,
|
|
50
50
|
"aria-hidden": "true"
|
|
51
51
|
})
|
|
@@ -58,4 +58,4 @@ const Search = ({ className, onSubmit, onReset, clearAriaLabel = "Clear", size =
|
|
|
58
58
|
|
|
59
59
|
//#endregion
|
|
60
60
|
export { Search };
|
|
61
|
-
//# sourceMappingURL=search-
|
|
61
|
+
//# sourceMappingURL=search-DzjgrvFl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-DzjgrvFl.js","names":["e: React.FormEvent<HTMLFormElement>"],"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,SAAS,CAAC,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,OACA,UACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;EAC5D,EAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;GACpD,SAAS,OAAO,SAAS,GAAG;EAC7B;CACF;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,SACF,QAAQ,GAAG;CAEd;AACD,4BACG;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAkB;EAAW;gCAClG;GAAK,UAAU;GAAc,SAAS;kCACpC;wBACE,4CACE,uBAA0B,OAAQ,GACxB;wBACZ;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;wBACjE;KAAW,eAAY;mCACrB;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;oCAClF;OAAqB;OAAM,eAAY;QAAS;OAC1C;MACE;OACA;IACV;GACD;AAEX"}
|
|
@@ -2,7 +2,7 @@ import { Field } from "./field-DFMMLG-d.js";
|
|
|
2
2
|
import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
3
3
|
import { Label } from "./label-DUzvAx-T.js";
|
|
4
4
|
import { Select } from "./select-R87VdG5U.js";
|
|
5
|
-
import { ValidationMessage } from "./validation-message-
|
|
5
|
+
import { ValidationMessage } from "./validation-message-CPGA4DxM.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
|
|
@@ -50,4 +50,4 @@ const Selectfield = ({ children, dark, label, description, error, style, classNa
|
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
52
|
export { Selectfield };
|
|
53
|
-
//# sourceMappingURL=selectfield-
|
|
53
|
+
//# sourceMappingURL=selectfield-BD-t6Mmm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectfield-
|
|
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,cAAc,CAAC,EAC1B,UACA,MACA,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACc,KAAK;CACtB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;uBACpF;IACK;IACC;IACC;IACN,gBAAc,QAAQ,MAAM,IAAI;IAChC,oBAAkB;IAClB,GAAI;IAEH;KACM;GACR,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
@@ -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
|
|
@@ -3,7 +3,7 @@ import { FieldDescription } from "./field-description-Dhm1VA08.js";
|
|
|
3
3
|
import { FieldAffix, FieldAffixes } from "./field-affix-npc6m7XL.js";
|
|
4
4
|
import { Input } from "./input-Dr7BnTyd.js";
|
|
5
5
|
import { Label } from "./label-DUzvAx-T.js";
|
|
6
|
-
import { ValidationMessage } from "./validation-message-
|
|
6
|
+
import { ValidationMessage } from "./validation-message-CPGA4DxM.js";
|
|
7
7
|
import { Textarea } from "./textarea-B1fAOfkt.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useId } from "react";
|
|
@@ -62,4 +62,4 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
|
|
|
62
62
|
|
|
63
63
|
//#endregion
|
|
64
64
|
export { Textfield };
|
|
65
|
-
//# sourceMappingURL=textfield-
|
|
65
|
+
//# sourceMappingURL=textfield-DwLkaC2S.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textfield-
|
|
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,YAAY,CAAC,EACxB,MACA,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,oBAAoB,oBACpB,GAAG,OACY,KAAK;CACpB,MAAM,cAAc,OAAO;CAC3B,MAAM,gBAAgB,OAAO;CAC7B,MAAM,eAAe,OAAO;CAC5B,MAAM,KAAK,UAAU;CAErB,MAAM,kBACJ;EAAC,cAAc,gBAAgB;EAAI,QAAQ,eAAe;EAAI;CAAoB,EAAC,KAAK,IAAI,CAAC,MAAM,IAAI;AACzG,6BACG;EAAiB;EAAW,aAAW;EAAa;EAAkB;;GACpE,6BAAU;IAAM,SAAS;cAAK;KAAc;GAC5C,mCAAgB;IAAiB,IAAI;cAAgB;KAA+B;wBACpF;IACE,8BAAW,wBAAY,SAAoB;IAC3C,gCACE;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL,uBAED;KACK;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI;KAChC,oBAAkB;KACZ;KACN,GAAK;MACL;IAEH,8BAAW,wBAAY,SAAoB;OAC/B;GACd,CAAC,CAAC,6BAAU;IAAkB,IAAI;cAAe;KAA0B;;GACtE;AAEX"}
|
|
@@ -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 { UsePaginationProps, usePagination } from "../../alert-footer-
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../../alert-footer-BS7TXc1g.js";
|
|
5
5
|
import "../../dialog-trigger-context-ClG9UVsz.js";
|
|
6
6
|
import "../../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
-
import "../../popover-trigger-context-
|
|
8
|
-
import "../../dropdown-item-
|
|
9
|
-
import "../../dropdown-list-
|
|
10
|
-
import "../../footer-links-
|
|
11
|
-
import "../../pagination-item-
|
|
12
|
-
import "../../sticky-header-
|
|
7
|
+
import "../../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../../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,15 +1,15 @@
|
|
|
1
1
|
import "../../../useCheckboxGroup-D61FVz37.js";
|
|
2
2
|
import "../../../useIsomorphicLayoutEffect-DYtMRdO-.js";
|
|
3
3
|
import "../../../types-Bga-EYiy.js";
|
|
4
|
-
import { UsePaginationProps, usePagination } from "../../../alert-footer-
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../../../alert-footer-BS7TXc1g.js";
|
|
5
5
|
import "../../../dialog-trigger-context-ClG9UVsz.js";
|
|
6
6
|
import "../../../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
-
import "../../../popover-trigger-context-
|
|
8
|
-
import "../../../dropdown-item-
|
|
9
|
-
import "../../../dropdown-list-
|
|
10
|
-
import "../../../footer-links-
|
|
11
|
-
import "../../../pagination-item-
|
|
12
|
-
import "../../../sticky-header-
|
|
7
|
+
import "../../../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../../../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../../../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../../../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../../../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../../../sticky-header-BMeHtK7e.js";
|
|
13
13
|
import "../../../index-Cv0onxlx.js";
|
|
14
14
|
import "../../../useIsElementAboveViewport-C3qzTbfj.js";
|
|
15
15
|
import "../../../useScrollDirection-BmllObvZ.js";
|
|
@@ -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 { UsePaginationProps, usePagination } from "../alert-footer-
|
|
4
|
+
import { UsePaginationProps, usePagination } from "../alert-footer-BS7TXc1g.js";
|
|
5
5
|
import "../dialog-trigger-context-ClG9UVsz.js";
|
|
6
6
|
import "../drawer-trigger-context-CNBRwj7l.js";
|
|
7
|
-
import "../popover-trigger-context-
|
|
8
|
-
import "../dropdown-item-
|
|
9
|
-
import "../dropdown-list-
|
|
10
|
-
import "../footer-links-
|
|
11
|
-
import "../pagination-item-
|
|
12
|
-
import "../sticky-header-
|
|
7
|
+
import "../popover-trigger-context-8iojEYe0.js";
|
|
8
|
+
import "../dropdown-item-CGg_2cV1.js";
|
|
9
|
+
import "../dropdown-list-D8szW6_q.js";
|
|
10
|
+
import "../footer-links-DlrXiXOi.js";
|
|
11
|
+
import "../pagination-item-wgtqjgnC.js";
|
|
12
|
+
import "../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,6 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorIcon } from "@bi-digital/icons";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/validation-message/validation-message.tsx
|
|
@@ -10,10 +10,10 @@ const ValidationMessage = ({ children, className, icon, asChild, ref,...props })
|
|
|
10
10
|
className: clsx("bi-validation-message", className),
|
|
11
11
|
ref,
|
|
12
12
|
...props,
|
|
13
|
-
children: [icon || /* @__PURE__ */ jsx(
|
|
13
|
+
children: [icon || /* @__PURE__ */ jsx(ErrorIcon, {}), children]
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
export { ValidationMessage };
|
|
19
|
-
//# sourceMappingURL=validation-message-
|
|
19
|
+
//# sourceMappingURL=validation-message-CPGA4DxM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-message-CPGA4DxM.js","names":[],"sources":["../src/components/validation-message/validation-message.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { ErrorIcon } from '@bi-digital/icons';\n\nexport type ValidationMessageProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n /** Override the default warning icon. Must be a BiIcon to work correctly. */\n icon?: ReactNode;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const ValidationMessage = ({ children, className, icon, asChild, ref, ...props }: ValidationMessageProps) => {\n const Component = asChild ? Slot : 'p';\n\n return (\n <Component className={clsx('bi-validation-message', className)} ref={ref} {...props}>\n {icon || <ErrorIcon />}\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAgBA,MAAa,oBAAoB,CAAC,EAAE,UAAU,WAAW,MAAM,SAAS,IAAK,GAAG,OAA+B,KAAK;CAClH,MAAM,YAAY,UAAU,OAAO;AAEnC,6BACG;EAAU,WAAW,KAAK,yBAAyB,UAAU;EAAO;EAAK,GAAI;aAC3E,4BAAS,cAAY,EACrB;GACS;AAEf"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bi-digital/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components from BI Digital",
|
|
6
6
|
"author": "BI Digital",
|
|
7
|
+
"homepage": "https://designsystem.bi.no/",
|
|
7
8
|
"license": "ISC",
|
|
8
9
|
"module": "./dist/main.js",
|
|
9
10
|
"types": "./dist/main.d.ts",
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
"@radix-ui/react-slot": "^1.2.3",
|
|
29
30
|
"@radix-ui/react-tabs": "^1.1.12",
|
|
30
31
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
31
|
-
"clsx": "^2.1.1"
|
|
32
|
+
"clsx": "^2.1.1",
|
|
33
|
+
"@bi-digital/icons": "0.3.0"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -46,14 +48,12 @@
|
|
|
46
48
|
"tsconfck": "^3.1.6",
|
|
47
49
|
"tsdown": "^0.14.1",
|
|
48
50
|
"typescript": "^5.9.2",
|
|
49
|
-
"vitest": "^3.2.4"
|
|
50
|
-
"@bi-digital/icons-react": "0.2.24"
|
|
51
|
+
"vitest": "^3.2.4"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"react": "^19",
|
|
54
55
|
"react-dom": "^19",
|
|
55
|
-
"@bi-digital/css": "0.
|
|
56
|
-
"@bi-digital/icons-react": "0.2.24"
|
|
56
|
+
"@bi-digital/css": "0.3.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsdown",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert-B0SyUQVj.js","names":["variantIcons: Record<NonNullable<AlertProps['variant']>, React.ComponentType>"],"sources":["../src/components/alert/alert.tsx"],"sourcesContent":["import clsx from 'clsx/lite';\nimport { Slot } from '@radix-ui/react-slot';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { BiIconCheckmarkSmall, BiIconError, BiIconInformation, BiIconWarning } from '@bi-digital/icons-react';\n\nexport type AlertProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The alert variant.\n * @default 'info'\n */\n variant?: 'info' | 'success' | 'warning' | 'alert';\n /**\n * Size of the alert.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /** Custom close button. It's your responsibility to make the button close the alert. */\n closeButton?: ReactNode;\n /** Override the default icon which is decided by the `variant`. */\n icon?: ReactNode;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n ref?: Ref<HTMLDivElement>;\n }\n>;\n\nconst variantIcons: Record<NonNullable<AlertProps['variant']>, React.ComponentType> = {\n info: BiIconInformation,\n success: BiIconCheckmarkSmall,\n warning: BiIconWarning,\n alert: BiIconError,\n};\n\nexport const Alert = ({\n className,\n children,\n closeButton,\n variant = 'info',\n icon,\n asChild,\n dark,\n size,\n ref,\n ...rest\n}: AlertProps) => {\n const Component = asChild ? Slot : 'div';\n const DefaultIcon = variantIcons[variant];\n return (\n <Component\n className={clsx('bi-alert', className)}\n data-variant={variant}\n data-size={size}\n data-dark={dark}\n ref={ref}\n {...rest}\n >\n {icon || <DefaultIcon />}\n {children}\n {closeButton}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAiCA,MAAMA,eAAgF;CACpF,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;AACR;AAED,MAAa,QAAQ,CAAC,EACpB,WACA,UACA,aACA,UAAU,QACV,MACA,SACA,MACA,MACA,IACA,GAAG,MACQ,KAAK;CAChB,MAAM,YAAY,UAAU,OAAO;CACnC,MAAM,cAAc,aAAa;AACjC,6BACG;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,gBAAc;EACd,aAAW;EACX,aAAW;EACN;EACL,GAAI;;GAEH,4BAAS,gBAAc;GACvB;GACA;;GACS;AAEf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-close-button-B4zf0hvt.js","names":[],"sources":["../src/components/dialog/dialog-close-button.tsx"],"sourcesContent":["import { BiIconCrossSmall } from '@bi-digital/icons-react';\nimport { Button, type ButtonProps } from '../button';\n\nexport type DialogCloseButtonProps = Omit<ButtonProps, 'asChild' | 'type' | 'name'>;\n\nexport const DialogCloseButton = ({ children, ref, ...props }: DialogCloseButtonProps) => {\n return (\n <form method='dialog'>\n <Button ref={ref} autoFocus icon name='close' type='submit' variant='text' {...props}>\n {children || <BiIconCrossSmall aria-hidden='true' />}\n </Button>\n </form>\n );\n};\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,CAAC,EAAE,UAAU,IAAK,GAAG,OAA+B,KAAK;AACxF,4BACG;EAAK,QAAO;gCACV;GAAY;GAAK;GAAU;GAAK,MAAK;GAAQ,MAAK;GAAS,SAAQ;GAAO,GAAI;aAC5E,gCAAa,oBAAiB,eAAY,SAAS;IAC7C;GACJ;AAEV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-group-DMSPaCQt.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 { BiIconChevronDown, BiIconChevronUp } from '@bi-digital/icons-react';\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 ? <BiIconChevronUp /> : <BiIconChevronDown />}\n </button>\n <div id={filterContentId}>{children}</div>\n </div>\n );\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,cAAc,CAAC,EAC1B,MACA,MACA,OACA,cAAc,OACd,MACA,cACA,UACA,WACA,IACA,GAAG,OACc,KAAK;CACtB,MAAM,kBAAkB,OAAO;CAC/B,MAAM,CAAC,QAAQ,UAAU,GAAG,qBAAqB;EAC/C,MAAM;EACN,UAAU;EACV,aAAa;EACb,QAAQ;CACT,EAAC;AACF,6BACG;EAAI,WAAW,KAAK,mBAAmB,UAAU;EAAE,aAAW;EAAM,iBAAe;EAAQ,GAAI;EAAY;kCACzG;GAAO,SAAS,MAAM,UAAU,CAAC,SAAS,CAAC,KAAK;GAAE,iBAAe;GAAQ,iBAAe;;IACtF;wBACA,kBAAI,QAAW;IACf,6BAAU,oBAAkB,uBAAI,sBAAoB;;IAC9C,sBACR;GAAI,IAAI;GAAkB;IAAe;GACtC;AAET"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footer-CU7LdbPO.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 { BiIconFacebook, BiIconX, BiIconLinkedin, BiIconInstagram } from '@bi-digital/icons-react';\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 <BiIconFacebook 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 <BiIconX 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 <BiIconLinkedin 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 <BiIconInstagram 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,SAAS,CAAC,EACrB,MACA,gBAAgB,uBAChB,yBAAyB,OACzB,uBAAuB,OACvB,gBAAgB,OAChB,WACA,UACA,IACA,GAAG,OACS,KAAK;AACjB,6BACG;EAAO,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;;uBAC7E;IAAI,WAAU;IAA8B;KAAe;GAC3D,CAAC,+CACC;IAAI,WAAU;;yBACZ;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;oCAEH,UAAK,WAAU,qBAAqB;OACnC;yBACH;MACC,cAAW;MACX,QAAO;MACP,MAAK;MACL,KAAI;oCAEH,UAAK,WAAU,qBAAqB;OACnC;yBACH;MAAE,cAAW;MAAY,QAAO;MAAS,MAAK;MAAqC,KAAI;oCACrF,UAAK,WAAU,oBAAoB;OAClC;;KACA;GAEP,CAAC,6CACC;IAAI,WAAU;;yBACZ;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;oCACpD;OAAE,QAAO;OAAS,MAAK;OAA+C,KAAI;qCACxE,kBAAe,OAAM,gBAAgB;QACpC;OACG;yBACR;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;oCACpD;OAAE,QAAO;OAAS,MAAK;OAAqC,KAAI;qCAC9D,WAAQ,OAAM,SAAS;QACtB;OACG;yBACR;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;oCACpD;OACC,QAAO;OACP,MAAK;OACL,KAAI;qCAEH,kBAAe,OAAM,gBAAgB;QACpC;OACG;yBACR;MAAO,MAAK;MAAQ,SAAQ;MAAO;MAAK;MAAc;oCACpD;OAAE,QAAO;OAAS,MAAK;OAAsD,KAAI;qCAC/E,mBAAgB,OAAM,iBAAiB;QACtC;OACG;;KACL;GAEP,CAAC,qCAAkB;IAAE,WAAU;cAAwB,CAAC,EAAE,mBAAE,IAAI,QAAO,aAAa,CAAC,CAAC,EAAE,eAAe;KAAK;;GACtG;AAEZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-DwL2xIaj.js","names":["e: React.FormEvent<HTMLFormElement>"],"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 { BiIconCrossSmall, BiIconMagnefyingGlass } from '@bi-digital/icons-react';\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 <BiIconMagnefyingGlass 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 <BiIconCrossSmall size={size} aria-hidden='true' />\n </Button>\n </FieldAffix>\n </FieldAffixes>\n </form>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;;AA6BA,MAAa,SAAS,CAAC,EACrB,WACA,UACA,SACA,iBAAiB,SACjB,OAAO,UACP,KACA,MACA,OACA,UACA,GAAG,OACS,KAAK;CACjB,MAAM,eAAe,CAACA,MAAwC;EAC5D,EAAE,gBAAgB;AAClB,MAAI,UAAU;GACZ,MAAM,QAAQ,EAAE,cAAc,cAAc,QAAQ;GACpD,SAAS,OAAO,SAAS,GAAG;EAC7B;CACF;CACD,MAAM,cAAc,MAAM;AACxB,MAAI,SACF,QAAQ,GAAG;CAEd;AACD,4BACG;EAAM,WAAW,KAAK,aAAa,UAAU;EAAE,aAAW;EAAa;EAAkB;EAAW;gCAClG;GAAK,UAAU;GAAc,SAAS;kCACpC;wBACE,4CACE,yBAA4B,OAAQ,GAC1B;wBACZ;KAAM,MAAK;KAAY;KAAW;KAAY;KAAM,GAAI;MAAS;wBACjE;KAAW,eAAY;mCACrB;MAAO,cAAY;MAAgB;MAAW;MAAY;MAAM,SAAQ;MAAO,MAAK;oCAClF;OAAuB;OAAM,eAAY;QAAS;OAC5C;MACE;OACA;IACV;GACD;AAEX"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation-message-BAGjCQy3.js","names":[],"sources":["../src/components/validation-message/validation-message.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport clsx from 'clsx/lite';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport type { AsChildProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { BiIconError } from '@bi-digital/icons-react';\n\nexport type ValidationMessageProps = MergeRight<\n AsChildProps & HTMLAttributes<HTMLParagraphElement>,\n {\n /** Override the default warning icon. Must be a BiIcon to work correctly. */\n icon?: ReactNode;\n ref?: Ref<HTMLParagraphElement>;\n }\n>;\n\nexport const ValidationMessage = ({ children, className, icon, asChild, ref, ...props }: ValidationMessageProps) => {\n const Component = asChild ? Slot : 'p';\n\n return (\n <Component className={clsx('bi-validation-message', className)} ref={ref} {...props}>\n {icon || <BiIconError />}\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;;;AAgBA,MAAa,oBAAoB,CAAC,EAAE,UAAU,WAAW,MAAM,SAAS,IAAK,GAAG,OAA+B,KAAK;CAClH,MAAM,YAAY,UAAU,OAAO;AAEnC,6BACG;EAAU,WAAW,KAAK,yBAAyB,UAAU;EAAO;EAAK,GAAI;aAC3E,4BAAS,gBAAc,EACvB;GACS;AAEf"}
|