@drivy/cobalt 0.48.0 → 0.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/_virtual/_commonjsHelpers.js +6 -0
  2. package/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/cjs/tokens/icons.js +3 -0
  4. package/cjs/tokens/icons.js.map +1 -1
  5. package/cjs/tokens/theme.js +4 -4
  6. package/components/Accordion/ToggleIcon.js +6 -2
  7. package/components/Accordion/ToggleIcon.js.map +1 -1
  8. package/components/Accordion/index.js +2 -2
  9. package/components/Accordion/index.js.map +1 -1
  10. package/components/Form/Stepper.js +7 -2
  11. package/components/Form/Stepper.js.map +1 -1
  12. package/components/Icon/__generated__/CircledArrowLeftIcon.js +22 -0
  13. package/components/Icon/__generated__/CircledArrowLeftIcon.js.map +1 -0
  14. package/components/Icon/__generated__/FilepdfIcon.js +21 -0
  15. package/components/Icon/__generated__/FilepdfIcon.js.map +1 -0
  16. package/components/Icon/__generated__/FilexlsIcon.js +21 -0
  17. package/components/Icon/__generated__/FilexlsIcon.js.map +1 -0
  18. package/components/Layout/Components/LayoutCard.js +2 -2
  19. package/components/Layout/Components/LayoutCard.js.map +1 -1
  20. package/components/Layout/Components/LayoutSection.js +2 -2
  21. package/components/Layout/Components/LayoutSection.js.map +1 -1
  22. package/components/Layout/Surfaces/index.js +6 -3
  23. package/components/Layout/Surfaces/index.js.map +1 -1
  24. package/components/Pagination/index.js +66 -0
  25. package/components/Pagination/index.js.map +1 -0
  26. package/components/Sidepanel/index.js +6 -4
  27. package/components/Sidepanel/index.js.map +1 -1
  28. package/icons/circled-arrow-left.js +4 -0
  29. package/icons/circled-arrow-left.js.map +1 -0
  30. package/icons/circled-arrow-left.svg +1 -0
  31. package/icons/filepdf.js +4 -0
  32. package/icons/filepdf.js.map +1 -0
  33. package/icons/filepdf.svg +1 -0
  34. package/icons/filexls.js +4 -0
  35. package/icons/filexls.js.map +1 -0
  36. package/icons/filexls.svg +1 -0
  37. package/icons/index.js +3 -0
  38. package/icons/index.js.map +1 -1
  39. package/index.js +4 -0
  40. package/index.js.map +1 -1
  41. package/package.json +30 -34
  42. package/src/tokens/breakpoints.js +13 -0
  43. package/src/tokens/breakpoints.js.map +1 -0
  44. package/src/tokens/colors.js +57 -0
  45. package/src/tokens/colors.js.map +1 -0
  46. package/src/tokens/palette.js +163 -0
  47. package/src/tokens/palette.js.map +1 -0
  48. package/src/tokens/theme.js +332 -0
  49. package/src/tokens/theme.js.map +1 -0
  50. package/src/tokens/zIndexes.js +35 -0
  51. package/src/tokens/zIndexes.js.map +1 -0
  52. package/styles/components/Accordion/index.scss +9 -0
  53. package/styles/components/Form/Stepper.scss +6 -5
  54. package/styles/components/Form/TextInput.scss +1 -1
  55. package/styles/components/Form/form.scss +5 -1
  56. package/styles/components/Layout/Components/index.scss +20 -33
  57. package/styles/components/Layout/Surfaces/index.scss +9 -10
  58. package/styles/components/Pagination/index.scss +14 -0
  59. package/styles/components/Sidepanel/index.scss +0 -1
  60. package/styles/components.scss +1 -0
  61. package/styles/core/{default-theme.scss → default-theme.css} +4 -4
  62. package/styles/core/{theme.scss → theme.css} +4 -4
  63. package/tokens/icons.js +3 -0
  64. package/tokens/icons.js.map +1 -1
  65. package/tokens/theme.js +4 -4
  66. package/types/src/components/Accordion/ToggleIcon.d.ts +2 -1
  67. package/types/src/components/Accordion/index.d.ts +4 -0
  68. package/types/src/components/Form/Autocomplete/index.d.ts +1 -1
  69. package/types/src/components/Form/TextInput.d.ts +1 -1
  70. package/types/src/components/Icon/__generated__/CircledArrowLeftIcon.d.ts +10 -0
  71. package/types/src/components/Icon/__generated__/FilepdfIcon.d.ts +10 -0
  72. package/types/src/components/Icon/__generated__/FilexlsIcon.d.ts +10 -0
  73. package/types/src/components/Icon/__generated__/index.d.ts +3 -0
  74. package/types/src/components/Icon/index.d.ts +1 -1
  75. package/types/src/components/Layout/Components/LayoutCard.d.ts +2 -1
  76. package/types/src/components/Layout/Components/LayoutSection.d.ts +2 -1
  77. package/types/src/components/Layout/Surfaces/index.d.ts +6 -3
  78. package/types/src/components/Pagination/index.d.ts +7 -0
  79. package/types/src/components/Sidepanel/index.d.ts +4 -2
  80. package/types/src/icons/index.d.ts +3 -0
  81. package/types/src/index.d.ts +1 -0
  82. package/types/src/tokens/index.d.ts +3 -0
  83. package/utilities.css +4 -18310
  84. package/utils/getCobaltTailwindcssConfig.js +8 -0
  85. package/utils/getCobaltTailwindcssConfig.js.map +1 -0
  86. package/utils/getCobaltTailwindcssConfig2.js +372 -0
  87. package/utils/getCobaltTailwindcssConfig2.js.map +1 -0
  88. package/utils/helpers.js +161 -0
  89. package/utils/helpers.js.map +1 -0
  90. package/utils/tailwindcssGenerators.js +187 -0
  91. package/utils/tailwindcssGenerators.js.map +1 -0
  92. /package/styles/core/{palette.scss → palette.css} +0 -0
@@ -0,0 +1,6 @@
1
+ function getDefaultExportFromCjs (x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3
+ }
4
+
5
+ export { getDefaultExportFromCjs };
6
+ //# sourceMappingURL=_commonjsHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -66,6 +66,7 @@ const icons = {
66
66
  chevronLeft: "chevron-left.svg",
67
67
  chevronRight: "chevron-right.svg",
68
68
  chevronUp: "chevron-up.svg",
69
+ circledArrowLeft: "circled-arrow-left.svg",
69
70
  circledArrowRight: "circled-arrow-right.svg",
70
71
  city: "city.svg",
71
72
  cleaning: "cleaning.svg",
