@bi-digital/react 0.5.0 → 0.6.1

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.
Files changed (135) hide show
  1. package/dist/{alert-j8SRrlpj.js → alert-DEuLhy0m.js} +2 -2
  2. package/dist/alert-DEuLhy0m.js.map +1 -0
  3. package/dist/{alert-footer-vCp6ARyQ.d.ts → alert-footer-UAe5dxDo.d.ts} +79 -73
  4. package/dist/{chip-DBcmzT0P.js → chip-ASg3tnri.js} +9 -3
  5. package/dist/chip-ASg3tnri.js.map +1 -0
  6. package/dist/components/alert/alert-footer.d.ts +9 -9
  7. package/dist/components/alert/alert.d.ts +9 -9
  8. package/dist/components/alert/alert.js +1 -1
  9. package/dist/components/alert/index.d.ts +9 -9
  10. package/dist/components/alert/index.js +1 -1
  11. package/dist/components/avatar/avatar.d.ts +9 -9
  12. package/dist/components/avatar/index.d.ts +9 -9
  13. package/dist/components/badge/badge.d.ts +9 -9
  14. package/dist/components/badge/index.d.ts +9 -9
  15. package/dist/components/button/button.d.ts +9 -9
  16. package/dist/components/button/index.d.ts +9 -9
  17. package/dist/components/card/card-action.d.ts +9 -9
  18. package/dist/components/card/card-actions.d.ts +9 -9
  19. package/dist/components/card/card-content.d.ts +9 -9
  20. package/dist/components/card/card-date.d.ts +9 -9
  21. package/dist/components/card/card-header.d.ts +9 -9
  22. package/dist/components/card/card-media.d.ts +9 -9
  23. package/dist/components/card/card.d.ts +9 -9
  24. package/dist/components/card/index.d.ts +9 -9
  25. package/dist/components/checkbox/checkbox-subsection.d.ts +9 -9
  26. package/dist/components/checkbox/checkbox.d.ts +9 -9
  27. package/dist/components/checkbox/index.d.ts +9 -9
  28. package/dist/components/chip/chip.d.ts +9 -9
  29. package/dist/components/chip/chip.js +1 -1
  30. package/dist/components/chip/index.d.ts +9 -9
  31. package/dist/components/chip/index.js +1 -1
  32. package/dist/components/details/details-content.d.ts +9 -9
  33. package/dist/components/details/details-summary.d.ts +9 -9
  34. package/dist/components/details/details.d.ts +9 -9
  35. package/dist/components/details/index.d.ts +9 -9
  36. package/dist/components/dialog/dialog-close-button.d.ts +9 -9
  37. package/dist/components/dialog/dialog-content.d.ts +9 -9
  38. package/dist/components/dialog/dialog-footer.d.ts +9 -9
  39. package/dist/components/dialog/dialog-header.d.ts +9 -9
  40. package/dist/components/dialog/dialog-trigger-context.d.ts +1 -1
  41. package/dist/components/dialog/dialog-trigger.d.ts +9 -9
  42. package/dist/components/dialog/dialog.d.ts +9 -9
  43. package/dist/components/dialog/index.d.ts +9 -9
  44. package/dist/components/drawer/drawer-close-button.d.ts +9 -9
  45. package/dist/components/drawer/drawer-content.d.ts +9 -9
  46. package/dist/components/drawer/drawer-footer.d.ts +9 -9
  47. package/dist/components/drawer/drawer-header.d.ts +9 -9
  48. package/dist/components/drawer/drawer-trigger-context.d.ts +1 -1
  49. package/dist/components/drawer/drawer-trigger.d.ts +9 -9
  50. package/dist/components/drawer/drawer.d.ts +9 -9
  51. package/dist/components/drawer/index.d.ts +9 -9
  52. package/dist/components/dropdown/dropdown-button.d.ts +9 -9
  53. package/dist/components/dropdown/dropdown-item.d.ts +1 -1
  54. package/dist/components/dropdown/dropdown-list.d.ts +1 -1
  55. package/dist/components/dropdown/dropdown-trigger-context.d.ts +9 -9
  56. package/dist/components/dropdown/dropdown-trigger.d.ts +9 -9
  57. package/dist/components/dropdown/dropdown.d.ts +9 -9
  58. package/dist/components/dropdown/index.d.ts +9 -9
  59. package/dist/components/field/field-affix.d.ts +9 -9
  60. package/dist/components/field/field-description.d.ts +9 -9
  61. package/dist/components/field/field.d.ts +9 -9
  62. package/dist/components/field/index.d.ts +9 -9
  63. package/dist/components/fieldset/fieldset-description.d.ts +9 -9
  64. package/dist/components/fieldset/fieldset-legend.d.ts +9 -9
  65. package/dist/components/fieldset/fieldset.d.ts +9 -9
  66. package/dist/components/fieldset/index.d.ts +9 -9
  67. package/dist/components/filter-group/filter-group.d.ts +9 -9
  68. package/dist/components/filter-group/index.d.ts +9 -9
  69. package/dist/components/footer/footer-links.d.ts +1 -1
  70. package/dist/components/footer/footer.d.ts +9 -9
  71. package/dist/components/footer/index.d.ts +9 -9
  72. package/dist/components/index.d.ts +9 -9
  73. package/dist/components/index.js +2 -2
  74. package/dist/components/input/index.d.ts +9 -9
  75. package/dist/components/input/input.d.ts +9 -9
  76. package/dist/components/label/index.d.ts +9 -9
  77. package/dist/components/label/label.d.ts +9 -9
  78. package/dist/components/link/index.d.ts +9 -9
  79. package/dist/components/link/link.d.ts +9 -9
  80. package/dist/components/logo/index.d.ts +9 -9
  81. package/dist/components/logo/logo.d.ts +9 -9
  82. package/dist/components/navbar/index.d.ts +9 -9
  83. package/dist/components/navbar/navbar.d.ts +9 -9
  84. package/dist/components/navbar/sub-navbar.d.ts +9 -9
  85. package/dist/components/pagination/index.d.ts +9 -9
  86. package/dist/components/pagination/pagination-button.d.ts +9 -9
  87. package/dist/components/pagination/pagination-item.d.ts +1 -1
  88. package/dist/components/pagination/pagination.d.ts +9 -9
  89. package/dist/components/popover/index.d.ts +9 -9
  90. package/dist/components/popover/popover-trigger-context.d.ts +1 -1
  91. package/dist/components/popover/popover-trigger.d.ts +9 -9
  92. package/dist/components/popover/popover.d.ts +9 -9
  93. package/dist/components/radio/index.d.ts +9 -9
  94. package/dist/components/radio/radio.d.ts +9 -9
  95. package/dist/components/search/index.d.ts +9 -9
  96. package/dist/components/search/search.d.ts +9 -9
  97. package/dist/components/select/index.d.ts +9 -9
  98. package/dist/components/select/select-optgroup.d.ts +9 -9
  99. package/dist/components/select/select-option.d.ts +9 -9
  100. package/dist/components/select/select.d.ts +9 -9
  101. package/dist/components/selectfield/index.d.ts +9 -9
  102. package/dist/components/selectfield/selectfield.d.ts +9 -9
  103. package/dist/components/skip-link/index.d.ts +9 -9
  104. package/dist/components/skip-link/skip-link.d.ts +9 -9
  105. package/dist/components/spinner/index.d.ts +9 -9
  106. package/dist/components/spinner/spinner.d.ts +9 -9
  107. package/dist/components/sticky-header/index.d.ts +1 -1
  108. package/dist/components/sticky-header/sticky-header.d.ts +1 -1
  109. package/dist/components/tabs/index.d.ts +9 -9
  110. package/dist/components/tabs/tab.d.ts +9 -9
  111. package/dist/components/tabs/tabs-list.d.ts +9 -9
  112. package/dist/components/tabs/tabs-panel.d.ts +9 -9
  113. package/dist/components/tabs/tabs.d.ts +9 -9
  114. package/dist/components/textarea/index.d.ts +9 -9
  115. package/dist/components/textarea/textarea.d.ts +9 -9
  116. package/dist/components/textfield/index.d.ts +9 -9
  117. package/dist/components/textfield/textfield.d.ts +9 -9
  118. package/dist/components/validation-message/index.d.ts +9 -9
  119. package/dist/components/validation-message/validation-message.d.ts +9 -9
  120. package/dist/{dialog-trigger-context-CqcFlKiZ.d.ts → dialog-trigger-context-Cnqrwkhh.d.ts} +3 -3
  121. package/dist/{drawer-trigger-context-BGpQEYl4.d.ts → drawer-trigger-context-C_8K3V81.d.ts} +3 -3
  122. package/dist/{dropdown-item-BxIXaDzp.d.ts → dropdown-item-CXTqFHFB.d.ts} +3 -3
  123. package/dist/{dropdown-list-BIcdCeXr.d.ts → dropdown-list-D6yodn0r.d.ts} +3 -3
  124. package/dist/{footer-links-C5WrGyTb.d.ts → footer-links-BSPLOfVv.d.ts} +3 -3
  125. package/dist/main.d.ts +9 -9
  126. package/dist/main.js +2 -2
  127. package/dist/{pagination-item-C5Jm0qFy.d.ts → pagination-item-DZzWvm4c.d.ts} +3 -3
  128. package/dist/{popover-trigger-context-DTdlFdLb.d.ts → popover-trigger-context-BSsZTHJj.d.ts} +3 -3
  129. package/dist/{sticky-header-DQlgWbz7.d.ts → sticky-header-FVVjY6FD.d.ts} +3 -3
  130. package/dist/utilities/hooks/index.d.ts +9 -9
  131. package/dist/utilities/hooks/usePagination/usePagination.d.ts +9 -9
  132. package/dist/utilities/index.d.ts +9 -9
  133. package/package.json +8 -8
  134. package/dist/alert-j8SRrlpj.js.map +0 -1
  135. package/dist/chip-DBcmzT0P.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../../useCheckboxGroup-BrrIH1cE.js";
