@iabbb/bds-react 0.38.7 → 0.39.0-alpha

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 (76) hide show
  1. package/Button/Button.d.ts +7 -0
  2. package/Button/{Button.js → index.cjs} +46 -5
  3. package/Button/index.cjs.map +1 -0
  4. package/Button/index.d.ts +2 -0
  5. package/Button/index.mjs +94 -0
  6. package/Button/index.mjs.map +1 -0
  7. package/Button/package.json +7 -0
  8. package/CallToAction/CallToAction.d.ts +6 -0
  9. package/CallToAction/index.cjs +83 -0
  10. package/CallToAction/index.cjs.map +1 -0
  11. package/CallToAction/index.d.ts +2 -0
  12. package/CallToAction/index.mjs +62 -0
  13. package/CallToAction/index.mjs.map +1 -0
  14. package/CallToAction/package.json +7 -0
  15. package/ErrorSummary/ErrorSummary.d.ts +14 -0
  16. package/ErrorSummary/{ErrorSummary.js → index.cjs} +86 -7
  17. package/ErrorSummary/index.cjs.map +1 -0
  18. package/ErrorSummary/index.d.ts +2 -0
  19. package/ErrorSummary/index.mjs +170 -0
  20. package/ErrorSummary/index.mjs.map +1 -0
  21. package/ErrorSummary/package.json +7 -0
  22. package/ErrorSummary/utils.d.ts +2 -0
  23. package/FieldTextInput/FieldTextInput.d.ts +10 -0
  24. package/FieldTextInput/{FieldTextInput.js → index.cjs} +45 -4
  25. package/FieldTextInput/index.cjs.map +1 -0
  26. package/FieldTextInput/index.d.ts +1 -0
  27. package/FieldTextInput/index.mjs +88 -0
  28. package/FieldTextInput/index.mjs.map +1 -0
  29. package/FieldTextInput/package.json +7 -0
  30. package/Pagination/Pagination.d.ts +8 -0
  31. package/Pagination/{Pagination.js → index.cjs} +71 -5
  32. package/Pagination/index.cjs.map +1 -0
  33. package/Pagination/index.d.ts +1 -0
  34. package/Pagination/index.mjs +159 -0
  35. package/Pagination/index.mjs.map +1 -0
  36. package/Pagination/package.json +7 -0
  37. package/README.md +17 -17
  38. package/Typography/Typography.d.ts +7 -0
  39. package/Typography/index.cjs +99 -0
  40. package/Typography/index.cjs.map +1 -0
  41. package/Typography/index.d.ts +1 -0
  42. package/Typography/index.mjs +78 -0
  43. package/Typography/index.mjs.map +1 -0
  44. package/Typography/package.json +7 -0
  45. package/index.cjs +447 -0
  46. package/index.cjs.map +1 -0
  47. package/index.d.ts +6 -0
  48. package/index.mjs +421 -0
  49. package/index.mjs.map +1 -0
  50. package/package.json +35 -29
  51. package/Button/Button.js.map +0 -1
  52. package/Button/index.js +0 -10
  53. package/Button/index.js.map +0 -1
  54. package/CallToAction/CallToAction.js +0 -42
  55. package/CallToAction/CallToAction.js.map +0 -1
  56. package/CallToAction/index.js +0 -10
  57. package/CallToAction/index.js.map +0 -1
  58. package/ErrorSummary/ErrorSummary.js.map +0 -1
  59. package/ErrorSummary/index.js +0 -14
  60. package/ErrorSummary/index.js.map +0 -1
  61. package/ErrorSummary/utils.js +0 -44
  62. package/ErrorSummary/utils.js.map +0 -1
  63. package/FieldTextInput/FieldTextInput.js.map +0 -1
  64. package/FieldTextInput/index.js +0 -10
  65. package/FieldTextInput/index.js.map +0 -1
  66. package/Pagination/Pagination.js.map +0 -1
  67. package/Pagination/index.js +0 -10
  68. package/Pagination/index.js.map +0 -1
  69. package/Typography/Typography.js +0 -58
  70. package/Typography/Typography.js.map +0 -1
  71. package/Typography/index.js +0 -10
  72. package/Typography/index.js.map +0 -1
  73. package/_rollupPluginBabelHelpers-28932a37.js +0 -73
  74. package/_rollupPluginBabelHelpers-28932a37.js.map +0 -1
  75. package/index.js +0 -21
  76. package/index.js.map +0 -1