@@ -115,6 +116,8 @@ const icons = {
115
116
  facebook: "facebook.svg",
116
117
  family: "family.svg",
117
118
  fileFilled: "file-filled.svg",
119
+ filepdf: "filepdf.svg",
120
+ filexls: "filexls.svg",
118
121
  filter: "filter.svg",
119
122
  filters: "filters.svg",
120
123
  flag: "flag.svg",
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -53,7 +53,7 @@ const background = {
53
53
  };
54
54
  const text = {
55
55
  base: "navy.700/grey.100",
56
- subdued: "navy.400/grey.300",
56
+ subdued: "navy.300/grey.300",
57
57
  accent: "purple.500/purple.400",
58
58
  accentAlt: "purple.700/purple.200",
59
59
  info: "yellow.900/yellow.400",
@@ -91,7 +91,7 @@ const text = {
91
91
  hover: "navy.900/grey.300"
92
92
  },
93
93
  subduedInteractive: {
94
- DEFAULT: "navy.400/grey.300",
94
+ DEFAULT: "navy.300/grey.300",
95
95
  hover: "navy.500/grey.400"
96
96
  },
97
97
  accentInteractive: {
@@ -105,7 +105,7 @@ const text = {
105
105
  };
106
106
  const icon = {
107
107
  base: "navy.700/grey.100",
108
- subdued: "navy.400/grey.300",
108
+ subdued: "navy.300/grey.300",
109
109
  accent: "purple.500/purple.400",
110
110
  accentAlt: "purple.700/purple.200",
111
111
  info: "yellow.900/yellow.400",
@@ -139,7 +139,7 @@ const icon = {
139
139
  hover: "navy.900/grey.200"
140
140
  },
141
141
  subduedInteractive: {
142
- DEFAULT: "navy.400/grey.300",
142
+ DEFAULT: "navy.300/grey.300",
143
143
  hover: "navy.500/grey.400"
144
144
  },
145
145
  accentInteractive: {
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
+ import '../Icon/index.js';
4
+ import ChevronDownIcon from '../Icon/__generated__/ChevronDownIcon.js';
3
5
 
4
- const ToggleIcon = ({ isOpen }) => {
5
- return (React.createElement("div", { className: cx("cobalt-accordion__header-icon", {
6
+ const ToggleIcon = ({ isOpen, useChevron }) => {
7
+ return useChevron ? (React.createElement(ChevronDownIcon, { color: "subdued", size: 24, className: cx("cobalt-accordion__header-chevron-icon", {
8
+ "cobalt-accordion__header-chevron-icon--opened": isOpen,
9
+ }) })) : (React.createElement("div", { className: cx("cobalt-accordion__header-icon", {
6
10
  "cobalt-accordion__header-icon--opened": isOpen,
7
11
  }) }));
8
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleIcon.js","sources":["../../../src/components/Accordion/ToggleIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\ntype ToggleIconPropsType = { isOpen: boolean }\n\nconst ToggleIcon = ({ isOpen }: ToggleIconPropsType) => {\n return (\n <div\n className={cx(\"cobalt-accordion__header-icon\", {\n \"cobalt-accordion__header-icon--opened\": isOpen,\n })}\n />\n )\n}\n\nexport default ToggleIcon\n"],"names":[],"mappings":";;;AAKA,MAAM,UAAU,GAAG,CAAC,EAAE,MAAM,EAAuB,KAAI;AACrD,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE;AAC7C,YAAA,uCAAuC,EAAE,MAAM;SAChD,CAAC,EAAA,CACF,EACH;AACH;;;;"}
1
+ {"version":3,"file":"ToggleIcon.js","sources":["../../../src/components/Accordion/ToggleIcon.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\nimport { ChevronDownIcon } from \"../Icon\"\n\ntype ToggleIconPropsType = { isOpen: boolean; useChevron: boolean }\n\nconst ToggleIcon = ({ isOpen, useChevron }: ToggleIconPropsType) => {\n return useChevron ? (\n <ChevronDownIcon\n color=\"subdued\"\n size={24}\n className={cx(\"cobalt-accordion__header-chevron-icon\", {\n \"cobalt-accordion__header-chevron-icon--opened\": isOpen,\n })}\n />\n ) : (\n <div\n className={cx(\"cobalt-accordion__header-icon\", {\n \"cobalt-accordion__header-icon--opened\": isOpen,\n })}\n />\n )\n}\n\nexport default ToggleIcon\n"],"names":[],"mappings":";;;;;AAMM,MAAA,UAAU,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,EAAuB,KAAI;IACjE,OAAO,UAAU,IACf,KAAC,CAAA,aAAA,CAAA,eAAe,IACd,KAAK,EAAC,SAAS,EACf,IAAI,EAAE,EAAE,EACR,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE;AACrD,YAAA,+CAA+C,EAAE,MAAM;AACxD,SAAA,CAAC,EACF,CAAA,KAEF,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE;AAC7C,YAAA,uCAAuC,EAAE,MAAM;SAChD,CAAC,EAAA,CACF,CACH,CAAA;AACH;;;;"}
@@ -7,7 +7,7 @@ import { animated, useSpring } from '@react-spring/web';
7
7
  import useElementHeight from '../../hooks/useElementHeight.js';
8
8
 
9
9
  const accordionSpringConfig = { tension: 300, friction: 30, clamp: true };
10
- const AccordionItemHeader = forwardRef(({ headingLevel = 4, className, leftToggleIcon = false, children, ...props }, ref) => {
10
+ const AccordionItemHeader = forwardRef(({ headingLevel = 4, className, leftToggleIcon = false, useChevron = false, children, ...props }, ref) => {
11
11
  const { isExpanded } = useAccordionItemContext();
12
12
  const Heading = `h${headingLevel}`;
13
13
  return (React.createElement(Heading, null,
@@ -15,7 +15,7 @@ const AccordionItemHeader = forwardRef(({ headingLevel = 4, className, leftToggl
15
15
  "cobalt-accordion__header--left-toggle-icon": leftToggleIcon,
16
16
  }), ...props },
17
17
  React.createElement("span", { className: cx("cobalt-accordion__header-content", className) }, children),
18
- React.createElement(ToggleIcon, { isOpen: isExpanded }))));
18
+ React.createElement(ToggleIcon, { useChevron: useChevron, isOpen: isExpanded }))));
19
19
  });
20
20
  AccordionItemHeader.displayName = "Accordion.Item.Header";
21
21
  const AnimatedAccordionPanel = animated(AccordionPanel);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Accordion/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\nimport {\n Accordion as ReachAccordion,\n AccordionItem as ReachAccordionItem,\n AccordionButton as ReachAccordionButton,\n AccordionPanel as ReachAccordionPanel,\n AccordionProps as ReachAccordionProps,\n AccordionItemProps as ReachAccordionItemProps,\n AccordionButtonProps as ReachAccordionButtonProps,\n useAccordionItemContext,\n AccordionPanelProps as ReachAccordionPanelProps,\n} from \"@reach/accordion\"\nimport ToggleIcon from \"./ToggleIcon\"\nimport { animated, useSpring } from \"@react-spring/web\"\nimport useElementHeight from \"../../hooks/useElementHeight\"\nexport { useAccordionItemContext } from \"@reach/accordion\"\n\ntype HeadingLevelMapType = {\n h2: 2\n h3: 3\n h4: 4\n h5: 5\n h6: 6\n}\n\ntype HeadingTag = keyof HeadingLevelMapType\nexport type AccordionItemHeaderPropsType = {\n /**\n * To improve the semantics of the markup further, the ARIA guidelines dictate\n * that each accordion item's button should be wrapped in an element with\n * role=\"heading\", or more simply, an HTML heading tag.\n * https://reach.tech/accordion/#accordion-headings\n */\n headingLevel?: HeadingLevelMapType[HeadingTag]\n className?: string\n leftToggleIcon?: boolean\n} & ReachAccordionButtonProps\n\nexport type AccordionItemPanelPropsType = {\n className?: string\n} & ReachAccordionPanelProps\nexport type AccordionItemPropsType = {\n className?: string\n} & ReachAccordionItemProps\nexport type AccordionPropsType = {\n className?: string\n // We have to explicit them below to get displayed by Storybook\n // should work without but might be an issue on Storybook side\n collapsible?: ReachAccordionProps[\"collapsible\"]\n defaultIndex?: ReachAccordionProps[\"defaultIndex\"]\n index?: ReachAccordionProps[\"index\"]\n multiple?: ReachAccordionProps[\"multiple\"]\n onChange?: ReachAccordionProps[\"onChange\"]\n} & ReachAccordionProps\n\nconst accordionSpringConfig = { tension: 300, friction: 30, clamp: true }\n\nexport const AccordionItemHeader = forwardRef<\n HTMLButtonElement,\n AccordionItemHeaderPropsType\n>(\n (\n { headingLevel = 4, className, leftToggleIcon = false, children, ...props },\n ref\n ) => {\n const { isExpanded } = useAccordionItemContext()\n const Heading = `h${headingLevel}` as HeadingTag\n return (\n <Heading>\n <ReachAccordionButton\n ref={ref}\n className={cx(\"cobalt-accordion__header\", {\n \"cobalt-accordion__header--left-toggle-icon\": leftToggleIcon,\n })}\n {...props}\n >\n <span className={cx(\"cobalt-accordion__header-content\", className)}>\n {children}\n </span>\n <ToggleIcon isOpen={isExpanded} />\n </ReachAccordionButton>\n </Heading>\n )\n }\n)\nAccordionItemHeader.displayName = \"Accordion.Item.Header\"\n\nconst AnimatedAccordionPanel = animated(ReachAccordionPanel)\nexport const AccordionItemPanel = ({\n children,\n className,\n ...props\n}: AccordionItemPanelPropsType) => {\n const { isExpanded } = useAccordionItemContext()\n const { ref, height } = useElementHeight<HTMLDivElement>()\n const animation = useSpring({\n opacity: isExpanded ? 1 : 0,\n height: isExpanded ? height : 0,\n overflow: \"hidden\",\n config: accordionSpringConfig,\n })\n\n return (\n <AnimatedAccordionPanel\n style={animation}\n // We need to set hidden to false for the exit animations to work\n // but the panel should still be hidden from the accessibility tree\n // when the panel is closed. We'll use aria-hidden instead.\n hidden={false}\n aria-hidden={!isExpanded || undefined}\n {...props}\n >\n <div ref={ref} className={cx(\"cobalt-accordion__panel\", className)}>\n {children}\n </div>\n </AnimatedAccordionPanel>\n )\n}\nAccordionItemPanel.displayName = \"Accordion.Item.Panel\"\n\nexport const AccordionItem = ({\n children,\n className,\n ...props\n}: AccordionItemPropsType) => {\n return (\n <ReachAccordionItem\n className={cx(\"cobalt-accordions-list__item\", className)}\n {...props}\n >\n {children}\n </ReachAccordionItem>\n )\n}\nAccordionItem.displayName = \"Accordion.Item\"\nAccordionItem.Header = AccordionItemHeader\nAccordionItem.Panel = AccordionItemPanel\n\nconst Accordion = ({\n className,\n children,\n index,\n collapsible = true,\n multiple = false,\n ...props\n}: AccordionPropsType) => {\n const hasIndex = index === 0 || !!index\n return (\n <ReachAccordion\n className={cx(\"cobalt-accordions-list\", className)}\n collapsible={!hasIndex && collapsible}\n multiple={!hasIndex && multiple}\n index={index}\n {...props}\n >\n {children}\n </ReachAccordion>\n )\n}\nAccordion.Item = AccordionItem\n\nexport default Accordion\n"],"names":["ReachAccordionButton","ReachAccordionPanel","ReachAccordionItem","ReachAccordion"],"mappings":";;;;;;;;AAwDA,MAAM,qBAAqB,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;AAE5D,MAAA,mBAAmB,GAAG,UAAU,CAI3C,CACE,EAAE,YAAY,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAC3E,GAAG,KACD;AACF,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,uBAAuB,EAAE,CAAA;AAChD,IAAA,MAAM,OAAO,GAAG,CAAI,CAAA,EAAA,YAAY,EAAgB,CAAA;IAChD,QACE,oBAAC,OAAO,EAAA,IAAA;QACN,KAAC,CAAA,aAAA,CAAAA,eAAoB,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,CACL,CACiB,EAC1B;AACH,EAAC;AACD,kBAAkB,CAAC,WAAW,GAAG,sBAAsB,CAAA;AAEhD,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACe,KAAI;AAC3B,IAAA,QACE,KAAC,CAAA,aAAA,CAAAC,eAAkB,IACjB,SAAS,EAAE,EAAE,CAAC,8BAA8B,EAAE,SAAS,CAAC,EACpD,GAAA,KAAK,IAER,QAAQ,CACU,EACtB;AACH,EAAC;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAA;AAC5C,aAAa,CAAC,MAAM,GAAG,mBAAmB,CAAA;AAC1C,aAAa,CAAC,KAAK,GAAG,kBAAkB,CAAA;AAElC,MAAA,SAAS,GAAG,CAAC,EACjB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,IAAI,EAClB,QAAQ,GAAG,KAAK,EAChB,GAAG,KAAK,EACW,KAAI;IACvB,MAAM,QAAQ,GAAG,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAA;AACvC,IAAA,QACE,KAAC,CAAA,aAAA,CAAAC,WAAc,EACb,EAAA,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAClD,WAAW,EAAE,CAAC,QAAQ,IAAI,WAAW,EACrC,QAAQ,EAAE,CAAC,QAAQ,IAAI,QAAQ,EAC/B,KAAK,EAAE,KAAK,KACR,KAAK,EAAA,EAER,QAAQ,CACM,EAClB;AACH,EAAC;AACD,SAAS,CAAC,IAAI,GAAG,aAAa;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Accordion/index.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\"\nimport cx from \"classnames\"\nimport {\n Accordion as ReachAccordion,\n AccordionItem as ReachAccordionItem,\n AccordionButton as ReachAccordionButton,\n AccordionPanel as ReachAccordionPanel,\n AccordionProps as ReachAccordionProps,\n AccordionItemProps as ReachAccordionItemProps,\n AccordionButtonProps as ReachAccordionButtonProps,\n useAccordionItemContext,\n AccordionPanelProps as ReachAccordionPanelProps,\n} from \"@reach/accordion\"\nimport ToggleIcon from \"./ToggleIcon\"\nimport { animated, useSpring } from \"@react-spring/web\"\nimport useElementHeight from \"../../hooks/useElementHeight\"\nexport { useAccordionItemContext } from \"@reach/accordion\"\n\ntype HeadingLevelMapType = {\n h2: 2\n h3: 3\n h4: 4\n h5: 5\n h6: 6\n}\n\ntype HeadingTag = keyof HeadingLevelMapType\nexport type AccordionItemHeaderPropsType = {\n /**\n * To improve the semantics of the markup further, the ARIA guidelines dictate\n * that each accordion item's button should be wrapped in an element with\n * role=\"heading\", or more simply, an HTML heading tag.\n * https://reach.tech/accordion/#accordion-headings\n */\n headingLevel?: HeadingLevelMapType[HeadingTag]\n className?: string\n leftToggleIcon?: boolean\n useChevron?: boolean\n} & ReachAccordionButtonProps\n\nexport type AccordionItemPanelPropsType = {\n className?: string\n} & ReachAccordionPanelProps\nexport type AccordionItemPropsType = {\n className?: string\n} & ReachAccordionItemProps\nexport type AccordionPropsType = {\n className?: string\n // We have to explicit them below to get displayed by Storybook\n // should work without but might be an issue on Storybook side\n collapsible?: ReachAccordionProps[\"collapsible\"]\n defaultIndex?: ReachAccordionProps[\"defaultIndex\"]\n index?: ReachAccordionProps[\"index\"]\n multiple?: ReachAccordionProps[\"multiple\"]\n onChange?: ReachAccordionProps[\"onChange\"]\n} & ReachAccordionProps\n\nconst accordionSpringConfig = { tension: 300, friction: 30, clamp: true }\n\nexport const AccordionItemHeader = forwardRef<\n HTMLButtonElement,\n AccordionItemHeaderPropsType\n>(\n (\n {\n headingLevel = 4,\n className,\n leftToggleIcon = false,\n useChevron = false,\n children,\n ...props\n },\n ref\n ) => {\n const { isExpanded } = useAccordionItemContext()\n const Heading = `h${headingLevel}` as HeadingTag\n return (\n <Heading>\n <ReachAccordionButton\n ref={ref}\n className={cx(\"cobalt-accordion__header\", {\n \"cobalt-accordion__header--left-toggle-icon\": leftToggleIcon,\n })}\n {...props}\n >\n <span className={cx(\"cobalt-accordion__header-content\", className)}>\n {children}\n </span>\n <ToggleIcon useChevron={useChevron} isOpen={isExpanded} />\n </ReachAccordionButton>\n </Heading>\n )\n }\n)\nAccordionItemHeader.displayName = \"Accordion.Item.Header\"\n\nconst AnimatedAccordionPanel = animated(ReachAccordionPanel)\nexport const AccordionItemPanel = ({\n children,\n className,\n ...props\n}: AccordionItemPanelPropsType) => {\n const { isExpanded } = useAccordionItemContext()\n const { ref, height } = useElementHeight<HTMLDivElement>()\n const animation = useSpring({\n opacity: isExpanded ? 1 : 0,\n height: isExpanded ? height : 0,\n overflow: \"hidden\",\n config: accordionSpringConfig,\n })\n\n return (\n <AnimatedAccordionPanel\n style={animation}\n // We need to set hidden to false for the exit animations to work\n // but the panel should still be hidden from the accessibility tree\n // when the panel is closed. We'll use aria-hidden instead.\n hidden={false}\n aria-hidden={!isExpanded || undefined}\n {...props}\n >\n <div ref={ref} className={cx(\"cobalt-accordion__panel\", className)}>\n {children}\n </div>\n </AnimatedAccordionPanel>\n )\n}\nAccordionItemPanel.displayName = \"Accordion.Item.Panel\"\n\nexport const AccordionItem = ({\n children,\n className,\n ...props\n}: AccordionItemPropsType) => {\n return (\n <ReachAccordionItem\n className={cx(\"cobalt-accordions-list__item\", className)}\n {...props}\n >\n {children}\n </ReachAccordionItem>\n )\n}\nAccordionItem.displayName = \"Accordion.Item\"\nAccordionItem.Header = AccordionItemHeader\nAccordionItem.Panel = AccordionItemPanel\n\nconst Accordion = ({\n className,\n children,\n index,\n collapsible = true,\n multiple = false,\n ...props\n}: AccordionPropsType) => {\n const hasIndex = index === 0 || !!index\n return (\n <ReachAccordion\n className={cx(\"cobalt-accordions-list\", className)}\n collapsible={!hasIndex && collapsible}\n multiple={!hasIndex && multiple}\n index={index}\n {...props}\n >\n {children}\n </ReachAccordion>\n )\n}\nAccordion.Item = AccordionItem\n\nexport default Accordion\n"],"names":["ReachAccordionButton","ReachAccordionPanel","ReachAccord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ACvC,IAAA,QACE,KAAC,CAAA,aAAA,CAAAC,WAAc,EACb,EAAA,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAClD,WAAW,EAAE,CAAC,QAAQ,IAAI,WAAW,EACrC,QAAQ,EAAE,CAAC,QAAQ,IAAI,QAAQ,EAC/B,KAAK,EAAE,KAAK,KACR,KAAK,EAAA,EAER,QAAQ,CACM,EAClB;AACH,EAAC;AACD,SAAS,CAAC,IAAI,GAAG,aAAa;;;;"}
@@ -2,6 +2,9 @@ import React, { PureComponent } from 'react';
2
2
  import cx from 'classnames';
3
3
  import { withFieldLabelAndHint } from './field.js';
4
4
  import DefaultButton from '../Buttons/DefaultButton/index.js';
5
+ import '../Icon/index.js';
6
+ import MinusIcon from '../Icon/__generated__/MinusIcon.js';
7
+ import PlusIcon from '../Icon/__generated__/PlusIcon.js';
5
8
 
6
9
  const AUTO_CHANGE_TIMEOUT_IN_MS = 750;
7
10
  const AUTO_CHANGE_INTERVAL_IN_MS = 150;
@@ -77,11 +80,13 @@ class Stepper extends PureComponent {
77
80
  "cobalt-Stepper--error": status === "error",
78
81
  }) },
79
82
  React.createElement("div", { className: "cobalt-Stepper__Wrapper" },
80
- React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === min, onPointerDown: () => this.onPointerDown(this.onDecrement), onPointerUp: this.onPointerUp, onPointerLeave: this.onPointerUp, type: "button" }, "-"),
83
+ React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === min, onPointerDown: () => this.onPointerDown(this.onDecrement), onPointerUp: this.onPointerUp, onPointerLeave: this.onPointerUp, type: "button" },
84
+ React.createElement(MinusIcon, null)),
81
85
  React.createElement("div", { className: "cobalt-Stepper__ContentWrapper" },
82
86
  children ? children(this.state.value) : this.state.value,
83
87
  React.createElement("input", { type: "hidden", name: name, value: this.state.value })),
84
- React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === max, onPointerDown: () => this.onPointerDown(this.onIncrement), onPointerUp: this.onPointerUp, onPointerLeave: this.onPointerUp, type: "button" }, "+"))));
88
+ React.createElement(DefaultButton, { className: "cobalt-Stepper__ActionButton", disabled: disabled || this.state.value === max, onPointerDown: () => this.onPointerDown(this.onIncrement), onPointerUp: this.onPointerUp, onPointerLeave: this.onPointerUp, type: "button" },
89
+ React.createElement(PlusIcon, null)))));
85
90
  }