2
2
  import { t as useIsomorphicLayoutEffect } from "../../useIsomorphicLayoutEffect-CsNaN4tt.js";
3
3
  import "../../types-yUMPmMvf.js";
4
- import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-vCp6ARyQ.js";
5
- import "../../dialog-trigger-context-CqcFlKiZ.js";
6
- import "../../drawer-trigger-context-BGpQEYl4.js";
7
- import "../../popover-trigger-context-DTdlFdLb.js";
8
- import "../../dropdown-item-BxIXaDzp.js";
9
- import "../../dropdown-list-BIcdCeXr.js";
10
- import "../../footer-links-C5WrGyTb.js";
11
- import "../../pagination-item-C5Jm0qFy.js";
12
- import "../../sticky-header-DQlgWbz7.js";
4
+ import { i as usePagination, r as UsePaginationProps } from "../../alert-footer-UAe5dxDo.js";
5
+ import "../../dialog-trigger-context-Cnqrwkhh.js";
6
+ import "../../drawer-trigger-context-C_8K3V81.js";
7
+ import "../../popover-trigger-context-BSsZTHJj.js";
8
+ import "../../dropdown-item-CXTqFHFB.js";
9
+ import "../../dropdown-list-D6yodn0r.js";
10
+ import "../../footer-links-BSPLOfVv.js";
11
+ import "../../pagination-item-DZzWvm4c.js";
12
+ import "../../sticky-header-FVVjY6FD.js";
13
13
  import "../../index-Cyx9R6nl.js";
