@bi-digital/react 0.11.10 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alert-footer-uyWxrEuB.d.mts → alert-footer-Yb_zpMhd.d.mts} +16 -66
- package/dist/components/alert/alert-footer.d.mts +1 -1
- package/dist/components/alert/alert.d.mts +1 -1
- package/dist/components/alert/alert.mjs +6 -7
- package/dist/components/alert/alert.mjs.map +1 -1
- package/dist/components/alert/index.d.mts +1 -1
- package/dist/components/avatar/avatar.d.mts +1 -1
- package/dist/components/avatar/avatar.mjs +1 -3
- package/dist/components/avatar/avatar.mjs.map +1 -1
- package/dist/components/avatar/index.d.mts +1 -1
- package/dist/components/badge/badge.d.mts +1 -1
- package/dist/components/badge/badge.mjs +1 -3
- package/dist/components/badge/badge.mjs.map +1 -1
- package/dist/components/badge/index.d.mts +1 -1
- package/dist/components/button/button.d.mts +1 -1
- package/dist/components/button/button.mjs +1 -2
- package/dist/components/button/button.mjs.map +1 -1
- package/dist/components/button/index.d.mts +1 -1
- package/dist/components/card/card-action.d.mts +1 -1
- package/dist/components/card/card-action.mjs +1 -2
- package/dist/components/card/card-action.mjs.map +1 -1
- package/dist/components/card/card-actions.d.mts +1 -1
- package/dist/components/card/card-content.d.mts +1 -1
- package/dist/components/card/card-date.d.mts +1 -1
- package/dist/components/card/card-header.d.mts +1 -1
- package/dist/components/card/card-media.d.mts +1 -1
- package/dist/components/card/card.d.mts +1 -1
- package/dist/components/card/card.mjs +1 -3
- package/dist/components/card/card.mjs.map +1 -1
- package/dist/components/card/index.d.mts +1 -1
- package/dist/components/checkbox/checkbox-subsection.d.mts +1 -1
- package/dist/components/checkbox/checkbox-subsection.mjs +1 -2
- package/dist/components/checkbox/checkbox-subsection.mjs.map +1 -1
- package/dist/components/checkbox/checkbox.d.mts +1 -1
- package/dist/components/checkbox/checkbox.mjs +3 -3
- package/dist/components/checkbox/checkbox.mjs.map +1 -1
- package/dist/components/checkbox/index.d.mts +1 -1
- package/dist/components/chip/chip.d.mts +1 -1
- package/dist/components/chip/chip.mjs +1 -3
- package/dist/components/chip/chip.mjs.map +1 -1
- package/dist/components/chip/index.d.mts +1 -1
- package/dist/components/details/details-content.d.mts +1 -1
- package/dist/components/details/details-summary.d.mts +1 -1
- package/dist/components/details/details.d.mts +1 -1
- package/dist/components/details/details.mjs +1 -2
- package/dist/components/details/details.mjs.map +1 -1
- package/dist/components/details/index.d.mts +1 -1
- package/dist/components/dialog/dialog-close-button.d.mts +1 -1
- package/dist/components/dialog/dialog-content.d.mts +1 -1
- package/dist/components/dialog/dialog-footer.d.mts +1 -1
- package/dist/components/dialog/dialog-header.d.mts +1 -1
- package/dist/components/dialog/dialog-trigger.d.mts +1 -1
- package/dist/components/dialog/dialog.d.mts +1 -1
- package/dist/components/dialog/dialog.mjs +1 -2
- package/dist/components/dialog/dialog.mjs.map +1 -1
- package/dist/components/dialog/index.d.mts +1 -1
- package/dist/components/dropdown/dropdown-button.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger-context.d.mts +1 -1
- package/dist/components/dropdown/dropdown-trigger.d.mts +1 -1
- package/dist/components/dropdown/dropdown.d.mts +1 -1
- package/dist/components/dropdown/index.d.mts +1 -1
- package/dist/components/field/field-affix.d.mts +1 -1
- package/dist/components/field/field-description.d.mts +1 -1
- package/dist/components/field/field.d.mts +1 -1
- package/dist/components/field/field.mjs +1 -2
- package/dist/components/field/field.mjs.map +1 -1
- package/dist/components/field/index.d.mts +1 -1
- package/dist/components/fieldset/fieldset-description.d.mts +1 -1
- package/dist/components/fieldset/fieldset-legend.d.mts +1 -1
- package/dist/components/fieldset/fieldset-legend.mjs +1 -2
- package/dist/components/fieldset/fieldset-legend.mjs.map +1 -1
- package/dist/components/fieldset/fieldset.d.mts +1 -1
- package/dist/components/fieldset/fieldset.mjs +1 -2
- package/dist/components/fieldset/fieldset.mjs.map +1 -1
- package/dist/components/fieldset/index.d.mts +1 -1
- package/dist/components/filter-group/filter-group.d.mts +1 -1
- package/dist/components/filter-group/filter-group.mjs +1 -2
- package/dist/components/filter-group/filter-group.mjs.map +1 -1
- package/dist/components/filter-group/index.d.mts +1 -1
- package/dist/components/footer/footer.d.mts +1 -1
- package/dist/components/footer/footer.mjs +1 -6
- package/dist/components/footer/footer.mjs.map +1 -1
- package/dist/components/footer/index.d.mts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/input/index.d.mts +1 -1
- package/dist/components/input/input.d.mts +1 -1
- package/dist/components/input/input.mjs +1 -2
- package/dist/components/input/input.mjs.map +1 -1
- package/dist/components/label/index.d.mts +1 -1
- package/dist/components/label/label.d.mts +1 -1
- package/dist/components/label/label.mjs +1 -2
- package/dist/components/label/label.mjs.map +1 -1
- package/dist/components/link/index.d.mts +1 -1
- package/dist/components/link/link.d.mts +1 -1
- package/dist/components/link/link.mjs +1 -2
- package/dist/components/link/link.mjs.map +1 -1
- package/dist/components/logo/index.d.mts +1 -1
- package/dist/components/logo/logo.d.mts +1 -1
- package/dist/components/logo/logo.mjs +2 -3
- package/dist/components/logo/logo.mjs.map +1 -1
- package/dist/components/navbar/index.d.mts +1 -1
- package/dist/components/navbar/navbar.d.mts +1 -1
- package/dist/components/navbar/navbar.mjs +3 -3
- package/dist/components/navbar/navbar.mjs.map +1 -1
- package/dist/components/navbar/sub-navbar.d.mts +1 -1
- package/dist/components/navbar/sub-navbar.mjs +2 -2
- package/dist/components/navbar/sub-navbar.mjs.map +1 -1
- package/dist/components/pagination/index.d.mts +1 -1
- package/dist/components/pagination/pagination-button.d.mts +1 -1
- package/dist/components/pagination/pagination.d.mts +1 -1
- package/dist/components/pagination/pagination.mjs +1 -2
- package/dist/components/pagination/pagination.mjs.map +1 -1
- package/dist/components/popover/index.d.mts +1 -1
- package/dist/components/popover/popover-trigger.d.mts +1 -1
- package/dist/components/popover/popover.d.mts +1 -1
- package/dist/components/popover/popover.mjs +1 -2
- package/dist/components/popover/popover.mjs.map +1 -1
- package/dist/components/radio/index.d.mts +1 -1
- package/dist/components/radio/radio.d.mts +1 -1
- package/dist/components/radio/radio.mjs +3 -3
- package/dist/components/radio/radio.mjs.map +1 -1
- package/dist/components/search/index.d.mts +1 -1
- package/dist/components/search/search.d.mts +1 -1
- package/dist/components/search/search.mjs +3 -4
- package/dist/components/search/search.mjs.map +1 -1
- package/dist/components/select/index.d.mts +1 -1
- package/dist/components/select/select-optgroup.d.mts +1 -1
- package/dist/components/select/select-option.d.mts +1 -1
- package/dist/components/select/select.d.mts +1 -1
- package/dist/components/select/select.mjs +1 -2
- package/dist/components/select/select.mjs.map +1 -1
- package/dist/components/selectfield/index.d.mts +1 -1
- package/dist/components/selectfield/selectfield.d.mts +1 -1
- package/dist/components/selectfield/selectfield.mjs +3 -3
- package/dist/components/selectfield/selectfield.mjs.map +1 -1
- package/dist/components/skip-link/index.d.mts +1 -1
- package/dist/components/skip-link/skip-link.d.mts +1 -1
- package/dist/components/skip-link/skip-link.mjs +1 -2
- package/dist/components/skip-link/skip-link.mjs.map +1 -1
- package/dist/components/spinner/index.d.mts +1 -1
- package/dist/components/spinner/spinner.d.mts +1 -1
- package/dist/components/switch/index.d.mts +1 -1
- package/dist/components/switch/switch.d.mts +1 -1
- package/dist/components/switch/switch.mjs +3 -3
- package/dist/components/switch/switch.mjs.map +1 -1
- package/dist/components/tabs/index.d.mts +1 -1
- package/dist/components/tabs/tab.d.mts +1 -1
- package/dist/components/tabs/tabs-list.d.mts +1 -1
- package/dist/components/tabs/tabs-panel.d.mts +1 -1
- package/dist/components/tabs/tabs.d.mts +1 -1
- package/dist/components/tabs/tabs.mjs +1 -2
- package/dist/components/tabs/tabs.mjs.map +1 -1
- package/dist/components/textarea/index.d.mts +1 -1
- package/dist/components/textarea/textarea.d.mts +1 -1
- package/dist/components/textarea/textarea.mjs +1 -2
- package/dist/components/textarea/textarea.mjs.map +1 -1
- package/dist/components/textfield/index.d.mts +1 -1
- package/dist/components/textfield/textfield.d.mts +1 -1
- package/dist/components/textfield/textfield.mjs +3 -4
- package/dist/components/textfield/textfield.mjs.map +1 -1
- package/dist/components/tooltip/index.d.mts +1 -1
- package/dist/components/tooltip/tooltip.d.mts +1 -1
- package/dist/components/validation-message/index.d.mts +1 -1
- package/dist/components/validation-message/validation-message.d.mts +1 -1
- package/dist/main.d.mts +2 -2
- package/dist/react-types.d.ts +34 -0
- package/dist/{types-BXsMIYrD.d.mts → types-C0q7hMe_.d.mts} +2 -8
- package/dist/types.d.mts +1 -1
- package/dist/useIsomorphicLayoutEffect-B2JpCiYW.d.mts +7 -0
- package/dist/utilities/hooks/index.d.mts +2 -2
- package/dist/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.mts +1 -1
- package/dist/utilities/hooks/usePagination/usePagination.d.mts +1 -1
- package/dist/utilities/index.d.mts +2 -2
- package/package.json +9 -6
- package/dist/useIsomorphicLayoutEffect-DXCY5AxR.d.mts +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectfield.mjs","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
|
|
1
|
+
{"version":3,"file":"selectfield.mjs","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 label,\n description,\n error,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\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-color={color} data-color-scheme={colorScheme} 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 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,OACA,aACA,OACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACmB;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;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,oBAAC,QAAD;IACM;IACC;IACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;IAChC,oBAAkB;IAClB,GAAI;IAEH;IACM,CAAA;GACR,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-
|
|
1
|
+
import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { SkipLink, SkipLinkProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-
|
|
1
|
+
import { D as SkipLink, O as SkipLinkProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { SkipLink, SkipLinkProps };
|
|
@@ -2,10 +2,9 @@ import clsx from "clsx/lite";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/skip-link/skip-link.tsx
|
|
5
|
-
const SkipLink = ({ asChild, children, className,
|
|
5
|
+
const SkipLink = ({ asChild, children, className, ...props }) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
7
7
|
className: clsx("bi-skip-link", className),
|
|
8
|
-
"data-dark": dark,
|
|
9
8
|
...props,
|
|
10
9
|
children
|
|
11
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-link.mjs","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,
|
|
1
|
+
{"version":3,"file":"skip-link.mjs","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, ...props }: SkipLinkProps) => {\n const Component = asChild ? Slot : 'a';\n return (\n <Component className={clsx('bi-skip-link', className)} {...props}>\n {children}\n </Component>\n );\n};\n"],"mappings":";;;;AAaA,MAAa,YAAY,EAAE,SAAS,UAAU,WAAW,GAAG,YAA2B;CAErF,OACE,oBAFgB,UAAU,OAAO,KAEjC;EAAW,WAAW,KAAK,gBAAgB,UAAU;EAAE,GAAI;EACxD;EACS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as SpinnerProps, T as Spinner } from "../../alert-footer-
|
|
1
|
+
import { E as SpinnerProps, T as Spinner } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Spinner, SpinnerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as SpinnerProps, T as Spinner } from "../../alert-footer-
|
|
1
|
+
import { E as SpinnerProps, T as Spinner } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Spinner, SpinnerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as Switch, w as SwitchProps } from "../../alert-footer-
|
|
1
|
+
import { C as Switch, w as SwitchProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Switch, SwitchProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as Switch, w as SwitchProps } from "../../alert-footer-
|
|
1
|
+
import { C as Switch, w as SwitchProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Switch, SwitchProps };
|
|
@@ -6,10 +6,11 @@ import { Label } from "../label/label.mjs";
|
|
|
6
6
|
import "../label/index.mjs";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/switch/switch.tsx
|
|
9
|
-
const Switch = ({
|
|
9
|
+
const Switch = ({ label, error, fullwidth, style, className, ref, id, "data-color": color, "data-color-scheme": colorScheme, position = "end", ...props }) => {
|
|
10
10
|
return /* @__PURE__ */ jsx(Field, {
|
|
11
11
|
className,
|
|
12
|
-
"data-
|
|
12
|
+
"data-color": color,
|
|
13
|
+
"data-color-scheme": colorScheme,
|
|
13
14
|
style,
|
|
14
15
|
fullwidth,
|
|
15
16
|
position,
|
|
@@ -20,7 +21,6 @@ const Switch = ({ dark, label, error, fullwidth, style, className, ref, id, posi
|
|
|
20
21
|
id,
|
|
21
22
|
ref,
|
|
22
23
|
"aria-invalid": error || void 0,
|
|
23
|
-
dark,
|
|
24
24
|
...props
|
|
25
25
|
}), label && /* @__PURE__ */ jsx(Label, {
|
|
26
26
|
weight: "medium",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch 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 Switch = ({\n
|
|
1
|
+
{"version":3,"file":"switch.mjs","names":[],"sources":["../../../src/components/switch/switch.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { LabelRequiredProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { Field, type FieldProps } from '../field';\nimport { Input, type InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type SwitchProps = MergeRight<\n LabelRequiredProps & Omit<InputProps, 'type' | 'role' | 'size'> & Pick<FieldProps, 'position'>,\n {\n /** Label */\n label?: ReactNode;\n /** Add error indication to the switch. */\n error?: boolean;\n /** If true, the switch 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 Switch = ({\n label,\n error,\n fullwidth,\n style,\n className,\n ref,\n id,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\n position = 'end',\n ...props\n}: SwitchProps) => {\n return (\n <Field\n className={className}\n data-color={color}\n data-color-scheme={colorScheme}\n style={style}\n fullwidth={fullwidth}\n position={position}\n asChild\n >\n <label>\n <Input role='switch' type='checkbox' id={id} ref={ref} aria-invalid={error || undefined} {...props} />\n {label && (\n <Label weight='medium' htmlFor={id} asChild>\n <span>{label}</span>\n </Label>\n )}\n </label>\n </Field>\n );\n};\n"],"mappings":";;;;;;;;AAqBA,MAAa,UAAU,EACrB,OACA,OACA,WACA,OACA,WACA,KACA,IACA,cAAc,OACd,qBAAqB,aACrB,WAAW,OACX,GAAG,YACc;CACjB,OACE,oBAAC,OAAD;EACa;EACX,cAAY;EACZ,qBAAmB;EACZ;EACI;EACD;EACV,SAAA;YAEA,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,OAAD;GAAO,MAAK;GAAS,MAAK;GAAe;GAAS;GAAK,gBAAc,SAAS,KAAA;GAAW,GAAI;GAAS,CAAA,EACrG,SACC,oBAAC,OAAD;GAAO,QAAO;GAAS,SAAS;GAAI,SAAA;aAClC,oBAAC,QAAD,EAAA,UAAO,OAAa,CAAA;GACd,CAAA,CAEJ,EAAA,CAAA;EACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-
|
|
1
|
+
import { S as TabsProps, _ as Tab, b as Tabs, g as TabsListProps, h as TabsList, m as TabsPanelProps, p as TabsPanel, v as TabProps, x as TabsContext } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Tab, TabProps, Tabs, TabsContext, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as Tab, v as TabProps } from "../../alert-footer-
|
|
1
|
+
import { _ as Tab, v as TabProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Tab, TabProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { g as TabsListProps, h as TabsList } from "../../alert-footer-
|
|
1
|
+
import { g as TabsListProps, h as TabsList } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { TabsList, TabsListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-
|
|
1
|
+
import { m as TabsPanelProps, p as TabsPanel } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { TabsPanel, TabsPanelProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-
|
|
1
|
+
import { S as TabsProps, b as Tabs, x as TabsContext, y as Context } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Context, Tabs, TabsContext, TabsProps };
|
|
@@ -6,7 +6,7 @@ import { createContext, useEffect, useId, useRef } from "react";
|
|
|
6
6
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
7
7
|
//#region src/components/tabs/tabs.tsx
|
|
8
8
|
const Context = createContext({});
|
|
9
|
-
const Tabs = ({ defaultValue, value: valueProp, onChange, children, className,
|
|
9
|
+
const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }) => {
|
|
10
10
|
const isControlled = valueProp !== void 0;
|
|
11
11
|
const tabsRef = useRef(null);
|
|
12
12
|
const isProgrammaticClick = useRef(false);
|
|
@@ -45,7 +45,6 @@ const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, d
|
|
|
45
45
|
suppressHydrationWarning: true,
|
|
46
46
|
ref: mergedRefs,
|
|
47
47
|
className: clsx("bi-tabs", className),
|
|
48
|
-
"data-dark": dark ? "true" : "false",
|
|
49
48
|
...props,
|
|
50
49
|
children
|
|
51
50
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\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 ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({
|
|
1
|
+
{"version":3,"file":"tabs.mjs","names":[],"sources":["../../../src/components/tabs/tabs.tsx"],"sourcesContent":["import { createContext, useEffect, useId, useRef } from 'react';\nimport type { HTMLAttributes, Ref } from 'react';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport type { DSTabsElement } from '@digdir/designsystemet-web';\nimport '@digdir/designsystemet-web'; // Import ds-tabs custom element\nimport clsx from 'clsx/lite';\nimport type { DefaultProps } from '../../types';\nimport type { MergeRight } from '../../utilities';\nimport { useMergeRefs } from '../../utilities/hooks/useMergeRefs/useMergeRefs';\n\nexport type TabsProps = MergeRight<\n DefaultProps & HTMLAttributes<DSTabsElement>,\n {\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 ref?: Ref<DSTabsElement>;\n }\n>;\n\nexport type TabsContext = {\n isControlled?: boolean;\n currentValue?: string;\n onChange?: (value: string) => void;\n getPrefixedValue?: (value?: string) => string | undefined;\n};\n\nexport const Context = createContext<TabsContext>({});\n\nexport const Tabs = ({ defaultValue, value: valueProp, onChange, children, className, ref, ...props }: TabsProps) => {\n const isControlled = valueProp !== undefined;\n const tabsRef = useRef<DSTabsElement>(null);\n const isProgrammaticClick = useRef(false);\n const valuePrefix = useId(); // Used for generation of unique value-based ids for tabs and panels\n const mergedRefs = useMergeRefs([ref, tabsRef]);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange,\n defaultProp: defaultValue || '',\n caller: 'Tabs',\n });\n\n useEffect(() => {\n if (!tabsRef.current || valueProp === undefined) return;\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n if (tab.getAttribute('data-value') === valueProp) {\n isProgrammaticClick.current = true;\n tab.click();\n isProgrammaticClick.current = false;\n }\n });\n }, [valueProp]);\n\n useEffect(() => {\n if (!isControlled && defaultValue && tabsRef.current) {\n tabsRef.current?.tabList?.tabs?.forEach((tab) => {\n const isSelected = tab.getAttribute('data-value') === defaultValue;\n tab.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n });\n }\n // oxlint-disable-next-line eslint-plugin-react-hooks/exhaustive-deps\n }, []);\n\n return (\n <Context\n value={{\n isControlled,\n currentValue: value,\n onChange: setValue,\n getPrefixedValue: (value?: string) => value && `${valuePrefix}-${value}`,\n }}\n >\n <ds-tabs\n suppressHydrationWarning // Since <ds-tablist> adds attributes\n ref={mergedRefs}\n className={clsx('bi-tabs', className)}\n {...props}\n >\n {children}\n </ds-tabs>\n </Context>\n );\n};\n"],"mappings":";;;;;;;AA8BA,MAAa,UAAU,cAA2B,EAAE,CAAC;AAErD,MAAa,QAAQ,EAAE,cAAc,OAAO,WAAW,UAAU,UAAU,WAAW,KAAK,GAAG,YAAuB;CACnH,MAAM,eAAe,cAAc,KAAA;CACnC,MAAM,UAAU,OAAsB,KAAK;CAC3C,MAAM,sBAAsB,OAAO,MAAM;CACzC,MAAM,cAAc,OAAO;CAC3B,MAAM,aAAa,aAAa,CAAC,KAAK,QAAQ,CAAC;CAC/C,MAAM,CAAC,OAAO,YAAY,qBAAqB;EAC7C,MAAM;EACN;EACA,aAAa,gBAAgB;EAC7B,QAAQ;EACT,CAAC;CAEF,gBAAgB;EACd,IAAI,CAAC,QAAQ,WAAW,cAAc,KAAA,GAAW;EACjD,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,IAAI,IAAI,aAAa,aAAa,KAAK,WAAW;IAChD,oBAAoB,UAAU;IAC9B,IAAI,OAAO;IACX,oBAAoB,UAAU;;IAEhC;IACD,CAAC,UAAU,CAAC;CAEf,gBAAgB;EACd,IAAI,CAAC,gBAAgB,gBAAgB,QAAQ,SAC3C,QAAQ,SAAS,SAAS,MAAM,SAAS,QAAQ;GAC/C,MAAM,aAAa,IAAI,aAAa,aAAa,KAAK;GACtD,IAAI,aAAa,iBAAiB,aAAa,SAAS,QAAQ;IAChE;IAGH,EAAE,CAAC;CAEN,OACE,oBAAC,SAAD;EACE,OAAO;GACL;GACA,cAAc;GACd,UAAU;GACV,mBAAmB,UAAmB,SAAS,GAAG,YAAY,GAAG;GAClE;YAED,oBAAC,WAAD;GACE,0BAAA;GACA,KAAK;GACL,WAAW,KAAK,WAAW,UAAU;GACrC,GAAI;GAEH;GACO,CAAA;EACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as Textarea, f as TextareaProps } from "../../alert-footer-
|
|
1
|
+
import { d as Textarea, f as TextareaProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Textarea, TextareaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as Textarea, f as TextareaProps } from "../../alert-footer-
|
|
1
|
+
import { d as Textarea, f as TextareaProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Textarea, TextareaProps };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import clsx from "clsx/lite";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/textarea/textarea.tsx
|
|
4
|
-
const Textarea = ({ className,
|
|
4
|
+
const Textarea = ({ className, size, ref, ...props }) => {
|
|
5
5
|
return /* @__PURE__ */ jsx("textarea", {
|
|
6
6
|
className: clsx("bi-input", className),
|
|
7
|
-
"data-dark": dark,
|
|
8
7
|
"data-size": size,
|
|
9
8
|
ref,
|
|
10
9
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.mjs","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,
|
|
1
|
+
{"version":3,"file":"textarea.mjs","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, size, ref, ...props }: TextareaProps) => {\n return <textarea className={clsx('bi-input', className)} data-size={size} ref={ref} {...props} />;\n};\n"],"mappings":";;;AAiBA,MAAa,YAAY,EAAE,WAAW,MAAM,KAAK,GAAG,YAA2B;CAC7E,OAAO,oBAAC,YAAD;EAAU,WAAW,KAAK,YAAY,UAAU;EAAE,aAAW;EAAW;EAAK,GAAI;EAAS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as Textfield, u as TextfieldProps } from "../../alert-footer-
|
|
1
|
+
import { l as Textfield, u as TextfieldProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Textfield, TextfieldProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as Textfield, u as TextfieldProps } from "../../alert-footer-
|
|
1
|
+
import { l as Textfield, u as TextfieldProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Textfield, TextfieldProps };
|
|
@@ -13,7 +13,7 @@ import "../textarea/index.mjs";
|
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useId } from "react";
|
|
15
15
|
//#region src/components/textfield/textfield.tsx
|
|
16
|
-
const Textfield = ({
|
|
16
|
+
const Textfield = ({ label, description, error, multiline, prefix, suffix, style, className, fullwidth, ref, id: idProp, "data-color": color, "data-color-scheme": colorScheme, "aria-describedby": ariaDescribedByProp, ...props }) => {
|
|
17
17
|
const generatedId = useId();
|
|
18
18
|
const descriptionId = useId();
|
|
19
19
|
const validationId = useId();
|
|
@@ -25,7 +25,8 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
|
|
|
25
25
|
].join(" ").trim() || void 0;
|
|
26
26
|
return /* @__PURE__ */ jsxs(Field, {
|
|
27
27
|
className,
|
|
28
|
-
"data-
|
|
28
|
+
"data-color": color,
|
|
29
|
+
"data-color-scheme": colorScheme,
|
|
29
30
|
style,
|
|
30
31
|
fullwidth,
|
|
31
32
|
children: [
|
|
@@ -44,14 +45,12 @@ const Textfield = ({ dark, label, description, error, multiline, prefix, suffix,
|
|
|
44
45
|
ref,
|
|
45
46
|
"aria-invalid": Boolean(error) || void 0,
|
|
46
47
|
"aria-describedby": ariaDescribedBy,
|
|
47
|
-
dark,
|
|
48
48
|
...props
|
|
49
49
|
}) : /* @__PURE__ */ jsx(Input, {
|
|
50
50
|
id,
|
|
51
51
|
ref,
|
|
52
52
|
"aria-invalid": Boolean(error) || void 0,
|
|
53
53
|
"aria-describedby": ariaDescribedBy,
|
|
54
|
-
dark,
|
|
55
54
|
...props
|
|
56
55
|
}),
|
|
57
56
|
suffix && /* @__PURE__ */ jsx(FieldAffix, { children: suffix })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textfield.mjs","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 & // 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
|
|
1
|
+
{"version":3,"file":"textfield.mjs","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 & // 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 label,\n description,\n error,\n multiline,\n prefix,\n suffix,\n style,\n className,\n fullwidth,\n ref,\n id: idProp,\n 'data-color': color,\n 'data-color-scheme': colorScheme,\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-color={color} data-color-scheme={colorScheme} 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 {...(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 {...(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":";;;;;;;;;;;;;;;AA+CA,MAAa,aAAa,EACxB,OACA,aACA,OACA,WACA,QACA,QACA,OACA,WACA,WACA,KACA,IAAI,QACJ,cAAc,OACd,qBAAqB,aACrB,oBAAoB,qBACpB,GAAG,YACiB;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;EAAoB,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,KAAA;CACzG,OACE,qBAAC,OAAD;EAAkB;EAAW,cAAY;EAAO,qBAAmB;EAAoB;EAAkB;YAAzG;GACG,SAAS,oBAAC,OAAD;IAAO,SAAS;cAAK;IAAc,CAAA;GAC5C,eAAe,oBAAC,kBAAD;IAAkB,IAAI;cAAgB;IAA+B,CAAA;GACrF,qBAAC,cAAD,EAAA,UAAA;IACG,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC3C,YACC,oBAAC,UAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA,GAEF,oBAAC,OAAD;KACM;KACC;KACL,gBAAc,QAAQ,MAAM,IAAI,KAAA;KAChC,oBAAkB;KAClB,GAAK;KACL,CAAA;IAEH,UAAU,oBAAC,YAAD,EAAA,UAAa,QAAoB,CAAA;IAC/B,EAAA,CAAA;GACd,CAAC,CAAC,SAAS,oBAAC,mBAAD;IAAmB,IAAI;cAAe;IAA0B,CAAA;GACtE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as TooltipProps, s as Tooltip } from "../../alert-footer-
|
|
1
|
+
import { c as TooltipProps, s as Tooltip } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Tooltip, TooltipProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as TooltipProps, s as Tooltip } from "../../alert-footer-
|
|
1
|
+
import { c as TooltipProps, s as Tooltip } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { Tooltip, TooltipProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-
|
|
1
|
+
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { ValidationMessage, ValidationMessageProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-
|
|
1
|
+
import { a as ValidationMessage, o as ValidationMessageProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { ValidationMessage, ValidationMessageProps };
|
package/dist/main.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "./useCheckboxGroup-Boc_tLJ3.mjs";
|
|
2
|
-
import { t as useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect-
|
|
3
|
-
import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, i as usePagination, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, r as UsePaginationProps, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "./alert-footer-
|
|
2
|
+
import { t as useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect-B2JpCiYW.mjs";
|
|
3
|
+
import { $ as Footer, $t as Checkbox, A as SelectfieldProps, At as PopoverProps, B as RadioProps, Bt as DialogContentProps, C as Switch, Cn as Alert, Ct as DropdownButton, D as SkipLink, Dt as PopoverTrigger, E as SpinnerProps, Et as DropdownProps, F as Select, Ft as DialogFooter, G as SubNavbar, Gt as DetailsContent, H as PaginationButtonProps, Ht as DialogProps, I as SelectProps, It as DialogFooterProps, J as NavbarProps, Jt as DetailsProps, K as SubNavbarProps, Kt as DetailsContentProps, L as Search, Lt as DialogHeader, M as SelectOptgroupProps, Mt as DialogCloseButtonProps, N as SelectOption, Nt as DialogTrigger, O as SkipLinkProps, Ot as PopoverTriggerProps, P as SelectOptionProps, Pt as DialogTriggerProps, Q as LinkProps, Qt as CheckboxSubsectionProps, R as SearchProps, Rt as DialogHeaderProps, S as TabsProps, Sn as AvatarProps, St as DropdownTriggerProps, T as Spinner, Tt as Dropdown, U as Pagination, Ut as DetailsSummary, V as PaginationButton, Vt as Dialog, W as PaginationProps, Wt as DetailsSummaryProps, X as LogoProps, Xt as ChipProps, Y as Logo, Yt as Chip, Z as Link, Zt as CheckboxSubsection, _ as Tab, _n as Button, _t as Field, a as ValidationMessage, an as CardMedia, at as Label, b as Tabs, bn as BadgeProps, bt as DropdownTriggerContextProps, c as TooltipProps, cn as CardHeaderProps, ct as FieldsetDescriptionProps, d as Textarea, dn as CardAction, dt as FieldAffix, en as CheckboxProps, et as FooterProps, f as TextareaProps, fn as CardActionProps, ft as FieldAffixProps, g as TabsListProps, gn as CardProps, gt as FieldDescriptionProps, h as TabsList, hn as Card, ht as FieldDescription, i as usePagination, in as CardDateProps, it as FieldsetLegendProps, j as SelectOptgroup, jt as DialogCloseButton, k as Selectfield, kt as Popover, l as Textfield, ln as CardContent, lt as Fieldset, m as TabsPanelProps, mn as CardActionsProps, mt as FieldAffixesProps, n as AlertFooterProps, nn as InputProps, nt as FilterGroupProps, o as ValidationMessageProps, on as CardMediaProps, ot as LabelProps, p as TabsPanel, pn as CardActions, pt as FieldAffixes, q as Navbar, qt as Details, r as UsePaginationProps, rn as CardDate, rt as FieldsetLegend, s as Tooltip, sn as CardHeader, st as FieldsetDescription, t as AlertFooter, tn as Input, tt as FilterGroup, u as TextfieldProps, un as CardContentProps, ut as FieldsetProps, v as TabProps, vn as ButtonProps, vt as FieldProps, w as SwitchProps, wn as AlertProps, wt as DropdownButtonProps, x as TabsContext, xn as Avatar, xt as DropdownTrigger, yn as Badge, yt as DropdownTriggerContext, z as Radio, zt as DialogContent } from "./alert-footer-Yb_zpMhd.mjs";
|
|
4
4
|
import { n as DialogTriggerContext, r as DialogTriggerContextProps, t as Context } from "./dialog-trigger-context-DbUhxoNL.mjs";
|
|
5
5
|
import { n as PopoverTriggerContext, r as PopoverTriggerContextProps } from "./popover-trigger-context-BLjAozBn.mjs";
|
|
6
6
|
import { n as DropdownItemProps, t as DropdownItem } from "./dropdown-item-bA64wFOZ.mjs";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The available color scheme options.
|
|
3
|
+
* - `'light'`: Use the light color scheme.
|
|
4
|
+
* - `'dark'`: Use the dark color scheme.
|
|
5
|
+
*/
|
|
6
|
+
export type ColorScheme = 'light' | 'dark';
|
|
7
|
+
export type Colors = 'primary' | 'neutral' | 'info' | 'success' | 'warning' | 'alert';
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
namespace React {
|
|
11
|
+
interface HTMLAttributes<T> {
|
|
12
|
+
/**
|
|
13
|
+
* Set the design system color.
|
|
14
|
+
*/
|
|
15
|
+
'data-color'?: Colors;
|
|
16
|
+
/**
|
|
17
|
+
* Set the design system color scheme.
|
|
18
|
+
* - `'light'`: Use the light color scheme.
|
|
19
|
+
* - `'dark'`: Use the dark color scheme.
|
|
20
|
+
*/
|
|
21
|
+
'data-color-scheme'?: ColorScheme;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Make React support command attributes: https://github.com/facebook/react/issues/32478
|
|
25
|
+
interface ButtonHTMLAttributes<T> extends React.HTMLAttributes<T> {
|
|
26
|
+
/** https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#command */
|
|
27
|
+
command?: string;
|
|
28
|
+
/** https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#commandfor */
|
|
29
|
+
commandfor?: string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/types.d.ts
|
|
4
|
-
type DefaultProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Is the component displayed on a dark background.
|
|
7
|
-
* @default false
|
|
8
|
-
*/
|
|
9
|
-
dark?: boolean;
|
|
10
|
-
};
|
|
4
|
+
type DefaultProps = {};
|
|
11
5
|
type AsChildProps = {
|
|
12
6
|
/**
|
|
13
7
|
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
@@ -31,4 +25,4 @@ type LabelRequiredProps = {
|
|
|
31
25
|
};
|
|
32
26
|
//#endregion
|
|
33
27
|
export { DefaultProps as n, LabelRequiredProps as r, AsChildProps as t };
|
|
34
|
-
//# sourceMappingURL=types-
|
|
28
|
+
//# sourceMappingURL=types-C0q7hMe_.d.mts.map
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DefaultProps, r as LabelRequiredProps, t as AsChildProps } from "./types-
|
|
1
|
+
import { n as DefaultProps, r as LabelRequiredProps, t as AsChildProps } from "./types-C0q7hMe_.mjs";
|
|
2
2
|
export { AsChildProps, DefaultProps, LabelRequiredProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useLayoutEffect } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts
|
|
4
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { useIsomorphicLayoutEffect as t };
|
|
7
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect-B2JpCiYW.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../../useCheckboxGroup-Boc_tLJ3.mjs";
|
|
2
|
-
import { t as useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-
|
|
3
|
-
import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-
|
|
2
|
+
import { t as useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-B2JpCiYW.mjs";
|
|
3
|
+
import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-Yb_zpMhd.mjs";
|
|
4
4
|
import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-Cxt9TwLS.mjs";
|
|
5
5
|
import { t as useScrollDirection } from "../../useScrollDirection-6pq5a8B3.mjs";
|
|
6
6
|
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../../useMediaQuery-Di0fXraw.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as useIsomorphicLayoutEffect } from "../../../useIsomorphicLayoutEffect-
|
|
1
|
+
import { t as useIsomorphicLayoutEffect } from "../../../useIsomorphicLayoutEffect-B2JpCiYW.mjs";
|
|
2
2
|
export { useIsomorphicLayoutEffect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-
|
|
1
|
+
import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-Yb_zpMhd.mjs";
|
|
2
2
|
export { UsePaginationProps, usePagination };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../useCheckboxGroup-Boc_tLJ3.mjs";
|
|
2
|
-
import { t as useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-
|
|
3
|
-
import { i as usePagination, r as UsePaginationProps } from "../alert-footer-
|
|
2
|
+
import { t as useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-B2JpCiYW.mjs";
|
|
3
|
+
import { i as usePagination, r as UsePaginationProps } from "../alert-footer-Yb_zpMhd.mjs";
|
|
4
4
|
import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-Cxt9TwLS.mjs";
|
|
5
5
|
import { t as useScrollDirection } from "../useScrollDirection-6pq5a8B3.mjs";
|
|
6
6
|
import { n as useMediaQuery, t as UseMediaQueryOptions } from "../useMediaQuery-Di0fXraw.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bi-digital/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"description": "React components from BI Digital",
|
|
6
6
|
"author": "BI Digital",
|
|
7
7
|
"homepage": "https://designsystem.bi.no/",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"./vanilla": {
|
|
25
25
|
"types": "./dist/vanilla/index.d.mts",
|
|
26
26
|
"import": "./dist/vanilla/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./react-types": {
|
|
29
|
+
"types": "./dist/react-types.d.ts"
|
|
27
30
|
}
|
|
28
31
|
},
|
|
29
32
|
"files": [
|
|
@@ -35,18 +38,18 @@
|
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"@digdir/designsystemet-web": "^1.14.0",
|
|
37
40
|
"@floating-ui/dom": "^1.7.6",
|
|
38
|
-
"@radix-ui/react-slot": "^1.
|
|
41
|
+
"@radix-ui/react-slot": "^1.3.0",
|
|
39
42
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
40
43
|
"clsx": "^2.1.1",
|
|
41
|
-
"@bi-digital/icons": "0.
|
|
44
|
+
"@bi-digital/icons": "0.12.0"
|
|
42
45
|
},
|
|
43
46
|
"devDependencies": {
|
|
44
47
|
"@types/react": "^19.2.14",
|
|
45
48
|
"@types/react-dom": "^19.2.3",
|
|
46
49
|
"@vitest/browser-playwright": "^4.1.4",
|
|
47
50
|
"@vitest/coverage-v8": "^4.1.4",
|
|
48
|
-
"@vitest/expect": "^4.1.
|
|
49
|
-
"playwright": "^1.
|
|
51
|
+
"@vitest/expect": "^4.1.9",
|
|
52
|
+
"playwright": "^1.61.0",
|
|
50
53
|
"react": "^19.2.0",
|
|
51
54
|
"react-dom": "^19.2.0",
|
|
52
55
|
"tsdown": "^0.22.0",
|
|
@@ -56,7 +59,7 @@
|
|
|
56
59
|
"peerDependencies": {
|
|
57
60
|
"react": "^19",
|
|
58
61
|
"react-dom": "^19",
|
|
59
|
-
"@bi-digital/css": "0.
|
|
62
|
+
"@bi-digital/css": "0.12.0"
|
|
60
63
|
},
|
|
61
64
|
"scripts": {
|
|
62
65
|
"build": "tsdown",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/utilities/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts
|
|
4
|
-
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { useIsomorphicLayoutEffect as t };
|
|
7
|
-
//# sourceMappingURL=useIsomorphicLayoutEffect-DXCY5AxR.d.mts.map
|