@abgov/react-components 6.9.0-alpha.2 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/experimental.js.map +1 -1
- package/experimental.mjs.map +1 -1
- package/icon-CK55b563.js.map +1 -1
- package/icon-CoYGOp1V.mjs.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/lib/form/public-form-summary.d.ts +0 -1
- package/package.json +1 -1
package/experimental.js.map
CHANGED
|
@@ -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;
|
|
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;AAEjE,QAAM,QAAQA,MAAAA,OAA8B,IAAI;AAChD,QAAM,aAAaA,MAAAA,OAA2B,IAAI;AAClD,QAAM,WAAWA,MAAAA,OAA8B,IAAI;AACnD,QAAM,YAAYA,MAAAA,OAA8B,IAAI;AAGpD,QAAM,WAAWA,MAAAA,OAAe,CAAC;AACjC,QAAM,iBAAiBA,MAAAA,OAAmB,QAAQ;AAGlD,QAAM,CAACC,QAAO,QAAQ,IAAIC,eAAA;AAE1BC,QAAAA,UAAU,MAAM;;AACd,aAAS,YAAU,WAAM,YAAN,mBAAe,wBAAwB,UAAS;AAAA,EACrE,GAAG,CAAA,CAAE;AAEL,WAAS,kBAAkB;AACzB,mBAAe,UAAU;AAAA,EAC3B;AAEA,WAAS,YAAY,GAAqB;AACxC,mBAAe,UAAU;AACzB,WAAO,iBAAiB,WAAW,eAAe;AAAA,EACpD;AAEA,WAAS,UAAU,GAAqB;AACtC,mBAAe,UAAU;AACzB,WAAO,oBAAoB,WAAW,eAAe;AAAA,EACvD;AAEA,WAAS,YAAY,GAAqB;;AACxC,QAAI,eAAe,YAAY,UAAU;AACvC;AAAA,IACF;AAEA,UAAM,YAAY,WAAW;AAC7B,UAAM,WAAU,uCAAW,wBAAwB,MAAK;AACxD,UAAM,SAAS,EAAE;AACjB,UAAM,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;AAEA,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,IAAI;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAAA,gCAAC,WAAA,EAAQ,KAAK,YAAY,WAAW,IAAI,OACvC,UAAA;AAAA,UAAAC,+BAAC,OAAA,EAAI,WAAW,IAAI,UAAW,gBAAM,UAAS;AAAA,UAC9CA,2BAAAA,IAAC,OAAA,EAAI,KAAK,WAAW,WAAW,IAAI,QAClC,UAAAA,2BAAAA,IAACC,KAAAA,UAAA,EAAS,MAAK,cAAA,CAAc,EAAA,CAC/B;AAAA,QAAA,GACF;AAAA,uCACC,OAAA,EAAI,KAAK,UAAU,WAAW,IAAI,OAChC,UAAAL,OAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;;"}
|
package/experimental.mjs.map
CHANGED
|
@@ -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;
|
|
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;AAEjE,QAAM,QAAQ,OAA8B,IAAI;AAChD,QAAM,aAAa,OAA2B,IAAI;AAClD,QAAM,WAAW,OAA8B,IAAI;AACnD,QAAM,YAAY,OAA8B,IAAI;AAGpD,QAAM,WAAW,OAAe,CAAC;AACjC,QAAM,iBAAiB,OAAmB,QAAQ;AAGlD,QAAM,CAACA,QAAO,QAAQ,IAAI,SAAA;AAE1B,YAAU,MAAM;;AACd,aAAS,YAAU,WAAM,YAAN,mBAAe,wBAAwB,UAAS;AAAA,EACrE,GAAG,CAAA,CAAE;AAEL,WAAS,kBAAkB;AACzB,mBAAe,UAAU;AAAA,EAC3B;AAEA,WAAS,YAAY,GAAqB;AACxC,mBAAe,UAAU;AACzB,WAAO,iBAAiB,WAAW,eAAe;AAAA,EACpD;AAEA,WAAS,UAAU,GAAqB;AACtC,mBAAe,UAAU;AACzB,WAAO,oBAAoB,WAAW,eAAe;AAAA,EACvD;AAEA,WAAS,YAAY,GAAqB;;AACxC,QAAI,eAAe,YAAY,UAAU;AACvC;AAAA,IACF;AAEA,UAAM,YAAY,WAAW;AAC7B,UAAM,WAAU,uCAAW,wBAAwB,MAAK;AACxD,UAAM,SAAS,EAAE;AACjB,UAAM,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;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,WAAW,IAAI;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAAA,qBAAC,WAAA,EAAQ,KAAK,YAAY,WAAW,IAAI,OACvC,UAAA;AAAA,UAAA,oBAAC,OAAA,EAAI,WAAW,IAAI,UAAW,gBAAM,UAAS;AAAA,UAC9C,oBAAC,OAAA,EAAI,KAAK,WAAW,WAAW,IAAI,QAClC,UAAA,oBAAC,UAAA,EAAS,MAAK,cAAA,CAAc,EAAA,CAC/B;AAAA,QAAA,GACF;AAAA,4BACC,OAAA,EAAI,KAAK,UAAU,WAAW,IAAI,OAChC,UAAAA,OAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/icon-CK55b563.js.map
CHANGED
|
@@ -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 GoabIconOverridesType,\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 | GoabIconOverridesType;\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 | GoabIconOverridesType;\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}"],"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;
|
|
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 GoabIconOverridesType,\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 | GoabIconOverridesType;\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 | GoabIconOverridesType;\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}"],"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;AAC/B,QAAM,KAAKA,MAAAA,OAAoB,IAAI;AAEnCC,QAAAA,UAAU,MAAM;;AACd,QAAI,EAAC,yBAAI,YAAW,CAAC,SAAS;AAC5B;AAAA,IACF;AACA,aAAG,YAAH,mBAAY,iBAAiB,UAAU;AACvC,WAAO,MAAM;;AACX,OAAAC,MAAA,GAAG,YAAH,gBAAAA,IAAY,oBAAoB,UAAU;AAAA,IAC5C;AAAA,EACF,GAAG,CAAC,IAAI,OAAO,CAAC;AAEhB,SACEC,2BAAAA;AAAAA,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,OAAA,EAAI,MAAK,WAAW,UAAA,SAAQ;AAAA,QACvE,WAAWC,2BAAAA,IAAC,OAAA,EAAI,MAAK,WAAW,UAAA,SAAQ;AAAA,QACxC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;ACRO,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;AAC7B,SACEA,2BAAAA;AAAAA,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;;;"}
|
package/icon-CoYGOp1V.mjs.map
CHANGED
|
@@ -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 GoabIconOverridesType,\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 | GoabIconOverridesType;\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 | GoabIconOverridesType;\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}"],"names":["_a"],"mappings":";;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiC;
|
|
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 GoabIconOverridesType,\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 | GoabIconOverridesType;\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 | GoabIconOverridesType;\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}"],"names":["_a"],"mappings":";;AAgCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAiC;AAC/B,QAAM,KAAK,OAAoB,IAAI;AAEnC,YAAU,MAAM;;AACd,QAAI,EAAC,yBAAI,YAAW,CAAC,SAAS;AAC5B;AAAA,IACF;AACA,aAAG,YAAH,mBAAY,iBAAiB,UAAU;AACvC,WAAO,MAAM;;AACX,OAAAA,MAAA,GAAG,YAAH,gBAAAA,IAAY,oBAAoB,UAAU;AAAA,IAC5C;AAAA,EACF,GAAG,CAAC,IAAI,OAAO,CAAC;AAEhB,SACE;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,OAAA,EAAI,MAAK,WAAW,UAAA,SAAQ;AAAA,QACvE,WAAW,oBAAC,OAAA,EAAI,MAAK,WAAW,UAAA,SAAQ;AAAA,QACxC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;ACRO,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;AAC7B,SACE;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;"}
|