@fpkit/acss 0.5.0 → 0.5.3
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/libs/chunk-GCGKYLDG.js +7 -0
- package/libs/chunk-GCGKYLDG.js.map +1 -0
- package/libs/chunk-PDD4N5P5.cjs +10 -0
- package/libs/chunk-PDD4N5P5.cjs.map +1 -0
- package/libs/chunk-TBM2QIVT.js +8 -0
- package/libs/chunk-TBM2QIVT.js.map +1 -0
- package/libs/chunk-VAH6X2DZ.cjs +31 -0
- package/libs/chunk-VAH6X2DZ.cjs.map +1 -0
- package/libs/components/badge/badge.css +1 -0
- package/libs/components/badge/badge.css.map +1 -0
- package/libs/components/badge/badge.min.css +3 -0
- package/libs/components/breadcrumbs/breadcrumb.css +1 -0
- package/libs/components/breadcrumbs/breadcrumb.css.map +1 -0
- package/libs/components/breadcrumbs/breadcrumb.min.css +3 -0
- package/libs/components/buttons/button.css +1 -0
- package/libs/components/buttons/button.css.map +1 -0
- package/libs/components/buttons/button.min.css +3 -0
- package/libs/components/cards/card-style.css +1 -0
- package/libs/components/cards/card-style.css.map +1 -0
- package/libs/components/cards/card-style.min.css +3 -0
- package/libs/components/cards/card.css +1 -0
- package/libs/components/cards/card.css.map +1 -0
- package/libs/components/cards/card.min.css +3 -0
- package/libs/components/details/details.css +1 -0
- package/libs/components/details/details.css.map +1 -0
- package/libs/components/details/details.min.css +3 -0
- package/libs/components/form/form.css +1 -0
- package/libs/components/form/form.css.map +1 -0
- package/libs/components/form/form.min.css +3 -0
- package/libs/components/icons/icon.css +1 -0
- package/libs/components/icons/icon.css.map +1 -0
- package/libs/components/icons/icon.min.css +3 -0
- package/libs/components/images/img.css +1 -0
- package/libs/components/images/img.css.map +1 -0
- package/libs/components/images/img.min.css +3 -0
- package/libs/components/layout/landmarks.css +1 -0
- package/libs/components/layout/landmarks.css.map +1 -0
- package/libs/components/layout/landmarks.min.css +3 -0
- package/libs/components/link/link.css +1 -0
- package/libs/components/link/link.css.map +1 -0
- package/libs/components/link/link.min.css +3 -0
- package/libs/components/nav/nav.css +1 -0
- package/libs/components/nav/nav.css.map +1 -0
- package/libs/components/nav/nav.min.css +3 -0
- package/libs/components/progress/progress.css +1 -0
- package/libs/components/progress/progress.css.map +1 -0
- package/libs/components/progress/progress.min.css +3 -0
- package/libs/components/styles/index.css +1 -0
- package/libs/components/styles/index.css.map +1 -0
- package/libs/components/styles/index.min.css +3 -0
- package/libs/components/tag/tag.css +1 -0
- package/libs/components/tag/tag.css.map +1 -0
- package/libs/components/tag/tag.min.css +3 -0
- package/libs/components/text-to-speech/text-to-speech.css +1 -0
- package/libs/components/text-to-speech/text-to-speech.css.map +1 -0
- package/libs/components/text-to-speech/text-to-speech.min.css +3 -0
- package/libs/hooks.cjs +12 -0
- package/{dist → libs}/hooks.d.cts +2 -2
- package/{dist → libs}/hooks.d.ts +2 -2
- package/libs/hooks.js +3 -0
- package/libs/icons-2f29127c.d.ts +349 -0
- package/libs/icons.cjs +12 -0
- package/libs/icons.cjs.map +1 -0
- package/libs/icons.d.cts +2 -0
- package/libs/icons.d.ts +2 -0
- package/libs/icons.js +3 -0
- package/libs/icons.js.map +1 -0
- package/libs/index.cjs +71 -0
- package/libs/index.cjs.map +1 -0
- package/libs/index.css +1 -0
- package/libs/index.css.map +1 -0
- package/libs/index.d.cts +561 -0
- package/libs/index.d.ts +561 -0
- package/libs/index.js +11 -0
- package/libs/index.js.map +1 -0
- package/package.json +3 -2
- package/src/components/badge/badge.scss +1 -0
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +2 -2
- package/src/components/breadcrumbs/breadcrumb.tsx +2 -1
- package/src/components/buttons/button.scss +3 -4
- package/src/components/buttons/button.stories.tsx +49 -27
- package/src/components/buttons/button.tsx +31 -4
- package/src/components/cards/card.scss +5 -3
- package/src/components/cards/card.stories.tsx +2 -2
- package/src/components/cards/card.tsx +0 -1
- package/src/components/details/details.scss +2 -1
- package/src/components/heading/heading.tsx +2 -2
- package/src/components/icons/components/svg.tsx +1 -0
- package/src/components/icons/icon.scss +3 -1
- package/src/components/icons/icon.stories.tsx +37 -3
- package/src/components/icons/icon.tsx +11 -0
- package/src/components/icons/types.ts +1 -1
- package/src/components/list/list.stories.tsx +6 -0
- package/src/sass/_globals.scss +8 -7
- package/src/styles/badge/badge.css +1 -0
- package/src/styles/badge/badge.css.map +1 -1
- package/src/styles/buttons/button.css +3 -3
- package/src/styles/buttons/button.css.map +1 -1
- package/src/styles/cards/card.css +2 -8
- package/src/styles/cards/card.css.map +1 -5
- package/src/styles/details/details.css +2 -1
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/form/form.css +0 -3
- package/src/styles/icons/icon.css +3 -1
- package/src/styles/icons/icon.css.map +1 -1
- package/src/styles/index.css +16 -14
- package/src/styles/index.css.map +1 -1
- package/dist/chunk-77CZU5XZ.cjs +0 -9
- package/dist/chunk-77CZU5XZ.cjs.map +0 -1
- package/dist/chunk-D43FJIRQ.cjs +0 -31
- package/dist/chunk-D43FJIRQ.cjs.map +0 -1
- package/dist/chunk-GJWMCDFS.js +0 -9
- package/dist/chunk-GJWMCDFS.js.map +0 -1
- package/dist/chunk-PCDUGD3C.js +0 -5
- package/dist/chunk-PCDUGD3C.js.map +0 -1
- package/dist/hooks.cjs +0 -10
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js +0 -8
- package/dist/hooks.js.map +0 -1
- package/dist/icon-e6044c73.d.ts +0 -227
- package/dist/icons.cjs +0 -73
- package/dist/icons.d.cts +0 -252
- package/dist/icons.d.ts +0 -252
- package/dist/icons.js +0 -4
- package/dist/index.cjs +0 -59
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -566
- package/dist/index.d.ts +0 -566
- package/dist/index.js +0 -11
- package/dist/index.js.map +0 -1
- package/src/components/popover/node_modules/.vitest/results.json +0 -1
- package/src/hooks/popover/node_modules/.vitest/results.json +0 -1
- /package/{dist/icons.cjs.map → libs/hooks.cjs.map} +0 -0
- /package/{dist/icons.js.map → libs/hooks.js.map} +0 -0
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/badge/fp-badge.tsx","../src/components/buttons/button.tsx","../src/components/cards/card.tsx","../src/components/modal/dialog.tsx","../src/components/dropdowns/dropdown-details.tsx","../src/components/dropdowns/dropdown-summary.tsx","../src/components/dropdowns/dropdown.tsx","../src/components/form/fields.tsx","../src/components/layout/landmarks.tsx","../src/components/images/img.tsx","../src/components/form/inputs.tsx","../src/components/link/link.tsx","../src/components/list/list.tsx","../src/components/modal/modal.tsx","../src/components/tables/table-elements.tsx","../src/components/tables/table.tsx","../src/components/text/text.tsx","../src/components/form/textarea.tsx"],"names":["jsx","defStyles","Badge","_a","_b","elm","role","children","renderStyles","styles","props","__objRest","fp_default","__spreadProps","__spreadValues","Button","type","disabled","classes","pointerDown","pointerOver","pointerLeave","e","defaultStyles","Card","dataStyle","id","Dialog","modalRef","openOnMount","Details","title","onToggle","Summary","jsxs","Dropdown","summary","toggle","Field","labelFor","label","Header","Main","Footer","Aside","Section","Article","Img","src","alt","width","height","loading","placeholder","fetchpriority","decoding","imgLoaded","imgError","Input","name","value","isDisabled","readonly","required","inputRef","inputChange","inputBlur","inputDown","Link","href","target","rel","prefetch","onPointerDown","relValue","link_default","List","variant","React","Fragment","Modal","openChild","closeChild","modalHeader","modalFooter","showOpen","dialogRef","openModal","closeModal","Caption","Thead","Tbody","Tr","Td","Table","RenderHead","data","head","item","index","RenderBody","rec","RenderTable","tblBody","tblCaption","tblHead","Text","text","Span","Title","Textarea","rows","cols","textareaBlur","textareaChange","textareaDown","textareaRef","handleChange","handleBlur","handleKeyDown"],"mappings":"wGA4CI,cAAAA,OAAA,oBAjCJ,IAAMC,GAAY,CAChB,cAAe,0BACf,aAAc,0BACd,MAAO,yBACP,SAAU,0BACV,WAAY,0BACZ,WAAY,8BACZ,OAAQ,yBACR,aAAc,0BACd,gBAAiB,0BACjB,eAAgB,g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OAAA,oBAnCG,IAAMuB,GAAgB,CAAC,EAEjBuF,GAAY3G,GAaJ,CAbI,IAAAC,EAAAD,EACvB,OAAAyD,EACA,KAAAmD,EACA,KAAAC,EACA,GAAAtF,EACA,SAAAqC,EACA,SAAA9C,EACA,SAAA6C,EACA,aAAAmD,EACA,eAAAC,EACA,aAAAC,EACA,YAAAC,CA5CF,EAiCyBhH,EAYpBM,EAAAC,EAZoBP,EAYpB,CAXH,QACA,OACA,OACA,KACA,WACA,WACA,WACA,eACA,iBACA,eACA,gBAGA,IAAMiH,EAAgB/F,GAA8C,CAC9D4F,GAAkB,CAACjG,GACrBiG,EAAe5F,CAAC,CAEpB,EAEMgG,EAAchG,GAA6C,CAC3D2F,GAAgB,CAAChG,IACnBgG,GAAA,MAAAA,EAAe3F,GAEnB,EAEMiG,EAAiBjG,GAAgD,CACjE6F,GAAgB,CAAClG,IACnBkG,GAAA,MAAAA,EAAe7F,GAEnB,EAEA,OACEtB,GAACY,EAAAE,EAAA,CACC,GAAG,WACH,IAAKsG,EACL,KAAML,EACN,KAAMC,EACN,OAAQlG,EAAA,GAAKS,IACb,aAAW,WACX,GAAIG,EACJ,SAAUqC,EACV,MAAOH,EACP,gBAAe3C,EACf,SAAU6C,EACV,SAAUuD,EACV,OAAQC,EACR,UAAWC,GACP7G,EACN,CAEJ,EAEAoG,GAAS,YAAc","sourcesContent":["import FP from '#components/fp'\nimport React from 'react'\n\nexport interface FpBadgeProps {\n elm?: 'span' | 'p'\n children: React.ReactNode\n role: 'note' | 'alert' | 'status'\n renderStyles?: boolean\n styles?: {}\n}\n\nconst defStyles = {\n paddingInline: 'var(--badge-px, 0.7rem)',\n paddingBlock: 'var(--badge-py, 0.2rem)',\n color: 'var(--badge-cl, black)',\n fontSize: 'var(--badge-fs, 0.8rem)',\n fontWeight: 'var(--badge-fw, normal)',\n fontFamily: 'var(--badge-ff, sans-serif)',\n border: 'var(--badge-brd, none)',\n borderRadius: 'var(--badge-rds, 99rem)',\n backgroundColor: 'var(--badge-bg, \"blue\")',\n textDecoration: 'var(--badge-decoration, none)',\n textTransform: 'var(--badge-tt, var(--tt))',\n}\n\n/**\n * @description Creates a Badge component that wraps a child element with a badge.\n * @param {string} elm - element type to render\n * @param {string} role - aria role\n * @param {any} children - child element to render\n * @param {boolean} renderStyles - whether or not to render the default styles\n * @param {object} styles - styles to pass to the FP component\n * @param {object} props - additional props to pass to the FP component\n * @returns {any} - returns the Badge component\n */\nexport const Badge = ({\n elm = 'span',\n role,\n children,\n renderStyles = true,\n styles = {},\n ...props\n}: FpBadgeProps) => {\n return (\n <FP as={elm} role={role} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nBadge.styles = defStyles\nBadge.displayName = 'Badge'\n","import { ComponentProps } from '#/types'\n// import React from 'react'\nimport FP from '#components/fp'\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * The type of the button.\n */\n type: 'button' | 'submit' | 'reset'\n\n /**\n * Button label/content\n */\n children: React.ReactNode\n\n /**\n * Button styles and props\n */\n styles?: object\n\n /**\n * button classes\n */\n classes?: string\n\n /**\n * @deprecated import styles Button.styles\n * default button styles\n */\n defaultStyles?: boolean\n\n /**\n * Button pointer-down event (pointerOver, pointerLeave)\n */\n pointerDown?: (e: React.PointerEvent) => void\n\n /**\n * Button pointer-down event (pointerOver, pointerLeave)\n */\n pointerOver?: (e: React.PointerEvent) => void\n\n /**\n * Pointer leave event handler for the Button component.\n *\n * @param {React.PointerEvent} e - The pointer event\n */\n pointerLeave?: (e: React.PointerEvent) => void\n}\n\n/**\n * Default styles object for the Button component.\n *\n * Defines CSS custom properties used for styling buttons.\n *\n * @property {string} --btn-px - Padding left/right\n * @property {string} --btn-py - Padding top/bottom\n * @property {string} --btn-dsp - Display value\n * @property {string} --btn-place - place-items value\n * @property {string} --btn-justify - justify-content value\n * @property {string} --btn-cursor - Cursor value\n * @property {string} --btn-border - Border value\n * @property {string} --btn-color - Text color\n * @property {string} --btn-bg - Background color\n * @property {string} --btn-radius - Border radius\n */\nexport const defStyles = {\n paddingInline: 'var(--btn-px, 1.4rem)',\n paddingBlock: 'var(--btn-py, 0.8rem)',\n display: 'var(--btn-dsp, inline-flex)',\n placeItems: 'var(--btn-place, center)',\n justifyContent: 'var(--btn-justify, center)',\n cursor: 'var(--btn-cursor, pointer)',\n border: 'var(--btn-border, none)',\n color: 'var(--btn-color, white)',\n backgroundColor: 'var(--btn-bg, royalblue)',\n borderRadius: 'var(--btn-radius, 0.2rem)',\n}\n\n/*\n * Button component\n *\n * Renders a <button> element with custom props.\n *\n * @param {ButtonProps} props - The component props\n * @param {\"button\" | \"submit\" | \"reset\"} [props.type=\"button\"] - The button type\n * @param {ReactNode} props.children - The button label/content\n * @param {Object} [props.styles] - Custom CSS styles\n * @param {boolean} [props.disabled=false] - Whether the button is disabled\n * @param {string} [props.classes] - Custom CSS classes\n * @param {function} [props.pointerDown] - Pointer down event handler\n * @param {function} [props.pointerOver] - Pointer over event handler\n * @param {function} [props.pointerLeave] - Pointer leave event handler\n * @param {boolean} [props.defaultStyles=false] - Whether to apply default styles\n *\n * @returns {JSX.Element} The rendered <button> element\n */\n\nexport const Button = ({\n type = 'button',\n children,\n styles,\n disabled,\n classes,\n pointerDown,\n pointerOver,\n pointerLeave,\n ...props\n}: ButtonProps) => {\n const handlePointerDown = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerDown?.(e)\n }\n }\n\n const handlePointerOver = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerOver?.(e)\n }\n }\n\n const handlePointerLeave = (e: React.PointerEvent<HTMLButtonElement>) => {\n if (!disabled) {\n pointerLeave?.(e)\n }\n }\n\n /* Returning a button element. */\n return (\n <button\n type={type}\n onPointerOver={handlePointerOver}\n onPointerDown={handlePointerDown}\n onPointerLeave={handlePointerLeave}\n style={styles}\n aria-disabled={disabled}\n {...props}\n >\n {children}\n </button>\n )\n //\n}\n\nexport default Button\nButton.styles = defStyles\nButton.displayName = 'Button'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\n/*\n * CardProps interface\n *\n * Extends ComponentProps. Defines props for the Card component.\n *\n * @property {('div' | 'aside' | 'section' | 'article')} [elm='div'] - HTML element to render as\n */\nexport interface CardProps extends ComponentProps {\n elm?: 'div' | 'aside' | 'section' | 'article'\n}\n\n/*\n * Default styles for the Card component.\n *\n * Defines CSS custom properties for styling cards.\n *\n * @property {string} --card-p - Padding\n * @property {string} --card-bg - Background color\n * @property {string} --card-shadow - Box shadow\n * @property {string} --card-rds - Border radius\n * @property {string} --card-brd - Border\n * @property {string} --card-cl - Text color\n */\nexport const defaultStyles = {\n padding: 'var(--card-p, 2rem)',\n backgroundColor: 'var(--card-bg, white)',\n boxShadow: 'var(--card-shadow, 0 0 0.5rem 0.1rem rgba(0, 0, 0, 0.1))',\n borderRadius: 'var(--card-rds, 0.2ßrem)',\n border: 'var(--card-brd, none)',\n color: 'var(--card-cl, black)',\n}\n\n/*\n * Card component\n *\n * Renders a card container.\n *\n * @param {CardProps} props - Component props\n * @param {('div' | 'aside' | 'section' | 'article')} [props.elm='div'] - Element to render as\n * @param {Object} [props.styles] - CSS styles to apply\n * @param {ReactNode} props.children - Card content\n * @param {boolean} [props.renderStyles=true] - Whether to render default styles\n * @param {string} [props.dataStyle] - data-card attribute value\n * @param {string} [props.id] - Unique ID\n *\n * @returns {ReactElement} Card component\n */\nexport const Card = ({\n elm = 'div',\n styles,\n children,\n renderStyles = true,\n dataStyle,\n id,\n ...props\n}: CardProps) => {\n return (\n <FP\n as={elm}\n id={id}\n styles={styles}\n renderStyles={renderStyles}\n data-card={dataStyle}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nCard.styles = defaultStyles\n\nCard.displayName = 'Card'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nimport { Button } from '../buttons/button'\nimport React, { MouseEventHandler, useEffect } from 'react'\n\nexport interface DialogProps extends ComponentProps {\n /**\n * React ref for dialog element\n */\n modalRef: React.RefObject<HTMLDialogElement>\n /**\n * Handle close modal event\n */\n closeModal?: (e: React.SyntheticEvent<HTMLDialogElement>) => void\n /**\n * open modal on mount\n */\n openOnMount?: boolean\n}\n/**\n * Dialog component\n */\nexport const Dialog = ({\n id,\n children,\n modalRef,\n openOnMount,\n ...props\n}: DialogProps) => {\n\n const handleCloseModal = (e: React.SyntheticEvent<HTMLDialogElement>) => {\n if (e.currentTarget === e.target) {\n e.currentTarget.close()\n }\n }\n\n return (\n <FP\n as=\"dialog\"\n id={id}\n ref={modalRef}\n open={openOnMount}\n onClick={handleCloseModal}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nDialog.displayName = 'Dialog'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nexport interface DropdownProps extends ComponentProps {\n elm?: 'div' | 'aside'\n title: string\n children: React.ReactNode\n onToggle?: (e: React.SyntheticEvent) => void\n}\n\nexport const defaultStyles = {\n padding: 'var(--card-p, 1.2rem)',\n backgroundColor: 'var(--card-bg, white)',\n}\n\nexport const Details = ({\n title,\n children,\n styles,\n renderStyles = true,\n onToggle,\n ...props\n}: DropdownProps) => {\n const handleToggle = (e: React.SyntheticEvent) => {\n onToggle?.(e)\n }\n return (\n <FP as=\"details\" title={title} onToggle={handleToggle} styles={styles}>\n {children}\n </FP>\n )\n}\nDetails.styles = defaultStyles\nexport default Details\nDetails.displayName = 'Details'\n","// import { defStyles } from \"@fpkit/fp-button/lib/components/button\"\nimport FP from '../fp'\n\nexport interface SummaryPros {\n children: React.ReactNode\n styles?: {}\n renderStyles?: boolean\n}\n\nexport const defaultStyles = {\n listStyle: 'none',\n justifyContent: 'var(--summary-justify, space-between)',\n color: 'var(--summary-color, currentColor)',\n cursor: 'var(--detail-cursor, pointer)',\n}\n\nexport const Summary = ({\n children,\n styles,\n renderStyles = true,\n ...props\n}: SummaryPros) => {\n return (\n <FP as=\"summary\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nSummary.styles = defaultStyles\nSummary.displayName = 'Summary'\nexport default Summary\n","import { ComponentProps } from '../../types'\nimport { Details } from './dropdown-details'\nimport { Summary } from './dropdown-summary'\n\nexport interface DropdownProps extends ComponentProps {\n title: string\n summary: React.ReactNode\n toggle?: (e: React.SyntheticEvent) => void\n}\n\nconst defaultStyles = {\n display: 'flex',\n placeContent: 'flex-start',\n placeItems: 'center',\n gap: '.7rem',\n border: 'var(--summary-border, solid 1px #ccc)',\n transition: 'all 0.2s ease',\n backgroundColor: 'var(--summary-bg, whitesmoke)',\n padding: 'var(--details-pd, 1.2rem)',\n minWidth: 'var(--summary-min-w, 80vw)',\n maxWidth: 'var(--summary-min-w, 80vw)',\n}\n\nexport const Dropdown = ({\n styles,\n children,\n summary,\n toggle,\n renderStyles = true,\n ...props\n}: DropdownProps) => {\n return (\n <Details styles={styles} onToggle={toggle} {...props}>\n <Summary>{summary}</Summary>\n {children}\n </Details>\n )\n}\n\nDropdown.styles = defaultStyles\nDropdown.Summary = Summary\nDropdown.Details = Details\n\nexport default Dropdown\nDropdown.displayName = 'Dropdown'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport interface FieldProps extends ComponentProps {\n /**\n * Defines the for attribute of the label element\n */\n labelFor: string\n /**\n * The label content\n */\n label: React.ReactNode\n}\n\nexport const defaultStyles = {}\n\n/**\n * Field component that renders a label and children wrapped in a div element.\n * @param labelFor Defines the for attribute of the label element\n * @param styles Custom styles to be applied to the component\n * @param label The label content\n * @param children The children to be rendered inside the component\n * @param props Additional props to be spread to the component\n */\nexport const Field = ({\n labelFor,\n styles,\n label,\n children,\n ...props\n}: FieldProps) => {\n return (\n <FP as=\"div\" styles={styles} data-style=\"fields\">\n <label htmlFor={labelFor}>{label}</label>\n {children}\n </FP>\n )\n}\n\nField.styles = defaultStyles\n\nField.displayName = 'Field'\n","/**\n * @fileoverview Landmarks components\n */\n\nimport FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport const Header = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"header\" {...props} styles={styles}>\n <FP as=\"section\">{children}</FP>\n </FP>\n )\n}\n\nexport const Main = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"main\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Footer = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"footer\" styles={styles} {...props}>\n <FP as=\"section\">{children || 'Copyright © 2022'}</FP>\n </FP>\n )\n}\n\nexport const Aside = ({ children, styles = {}, ...props }: ComponentProps) => {\n return (\n <FP as=\"aside\" styles={styles} {...props}>\n <FP as=\"section\">{children}</FP>\n </FP>\n )\n}\n\nexport const Section = ({\n children,\n styles = {},\n ...props\n}: ComponentProps) => {\n return (\n <FP as=\"section\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Article = ({\n children,\n styles = {},\n ...props\n}: ComponentProps) => {\n return (\n <FP as=\"article\" styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nHeader.displayName = 'Header'\nMain.displayName = 'Main'\nFooter.displayName = 'Footer'\nAside.displayName = 'Aside'\nSection.displayName = 'Section'\nArticle.displayName = 'Article'\n","import FP from '../fp'\nimport { ComponentProps } from 'src/types'\n\n/*\n * ImageProps interface\n *\n * Extends ComponentProps and defines additional props for the Img component.\n *\n * @property {string} [src] - The image source URL\n * @property {string} alt - Required alt text for image accessibility\n * @property {number} width - Required width of image\n * @property {number} [height] - Optional height of image\n * @property {\"eager\" | \"lazy\"} [loading=\"lazy\"] - Loading behavior\n * @property {string} [placeholder] - Fallback placeholder image\n * @property {\"high\" | \"low\"} [fetchpriority=\"low\"] - Image fetch priority\n * @property {\"sync\" | \"async\" | \"auto\"} [decoding=\"auto\"] - Decode setting\n * @property {function} [imgError] - Error callback\n * @property {function} [imgLoaded] - Loaded callback\n */\n\nexport interface ImageProps extends ComponentProps {\n alt: string\n src?: string\n width?: number\n height?: number\n loading?: 'eager' | 'lazy'\n placeholder?: string\n fetchpriority?: 'high' | 'low'\n decoding?: 'sync' | 'async' | 'auto'\n imgError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void\n imgLoaded?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void\n}\n\n/*\n * Default styles object for the Img component.\n *\n * @property {string} maxWidth - Sets the max-width CSS property. Default is 'var(--img-w, 100%)'.\n * @property {string} height - Sets the height CSS property. Default is 'var(--img-h, auto)'.\n * @property {string} objectFit - Sets the object-fit CSS property. Default is 'var(--img-obj-fit, cover)'.\n * @property {string} objectPosition - Sets the object-position CSS property. Default is 'var(--img-position, center center)'.\n * @property {string} aspectRatio - Sets the aspect-ratio CSS property. Default is 'var(--img-ratio, auto 2/3)'.\n */\n\nexport const defaultStyles = {\n maxWidth: 'var(--img-w, 100%)',\n height: 'var(--img-h, auto)',\n objectFit: 'var(--img-obj-fit, cover)',\n objectPosition: 'var(--img-position, center center)',\n aspectRatio: 'var(--img-ratio, auto 2/3)',\n display: 'var(--img-display, initial)',\n}\n\n/*\n * Img component\n *\n * Renders an <img> element with custom props.\n *\n * @param {string} src - The image source URL.\n * @param {string} alt - The alt text for the image.\n * @param {number} [width=480] - The width of the image.\n * @param {number} [height] - The height of the image.\n * @param {Object} [styles] - Additional CSS styles to apply.\n * @param {boolean} [renderStyles=true] - Whether to render the default styles.\n * @param {\"eager\" | \"lazy\"} [loading=\"lazy\"] - The loading attribute.\n * @param {string} [placeholder] - A placeholder image URL.\n * @param {\"high\" | \"low\"} [fetchpriority=\"low\"] - The fetchpriority attribute.\n * @param {\"sync\" | \"async\" | \"auto\"} [decoding=\"auto\"] - The decoding attribute.\n * @param {function} [imgLoaded] - Callback when image loads successfully.\n * @param {function} [imgError] - Callback when image errors.\n *\n * @returns {JSX.Element} The Img component.\n */\nexport const Img = ({\n src,\n alt,\n width = 480,\n height,\n styles,\n loading = 'lazy',\n placeholder = `https://via.placeholder.com/${width}?text=PLACEHOLDER`,\n fetchpriority = 'low',\n decoding = 'auto',\n imgLoaded,\n imgError,\n ...props\n}: ImageProps) => {\n const handleImgError = (\n e: React.SyntheticEvent<HTMLImageElement, Event>,\n ): void => {\n if (imgError) {\n imgError?.(e)\n return\n }\n if (e.currentTarget.src !== placeholder) {\n e.currentTarget.src = placeholder\n }\n }\n\n const handleImgLoad = (\n e: React.SyntheticEvent<HTMLImageElement, Event>,\n ): void => {\n imgLoaded?.(e)\n }\n\n return (\n <FP\n as=\"img\"\n src={src}\n alt={alt}\n width={width}\n height={height || 'auto'}\n loading={loading}\n style={styles}\n onError={handleImgError}\n onLoad={handleImgLoad}\n {...props}\n />\n )\n}\nImg.styles = defaultStyles\nImg.displayName = 'Img'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\n// import\n\nexport interface InputProps extends Omit<ComponentProps, 'children'> {\n /**\n * The type of the input.\n */\n type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search'\n /**\n * The input name\n */\n name?: string\n /**\n * The input value\n */\n value?: string\n /**\n * The input placeholder\n */\n placeholder?: string\n /**\n * Pass a function to handle input change events\n */\n inputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n /**\n * Pass a function to handle input focus events\n */\n inputBlur?: (e: React.FocusEvent<HTMLInputElement>) => void\n /**\n * Function prop to handle input keydown events\n */\n inputDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void\n /**\n * Input is required or not\n */\n required?: boolean\n /**\n * Input id attribute\n */\n id: string\n /**\n * Set the element as disabled\n */\n isDisabled?: boolean\n /**\n * Set the element as readonly\n */\n readonly?: boolean\n /**\n * ref to the input element\n */\n inputRef?: React.RefObject<HTMLInputElement>\n /**\n * Input styles\n */\n styles?: {}\n /**\n * input classes\n */\n classes?: string\n}\n\nexport const defaultStyles = {\n minWidth: 'var(--input-min-w, 60%)',\n}\n\n/**\n * Input component that renders an HTML input element.\n * @param {InputProps} props - The input component props.\n * @returns {JSX.Element} - The input component.\n */\nexport const Input = ({\n type = 'text',\n name,\n value,\n placeholder,\n id,\n styles,\n classes,\n isDisabled,\n readonly,\n required,\n inputRef,\n inputChange,\n inputBlur,\n inputDown,\n ...props\n}: InputProps): JSX.Element => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (inputChange && !isDisabled) {\n inputChange?.(e)\n }\n }\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n if (inputBlur && !isDisabled) {\n inputBlur?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (inputDown && !isDisabled) {\n e.preventDefault()\n inputDown?.(e)\n }\n }\n\n return (\n <FP\n as=\"input\"\n id={id}\n type={type}\n placeholder={placeholder}\n className={classes}\n styles={styles}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n value={value}\n name={name}\n ref={inputRef}\n aria-disabled={isDisabled}\n tab-index={isDisabled ? -1 : undefined}\n aria-readonly={readonly}\n readOnly={readonly}\n {...props}\n />\n )\n}\nInput.styles = defaultStyles\nInput.displayName = 'Input'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\n\nexport type LinkProps = Partial<ComponentProps> & {\n href: string\n target?: string\n rel?: string\n children: React.ReactNode\n prefetch?: boolean\n onPointerDown?: (e: React.PointerEvent<HTMLAnchorElement>) => void\n}\n\nexport const Link = ({\n href,\n target,\n rel,\n children,\n styles = {},\n prefetch = true,\n onPointerDown,\n ...props\n}: LinkProps) => {\n let relValue = rel\n\n if (target === '_blank')\n relValue = `noopener noreferrer ${!!prefetch ? 'prefetch' : ''}`\n\n const handleOnpointerDown = (e: React.PointerEvent<HTMLAnchorElement>) => {\n if (onPointerDown) onPointerDown?.(e)\n }\n\n return (\n <FP\n as=\"a\"\n href={href}\n target={target}\n styles={styles}\n rel={relValue}\n onPointerDown={handleOnpointerDown}\n {...props}\n >\n {children ?? 'Link'}\n </FP>\n )\n}\n\nexport default Link\nLink.displayName = 'Link'\n","import * as React from 'react'\nimport FP from '../fp'\n\nexport interface ListProps {\n styles?: {}\n classes?: string\n children: React.ReactNode\n type: 'ul' | 'ol' | 'dl'\n variant: string\n}\n\nexport const List = ({\n children,\n classes,\n type = 'ul',\n variant,\n styles,\n ...props\n}: ListProps) => {\n return (\n <FP\n as={type}\n data-variant={variant}\n className={classes}\n style={styles}\n {...props}\n >\n {children}\n </FP>\n )\n}\n\nexport default List\n","import React from 'react'\nimport { ComponentProps } from '../../types'\nimport { Button } from '../buttons/button'\nimport { Dialog } from './dialog'\n\nexport interface ModalProps extends ComponentProps {\n /**\n * The child component/content for open button\n */\n openChild?: React.ReactNode\n /**\n * The child component/content for close button\n */\n closeChild?: React.ReactNode\n /**\n * The child component/content for modal header\n */\n modalHeader?: React.ReactNode\n /**\n * The child component/content for modal footer\n */\n modalFooter?: React.ReactNode\n /**\n * The child component/content for modal body\n */\n children: React.ReactNode\n /**\n * Open modal on mount when set to true\n */\n showOpen?: boolean\n}\nexport const Modal = ({\n openChild,\n closeChild,\n modalHeader,\n modalFooter,\n children,\n showOpen = false,\n ...props\n}: ModalProps) => {\n const dialogRef = React.useRef<HTMLDialogElement>(null)\n const openModal = (): void => {\n if (dialogRef.current) {\n if(showOpen)\n dialogRef.current.show()\n else\n dialogRef.current.showModal()\n }\n }\n const closeModal = () => {\n if (dialogRef.current) {\n dialogRef.current.close()\n }\n }\n\n return (\n <>\n <Dialog modalRef={dialogRef} openOnMount={showOpen} {...props}>\n <section>\n {modalHeader}\n {children}\n {modalFooter ?? (\n <div>\n <Button\n type=\"button\"\n pointerDown={() => {\n closeModal()\n }}\n >\n {closeChild || 'Close'}\n </Button>{' '}\n </div>\n )}\n </section>\n </Dialog>\n { !showOpen && (\n <Button type=\"button\" pointerDown={openModal}>\n {openChild || 'Open Modal'}\n </Button>\n )}\n </>\n )\n}\n\nModal.displayName = 'Modal'\n","import FP from '../fp'\nimport { ComponentProps } from '../../types'\nimport React from 'react'\n\n\nexport const Caption = ({ children, ...props }: ComponentProps) => {\n return (\n <FP as=\"caption\" {...props}>\n {children}\n </FP>\n )\n}\n\nexport const Thead = ({ children, ...props }: ComponentProps) => (\n <FP as=\"thead\" {...props}>\n {children}\n </FP>\n)\n\nexport const Tbody = ({ children, ...props }: ComponentProps) => (\n <FP as=\"tbody\" {...props}>\n {children}\n </FP>\n)\n\nexport const Tr = ({ children, ...props }: ComponentProps) => (\n <FP as=\"tr\" {...props}>\n {children}\n </FP>\n)\n\nexport const Td = ({ children, ...props }: ComponentProps) => (\n <FP as=\"td\" {...props}>\n {children}\n </FP>\n)\n\nexport const Table = ({ id, dataStyle, children, ...props }: ComponentProps) => {\n return (\n <FP\n as=\"section\"\n id={id}\n {...props}\n data-style=\"table-wrapper\"\n >\n <table>{children}</table>\n </FP>\n )\n}\n\nTable.displayName = 'Table'\nCaption.displayName = 'Caption'\nThead.displayName = 'Thead'\nTbody.displayName = 'Tbody'\nTr.displayName = 'Tr'\nTd.displayName = 'Td'\n\n","import { Table, Caption, Thead, Tbody, Td, Tr } from \"./table-elements\"\nimport { ComponentProps } from '../../types'\n\nexport interface TableProps extends ComponentProps {\n tblHead: React.ReactNode\n tblBody: React.ReactNode\n tblCaption?: React.ReactNode\n}\n\nexport type dataType = {id: number, items: string[]}[]\n\n/**\n * Render the `thead` by passing an array of names\n */\nexport const RenderHead = (data: []) => {\n const head = data.map((item, index) => {\n return <th key={index}>{item}</th>\n })\n return (\n <tr>\n {head}\n </tr>\n )\n}\n\n/**\n * Render the table body `tr`, `td` with the data provided\n */\nexport const RenderBody = (data: {}[]) => {\n const rec = data.map((item, index) => {\n return (\n <tr key={index}>\n {/* <td>{item?.id}</td>\n <td>{item?.items}</td> */}\n </tr>\n )\n })\n return (<Tbody>{rec}</Tbody>)\n}\n\n/**\n * Render the table placing `caption`, `thead` and `tbody` in the correct order\n * caption is optional\n */\nexport const RenderTable = ({tblBody, tblCaption, tblHead}: TableProps) => {\n return (\n <Table>\n {tblCaption && <Caption>{tblCaption}</Caption>}\n <Thead>\n <Tr>\n {tblHead}\n </Tr>\n </Thead>\n <Tbody>\n {tblBody}\n </Tbody>\n </Table>\n )\n}\n\nRenderTable.displayName = 'TBL'\nRenderBody.displayName = 'renderBody'\nRenderHead.displayName = 'renderHead'\n","import FP from '../fp'\nimport React from 'react'\n\nexport type TextElements =\n | 'p'\n | 'span'\n | 'a'\n | 'strong'\n | 'em'\n | 'small'\n | 's'\n | 'cite'\n | 'time'\n | 'code'\n | 'kbd'\n | 'sub'\n | 'sup'\n | 'i'\n | 'b'\n | 'u'\n | 'mark'\n | 'span'\n | 'blockquote'\nexport interface TextProps {\n /**\n * HTML element\n */\n elm?: TextElements\n children?: React.ReactNode\n text?: String\n styles?: {}\n}\n\nexport const Text = ({\n elm = 'p',\n text,\n styles,\n children,\n ...props\n}: TextProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children || text}\n </FP>\n )\n}\n\nexport const Span = ({\n elm = 'span',\n children,\n styles,\n ...props\n}: TextProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport interface TitleProps {\n /**\n * HTML headings\n */\n elm?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n children?: React.ReactNode\n styles?: {}\n}\n\nexport const Title = ({\n elm = 'h3',\n children,\n styles,\n ...props\n}: TitleProps) => {\n return (\n <FP as={elm} styles={styles} {...props}>\n {children}\n </FP>\n )\n}\n\nexport default Text\n\nText.displayName = 'Text'\nTitle.displayName = 'Title'\nSpan.displayName = 'Span'\n","import FP from '../fp'\nimport { InputProps } from './inputs'\nimport { SharedInputProps } from '../../types'\n\nexport interface TextareaProps extends SharedInputProps {\n /**\n * The number of lines in textarea\n */\n rows?: number\n /**\n * The number of columns in textarea\n */\n cols?: number\n /**\n * Textarea react ref\n */\n textareaRef?: React.RefObject<HTMLTextAreaElement>\n /**\n * Textarea change event handler\n */\n textareaChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void\n /**\n * Textarea area blur event handler\n */\n textareaBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void\n /**\n * Textarea keydown event handler\n */\n textareaDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void\n}\n\nexport const defaultStyles = {}\n\nexport const Textarea = ({\n value,\n rows,\n cols,\n id,\n required,\n disabled,\n readonly,\n textareaBlur,\n textareaChange,\n textareaDown,\n textareaRef,\n ...props\n}: TextareaProps) => {\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (textareaChange && !disabled) {\n textareaChange(e)\n }\n }\n\n const handleBlur = (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (textareaBlur && !disabled) {\n textareaBlur?.(e)\n }\n }\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (textareaDown && !disabled) {\n textareaDown?.(e)\n }\n }\n\n return (\n <FP\n as=\"textarea\"\n ref={textareaRef}\n rows={rows}\n cols={cols}\n styles={{ ...defaultStyles }}\n data-style=\"textarea\"\n id={id}\n required={required}\n value={value}\n aria-disabled={disabled}\n readOnly={readonly}\n onChange={handleChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n {...props}\n />\n )\n}\n\nTextarea.displayName = 'Textarea'\n"]}
|
package/dist/index.d.cts
DELETED
|
@@ -1,566 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React$1 from 'react';
|
|
3
|
-
import React__default from 'react';
|
|
4
|
-
import { C as ComponentProps$1 } from './icon-e6044c73.js';
|
|
5
|
-
export { I as Icon } from './icon-e6044c73.js';
|
|
6
|
-
|
|
7
|
-
interface FpBadgeProps {
|
|
8
|
-
elm?: 'span' | 'p';
|
|
9
|
-
children: React__default.ReactNode;
|
|
10
|
-
role: 'note' | 'alert' | 'status';
|
|
11
|
-
renderStyles?: boolean;
|
|
12
|
-
styles?: {};
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @description Creates a Badge component that wraps a child element with a badge.
|
|
16
|
-
* @param {string} elm - element type to render
|
|
17
|
-
* @param {string} role - aria role
|
|
18
|
-
* @param {any} children - child element to render
|
|
19
|
-
* @param {boolean} renderStyles - whether or not to render the default styles
|
|
20
|
-
* @param {object} styles - styles to pass to the FP component
|
|
21
|
-
* @param {object} props - additional props to pass to the FP component
|
|
22
|
-
* @returns {any} - returns the Badge component
|
|
23
|
-
*/
|
|
24
|
-
declare const Badge: {
|
|
25
|
-
({ elm, role, children, renderStyles, styles, ...props }: FpBadgeProps): react_jsx_runtime.JSX.Element;
|
|
26
|
-
styles: {
|
|
27
|
-
paddingInline: string;
|
|
28
|
-
paddingBlock: string;
|
|
29
|
-
color: string;
|
|
30
|
-
fontSize: string;
|
|
31
|
-
fontWeight: string;
|
|
32
|
-
fontFamily: string;
|
|
33
|
-
border: string;
|
|
34
|
-
borderRadius: string;
|
|
35
|
-
backgroundColor: string;
|
|
36
|
-
textDecoration: string;
|
|
37
|
-
textTransform: string;
|
|
38
|
-
};
|
|
39
|
-
displayName: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
43
|
-
/**
|
|
44
|
-
* The type of the button.
|
|
45
|
-
*/
|
|
46
|
-
type: 'button' | 'submit' | 'reset';
|
|
47
|
-
/**
|
|
48
|
-
* Button label/content
|
|
49
|
-
*/
|
|
50
|
-
children: React.ReactNode;
|
|
51
|
-
/**
|
|
52
|
-
* Button styles and props
|
|
53
|
-
*/
|
|
54
|
-
styles?: object;
|
|
55
|
-
/**
|
|
56
|
-
* button classes
|
|
57
|
-
*/
|
|
58
|
-
classes?: string;
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated import styles Button.styles
|
|
61
|
-
* default button styles
|
|
62
|
-
*/
|
|
63
|
-
defaultStyles?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Button pointer-down event (pointerOver, pointerLeave)
|
|
66
|
-
*/
|
|
67
|
-
pointerDown?: (e: React.PointerEvent) => void;
|
|
68
|
-
/**
|
|
69
|
-
* Button pointer-down event (pointerOver, pointerLeave)
|
|
70
|
-
*/
|
|
71
|
-
pointerOver?: (e: React.PointerEvent) => void;
|
|
72
|
-
/**
|
|
73
|
-
* Pointer leave event handler for the Button component.
|
|
74
|
-
*
|
|
75
|
-
* @param {React.PointerEvent} e - The pointer event
|
|
76
|
-
*/
|
|
77
|
-
pointerLeave?: (e: React.PointerEvent) => void;
|
|
78
|
-
}
|
|
79
|
-
declare const Button: {
|
|
80
|
-
({ type, children, styles, disabled, classes, pointerDown, pointerOver, pointerLeave, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
81
|
-
styles: {
|
|
82
|
-
paddingInline: string;
|
|
83
|
-
paddingBlock: string;
|
|
84
|
-
display: string;
|
|
85
|
-
placeItems: string;
|
|
86
|
-
justifyContent: string;
|
|
87
|
-
cursor: string;
|
|
88
|
-
border: string;
|
|
89
|
-
color: string;
|
|
90
|
-
backgroundColor: string;
|
|
91
|
-
borderRadius: string;
|
|
92
|
-
};
|
|
93
|
-
displayName: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
interface ComponentProps {
|
|
97
|
-
/**
|
|
98
|
-
* The default child content/component to render.
|
|
99
|
-
*/
|
|
100
|
-
children?: React.ReactNode;
|
|
101
|
-
/**
|
|
102
|
-
* Use defaylt component styles
|
|
103
|
-
*/
|
|
104
|
-
renderStyles?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Component id attribute
|
|
107
|
-
*/
|
|
108
|
-
id?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Styles object
|
|
111
|
-
*/
|
|
112
|
-
styles?: {};
|
|
113
|
-
/**
|
|
114
|
-
* Component class attribute
|
|
115
|
-
*/
|
|
116
|
-
classes?: string;
|
|
117
|
-
/**
|
|
118
|
-
* Style value for [data-style] attribute
|
|
119
|
-
*/
|
|
120
|
-
dataStyle?: string;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
interface SharedInputProps extends ComponentProps {
|
|
124
|
-
/**
|
|
125
|
-
* The input name
|
|
126
|
-
*/
|
|
127
|
-
name?: string;
|
|
128
|
-
/**
|
|
129
|
-
* The input value
|
|
130
|
-
*/
|
|
131
|
-
value?: string;
|
|
132
|
-
/**
|
|
133
|
-
* The input placeholder
|
|
134
|
-
*/
|
|
135
|
-
placeholder?: string;
|
|
136
|
-
/**
|
|
137
|
-
* Input is required or not
|
|
138
|
-
*/
|
|
139
|
-
required?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Input id attribute
|
|
142
|
-
*/
|
|
143
|
-
id: string;
|
|
144
|
-
/**
|
|
145
|
-
* Set the element as disabled
|
|
146
|
-
*/
|
|
147
|
-
disabled?: boolean;
|
|
148
|
-
/**
|
|
149
|
-
* Set the element as readonly
|
|
150
|
-
*/
|
|
151
|
-
readonly?: boolean;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
interface CardProps extends ComponentProps$1 {
|
|
155
|
-
elm?: 'div' | 'aside' | 'section' | 'article';
|
|
156
|
-
}
|
|
157
|
-
declare const Card: {
|
|
158
|
-
({ elm, styles, children, renderStyles, dataStyle, id, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
159
|
-
styles: {
|
|
160
|
-
padding: string;
|
|
161
|
-
backgroundColor: string;
|
|
162
|
-
boxShadow: string;
|
|
163
|
-
borderRadius: string;
|
|
164
|
-
border: string;
|
|
165
|
-
color: string;
|
|
166
|
-
};
|
|
167
|
-
displayName: string;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
interface DialogProps extends ComponentProps$1 {
|
|
171
|
-
/**
|
|
172
|
-
* React ref for dialog element
|
|
173
|
-
*/
|
|
174
|
-
modalRef: React__default.RefObject<HTMLDialogElement>;
|
|
175
|
-
/**
|
|
176
|
-
* Handle close modal event
|
|
177
|
-
*/
|
|
178
|
-
closeModal?: (e: React__default.SyntheticEvent<HTMLDialogElement>) => void;
|
|
179
|
-
/**
|
|
180
|
-
* open modal on mount
|
|
181
|
-
*/
|
|
182
|
-
openOnMount?: boolean;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Dialog component
|
|
186
|
-
*/
|
|
187
|
-
declare const Dialog: {
|
|
188
|
-
({ id, children, modalRef, openOnMount, ...props }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
189
|
-
displayName: string;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
interface DropdownProps$1 extends ComponentProps$1 {
|
|
193
|
-
elm?: 'div' | 'aside';
|
|
194
|
-
title: string;
|
|
195
|
-
children: React.ReactNode;
|
|
196
|
-
onToggle?: (e: React.SyntheticEvent) => void;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
interface SummaryPros {
|
|
200
|
-
children: React.ReactNode;
|
|
201
|
-
styles?: {};
|
|
202
|
-
renderStyles?: boolean;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
interface DropdownProps extends ComponentProps$1 {
|
|
206
|
-
title: string;
|
|
207
|
-
summary: React.ReactNode;
|
|
208
|
-
toggle?: (e: React.SyntheticEvent) => void;
|
|
209
|
-
}
|
|
210
|
-
declare const Dropdown: {
|
|
211
|
-
({ styles, children, summary, toggle, renderStyles, ...props }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
212
|
-
styles: {
|
|
213
|
-
display: string;
|
|
214
|
-
placeContent: string;
|
|
215
|
-
placeItems: string;
|
|
216
|
-
gap: string;
|
|
217
|
-
border: string;
|
|
218
|
-
transition: string;
|
|
219
|
-
backgroundColor: string;
|
|
220
|
-
padding: string;
|
|
221
|
-
minWidth: string;
|
|
222
|
-
maxWidth: string;
|
|
223
|
-
};
|
|
224
|
-
Summary: {
|
|
225
|
-
({ children, styles, renderStyles, ...props }: SummaryPros): react_jsx_runtime.JSX.Element;
|
|
226
|
-
styles: {
|
|
227
|
-
listStyle: string;
|
|
228
|
-
justifyContent: string;
|
|
229
|
-
color: string;
|
|
230
|
-
cursor: string;
|
|
231
|
-
};
|
|
232
|
-
displayName: string;
|
|
233
|
-
};
|
|
234
|
-
Details: {
|
|
235
|
-
({ title, children, styles, renderStyles, onToggle, ...props }: DropdownProps$1): react_jsx_runtime.JSX.Element;
|
|
236
|
-
styles: {
|
|
237
|
-
padding: string;
|
|
238
|
-
backgroundColor: string;
|
|
239
|
-
};
|
|
240
|
-
displayName: string;
|
|
241
|
-
};
|
|
242
|
-
displayName: string;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
interface FieldProps extends ComponentProps$1 {
|
|
246
|
-
/**
|
|
247
|
-
* Defines the for attribute of the label element
|
|
248
|
-
*/
|
|
249
|
-
labelFor: string;
|
|
250
|
-
/**
|
|
251
|
-
* The label content
|
|
252
|
-
*/
|
|
253
|
-
label: React.ReactNode;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Field component that renders a label and children wrapped in a div element.
|
|
257
|
-
* @param labelFor Defines the for attribute of the label element
|
|
258
|
-
* @param styles Custom styles to be applied to the component
|
|
259
|
-
* @param label The label content
|
|
260
|
-
* @param children The children to be rendered inside the component
|
|
261
|
-
* @param props Additional props to be spread to the component
|
|
262
|
-
*/
|
|
263
|
-
declare const Field: {
|
|
264
|
-
({ labelFor, styles, label, children, ...props }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
265
|
-
styles: {};
|
|
266
|
-
displayName: string;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
declare const Header: {
|
|
270
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
271
|
-
displayName: string;
|
|
272
|
-
};
|
|
273
|
-
declare const Main: {
|
|
274
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
275
|
-
displayName: string;
|
|
276
|
-
};
|
|
277
|
-
declare const Footer: {
|
|
278
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
279
|
-
displayName: string;
|
|
280
|
-
};
|
|
281
|
-
declare const Aside: {
|
|
282
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
283
|
-
displayName: string;
|
|
284
|
-
};
|
|
285
|
-
declare const Section: {
|
|
286
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
287
|
-
displayName: string;
|
|
288
|
-
};
|
|
289
|
-
declare const Article: {
|
|
290
|
-
({ children, styles, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
291
|
-
displayName: string;
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
interface ImageProps extends ComponentProps$1 {
|
|
295
|
-
alt: string;
|
|
296
|
-
src?: string;
|
|
297
|
-
width?: number;
|
|
298
|
-
height?: number;
|
|
299
|
-
loading?: 'eager' | 'lazy';
|
|
300
|
-
placeholder?: string;
|
|
301
|
-
fetchpriority?: 'high' | 'low';
|
|
302
|
-
decoding?: 'sync' | 'async' | 'auto';
|
|
303
|
-
imgError?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
304
|
-
imgLoaded?: (e: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
305
|
-
}
|
|
306
|
-
declare const Img: {
|
|
307
|
-
({ src, alt, width, height, styles, loading, placeholder, fetchpriority, decoding, imgLoaded, imgError, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
|
|
308
|
-
styles: {
|
|
309
|
-
maxWidth: string;
|
|
310
|
-
height: string;
|
|
311
|
-
objectFit: string;
|
|
312
|
-
objectPosition: string;
|
|
313
|
-
aspectRatio: string;
|
|
314
|
-
display: string;
|
|
315
|
-
};
|
|
316
|
-
displayName: string;
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
interface InputProps extends Omit<ComponentProps$1, 'children'> {
|
|
320
|
-
/**
|
|
321
|
-
* The type of the input.
|
|
322
|
-
*/
|
|
323
|
-
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search';
|
|
324
|
-
/**
|
|
325
|
-
* The input name
|
|
326
|
-
*/
|
|
327
|
-
name?: string;
|
|
328
|
-
/**
|
|
329
|
-
* The input value
|
|
330
|
-
*/
|
|
331
|
-
value?: string;
|
|
332
|
-
/**
|
|
333
|
-
* The input placeholder
|
|
334
|
-
*/
|
|
335
|
-
placeholder?: string;
|
|
336
|
-
/**
|
|
337
|
-
* Pass a function to handle input change events
|
|
338
|
-
*/
|
|
339
|
-
inputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
340
|
-
/**
|
|
341
|
-
* Pass a function to handle input focus events
|
|
342
|
-
*/
|
|
343
|
-
inputBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
344
|
-
/**
|
|
345
|
-
* Function prop to handle input keydown events
|
|
346
|
-
*/
|
|
347
|
-
inputDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
348
|
-
/**
|
|
349
|
-
* Input is required or not
|
|
350
|
-
*/
|
|
351
|
-
required?: boolean;
|
|
352
|
-
/**
|
|
353
|
-
* Input id attribute
|
|
354
|
-
*/
|
|
355
|
-
id: string;
|
|
356
|
-
/**
|
|
357
|
-
* Set the element as disabled
|
|
358
|
-
*/
|
|
359
|
-
isDisabled?: boolean;
|
|
360
|
-
/**
|
|
361
|
-
* Set the element as readonly
|
|
362
|
-
*/
|
|
363
|
-
readonly?: boolean;
|
|
364
|
-
/**
|
|
365
|
-
* ref to the input element
|
|
366
|
-
*/
|
|
367
|
-
inputRef?: React.RefObject<HTMLInputElement>;
|
|
368
|
-
/**
|
|
369
|
-
* Input styles
|
|
370
|
-
*/
|
|
371
|
-
styles?: {};
|
|
372
|
-
/**
|
|
373
|
-
* input classes
|
|
374
|
-
*/
|
|
375
|
-
classes?: string;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Input component that renders an HTML input element.
|
|
379
|
-
* @param {InputProps} props - The input component props.
|
|
380
|
-
* @returns {JSX.Element} - The input component.
|
|
381
|
-
*/
|
|
382
|
-
declare const Input: {
|
|
383
|
-
({ type, name, value, placeholder, id, styles, classes, isDisabled, readonly, required, inputRef, inputChange, inputBlur, inputDown, ...props }: InputProps): JSX.Element;
|
|
384
|
-
styles: {
|
|
385
|
-
minWidth: string;
|
|
386
|
-
};
|
|
387
|
-
displayName: string;
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
type LinkProps = Partial<ComponentProps$1> & {
|
|
391
|
-
href: string;
|
|
392
|
-
target?: string;
|
|
393
|
-
rel?: string;
|
|
394
|
-
children: React.ReactNode;
|
|
395
|
-
prefetch?: boolean;
|
|
396
|
-
onPointerDown?: (e: React.PointerEvent<HTMLAnchorElement>) => void;
|
|
397
|
-
};
|
|
398
|
-
declare const Link: {
|
|
399
|
-
({ href, target, rel, children, styles, prefetch, onPointerDown, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
400
|
-
displayName: string;
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
interface ListProps {
|
|
404
|
-
styles?: {};
|
|
405
|
-
classes?: string;
|
|
406
|
-
children: React$1.ReactNode;
|
|
407
|
-
type: 'ul' | 'ol' | 'dl';
|
|
408
|
-
variant: string;
|
|
409
|
-
}
|
|
410
|
-
declare const List: ({ children, classes, type, variant, styles, ...props }: ListProps) => react_jsx_runtime.JSX.Element;
|
|
411
|
-
|
|
412
|
-
interface ModalProps extends ComponentProps$1 {
|
|
413
|
-
/**
|
|
414
|
-
* The child component/content for open button
|
|
415
|
-
*/
|
|
416
|
-
openChild?: React__default.ReactNode;
|
|
417
|
-
/**
|
|
418
|
-
* The child component/content for close button
|
|
419
|
-
*/
|
|
420
|
-
closeChild?: React__default.ReactNode;
|
|
421
|
-
/**
|
|
422
|
-
* The child component/content for modal header
|
|
423
|
-
*/
|
|
424
|
-
modalHeader?: React__default.ReactNode;
|
|
425
|
-
/**
|
|
426
|
-
* The child component/content for modal footer
|
|
427
|
-
*/
|
|
428
|
-
modalFooter?: React__default.ReactNode;
|
|
429
|
-
/**
|
|
430
|
-
* The child component/content for modal body
|
|
431
|
-
*/
|
|
432
|
-
children: React__default.ReactNode;
|
|
433
|
-
/**
|
|
434
|
-
* Open modal on mount when set to true
|
|
435
|
-
*/
|
|
436
|
-
showOpen?: boolean;
|
|
437
|
-
}
|
|
438
|
-
declare const Modal: {
|
|
439
|
-
({ openChild, closeChild, modalHeader, modalFooter, children, showOpen, ...props }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
440
|
-
displayName: string;
|
|
441
|
-
};
|
|
442
|
-
|
|
443
|
-
interface TableProps extends ComponentProps$1 {
|
|
444
|
-
tblHead: React.ReactNode;
|
|
445
|
-
tblBody: React.ReactNode;
|
|
446
|
-
tblCaption?: React.ReactNode;
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Render the table placing `caption`, `thead` and `tbody` in the correct order
|
|
450
|
-
* caption is optional
|
|
451
|
-
*/
|
|
452
|
-
declare const RenderTable: {
|
|
453
|
-
({ tblBody, tblCaption, tblHead }: TableProps): react_jsx_runtime.JSX.Element;
|
|
454
|
-
displayName: string;
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
declare const Caption: {
|
|
458
|
-
({ children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
459
|
-
displayName: string;
|
|
460
|
-
};
|
|
461
|
-
declare const Thead: {
|
|
462
|
-
({ children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
463
|
-
displayName: string;
|
|
464
|
-
};
|
|
465
|
-
declare const Tbody: {
|
|
466
|
-
({ children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
467
|
-
displayName: string;
|
|
468
|
-
};
|
|
469
|
-
declare const Tr: {
|
|
470
|
-
({ children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
471
|
-
displayName: string;
|
|
472
|
-
};
|
|
473
|
-
declare const Td: {
|
|
474
|
-
({ children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
475
|
-
displayName: string;
|
|
476
|
-
};
|
|
477
|
-
declare const Table: {
|
|
478
|
-
({ id, dataStyle, children, ...props }: ComponentProps$1): react_jsx_runtime.JSX.Element;
|
|
479
|
-
displayName: string;
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
type TextElements = 'p' | 'span' | 'a' | 'strong' | 'em' | 'small' | 's' | 'cite' | 'time' | 'code' | 'kbd' | 'sub' | 'sup' | 'i' | 'b' | 'u' | 'mark' | 'span' | 'blockquote';
|
|
483
|
-
interface TextProps {
|
|
484
|
-
/**
|
|
485
|
-
* HTML element
|
|
486
|
-
*/
|
|
487
|
-
elm?: TextElements;
|
|
488
|
-
children?: React__default.ReactNode;
|
|
489
|
-
text?: string;
|
|
490
|
-
styles?: {};
|
|
491
|
-
}
|
|
492
|
-
declare const Text: {
|
|
493
|
-
({ elm, text, styles, children, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
494
|
-
displayName: string;
|
|
495
|
-
};
|
|
496
|
-
interface TitleProps {
|
|
497
|
-
/**
|
|
498
|
-
* HTML headings
|
|
499
|
-
*/
|
|
500
|
-
elm?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
501
|
-
children?: React__default.ReactNode;
|
|
502
|
-
styles?: {};
|
|
503
|
-
}
|
|
504
|
-
declare const Title: {
|
|
505
|
-
({ elm, children, styles, ...props }: TitleProps): react_jsx_runtime.JSX.Element;
|
|
506
|
-
displayName: string;
|
|
507
|
-
};
|
|
508
|
-
|
|
509
|
-
interface TextareaProps extends SharedInputProps {
|
|
510
|
-
/**
|
|
511
|
-
* The number of lines in textarea
|
|
512
|
-
*/
|
|
513
|
-
rows?: number;
|
|
514
|
-
/**
|
|
515
|
-
* The number of columns in textarea
|
|
516
|
-
*/
|
|
517
|
-
cols?: number;
|
|
518
|
-
/**
|
|
519
|
-
* Textarea react ref
|
|
520
|
-
*/
|
|
521
|
-
textareaRef?: React.RefObject<HTMLTextAreaElement>;
|
|
522
|
-
/**
|
|
523
|
-
* Textarea change event handler
|
|
524
|
-
*/
|
|
525
|
-
textareaChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
526
|
-
/**
|
|
527
|
-
* Textarea area blur event handler
|
|
528
|
-
*/
|
|
529
|
-
textareaBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
530
|
-
/**
|
|
531
|
-
* Textarea keydown event handler
|
|
532
|
-
*/
|
|
533
|
-
textareaDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
534
|
-
}
|
|
535
|
-
declare const Textarea: {
|
|
536
|
-
({ value, rows, cols, id, required, disabled, readonly, textareaBlur, textareaChange, textareaDown, textareaRef, ...props }: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
537
|
-
displayName: string;
|
|
538
|
-
};
|
|
539
|
-
|
|
540
|
-
type PolymorphicRef<C extends React__default.ElementType> = React__default.ComponentPropsWithRef<C>['ref'];
|
|
541
|
-
type AsProp<C extends React__default.ElementType> = {
|
|
542
|
-
as?: C;
|
|
543
|
-
};
|
|
544
|
-
type PropsToOmit<C extends React__default.ElementType, P> = keyof (AsProp<C> & P);
|
|
545
|
-
type PolymorphicComponentProp<C extends React__default.ElementType, Props = {}> = React__default.PropsWithChildren<Props & AsProp<C>> & Omit<React__default.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
546
|
-
type PolymorphicComponentPropWithRef<C extends React__default.ElementType, Props = {}> = PolymorphicComponentProp<C, Props> & {
|
|
547
|
-
ref?: PolymorphicRef<C>;
|
|
548
|
-
};
|
|
549
|
-
type FPProps<C extends React__default.ElementType> = PolymorphicComponentPropWithRef<C, {
|
|
550
|
-
renderStyles?: boolean;
|
|
551
|
-
styles?: {};
|
|
552
|
-
}>;
|
|
553
|
-
type FPComponent = <C extends React__default.ElementType = 'span'>(props: FPProps<C>) => React__default.ReactElement | any;
|
|
554
|
-
/**
|
|
555
|
-
* FP component is a polymorphic component that renders an HTML element with optional styles.
|
|
556
|
-
* @param {Object} props - Component props
|
|
557
|
-
* @param {React.ElementType} props.as - The HTML element to render. Defaults to 'div'.
|
|
558
|
-
* @param {boolean} props.renderStyles - Whether to render styles or not. Defaults to true.
|
|
559
|
-
* @param {Object} props.styles - The styles to apply to the component.
|
|
560
|
-
* @param {Object} props.defaultStyles - The default styles to apply to the component.
|
|
561
|
-
* @param {React.ReactNode} props.children - The children to render inside the component.
|
|
562
|
-
* @returns {React.ReactElement} - A React component that renders an HTML element with optional styles.
|
|
563
|
-
*/
|
|
564
|
-
declare const FP: FPComponent;
|
|
565
|
-
|
|
566
|
-
export { Article, Aside, Badge, FP as Box, Button, Caption, Card, Dialog, Dropdown, FP, Field, Footer, Header, Img, Input, Link, List, Main, Modal, Section, RenderTable as TBL, Table, FP as Tag, Tbody, Td, Text, Textarea, Thead, Title, Link as To, Tr };
|