@iabbb/bds-react 0.46.6 → 0.47.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.
- package/Button/index.cjs +22 -34
- package/Button/index.cjs.map +1 -1
- package/Button/index.mjs +22 -34
- package/Button/index.mjs.map +1 -1
- package/CallToAction/index.cjs +22 -34
- package/CallToAction/index.cjs.map +1 -1
- package/CallToAction/index.mjs +22 -34
- package/CallToAction/index.mjs.map +1 -1
- package/ErrorMessage/index.cjs +22 -34
- package/ErrorMessage/index.cjs.map +1 -1
- package/ErrorMessage/index.mjs +22 -34
- package/ErrorMessage/index.mjs.map +1 -1
- package/ErrorSummary/index.cjs +22 -34
- package/ErrorSummary/index.cjs.map +1 -1
- package/ErrorSummary/index.mjs +22 -34
- package/ErrorSummary/index.mjs.map +1 -1
- package/FieldCheckbox/index.cjs +43 -56
- package/FieldCheckbox/index.cjs.map +1 -1
- package/FieldCheckbox/index.mjs +43 -56
- package/FieldCheckbox/index.mjs.map +1 -1
- package/FieldRadio/index.cjs +43 -56
- package/FieldRadio/index.cjs.map +1 -1
- package/FieldRadio/index.mjs +43 -56
- package/FieldRadio/index.mjs.map +1 -1
- package/FieldSelect/FieldSelect.d.ts +10 -0
- package/FieldSelect/index.cjs +110 -0
- package/FieldSelect/index.cjs.map +1 -0
- package/FieldSelect/index.d.ts +1 -0
- package/FieldSelect/index.mjs +87 -0
- package/FieldSelect/index.mjs.map +1 -0
- package/FieldSelect/package.json +7 -0
- package/FieldTextInput/index.cjs +22 -34
- package/FieldTextInput/index.cjs.map +1 -1
- package/FieldTextInput/index.mjs +22 -34
- package/FieldTextInput/index.mjs.map +1 -1
- package/FieldTextarea/index.cjs +22 -34
- package/FieldTextarea/index.cjs.map +1 -1
- package/FieldTextarea/index.mjs +22 -34
- package/FieldTextarea/index.mjs.map +1 -1
- package/Fieldset/index.cjs +22 -34
- package/Fieldset/index.cjs.map +1 -1
- package/Fieldset/index.mjs +22 -34
- package/Fieldset/index.mjs.map +1 -1
- package/Pagination/index.cjs +43 -56
- package/Pagination/index.cjs.map +1 -1
- package/Pagination/index.mjs +43 -56
- package/Pagination/index.mjs.map +1 -1
- package/Typography/index.cjs +22 -34
- package/Typography/index.cjs.map +1 -1
- package/Typography/index.mjs +22 -34
- package/Typography/index.mjs.map +1 -1
- package/index.cjs +43 -56
- package/index.cjs.map +1 -1
- package/index.mjs +43 -56
- package/index.mjs.map +1 -1
- package/package.json +10 -10
package/FieldTextarea/index.cjs
CHANGED
|
@@ -24,45 +24,33 @@ function _interopNamespaceDefault(e) {
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
25
|
|
|
26
26
|
function _extends() {
|
|
27
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
28
|
-
for (var
|
|
29
|
-
var
|
|
30
|
-
for (var
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
-
target[key] = source[key];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
27
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
28
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
29
|
+
var t = arguments[e];
|
|
30
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
35
31
|
}
|
|
36
|
-
return
|
|
37
|
-
};
|
|
38
|
-
return _extends.apply(this, arguments);
|
|
32
|
+
return n;
|
|
33
|
+
}, _extends.apply(null, arguments);
|
|
39
34
|
}
|
|
40
|
-
function
|
|
41
|
-
if (
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
target[key] = source[key];
|
|
35
|
+
function _objectWithoutProperties(e, t) {
|
|
36
|
+
if (null == e) return {};
|
|
37
|
+
var o,
|
|
38
|
+
r,
|
|
39
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
40
|
+
if (Object.getOwnPropertySymbols) {
|
|
41
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
42
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
49
43
|
}
|
|
50
|
-
return
|
|
44
|
+
return i;
|
|
51
45
|
}
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
59
|
-
key = sourceSymbolKeys[i];
|
|
60
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
-
target[key] = source[key];
|
|
63
|
-
}
|
|
46
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
47
|
+
if (null == r) return {};
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
+
if (e.indexOf(n) >= 0) continue;
|
|
51
|
+
t[n] = r[n];
|
|
64
52
|
}
|
|
65
|
-
return
|
|
53
|
+
return t;
|
|
66
54
|
}
|
|
67
55
|
|
|
68
56
|
var _excluded$1 = ["className", "children"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","_id","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","_id","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEe,SAASA,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FieldTextarea/index.mjs
CHANGED
|
@@ -1,45 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
function _extends() {
|
|
4
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
5
|
-
for (var
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
-
target[key] = source[key];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
4
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
5
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
6
|
+
var t = arguments[e];
|
|
7
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
12
8
|
}
|
|
13
|
-
return
|
|
14
|
-
};
|
|
15
|
-
return _extends.apply(this, arguments);
|
|
9
|
+
return n;
|
|
10
|
+
}, _extends.apply(null, arguments);
|
|
16
11
|
}
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
target[key] = source[key];
|
|
12
|
+
function _objectWithoutProperties(e, t) {
|
|
13
|
+
if (null == e) return {};
|
|
14
|
+
var o,
|
|
15
|
+
r,
|
|
16
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
17
|
+
if (Object.getOwnPropertySymbols) {
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
26
20
|
}
|
|
27
|
-
return
|
|
21
|
+
return i;
|
|
28
22
|
}
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}
|
|
23
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
24
|
+
if (null == r) return {};
|
|
25
|
+
var t = {};
|
|
26
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
+
if (e.indexOf(n) >= 0) continue;
|
|
28
|
+
t[n] = r[n];
|
|
41
29
|
}
|
|
42
|
-
return
|
|
30
|
+
return t;
|
|
43
31
|
}
|
|
44
32
|
|
|
45
33
|
var _excluded$1 = ["className", "children"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","_id","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","_id","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA,CAAA;AAClE,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,QAAA,CAAA;IAAMP,SAAS,EAAE,CAAC,WAAW,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,C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AAA,SAAS,EAAC,gBAAA;GACbK,eAAAA,KAAA,CAAAC,aAAA,CAAA,OAAA,EAAA;AAAOuB,IAAAA,OAAO,EAAER,EAAAA;GACbG,EAAAA,KAAK,EACLD,UAAU,IAAI,aACV,CAAC,EACPH,IAAI,iBACHf,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMN,IAAAA,SAAS,EAAC,UAAU;AAACqB,IAAAA,EAAE,EAAEO,MAAAA;GAC5BR,EAAAA,IACG,CACP,EACAD,KAAK,iBAAId,KAAA,CAAAC,aAAA,CAACR,YAAY,EAAA;AAACuB,IAAAA,EAAE,EAAEK,OAAAA;AAAQ,GAAA,EAAEP,KAAoB,CAAC,eAC3Dd,KAAA,CAAAC,aAAA,aAAAC,QAAA,CAAA;AACE,IAAA,cAAA,EAAcY,KAAK,GAAG,IAAI,GAAGW,SAAU;IACvC,kBAAkBX,EAAAA,KAAK,IAAIC,IAAI,GAAA,EAAA,CAAAW,MAAA,CAAMH,MAAM,OAAAG,MAAA,CAAIL,OAAO,CAAKP,GAAAA,KAAK,GAAGO,OAAO,GAAGN,IAAI,GAAGQ,MAAM,GAAGE,SAAU;AACvG9B,IAAAA,SAAS,EAAC,cAAc;AACxBqB,IAAAA,EAAE,EAAEA,EAAAA;GACAnB,EAAAA,KAAK,CACV,CACE,CAAC,CAAA;AAEV;;;;"}
|
package/Fieldset/index.cjs
CHANGED
|
@@ -24,45 +24,33 @@ function _interopNamespaceDefault(e) {
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
25
|
|
|
26
26
|
function _extends() {
|
|
27
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
28
|
-
for (var
|
|
29
|
-
var
|
|
30
|
-
for (var
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
-
target[key] = source[key];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
27
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
28
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
29
|
+
var t = arguments[e];
|
|
30
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
35
31
|
}
|
|
36
|
-
return
|
|
37
|
-
};
|
|
38
|
-
return _extends.apply(this, arguments);
|
|
32
|
+
return n;
|
|
33
|
+
}, _extends.apply(null, arguments);
|
|
39
34
|
}
|
|
40
|
-
function
|
|
41
|
-
if (
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
target[key] = source[key];
|
|
35
|
+
function _objectWithoutProperties(e, t) {
|
|
36
|
+
if (null == e) return {};
|
|
37
|
+
var o,
|
|
38
|
+
r,
|
|
39
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
40
|
+
if (Object.getOwnPropertySymbols) {
|
|
41
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
42
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
49
43
|
}
|
|
50
|
-
return
|
|
44
|
+
return i;
|
|
51
45
|
}
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
59
|
-
key = sourceSymbolKeys[i];
|
|
60
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
-
target[key] = source[key];
|
|
63
|
-
}
|
|
46
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
47
|
+
if (null == r) return {};
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
+
if (e.indexOf(n) >= 0) continue;
|
|
51
|
+
t[n] = r[n];
|
|
64
52
|
}
|
|
65
|
-
return
|
|
53
|
+
return t;
|
|
66
54
|
}
|
|
67
55
|
|
|
68
56
|
var _excluded$1 = ["className", "children"];
|
package/Fieldset/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/Fieldset/Fieldset.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldsetProps = {\n error?: string;\n hint?: string;\n isOptional?: boolean;\n legend: React.ReactNode | string;\n showOptionsInline?: boolean;\n};\n\nexport default function Fieldset({\n children,\n className,\n error,\n hint,\n isOptional,\n legend,\n showOptionsInline,\n ...props\n}: FieldsetProps & React.ComponentPropsWithoutRef<'fieldset'>) {\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <fieldset\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n aria-invalid={error ? true : undefined}\n className={['bds-fieldset', className].filter((x) => x).join(' ')}\n {...props}\n >\n <legend>\n {legend}\n {isOptional && ' (optional)'}\n </legend>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <div className=\"bds-form-options\" data-inline-options={showOptionsInline ? '' : undefined}>\n {children}\n </div>\n </fieldset>\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","Fieldset","error","hint","isOptional","legend","showOptionsInline","errorId","useId","hintId","concat","undefined","id"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/Fieldset/Fieldset.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldsetProps = {\n error?: string;\n hint?: string;\n isOptional?: boolean;\n legend: React.ReactNode | string;\n showOptionsInline?: boolean;\n};\n\nexport default function Fieldset({\n children,\n className,\n error,\n hint,\n isOptional,\n legend,\n showOptionsInline,\n ...props\n}: FieldsetProps & React.ComponentPropsWithoutRef<'fieldset'>) {\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <fieldset\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n aria-invalid={error ? true : undefined}\n className={['bds-fieldset', className].filter((x) => x).join(' ')}\n {...props}\n >\n <legend>\n {legend}\n {isOptional && ' (optional)'}\n </legend>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <div className=\"bds-form-options\" data-inline-options={showOptionsInline ? '' : undefined}>\n {children}\n </div>\n </fieldset>\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","Fieldset","error","hint","isOptional","legend","showOptionsInline","errorId","useId","hintId","concat","undefined","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA,CAAA;AAClE,EAAA,oBACEC,gBAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,QAAA,CAAA;IAAMP,SAAS,EAAE,CAAC,WAAW,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;KAAC,CAAA,CAACC,IAAI,CAAC,GAAG,CAAA;AAAE,GAAA,EAAKR,KAAK,CAAA,eAC7EG,gBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEK,IAAAA,KAAK,EA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,GAAG,IAAI,GAAGS,SAAU;IACvC3B,SAAS,EAAE,CAAC,cAAc,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;KAAC,CAAA,CAACC,IAAI,CAAC,GAAG,CAAA;AAAE,GAAA,EAC9DR,KAAK,CAETG,eAAAA,gBAAA,CAAAC,aAAA,iBACGe,MAAM,EACND,UAAU,IAAI,aACT,CAAC,EACRD,IAAI,iBACHd,gBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMN,IAAAA,SAAS,EAAC,UAAU;AAAC4B,IAAAA,EAAE,EAAEH,MAAAA;GAC5BN,EAAAA,IACG,CACP,EACAD,KAAK,iBAAIb,gBAAA,CAAAC,aAAA,CAACR,YAAY,EAAA;AAAC8B,IAAAA,EAAE,EAAEL,OAAAA;AAAQ,GAAA,EAAEL,KAAoB,CAAC,eAC3Db,gBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKN,IAAAA,SAAS,EAAC,kBAAkB;IAAC,qBAAqBsB,EAAAA,iBAAiB,GAAG,EAAE,GAAGK,SAAAA;GAC7E1B,EAAAA,QACE,CACG,CACP,CAAC,CAAA;AAEV;;;;"}
|
package/Fieldset/index.mjs
CHANGED
|
@@ -1,45 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
function _extends() {
|
|
4
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
5
|
-
for (var
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
-
target[key] = source[key];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
4
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
5
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
6
|
+
var t = arguments[e];
|
|
7
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
12
8
|
}
|
|
13
|
-
return
|
|
14
|
-
};
|
|
15
|
-
return _extends.apply(this, arguments);
|
|
9
|
+
return n;
|
|
10
|
+
}, _extends.apply(null, arguments);
|
|
16
11
|
}
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
target[key] = source[key];
|
|
12
|
+
function _objectWithoutProperties(e, t) {
|
|
13
|
+
if (null == e) return {};
|
|
14
|
+
var o,
|
|
15
|
+
r,
|
|
16
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
17
|
+
if (Object.getOwnPropertySymbols) {
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
26
20
|
}
|
|
27
|
-
return
|
|
21
|
+
return i;
|
|
28
22
|
}
|
|
29
|
-
function
|
|
30
|
-
if (
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
}
|
|
23
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
24
|
+
if (null == r) return {};
|
|
25
|
+
var t = {};
|
|
26
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
+
if (e.indexOf(n) >= 0) continue;
|
|
28
|
+
t[n] = r[n];
|
|
41
29
|
}
|
|
42
|
-
return
|
|
30
|
+
return t;
|
|
43
31
|
}
|
|
44
32
|
|
|
45
33
|
var _excluded$1 = ["className", "children"];
|
package/Fieldset/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/Fieldset/Fieldset.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldsetProps = {\n error?: string;\n hint?: string;\n isOptional?: boolean;\n legend: React.ReactNode | string;\n showOptionsInline?: boolean;\n};\n\nexport default function Fieldset({\n children,\n className,\n error,\n hint,\n isOptional,\n legend,\n showOptionsInline,\n ...props\n}: FieldsetProps & React.ComponentPropsWithoutRef<'fieldset'>) {\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <fieldset\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n aria-invalid={error ? true : undefined}\n className={['bds-fieldset', className].filter((x) => x).join(' ')}\n {...props}\n >\n <legend>\n {legend}\n {isOptional && ' (optional)'}\n </legend>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <div className=\"bds-form-options\" data-inline-options={showOptionsInline ? '' : undefined}>\n {children}\n </div>\n </fieldset>\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","Fieldset","error","hint","isOptional","legend","showOptionsInline","errorId","useId","hintId","concat","undefined","id"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/Fieldset/Fieldset.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\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\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldsetProps = {\n error?: string;\n hint?: string;\n isOptional?: boolean;\n legend: React.ReactNode | string;\n showOptionsInline?: boolean;\n};\n\nexport default function Fieldset({\n children,\n className,\n error,\n hint,\n isOptional,\n legend,\n showOptionsInline,\n ...props\n}: FieldsetProps & React.ComponentPropsWithoutRef<'fieldset'>) {\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <fieldset\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n aria-invalid={error ? true : undefined}\n className={['bds-fieldset', className].filter((x) => x).join(' ')}\n {...props}\n >\n <legend>\n {legend}\n {isOptional && ' (optional)'}\n </legend>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <div className=\"bds-form-options\" data-inline-options={showOptionsInline ? '' : undefined}>\n {children}\n </div>\n </fieldset>\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","Fieldset","error","hint","isOptional","legend","showOptionsInline","errorId","useId","hintId","concat","undefined","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA,CAAA;AAClE,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,QAAA,CAAA;IAAMP,SAAS,EAAE,CAAC,WAAW,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;KAAC,CAAA,CAACC,IAAI,CAAC,GAAG,CAAA;AAAE,GAAA,EAAKR,KAAK,CAAA,eAC7EG,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEK,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,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,CAACC,IAAI,CAAC,GAAG,CAAA;AAAE,GAAA,EAC9DR,KAAK,CAETG,eAAAA,KAAA,CAAAC,aAAA,iBACGe,MAAM,EACND,UAAU,IAAI,aACT,CAAC,EACRD,IAAI,iBACHd,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMN,IAAAA,SAAS,EAAC,UAAU;AAAC4B,IAAAA,EAAE,EAAEH,MAAAA;GAC5BN,EAAAA,IACG,CACP,EACAD,KAAK,iBAAIb,KAAA,CAAAC,aAAA,CAACR,YAAY,EAAA;AAAC8B,IAAAA,EAAE,EAAEL,OAAAA;AAAQ,GAAA,EAAEL,KAAoB,CAAC,eAC3Db,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKN,IAAAA,SAAS,EAAC,kBAAkB;IAAC,qBAAqBsB,EAAAA,iBAAiB,GAAG,EAAE,GAAGK,SAAAA;GAC7E1B,EAAAA,QACE,CACG,CACP,CAAC,CAAA;AAEV;;;;"}
|
package/Pagination/index.cjs
CHANGED
|
@@ -23,71 +23,58 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
25
|
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
for (var key in source) {
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
-
target[key] = source[key];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return target;
|
|
37
|
-
};
|
|
38
|
-
return _extends.apply(this, arguments);
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
39
30
|
}
|
|
40
|
-
function
|
|
41
|
-
if (
|
|
42
|
-
var target = {};
|
|
43
|
-
var sourceKeys = Object.keys(source);
|
|
44
|
-
var key, i;
|
|
45
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
46
|
-
key = sourceKeys[i];
|
|
47
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
48
|
-
target[key] = source[key];
|
|
49
|
-
}
|
|
50
|
-
return target;
|
|
31
|
+
function _arrayWithoutHoles(r) {
|
|
32
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
51
33
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
58
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
59
|
-
key = sourceSymbolKeys[i];
|
|
60
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
61
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
62
|
-
target[key] = source[key];
|
|
34
|
+
function _extends() {
|
|
35
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
36
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
37
|
+
var t = arguments[e];
|
|
38
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
63
39
|
}
|
|
64
|
-
|
|
65
|
-
|
|
40
|
+
return n;
|
|
41
|
+
}, _extends.apply(null, arguments);
|
|
66
42
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
43
|
+
function _iterableToArray(r) {
|
|
44
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
69
45
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
46
|
+
function _nonIterableSpread() {
|
|
47
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
72
48
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
49
|
+
function _objectWithoutProperties(e, t) {
|
|
50
|
+
if (null == e) return {};
|
|
51
|
+
var o,
|
|
52
|
+
r,
|
|
53
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
54
|
+
if (Object.getOwnPropertySymbols) {
|
|
55
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
56
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
57
|
+
}
|
|
58
|
+
return i;
|
|
75
59
|
}
|
|
76
|
-
function
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
var n
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
60
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
61
|
+
if (null == r) return {};
|
|
62
|
+
var t = {};
|
|
63
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
64
|
+
if (e.indexOf(n) >= 0) continue;
|
|
65
|
+
t[n] = r[n];
|
|
66
|
+
}
|
|
67
|
+
return t;
|
|
83
68
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
87
|
-
return arr2;
|
|
69
|
+
function _toConsumableArray(r) {
|
|
70
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
88
71
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
72
|
+
function _unsupportedIterableToArray(r, a) {
|
|
73
|
+
if (r) {
|
|
74
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
75
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
76
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
77
|
+
}
|
|
91
78
|
}
|
|
92
79
|
|
|
93
80
|
var _excluded = ["buildPageUrl", "className", "currentPage", "onPageClick", "totalPages"];
|
package/Pagination/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type PaginationProps = {\n buildPageUrl: (page: number) => string;\n currentPage: number;\n onPageClick?: (page: number) => void;\n totalPages: number;\n};\n\nfunction usePages(currentPage: number, totalPages: number) {\n const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(\n (x) => x >= 1 && x <= totalPages,\n );\n return [...new Set(pages)];\n}\n\nexport default function Pagination({\n buildPageUrl,\n className,\n currentPage,\n onPageClick,\n totalPages,\n ...props\n}: PaginationProps & React.ComponentPropsWithoutRef<'nav'>) {\n const pages = usePages(currentPage, totalPages);\n\n return (\n <nav aria-label=\"pagination\" className={['bds-pagination', className].filter((x) => x).join(' ')} {...props}>\n {currentPage !== 1 && (\n <>\n <a href={buildPageUrl(1)} className=\"bds-first-page\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n height=\"1em\"\n width=\"100%\"\n viewBox=\"0 63.95 512 384.1\"\n >\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\" />\n </svg>\n First\n </a>\n <a aria-label=\"previous\" href={buildPageUrl(currentPage - 1)} rel=\"prev\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0.02 95.9 192.08 320.17\"\n >\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\" />\n </svg>\n Prev.\n </a>\n </>\n )}\n <ul>\n {pages.map((page, index) => {\n const handlePageClick = () => {\n if (!onPageClick) return;\n\n onPageClick(page);\n };\n\n return (\n <React.Fragment key={page}>\n <li>\n <a\n aria-current={page === currentPage ? 'page' : undefined}\n href={buildPageUrl(page)}\n onClick={handlePageClick}\n >\n <span className=\"visually-hidden\">Page</span> {page}\n </a>\n </li>\n {pages[index + 1] > page + 1 ? <li data-overflow=\"\">...</li> : null}\n </React.Fragment>\n );\n })}\n </ul>\n {currentPage !== totalPages && (\n <>\n <a href={buildPageUrl(currentPage + 1)} rel=\"next\">\n Next\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"63.9 95.9 192.1 320.17\"\n width=\"100%\"\n height=\"1em\"\n >\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\" />\n </svg>\n </a>\n <a href={buildPageUrl(totalPages)} className=\"bds-last-page\">\n Last\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0 63.95 512 384.1\"\n >\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\" />\n </svg>\n </a>\n </>\n )}\n </nav>\n );\n}\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":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport type PaginationProps = {\n buildPageUrl: (page: number) => string;\n currentPage: number;\n onPageClick?: (page: number) => void;\n totalPages: number;\n};\n\nfunction usePages(currentPage: number, totalPages: number) {\n const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(\n (x) => x >= 1 && x <= totalPages,\n );\n return [...new Set(pages)];\n}\n\nexport default function Pagination({\n buildPageUrl,\n className,\n currentPage,\n onPageClick,\n totalPages,\n ...props\n}: PaginationProps & React.ComponentPropsWithoutRef<'nav'>) {\n const pages = usePages(currentPage, totalPages);\n\n return (\n <nav aria-label=\"pagination\" className={['bds-pagination', className].filter((x) => x).join(' ')} {...props}>\n {currentPage !== 1 && (\n <>\n <a href={buildPageUrl(1)} className=\"bds-first-page\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n height=\"1em\"\n width=\"100%\"\n viewBox=\"0 63.95 512 384.1\"\n >\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\" />\n </svg>\n First\n </a>\n <a aria-label=\"previous\" href={buildPageUrl(currentPage - 1)} rel=\"prev\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0.02 95.9 192.08 320.17\"\n >\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\" />\n </svg>\n Prev.\n </a>\n </>\n )}\n <ul>\n {pages.map((page, index) => {\n const handlePageClick = () => {\n if (!onPageClick) return;\n\n onPageClick(page);\n };\n\n return (\n <React.Fragment key={page}>\n <li>\n <a\n aria-current={page === currentPage ? 'page' : undefined}\n href={buildPageUrl(page)}\n onClick={handlePageClick}\n >\n <span className=\"visually-hidden\">Page</span> {page}\n </a>\n </li>\n {pages[index + 1] > page + 1 ? <li data-overflow=\"\">...</li> : null}\n </React.Fragment>\n );\n })}\n </ul>\n {currentPage !== totalPages && (\n <>\n <a href={buildPageUrl(currentPage + 1)} rel=\"next\">\n Next\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"63.9 95.9 192.1 320.17\"\n width=\"100%\"\n height=\"1em\"\n >\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\" />\n </svg>\n </a>\n <a href={buildPageUrl(totalPages)} className=\"bds-last-page\">\n Last\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0 63.95 512 384.1\"\n >\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\" />\n </svg>\n </a>\n </>\n )}\n </nav>\n );\n}\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,GAAAO,IAAA,CAAVP,UAAU;AACPW,I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