@@ -0,0 +1,170 @@
1
+ import * as React from 'react';
2
+
3
+ function _extends() {
4
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
5
+ for (var i = 1; i < arguments.length; i++) {
6
+ var source = arguments[i];
7
+ for (var key in source) {
8
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9
+ target[key] = source[key];
10
+ }
11
+ }
12
+ }
13
+ return target;
14
+ };
15
+ return _extends.apply(this, arguments);
16
+ }
17
+ function _objectWithoutPropertiesLoose(source, excluded) {
18
+ if (source == null) return {};
19
+ var target = {};
20
+ var sourceKeys = Object.keys(source);
21
+ var key, i;
22
+ for (i = 0; i < sourceKeys.length; i++) {
23
+ key = sourceKeys[i];
24
+ if (excluded.indexOf(key) >= 0) continue;
25
+ target[key] = source[key];
26
+ }
27
+ return target;
28
+ }
29
+ function _objectWithoutProperties(source, excluded) {
30
+ if (source == null) return {};
31
+ var target = _objectWithoutPropertiesLoose(source, excluded);
32
+ var key, i;
33
+ if (Object.getOwnPropertySymbols) {
34
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
35
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
36
+ key = sourceSymbolKeys[i];
37
+ if (excluded.indexOf(key) >= 0) continue;
38
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39
+ target[key] = source[key];
40
+ }
41
+ }
42
+ return target;
43
+ }
44
+
45
+ function getFragmentFromUrl(url) {
46
+ return url.includes('#') ? url.split('#').pop() : undefined;
47
+ }
48
+ function getAssociatedLegendOrLabel(input) {
49
+ var _document$querySelect;
50
+ var fieldset = input.closest('fieldset');
51
+ if (fieldset) {
52
+ var legends = fieldset.getElementsByTagName('legend');
53
+ if (legends.length) {
54
+ var candidateLegend = legends[0];
55
+
56
+ // If the input type is radio or checkbox, always use the legend if there
57
+ // is one.
58
+ if (input instanceof HTMLInputElement && (input.type === 'checkbox' || input.type === 'radio')) {
59
+ return candidateLegend;
60
+ }
61
+
62
+ // For other input types, only scroll to the fieldset’s legend (instead of
63
+ // the label associated with the input) if the input would end up in the
64
+ // top half of the screen.
65
+ //
66
+ // This should avoid situations where the input either ends up off the
67
+ // screen, or obscured by a software keyboard.
68
+ var legendTop = candidateLegend.getBoundingClientRect().top;
69
+ var inputRect = input.getBoundingClientRect();
70
+
71
+ // If the browser doesn't support Element.getBoundingClientRect().height
72
+ // or window.innerHeight (like IE8), bail and just link to the label.
73
+ if (inputRect.height && window.innerHeight) {
74
+ var inputBottom = inputRect.top + inputRect.height;
75
+ if (inputBottom - legendTop < window.innerHeight / 2) {
76
+ return candidateLegend;
77
+ }
78
+ }
79
+ }
80
+ }
81
+ return (_document$querySelect = document.querySelector("label[for='".concat(input.getAttribute('id'), "']"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : input.closest('label');
82
+ }
83
+
84
+ var _excluded = ["className", "errors", "mapNameToId"];
85
+ var FormErrorKey = '_form';
86
+ var FINAL_FORM_ERROR = 'FINAL_FORM/form-error';
87
+ function BdsErrorSummary(_ref) {
88
+ var className = _ref.className,
89
+ errors = _ref.errors,
90
+ _ref$mapNameToId = _ref.mapNameToId,
91
+ mapNameToId = _ref$mapNameToId === void 0 ? function (name) {
92
+ return name;
93
+ } : _ref$mapNameToId,
94
+ props = _objectWithoutProperties(_ref, _excluded);
95
+ var headingId = React.useId();
96
+ var groupRef = React.useRef(null);
97
+ React.useEffect(function () {
98
+ if (!errors || Object.keys(errors).length === 0) return;
99
+ if (!groupRef.current) return;
100
+ groupRef.current.focus();
101
+ }, [errors]);
102
+ if (!errors || Object.keys(errors).length === 0) return null;
103
+ var handleLinkClick = function handleLinkClick(e) {
104
+ var inputId = getFragmentFromUrl(e.currentTarget.href);
105
+ if (!inputId) {
106
+ return;
107
+ }
108
+ var input = document.getElementById(inputId);
109
+ if (!input) {
110
+ return;
111
+ }
112
+ var legendOrLabel = getAssociatedLegendOrLabel(input);
113
+ if (!legendOrLabel) {
114
+ return;
115
+ }
116
+ e.preventDefault();
117
+ legendOrLabel.scrollIntoView();
118
+ input.focus({
119
+ preventScroll: true
120
+ });
121
+ };
122
+ return /*#__PURE__*/React.createElement("bds-error-summary", _extends({
123
+ className: ['stack', className].filter(function (x) {
124
+ return x;
125
+ }).join(' '),
126
+ role: "group",
127
+ "aria-labelledby": headingId,
128
+ ref: groupRef,
129
+ tabIndex: -1
130
+ }, props), /*#__PURE__*/React.createElement("h2", {
131
+ className: "bds-h5",
132
+ id: headingId
133
+ }, /*#__PURE__*/React.createElement("svg", {
134
+ xmlns: "http://www.w3.org/2000/svg",
135
+ viewBox: "0 0 512 512",
136
+ "aria-hidden": "true",
137
+ height: "1em",
138
+ width: "1em",
139
+ fill: "currentColor"
140
+ }, /*#__PURE__*/React.createElement("path", {
141
+ d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z"
142
+ })), "Issue"), /*#__PURE__*/React.createElement("ul", null, Object.keys(errors).map(function (errorKey) {
143
+ var message = errors[errorKey];
144
+ var isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);
145
+ if (isFormError) {
146
+ return /*#__PURE__*/React.createElement("li", {
147
+ key: errorKey,
148
+ dangerouslySetInnerHTML: {
149
+ __html: message
150
+ }
151
+ });
152
+ }
153
+ var isArrayField = Array.isArray(message);
154
+ var messages = isArrayField ? message : [message];
155
+ return /*#__PURE__*/React.createElement(React.Fragment, {
156
+ key: errorKey
157
+ }, messages.map(function (fieldMessage, index) {
158
+ var inputId = "".concat(mapNameToId(errorKey)).concat(isArrayField ? "[".concat(index, "]") : '');
159
+ return /*#__PURE__*/React.createElement("li", {
160
+ key: inputId
161
+ }, /*#__PURE__*/React.createElement("a", {
162
+ href: "#".concat(inputId),
163
+ onClick: handleLinkClick
164
+ }, fieldMessage, messages.length > 1 ? " (".concat(index + 1, " of ").concat(messages.length, ")") : undefined));
165
+ }));
166
+ })));
167
+ }
168
+
169
+ export { FormErrorKey, BdsErrorSummary as default };
170
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/ErrorSummary/utils.ts","../../src/ErrorSummary/ErrorSummary.tsx"],"sourcesContent":["export function getFragmentFromUrl(url: string) {\r\n return url.includes('#') ? url.split('#').pop() : undefined;\r\n}\r\n\r\nexport function getAssociatedLegendOrLabel(input: HTMLElement) {\r\n const fieldset = input.closest('fieldset');\r\n\r\n if (fieldset) {\r\n const legends = fieldset.getElementsByTagName('legend');\r\n\r\n if (legends.length) {\r\n const candidateLegend = legends[0];\r\n\r\n // If the input type is radio or checkbox, always use the legend if there\r\n // is one.\r\n if (input instanceof HTMLInputElement && (input.type === 'checkbox' || input.type === 'radio')) {\r\n return candidateLegend;\r\n }\r\n\r\n // For other input types, only scroll to the fieldset’s legend (instead of\r\n // the label associated with the input) if the input would end up in the\r\n // top half of the screen.\r\n //\r\n // This should avoid situations where the input either ends up off the\r\n // screen, or obscured by a software keyboard.\r\n const legendTop = candidateLegend.getBoundingClientRect().top;\r\n const inputRect = input.getBoundingClientRect();\r\n\r\n // If the browser doesn't support Element.getBoundingClientRect().height\r\n // or window.innerHeight (like IE8), bail and just link to the label.\r\n if (inputRect.height && window.innerHeight) {\r\n const inputBottom = inputRect.top + inputRect.height;\r\n\r\n if (inputBottom - legendTop < window.innerHeight / 2) {\r\n return candidateLegend;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return document.querySelector(`label[for='${input.getAttribute('id')}']`) ?? input.closest('label');\r\n}\r\n","import * as React from 'react';\r\n\r\nimport { getAssociatedLegendOrLabel, getFragmentFromUrl } from './utils';\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n 'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\r\n }\r\n }\r\n}\r\n\r\nexport const FormErrorKey = '_form';\r\n\r\nconst FINAL_FORM_ERROR = 'FINAL_FORM/form-error';\r\n\r\nexport type ErrorSummaryProps = {\r\n errors: Record<string, Array<string> | string> | null;\r\n mapNameToId?: (name: string) => string;\r\n};\r\n\r\nexport default function BdsErrorSummary({\r\n className,\r\n errors,\r\n mapNameToId = (name) => name,\r\n ...props\r\n}: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\r\n const headingId = React.useId();\r\n const groupRef = React.useRef<HTMLElement>(null);\r\n\r\n React.useEffect(() => {\r\n if (!errors || Object.keys(errors).length === 0) return;\r\n if (!groupRef.current) return;\r\n\r\n groupRef.current.focus();\r\n }, [errors]);\r\n\r\n if (!errors || Object.keys(errors).length === 0) return null;\r\n\r\n const handleLinkClick = (e) => {\r\n const inputId = getFragmentFromUrl(e.currentTarget.href);\r\n\r\n if (!inputId) {\r\n return;\r\n }\r\n\r\n const input = document.getElementById(inputId);\r\n\r\n if (!input) {\r\n return;\r\n }\r\n\r\n const legendOrLabel = getAssociatedLegendOrLabel(input);\r\n\r\n if (!legendOrLabel) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n\r\n legendOrLabel.scrollIntoView();\r\n input.focus({ preventScroll: true });\r\n };\r\n\r\n return (\r\n <bds-error-summary\r\n className={['stack', className].filter((x) => x).join(' ')}\r\n role=\"group\"\r\n aria-labelledby={headingId}\r\n ref={groupRef}\r\n tabIndex={-1}\r\n {...props}\r\n >\r\n <h2 className=\"bds-h5\" id={headingId}>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 512 512\"\r\n aria-hidden=\"true\"\r\n height=\"1em\"\r\n width=\"1em\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\r\n </svg>\r\n Issue\r\n </h2>\r\n <ul>\r\n {Object.keys(errors).map((errorKey) => {\r\n const message = errors[errorKey];\r\n const isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);\r\n\r\n if (isFormError) {\r\n return <li key={errorKey} dangerouslySetInnerHTML={{ __html: message }} />;\r\n }\r\n\r\n const isArrayField = Array.isArray(message);\r\n\r\n const messages = isArrayField ? message : [message];\r\n\r\n return (\r\n <React.Fragment key={errorKey}>\r\n {messages.map((fieldMessage, index) => {\r\n const inputId = `${mapNameToId(errorKey)}${isArrayField ? `[${index}]` : ''}`;\r\n\r\n return (\r\n <li key={inputId}>\r\n <a href={`#${inputId}`} onClick={handleLinkClick}>\r\n {fieldMessage}\r\n {messages.length > 1 ? ` (${index + 1} of ${messages.length})` : undefined}\r\n </a>\r\n </li>\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n })}\r\n </ul>\r\n </bds-error-summary>\r\n );\r\n}\r\n"],"names":["getFragmentFromUrl","url","includes","split","pop","undefined","getAssociatedLegendOrLabel","input","_document$querySelect","fieldset","closest","legends","getElementsByTagName","length","candidateLegend","HTMLInputElement","type","legendTop","getBoundingClientRect","top","inputRect","height","window","innerHeight","inputBottom","document","querySelector","concat","getAttribute","FormErrorKey","FINAL_FORM_ERROR","BdsErrorSummary","_ref","className","errors","_ref$mapNameToId","mapNameToId","name","props","_objectWithoutProperties","_excluded","headingId","React","useId","groupRef","useRef","useEffect","Object","keys","current","focus","handleLinkClick","e","inputId","currentTarget","href","getElementById","legendOrLabel","preventDefault","scrollIntoView","preventScroll","createElement","_extends","filter","x","join","role","ref","tabIndex","id","xmlns","viewBox","width","fill","d","map","errorKey","message","isFormError","key","dangerouslySetInnerHTML","__html","isArrayField","Array","isArray","messages","Fragment","fieldMessage","index","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,SAASA,kBAAkBA,CAACC,GAAW,EAAE;AAC9C,EAAA,OAAOA,GA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OAAO,GAAA1B,EAAAA,CAAAA,MAAA,CAAMS,WAAW,CAACwC,QAAQ,CAAC,CAAA,CAAAjD,MAAA,CAAGuD,YAAY,GAAAvD,GAAAA,CAAAA,MAAA,CAAO6D,KAAK,EAAA,GAAA,CAAA,GAAM,EAAE,CAAE,CAAA;MAE7E,oBACE9C,KAAA,CAAAmB,aAAA,CAAA,IAAA,EAAA;AAAIkB,QAAAA,GAAG,EAAE1B,OAAAA;OACPX,eAAAA,KAAA,CAAAmB,aAAA,CAAA,GAAA,EAAA;AAAGN,QAAAA,IAAI,EAAA5B,GAAAA,CAAAA,MAAA,CAAM0B,OAAO,CAAG;AAACoC,QAAAA,OAAO,EAAEtC,eAAAA;OAC9BoC,EAAAA,YAAY,EACZF,QAAQ,CAACxE,MAAM,GAAG,CAAC,GAAAc,IAAAA,CAAAA,MAAA,CAAQ6D,KAAK,GAAG,CAAC,EAAA,MAAA,CAAA,CAAA7D,MAAA,CAAO0D,QAAQ,CAACxE,MAAM,EAAA,GAAA,CAAA,GAAMR,SAChE,CACD,CAAC,CAAA;AAET,KAAC,CACa,CAAC,CAAA;GAEpB,CACC,CACa,CAAC,CAAA;AAExB;;;;"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@iabbb/bds-react/ErrorSummary",
3
+ "private": true,
4
+ "main": "../index.cjs",
5
+ "module": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,2 @@
1
+ export declare function getFragmentFromUrl(url: string): string | undefined;
2
+ export declare function getAssociatedLegendOrLabel(input: HTMLElement): Element | null;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export declare type FieldTextInputProps<C> = {
3
+ as?: C;
4
+ error?: string;
5
+ hint?: string;
6
+ id?: string;
7
+ isOptional?: boolean;
8
+ label: string;
9
+ };
10
+ export default function FieldTextInput<C extends React.ElementType>({ as, error, hint, id, isOptional, label, ...props }: FieldTextInputProps<C> & React.ComponentPropsWithoutRef<C>): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var _rollupPluginBabelHelpers = require('../_rollupPluginBabelHelpers-28932a37.js');
4
3
  var React = require('react');
5
4
 
6
5
  function _interopNamespaceDefault(e) {
@@ -22,6 +21,48 @@ function _interopNamespaceDefault(e) {
22
21
 
23
22
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
24
23
 
24
+ function _extends() {
25
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
26
+ for (var i = 1; i < arguments.length; i++) {
27
+ var source = arguments[i];
28
+ for (var key in source) {
29
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
30
+ target[key] = source[key];
31
+ }
32
+ }
33
+ }
34
+ return target;
35
+ };
36
+ return _extends.apply(this, arguments);
37
+ }
38
+ function _objectWithoutPropertiesLoose(source, excluded) {
39
+ if (source == null) return {};
40
+ var target = {};
41
+ var sourceKeys = Object.keys(source);
42
+ var key, i;
43
+ for (i = 0; i < sourceKeys.length; i++) {
44
+ key = sourceKeys[i];
45
+ if (excluded.indexOf(key) >= 0) continue;
46
+ target[key] = source[key];
47
+ }
48
+ return target;
49
+ }
50
+ function _objectWithoutProperties(source, excluded) {
51
+ if (source == null) return {};
52
+ var target = _objectWithoutPropertiesLoose(source, excluded);
53
+ var key, i;
54
+ if (Object.getOwnPropertySymbols) {
55
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
56
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
57
+ key = sourceSymbolKeys[i];
58
+ if (excluded.indexOf(key) >= 0) continue;
59
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
60
+ target[key] = source[key];
61
+ }
62
+ }
63
+ return target;
64
+ }
65
+
25
66
  var _excluded = ["as", "error", "hint", "id", "isOptional", "label"];
26
67
  function FieldTextInput(_ref) {
27
68
  var _id;
@@ -32,7 +73,7 @@ function FieldTextInput(_ref) {
32
73
  _ref$isOptional = _ref.isOptional,
33
74
  isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
34
75
  label = _ref.label,
35
- props = _rollupPluginBabelHelpers._objectWithoutProperties(_ref, _excluded);
76
+ props = _objectWithoutProperties(_ref, _excluded);
36
77
  id = (_id = id) !== null && _id !== void 0 ? _id : props.name;
37
78
  var errorId = React__namespace.useId();
38
79
  var hintId = React__namespace.useId();
@@ -56,7 +97,7 @@ function FieldTextInput(_ref) {
56
97
  fill: "currentColor"
57
98
  }, /*#__PURE__*/React__namespace.createElement("path", {
58
99
  d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z"
59
- })), error), /*#__PURE__*/React__namespace.createElement(InputComponent, _rollupPluginBabelHelpers._extends({
100
+ })), error), /*#__PURE__*/React__namespace.createElement(InputComponent, _extends({
60
101
  "aria-invalid": error ? true : undefined,
61
102
  "aria-describedby": error && hint ? "".concat(hintId, " ").concat(errorId) : error ? errorId : hint ? hintId : undefined,
62
103
  "aria-required": isOptional ? undefined : true,
@@ -65,4 +106,4 @@ function FieldTextInput(_ref) {
65
106
  }
66
107
 
67
108
  module.exports = FieldTextInput;
68
- //# sourceMappingURL=FieldTextInput.js.map
109
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../src/FieldTextInput/FieldTextInput.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nexport type FieldTextInputProps<C> = {\r\n as?: C;\r\n error?: string;\r\n hint?: string;\r\n id?: string;\r\n isOptional?: boolean;\r\n label: string;\r\n};\r\n\r\nexport default function FieldTextInput<C extends React.ElementType>({\r\n as,\r\n error,\r\n hint,\r\n id,\r\n isOptional = false,\r\n label,\r\n ...props\r\n}: FieldTextInputProps<C> & React.ComponentPropsWithoutRef<C>) {\r\n id = id ?? props.name;\r\n\r\n const errorId = React.useId();\r\n const hintId = React.useId();\r\n\r\n const InputComponent = as ?? 'input';\r\n\r\n return (\r\n <div className=\"bds-text-input stack\">\r\n <label htmlFor={id}>\r\n {label}\r\n {isOptional && ' (optional)'}\r\n </label>\r\n {hint && (\r\n <span className=\"bds-hint\" id={hintId}>\r\n {hint}\r\n </span>\r\n )}\r\n {error && (\r\n <span className=\"bds-error\" id={errorId}>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 512 512\"\r\n aria-hidden=\"true\"\r\n height=\"1em\"\r\n width=\"1em\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\r\n </svg>\r\n {error}\r\n </span>\r\n )}\r\n <InputComponent\r\n aria-invalid={error ? true : undefined}\r\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\r\n aria-required={isOptional ? undefined : true}\r\n id={id}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n}\r\n"],"names":["FieldTextInput","_ref","_id","as","error","hint","id","_ref$isOptional","isOptional","label","props","_objectWithoutProperties","_excluded","name","errorId","React","useId","hintId","InputComponent","createElement","className","htmlFor","xmlns","viewBox","height","width","fill","d","_extends","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CACP,EACAD,KAAK,iBACJW,gBAAA,CAAAI,aAAA,CAAA,MAAA,EAAA;AAAMC,IAAAA,SAAS,EAAC,WAAW;AAACd,IAAAA,EAAE,EAAEQ,OAAAA;GAC9BC,eAAAA,gBAAA,CAAAI,aAAA,CAAA,KAAA,EAAA;AACEG,IAAAA,KAAK,EAAC,4BAA4B;AAClCC,IAAAA,OAAO,EAAC,aAAa;AACrB,IAAA,aAAA,EAAY,MAAM;AAClBC,IAAAA,MAAM,EAAC,KAAK;AACZC,IAAAA,KAAK,EAAC,KAAK;AACXC,IAAAA,IAAI,EAAC,cAAA;GAELX,eAAAA,gBAAA,CAAAI,aAAA,CAAA,MAAA,EAAA;AAAMQ,IAAAA,CAAC,EAAC,4UAAA;AAA4U,GAAE,CACnV,CAAC,EACLvB,KACG,CACP,eACDW,gBAAA,CAAAI,aAAA,CAACD,cAAc,EAAAU,QAAA,CAAA;AACb,IAAA,cAAA,EAAcxB,KAAK,GAAG,IAAI,GAAGyB,SAAU;IACvC,kBAAkBzB,EAAAA,KAAK,IAAIC,IAAI,GAAA,EAAA,CAAAyB,MAAA,CAAMb,MAAM,OAAAa,MAAA,CAAIhB,OAAO,CAAKV,GAAAA,KAAK,GAAGU,OAAO,GAAGT,IAAI,GAAGY,MAAM,GAAGY,SAAU;AACvG,IAAA,eAAA,EAAerB,UAAU,GAAGqB,SAAS,GAAG,IAAK;AAC7CvB,IAAAA,EAAE,EAAEA,EAAAA;GACAI,EAAAA,KAAK,CACV,CACE,CAAC,CAAA;AAEV;;;;"}
@@ -0,0 +1 @@
1
+ export { default } from './FieldTextInput';
@@ -0,0 +1,88 @@
1
+ import * as React from 'react';
2
+
3
+ function _extends() {
4
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
5
+ for (var i = 1; i < arguments.length; i++) {
6
+ var source = arguments[i];
7
+ for (var key in source) {
8
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9
+ target[key] = source[key];
10
+ }
11
+ }
12
+ }
13
+ return target;
14
+ };
15
+ return _extends.apply(this, arguments);
16
+ }
17
+ function _objectWithoutPropertiesLoose(source, excluded) {
18
+ if (source == null) return {};
19
+ var target = {};
20
+ var sourceKeys = Object.keys(source);
21
+ var key, i;
22
+ for (i = 0; i < sourceKeys.length; i++) {
23
+ key = sourceKeys[i];
24
+ if (excluded.indexOf(key) >= 0) continue;
25
+ target[key] = source[key];
26
+ }
27
+ return target;
28
+ }
29
+ function _objectWithoutProperties(source, excluded) {
30
+ if (source == null) return {};
31
+ var target = _objectWithoutPropertiesLoose(source, excluded);
32
+ var key, i;
33
+ if (Object.getOwnPropertySymbols) {
34
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
35
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
36
+ key = sourceSymbolKeys[i];
37
+ if (excluded.indexOf(key) >= 0) continue;
38
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
39
+ target[key] = source[key];
40
+ }
41
+ }
42
+ return target;
43
+ }
44
+
45
+ var _excluded = ["as", "error", "hint", "id", "isOptional", "label"];
46
+ function FieldTextInput(_ref) {
47
+ var _id;
48
+ var as = _ref.as,
49
+ error = _ref.error,
50
+ hint = _ref.hint,
51
+ id = _ref.id,
52
+ _ref$isOptional = _ref.isOptional,
53
+ isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
54
+ label = _ref.label,
55
+ props = _objectWithoutProperties(_ref, _excluded);
56
+ id = (_id = id) !== null && _id !== void 0 ? _id : props.name;
57
+ var errorId = React.useId();
58
+ var hintId = React.useId();
59
+ var InputComponent = as !== null && as !== void 0 ? as : 'input';
60
+ return /*#__PURE__*/React.createElement("div", {
61
+ className: "bds-text-input stack"
62
+ }, /*#__PURE__*/React.createElement("label", {
63
+ htmlFor: id
64
+ }, label, isOptional && ' (optional)'), hint && /*#__PURE__*/React.createElement("span", {
65
+ className: "bds-hint",
66
+ id: hintId
67
+ }, hint), error && /*#__PURE__*/React.createElement("span", {
68
+ className: "bds-error",
69
+ id: errorId
70
+ }, /*#__PURE__*/React.createElement("svg", {
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ viewBox: "0 0 512 512",
73
+ "aria-hidden": "true",
74
+ height: "1em",
75
+ width: "1em",
76
+ fill: "currentColor"
77
+ }, /*#__PURE__*/React.createElement("path", {
78
+ d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z"
79
+ })), error), /*#__PURE__*/React.createElement(InputComponent, _extends({
80
+ "aria-invalid": error ? true : undefined,
81
+ "aria-describedby": error && hint ? "".concat(hintId, " ").concat(errorId) : error ? errorId : hint ? hintId : undefined,
82
+ "aria-required": isOptional ? undefined : true,
83
+ id: id
84
+ }, props)));
85
+ }
86
+
87
+ export { FieldTextInput as default };
88
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../src/FieldTextInput/FieldTextInput.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nexport type FieldTextInputProps<C> = {\r\n as?: C;\r\n error?: string;\r\n hint?: string;\r\n id?: string;\r\n isOptional?: boolean;\r\n label: string;\r\n};\r\n\r\nexport default function FieldTextInput<C extends React.ElementType>({\r\n as,\r\n error,\r\n hint,\r\n id,\r\n isOptional = false,\r\n label,\r\n ...props\r\n}: FieldTextInputProps<C> & React.ComponentPropsWithoutRef<C>) {\r\n id = id ?? props.name;\r\n\r\n const errorId = React.useId();\r\n const hintId = React.useId();\r\n\r\n const InputComponent = as ?? 'input';\r\n\r\n return (\r\n <div className=\"bds-text-input stack\">\r\n <label htmlFor={id}>\r\n {label}\r\n {isOptional && ' (optional)'}\r\n </label>\r\n {hint && (\r\n <span className=\"bds-hint\" id={hintId}>\r\n {hint}\r\n </span>\r\n )}\r\n {error && (\r\n <span className=\"bds-error\" id={errorId}>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 512 512\"\r\n aria-hidden=\"true\"\r\n height=\"1em\"\r\n width=\"1em\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\r\n </svg>\r\n {error}\r\n </span>\r\n )}\r\n <InputComponent\r\n aria-invalid={error ? true : undefined}\r\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\r\n aria-required={isOptional ? undefined : true}\r\n id={id}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n}\r\n"],"names":["FieldTextInput","_ref","_id","as","error","hint","id","_ref$isOptional","isOptional","label","props","_objectWithoutProperties","_excluded","name","errorId","React","useId","hintId","InputComponent","createElement","className","htmlFor","xmlns","viewBox","height","width","fill","d","_extends","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWe,SAASA,cAAcA,CAAAC,IAAA,EAQyB;AAAA,EAAA,IAAAC,GAAA,CAAA;AAAA,EAAA,IAP7DC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,EAAE,GAAAL,IAAA,CAAFK,EAAE;I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EAAY,MAAM;AAClBC,IAAAA,MAAM,EAAC,KAAK;AACZC,IAAAA,KAAK,EAAC,KAAK;AACXC,IAAAA,IAAI,EAAC,cAAA;GAELX,eAAAA,KAAA,CAAAI,aAAA,CAAA,MAAA,EAAA;AAAMQ,IAAAA,CAAC,EAAC,4UAAA;AAA4U,GAAE,CACnV,CAAC,EACLvB,KACG,CACP,eACDW,KAAA,CAAAI,aAAA,CAACD,cAAc,EAAAU,QAAA,CAAA;AACb,IAAA,cAAA,EAAcxB,KAAK,GAAG,IAAI,GAAGyB,SAAU;IACvC,kBAAkBzB,EAAAA,KAAK,IAAIC,IAAI,GAAA,EAAA,CAAAyB,MAAA,CAAMb,MAAM,OAAAa,MAAA,CAAIhB,OAAO,CAAKV,GAAAA,KAAK,GAAGU,OAAO,GAAGT,IAAI,GAAGY,MAAM,GAAGY,SAAU;AACvG,IAAA,eAAA,EAAerB,UAAU,GAAGqB,SAAS,GAAG,IAAK;AAC7CvB,IAAAA,EAAE,EAAEA,EAAAA;GACAI,EAAAA,KAAK,CACV,CACE,CAAC,CAAA;AAEV;;;;"}
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@iabbb/bds-react/FieldTextInput",
3
+ "private": true,
4
+ "main": "../index.cjs",
5
+ "module": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export declare type PaginationProps = {
3
+ buildPageUrl: (page: number) => string;
4
+ currentPage: number;
5
+ onPageClick?: (page: number) => void;
6
+ totalPages: number;
7
+ };
8
+ export default function Pagination({ buildPageUrl, className, currentPage, onPageClick, totalPages, ...props }: PaginationProps & React.ComponentPropsWithoutRef<'nav'>): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var _rollupPluginBabelHelpers = require('../_rollupPluginBabelHelpers-28932a37.js');
4
3
  var React = require('react');
5
4
 
6
5
  function _interopNamespaceDefault(e) {
@@ -22,12 +21,79 @@ function _interopNamespaceDefault(e) {
22
21
 
23
22
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
24
23
 
24
+ function _extends() {
25
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
26
+ for (var i = 1; i < arguments.length; i++) {
27
+ var source = arguments[i];
28
+ for (var key in source) {
29
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
30
+ target[key] = source[key];
31
+ }
32
+ }
33
+ }
34
+ return target;
35
+ };
36
+ return _extends.apply(this, arguments);
37
+ }
38
+ function _objectWithoutPropertiesLoose(source, excluded) {
39
+ if (source == null) return {};
40
+ var target = {};
41
+ var sourceKeys = Object.keys(source);
42
+ var key, i;
43
+ for (i = 0; i < sourceKeys.length; i++) {
44
+ key = sourceKeys[i];
45
+ if (excluded.indexOf(key) >= 0) continue;
46
+ target[key] = source[key];
47
+ }
48
+ return target;
49
+ }
50
+ function _objectWithoutProperties(source, excluded) {
51
+ if (source == null) return {};
52
+ var target = _objectWithoutPropertiesLoose(source, excluded);
53
+ var key, i;
54
+ if (Object.getOwnPropertySymbols) {
55
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
56
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
57
+ key = sourceSymbolKeys[i];
58
+ if (excluded.indexOf(key) >= 0) continue;
59
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
60
+ target[key] = source[key];
61
+ }
62
+ }
63
+ return target;
64
+ }
65
+ function _toConsumableArray(arr) {
66
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
67
+ }
68
+ function _arrayWithoutHoles(arr) {
69
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
70
+ }
71
+ function _iterableToArray(iter) {
72
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
73
+ }
74
+ function _unsupportedIterableToArray(o, minLen) {
75
+ if (!o) return;
76
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
77
+ var n = Object.prototype.toString.call(o).slice(8, -1);
78
+ if (n === "Object" && o.constructor) n = o.constructor.name;
79
+ if (n === "Map" || n === "Set") return Array.from(o);
80
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
81
+ }
82
+ function _arrayLikeToArray(arr, len) {
83
+ if (len == null || len > arr.length) len = arr.length;
84
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
85
+ return arr2;
86
+ }
87
+ function _nonIterableSpread() {
88
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
89
+ }
90
+
25
91
  var _excluded = ["buildPageUrl", "className", "currentPage", "onPageClick", "totalPages"];
26
92
  function usePages(currentPage, totalPages) {
27
93
  var pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(function (x) {
28
94
  return x >= 1 && x <= totalPages;
29
95
  });
30
- return _rollupPluginBabelHelpers._toConsumableArray(new Set(pages));
96
+ return _toConsumableArray(new Set(pages));
31
97
  }
32
98
  function Pagination(_ref) {
33
99
  var buildPageUrl = _ref.buildPageUrl,
@@ -35,9 +101,9 @@ function Pagination(_ref) {
35
101
  currentPage = _ref.currentPage,
36
102
  onPageClick = _ref.onPageClick,
37
103
  totalPages = _ref.totalPages,
38
- props = _rollupPluginBabelHelpers._objectWithoutProperties(_ref, _excluded);
104
+ props = _objectWithoutProperties(_ref, _excluded);
39
105
  var pages = usePages(currentPage, totalPages);
40
- return /*#__PURE__*/React__namespace.createElement("nav", _rollupPluginBabelHelpers._extends({
106
+ return /*#__PURE__*/React__namespace.createElement("nav", _extends({
41
107
  "aria-label": "pagination",
42
108
  className: ['bds-pagination', className].filter(function (x) {
43
109
  return x;
@@ -111,4 +177,4 @@ function Pagination(_ref) {
111
177
  }
112
178
 
113
179
  module.exports = Pagination;
114
- //# sourceMappingURL=Pagination.js.map
180
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nexport type PaginationProps = {\r\n buildPageUrl: (page: number) => string;\r\n currentPage: number;\r\n onPageClick?: (page: number) => void;\r\n totalPages: number;\r\n};\r\n\r\nfunction usePages(currentPage: number, totalPages: number) {\r\n const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(\r\n (x) => x >= 1 && x <= totalPages,\r\n );\r\n return [...new Set(pages)];\r\n}\r\n\r\nexport default function Pagination({\r\n buildPageUrl,\r\n className,\r\n currentPage,\r\n onPageClick,\r\n totalPages,\r\n ...props\r\n}: PaginationProps & React.ComponentPropsWithoutRef<'nav'>) {\r\n const pages = usePages(currentPage, totalPages);\r\n\r\n return (\r\n <nav aria-label=\"pagination\" className={['bds-pagination', className].filter((x) => x).join(' ')} {...props}>\r\n {currentPage !== 1 && (\r\n <>\r\n <a href={buildPageUrl(1)} className=\"bds-first-page\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n height=\"1em\"\r\n width=\"100%\"\r\n viewBox=\"0 63.95 512 384.1\"\r\n >\r\n <path d=\"M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3v83.4l171.5 142.9zM256 352V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29v-64z\" />\r\n </svg>\r\n First\r\n </a>\r\n <a aria-label=\"previous\" href={buildPageUrl(currentPage - 1)} rel=\"prev\">\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n width=\"100%\"\r\n height=\"1em\"\r\n viewBox=\"0.02 95.9 192.08 320.17\"\r\n >\r\n <path d=\"M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6v256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z\" />\r\n </svg>\r\n Prev.\r\n </a>\r\n </>\r\n )}\r\n <ul>\r\n {pages.map((page, index) => {\r\n const handlePageClick = () => {\r\n if (!onPageClick) return;\r\n\r\n onPageClick(page);\r\n };\r\n\r\n return (\r\n <React.Fragment key={page}>\r\n <li>\r\n <a\r\n aria-current={page === currentPage ? 'page' : undefined}\r\n href={buildPageUrl(page)}\r\n onClick={handlePageClick}\r\n >\r\n <span className=\"visually-hidden\">Page</span> {page}\r\n </a>\r\n </li>\r\n {pages[index + 1] > page + 1 ? <li data-overflow=\"\">...</li> : null}\r\n </React.Fragment>\r\n );\r\n })}\r\n </ul>\r\n {currentPage !== totalPages && (\r\n <>\r\n <a href={buildPageUrl(currentPage + 1)} rel=\"next\">\r\n Next\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n viewBox=\"63.9 95.9 192.1 320.17\"\r\n width=\"100%\"\r\n height=\"1em\"\r\n >\r\n <path d=\"M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9S63.9 115 63.9 128v256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z\" />\r\n </svg>\r\n </a>\r\n <a href={buildPageUrl(totalPages)} className=\"bds-last-page\">\r\n Last\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n width=\"100%\"\r\n height=\"1em\"\r\n viewBox=\"0 63.95 512 384.1\"\r\n >\r\n <path d=\"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4L224 214.3v83.4L52.5 440.6zM256 352V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4S256 428.4 256 416v-64z\" />\r\n </svg>\r\n </a>\r\n </>\r\n )}\r\n </nav>\r\n );\r\n}\r\n"],"names":["usePages","currentPage","totalPages","pages","filter","x","_toConsumableArray","Set","Pagination","_ref","buildPageUrl","className","onPageClick","props","_objectWithoutProperties","_excluded","React","createElement","_extends","join","Fragment","href","xmlns","focusable","height","width","viewBox","d","rel","map","page","index","handlePageClick","key","undefined","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAASA,QAAQA,CAACC,WAAmB,EAAEC,UAAkB,EAAE;EACzD,IAAMC,KAAK,GAAG,CAAC,CAAC,EAAEF,WAAW,GAAG,CAAC,EAAEA,WAAW,EAAEA,WAAW,GAAG,CAAC,EAAEC,UAAU,CAAC,CAACE,MAAM,CACjF,UAACC,CAAC,EAAA;AAAA,IAAA,OAAKA,CAAC,IAAI,CAAC,IAAIA,CAAC,IAAIH,UAAU,CAAA;AAAA,GAClC,CAAC,CAAA;AACD,EAAA,OAAAI,kBAAA,CAAW,IAAIC,GAAG,CAACJ,KAAK,CAAC,CAAA,CAAA;AAC3B,CAAA;AAEe,SAASK,UAAUA,CAAAC,IAAA,EAO0B;AAAA,EAAA,IAN1DC,YAAY,GAAAD,IAAA,CAAZC,YAAY;IACZC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTV,WAAW,GAAAQ,IAAA,CAAXR,WAAW;IACXW,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXV,UAAU,GA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