@drivy/cobalt 0.49.2 → 0.50.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/components/Icon/__generated__/FilepdfIcon.js +2 -1
- package/components/Icon/__generated__/FilepdfIcon.js.map +1 -1
- package/components/Icon/__generated__/FilexlsIcon.js +2 -1
- package/components/Icon/__generated__/FilexlsIcon.js.map +1 -1
- package/components/Layout/Components/LayoutSection.js +6 -2
- package/components/Layout/Components/LayoutSection.js.map +1 -1
- package/components/Layout/Components/LayoutSectionTitle.js +7 -2
- package/components/Layout/Components/LayoutSectionTitle.js.map +1 -1
- package/components/Layout/Components/LayoutStack.js.map +1 -1
- package/components/Pagination/index.js +8 -5
- package/components/Pagination/index.js.map +1 -1
- package/icons/filepdf.js +1 -1
- package/icons/filepdf.svg +1 -1
- package/icons/filexls.js +1 -1
- package/icons/filexls.svg +1 -1
- package/package.json +6 -6
- package/styles/components/Layout/Components/index.scss +13 -2
- package/types/src/components/Layout/Components/LayoutSection.d.ts +2 -1
- package/types/src/components/Layout/Components/LayoutSectionTitle.d.ts +2 -1
- package/types/src/components/Layout/Components/LayoutStack.d.ts +3 -7
- package/types/src/components/Pagination/index.d.ts +5 -1
|
@@ -14,7 +14,8 @@ const FilepdfIcon = ({ color, size = 24, contained = false, className, }) => {
|
|
|
14
14
|
});
|
|
15
15
|
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
|
|
16
16
|
return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
17
|
-
React.createElement("path", {
|
|
17
|
+
React.createElement("path", { d: "M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM18.889 15.363V21h1.434v-2.102h2.183v-1.097h-2.183v-1.285h2.402v-1.153z" }),
|
|
18
|
+
React.createElement("path", { fillRule: "evenodd", d: "M13.019 21v-5.637h2.367q.843 0 1.43.325.59.32.898.937t.309 1.496v.008q0 .922-.305 1.566a2.14 2.14 0 0 1-.895.973q-.586.332-1.437.332zm1.433-1.152h.676q.465 0 .781-.192.32-.19.485-.566.168-.38.168-.934v-.008q0-.523-.172-.886a1.2 1.2 0 0 0-.492-.555 1.47 1.47 0 0 0-.77-.191h-.676zM9.098 19.352V21H7.664v-5.637h2.43q.629 0 1.094.25.465.246.718.696.258.445.258 1.05v.008q0 .602-.258 1.051-.254.445-.719.691-.465.243-1.093.243zm0-1.086h.648q.457 0 .711-.23.258-.232.258-.669v-.008q0-.441-.258-.668-.255-.225-.71-.226h-.65z", clipRule: "evenodd" })));
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export { FilepdfIcon as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilepdfIcon.js","sources":["../../../../src/components/Icon/__generated__/FilepdfIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"filepdf\"\nconst FilepdfIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path
|
|
1
|
+
{"version":3,"file":"FilepdfIcon.js","sources":["../../../../src/components/Icon/__generated__/FilepdfIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"filepdf\"\nconst FilepdfIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM18.889 15.363V21h1.434v-2.102h2.183v-1.097h-2.183v-1.285h2.402v-1.153z\" />\n <path\n fillRule=\"evenodd\"\n d=\"M13.019 21v-5.637h2.367q.843 0 1.43.325.59.32.898.937t.309 1.496v.008q0 .922-.305 1.566a2.14 2.14 0 0 1-.895.973q-.586.332-1.437.332zm1.433-1.152h.676q.465 0 .781-.192.32-.19.485-.566.168-.38.168-.934v-.008q0-.523-.172-.886a1.2 1.2 0 0 0-.492-.555 1.47 1.47 0 0 0-.77-.191h-.676zM9.098 19.352V21H7.664v-5.637h2.43q.629 0 1.094.25.465.246.718.696.258.445.258 1.05v.008q0 .602-.258 1.051-.254.445-.719.691-.465.243-1.093.243zm0-1.086h.648q.457 0 .711-.23.258-.232.258-.669v-.008q0-.441-.258-.668-.255-.225-.71-.226h-.65z\"\n clipRule=\"evenodd\"\n />\n </svg>\n )\n}\nexport default FilepdfIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,SAAS,CAAA;AAC5B,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,KAAK,EACjB,SAAS,GACC,KAAI;IACd,MAAM,iBAAiB,GAAG,EAAE,CAC1B,SAAS,EACT,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,EACxC;QACE,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAC,KAAK,CAAC,CAAE,CAAA,GAAG,KAAK;QACjD,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;AAClC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CACF,CAAA;AACD,IAAA,MAAM,IAAI,GAAG,CAAC,OAAwB,MACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAAA,EAAG,OAAO,CAAQ,CACrD,CAAA;IACD,OAAO,IAAI,CACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAA;QACzD,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,0TAA0T,EAAG,CAAA;AACrU,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,wgBAAwgB,EAC1gB,QAAQ,EAAC,SAAS,EAClB,CAAA,CACE,CACP,CAAA;AACH;;;;"}
|
|
@@ -14,7 +14,8 @@ const FilexlsIcon = ({ color, size = 24, contained = false, className, }) => {
|
|
|
14
14
|
});
|
|
15
15
|
const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
|
|
16
16
|
return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
|
|
17
|
-
React.createElement("path", {
|
|
17
|
+
React.createElement("path", { d: "M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM19.08 20.95q.516.202 1.22.202.74 0 1.273-.23.531-.234.812-.656.285-.426.285-1v-.004q0-.457-.187-.778a1.4 1.4 0 0 0-.57-.527q-.387-.207-.989-.324l-.582-.113q-.456-.087-.664-.227a.45.45 0 0 1-.203-.387v-.004q0-.168.098-.293a.65.65 0 0 1 .285-.199q.183-.075.437-.074.262 0 .461.074a.8.8 0 0 1 .317.207q.12.129.152.309l.008.043h1.328l-.004-.047a1.77 1.77 0 0 0-.312-.883 1.8 1.8 0 0 0-.762-.605q-.489-.223-1.195-.223-.65 0-1.153.226-.504.223-.793.633-.288.406-.293.957v.004q0 .66.406 1.078.411.419 1.301.594l.582.113q.496.098.703.227a.41.41 0 0 1 .207.367v.004a.48.48 0 0 1-.117.316.73.73 0 0 1-.32.22q-.207.077-.488.077-.285 0-.504-.078a.9.9 0 0 1-.348-.21.53.53 0 0 1-.148-.31l-.004-.034h-1.371l.003.07q.032.524.32.902.294.375.81.582M13.519 21v-5.637h1.433v4.485h2.395V21z" }),
|
|
18
|
+
React.createElement("path", { d: "M9.059 18.17 7.339 21h1.528l1.086-1.828h.035L11.086 21h1.61l-1.778-2.819v-.02l1.793-2.798h-1.594l-1.024 1.907h-.042L9.02 15.363H7.34l1.719 2.782z" })));
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export { FilexlsIcon as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilexlsIcon.js","sources":["../../../../src/components/Icon/__generated__/FilexlsIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"filexls\"\nconst FilexlsIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path
|
|
1
|
+
{"version":3,"file":"FilexlsIcon.js","sources":["../../../../src/components/Icon/__generated__/FilexlsIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport { IconColorsType } from \"../\"\nimport { capitalize } from \"../../utils\"\nimport cx from \"classnames\"\nexport type IconProps = {\n color?: IconColorsType\n size?: 16 | 20 | 24 | 32\n contained?: boolean\n className?: string\n}\nconst iconSource = \"filexls\"\nconst FilexlsIcon = ({\n color,\n size = 24,\n contained = false,\n className,\n}: IconProps) => {\n const computedClassName = cx(\n className,\n `cobalt-Icon cobalt-Icon--${iconSource}`,\n {\n [`cobalt-Icon--color${capitalize(color)}`]: color,\n \"cobalt-Icon--size16\": size === 16,\n \"cobalt-Icon--size20\": size === 20,\n \"cobalt-Icon--size32\": size === 32,\n \"cobalt-Icon--contained\": contained,\n }\n )\n const wrap = (content: React.ReactNode) => (\n <span className={computedClassName}>{content}</span>\n )\n return wrap(\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM19.08 20.95q.516.202 1.22.202.74 0 1.273-.23.531-.234.812-.656.285-.426.285-1v-.004q0-.457-.187-.778a1.4 1.4 0 0 0-.57-.527q-.387-.207-.989-.324l-.582-.113q-.456-.087-.664-.227a.45.45 0 0 1-.203-.387v-.004q0-.168.098-.293a.65.65 0 0 1 .285-.199q.183-.075.437-.074.262 0 .461.074a.8.8 0 0 1 .317.207q.12.129.152.309l.008.043h1.328l-.004-.047a1.77 1.77 0 0 0-.312-.883 1.8 1.8 0 0 0-.762-.605q-.489-.223-1.195-.223-.65 0-1.153.226-.504.223-.793.633-.288.406-.293.957v.004q0 .66.406 1.078.411.419 1.301.594l.582.113q.496.098.703.227a.41.41 0 0 1 .207.367v.004a.48.48 0 0 1-.117.316.73.73 0 0 1-.32.22q-.207.077-.488.077-.285 0-.504-.078a.9.9 0 0 1-.348-.21.53.53 0 0 1-.148-.31l-.004-.034h-1.371l.003.07q.032.524.32.902.294.375.81.582M13.519 21v-5.637h1.433v4.485h2.395V21z\" />\n <path d=\"M9.059 18.17 7.339 21h1.528l1.086-1.828h.035L11.086 21h1.61l-1.778-2.819v-.02l1.793-2.798h-1.594l-1.024 1.907h-.042L9.02 15.363H7.34l1.719 2.782z\" />\n </svg>\n )\n}\nexport default FilexlsIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,SAAS,CAAA;AAC5B,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,IAAI,GAAG,EAAE,EACT,SAAS,GAAG,KAAK,EACjB,SAAS,GACC,KAAI;IACd,MAAM,iBAAiB,GAAG,EAAE,CAC1B,SAAS,EACT,CAAA,yBAAA,EAA4B,UAAU,CAAA,CAAE,EACxC;QACE,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAC,KAAK,CAAC,CAAE,CAAA,GAAG,KAAK;QACjD,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;QAClC,qBAAqB,EAAE,IAAI,KAAK,EAAE;AAClC,QAAA,wBAAwB,EAAE,SAAS;AACpC,KAAA,CACF,CAAA;AACD,IAAA,MAAM,IAAI,GAAG,CAAC,OAAwB,MACpC,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,iBAAiB,EAAA,EAAG,OAAO,CAAQ,CACrD,CAAA;IACD,OAAO,IAAI,CACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,EAAA;QACzD,KAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,s/BAAs/B,EAAG,CAAA;AACjgC,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,CAAC,EAAC,mJAAmJ,EAAG,CAAA,CAC1J,CACP,CAAA;AACH;;;;"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
|
-
const LayoutSection = ({ children, isPageHeader, className, }) => {
|
|
4
|
+
const LayoutSection = ({ children, isPageHeader, className, headerLink, }) => {
|
|
5
|
+
const hasHeaderLink = !!headerLink && isPageHeader;
|
|
5
6
|
return (React.createElement("div", { className: cx("cobalt-layout-section", className, {
|
|
6
7
|
"cobalt-layout--isPageHeader": isPageHeader,
|
|
7
|
-
|
|
8
|
+
"cobalt-layout--hasHeaderLink": hasHeaderLink,
|
|
9
|
+
}) },
|
|
10
|
+
hasHeaderLink && (React.createElement("div", { className: "cobalt-layout-header-link" }, headerLink)),
|
|
11
|
+
children));
|
|
8
12
|
};
|
|
9
13
|
|
|
10
14
|
export { LayoutSection as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutSection.js","sources":["../../../../src/components/Layout/Components/LayoutSection.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nconst LayoutSection = ({\n children,\n isPageHeader,\n className,\n}: {\n children: React.ReactNode\n isPageHeader?: boolean\n className?: string\n}) => {\n return (\n <div\n className={cx(\"cobalt-layout-section\", className, {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n })}\n >\n {children}\n </div>\n )\n}\n\nexport default LayoutSection\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"LayoutSection.js","sources":["../../../../src/components/Layout/Components/LayoutSection.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nconst LayoutSection = ({\n children,\n isPageHeader,\n className,\n headerLink,\n}: {\n children: React.ReactNode\n isPageHeader?: boolean\n className?: string\n headerLink?: React.ReactNode\n}) => {\n const hasHeaderLink = !!headerLink && isPageHeader\n return (\n <div\n className={cx(\"cobalt-layout-section\", className, {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n \"cobalt-layout--hasHeaderLink\": hasHeaderLink,\n })}\n >\n {hasHeaderLink && (\n <div className=\"cobalt-layout-header-link\">{headerLink}</div>\n )}\n {children}\n </div>\n )\n}\n\nexport default LayoutSection\n"],"names":[],"mappings":";;;AAGA,MAAM,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,UAAU,GAMX,KAAI;AACH,IAAA,MAAM,aAAa,GAAG,CAAC,CAAC,UAAU,IAAI,YAAY,CAAA;IAClD,QACE,6BACE,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,EAAE;AAChD,YAAA,6BAA6B,EAAE,YAAY;AAC3C,YAAA,8BAA8B,EAAE,aAAa;SAC9C,CAAC,EAAA;QAED,aAAa,KACZ,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,2BAA2B,EAAA,EAAE,UAAU,CAAO,CAC9D;QACA,QAAQ,CACL,EACP;AACH;;;;"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
2
3
|
|
|
3
|
-
const LayoutSectionTitle = ({ children }) => {
|
|
4
|
-
return React.createElement("h2", { className: "cobalt-layout-section-title"
|
|
4
|
+
const LayoutSectionTitle = ({ children, headerLink, }) => {
|
|
5
|
+
return (React.createElement("h2", { className: cx("cobalt-layout-section-title", {
|
|
6
|
+
"cobalt-layout--hasHeaderLink": !!headerLink,
|
|
7
|
+
}) },
|
|
8
|
+
headerLink && (React.createElement("div", { className: "cobalt-layout-header-link" }, headerLink)),
|
|
9
|
+
children));
|
|
5
10
|
};
|
|
6
11
|
|
|
7
12
|
export { LayoutSectionTitle as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutSectionTitle.js","sources":["../../../../src/components/Layout/Components/LayoutSectionTitle.tsx"],"sourcesContent":["import React from \"react\"\n\nconst LayoutSectionTitle = ({
|
|
1
|
+
{"version":3,"file":"LayoutSectionTitle.js","sources":["../../../../src/components/Layout/Components/LayoutSectionTitle.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nconst LayoutSectionTitle = ({\n children,\n headerLink,\n}: {\n children: string\n headerLink?: React.ReactNode\n}) => {\n return (\n <h2\n className={cx(\"cobalt-layout-section-title\", {\n \"cobalt-layout--hasHeaderLink\": !!headerLink,\n })}\n >\n {headerLink && (\n <div className=\"cobalt-layout-header-link\">{headerLink}</div>\n )}\n {children}\n </h2>\n )\n}\n\nexport default LayoutSectionTitle\n"],"names":[],"mappings":";;;AAGM,MAAA,kBAAkB,GAAG,CAAC,EAC1B,QAAQ,EACR,UAAU,GAIX,KAAI;AACH,IAAA,QACE,KACE,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE;YAC3C,8BAA8B,EAAE,CAAC,CAAC,UAAU;SAC7C,CAAC,EAAA;QAED,UAAU,KACT,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,2BAA2B,EAAA,EAAE,UAAU,CAAO,CAC9D;QACA,QAAQ,CACN,EACN;AACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutStack.js","sources":["../../../../src/components/Layout/Components/LayoutStack.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\"\nimport React, { Children, isValidElement, cloneElement } from \"react\"\nimport cx from \"classnames\"\n\ntype LayoutStackPropsType
|
|
1
|
+
{"version":3,"file":"LayoutStack.js","sources":["../../../../src/components/Layout/Components/LayoutStack.tsx"],"sourcesContent":["import { nanoid } from \"nanoid\"\nimport React, { Children, isValidElement, cloneElement } from \"react\"\nimport cx from \"classnames\"\n\ntype LayoutStackPropsType = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode\n isTable?: boolean\n isPageHeader?: boolean\n}\n\ntype LayoutStackItemPropsType =\n | (React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactNode\n isTable: never\n isTableHeader: never\n })\n | (React.HTMLAttributes<HTMLTableRowElement> & {\n children: React.ReactNode\n isTable?: boolean\n isTableHeader?: boolean\n })\n\ntype LayoutStackLinkItemPropsType =\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n children: React.ReactNode\n }\n\nconst LayoutStackItem = ({\n children,\n isTable,\n className,\n isTableHeader: _isTableHeader,\n ...props\n}: LayoutStackItemPropsType) => {\n const Comp = isTable ? \"tr\" : \"div\"\n return (\n <Comp className={cx(\"cobalt-layout-stack__item\", className)} {...props}>\n {children}\n </Comp>\n )\n}\n\nconst LayoutStackLinkItem = ({\n children,\n className,\n ...hyperlinkProps\n}: LayoutStackLinkItemPropsType) => {\n return (\n <a\n className={cx(\"cobalt-layout-stack__item\", className)}\n {...hyperlinkProps}\n >\n {children}\n </a>\n )\n}\n\nconst isStackItem = (\n child: React.ReactNode\n): child is React.ReactElement<Omit<LayoutStackItemPropsType, \"children\">> => {\n return (\n isValidElement(child) &&\n (child.type === LayoutStackItem || child.type === LayoutStackLinkItem)\n )\n}\n\nconst LayoutStack = ({\n children,\n isTable,\n isPageHeader,\n className,\n ...props\n}: LayoutStackPropsType) => {\n const classNames = cx(\n \"cobalt-layout-stack\",\n {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n },\n className\n )\n if (isTable) {\n const headerElements: React.ReactElement[] = []\n const bodyElements: React.ReactElement[] = []\n Children.map(children, (child) => {\n if (isStackItem(child)) {\n const newChild = cloneElement(child, { isTable: true, key: nanoid() })\n if (newChild.props.isTableHeader) {\n headerElements.push(newChild)\n } else {\n bodyElements.push(newChild)\n }\n }\n return child\n })\n return (\n <table className={classNames} {...props}>\n {!!headerElements.length && <thead>{headerElements}</thead>}\n <tbody>{bodyElements}</tbody>\n </table>\n )\n } else {\n return (\n <div className={classNames} {...props}>\n {children}\n </div>\n )\n }\n}\n\nLayoutStack.Item = LayoutStackItem\n\nLayoutStack.LinkItem = LayoutStackLinkItem\n\nexport default LayoutStack\n"],"names":[],"mappings":";;;;AA2BA,MAAM,eAAe,GAAG,CAAC,EACvB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,aAAa,EAAE,cAAc,EAC7B,GAAG,KAAK,EACiB,KAAI;IAC7B,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAA;AACnC,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,EAAM,GAAA,KAAK,IACnE,QAAQ,CACJ,EACR;AACH,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,E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QACE,KAAO,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,SAAS,EAAE,UAAU,KAAM,KAAK,EAAA;AACpC,YAAA,CAAC,CAAC,cAAc,CAAC,MAAM,IAAI,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAQ,cAAc,CAAS;AAC3D,YAAA,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,IAAA,EAAQ,YAAY,CAAS,CACvB,EACT;KACF;SAAM;QACL,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,UAAU,EAAM,GAAA,KAAK,EAClC,EAAA,QAAQ,CACL,EACP;KACF;AACH,EAAC;AAED,WAAW,CAAC,IAAI,GAAG,eAAe,CAAA;AAElC,WAAW,CAAC,QAAQ,GAAG,mBAAmB;;;;"}
|
|
@@ -9,10 +9,10 @@ const PaginationButton = ({ currentPage, pageNumber, onPageChange, }) => {
|
|
|
9
9
|
return (React.createElement(DefaultButton, { className: cx("cobalt-pagination__DefaultButton"), selected: isActive, onClick: () => !isActive && onPageChange(pageNumber) }, pageNumber));
|
|
10
10
|
};
|
|
11
11
|
const PAGE_DOTS_VALUE = -1; // Unrevelant value only used to represent dots in the pages array
|
|
12
|
-
const generatePages = (currentPage, totalPages) => {
|
|
12
|
+
const generatePages = (currentPage, totalPages, options) => {
|
|
13
13
|
const pages = [];
|
|
14
|
-
const maxVisiblePages =
|
|
15
|
-
const edgeButtons =
|
|
14
|
+
const maxVisiblePages = options.maxVisibleLength; // Max visible pages (excluding dots)
|
|
15
|
+
const edgeButtons = options.edgeVisibleLength; // Number of fixed edge buttons
|
|
16
16
|
if (totalPages <= maxVisiblePages) {
|
|
17
17
|
// Show all pages
|
|
18
18
|
for (let i = 1; i <= totalPages; i++) {
|
|
@@ -52,10 +52,13 @@ const generatePages = (currentPage, totalPages) => {
|
|
|
52
52
|
return pages;
|
|
53
53
|
};
|
|
54
54
|
// eslint-disable-next-line complexity
|
|
55
|
-
const Pagination = ({ onPageChange, currentPage, totalPages,
|
|
55
|
+
const Pagination = ({ onPageChange, currentPage, totalPages, options = {
|
|
56
|
+
maxVisibleLength: 11,
|
|
57
|
+
edgeVisibleLength: 3,
|
|
58
|
+
}, }) => {
|
|
56
59
|
if (totalPages <= 1)
|
|
57
60
|
return null;
|
|
58
|
-
const pages = generatePages(currentPage, totalPages);
|
|
61
|
+
const pages = generatePages(currentPage, totalPages, options);
|
|
59
62
|
return (React.createElement("div", { className: "cobalt-pagination" },
|
|
60
63
|
React.createElement(DefaultButton, { className: cx("cobalt-pagination__DefaultButton"), disabled: currentPage === 1, onClick: () => onPageChange(currentPage - 1), icon: "chevronLeft" }),
|
|
61
64
|
pages.map((page, index) => page === PAGE_DOTS_VALUE ? (React.createElement(DotsHorizontalIcon, { key: `dots-${index}`, className: "cobalt-pagination__threeDots", color: "accent" })) : (React.createElement(PaginationButton, { key: page, currentPage: currentPage, pageNumber: page, onPageChange: onPageChange }))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport { DotsHorizontalIcon } from \"../Icon\"\n\nconst PaginationButton = ({\n currentPage,\n pageNumber,\n onPageChange,\n}: {\n currentPage: number\n pageNumber: number\n onPageChange: (page: number) => void\n}) => {\n const isActive = currentPage === pageNumber\n return (\n <DefaultButton\n className={cx(\"cobalt-pagination__DefaultButton\")}\n selected={isActive}\n onClick={() => !isActive && onPageChange(pageNumber)}\n >\n {pageNumber}\n </DefaultButton>\n )\n}\n\nconst PAGE_DOTS_VALUE = -1 // Unrevelant value only used to represent dots in the pages array\n\nconst generatePages = (currentPage: number
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Pagination/index.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport { DotsHorizontalIcon } from \"../Icon\"\n\nconst PaginationButton = ({\n currentPage,\n pageNumber,\n onPageChange,\n}: {\n currentPage: number\n pageNumber: number\n onPageChange: (page: number) => void\n}) => {\n const isActive = currentPage === pageNumber\n return (\n <DefaultButton\n className={cx(\"cobalt-pagination__DefaultButton\")}\n selected={isActive}\n onClick={() => !isActive && onPageChange(pageNumber)}\n >\n {pageNumber}\n </DefaultButton>\n )\n}\n\nconst PAGE_DOTS_VALUE = -1 // Unrevelant value only used to represent dots in the pages array\n\nconst generatePages = (\n currentPage: number,\n totalPages: number,\n options: {\n maxVisibleLength: number\n edgeVisibleLength: number\n }\n) => {\n const pages: number[] = []\n const maxVisiblePages = options.maxVisibleLength // Max visible pages (excluding dots)\n const edgeButtons = options.edgeVisibleLength // Number of fixed edge buttons\n\n if (totalPages <= maxVisiblePages) {\n // Show all pages\n for (let i = 1; i <= totalPages; i++) {\n pages.push(i)\n }\n return pages\n }\n\n // Calculate dynamic range for middle pages\n const middlePagesCount = maxVisiblePages - 2 * edgeButtons // Remaining pages for the middle\n let startMiddlePage = Math.max(\n currentPage - Math.floor(middlePagesCount / 2),\n edgeButtons + 1\n )\n let endMiddlePage = Math.min(\n currentPage + Math.floor(middlePagesCount / 2),\n totalPages - edgeButtons\n )\n\n // Adjust start and end pages if they exceed boundaries\n if (startMiddlePage === edgeButtons + 1) {\n endMiddlePage = startMiddlePage + middlePagesCount - 1\n } else if (endMiddlePage === totalPages - edgeButtons) {\n startMiddlePage = endMiddlePage - middlePagesCount + 1\n }\n\n // Add leading edge buttons\n for (let i = 1; i <= edgeButtons; i++) {\n pages.push(i)\n }\n if (startMiddlePage > edgeButtons + 1) {\n pages.push(PAGE_DOTS_VALUE)\n }\n\n // Add middle pages\n for (let i = startMiddlePage; i <= endMiddlePage; i++) {\n pages.push(i)\n }\n\n // Add trailing edge buttons\n if (endMiddlePage < totalPages - edgeButtons) {\n pages.push(PAGE_DOTS_VALUE)\n }\n for (let i = totalPages - edgeButtons + 1; i <= totalPages; i++) {\n pages.push(i)\n }\n\n return pages\n}\n\n// eslint-disable-next-line complexity\nconst Pagination = ({\n onPageChange,\n currentPage,\n totalPages,\n options = {\n maxVisibleLength: 11,\n edgeVisibleLength: 3,\n },\n}: {\n currentPage: number\n totalPages: number\n onPageChange: (page: number) => void\n options?: {\n maxVisibleLength: number\n edgeVisibleLength: number\n }\n}) => {\n if (totalPages <= 1) return null\n const pages = generatePages(currentPage, totalPages, options)\n\n return (\n <div className=\"cobalt-pagination\">\n <DefaultButton\n className={cx(\"cobalt-pagination__DefaultButton\")}\n disabled={currentPage === 1}\n onClick={() => onPageChange(currentPage - 1)}\n icon=\"chevronLeft\"\n />\n {pages.map((page, index) =>\n page === PAGE_DOTS_VALUE ? (\n <DotsHorizontalIcon\n key={`dots-${index}`}\n className=\"cobalt-pagination__threeDots\"\n color=\"accent\"\n />\n ) : (\n <PaginationButton\n key={page}\n currentPage={currentPage}\n pageNumber={page}\n onPageChange={onPageChange}\n />\n )\n )}\n <DefaultButton\n className={cx(\"cobalt-pagination__DefaultButton\")}\n disabled={currentPage === totalPages}\n onClick={() => onPageChange(currentPage + 1)}\n icon=\"chevronRight\"\n />\n </div>\n )\n}\n\nexport default Pagination\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,gBAAgB,GAAG,CAAC,EACxB,WAAW,EACX,UAAU,EACV,YAAY,GAKb,KAAI;AACH,IAAA,MAAM,QAAQ,GAAG,WAAW,KAAK,UAAU,CAAA;AAC3C,IAAA,QACE,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EACZ,SAAS,EAAE,EAAE,CAAC,kCAAkC,CAAC,EACjD,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,CAAC,QAAQ,IAAI,YAAY,CAAC,UAAU,CAAC,EAAA,EAEnD,UAAU,CACG,EACjB;AACH,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,CAAC,CAAC,CAAA;AAE1B,MAAM,aAAa,GAAG,CACpB,WAAmB,EACnB,UA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tB,KAAC,CAAA,aAAA,CAAA,kBAAkB,EACjB,EAAA,GAAG,EAAE,CAAA,KAAA,EAAQ,KAAK,CAAA,CAAE,EACpB,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAC,QAAQ,EACd,CAAA,KAEF,KAAC,CAAA,aAAA,CAAA,gBAAgB,EACf,EAAA,GAAG,EAAE,IAAI,EACT,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,IAAI,EAChB,YAAY,EAAE,YAAY,EAC1B,CAAA,CACH,CACF;AACD,QAAA,KAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EACZ,SAAS,EAAE,EAAE,CAAC,kCAAkC,CAAC,EACjD,QAAQ,EAAE,WAAW,KAAK,UAAU,EACpC,OAAO,EAAE,MAAM,YAAY,CAAC,WAAW,GAAG,CAAC,CAAC,EAC5C,IAAI,EAAC,cAAc,EACnB,CAAA,CACE,EACP;AACH;;;;"}
|
package/icons/filepdf.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var filepdf = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path
|
|
1
|
+
var filepdf = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zm13.514-3.762V21h1.434v-2.102h2.183v-1.097h-2.183v-1.285h2.402v-1.153z\"/><path fill-rule=\"evenodd\" d=\"M13.019 21v-5.637h2.367q.843 0 1.43.325.59.32.898.937t.309 1.496v.008q0 .922-.305 1.566a2.14 2.14 0 0 1-.895.973q-.586.332-1.437.332zm1.433-1.152h.676q.465 0 .781-.192.32-.19.485-.566.168-.38.168-.934v-.008q0-.523-.172-.886a1.2 1.2 0 0 0-.492-.555 1.47 1.47 0 0 0-.77-.191h-.676zm-5.354-.496V21H7.664v-5.637h2.43q.629 0 1.094.25.465.246.718.696.258.445.258 1.05v.008q0 .602-.258 1.051-.254.445-.719.691-.465.243-1.093.243zm0-1.086h.648q.457 0 .711-.23.258-.232.258-.669v-.008q0-.441-.258-.668-.255-.225-.71-.226h-.65z\" clip-rule=\"evenodd\"/></svg>";
|
|
2
2
|
|
|
3
3
|
export { filepdf as default };
|
|
4
4
|
//# sourceMappingURL=filepdf.js.map
|
package/icons/filepdf.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM18.889 15.363V21h1.434v-2.102h2.183v-1.097h-2.183v-1.285h2.402v-1.153z"/><path fill-rule="evenodd" d="M13.019 21v-5.637h2.367q.843 0 1.43.325.59.32.898.937t.309 1.496v.008q0 .922-.305 1.566a2.14 2.14 0 0 1-.895.973q-.586.332-1.437.332zm1.433-1.152h.676q.465 0 .781-.192.32-.19.485-.566.168-.38.168-.934v-.008q0-.523-.172-.886a1.2 1.2 0 0 0-.492-.555 1.47 1.47 0 0 0-.77-.191h-.676zM9.098 19.352V21H7.664v-5.637h2.43q.629 0 1.094.25.465.246.718.696.258.445.258 1.05v.008q0 .602-.258 1.051-.254.445-.719.691-.465.243-1.093.243zm0-1.086h.648q.457 0 .711-.23.258-.232.258-.669v-.008q0-.441-.258-.668-.255-.225-.71-.226h-.65z" clip-rule="evenodd"/></svg>
|
package/icons/filexls.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var filexls = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path
|
|
1
|
+
var filexls = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM19.08 20.95q.516.202 1.22.202.74 0 1.273-.23.531-.234.812-.656.285-.426.285-1v-.004q0-.457-.187-.778a1.4 1.4 0 0 0-.57-.527q-.387-.207-.989-.324l-.582-.113q-.456-.087-.664-.227a.45.45 0 0 1-.203-.387v-.004q0-.168.098-.293a.65.65 0 0 1 .285-.199q.183-.075.437-.074.262 0 .461.074a.8.8 0 0 1 .317.207q.12.129.152.309l.008.043h1.328l-.004-.047a1.77 1.77 0 0 0-.312-.883 1.8 1.8 0 0 0-.762-.605q-.489-.223-1.195-.223-.65 0-1.153.226-.504.223-.793.633-.288.406-.293.957v.004q0 .66.406 1.078.411.419 1.301.594l.582.113q.496.098.703.227a.41.41 0 0 1 .207.367v.004a.48.48 0 0 1-.117.316.73.73 0 0 1-.32.22q-.207.077-.488.077-.285 0-.504-.078a.9.9 0 0 1-.348-.21.53.53 0 0 1-.148-.31l-.004-.034h-1.371l.003.07q.032.524.32.902.294.375.81.582M13.519 21v-5.637h1.433v4.485h2.395V21z\"/><path d=\"M9.059 18.17 7.339 21h1.528l1.086-1.828h.035L11.086 21h1.61l-1.778-2.819v-.02l1.793-2.798h-1.594l-1.024 1.907h-.042L9.02 15.363H7.34l1.719 2.782z\"/></svg>";
|
|
2
2
|
|
|
3
3
|
export { filexls as default };
|
|
4
4
|
//# sourceMappingURL=filexls.js.map
|
package/icons/filexls.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5.375 19.125H3.5a.627.627 0 0 1-.625-.625v-15c0-.344.281-.625.625-.625h6.25V6c0 .691.559 1.25 1.25 1.25h3.125v5.625H16v-5.84a2.5 2.5 0 0 0-.73-1.77L11.734 1.73A2.5 2.5 0 0 0 9.964 1H3.5A2.5 2.5 0 0 0 1 3.5v15C1 19.879 2.121 21 3.5 21h1.875zM19.08 20.95q.516.202 1.22.202.74 0 1.273-.23.531-.234.812-.656.285-.426.285-1v-.004q0-.457-.187-.778a1.4 1.4 0 0 0-.57-.527q-.387-.207-.989-.324l-.582-.113q-.456-.087-.664-.227a.45.45 0 0 1-.203-.387v-.004q0-.168.098-.293a.65.65 0 0 1 .285-.199q.183-.075.437-.074.262 0 .461.074a.8.8 0 0 1 .317.207q.12.129.152.309l.008.043h1.328l-.004-.047a1.77 1.77 0 0 0-.312-.883 1.8 1.8 0 0 0-.762-.605q-.489-.223-1.195-.223-.65 0-1.153.226-.504.223-.793.633-.288.406-.293.957v.004q0 .66.406 1.078.411.419 1.301.594l.582.113q.496.098.703.227a.41.41 0 0 1 .207.367v.004a.48.48 0 0 1-.117.316.73.73 0 0 1-.32.22q-.207.077-.488.077-.285 0-.504-.078a.9.9 0 0 1-.348-.21.53.53 0 0 1-.148-.31l-.004-.034h-1.371l.003.07q.032.524.32.902.294.375.81.582M13.519 21v-5.637h1.433v4.485h2.395V21z"/><path d="M9.059 18.17 7.339 21h1.528l1.086-1.828h.035L11.086 21h1.61l-1.778-2.819v-.02l1.793-2.798h-1.594l-1.024 1.907h-.042L9.02 15.363H7.34l1.719 2.782z"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drivy/cobalt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.1",
|
|
4
4
|
"description": "Opinionated design system for Drivy's projects.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@reach/slider": "0.16.0",
|
|
30
30
|
"@reach/tabs": "0.16.4",
|
|
31
31
|
"@reach/visually-hidden": "0.16.0",
|
|
32
|
-
"@react-spring/web": "9.
|
|
32
|
+
"@react-spring/web": "9.7.5",
|
|
33
33
|
"@tippyjs/react": "4.2.6",
|
|
34
34
|
"classnames": "2.5.1",
|
|
35
35
|
"date-fns": "2.30.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"media-typer": "1.1.0",
|
|
38
38
|
"nanoid": "5.0.9",
|
|
39
39
|
"postcss": "8.4.49",
|
|
40
|
-
"tailwindcss": "3.4.
|
|
40
|
+
"tailwindcss": "3.4.17",
|
|
41
41
|
"tippy.js": "6.3.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"@types/jest": "29.5.14",
|
|
67
67
|
"@types/lodash.throttle": "4.1.9",
|
|
68
68
|
"@types/media-typer": "1.1.3",
|
|
69
|
-
"@types/node": "20.17.
|
|
70
|
-
"@types/react": "18.3.
|
|
69
|
+
"@types/node": "20.17.12",
|
|
70
|
+
"@types/react": "18.3.17",
|
|
71
71
|
"@types/react-dom": "18.3.5",
|
|
72
72
|
"autoprefixer": "10.4.20",
|
|
73
73
|
"core-js": "3.39.0",
|
|
74
74
|
"css-loader": "7.1.2",
|
|
75
75
|
"eslint": "8.57.1",
|
|
76
|
-
"eslint-plugin-storybook": "^0.11.
|
|
76
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
77
77
|
"file-loader": "6.2.0",
|
|
78
78
|
"fs-extra": "11.2.0",
|
|
79
79
|
"html-entities": "2.5.2",
|
|
@@ -14,10 +14,21 @@
|
|
|
14
14
|
min-width: calc(100% - 2 * var(--cobalt-layout-x-spacing));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
.cobalt-layout--hasHeaderLink {
|
|
18
|
+
@apply c-inline-flex c-flex-col c-gap-xs;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cobalt-layout-header-link {
|
|
22
|
+
@apply c-inline-flex c-items-center;
|
|
23
|
+
|
|
24
|
+
a {
|
|
25
|
+
@apply c-inline-flex c-gap-2xs c-no-underline c-text-body-md c-text-accentInteractive c-font-bold c-cursor-pointer hover:c-underline;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
17
29
|
.cobalt-layout-section {
|
|
18
|
-
@apply c-bg-primary
|
|
30
|
+
@apply c-bg-primary;
|
|
19
31
|
margin: var(--cobalt-layout-y-spacing) var(--cobalt-layout-x-spacing);
|
|
20
|
-
// Allow to take the full height of the parent container in full pages
|
|
21
32
|
}
|
|
22
33
|
|
|
23
34
|
.cobalt-layout-card {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const LayoutSection: ({ children, isPageHeader, className, }: {
|
|
2
|
+
declare const LayoutSection: ({ children, isPageHeader, className, headerLink, }: {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
isPageHeader?: boolean;
|
|
5
5
|
className?: string;
|
|
6
|
+
headerLink?: React.ReactNode;
|
|
6
7
|
}) => React.JSX.Element;
|
|
7
8
|
export default LayoutSection;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
type LayoutStackPropsType =
|
|
2
|
+
type LayoutStackPropsType = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
children: React.ReactNode;
|
|
4
|
-
isTable: never;
|
|
5
|
-
isPageHeader: never;
|
|
6
|
-
}) | (React.HTMLAttributes<HTMLTableElement> & {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
isPageHeader?: boolean;
|
|
9
4
|
isTable?: boolean;
|
|
10
|
-
|
|
5
|
+
isPageHeader?: boolean;
|
|
6
|
+
};
|
|
11
7
|
type LayoutStackItemPropsType = (React.HTMLAttributes<HTMLDivElement> & {
|
|
12
8
|
children: React.ReactNode;
|
|
13
9
|
isTable: never;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const Pagination: ({ onPageChange, currentPage, totalPages, }: {
|
|
2
|
+
declare const Pagination: ({ onPageChange, currentPage, totalPages, options, }: {
|
|
3
3
|
currentPage: number;
|
|
4
4
|
totalPages: number;
|
|
5
5
|
onPageChange: (page: number) => void;
|
|
6
|
+
options?: {
|
|
7
|
+
maxVisibleLength: number;
|
|
8
|
+
edgeVisibleLength: number;
|
|
9
|
+
};
|
|
6
10
|
}) => React.JSX.Element | null;
|
|
7
11
|
export default Pagination;
|