14
14
  import { t as useIsElementAboveViewport } from "../../useIsElementAboveViewport-Dicc167e.js";
15
15
  import { t as useScrollDirection } from "../../useScrollDirection-BSCugbOI.js";
@@ -1,15 +1,15 @@
1
1
  import "../../../useCheckboxGroup-BrrIH1cE.js";
2
2
  import "../../../useIsomorphicLayoutEffect-CsNaN4tt.js";
3
3
  import "../../../types-yUMPmMvf.js";
4
- import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-vCp6ARyQ.js";
5
- import "../../../dialog-trigger-context-CqcFlKiZ.js";
6
- import "../../../drawer-trigger-context-BGpQEYl4.js";
7
- import "../../../popover-trigger-context-DTdlFdLb.js";
8
- import "../../../dropdown-item-BxIXaDzp.js";
9
- import "../../../dropdown-list-BIcdCeXr.js";
10
- import "../../../footer-links-C5WrGyTb.js";
11
- import "../../../pagination-item-C5Jm0qFy.js";
12
- import "../../../sticky-header-DQlgWbz7.js";
4
+ import { i as usePagination, r as UsePaginationProps } from "../../../alert-footer-UAe5dxDo.js";
5
+ import "../../../dialog-trigger-context-Cnqrwkhh.js";
6
+ import "../../../drawer-trigger-context-C_8K3V81.js";
7
+ import "../../../popover-trigger-context-BSsZTHJj.js";
8
+ import "../../../dropdown-item-CXTqFHFB.js";
9
+ import "../../../dropdown-list-D6yodn0r.js";
10
+ import "../../../footer-links-BSPLOfVv.js";
11
+ import "../../../pagination-item-DZzWvm4c.js";
12
+ import "../../../sticky-header-FVVjY6FD.js";
13
13
  import "../../../index-Cyx9R6nl.js";
