@abgov/react-components 6.4.1 → 6.5.0-alpha.2

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 (85) hide show
  1. package/experimental/form/form.d.ts +1 -2
  2. package/experimental/form/task-list.d.ts +1 -2
  3. package/experimental/form/task.d.ts +1 -2
  4. package/experimental/resizable-panel/ResizablePanel.d.ts +0 -1
  5. package/experimental.js.map +1 -1
  6. package/experimental.mjs.map +1 -1
  7. package/icon-CK55b563.js.map +1 -1
  8. package/icon-CoYGOp1V.mjs.map +1 -1
  9. package/index.d.ts +4 -1
  10. package/index.js +238 -67
  11. package/index.js.map +1 -1
  12. package/index.mjs +239 -68
  13. package/index.mjs.map +1 -1
  14. package/lib/accordion/accordion.d.ts +1 -2
  15. package/lib/app-header/app-header.d.ts +0 -1
  16. package/lib/app-header-menu/app-header-menu.d.ts +1 -2
  17. package/lib/badge/badge.d.ts +1 -2
  18. package/lib/block/block.d.ts +1 -2
  19. package/lib/button/button.d.ts +1 -2
  20. package/lib/button-group/button-group.d.ts +1 -2
  21. package/lib/calendar/calendar.d.ts +1 -2
  22. package/lib/callout/callout.d.ts +0 -1
  23. package/lib/card/card-actions.d.ts +0 -1
  24. package/lib/card/card-content.d.ts +0 -1
  25. package/lib/card/card-group.d.ts +0 -1
  26. package/lib/card/card-image.d.ts +0 -1
  27. package/lib/card/card.d.ts +1 -2
  28. package/lib/checkbox/checkbox.d.ts +1 -2
  29. package/lib/chip/chip.d.ts +0 -1
  30. package/lib/circular-progress/circular-progress.d.ts +0 -1
  31. package/lib/container/container.d.ts +1 -2
  32. package/lib/date-picker/date-picker.d.ts +1 -2
  33. package/lib/details/details.d.ts +1 -2
  34. package/lib/divider/divider.d.ts +0 -1
  35. package/lib/drawer/drawer.d.ts +1 -2
  36. package/lib/dropdown/dropdown-item.d.ts +0 -1
  37. package/lib/dropdown/dropdown.d.ts +1 -2
  38. package/lib/file-upload-card/file-upload-card.d.ts +0 -1
  39. package/lib/file-upload-input/file-upload-input.d.ts +0 -1
  40. package/lib/filter-chip/filter-chip.d.ts +0 -1
  41. package/lib/footer/footer.d.ts +0 -1
  42. package/lib/footer-meta-section/footer-meta-section.d.ts +0 -1
  43. package/lib/footer-nav-section/footer-nav-section.d.ts +0 -1
  44. package/lib/form/fieldset.d.ts +25 -0
  45. package/lib/form/public-form-page.d.ts +59 -0
  46. package/lib/form/public-form-summary.d.ts +17 -0
  47. package/lib/form/public-form.d.ts +24 -0
  48. package/lib/form-item/form-item.d.ts +12 -3
  49. package/lib/form-step/form-step.d.ts +0 -1
  50. package/lib/form-stepper/form-stepper.d.ts +1 -2
  51. package/lib/grid/grid.d.ts +1 -2
  52. package/lib/hero-banner/hero-banner-actions.d.ts +0 -1
  53. package/lib/hero-banner/hero-banner.d.ts +0 -1
  54. package/lib/icon/icon.d.ts +1 -2
  55. package/lib/icon-button/icon-button.d.ts +1 -2
  56. package/lib/input/input.d.ts +4 -5
  57. package/lib/link/link.d.ts +1 -2
  58. package/lib/link-button/link-button.d.ts +1 -2
  59. package/lib/microsite-header/microsite-header.d.ts +1 -2
  60. package/lib/modal/modal.d.ts +1 -2
  61. package/lib/notification/notification.d.ts +0 -1
  62. package/lib/one-column-layout/one-column-layout.d.ts +0 -1
  63. package/lib/page-block/page-block.d.ts +0 -1
  64. package/lib/pages/pages.d.ts +1 -2
  65. package/lib/pagination/pagination.d.ts +0 -1
  66. package/lib/popover/popover.d.ts +1 -2
  67. package/lib/radio-group/radio-group.d.ts +5 -4
  68. package/lib/radio-group/radio.d.ts +1 -2
  69. package/lib/side-menu/side-menu.d.ts +0 -1
  70. package/lib/side-menu-group/side-menu-group.d.ts +1 -2
  71. package/lib/side-menu-heading/side-menu-heading.d.ts +1 -2
  72. package/lib/skeleton/skeleton.d.ts +0 -1
  73. package/lib/spacer/spacer.d.ts +0 -1
  74. package/lib/spinner/spinner.d.ts +1 -2
  75. package/lib/tab/tab.d.ts +0 -1
  76. package/lib/table/table-sort-header.d.ts +1 -2
  77. package/lib/table/table.d.ts +1 -2
  78. package/lib/tabs/tabs.d.ts +1 -2
  79. package/lib/text/text.d.ts +1 -2
  80. package/lib/textarea/textarea.d.ts +2 -3
  81. package/lib/three-column-layout/three-column-layout.d.ts +0 -1
  82. package/lib/tooltip/tooltip.d.ts +1 -2
  83. package/lib/two-column-layout/two-column-layout.d.ts +0 -1
  84. package/package.json +1 -1
  85. package/lib/fieldset/fieldset.d.ts +0 -30
@@ -1,6 +1,5 @@
1
- import { Margins, GoabFormStorageType, GoabFormOnMountDetail, GoabFormOnStateChange } from '@abgov/ui-components-common';
2
1
  import { ReactNode } from 'react';