86
91
  }
87
92
  const wrappedComponent = withFieldLabelAndHint(Stepper);
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\n\nconst AUTO_CHANGE_TIMEOUT_IN_MS = 750\nconst AUTO_CHANGE_INTERVAL_IN_MS = 150\n\nconst enforceInRange = (\n value: number,\n min: number | undefined,\n max: number | undefined\n) => {\n let enforcedValue = value\n if (typeof max !== \"undefined\") {\n enforcedValue = Math.min(enforcedValue, max)\n }\n if (typeof min !== \"undefined\") {\n enforcedValue = Math.max(enforcedValue, min)\n }\n return enforcedValue\n}\n\ntype Props = {\n value: number\n name?: string\n disabled?: boolean\n min?: number\n max?: number\n step: number\n onChange?: (value: number) => void\n children?: (value: number) => React.ReactNode\n} & FormElement\n\ntype State = {\n value: number\n}\n\nclass Stepper extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props)\n\n if (props.step < 0)\n throw new Error(\"Incorrect step value. Can't be below zero\")\n\n this.onDecrement = this.onDecrement.bind(this)\n this.onIncrement = this.onIncrement.bind(this)\n this.changeValue = this.changeValue.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n\n this.state = {\n value: enforceInRange(props.value, props.min, props.max),\n }\n }\n\n timeout: ReturnType<typeof setTimeout> | null = null\n interval: ReturnType<typeof setInterval> | null = null\n\n componentDidUpdate(_prevProps: Props, prevState: State) {\n if (prevState.value !== this.state.value) {\n this.changeValue(this.state.value)\n } else if (this.props.value !== this.state.value) {\n this.changeValue(this.props.value)\n }\n }\n\n onDecrement = () => {\n ;(this.props.min !== null || this.state.value > this.props.min) &&\n this.changeValue(\n parseFloat((this.state.value - this.props.step).toFixed(10))\n )\n }\n\n onIncrement = () => {\n ;(this.props.max !== null || this.state.value < this.props.max) &&\n this.changeValue(\n parseFloat((this.state.value + this.props.step).toFixed(10))\n )\n }\n\n onPointerDown = (callback: () => void) => {\n callback()\n this.timeout && clearTimeout(this.timeout)\n this.timeout = setTimeout(() => {\n this.interval && clearInterval(this.interval)\n this.interval = setInterval(callback, AUTO_CHANGE_INTERVAL_IN_MS)\n }, AUTO_CHANGE_TIMEOUT_IN_MS)\n }\n\n onPointerUp = () => {\n if (this.interval) {\n clearInterval(this.interval)\n this.interval = null\n }\n this.timeout && clearTimeout(this.timeout)\n }\n\n changeValue = (value: number) => {\n this.setState(\n {\n value: enforceInRange(value, this.props.min, this.props.max),\n },\n () => {\n this.props.onChange && this.props.onChange(this.state.value)\n }\n )\n }\n\n render() {\n const { name, status, disabled, min, max, children } = this.props\n\n return (\n <div\n className={classNames(\"cobalt-Stepper\", {\n \"cobalt-Stepper--disabled\": disabled,\n \"cobalt-Stepper--success\": status === \"success\",\n \"cobalt-Stepper--error\": status === \"error\",\n })}\n >\n <div className=\"cobalt-Stepper__Wrapper\">\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === min}\n onPointerDown={() => this.onPointerDown(this.onDecrement)}\n onPointerUp={this.onPointerUp}\n onPointerLeave={this.onPointerUp}\n type={\"button\"}\n >\n -\n </DefaultButton>\n <div className=\"cobalt-Stepper__ContentWrapper\">\n {children ? children(this.state.value) : this.state.value}\n <input type=\"hidden\" name={name} value={this.state.value} />\n </div>\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === max}\n onPointerDown={() => this.onPointerDown(this.onIncrement)}\n onPointerUp={this.onPointerUp}\n onPointerLeave={this.onPointerUp}\n type={\"button\"}\n >\n +\n </DefaultButton>\n </div>\n </div>\n )\n }\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Stepper)\nwrappedComponent.displayName = \"Stepper\"\n\nexport { wrappedComponent as Stepper }\n\ntype StepperMetaProps = {\n children: React.ReactNode\n}\nconst StepperMeta = ({ children }: StepperMetaProps) => {\n return <div className=\"cobalt-Stepper__Meta\">{children}</div>\n}\n\nexport { StepperMeta }\n"],"names":["classNames"],"mappings":";;;;;AAMA,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAEtC,MAAM,cAAc,GAAG,CACrB,KAAa,EACb,GAAuB,EACvB,GAAuB,KACrB;IACF,IAAI,aAAa,GAAG,KAAK,CAAA;AACzB,IAAA,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;QAC9B,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;KAC7C;AACD,IAAA,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;QAC9B,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;KAC7C;AACD,IAAA,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA;AAiBD,MAAM,OAAQ,SAAQ,aAA2B,CAAA;AAC/C,IAAA,WAAA,CAAY,KAAY,EAAA;QACtB,KAAK,CAAC,KAAK,CAAC,CAAA;QAgBd,IAAO,CAAA,OAAA,GAAyC,IAAI,CAAA;QACpD,IAAQ,CAAA,QAAA,GAA0C,IAAI,CAAA;QAUtD,IAAW,CAAA,WAAA,GAAG,MAAK;AAChB,YAAA,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CA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oBAAA,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,CACxD;gBACN,KAAC,CAAA,aAAA,CAAA,aAAa,IACZ,SAAS,EAAC,8BAA8B,EACxC,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,EAC9C,aAAa,EAAE,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,EACzD,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,IAAI,CAAC,WAAW,EAChC,IAAI,EAAE,QAAQ,EAGA,EAAA,GAAA,CAAA,CACZ,CACF,EACP;KACF;AACF,CAAA;AAED,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,OAAO,EAAC;AACvD,gBAAgB,CAAC,WAAW,GAAG,SAAS,CAAA;AAOxC,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAoB,KAAI;AACrD,IAAA,OAAO,6BAAK,SAAS,EAAC,sBAAsB,EAAE,EAAA,QAAQ,CAAO,CAAA;AAC/D;;;;"}
1
+ {"version":3,"file":"Stepper.js","sources":["../../../src/components/Form/Stepper.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\"\nimport classNames from \"classnames\"\nimport { FormElement } from \"./form\"\nimport { withFieldLabelAndHint } from \"./field\"\nimport DefaultButton from \"../Buttons/DefaultButton\"\nimport { MinusIcon, PlusIcon } from \"../Icon\"\n\nconst AUTO_CHANGE_TIMEOUT_IN_MS = 750\nconst AUTO_CHANGE_INTERVAL_IN_MS = 150\n\nconst enforceInRange = (\n value: number,\n min: number | undefined,\n max: number | undefined\n) => {\n let enforcedValue = value\n if (typeof max !== \"undefined\") {\n enforcedValue = Math.min(enforcedValue, max)\n }\n if (typeof min !== \"undefined\") {\n enforcedValue = Math.max(enforcedValue, min)\n }\n return enforcedValue\n}\n\ntype Props = {\n value: number\n name?: string\n disabled?: boolean\n min?: number\n max?: number\n step: number\n onChange?: (value: number) => void\n children?: (value: number) => React.ReactNode\n} & FormElement\n\ntype State = {\n value: number\n}\n\nclass Stepper extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props)\n\n if (props.step < 0)\n throw new Error(\"Incorrect step value. Can't be below zero\")\n\n this.onDecrement = this.onDecrement.bind(this)\n this.onIncrement = this.onIncrement.bind(this)\n this.changeValue = this.changeValue.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n\n this.state = {\n value: enforceInRange(props.value, props.min, props.max),\n }\n }\n\n timeout: ReturnType<typeof setTimeout> | null = null\n interval: ReturnType<typeof setInterval> | null = null\n\n componentDidUpdate(_prevProps: Props, prevState: State) {\n if (prevState.value !== this.state.value) {\n this.changeValue(this.state.value)\n } else if (this.props.value !== this.state.value) {\n this.changeValue(this.props.value)\n }\n }\n\n onDecrement = () => {\n ;(this.props.min !== null || this.state.value > this.props.min) &&\n this.changeValue(\n parseFloat((this.state.value - this.props.step).toFixed(10))\n )\n }\n\n onIncrement = () => {\n ;(this.props.max !== null || this.state.value < this.props.max) &&\n this.changeValue(\n parseFloat((this.state.value + this.props.step).toFixed(10))\n )\n }\n\n onPointerDown = (callback: () => void) => {\n callback()\n this.timeout && clearTimeout(this.timeout)\n this.timeout = setTimeout(() => {\n this.interval && clearInterval(this.interval)\n this.interval = setInterval(callback, AUTO_CHANGE_INTERVAL_IN_MS)\n }, AUTO_CHANGE_TIMEOUT_IN_MS)\n }\n\n onPointerUp = () => {\n if (this.interval) {\n clearInterval(this.interval)\n this.interval = null\n }\n this.timeout && clearTimeout(this.timeout)\n }\n\n changeValue = (value: number) => {\n this.setState(\n {\n value: enforceInRange(value, this.props.min, this.props.max),\n },\n () => {\n this.props.onChange && this.props.onChange(this.state.value)\n }\n )\n }\n\n render() {\n const { name, status, disabled, min, max, children } = this.props\n\n return (\n <div\n className={classNames(\"cobalt-Stepper\", {\n \"cobalt-Stepper--disabled\": disabled,\n \"cobalt-Stepper--success\": status === \"success\",\n \"cobalt-Stepper--error\": status === \"error\",\n })}\n >\n <div className=\"cobalt-Stepper__Wrapper\">\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === min}\n onPointerDown={() => this.onPointerDown(this.onDecrement)}\n onPointerUp={this.onPointerUp}\n onPointerLeave={this.onPointerUp}\n type={\"button\"}\n >\n <MinusIcon />\n </DefaultButton>\n <div className=\"cobalt-Stepper__ContentWrapper\">\n {children ? children(this.state.value) : this.state.value}\n <input type=\"hidden\" name={name} value={this.state.value} />\n </div>\n <DefaultButton\n className=\"cobalt-Stepper__ActionButton\"\n disabled={disabled || this.state.value === max}\n onPointerDown={() => this.onPointerDown(this.onIncrement)}\n onPointerUp={this.onPointerUp}\n onPointerLeave={this.onPointerUp}\n type={\"button\"}\n >\n <PlusIcon />\n </DefaultButton>\n </div>\n </div>\n )\n }\n}\n\nconst wrappedComponent = withFieldLabelAndHint(Stepper)\nwrappedComponent.displayName = \"Stepper\"\n\nexport { wrappedComponent as Stepper }\n\ntype StepperMetaProps = {\n children: React.ReactNode\n}\nconst StepperMeta = ({ children }: StepperMetaProps) => {\n return <div className=\"cobalt-Stepper__Meta\">{children}</div>\n}\n\nexport { StepperMeta }\n"],"names":["classNames"],"mappings":";;;;;;;;AAOA,MAAM,yBAAyB,GAAG,GAAG,CAAA;AACrC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AAEtC,MAAM,cAAc,GAAG,CACrB,KAAa,EACb,GAAuB,EACvB,GAAuB,KACrB;IACF,IAAI,aAAa,GAAG,KAAK,CAAA;AACzB,IAAA,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE;QAC9B,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,CAAA;KAC7C;AACD,IAAA,IAAI,OAAO,GAAG,KAAK,WAAW,EAAE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ACrD,IAAA,OAAO,6BAAK,SAAS,EAAC,sBAAsB,EAAE,EAAA,QAAQ,CAAO,CAAA;AAC/D;;;;"}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import capitalize from '../../utils/capitalize.js';
3
+ import 'lodash.throttle';
4
+ import cx from 'classnames';
5
+
6
+ const iconSource = "circledArrowLeft";
7
+ const CircledArrowLeftIcon = ({ color, size = 24, contained = false, className, }) => {
8
+ const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
9
+ [`cobalt-Icon--color${capitalize(color)}`]: color,
10
+ "cobalt-Icon--size16": size === 16,
11
+ "cobalt-Icon--size20": size === 20,
12
+ "cobalt-Icon--size32": size === 32,
13
+ "cobalt-Icon--contained": contained,
14
+ });
15
+ const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
16
+ return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
17
+ React.createElement("path", { d: "M12.957 16.543 9.414 13H18v-2H9.414l3.543-3.543-1.414-1.414L5.586 12l5.957 5.957z" }),
18
+ React.createElement("path", { fillRule: "evenodd", d: "M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m2 0a9 9 0 1 1 18 0 9 9 0 0 1-18 0", clipRule: "evenodd" })));
19
+ };
20
+
21
+ export { CircledArrowLeftIcon as default };
22
+ //# sourceMappingURL=CircledArrowLeftIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircledArrowLeftIcon.js","sources":["../../../../src/components/Icon/__generated__/CircledArrowLeftIcon.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 = \"circledArrowLeft\"\nconst CircledArrowLeftIcon = ({\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=\"M12.957 16.543 9.414 13H18v-2H9.414l3.543-3.543-1.414-1.414L5.586 12l5.957 5.957z\" />\n <path\n fillRule=\"evenodd\"\n d=\"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m2 0a9 9 0 1 1 18 0 9 9 0 0 1-18 0\"\n clipRule=\"evenodd\"\n />\n </svg>\n )\n}\nexport default CircledArrowLeftIcon\n"],"names":[],"mappings":";;;;;AAUA,MAAM,UAAU,GAAG,kBAAkB,CAAA;AACrC,MAAM,oBAAoB,GAAG,CAAC,EAC5B,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,mFAAmF,EAAG,CAAA;AAC9F,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,0GAA0G,EAC5G,QAAQ,EAAC,SAAS,EAClB,CAAA,CACE,CACP,CAAA;AACH;;;;"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import capitalize from '../../utils/capitalize.js';
3
+ import 'lodash.throttle';
4
+ import cx from 'classnames';
5
+
6
+ const iconSource = "filepdf";
7
+ const FilepdfIcon = ({ color, size = 24, contained = false, className, }) => {
8
+ const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
9
+ [`cobalt-Icon--color${capitalize(color)}`]: color,
10
+ "cobalt-Icon--size16": size === 16,
11
+ "cobalt-Icon--size20": size === 20,
12
+ "cobalt-Icon--size32": size === 32,
13
+ "cobalt-Icon--contained": contained,
14
+ });
15
+ const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
16
+ return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
17
+ React.createElement("path", { fillRule: "evenodd", 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.153zM13.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", clipRule: "evenodd" })));
18
+ };
19
+
20
+ export { FilepdfIcon as default };
21
+ //# sourceMappingURL=FilepdfIcon.js.map
@@ -0,0 +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\n fillRule=\"evenodd\"\n 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.153zM13.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\"\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;AACzD,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,8zBAA8zB,EACh0B,QAAQ,EAAC,SAAS,EAClB,CAAA,CACE,CACP,CAAA;AACH;;;;"}
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import capitalize from '../../utils/capitalize.js';
3
+ import 'lodash.throttle';
4
+ import cx from 'classnames';
5
+
6
+ const iconSource = "filexls";
7
+ const FilexlsIcon = ({ color, size = 24, contained = false, className, }) => {
8
+ const computedClassName = cx(className, `cobalt-Icon cobalt-Icon--${iconSource}`, {
9
+ [`cobalt-Icon--color${capitalize(color)}`]: color,
10
+ "cobalt-Icon--size16": size === 16,
11
+ "cobalt-Icon--size20": size === 20,
12
+ "cobalt-Icon--size32": size === 32,
13
+ "cobalt-Icon--contained": contained,
14
+ });
15
+ const wrap = (content) => (React.createElement("span", { className: computedClassName }, content));
16
+ return wrap(React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" },
17
+ React.createElement("path", { fillRule: "evenodd", 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.705 1.824q.516.203 1.22.203.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.52 21v-5.637h1.433v4.485h2.395V21zm-4.46-2.83L7.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", clipRule: "evenodd" })));
18
+ };
19
+
20
+ export { FilexlsIcon as default };
21
+ //# sourceMappingURL=FilexlsIcon.js.map
@@ -0,0 +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\n fillRule=\"evenodd\"\n 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.705 1.824q.516.203 1.22.203.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.52 21v-5.637h1.433v4.485h2.395V21zm-4.46-2.83L7.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 clipRule=\"evenodd\"\n />\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;AACzD,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,soCAAsoC,EACxoC,QAAQ,EAAC,SAAS,EAClB,CAAA,CACE,CACP,CAAA;AACH;;;;"}
@@ -4,8 +4,8 @@ import cx from 'classnames';
4
4
  const LayoutCardItem = ({ children }) => {
5
5
  return React.createElement("div", { className: "cobalt-layout-card__item" }, children);
6
6
  };
7
- const LayoutCard = ({ children, isPageHeader, }) => {
8
- return (React.createElement("div", { className: cx("cobalt-layout-card", {
7
+ const LayoutCard = ({ children, isPageHeader, className, }) => {
8
+ return (React.createElement("div", { className: cx("cobalt-layout-card", className, {
9
9
  "cobalt-layout--isPageHeader": isPageHeader,
10
10
  }) }, children));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutCard.js","sources":["../../../../src/components/Layout/Components/LayoutCard.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nconst LayoutCardItem = ({ children }: { children: React.ReactNode }) => {\n return <div className=\"cobalt-layout-card__item\">{children}</div>\n}\n\nconst LayoutCard = ({\n children,\n isPageHeader,\n}: {\n children: React.ReactNode\n isPageHeader?: boolean\n}) => {\n return (\n <div\n className={cx(\"cobalt-layout-card\", {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n })}\n >\n {children}\n </div>\n )\n}\n\nLayoutCard.Item = LayoutCardItem\n\nexport default LayoutCard\n"],"names":[],"mappings":";;;AAGA,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAiC,KAAI;AACrE,IAAA,OAAO,6BAAK,SAAS,EAAC,0BAA0B,EAAE,EAAA,QAAQ,CAAO,CAAA;AACnE,CAAC,CAAA;AAEK,MAAA,UAAU,GAAG,CAAC,EAClB,QAAQ,EACR,YAAY,GAIb,KAAI;AACH,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE;AAClC,YAAA,6BAA6B,EAAE,YAAY;AAC5C,SAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AACH,EAAC;AAED,UAAU,CAAC,IAAI,GAAG,cAAc;;;;"}
1
+ {"version":3,"file":"LayoutCard.js","sources":["../../../../src/components/Layout/Components/LayoutCard.tsx"],"sourcesContent":["import React from \"react\"\nimport cx from \"classnames\"\n\nconst LayoutCardItem = ({ children }: { children: React.ReactNode }) => {\n return <div className=\"cobalt-layout-card__item\">{children}</div>\n}\n\nconst LayoutCard = ({\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-card\", className, {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n })}\n >\n {children}\n </div>\n )\n}\n\nLayoutCard.Item = LayoutCardItem\n\nexport default LayoutCard\n"],"names":[],"mappings":";;;AAGA,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAiC,KAAI;AACrE,IAAA,OAAO,6BAAK,SAAS,EAAC,0BAA0B,EAAE,EAAA,QAAQ,CAAO,CAAA;AACnE,CAAC,CAAA;AAEK,MAAA,UAAU,GAAG,CAAC,EAClB,QAAQ,EACR,YAAY,EACZ,SAAS,GAKV,KAAI;IACH,QACE,6BACE,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,EAAE;AAC7C,YAAA,6BAA6B,EAAE,YAAY;AAC5C,SAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AACH,EAAC;AAED,UAAU,CAAC,IAAI,GAAG,cAAc;;;;"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import cx from 'classnames';
3
3
 
4
- const LayoutSection = ({ children, isPageHeader, }) => {
5
- return (React.createElement("div", { className: cx("cobalt-layout-section", {
4
+ const LayoutSection = ({ children, isPageHeader, className, }) => {
5
+ return (React.createElement("div", { className: cx("cobalt-layout-section", className, {
6
6
  "cobalt-layout--isPageHeader": isPageHeader,
7
7
  }) }, children));
8
8
  };
@@ -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}: {\n children: React.ReactNode\n isPageHeader?: boolean\n}) => {\n return (\n <div\n className={cx(\"cobalt-layout-section\", {\n \"cobalt-layout--isPageHeader\": isPageHeader,\n })}\n >\n {children}\n </div>\n )\n}\n\nexport default LayoutSection\n"],"names":[],"mappings":";;;AAGM,MAAA,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,YAAY,GAIb,KAAI;AACH,IAAA,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE;AACrC,YAAA,6BAA6B,EAAE,YAAY;AAC5C,SAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AACH;;;;"}
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":";;;AAGM,MAAA,aAAa,GAAG,CAAC,EACrB,QAAQ,EACR,YAAY,EACZ,SAAS,GAKV,KAAI;IACH,QACE,6BACE,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,EAAE;AAChD,YAAA,6BAA6B,EAAE,YAAY;AAC5C,SAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AACH;;;;"}
@@ -13,19 +13,22 @@ const getDirectionClasses = (direction) => {
13
13
  }
14
14
  return directionClasses;
15
15
  };
16
- const Flexible = ({ children, direction = "column", bottomPadding = false, }) => {
16
+ const Flexible = ({ children, direction = "column", bottomPadding = false, isFullHeight = false, }) => {
17
17
  return (React.createElement("div", { className: cx("cobalt-layout-flexible", getDirectionClasses(direction), {
18
18
  "cobalt-layout--bottomPadding": bottomPadding,
19
+ "cobalt-layout--fullHeight": isFullHeight,
19
20
  }) }, children));
20
21
  };
21
- const FlexibleWithConstraint = ({ children, size, direction = "column", bottomPadding = false, }) => {
22
+ const FlexibleWithConstraint = ({ children, size, direction = "column", bottomPadding = false, isFullHeight = false, }) => {
22
23
  return (React.createElement("div", { className: cx(`cobalt-layout-flexibleWithConstraint cobalt-layout-flexibleWithConstraint--${size}`, getDirectionClasses(direction), {
23
24
  "cobalt-layout--bottomPadding": bottomPadding,
25
+ "cobalt-layout--fullHeight": isFullHeight,
24
26
  }) }, children));
25
27
  };
26
- const Fixed = ({ children, width, direction = "column", bottomPadding = false, }) => {
28
+ const Fixed = ({ children, width, direction = "column", bottomPadding = false, isFullHeight = false, }) => {
27
29
  return (React.createElement("div", { className: cx(`cobalt-layout-fixed cobalt-layout-fixed--${width}`, getDirectionClasses(direction), {
28
30
  "cobalt-layout--bottomPadding": bottomPadding,
31
+ "cobalt-layout--fullHeight": isFullHeight,
29
32
  }) }, children));
30
33
  };
31
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Layout/Surfaces/index.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\"\nimport cx from \"classnames\"\nimport { breakpoints } from \"../../../tokens\"\n\nexport type ResponsiveProp<T> = {\n [key in keyof typeof breakpoints]?: T\n}\n\ntype DirectionProp = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\"\ntype ResponsiveDirection = ResponsiveProp<DirectionProp>\n\nconst getDirectionClasses = (\n direction: ResponsiveDirection | DirectionProp\n) => {\n const directionClasses: string[] = []\n if (typeof direction === \"string\") {\n directionClasses.push(`c-flex-${direction}`.replace(\"column\", \"col\"))\n } else {\n for (const [key, value] of Object.entries(direction)) {\n directionClasses.push(`${key}:c-flex-${value}`.replace(\"column\", \"col\"))\n }\n }\n return directionClasses\n}\n\nexport const Flexible = ({\n children,\n direction = \"column\",\n bottomPadding = false,\n}: {\n children?: ReactNode\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n}) => {\n return (\n <div\n className={cx(\"cobalt-layout-flexible\", getDirectionClasses(direction), {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n })}\n >\n {children}\n </div>\n )\n}\n\nexport const FlexibleWithConstraint = ({\n children,\n size,\n direction = \"column\",\n bottomPadding = false,\n}: {\n children?: ReactNode\n size: \"small\" | \"medium\" | \"large\"\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n}) => {\n return (\n <div\n className={cx(\n `cobalt-layout-flexibleWithConstraint cobalt-layout-flexibleWithConstraint--${size}`,\n getDirectionClasses(direction),\n {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n }\n )}\n >\n {children}\n </div>\n )\n}\n\nexport const Fixed = ({\n children,\n width,\n direction = \"column\",\n bottomPadding = false,\n}: {\n children?: ReactNode\n width: 280 | 420 | 600\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n}) => {\n return (\n <div\n className={cx(\n `cobalt-layout-fixed cobalt-layout-fixed--${width}`,\n getDirectionClasses(direction),\n {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n }\n )}\n >\n {children}\n </div>\n )\n}\n"],"names":[],"mappings":";;;AAWA,MAAM,mBAAmB,GAAG,CAC1B,SAA8C,KAC5C;IACF,MAAM,gBAAgB,GAAa,EAAE,CAAA;AACrC,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;AACjC,QAAA,gBAAgB,CAAC,IAAI,CAAC,CAAA,OAAA,EAAU,SAAS,CAAE,CAAA,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;KACtE;SAAM;AACL,QAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AACpD,YAAA,gBAAgB,CAAC,IAAI,CAAC,CAAG,EAAA,GAAG,WAAW,KAAK,CAAA,CAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;SACzE;KACF;AACD,IAAA,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA;AAEY,MAAA,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,SAAS,GAAG,QAAQ,EACpB,aAAa,GAAG,KAAK,GAKtB,KAAI;AACH,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,SAAS,CAAC,EAAE;AACtE,YAAA,8BAA8B,EAAE,aAAa;AAC9C,SAAA,CAAC,EAED,EAAA,QAAQ,CACL,EACP;AACH,EAAC;AAEY,MAAA,sBAAsB,GAAG,CAAC,EACrC,QAAQ,EACR,IAAI,EACJ,SAAS,GAAG,QAAQ,EACpB,aAAa,GAAG,KAAK,GAMtB,KAAI;AACH,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,CAAA,2EAAA,EAA8E,IAAI,CAAA,CAAE,EACpF,mBAAmB,CAAC,SAAS,CAAC,EAC9B;AACE,YAAA,8BAA8B,EAAE,aAAa;AAC9C,SAAA,CACF,EAEA,EAAA,QAAQ,CACL,EACP;AACH,EAAC;AAEY,MAAA,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,SAAS,GAAG,QAAQ,EACpB,aAAa,GAAG,KAAK,GAMtB,KAAI;AACH,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,CAAA,yCAAA,EAA4C,KAAK,CAAA,CAAE,EACnD,mBAAmB,CAAC,SAAS,CAAC,EAC9B;AACE,YAAA,8BAA8B,EAAE,aAAa;AAC9C,SAAA,CACF,EAEA,EAAA,QAAQ,CACL,EACP;AACH;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Layout/Surfaces/index.tsx"],"sourcesContent":["import React, { type ReactNode } from \"react\"\nimport cx from \"classnames\"\nimport { breakpoints } from \"../../../tokens\"\n\nexport type ResponsiveProp<T> = {\n [key in keyof typeof breakpoints]?: T\n}\n\ntype DirectionProp = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\"\ntype ResponsiveDirection = ResponsiveProp<DirectionProp>\n\nconst getDirectionClasses = (\n direction: ResponsiveDirection | DirectionProp\n) => {\n const directionClasses: string[] = []\n if (typeof direction === \"string\") {\n directionClasses.push(`c-flex-${direction}`.replace(\"column\", \"col\"))\n } else {\n for (const [key, value] of Object.entries(direction)) {\n directionClasses.push(`${key}:c-flex-${value}`.replace(\"column\", \"col\"))\n }\n }\n return directionClasses\n}\n\nexport const Flexible = ({\n children,\n direction = \"column\",\n bottomPadding = false,\n isFullHeight = false,\n}: {\n children?: ReactNode\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n isFullHeight?: boolean\n}) => {\n return (\n <div\n className={cx(\"cobalt-layout-flexible\", getDirectionClasses(direction), {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n \"cobalt-layout--fullHeight\": isFullHeight,\n })}\n >\n {children}\n </div>\n )\n}\n\nexport const FlexibleWithConstraint = ({\n children,\n size,\n direction = \"column\",\n bottomPadding = false,\n isFullHeight = false,\n}: {\n children?: ReactNode\n size: \"small\" | \"medium\" | \"large\"\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n isFullHeight?: boolean\n}) => {\n return (\n <div\n className={cx(\n `cobalt-layout-flexibleWithConstraint cobalt-layout-flexibleWithConstraint--${size}`,\n getDirectionClasses(direction),\n {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n \"cobalt-layout--fullHeight\": isFullHeight,\n }\n )}\n >\n {children}\n </div>\n )\n}\n\nexport const Fixed = ({\n children,\n width,\n direction = \"column\",\n bottomPadding = false,\n isFullHeight = false,\n}: {\n children?: ReactNode\n width: 280 | 420 | 600\n direction?: ResponsiveDirection | DirectionProp\n bottomPadding?: boolean\n isFullHeight?: boolean\n}) => {\n return (\n <div\n className={cx(\n `cobalt-layout-fixed cobalt-layout-fixed--${width}`,\n getDirectionClasses(direction),\n {\n \"cobalt-layout--bottomPadding\": bottomPadding,\n \"cobalt-layout--fullHeight\": isFullHeight,\n }\n )}\n >\n {children}\n </div>\n )\n}\n"],"names":[],"mappings":";;;AAWA,MAAM,mBAAmB,GAAG,CAC1B,SAA8C,KAC5C;IACF,MAAM,gBAAgB,GAAa,EAAE,CAAA;AACrC,IAAA,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;AACjC,QAAA,gBAAgB,CAAC,IAAI,CAAC,CAAA,OAAA,EAAU,SAAS,CAAE,CAAA,CA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,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,KAAK,GAOrB,KAAI;AACH,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CACX,CAAA,yCAAA,EAA4C,KAAK,CAAA,CAAE,EACnD,mBAAmB,CAAC,SAAS,CAAC,EAC9B;AACE,YAAA,8BAA8B,EAAE,aAAa;AAC7C,YAAA,2BAA2B,EAAE,YAAY;AAC1C,SAAA,CACF,EAEA,EAAA,QAAQ,CACL,EACP;AACH;;;;"}
@@ -0,0 +1,66 @@
1
+ import React from 'react';
2
+ import cx from 'classnames';
3
+ import DefaultButton from '../Buttons/DefaultButton/index.js';
4
+ import '../Icon/index.js';
5
+ import DotsHorizontalIcon from '../Icon/__generated__/DotsHorizontalIcon.js';
6
+
7
+ const PaginationButton = ({ currentPage, pageNumber, onPageChange, }) => {
8
+ const isActive = currentPage === pageNumber;
9
+ return (React.createElement(DefaultButton, { className: cx("cobalt-pagination__DefaultButton"), selected: isActive, onClick: () => !isActive && onPageChange(pageNumber) }, pageNumber));
10
+ };
11
+ const PAGE_DOTS_VALUE = -1; // Unrevelant value only used to represent dots in the pages array
12
+ const generatePages = (currentPage, totalPages) => {
13
+ const pages = [];
14
+ const maxVisiblePages = 11; // Always show exactly 11 visible pages (excluding dots)
15
+ const edgeButtons = 3; // Number of fixed edge buttons
16
+ if (totalPages <= maxVisiblePages) {
17
+ // Show all pages
18
+ for (let i = 1; i <= totalPages; i++) {
19
+ pages.push(i);
20
+ }
21
+ return pages;
22
+ }
23
+ // Calculate dynamic range for middle pages
24
+ const middlePagesCount = maxVisiblePages - 2 * edgeButtons; // Remaining pages for the middle
25
+ let startMiddlePage = Math.max(currentPage - Math.floor(middlePagesCount / 2), edgeButtons + 1);
26
+ let endMiddlePage = Math.min(currentPage + Math.floor(middlePagesCount / 2), totalPages - edgeButtons);
27
+ // Adjust start and end pages if they exceed boundaries
28
+ if (startMiddlePage === edgeButtons + 1) {
29
+ endMiddlePage = startMiddlePage + middlePagesCount - 1;
30
+ }
31
+ else if (endMiddlePage === totalPages - edgeButtons) {
32
+ startMiddlePage = endMiddlePage - middlePagesCount + 1;
33
+ }
34
+ // Add leading edge buttons
35
+ for (let i = 1; i <= edgeButtons; i++) {
36
+ pages.push(i);
37
+ }
38
+ if (startMiddlePage > edgeButtons + 1) {
39
+ pages.push(PAGE_DOTS_VALUE);
40
+ }
41
+ // Add middle pages
42
+ for (let i = startMiddlePage; i <= endMiddlePage; i++) {
43
+ pages.push(i);
44
+ }
45
+ // Add trailing edge buttons
46
+ if (endMiddlePage < totalPages - edgeButtons) {
47
+ pages.push(PAGE_DOTS_VALUE);
48
+ }
49
+ for (let i = totalPages - edgeButtons + 1; i <= totalPages; i++) {
50
+ pages.push(i);
51
+ }
52
+ return pages;
53
+ };
54
+ // eslint-disable-next-line complexity
55
+ const Pagination = ({ onPageChange, currentPage, totalPages, }) => {
56
+ if (totalPages <= 1)
57
+ return null;
58
+ const pages = generatePages(currentPage, totalPages);
59
+ return (React.createElement("div", { className: "cobalt-pagination" },
60
+ React.createElement(DefaultButton, { className: cx("cobalt-pagination__DefaultButton"), disabled: currentPage === 1, onClick: () => onPageChange(currentPage - 1), icon: "chevronLeft" }),
61
+ 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 }))),
62
+ React.createElement(DefaultButton, { className: cx("cobalt-pagination__DefaultButton"), disabled: currentPage === totalPages, onClick: () => onPageChange(currentPage + 1), icon: "chevronRight" })));
63
+ };
64
+
65
+ export { Pagination as default };
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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, totalPages: number) => {\n const pages: number[] = []\n const maxVisiblePages = 11 // Always show exactly 11 visible pages (excluding dots)\n const edgeButtons = 3 // 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}: {\n currentPage: number\n totalPages: number\n onPageChange: (page: number) => void\n}) => {\n if (totalPages <= 1) return null\n const pages = generatePages(currentPage, totalPages)\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,CAAC,WAAmB,EAAE,UAAkB,KAAI;IAChE,MAAM,KAAK,GAAa,EAAE,CAAA;AAC1B,IAAA,MAAM,eAAe,GAAG,EAAE,CAAA;AAC1B,IAAA,MAAM,WAAW,GAAG,CAA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,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;;;;"}
@@ -4,6 +4,7 @@ import Modal from '../Modal/index.js';
4
4
  import useBreakpoint from '../../hooks/useBreakpoint.js';
5
5
  import '../Icon/index.js';
6
6
  import ReactDOM from 'react-dom';
7
+ import { Fixed } from '../Layout/Surfaces/index.js';
7
8
  import CloseIcon from '../Icon/__generated__/CloseIcon.js';
8
9
 
9
10
  const SidepanelFooter = ({ children, className }) => {
@@ -26,7 +27,7 @@ SidepanelContent.displayName = "SidepanelContent";
26
27
  // Only for the API, render nothing
27
28
  const SidepanelFooterAPI = (_props) => null;
28
29
  const isSidepanelFooterAPIComponent = (component) => React.isValidElement(component) && component.type === SidepanelFooterAPI;
29
- const _Sidepanel = ({ isOpen, title, close, withDesktopOverlay, children, }) => {
30
+ const _Sidepanel = ({ isOpen, title, close, withDesktopOverlay, width = 420, children, }) => {
30
31
  const { isMobile } = useBreakpoint();
31
32
  // To display box-shadow when visible. We can't rely on isOpen because it triggers the collapse animation and so the box shadow would not be set during the transition
32
33
  const [isPanelVisible, setIsPanelVisible] = useState(false);
@@ -47,9 +48,10 @@ const _Sidepanel = ({ isOpen, title, close, withDesktopOverlay, children, }) =>
47
48
  }), onTransitionEnd: () => {
48
49
  !isOpen && setIsPanelVisible(false);
49
50
  } },
50
- React.createElement(SidepanelContent, { isOpen: isOpen, title: title, close: close },
51
- children,
52
- footer)),
51
+ React.createElement(Fixed, { width: width, isFullHeight: true },
52
+ React.createElement(SidepanelContent, { isOpen: isOpen, title: title, close: close },
53
+ children,
54
+ footer))),
53
55
  withDesktopOverlay && React.createElement("div", { className: "cobalt-sidepanel-overlay" })), document.body));
54
56
  };
55
57
  _Sidepanel.displayName = "Sidepanel";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Sidepanel/index.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\"\nimport cx from \"classnames\"\nimport Modal from \"../Modal\"\nimport useBreakpoint from \"../../hooks/useBreakpoint\"\nimport { CloseIcon } from \"../Icon\"\nimport ReactDOM from \"react-dom\"\n\ntype SidepanelFooterPropsType = React.PropsWithChildren<{\n className?: string\n}>\n\nconst SidepanelFooter = ({ children, className }: SidepanelFooterPropsType) => {\n return (\n <div className={cx(\"c-p-sm c-border-t c-border-base\", className)}>\n {children}\n </div>\n )\n}\n\ntype SidepanelPropsType = React.PropsWithChildren<{\n isOpen: boolean\n title?: string\n close?: () => void\n withDesktopOverlay?: boolean\n}>\n\n// Memoized component to not render content when the panel is collapsing\nfunction _SidepanelContent({ title, close, children }: SidepanelPropsType) {\n return (\n <>\n {title && (\n <div className=\"c-flex c-gap-sm c-items-center c-px-sm c-py-md c-border-b c-border-base\">\n <div className=\"c-text-title-md c-flex-1\">{title}</div>\n {close && (\n <div className=\"c-w-md c-cursor-pointer\" onClick={close}>\n <CloseIcon size={24} />\n </div>\n )}\n </div>\n )}\n {children}\n </>\n )\n}\n\nfunction areSidepanelContentEqual(\n _prevProps: SidepanelPropsType,\n nextProps: SidepanelPropsType\n) {\n return !nextProps.isOpen\n}\n\nconst SidepanelContent = React.memo(_SidepanelContent, areSidepanelContentEqual)\nSidepanelContent.displayName = \"SidepanelContent\"\n\n// Only for the API, render nothing\nconst SidepanelFooterAPI = (_props: SidepanelFooterPropsType) => null\n\nconst isSidepanelFooterAPIComponent = (\n component: React.ReactNode\n): component is React.ReactElement<SidepanelFooterPropsType> =>\n React.isValidElement(component) && component.type === SidepanelFooterAPI\n\nconst _Sidepanel = ({\n isOpen,\n title,\n close,\n withDesktopOverlay,\n children,\n}: SidepanelPropsType) => {\n const { isMobile } = useBreakpoint()\n\n // To display box-shadow when visible. We can't rely on isOpen because it triggers the collapse animation and so the box shadow would not be set during the transition\n const [isPanelVisible, setIsPanelVisible] = useState(false)\n\n useEffect(() => {\n isOpen && setIsPanelVisible(true)\n }, [isOpen])\n\n const sidepanelFooter = React.Children.toArray(children).find((c) =>\n isSidepanelFooterAPIComponent(c)\n )\n\n let footer: React.ReactNode = null\n if (React.isValidElement(sidepanelFooter)) {\n footer = isMobile ? (\n <Modal.Footer {...sidepanelFooter.props}></Modal.Footer>\n ) : (\n <SidepanelFooter {...sidepanelFooter.props} />\n )\n }\n\n return isMobile ? (\n <Modal\n aria-label={\"Sidepanel\"}\n isOpen={isOpen}\n bodySpacing={false}\n close={close}\n title={title}\n >\n {children}\n {footer}\n </Modal>\n ) : (\n ReactDOM.createPortal(\n <>\n <div\n className={cx(\"cobalt-sidepanel\", {\n \"cobalt-sidepanel--show\": isOpen,\n \"cobalt-sidepanel--visible\": isPanelVisible,\n })}\n onTransitionEnd={() => {\n !isOpen && setIsPanelVisible(false)\n }}\n >\n <SidepanelContent isOpen={isOpen} title={title} close={close}>\n {children}\n {footer}\n </SidepanelContent>\n </div>\n {withDesktopOverlay && <div className=\"cobalt-sidepanel-overlay\"></div>}\n </>,\n document.body\n )\n )\n}\n\n_Sidepanel.displayName = \"Sidepanel\"\n\nexport const Sidepanel = Object.assign(_Sidepanel, {\n Footer: SidepanelFooterAPI,\n})\n"],"names":[],"mappings":";;;;;;;;AAWA,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAA4B,KAAI;AAC5E,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,EAAA,EAC7D,QAAQ,CACL,EACP;AACH,CAAC,CAAA;AASD;AACA,SAAS,iBAAiB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAsB,EA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AE,KAAK,EAAA;gBACzD,QAAQ;AACR,gBAAA,MAAM,CACU,CACf;AACL,QAAA,kBAAkB,IAAI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA,CAAO,CACtE,EACH,QAAQ,CAAC,IAAI,CACd,CACF,CAAA;AACH,CAAC,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,WAAW,CAAA;MAEvB,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;AACjD,IAAA,MAAM,EAAE,kBAAkB;AAC3B,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Sidepanel/index.tsx"],"sourcesContent":["import React, { ComponentProps, useEffect, useState } from \"react\"\nimport cx from \"classnames\"\nimport Modal from \"../Modal\"\nimport useBreakpoint from \"../../hooks/useBreakpoint\"\nimport { CloseIcon } from \"../Icon\"\nimport ReactDOM from \"react-dom\"\nimport { Fixed } from \"../Layout/Surfaces\"\n\ntype SidepanelFooterPropsType = React.PropsWithChildren<{\n className?: string\n}>\n\nconst SidepanelFooter = ({ children, className }: SidepanelFooterPropsType) => {\n return (\n <div className={cx(\"c-p-sm c-border-t c-border-base\", className)}>\n {children}\n </div>\n )\n}\n\ntype SidepanelPropsType = React.PropsWithChildren<{\n isOpen: boolean\n title?: string\n close?: () => void\n width?: ComponentProps<typeof Fixed>[\"width\"]\n withDesktopOverlay?: boolean\n}>\n\n// Memoized component to not render content when the panel is collapsing\nfunction _SidepanelContent({ title, close, children }: SidepanelPropsType) {\n return (\n <>\n {title && (\n <div className=\"c-flex c-gap-sm c-items-center c-px-sm c-py-md c-border-b c-border-base\">\n <div className=\"c-text-title-md c-flex-1\">{title}</div>\n {close && (\n <div className=\"c-w-md c-cursor-pointer\" onClick={close}>\n <CloseIcon size={24} />\n </div>\n )}\n </div>\n )}\n {children}\n </>\n )\n}\n\nfunction areSidepanelContentEqual(\n _prevProps: SidepanelPropsType,\n nextProps: SidepanelPropsType\n) {\n return !nextProps.isOpen\n}\n\nconst SidepanelContent = React.memo(_SidepanelContent, areSidepanelContentEqual)\nSidepanelContent.displayName = \"SidepanelContent\"\n\n// Only for the API, render nothing\nconst SidepanelFooterAPI = (_props: SidepanelFooterPropsType) => null\n\nconst isSidepanelFooterAPIComponent = (\n component: React.ReactNode\n): component is React.ReactElement<SidepanelFooterPropsType> =>\n React.isValidElement(component) && component.type === SidepanelFooterAPI\n\nconst _Sidepanel = ({\n isOpen,\n title,\n close,\n withDesktopOverlay,\n width = 420,\n children,\n}: SidepanelPropsType) => {\n const { isMobile } = useBreakpoint()\n\n // To display box-shadow when visible. We can't rely on isOpen because it triggers the collapse animation and so the box shadow would not be set during the transition\n const [isPanelVisible, setIsPanelVisible] = useState(false)\n\n useEffect(() => {\n isOpen && setIsPanelVisible(true)\n }, [isOpen])\n\n const sidepanelFooter = React.Children.toArray(children).find((c) =>\n isSidepanelFooterAPIComponent(c)\n )\n\n let footer: React.ReactNode = null\n if (React.isValidElement(sidepanelFooter)) {\n footer = isMobile ? (\n <Modal.Footer {...sidepanelFooter.props}></Modal.Footer>\n ) : (\n <SidepanelFooter {...sidepanelFooter.props} />\n )\n }\n\n return isMobile ? (\n <Modal\n aria-label={\"Sidepanel\"}\n isOpen={isOpen}\n bodySpacing={false}\n close={close}\n title={title}\n >\n {children}\n {footer}\n </Modal>\n ) : (\n ReactDOM.createPortal(\n <>\n <div\n className={cx(\"cobalt-sidepanel\", {\n \"cobalt-sidepanel--show\": isOpen,\n \"cobalt-sidepanel--visible\": isPanelVisible,\n })}\n onTransitionEnd={() => {\n !isOpen && setIsPanelVisible(false)\n }}\n >\n <Fixed width={width} isFullHeight>\n <SidepanelContent isOpen={isOpen} title={title} close={close}>\n {children}\n {footer}\n </SidepanelContent>\n </Fixed>\n </div>\n {withDesktopOverlay && <div className=\"cobalt-sidepanel-overlay\"></div>}\n </>,\n document.body\n )\n )\n}\n\n_Sidepanel.displayName = \"Sidepanel\"\n\nexport const Sidepanel =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AAA,IAAA;AACE,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE;AAChC,gBAAA,wBAAwB,EAAE,MAAM;AAChC,gBAAA,2BAA2B,EAAE,cAAc;AAC5C,aAAA,CAAC,EACF,eAAe,EAAE,MAAK;AACpB,gBAAA,CAAC,MAAM,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAA;aACpC,EAAA;AAED,YAAA,KAAA,CAAA,aAAA,CAAC,KAAK,EAAC,EAAA,KAAK,EAAE,KAAK,EAAE,YAAY,EAAA,IAAA,EAAA;AAC/B,gBAAA,KAAA,CAAA,aAAA,CAAC,gBAAgB,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAA;oBACzD,QAAQ;oBACR,MAAM,CACU,CACb,CACJ;AACL,QAAA,kBAAkB,IAAI,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,EAAA,CAAO,CACtE,EACH,QAAQ,CAAC,IAAI,CACd,CACF,CAAA;AACH,CAAC,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,WAAW,CAAA;MAEvB,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;AACjD,IAAA,MAAM,EAAE,kBAAkB;AAC3B,CAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ var circledArrowLeft = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12.957 16.543 9.414 13H18v-2H9.414l3.543-3.543-1.414-1.414L5.586 12l5.957 5.957z\"/><path fill-rule=\"evenodd\" d=\"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m2 0a9 9 0 1 1 18 0 9 9 0 0 1-18 0\" clip-rule=\"evenodd\"/></svg>";
2
+
3
+ export { circledArrowLeft as default };
4
+ //# sourceMappingURL=circled-arrow-left.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circled-arrow-left.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.957 16.543 9.414 13H18v-2H9.414l3.543-3.543-1.414-1.414L5.586 12l5.957 5.957z"/><path fill-rule="evenodd" d="M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m2 0a9 9 0 1 1 18 0 9 9 0 0 1-18 0" clip-rule="evenodd"/></svg>