14
14
  import "../../../useIsElementAboveViewport-Dicc167e.js";
15
15
  import "../../../useScrollDirection-BSCugbOI.js";
@@ -1,15 +1,15 @@
1
1
  import { r as useCheckboxGroup, t as UseCheckboxGroupOptions } from "../useCheckboxGroup-BrrIH1cE.js";
2
2
  import { t as useIsomorphicLayoutEffect } from "../useIsomorphicLayoutEffect-CsNaN4tt.js";
3
3
  import "../types-yUMPmMvf.js";
4
- import { i as usePagination, r as UsePaginationProps } from "../alert-footer-vCp6ARyQ.js";
5
- import "../dialog-trigger-context-CqcFlKiZ.js";
6
- import "../drawer-trigger-context-BGpQEYl4.js";
7
- import "../popover-trigger-context-DTdlFdLb.js";
8
- import "../dropdown-item-BxIXaDzp.js";
9
- import "../dropdown-list-BIcdCeXr.js";
10
- import "../footer-links-C5WrGyTb.js";
11
- import "../pagination-item-C5Jm0qFy.js";
12
- import "../sticky-header-DQlgWbz7.js";
4
+ import { i as usePagination, r as UsePaginationProps } from "../alert-footer-UAe5dxDo.js";
5
+ import "../dialog-trigger-context-Cnqrwkhh.js";
6
+ import "../drawer-trigger-context-C_8K3V81.js";
7
+ import "../popover-trigger-context-BSsZTHJj.js";
8
+ import "../dropdown-item-CXTqFHFB.js";
9
+ import "../dropdown-list-D6yodn0r.js";
10
+ import "../footer-links-BSPLOfVv.js";
11
+ import "../pagination-item-DZzWvm4c.js";
12
+ import "../sticky-header-FVVjY6FD.js";
13
13
  import "../index-Cyx9R6nl.js";
14
14
  import { t as useIsElementAboveViewport } from "../useIsElementAboveViewport-Dicc167e.js";
15
15
  import { t as useScrollDirection } from "../useScrollDirection-BSCugbOI.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bi-digital/react",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.1",
5
5
  "engines": {
6
6
  "node": "^20.19.0 || >=22.12.0"
7
7
  },
@@ -41,7 +41,7 @@
41
41
  "@radix-ui/react-tabs": "^1.1.13",
42
42
  "@radix-ui/react-use-controllable-state": "^1.2.2",
43
43
  "clsx": "^2.1.1",
44
- "@bi-digital/icons": "0.5.0"
44
+ "@bi-digital/icons": "0.6.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@testing-library/dom": "^10.4.1",
@@ -50,19 +50,19 @@
50
50
  "@testing-library/user-event": "^14.6.1",