3
-
2
+ import { Margins, GoabFormStorageType, GoabFormOnMountDetail, GoabFormOnStateChange } from '@abgov/ui-components-common';
4
3
  interface WCProps extends Margins {
5
4
  ref?: React.RefObject<HTMLElement | null>;
6
5
  name: string;
@@ -1,6 +1,5 @@
1
- import { Margins } from '@abgov/ui-components-common';
2
1
  import { ReactNode } from 'react';
3
-
2
+ import { Margins } from '@abgov/ui-components-common';
4
3
  interface WCProps extends Margins {
5
4
  heading: string;
6
5
  }
@@ -1,6 +1,5 @@
1
- import { Margins } from '@abgov/ui-components-common';
2
1
  import { ReactNode } from 'react';
3
-
2
+ import { Margins } from '@abgov/ui-components-common';
4
3
  interface WCProps extends Margins {
5
4
  status: "completed" | "not-started" | "cannot-start";
6
5
  }
@@ -1,5 +1,4 @@
1
1
  import { ReactNode, JSX } from 'react';
2
-
3
2
  export type ResizableProps = {
4
3
  minWidth?: number;
5
4
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","sources":["../../../libs/react-components/src/experimental/resizable-panel/ResizablePanel.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, useState, type JSX } from \"react\";\nimport Css from \"./ResizablePanel.module.css\";\nimport { GoabIcon } from \"../../lib/icon/icon\";\n\nexport type ResizableProps = {\n minWidth?: number;\n children: ReactNode;\n};\n\ntype MouseState = \"static\" | \"active\";\n\nexport function ResizablePanel(props: ResizableProps): JSX.Element {\n // element refs\n const bgRef = useRef<HTMLDivElement | null>(null);\n const sectionRef = useRef<HTMLElement | null>(null);\n const widthRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useRef<HTMLDivElement | null>(null);\n\n // value refs\n const maxWidth = useRef<number>(0);\n const resizeBarState = useRef<MouseState>(\"static\");\n\n // state\n const [width, setWidth] = useState<string>();\n\n useEffect(() => {\n maxWidth.current = bgRef.current?.getBoundingClientRect().width ?? 0;\n }, []);\n\n function resetMouseState() {\n resizeBarState.current = \"static\";\n }\n\n function onMouseDown(_: React.MouseEvent) {\n resizeBarState.current = \"active\";\n window.addEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseUp(_: React.MouseEvent) {\n resizeBarState.current = \"static\";\n window.removeEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseMove(e: React.MouseEvent) {\n if (resizeBarState.current === \"static\") {\n return;\n }\n\n const sectionEl = sectionRef.current;\n const xOffset = sectionEl?.getBoundingClientRect().x || 0;\n const mouseX = e.clientX;\n const minWidth = props.minWidth || 0;\n\n if (mouseX <= 0) {\n return;\n }\n\n // mouse direction\n const newXPos = handleRef.current?.getBoundingClientRect().x ?? 0;\n\n // set width of preview area\n const calcWidth = Math.max(\n newXPos - xOffset,\n Math.min(mouseX - xOffset, maxWidth.current),\n );\n const elementWidth = Math.max(minWidth, calcWidth - 64); // 4rem padding\n\n // prevent dragging bar more than allowed\n if (elementWidth <= minWidth) {\n return;\n }\n\n // set resizable area width\n sectionEl?.setAttribute(\"style\", `width: ${calcWidth}px;`);\n // set displayed px width\n widthRef.current?.setAttribute(\n \"style\",\n `right: ${maxWidth.current - calcWidth + 32}px`,\n );\n setWidth(`${Math.round(elementWidth)}px`);\n }\n\n return (\n <div\n ref={bgRef}\n className={Css.panelBackground}\n onMouseDown={onMouseDown}\n onMouseMove={onMouseMove}\n onMouseUp={onMouseUp}\n >\n <section ref={sectionRef} className={Css.panel}>\n <div className={Css.children}>{props.children}</div>\n <div ref={handleRef} className={Css.handle}>\n <GoabIcon type=\"reorder-two\" />\n </div>\n </section>\n <div ref={widthRef} className={Css.width}>\n {width}\n </div>\n </div>\n );\n}\n\nexport default ResizablePanel;\n"],"names":["useRef","width","useState","useEffect","jsxs","jsx","GoabIcon"],"mappings":";;;;;;;;;;;;;;;;;AAWO,SAAS,eAAe,OAAoC;AAE3D,QAAA,QAAQA,aAA8B,IAAI;AAC1C,QAAA,aAAaA,aAA2B,IAAI;AAC5C,QAAA,WAAWA,aAA8B,IAAI;AAC7C,QAAA,YAAYA,aAA8B,IAAI;AAG9C,QAAA,WAAWA,aAAe,CAAC;AAC3B,QAAA,iBAAiBA,aAAmB,QAAQ;AAGlD,QAAM,CAACC,QAAO,QAAQ,IAAIC,MAAiB,SAAA;AAE3CC,QAAAA,UAAU,MAAM;;AACd,aAAS,YAAU,WAAM,YAAN,mBAAe,wBAAwB,UAAS;AAAA,EACrE,GAAG,CAAE,CAAA;AAEL,WAAS,kBAAkB;AACzB,mBAAe,UAAU;AAAA,EAC3B;AAEA,WAAS,YAAY,GAAqB;AACxC,mBAAe,UAAU;AAClB,WAAA,iBAAiB,WAAW,eAAe;AAAA,EACpD;AAEA,WAAS,UAAU,GAAqB;AACtC,mBAAe,UAAU;AAClB,WAAA,oBAAoB,WAAW,eAAe;AAAA,EACvD;AAEA,WAAS,YAAY,GAAqB;;AACpC,QAAA,eAAe,YAAY,UAAU;AACvC;AAAA,IACF;AAEA,UAAM,YAAY,WAAW;AAC7B,UAAM,WAAU,uCAAW,wBAAwB,MAAK;AACxD,UAAM,SAAS,EAAE;AACX,UAAA,WAAW,MAAM,YAAY;AAEnC,QAAI,UAAU,GAAG;AACf;AAAA,IACF;AAGA,UAAM,YAAU,eAAU,YAAV,mBAAmB,wBAAwB,MAAK;AAGhE,UAAM,YAAY,KAAK;AAAA,MACrB,UAAU;AAAA,MACV,KAAK,IAAI,SAAS,SAAS,SAAS,OAAO;AAAA,IAAA;AAE7C,UAAM,eAAe,KAAK,IAAI,UAAU,YAAY,EAAE;AAGtD,QAAI,gBAAgB,UAAU;AAC5B;AAAA,IACF;AAGA,2CAAW,aAAa,SAAS,UAAU,SAAS;AAEpD,mBAAS,YAAT,mBAAkB;AAAA,MAChB;AAAA,MACA,UAAU,SAAS,UAAU,YAAY,EAAE;AAAA;AAE7C,aAAS,GAAG,KAAK,MAAM,YAAY,CAAC,IAAI;AAAA,EAC1C;AAGE,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,IAAI;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAAA,gCAAC,WAAQ,EAAA,KAAK,YAAY,WAAW,IAAI,OACvC,UAAA;AAAA,UAAAC,+BAAC,OAAI,EAAA,WAAW,IAAI,UAAW,gBAAM,UAAS;AAAA,UAC9CA,2BAAA,IAAC,OAAI,EAAA,KAAK,WAAW,WAAW,IAAI,QAClC,UAACA,2BAAAA,IAAAC,KAAAA,UAAA,EAAS,MAAK,cAAA,CAAc,EAC/B,CAAA;AAAA,QAAA,GACF;AAAA,uCACC,OAAI,EAAA,KAAK,UAAU,WAAW,IAAI,OAChC,UACHL,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;;"}
1
+ {"version":3,"file":"experimental.js","sources":["../../../libs/react-components/src/experimental/resizable-panel/ResizablePanel.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, useState, type JSX } from \"react\";\nimport Css from \"./ResizablePanel.module.css\";\nimport { GoabIcon } from \"../../lib/icon/icon\";\n\nexport type ResizableProps = {\n minWidth?: number;\n children: ReactNode;\n};\n\ntype MouseState = \"static\" | \"active\";\n\nexport function ResizablePanel(props: ResizableProps): JSX.Element {\n // element refs\n const bgRef = useRef<HTMLDivElement | null>(null);\n const sectionRef = useRef<HTMLElement | null>(null);\n const widthRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useRef<HTMLDivElement | null>(null);\n\n // value refs\n const maxWidth = useRef<number>(0);\n const resizeBarState = useRef<MouseState>(\"static\");\n\n // state\n const [width, setWidth] = useState<string>();\n\n useEffect(() => {\n maxWidth.current = bgRef.current?.getBoundingClientRect().width ?? 0;\n }, []);\n\n function resetMouseState() {\n resizeBarState.current = \"static\";\n }\n\n function onMouseDown(_: React.MouseEvent) {\n resizeBarState.current = \"active\";\n window.addEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseUp(_: React.MouseEvent) {\n resizeBarState.current = \"static\";\n window.removeEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseMove(e: React.MouseEvent) {\n if (resizeBarState.current === \"static\") {\n return;\n }\n\n const sectionEl = sectionRef.current;\n const xOffset = sectionEl?.getBoundingClientRect().x || 0;\n const mouseX = e.clientX;\n const minWidth = props.minWidth || 0;\n\n if (mouseX <= 0) {\n return;\n }\n\n // mouse direction\n const newXPos = handleRef.current?.getBoundingClientRect().x ?? 0;\n\n // set width of preview area\n const calcWidth = Math.max(\n newXPos - xOffset,\n Math.min(mouseX - xOffset, maxWidth.current),\n );\n const elementWidth = Math.max(minWidth, calcWidth - 64); // 4rem padding\n\n // prevent dragging bar more than allowed\n if (elementWidth <= minWidth) {\n return;\n }\n\n // set resizable area width\n sectionEl?.setAttribute(\"style\", `width: ${calcWidth}px;`);\n // set displayed px width\n widthRef.current?.setAttribute(\n \"style\",\n `right: ${maxWidth.current - calcWidth + 32}px`,\n );\n setWidth(`${Math.round(elementWidth)}px`);\n }\n\n return (\n <div\n ref={bgRef}\n className={Css.panelBackground}\n onMouseDown={onMouseDown}\n onMouseMove={onMouseMove}\n onMouseUp={onMouseUp}\n >\n <section ref={sectionRef} className={Css.panel}>\n <div className={Css.children}>{props.children}</div>\n <div ref={handleRef} className={Css.handle}>\n <GoabIcon type=\"reorder-two\" />\n </div>\n </section>\n <div ref={widthRef} className={Css.width}>\n {width}\n </div>\n </div>\n );\n}\n\nexport default ResizablePanel;\n"],"names":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AA,MAChB;AAAA,MACA,UAAU,SAAS,UAAU,YAAY,EAAE;AAAA;AAE7C,aAAS,GAAG,KAAK,MAAM,YAAY,CAAC,IAAI;AAAA,EAAA;AAIxC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,IAAI;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAAA,gCAAC,WAAQ,EAAA,KAAK,YAAY,WAAW,IAAI,OACvC,UAAA;AAAA,UAAAC,+BAAC,OAAI,EAAA,WAAW,IAAI,UAAW,gBAAM,UAAS;AAAA,UAC9CA,2BAAAA,IAAC,OAAI,EAAA,KAAK,WAAW,WAAW,IAAI,QAClC,UAACA,2BAAA,IAAAC,KAAA,UAAA,EAAS,MAAK,cAAc,CAAA,EAC/B,CAAA;AAAA,QAAA,GACF;AAAA,uCACC,OAAI,EAAA,KAAK,UAAU,WAAW,IAAI,OAChC,UACHL,OAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.mjs","sources":["../../../libs/react-components/src/experimental/resizable-panel/ResizablePanel.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, useState, type JSX } from \"react\";\nimport Css from \"./ResizablePanel.module.css\";\nimport { GoabIcon } from \"../../lib/icon/icon\";\n\nexport type ResizableProps = {\n minWidth?: number;\n children: ReactNode;\n};\n\ntype MouseState = \"static\" | \"active\";\n\nexport function ResizablePanel(props: ResizableProps): JSX.Element {\n // element refs\n const bgRef = useRef<HTMLDivElement | null>(null);\n const sectionRef = useRef<HTMLElement | null>(null);\n const widthRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useRef<HTMLDivElement | null>(null);\n\n // value refs\n const maxWidth = useRef<number>(0);\n const resizeBarState = useRef<MouseState>(\"static\");\n\n // state\n const [width, setWidth] = useState<string>();\n\n useEffect(() => {\n maxWidth.current = bgRef.current?.getBoundingClientRect().width ?? 0;\n }, []);\n\n function resetMouseState() {\n resizeBarState.current = \"static\";\n }\n\n function onMouseDown(_: React.MouseEvent) {\n resizeBarState.current = \"active\";\n window.addEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseUp(_: React.MouseEvent) {\n resizeBarState.current = \"static\";\n window.removeEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseMove(e: React.MouseEvent) {\n if (resizeBarState.current === \"static\") {\n return;\n }\n\n const sectionEl = sectionRef.current;\n const xOffset = sectionEl?.getBoundingClientRect().x || 0;\n const mouseX = e.clientX;\n const minWidth = props.minWidth || 0;\n\n if (mouseX <= 0) {\n return;\n }\n\n // mouse direction\n const newXPos = handleRef.current?.getBoundingClientRect().x ?? 0;\n\n // set width of preview area\n const calcWidth = Math.max(\n newXPos - xOffset,\n Math.min(mouseX - xOffset, maxWidth.current),\n );\n const elementWidth = Math.max(minWidth, calcWidth - 64); // 4rem padding\n\n // prevent dragging bar more than allowed\n if (elementWidth <= minWidth) {\n return;\n }\n\n // set resizable area width\n sectionEl?.setAttribute(\"style\", `width: ${calcWidth}px;`);\n // set displayed px width\n widthRef.current?.setAttribute(\n \"style\",\n `right: ${maxWidth.current - calcWidth + 32}px`,\n );\n setWidth(`${Math.round(elementWidth)}px`);\n }\n\n return (\n <div\n ref={bgRef}\n className={Css.panelBackground}\n onMouseDown={onMouseDown}\n onMouseMove={onMouseMove}\n onMouseUp={onMouseUp}\n >\n <section ref={sectionRef} className={Css.panel}>\n <div className={Css.children}>{props.children}</div>\n <div ref={handleRef} className={Css.handle}>\n <GoabIcon type=\"reorder-two\" />\n </div>\n </section>\n <div ref={widthRef} className={Css.width}>\n {width}\n </div>\n </div>\n );\n}\n\nexport default ResizablePanel;\n"],"names":["width"],"mappings":";;;;;;;;;;;;;;;;AAWO,SAAS,eAAe,OAAoC;AAE3D,QAAA,QAAQ,OAA8B,IAAI;AAC1C,QAAA,aAAa,OAA2B,IAAI;AAC5C,QAAA,WAAW,OAA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;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAA,qBAAC,WAAQ,EAAA,KAAK,YAAY,WAAW,IAAI,OACvC,UAAA;AAAA,UAAA,oBAAC,OAAI,EAAA,WAAW,IAAI,UAAW,gBAAM,UAAS;AAAA,UAC9C,oBAAC,OAAI,EAAA,KAAK,WAAW,WAAW,IAAI,QAClC,UAAC,oBAAA,UAAA,EAAS,MAAK,cAAA,CAAc,EAC/B,CAAA;AAAA,QAAA,GACF;AAAA,4BACC,OAAI,EAAA,KAAK,UAAU,WAAW,IAAI,OAChC,UACHA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"experimental.mjs","sources":["../../../libs/react-components/src/experimental/resizable-panel/ResizablePanel.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, useState, type JSX } from \"react\";\nimport Css from \"./ResizablePanel.module.css\";\nimport { GoabIcon } from \"../../lib/icon/icon\";\n\nexport type ResizableProps = {\n minWidth?: number;\n children: ReactNode;\n};\n\ntype MouseState = \"static\" | \"active\";\n\nexport function ResizablePanel(props: ResizableProps): JSX.Element {\n // element refs\n const bgRef = useRef<HTMLDivElement | null>(null);\n const sectionRef = useRef<HTMLElement | null>(null);\n const widthRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useRef<HTMLDivElement | null>(null);\n\n // value refs\n const maxWidth = useRef<number>(0);\n const resizeBarState = useRef<MouseState>(\"static\");\n\n // state\n const [width, setWidth] = useState<string>();\n\n useEffect(() => {\n maxWidth.current = bgRef.current?.getBoundingClientRect().width ?? 0;\n }, []);\n\n function resetMouseState() {\n resizeBarState.current = \"static\";\n }\n\n function onMouseDown(_: React.MouseEvent) {\n resizeBarState.current = \"active\";\n window.addEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseUp(_: React.MouseEvent) {\n resizeBarState.current = \"static\";\n window.removeEventListener(\"mouseup\", resetMouseState);\n }\n\n function onMouseMove(e: React.MouseEvent) {\n if (resizeBarState.current === \"static\") {\n return;\n }\n\n const sectionEl = sectionRef.current;\n const xOffset = sectionEl?.getBoundingClientRect().x || 0;\n const mouseX = e.clientX;\n const minWidth = props.minWidth || 0;\n\n if (mouseX <= 0) {\n return;\n }\n\n // mouse direction\n const newXPos = handleRef.current?.getBoundingClientRect().x ?? 0;\n\n // set width of preview area\n const calcWidth = Math.max(\n newXPos - xOffset,\n Math.min(mouseX - xOffset, maxWidth.current),\n );\n const elementWidth = Math.max(minWidth, calcWidth - 64); // 4rem padding\n\n // prevent dragging bar more than allowed\n if (elementWidth <= minWidth) {\n return;\n }\n\n // set resizable area width\n sectionEl?.setAttribute(\"style\", `width: ${calcWidth}px;`);\n // set displayed px width\n widthRef.current?.setAttribute(\n \"style\",\n `right: ${maxWidth.current - calcWidth + 32}px`,\n );\n setWidth(`${Math.round(elementWidth)}px`);\n }\n\n return (\n <div\n ref={bgRef}\n className={Css.panelBackground}\n onMouseDown={onMouseDown}\n onMouseMove={onMouseMove}\n onMouseUp={onMouseUp}\n >\n <section ref={sectionRef} className={Css.panel}>\n <div className={Css.children}>{props.children}</div>\n <div ref={handleRef} className={Css.handle}>\n <GoabIcon type=\"reorder-two\" />\n </div>\n </section>\n <div ref={widthRef} className={Css.width}>\n {width}\n </div>\n </div>\n );\n}\n\nexport default ResizablePanel;\n"],"names":["width"],"mappings":";;;;;;;;;;;;;;;;AAWO,SAAS,eAAe,OAAoC;AAE3D,QAAA,QAAQ,OAA8B,IAAI;AAC1C,QAAA,aAAa,OAA2B,IAAI;AAC5C,QAAA,WAAW,OAA8B,IAAI;AAC7C,QAAA,YAAY,OAA8B,IAAI;AAG9C,QAAA,WAAW,OAAe,CAAC;AAC3B,QAAA,iBAAiB,OAAmB,QAAQ;AAGlD,QAAM,CAACA,QAAO,QAAQ,IAAI,SAAiB;AAE3C,YAAU,MAAM;;AACd,aAAS,YAAU,WAAM,YAAN,mBAAe,wBAAwB,UAAS;AAAA,EACrE,GAAG,EAA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C,oBAAA,UAAA,EAAS,MAAK,cAAc,CAAA,EAC/B,CAAA;AAAA,QAAA,GACF;AAAA,4BACC,OAAI,EAAA,KAAK,UAAU,WAAW,IAAI,OAChC,UACHA,OAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-CK55b563.js","sources":["../../../libs/react-components/src/lib/drawer/drawer.tsx","../../../libs/react-components/src/lib/icon/icon.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, type JSX } from \"react\";\nimport { GoabDrawerPosition, GoabDrawerSize } from \"@abgov/ui-components-common\";\n\ninterface WCProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string;\n maxsize?: GoabDrawerSize;\n testid?: string;\n ref: React.RefObject<HTMLElement | null>;\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-drawer\": WCProps & React.HTMLAttributes<HTMLElement>;\n }\n }\n}\n\nexport interface GoabDrawerProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string | ReactNode;\n maxSize?: GoabDrawerSize;\n testId?: string;\n actions?: ReactNode;\n children: ReactNode;\n onClose: () => void;\n}\n\nexport function GoabDrawer({\n position,\n open,\n heading,\n maxSize,\n testId,\n actions,\n children,\n onClose,\n}: GoabDrawerProps): JSX.Element {\n const el = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (!el?.current || !onClose) {\n return;\n }\n el.current?.addEventListener(\"_close\", onClose);\n return () => {\n el.current?.removeEventListener(\"_close\", onClose);\n };\n }, [el, onClose]);\n\n return (\n <goa-drawer\n ref={el}\n position={position}\n open={open ? true : undefined}\n heading={typeof heading === \"string\" ? heading : undefined}\n maxsize={maxSize}\n testid={testId}\n >\n {heading && typeof heading !== \"string\" && <div slot=\"heading\">{heading}</div>}\n {actions && <div slot=\"actions\">{actions}</div>}\n {children}\n </goa-drawer>\n );\n}\n\nexport default GoabDrawer;\n","import {\n GoabIconFilledType,\n GoabIconSize,\n GoabIconTheme,\n GoabIconType,\n Margins,\n} from \"@abgov/ui-components-common\";\n\nimport type { JSX } from \"react\";\n\ninterface IonIconProps {\n name: GoabIconType | GoabIconFilledType;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface IonIconElement extends HTMLElement {}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"ion-icon\": IonIconProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-icon\": WCProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\nexport interface GoabIconProps extends Margins {\n type: GoabIconType;\n size?: GoabIconSize;\n theme?: GoabIconTheme;\n inverted?: string | boolean; // TODO: Change type to only boolean\n fillColor?: string;\n opacity?: number;\n title?: string;\n ariaLabel?: string;\n testId?: string;\n}\n\ninterface WCProps extends Margins {\n type: GoabIconType;\n theme?: GoabIconTheme;\n size?: GoabIconSize;\n inverted?: string;\n fillcolor?: string;\n opacity?: number;\n title?: string;\n arialabel?: string;\n testid?: string;\n}\n\nexport function GoabIcon({\n type,\n theme,\n size,\n inverted, // TODO: change to boolean only\n fillColor,\n opacity,\n title,\n ariaLabel,\n mt,\n mr,\n mb,\n ml,\n testId,\n}: GoabIconProps): JSX.Element {\n return (\n <goa-icon\n type={type}\n theme={theme}\n size={size}\n inverted={\n typeof inverted === \"boolean\" ? (inverted ? \"true\" : undefined) : inverted\n }\n fillcolor={fillColor}\n opacity={opacity}\n title={title}\n arialabel={ariaLabel}\n mt={mt}\n mr={mr}\n mb={mb}\n ml={ml}\n testid={testId}\n />\n );\n}\n"],"names":["useRef","useEffect","_a","jsxs","jsx"],"mappings":";;;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;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"icon-CK55b563.js","sources":["../../../libs/react-components/src/lib/drawer/drawer.tsx","../../../libs/react-components/src/lib/icon/icon.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, type JSX } from \"react\";\nimport { GoabDrawerPosition, GoabDrawerSize } from \"@abgov/ui-components-common\";\n\ninterface WCProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string;\n maxsize?: GoabDrawerSize;\n testid?: string;\n ref: React.RefObject<HTMLElement | null>;\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-drawer\": WCProps & React.HTMLAttributes<HTMLElement>;\n }\n }\n}\n\nexport interface GoabDrawerProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string | ReactNode;\n maxSize?: GoabDrawerSize;\n testId?: string;\n actions?: ReactNode;\n children: ReactNode;\n onClose: () => void;\n}\n\nexport function GoabDrawer({\n position,\n open,\n heading,\n maxSize,\n testId,\n actions,\n children,\n onClose,\n}: GoabDrawerProps): JSX.Element {\n const el = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (!el?.current || !onClose) {\n return;\n }\n el.current?.addEventListener(\"_close\", onClose);\n return () => {\n el.current?.removeEventListener(\"_close\", onClose);\n };\n }, [el, onClose]);\n\n return (\n <goa-drawer\n ref={el}\n position={position}\n open={open ? true : undefined}\n heading={typeof heading === \"string\" ? heading : undefined}\n maxsize={maxSize}\n testid={testId}\n >\n {heading && typeof heading !== \"string\" && <div slot=\"heading\">{heading}</div>}\n {actions && <div slot=\"actions\">{actions}</div>}\n {children}\n </goa-drawer>\n );\n}\n\nexport default GoabDrawer;\n","import {\n GoabIconFilledType,\n GoabIconSize,\n GoabIconTheme,\n GoabIconType,\n Margins,\n} from \"@abgov/ui-components-common\";\n\nimport type { JSX } from \"react\";\n\ninterface IonIconProps {\n name: GoabIconType | GoabIconFilledType;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface IonIconElement extends HTMLElement {}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"ion-icon\": IonIconProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-icon\": WCProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\nexport interface GoabIconProps extends Margins {\n type: GoabIconType;\n size?: GoabIconSize;\n theme?: GoabIconTheme;\n inverted?: string | boolean; // TODO: Change type to only boolean\n fillColor?: string;\n opacity?: number;\n title?: string;\n ariaLabel?: string;\n testId?: string;\n}\n\ninterface WCProps extends Margins {\n type: GoabIconType;\n theme?: GoabIconTheme;\n size?: GoabIconSize;\n inverted?: string;\n fillcolor?: string;\n opacity?: number;\n title?: string;\n arialabel?: string;\n testid?: string;\n}\n\nexport function GoabIcon({\n type,\n theme,\n size,\n inverted, // TODO: change to boolean only\n fillColor,\n opacity,\n title,\n ariaLabel,\n mt,\n mr,\n mb,\n ml,\n testId,\n}: GoabIconProps): JSX.Element {\n return (\n <goa-icon\n type={type}\n theme={theme}\n size={size}\n inverted={\n typeof inverted === \"boolean\" ? (inverted ? \"true\" : undefined) : inverted\n }\n fillcolor={fillColor}\n opacity={opacity}\n title={title}\n arialabel={ariaLabel}\n mt={mt}\n mr={mr}\n mb={mb}\n ml={ml}\n testid={testId}\n />\n );\n}\n"],"names":["useRef","useEffect","_a","jsxs","jsx"],"mappings":";;;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiC;AACzB,QAAA,KAAKA,aAAoB,IAAI;AAEnCC,QAAAA,UAAU,MAAM;;AACd,QAAI,EAAC,yBAAI,YAAW,CAAC,SAAS;AAC5B;AAAA,IAAA;AAEC,aAAA,YAAA,mBAAS,iBAAiB,UAAU;AACvC,WAAO,MAAM;;AACR,OAAAC,MAAA,GAAA,YAAA,gBAAAA,IAAS,oBAAoB,UAAU;AAAA,IAC5C;AAAA,EAAA,GACC,CAAC,IAAI,OAAO,CAAC;AAGd,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,MAAM,OAAO,OAAO;AAAA,MACpB,SAAS,OAAO,YAAY,WAAW,UAAU;AAAA,MACjD,SAAS;AAAA,MACT,QAAQ;AAAA,MAEP,UAAA;AAAA,QAAA,WAAW,OAAO,YAAY,2CAAa,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACvE,WAAWC,2BAAA,IAAC,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACxC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;ACTO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+B;AAE3B,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UACE,OAAO,aAAa,YAAa,WAAW,SAAS,SAAa;AAAA,MAEpE,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IAAA;AAAA,EACV;AAEJ;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-CoYGOp1V.mjs","sources":["../../../libs/react-components/src/lib/drawer/drawer.tsx","../../../libs/react-components/src/lib/icon/icon.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, type JSX } from \"react\";\nimport { GoabDrawerPosition, GoabDrawerSize } from \"@abgov/ui-components-common\";\n\ninterface WCProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string;\n maxsize?: GoabDrawerSize;\n testid?: string;\n ref: React.RefObject<HTMLElement | null>;\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-drawer\": WCProps & React.HTMLAttributes<HTMLElement>;\n }\n }\n}\n\nexport interface GoabDrawerProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string | ReactNode;\n maxSize?: GoabDrawerSize;\n testId?: string;\n actions?: ReactNode;\n children: ReactNode;\n onClose: () => void;\n}\n\nexport function GoabDrawer({\n position,\n open,\n heading,\n maxSize,\n testId,\n actions,\n children,\n onClose,\n}: GoabDrawerProps): JSX.Element {\n const el = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (!el?.current || !onClose) {\n return;\n }\n el.current?.addEventListener(\"_close\", onClose);\n return () => {\n el.current?.removeEventListener(\"_close\", onClose);\n };\n }, [el, onClose]);\n\n return (\n <goa-drawer\n ref={el}\n position={position}\n open={open ? true : undefined}\n heading={typeof heading === \"string\" ? heading : undefined}\n maxsize={maxSize}\n testid={testId}\n >\n {heading && typeof heading !== \"string\" && <div slot=\"heading\">{heading}</div>}\n {actions && <div slot=\"actions\">{actions}</div>}\n {children}\n </goa-drawer>\n );\n}\n\nexport default GoabDrawer;\n","import {\n GoabIconFilledType,\n GoabIconSize,\n GoabIconTheme,\n GoabIconType,\n Margins,\n} from \"@abgov/ui-components-common\";\n\nimport type { JSX } from \"react\";\n\ninterface IonIconProps {\n name: GoabIconType | GoabIconFilledType;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface IonIconElement extends HTMLElement {}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"ion-icon\": IonIconProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-icon\": WCProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\nexport interface GoabIconProps extends Margins {\n type: GoabIconType;\n size?: GoabIconSize;\n theme?: GoabIconTheme;\n inverted?: string | boolean; // TODO: Change type to only boolean\n fillColor?: string;\n opacity?: number;\n title?: string;\n ariaLabel?: string;\n testId?: string;\n}\n\ninterface WCProps extends Margins {\n type: GoabIconType;\n theme?: GoabIconTheme;\n size?: GoabIconSize;\n inverted?: string;\n fillcolor?: string;\n opacity?: number;\n title?: string;\n arialabel?: string;\n testid?: string;\n}\n\nexport function GoabIcon({\n type,\n theme,\n size,\n inverted, // TODO: change to boolean only\n fillColor,\n opacity,\n title,\n ariaLabel,\n mt,\n mr,\n mb,\n ml,\n testId,\n}: GoabIconProps): JSX.Element {\n return (\n <goa-icon\n type={type}\n theme={theme}\n size={size}\n inverted={\n typeof inverted === \"boolean\" ? (inverted ? \"true\" : undefined) : inverted\n }\n fillcolor={fillColor}\n opacity={opacity}\n title={title}\n arialabel={ariaLabel}\n mt={mt}\n mr={mr}\n mb={mb}\n ml={ml}\n testid={testId}\n />\n );\n}\n"],"names":["_a"],"mappings":";;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiC;AACzB,QAAA,KAAK,OAAoB,IAAI;AAEnC,YAAU,MAAM;;AACd,QAAI,EAAC,yBAAI,YAAW,CAAC,SAAS;AAC5B;AAAA,IACF;AACG,aAAA,YAAA,mBAAS,iBAAiB,UAAU;AACvC,WAAO,MAAM;;AACR,OAAAA,MAAA,GAAA,YAAA,gBAAAA,IAAS,oBAAoB,UAAU;AAAA,IAAO;AAAA,EACnD,GACC,CAAC,IAAI,OAAO,CAAC;AAGd,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,MAAM,OAAO,OAAO;AAAA,MACpB,SAAS,OAAO,YAAY,WAAW,UAAU;AAAA,MACjD,SAAS;AAAA,MACT,QAAQ;AAAA,MAEP,UAAA;AAAA,QAAA,WAAW,OAAO,YAAY,gCAAa,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACvE,WAAW,oBAAC,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACxC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;ACTO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+B;AAE3B,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UACE,OAAO,aAAa,YAAa,WAAW,SAAS,SAAa;AAAA,MAEpE,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IAAA;AAAA,EAAA;AAGd;"}
1
+ {"version":3,"file":"icon-CoYGOp1V.mjs","sources":["../../../libs/react-components/src/lib/drawer/drawer.tsx","../../../libs/react-components/src/lib/icon/icon.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, type JSX } from \"react\";\nimport { GoabDrawerPosition, GoabDrawerSize } from \"@abgov/ui-components-common\";\n\ninterface WCProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string;\n maxsize?: GoabDrawerSize;\n testid?: string;\n ref: React.RefObject<HTMLElement | null>;\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-drawer\": WCProps & React.HTMLAttributes<HTMLElement>;\n }\n }\n}\n\nexport interface GoabDrawerProps {\n position: GoabDrawerPosition;\n open?: boolean;\n heading?: string | ReactNode;\n maxSize?: GoabDrawerSize;\n testId?: string;\n actions?: ReactNode;\n children: ReactNode;\n onClose: () => void;\n}\n\nexport function GoabDrawer({\n position,\n open,\n heading,\n maxSize,\n testId,\n actions,\n children,\n onClose,\n}: GoabDrawerProps): JSX.Element {\n const el = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (!el?.current || !onClose) {\n return;\n }\n el.current?.addEventListener(\"_close\", onClose);\n return () => {\n el.current?.removeEventListener(\"_close\", onClose);\n };\n }, [el, onClose]);\n\n return (\n <goa-drawer\n ref={el}\n position={position}\n open={open ? true : undefined}\n heading={typeof heading === \"string\" ? heading : undefined}\n maxsize={maxSize}\n testid={testId}\n >\n {heading && typeof heading !== \"string\" && <div slot=\"heading\">{heading}</div>}\n {actions && <div slot=\"actions\">{actions}</div>}\n {children}\n </goa-drawer>\n );\n}\n\nexport default GoabDrawer;\n","import {\n GoabIconFilledType,\n GoabIconSize,\n GoabIconTheme,\n GoabIconType,\n Margins,\n} from \"@abgov/ui-components-common\";\n\nimport type { JSX } from \"react\";\n\ninterface IonIconProps {\n name: GoabIconType | GoabIconFilledType;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface IonIconElement extends HTMLElement {}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"ion-icon\": IonIconProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\ndeclare module \"react\" {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n \"goa-icon\": WCProps & React.HTMLAttributes<IonIconElement>;\n }\n }\n}\n\nexport interface GoabIconProps extends Margins {\n type: GoabIconType;\n size?: GoabIconSize;\n theme?: GoabIconTheme;\n inverted?: string | boolean; // TODO: Change type to only boolean\n fillColor?: string;\n opacity?: number;\n title?: string;\n ariaLabel?: string;\n testId?: string;\n}\n\ninterface WCProps extends Margins {\n type: GoabIconType;\n theme?: GoabIconTheme;\n size?: GoabIconSize;\n inverted?: string;\n fillcolor?: string;\n opacity?: number;\n title?: string;\n arialabel?: string;\n testid?: string;\n}\n\nexport function GoabIcon({\n type,\n theme,\n size,\n inverted, // TODO: change to boolean only\n fillColor,\n opacity,\n title,\n ariaLabel,\n mt,\n mr,\n mb,\n ml,\n testId,\n}: GoabIconProps): JSX.Element {\n return (\n <goa-icon\n type={type}\n theme={theme}\n size={size}\n inverted={\n typeof inverted === \"boolean\" ? (inverted ? \"true\" : undefined) : inverted\n }\n fillcolor={fillColor}\n opacity={opacity}\n title={title}\n arialabel={ariaLabel}\n mt={mt}\n mr={mr}\n mb={mb}\n ml={ml}\n testid={testId}\n />\n );\n}\n"],"names":["_a"],"mappings":";;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiC;AACzB,QAAA,KAAK,OAAoB,IAAI;AAEnC,YAAU,MAAM;;AACd,QAAI,EAAC,yBAAI,YAAW,CAAC,SAAS;AAC5B;AAAA,IAAA;AAEC,aAAA,YAAA,mBAAS,iBAAiB,UAAU;AACvC,WAAO,MAAM;;AACR,OAAAA,MAAA,GAAA,YAAA,gBAAAA,IAAS,oBAAoB,UAAU;AAAA,IAC5C;AAAA,EAAA,GACC,CAAC,IAAI,OAAO,CAAC;AAGd,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,MAAM,OAAO,OAAO;AAAA,MACpB,SAAS,OAAO,YAAY,WAAW,UAAU;AAAA,MACjD,SAAS;AAAA,MACT,QAAQ;AAAA,MAEP,UAAA;AAAA,QAAA,WAAW,OAAO,YAAY,gCAAa,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACvE,WAAW,oBAAC,OAAI,EAAA,MAAK,WAAW,UAAQ,SAAA;AAAA,QACxC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAEJ;ACTO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA+B;AAE3B,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,UACE,OAAO,aAAa,YAAa,WAAW,SAAS,SAAa;AAAA,MAEpE,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ;AAAA,IAAA;AAAA,EACV;AAEJ;"}
package/index.d.ts CHANGED
@@ -17,12 +17,15 @@ export * from './lib/divider/divider';
17
17
  export * from './lib/drawer/drawer';