51
51
  "@types/react": "^19.2.2",
52
52
  "@types/react-dom": "^19.2.2",
53
- "@vitest/coverage-v8": "^4.0.4",
54
- "@vitest/expect": "^4.0.4",
55
- "jsdom": "^27.0.1",
53
+ "@vitest/coverage-v8": "^4.0.6",
54
+ "@vitest/expect": "^4.0.6",
55
+ "jsdom": "^27.1.0",
56
56
  "react": "^19.2.0",
57
57
  "react-dom": "^19.2.0",
58
58
  "tsconfck": "^3.1.6",
59
- "tsdown": "^0.15.11",
60
- "vitest": "^4.0.4"
59
+ "tsdown": "^0.15.12",
60
+ "vitest": "^4.0.6"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": "^19",
64
64
  "react-dom": "^19",
65
- "@bi-digital/css": "0.5.0"
65
+ "@bi-digital/css": "0.6.1"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsdown",
@@ -1 +0,0 @@
1
- {"version":3,"file":"alert-j8SRrlpj.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 { CheckmarkSmallIcon, ErrorIcon, InfoIcon, WarningIcon } from '@bi-digital/icons';\n\nexport type AlertProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The alert variant.\n * @default 'primary'\n */\n variant?: 'info' | 'success' | 'warning' | 'alert' | 'primary' | 'neutral';\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: InfoIcon,\n success: CheckmarkSmallIcon,\n warning: WarningIcon,\n alert: ErrorIcon,\n primary: InfoIcon,\n neutral: InfoIcon,\n};\n\nexport const Alert = ({\n className,\n children,\n closeButton,\n variant = 'primary',\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;CACP,SAAS;CACT,SAAS;CACV;AAED,MAAa,SAAS,EACpB,WACA,UACA,aACA,UAAU,WACV,MACA,SACA,MACA,MACA,IACA,GAAG,WACa;CAChB,MAAM,YAAY,UAAU,OAAO;CACnC,MAAM,cAAc,aAAa;AACjC,QACE,qBAAC;EACC,WAAW,KAAK,YAAY,UAAU;EACtC,gBAAc;EACd,aAAW;EACX,aAAW;EACN;EACL,GAAI;;GAEH,QAAQ,oBAAC,gBAAc;GACvB;GACA;;GACS"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"chip-DBcmzT0P.js","names":[],"sources":["../src/components/chip/chip.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport clsx from 'clsx';\nimport type { MergeRight } from '../../utilities';\nimport type { DefaultProps } from '../../types';\n\nexport type ChipProps = MergeRight<\n DefaultProps & HTMLAttributes<HTMLDivElement>,\n {\n /**\n * The chip size\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The chip color\n * @default 'primary'\n */\n color?: 'neutral' | 'primary-light' | 'info' | 'white' | 'primary' | 'alert' | 'warning' | 'success';\n /** Set an icon before the chip label */\n startIcon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n }\n>;\n\nexport const Chip = ({\n children,\n color = 'primary',\n size = 'medium',\n startIcon,\n dark,\n asChild,\n className,\n ref,\n ...props\n}: ChipProps) => {\n const Component = asChild ? Slot : 'div';\n\n return (\n <Component\n className={clsx('bi-chip', className)}\n data-color={color}\n data-size={size}\n data-dark={dark || undefined}\n ref={ref}\n {...props}\n >\n {startIcon}\n <Slottable>{children}</Slottable>\n </Component>\n );\n};\n"],"mappings":";;;;;AA8BA,MAAa,QAAQ,EACnB,UACA,QAAQ,WACR,OAAO,UACP,WACA,MACA,SACA,WACA,IACA,GAAG,YACY;AAGf,QACE,qBAHgB,UAAU,OAAO;EAI/B,WAAW,KAAK,WAAW,UAAU;EACrC,cAAY;EACZ,aAAW;EACX,aAAW,QAAQ;EACd;EACL,GAAI;aAEH,WACD,oBAAC,aAAW,WAAqB;GACvB"}