18
18
  export * from './lib/dropdown/dropdown';
19
19
  export * from './lib/dropdown/dropdown-item';
20
- export * from './lib/fieldset/fieldset';
21
20
  export * from './lib/file-upload-card/file-upload-card';
22
21
  export * from './lib/file-upload-input/file-upload-input';
23
22
  export * from './lib/footer/footer';
24
23
  export * from './lib/footer-meta-section/footer-meta-section';
25
24
  export * from './lib/footer-nav-section/footer-nav-section';
25
+ export * from './lib/form/fieldset';
26
+ export * from './lib/form/public-form-page';
27
+ export * from './lib/form/public-form-summary';
28
+ export * from './lib/form/public-form';
26
29
  export * from './lib/form-item/form-item';
27
30
  export * from './lib/form-step/form-step';
28
31
  export * from './lib/form-stepper/form-stepper';
package/index.js CHANGED
@@ -721,53 +721,6 @@ function GoabDropdownItem({
721
721
  }
722
722
  );
723
723
  }
724
- function GoabFieldset({
725
- heading,
726
- buttonText,
727
- id,
728
- onContinue,
729
- children,
730
- mt,
731
- mr,
732
- mb,
733
- ml,
734
- first,
735
- last
736
- }) {
737
- const ref = react.useRef(null);
738
- react.useEffect(() => {
739
- if (!ref.current) return;
740
- const current = ref.current;
741
- const _continue = (e) => {
742
- const event = e.detail;
743
- return onContinue == null ? void 0 : onContinue(event);
744
- };
745
- if (onContinue) {
746
- current.addEventListener("_continue", _continue);
747
- }
748
- return () => {
749
- if (onContinue) {
750
- current.removeEventListener("_continue", _continue);
751
- }
752
- };
753
- }, [ref, onContinue]);
754
- return /* @__PURE__ */ jsxRuntime.jsx(
755
- "goa-public-form-page",
756
- {
757
- ref,
758
- id,
759
- first: first ? "true" : void 0,
760
- last: last ? "true" : void 0,
761
- heading,
762
- buttontext: buttonText,
763
- mt,
764
- mr,
765
- mb,
766
- ml,
767
- children
768
- }
769
- );
770
- }
771
724
  function GoabFileUploadCard({
772
725
  filename,
773
726
  size,
@@ -866,6 +819,209 @@ function GoabAppFooterNavSection({
866
819
  }
867
820
  );
868
821
  }
822
+ function GoabFieldset({
823
+ id,
824
+ sectionTitle,
825
+ dispatchOn,
826
+ onContinue,
827
+ onChange,
828
+ children
829
+ }) {
830
+ const ref = react.useRef(null);
831
+ react.useEffect(() => {
832
+ if (!ref.current) return;
833
+ const current = ref.current;
834
+ const changeListener = (e) => {
835
+ const detail = e.detail;
836
+ onChange == null ? void 0 : onChange(detail);
837
+ };
838
+ const continueListener = (e) => {
839
+ const event = e.detail;
840
+ return onContinue == null ? void 0 : onContinue(event);
841
+ };
842
+ if (onContinue) {
843
+ current.addEventListener("_continue", continueListener);
844
+ }
845
+ if (onChange) {
846
+ current.addEventListener("_change", changeListener);
847
+ }
848
+ return () => {
849
+ if (onContinue) {
850
+ current.removeEventListener("_continue", continueListener);
851
+ }
852
+ if (onChange) {
853
+ current.removeEventListener("_change", changeListener);
854
+ }
855
+ };
856
+ }, [ref, onContinue]);
857
+ return /* @__PURE__ */ jsxRuntime.jsx(
858
+ "goa-fieldset",
859
+ {
860
+ ref,
861
+ id,
862
+ "section-title": sectionTitle,
863
+ "dispatch-on": dispatchOn,
864
+ children
865
+ }
866
+ );
867
+ }
868
+ function GoabPublicFormPage({
869
+ id = "",
870
+ heading = "",
871
+ subHeading = "",
872
+ summaryHeading = "",
873
+ sectionTitle = "",
874
+ backUrl = "",
875
+ type = "step",
876
+ buttonText = "",
877
+ buttonVisibility = "visible",
878
+ first = false,
879
+ last = false,
880
+ onContinue,
881
+ onBack,
882
+ onFieldsetChange,
883
+ onComplete,
884
+ children,
885
+ mt,
886
+ mr,
887
+ mb,
888
+ ml
889
+ }) {
890
+ const ref = react.useRef(null);
891
+ react.useEffect(() => {
892
+ if (!ref.current) return;
893
+ const current = ref.current;
894
+ const continueListener = (e) => {
895
+ onContinue == null ? void 0 : onContinue(e);
896
+ };
897
+ const backListener = (e) => {
898
+ onBack == null ? void 0 : onBack(e);
899
+ };
900
+ const fieldsetChangeListener = (e) => {
901
+ const detail = e.detail;
902
+ onFieldsetChange == null ? void 0 : onFieldsetChange(detail);
903
+ };
904
+ const completeListener = (e) => {
905
+ const detail = e.detail;
906
+ onComplete == null ? void 0 : onComplete(detail);
907
+ };
908
+ if (onContinue) {
909
+ current.addEventListener("_continue", continueListener);
910
+ }
911
+ if (onBack) {
912
+ current.addEventListener("_back", backListener);
913
+ }
914
+ if (onFieldsetChange) {
915
+ current.addEventListener("_fieldsetChange", fieldsetChangeListener);
916
+ }
917
+ if (onComplete) {
918
+ current.addEventListener("_complete", completeListener);
919
+ }
920
+ return () => {
921
+ if (onContinue) {
922
+ current.removeEventListener("_continue", continueListener);
923
+ }
924
+ if (onBack) {
925
+ current.removeEventListener("_back", backListener);
926
+ }
927
+ if (onFieldsetChange) {
928
+ current.removeEventListener("_fieldsetChange", fieldsetChangeListener);
929
+ }
930
+ if (onComplete) {
931
+ current.removeEventListener("_complete", completeListener);
932
+ }
933
+ };
934
+ }, [ref, onContinue, onBack, onFieldsetChange, onComplete]);
935
+ return /* @__PURE__ */ jsxRuntime.jsx(
936
+ "goa-public-form-page",
937
+ {
938
+ ref,
939
+ id,
940
+ heading,
941
+ "sub-heading": subHeading,
942
+ "section-title": sectionTitle,
943
+ "back-url": backUrl,
944
+ type,
945
+ "button-text": buttonText,
946
+ "button-visibility": buttonVisibility,
947
+ first,
948
+ last,
949
+ "summary-heading": summaryHeading,
950
+ mt,
951
+ mr,
952
+ mb,
953
+ ml,
954
+ children
955
+ }
956
+ );
957
+ }
958
+ function GoabPublicFormSummary({
959
+ heading = ""
960
+ }) {
961
+ const ref = react.useRef(null);
962
+ return /* @__PURE__ */ jsxRuntime.jsx(
963
+ "goa-public-form-summary",
964
+ {
965
+ ref,
966
+ heading
967
+ }
968
+ );
969
+ }
970
+ function GoabPublicForm({
971
+ status = "complete",
972
+ name,
973
+ onInit,
974
+ onComplete,
975
+ onStateChange,
976
+ children
977
+ }) {
978
+ const ref = react.useRef(null);
979
+ const initialized = react.useRef(false);
980
+ react.useLayoutEffect(() => {
981
+ if (!ref.current) return;
982
+ const current = ref.current;
983
+ const initListener = (e) => {
984
+ onInit == null ? void 0 : onInit(e);
985
+ };
986
+ if (onInit && !initialized.current) {
987
+ current.addEventListener("_init", initListener);
988
+ }
989
+ const completeListener = (e) => {
990
+ const detail = e.detail;
991
+ onComplete == null ? void 0 : onComplete(detail);
992
+ };
993
+ const stateChangeListener = (e) => {
994
+ const detail = e.detail;
995
+ onStateChange == null ? void 0 : onStateChange(detail.data);
996
+ };
997
+ if (onComplete) {
998
+ current.addEventListener("_complete", completeListener);
999
+ }
1000
+ if (onStateChange) {
1001
+ current.addEventListener("_stateChange", stateChangeListener);
1002
+ }
1003
+ return () => {
1004
+ if (onInit) {
1005
+ current.removeEventListener("_init", initListener);
1006
+ }
1007
+ if (onComplete) {
1008
+ current.removeEventListener("_complete", completeListener);
1009
+ }
1010
+ if (onStateChange) {
1011
+ current.removeEventListener("_stateChange", stateChangeListener);
1012
+ }
1013
+ };
1014
+ }, [onInit, onComplete, onStateChange]);
1015
+ return /* @__PURE__ */ jsxRuntime.jsx(
1016
+ "goa-public-form",
1017
+ {
1018
+ ref,
1019
+ status,
1020
+ name,
1021
+ children
1022
+ }
1023
+ );
1024
+ }
869
1025
  function GoabFormItem({
870
1026
  children,
871
1027
  helpText,
@@ -874,6 +1030,8 @@ function GoabFormItem({
874
1030
  label,
875
1031
  labelSize,
876
1032
  maxWidth,
1033
+ publicFormSummaryOrder,
1034
+ name,
877
1035
  mt,
878
1036
  mr,
879
1037
  mb,
@@ -890,6 +1048,8 @@ function GoabFormItem({
890
1048
  requirement,
891
1049
  helptext: typeof helpText === "string" ? helpText : void 0,
892
1050
  maxwidth: maxWidth,
1051
+ "public-form-summary-order": publicFormSummaryOrder,
1052
+ name,
893
1053
  mt,
894
1054
  mr,
895
1055
  mb,
@@ -1768,8 +1928,6 @@ const lightFormatters = {
1768
1928
  }
1769
1929
  };
1770
1930
  const dayPeriodEnum = {
1771
- am: "am",
1772
- pm: "pm",
1773
1931
  midnight: "midnight",
1774
1932
  noon: "noon",
1775
1933
  morning: "morning",
@@ -2705,7 +2863,7 @@ function GoabInput({
2705
2863
  const current = ref.current;
2706
2864
  const changeListener = (e) => {
2707
2865
  const detail = e.detail;
2708
- onChange(detail);
2866
+ onChange == null ? void 0 : onChange(detail);
2709
2867
  };
2710
2868
  const clickListener = () => {
2711
2869
  onTrailingIconClick == null ? void 0 : onTrailingIconClick();
@@ -2778,15 +2936,15 @@ function GoabInput({
2778
2936
  const onDateChangeHandler = (onChange) => {
2779
2937
  return ({ name, value }) => {
2780
2938
  if (!value) {
2781
- onChange({ name, value: "" });
2939
+ onChange == null ? void 0 : onChange({ name, value: "" });
2782
2940
  return;
2783
2941
  }
2784
2942
  if (typeof value === "string" && isValid(new Date(value))) {
2785
- onChange({ name, value: parseISO(value) });
2943
+ onChange == null ? void 0 : onChange({ name, value: parseISO(value) });
2786
2944
  return;
2787
2945
  }
2788
2946
  if (isValid(value)) {
2789
- onChange({ name, value });
2947
+ onChange == null ? void 0 : onChange({ name, value });
2790
2948
  return;
2791
2949
  }
2792
2950
  };
@@ -2794,10 +2952,10 @@ const onDateChangeHandler = (onChange) => {
2794
2952
  const onTimeChangeHandler = (onChange) => {
2795
2953
  return ({ name, value }) => {
2796
2954
  if (!value) {
2797
- onChange({ name, value: "" });
2955
+ onChange == null ? void 0 : onChange({ name, value: "" });
2798
2956
  return;
2799
2957
  }
2800
- onChange({ name, value });
2958
+ onChange == null ? void 0 : onChange({ name, value });
2801
2959
  };
2802
2960
  };
2803
2961
  function toString(value, tmpl = "yyyy-MM-dd") {
@@ -2887,7 +3045,10 @@ function GoabInputFile(props) {
2887
3045
  id: props.id,
2888
3046
  name: props.name,
2889
3047
  type: "file",
2890
- onChange: (e) => props.onChange({ name: e.target.name, value: e.target.value }),
3048
+ onChange: (e) => {
3049
+ var _a;
3050
+ return (_a = props.onChange) == null ? void 0 : _a.call(props, { name: e.target.name, value: e.target.value });
3051
+ },
2891
3052
  style: { backgroundColor: "revert" }
2892
3053
  }
2893
3054
  );
@@ -2902,7 +3063,8 @@ function GoabInputNumber({
2902
3063
  ...props
2903
3064
  }) {
2904
3065
  const onNumberChange = ({ name, value: value2 }) => {
2905
- props.onChange({ name, value: parseFloat(value2) });
3066
+ var _a;
3067
+ (_a = props.onChange) == null ? void 0 : _a.call(props, { name, value: parseFloat(value2) });
2906
3068
  };
2907
3069
  const onFocus = ({ name, value: value2 }) => {
2908
3070
  var _a;
@@ -3220,6 +3382,7 @@ function GoabRadioGroup({
3220
3382
  orientation,
3221
3383
  disabled,
3222
3384
  error,
3385
+ id,
3223
3386
  testId,
3224
3387
  ariaLabel,
3225
3388
  mt,
@@ -3232,17 +3395,17 @@ function GoabRadioGroup({
3232
3395
  react.useEffect(() => {
3233
3396
  if (!el.current) return;
3234
3397
  const listener = (e) => {
3235
- if (!onChange) {
3236
- console.warn("Missing onChange function");
3237
- return;
3238
- }
3239
3398
  const detail = e.detail;
3240
- onChange(detail);
3399
+ onChange == null ? void 0 : onChange(detail);
3241
3400
  };
3242
3401
  const currentEl = el.current;
3243
- currentEl.addEventListener("_change", listener);
3402
+ if (onChange) {
3403
+ currentEl.addEventListener("_change", listener);
3404
+ }
3244
3405
  return () => {
3245
- currentEl.removeEventListener("_change", listener);
3406
+ if (onChange) {
3407
+ currentEl.removeEventListener("_change", listener);
3408
+ }
3246
3409
  };
3247
3410
  }, [name, onChange]);
3248
3411
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3250,6 +3413,7 @@ function GoabRadioGroup({
3250
3413
  {
3251
3414
  testid: testId,
3252
3415
  ref: el,
3416
+ id,
3253
3417
  name,
3254
3418
  value,
3255
3419
  orientation,
@@ -3453,11 +3617,15 @@ function GoabTextArea({
3453
3617
  const current = el.current;
3454
3618
  const listener = (e) => {
3455
3619
  const detail = e.detail;
3456
- onChange(detail);
3620
+ onChange == null ? void 0 : onChange(detail);
3457
3621
  };
3458
- current.addEventListener("_change", listener);
3622
+ if (onChange) {
3623
+ current.addEventListener("_change", listener);
3624
+ }
3459
3625
  return () => {
3460
- current.removeEventListener("_change", listener);
3626
+ if (onChange) {
3627
+ current.removeEventListener("_change", listener);
3628
+ }
3461
3629
  };
3462
3630
  }, [el, onChange]);
3463
3631
  react.useEffect(() => {
@@ -3645,6 +3813,9 @@ exports.GoabPageBlock = GoabPageBlock;
3645
3813
  exports.GoabPages = GoabPages;
3646
3814
  exports.GoabPagination = GoabPagination;
3647
3815
  exports.GoabPopover = GoabPopover;
3816
+ exports.GoabPublicForm = GoabPublicForm;
3817
+ exports.GoabPublicFormPage = GoabPublicFormPage;
3818
+ exports.GoabPublicFormSummary = GoabPublicFormSummary;
3648
3819
  exports.GoabRadioGroup = GoabRadioGroup;
3649
3820
  exports.GoabRadioItem = GoabRadioItem;
3650
3821
  exports.GoabSideMenu = GoabSideMenu;