@fpkit/acss 6.2.0 → 6.3.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.
Files changed (105) hide show
  1. package/libs/chunk-25KCUE3R.cjs +17 -0
  2. package/libs/chunk-25KCUE3R.cjs.map +1 -0
  3. package/libs/chunk-34NWHFHP.js +10 -0
  4. package/libs/chunk-34NWHFHP.js.map +1 -0
  5. package/libs/{chunk-SQ44OCJ2.js → chunk-6NMLU5FA.js} +2 -2
  6. package/libs/{chunk-GVVCXXKI.cjs → chunk-6YVR4TDM.cjs} +3 -3
  7. package/libs/chunk-DSQ2TUCR.js +7 -0
  8. package/libs/chunk-DSQ2TUCR.js.map +1 -0
  9. package/libs/{chunk-H6A2CUWA.js → chunk-VQTCTLFN.js} +2 -2
  10. package/libs/chunk-ZJ4RUKI2.cjs +14 -0
  11. package/libs/chunk-ZJ4RUKI2.cjs.map +1 -0
  12. package/libs/{chunk-H4JRUNKU.cjs → chunk-ZOPHCNFD.cjs} +3 -3
  13. package/libs/components/button.cjs +3 -3
  14. package/libs/components/button.d.cts +34 -1
  15. package/libs/components/button.d.ts +34 -1
  16. package/libs/components/button.js +1 -1
  17. package/libs/components/buttons/button.css +1 -1
  18. package/libs/components/buttons/button.css.map +1 -1
  19. package/libs/components/buttons/button.min.css +2 -2
  20. package/libs/components/buttons/icon-button.css +1 -0
  21. package/libs/components/buttons/icon-button.css.map +1 -0
  22. package/libs/components/buttons/icon-button.min.css +3 -0
  23. package/libs/components/dialog/dialog.cjs +4 -4
  24. package/libs/components/dialog/dialog.js +2 -2
  25. package/libs/components/icons/icon.d.cts +1 -1
  26. package/libs/components/icons/icon.d.ts +1 -1
  27. package/libs/components/link/link.css +1 -1
  28. package/libs/components/link/link.min.css +1 -1
  29. package/libs/components/modal.cjs +3 -3
  30. package/libs/components/modal.js +2 -2
  31. package/libs/components/popover/popover.cjs +3 -8
  32. package/libs/components/popover/popover.css +1 -0
  33. package/libs/components/popover/popover.css.map +1 -0
  34. package/libs/components/popover/popover.d.cts +54 -26
  35. package/libs/components/popover/popover.d.ts +54 -26
  36. package/libs/components/popover/popover.js +1 -2
  37. package/libs/components/popover/popover.min.css +3 -0
  38. package/libs/hooks.cjs +3 -6
  39. package/libs/hooks.cjs.map +1 -1
  40. package/libs/hooks.d.cts +30 -10
  41. package/libs/hooks.d.ts +30 -10
  42. package/libs/hooks.js +5 -1
  43. package/libs/hooks.js.map +1 -1
  44. package/libs/{icons-48788561.d.ts → icons-2c09535c.d.ts} +32 -32
  45. package/libs/icons.d.cts +1 -1
  46. package/libs/icons.d.ts +1 -1
  47. package/libs/index.cjs +35 -35
  48. package/libs/index.cjs.map +1 -1
  49. package/libs/index.css +1 -1
  50. package/libs/index.css.map +1 -1
  51. package/libs/index.d.cts +64 -5
  52. package/libs/index.d.ts +64 -5
  53. package/libs/index.js +9 -10
  54. package/libs/index.js.map +1 -1
  55. package/package.json +2 -2
  56. package/src/components/buttons/README.mdx +107 -11
  57. package/src/components/buttons/STYLES.mdx +182 -47
  58. package/src/components/buttons/button.scss +93 -16
  59. package/src/components/buttons/button.stories.tsx +149 -0
  60. package/src/components/buttons/button.test.tsx +12 -0
  61. package/src/components/buttons/button.tsx +50 -6
  62. package/src/components/buttons/icon-button.scss +45 -0
  63. package/src/components/buttons/icon-button.stories.tsx +200 -0
  64. package/src/components/buttons/icon-button.test.tsx +132 -0
  65. package/src/components/buttons/icon-button.tsx +72 -0
  66. package/src/components/form/select.tsx +55 -51
  67. package/src/components/link/link.scss +2 -2
  68. package/src/components/popover/README.mdx +478 -0
  69. package/src/components/popover/STYLES.mdx +389 -0
  70. package/src/components/popover/index.ts +3 -0
  71. package/src/components/popover/popover.scss +249 -0
  72. package/src/components/popover/popover.stories.tsx +315 -15
  73. package/src/components/popover/popover.test.tsx +249 -37
  74. package/src/components/popover/popover.tsx +165 -62
  75. package/src/hooks/popover/popover.tsx +26 -10
  76. package/src/hooks/popover/use-popover.tsx +30 -10
  77. package/src/hooks.ts +5 -0
  78. package/src/index.scss +1 -0
  79. package/src/index.ts +1 -0
  80. package/src/styles/buttons/button.css +78 -16
  81. package/src/styles/buttons/button.css.map +1 -1
  82. package/src/styles/buttons/icon-button.css +32 -0
  83. package/src/styles/buttons/icon-button.css.map +1 -0
  84. package/src/styles/index.css +268 -18
  85. package/src/styles/index.css.map +1 -1
  86. package/src/styles/link/link.css +2 -2
  87. package/src/styles/popover/popover.css +190 -0
  88. package/src/styles/popover/popover.css.map +1 -0
  89. package/src/types/popover.d.ts +64 -0
  90. package/libs/chunk-4I5MF54P.js +0 -8
  91. package/libs/chunk-4I5MF54P.js.map +0 -1
  92. package/libs/chunk-GCGKYLDG.js +0 -7
  93. package/libs/chunk-GCGKYLDG.js.map +0 -1
  94. package/libs/chunk-NZVSXRTB.cjs +0 -16
  95. package/libs/chunk-NZVSXRTB.cjs.map +0 -1
  96. package/libs/chunk-PDD4N5P5.cjs +0 -10
  97. package/libs/chunk-PDD4N5P5.cjs.map +0 -1
  98. package/libs/chunk-S7NIA6PI.cjs +0 -17
  99. package/libs/chunk-S7NIA6PI.cjs.map +0 -1
  100. package/libs/chunk-X2RDXWH5.js +0 -10
  101. package/libs/chunk-X2RDXWH5.js.map +0 -1
  102. /package/libs/{chunk-SQ44OCJ2.js.map → chunk-6NMLU5FA.js.map} +0 -0
  103. /package/libs/{chunk-GVVCXXKI.cjs.map → chunk-6YVR4TDM.cjs.map} +0 -0
  104. /package/libs/{chunk-H6A2CUWA.js.map → chunk-VQTCTLFN.js.map} +0 -0
  105. /package/libs/{chunk-H4JRUNKU.cjs.map → chunk-ZOPHCNFD.cjs.map} +0 -0
package/libs/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export { Button, ButtonProps } from './components/button.js';
2
- export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.js';
1
+ import { ButtonProps } from './components/button.js';
2
+ export { Button } from './components/button.js';
3
3
  import React$1, { ReactNode } from 'react';
4
- import { I as IconProps } from './icons-48788561.js';
5
- export { a as Icon, b as IconProps } from './icons-48788561.js';
4
+ export { Card, Content as CardContent, Footer as CardFooter, CardProps, Title as CardTitle } from './components/card.js';
5
+ import { I as IconProps } from './icons-2c09535c.js';
6
+ export { a as Icon, b as IconProps } from './icons-2c09535c.js';
6
7
  export { default as Field, FieldProps } from './components/form/fields.js';
7
8
  export { default as Input } from './components/form/inputs.js';
8
9
  import { I as InputProps } from './form.types-d25ebfac.js';
@@ -22,6 +23,64 @@ export { default as Textarea } from './components/form/textarea.js';
22
23
  export { default as Breadcrumb, BreadcrumbProps, CustomRoute, useBreadcrumbSegments } from './components/breadcrumbs/breadcrumb.js';
23
24
  export { L as ListItemProps, a as ListProps } from './list.types-bf2c44c1.js';
24
25
 
26
+ /**
27
+ * XOR constraint: exactly one of aria-label or aria-labelledby is required.
28
+ * Passing both or neither is a TypeScript compile-time error.
29
+ * Satisfies WCAG 2.1 SC 1.1.1 (Non-text Content).
30
+ */
31
+ type WithAriaLabel = {
32
+ "aria-label": string;
33
+ "aria-labelledby"?: never;
34
+ };
35
+ type WithAriaLabelledBy = {
36
+ "aria-labelledby": string;
37
+ "aria-label"?: never;
38
+ };
39
+ type IconButtonProps = Omit<ButtonProps, "children"> & (WithAriaLabel | WithAriaLabelledBy) & {
40
+ /** The icon element rendered inside the button. */
41
+ icon: React$1.ReactNode;
42
+ /**
43
+ * Optional text shown alongside the icon at desktop widths.
44
+ * Hidden visually below the `$icon-label-bp` SCSS breakpoint (default 48rem / 768px),
45
+ * but remains in the accessibility tree — screen readers always announce it.
46
+ *
47
+ * NOTE: When `label` is used, the default `variant="icon"` removes padding.
48
+ * Override with a different variant (e.g. `variant="outline"`) for a padded layout.
49
+ */
50
+ label?: string;
51
+ /** Button type: button, submit, or reset. Required. */
52
+ type: "button" | "submit" | "reset";
53
+ };
54
+ /**
55
+ * Accessible icon button component. Wraps `Button` with:
56
+ * - Required accessible label via `aria-label` or `aria-labelledby` (XOR enforced)
57
+ * - Optional visible `label` text that hides on mobile (visual only — always in a11y tree)
58
+ * - `variant="icon"` default (square, no padding)
59
+ *
60
+ * @example
61
+ * // Icon only
62
+ * <IconButton type="button" aria-label="Close menu" icon={<CloseIcon />} />
63
+ *
64
+ * @example
65
+ * // Icon + label (label hides on mobile)
66
+ * <IconButton
67
+ * type="button"
68
+ * aria-label="Settings"
69
+ * icon={<SettingsIcon />}
70
+ * label="Settings"
71
+ * variant="outline"
72
+ * />
73
+ *
74
+ * @example
75
+ * // Labelled by external element
76
+ * <span id="btn-label">Delete item</span>
77
+ * <IconButton type="button" aria-labelledby="btn-label" icon={<TrashIcon />} />
78
+ */
79
+ declare const IconButton: {
80
+ ({ icon, label, variant, type, ...props }: IconButtonProps): React$1.JSX.Element;
81
+ displayName: string;
82
+ };
83
+
25
84
  /**
26
85
  * Valid severity levels for alerts.
27
86
  * Each severity has associated colors, icons, and ARIA attributes.
@@ -2837,4 +2896,4 @@ type FPComponent = {
2837
2896
  */
2838
2897
  declare const FP: FPComponent;
2839
2898
 
2840
- export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, Box, BoxProps, Caption, Checkbox, CheckboxProps, Cluster, ClusterProps, Col, ColProps, ComponentProps$1 as ComponentProps, Details, FP, Fieldset, Flex, FlexAlign, FlexAlignContent, FlexAlignSelf, FlexContainerElement, FlexDirection, FlexGap, FlexItemElement, FlexItemProps, FlexJustify, FlexProps, FlexSpacerProps, FlexVariant, FlexWrap, Footer, GridWithItem as Grid, GridItem, GridItemProps, GridProps, Header, Img, ImgProps, InputProps, Landmarks, Main, ResponsiveFlexProps, Row, RowProps, Section, Stack, StackProps, Table, Tag, TagProps, TagVariant, Tbody, Td, TextToSpeech, Thead, Tr, UI };
2899
+ export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, Box, BoxProps, ButtonProps, Caption, Checkbox, CheckboxProps, Cluster, ClusterProps, Col, ColProps, ComponentProps$1 as ComponentProps, Details, FP, Fieldset, Flex, FlexAlign, FlexAlignContent, FlexAlignSelf, FlexContainerElement, FlexDirection, FlexGap, FlexItemElement, FlexItemProps, FlexJustify, FlexProps, FlexSpacerProps, FlexVariant, FlexWrap, Footer, GridWithItem as Grid, GridItem, GridItemProps, GridProps, Header, IconButton, IconButtonProps, Img, ImgProps, InputProps, Landmarks, Main, ResponsiveFlexProps, Row, RowProps, Section, Stack, StackProps, Table, Tag, TagProps, TagVariant, Tbody, Td, TextToSpeech, Thead, Tr, UI };
package/libs/index.js CHANGED
@@ -2,20 +2,19 @@ import { b as b$2 } from './chunk-6ADHES7B.js';
2
2
  export { a as Textarea } from './chunk-6ADHES7B.js';
3
3
  export { a as Field } from './chunk-MAG46S3P.js';
4
4
  export { a as Caption, i as TBL, f as Table, c as Tbody, e as Td, b as Thead, d as Tr } from './chunk-FMIM3332.js';
5
- export { a as Dialog } from './chunk-H6A2CUWA.js';
5
+ export { a as Dialog } from './chunk-VQTCTLFN.js';
6
6
  export { c as Nav, b as NavItem, a as NavList } from './chunk-3ENBUQIB.js';
7
7
  export { c as List } from './chunk-RQSMWB3J.js';
8
- export { b as Popover } from './chunk-4I5MF54P.js';
8
+ export { a as Popover } from './chunk-DSQ2TUCR.js';
9
9
  export { a as Text } from './chunk-SPESKPUA.js';
10
10
  export { b as Heading, a as Title } from './chunk-AQAI6COH.js';
11
11
  export { b as Breadcrumb, a as useBreadcrumbSegments } from './chunk-2ZJV6KQ3.js';
12
- import './chunk-GCGKYLDG.js';
13
12
  import { b as b$1 } from './chunk-4F6SI5V5.js';
14
13
  export { a as Icon } from './chunk-4F6SI5V5.js';
15
14
  export { d as Card, b as CardContent, c as CardFooter, a as CardTitle } from './chunk-MJJKNHVH.js';
16
- export { a as Modal } from './chunk-SQ44OCJ2.js';
17
- import { b } from './chunk-X2RDXWH5.js';
18
- export { a as Button } from './chunk-X2RDXWH5.js';
15
+ export { a as Modal } from './chunk-6NMLU5FA.js';
16
+ import { b, a as a$2 } from './chunk-34NWHFHP.js';
17
+ export { a as Button } from './chunk-34NWHFHP.js';
19
18
  import { a as a$1 } from './chunk-F5EYMVQM.js';
20
19
  export { a as Input } from './chunk-F5EYMVQM.js';
21
20
  export { a as FP } from './chunk-6SAHIYCZ.js';
@@ -24,9 +23,9 @@ import './chunk-75QHTLFO.js';
24
23
  export { d as Link, d as To } from './chunk-M5ES7OWP.js';
25
24
  import { a } from './chunk-4KJP3L35.js';
26
25
  export { a as UI } from './chunk-4KJP3L35.js';
27
- import P, { useCallback, useMemo, useState, useEffect } from 'react';
26
+ import v, { useCallback, useMemo, useState, useEffect } from 'react';
28
27
 
29
- var qe={default:"",info:"Information: ",success:"Success: ",warning:"Warning: ",error:"Error: "},O=({severity:e})=>{let t=qe[e];return t?P.createElement("span",{className:"sr-only"},t):null};var Je=(e,t)=>({info:P.createElement(b$1.InfoSolid,{...t}),success:P.createElement(b$1.SuccessSolid,{...t}),warning:P.createElement(b$1.WarnSolid,{...t}),error:P.createElement(b$1.AlertSolid,{...t}),default:P.createElement(b$1.AlertSquareSolid,{...t})})[e],_=({severity:e,iconProps:t,hideIcon:o})=>{if(o)return null;let s=Je(e,t);return P.createElement(a,{"aria-hidden":"true",className:"alert-icon"},s)};var q=({title:e,titleLevel:t})=>{if(!e)return null;let o=t?`h${t}`:"strong";return P.createElement(a,{as:o,className:"alert-title"},e)};var W=({children:e,contentType:t})=>t==="node"?P.createElement(P.Fragment,null,e):P.createElement(a,{as:"p"},e);var K=({actions:e})=>e?P.createElement(a,{as:"div",className:"alert-actions"},e):null;var oe=P.memo(({onDismiss:e,iconSize:t=16})=>P.createElement(b,{type:"button",onClick:e,"aria-label":"Close alert",className:"alert-dismiss","data-btn":"icon sm"},P.createElement(b$1,null,P.createElement(b$1.Close,{size:t})))),se=oe;oe.displayName="DismissButton";var Xe={default:"polite",info:"polite",success:"polite",warning:"polite",error:"assertive"},R=P.forwardRef(({severity:e,variant:t,isVisible:o,dismissible:s,onDismiss:r,onInteractionStart:i,onInteractionEnd:l,autoFocus:a$1,title:p,titleLevel:y,children:u,contentType:f,actions:I,hideIcon:g,iconProps:S,...d},x)=>P.createElement(a,{as:"div",ref:x,role:"alert","aria-live":Xe[e],"aria-atomic":"true",className:`alert alert-${e}`,"data-alert":e,"data-visible":o,"data-variant":t,tabIndex:a$1?-1:void 0,onMouseEnter:i,onMouseLeave:l,onFocus:i,onBlur:l,...d},P.createElement(O,{severity:e}),P.createElement(_,{severity:e,iconProps:S,hideIcon:g}),P.createElement(a,{as:"div",classes:"alert-message"},P.createElement(q,{title:p,titleLevel:y}),P.createElement(W,{contentType:f},u),P.createElement(K,{actions:I})),s&&P.createElement(se,{onDismiss:r})));R.displayName="AlertView";var Qe=({open:e,onDismiss:t,dismissible:o,autoHideDuration:s,pauseOnHover:r,autoFocus:i,alertRef:l})=>{let[a,p]=P.useState(e),[y,u]=P.useState(e),[f,I]=P.useState(!1),g=P.useCallback(()=>{p(!1),setTimeout(()=>{u(!1),t?.();},300);},[t]);P.useEffect(()=>{e?(u(!0),p(!0)):p(!1);},[e]),P.useEffect(()=>{if(!s||!a||f)return;let x=setTimeout(()=>{g();},s);return ()=>clearTimeout(x)},[s,a,f,g]),P.useEffect(()=>{if(!o||!a)return;let x=h=>{h.key==="Escape"&&g();};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o,a,g]),P.useEffect(()=>{i&&a&&l.current&&l.current.focus();},[i,a,l]);let S=P.useCallback(()=>{r&&s&&I(!0);},[r,s]),d=P.useCallback(()=>{r&&s&&I(!1);},[r,s]);return {isVisible:a,shouldRender:y,handleDismiss:g,handleInteractionStart:S,handleInteractionEnd:d}},re=({open:e,severity:t="default",children:o,title:s,dismissible:r=!1,onDismiss:i,iconSize:l,iconProps:a,hideIcon:p,autoHideDuration:y,pauseOnHover:u=!0,titleLevel:f=3,actions:I,autoFocus:g=!1,variant:S="outlined",contentType:d="text",...x})=>{let h=P.useRef(null),{isVisible:c,shouldRender:m,handleDismiss:F,handleInteractionStart:C,handleInteractionEnd:w}=Qe({open:e,onDismiss:i,dismissible:r,autoHideDuration:y,pauseOnHover:u,autoFocus:g,alertRef:h});if(!m)return null;let A={size:l||16,...a};return P.createElement(R,{ref:h,severity:t,variant:S,isVisible:c,dismissible:r,onDismiss:F,onInteractionStart:C,onInteractionEnd:w,autoFocus:g,title:s,titleLevel:f,contentType:d,actions:I,hideIcon:p,iconProps:A,...x},o)};re.displayName="Alert";var ne=P.forwardRef(({id:e,label:t,checked:o,defaultChecked:s,value:r="on",onChange:i,classes:l,inputClasses:a,styles:p,size:y,name:u,disabled:f,required:I,validationState:g,errorMessage:S,hintText:d,onBlur:x,onFocus:h,autoFocus:c,...m},F)=>{let C=P.useCallback(Ee=>{i?.(Ee.target.checked);},[i]),w=o!==void 0,A=w?{checked:o}:{},ke=!w&&s!==void 0?{defaultChecked:s}:{},j=P.useRef(w);return P.useEffect(()=>{process.env.NODE_ENV==="development"&&(j.current!==w&&console.warn(`Checkbox with id="${e}" is changing from ${j.current?"controlled":"uncontrolled"} to ${w?"controlled":"uncontrolled"}. This is likely a bug. Decide between using "checked" (controlled) or "defaultChecked" (uncontrolled) and stick with it.`),j.current=w);},[w,e]),P.createElement("div",{className:l,style:p,"data-checkbox-size":y},P.createElement(a$1,{ref:F,type:"checkbox",id:e,name:u,value:r,...A,...ke,classes:a||"checkbox-input",disabled:f,required:I,validationState:g,errorMessage:S,hintText:d,onChange:C,onBlur:x,onFocus:h,autoFocus:c,...m}),P.createElement("label",{htmlFor:e,className:"checkbox-label"},t,I&&P.createElement("span",{className:"checkbox-required","aria-label":"required"}," *")))});ne.displayName="Checkbox";var ie=({src:e="//",alt:t,width:o=480,height:s,styles:r,loading:i="lazy",placeholder:l,fetchpriority:a$1="low",decoding:p="auto",srcSet:y,sizes:u,onError:f,onLoad:I,...g})=>{let S=useMemo(()=>{let c=typeof o=="number"?o:480,m=typeof s=="number"?s:Math.round(c*.75),F=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${m}">
28
+ var re=({icon:e,label:t,variant:o="icon",type:s="button",...r})=>v.createElement(a$2,{variant:o,"data-icon-btn":t?"has-label":"icon",...r,type:s},e,t&&v.createElement("span",{"data-icon-label":!0},t));re.displayName="IconButton";var Je={default:"",info:"Information: ",success:"Success: ",warning:"Warning: ",error:"Error: "},W=({severity:e})=>{let t=Je[e];return t?v.createElement("span",{className:"sr-only"},t):null};var Ke=(e,t)=>({info:v.createElement(b$1.InfoSolid,{...t}),success:v.createElement(b$1.SuccessSolid,{...t}),warning:v.createElement(b$1.WarnSolid,{...t}),error:v.createElement(b$1.AlertSolid,{...t}),default:v.createElement(b$1.AlertSquareSolid,{...t})})[e],_=({severity:e,iconProps:t,hideIcon:o})=>{if(o)return null;let s=Ke(e,t);return v.createElement(a,{"aria-hidden":"true",className:"alert-icon"},s)};var q=({title:e,titleLevel:t})=>{if(!e)return null;let o=t?`h${t}`:"strong";return v.createElement(a,{as:o,className:"alert-title"},e)};var K=({children:e,contentType:t})=>t==="node"?v.createElement(v.Fragment,null,e):v.createElement(a,{as:"p"},e);var X=({actions:e})=>e?v.createElement(a,{as:"div",className:"alert-actions"},e):null;var ne=v.memo(({onDismiss:e,iconSize:t=16})=>v.createElement(b,{type:"button",onClick:e,"aria-label":"Close alert",className:"alert-dismiss","data-btn":"icon sm"},v.createElement(b$1,null,v.createElement(b$1.Close,{size:t})))),ie=ne;ne.displayName="DismissButton";var Ye={default:"polite",info:"polite",success:"polite",warning:"polite",error:"assertive"},R=v.forwardRef(({severity:e,variant:t,isVisible:o,dismissible:s,onDismiss:r,onInteractionStart:i,onInteractionEnd:a$1,autoFocus:l,title:p,titleLevel:y,children:u,contentType:f,actions:I,hideIcon:g,iconProps:b,...d},x)=>v.createElement(a,{as:"div",ref:x,role:"alert","aria-live":Ye[e],"aria-atomic":"true",className:`alert alert-${e}`,"data-alert":e,"data-visible":o,"data-variant":t,tabIndex:l?-1:void 0,onMouseEnter:i,onMouseLeave:a$1,onFocus:i,onBlur:a$1,...d},v.createElement(W,{severity:e}),v.createElement(_,{severity:e,iconProps:b,hideIcon:g}),v.createElement(a,{as:"div",classes:"alert-message"},v.createElement(q,{title:p,titleLevel:y}),v.createElement(K,{contentType:f},u),v.createElement(X,{actions:I})),s&&v.createElement(ie,{onDismiss:r})));R.displayName="AlertView";var Ze=({open:e,onDismiss:t,dismissible:o,autoHideDuration:s,pauseOnHover:r,autoFocus:i,alertRef:a})=>{let[l,p]=v.useState(e),[y,u]=v.useState(e),[f,I]=v.useState(!1),g=v.useCallback(()=>{p(!1),setTimeout(()=>{u(!1),t?.();},300);},[t]);v.useEffect(()=>{e?(u(!0),p(!0)):p(!1);},[e]),v.useEffect(()=>{if(!s||!l||f)return;let x=setTimeout(()=>{g();},s);return ()=>clearTimeout(x)},[s,l,f,g]),v.useEffect(()=>{if(!o||!l)return;let x=h=>{h.key==="Escape"&&g();};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o,l,g]),v.useEffect(()=>{i&&l&&a.current&&a.current.focus();},[i,l,a]);let b=v.useCallback(()=>{r&&s&&I(!0);},[r,s]),d=v.useCallback(()=>{r&&s&&I(!1);},[r,s]);return {isVisible:l,shouldRender:y,handleDismiss:g,handleInteractionStart:b,handleInteractionEnd:d}},ae=({open:e,severity:t="default",children:o,title:s,dismissible:r=!1,onDismiss:i,iconSize:a,iconProps:l,hideIcon:p,autoHideDuration:y,pauseOnHover:u=!0,titleLevel:f=3,actions:I,autoFocus:g=!1,variant:b="outlined",contentType:d="text",...x})=>{let h=v.useRef(null),{isVisible:c,shouldRender:m,handleDismiss:F,handleInteractionStart:S,handleInteractionEnd:w}=Ze({open:e,onDismiss:i,dismissible:r,autoHideDuration:y,pauseOnHover:u,autoFocus:g,alertRef:h});if(!m)return null;let U={size:a||16,...l};return v.createElement(R,{ref:h,severity:t,variant:b,isVisible:c,dismissible:r,onDismiss:F,onInteractionStart:S,onInteractionEnd:w,autoFocus:g,title:s,titleLevel:f,contentType:d,actions:I,hideIcon:p,iconProps:U,...x},o)};ae.displayName="Alert";var le=v.forwardRef(({id:e,label:t,checked:o,defaultChecked:s,value:r="on",onChange:i,classes:a,inputClasses:l,styles:p,size:y,name:u,disabled:f,required:I,validationState:g,errorMessage:b,hintText:d,onBlur:x,onFocus:h,autoFocus:c,...m},F)=>{let S=v.useCallback(Be=>{i?.(Be.target.checked);},[i]),w=o!==void 0,U=w?{checked:o}:{},Ne=!w&&s!==void 0?{defaultChecked:s}:{},j=v.useRef(w);return v.useEffect(()=>{process.env.NODE_ENV==="development"&&(j.current!==w&&console.warn(`Checkbox with id="${e}" is changing from ${j.current?"controlled":"uncontrolled"} to ${w?"controlled":"uncontrolled"}. This is likely a bug. Decide between using "checked" (controlled) or "defaultChecked" (uncontrolled) and stick with it.`),j.current=w);},[w,e]),v.createElement("div",{className:a,style:p,"data-checkbox-size":y},v.createElement(a$1,{ref:F,type:"checkbox",id:e,name:u,value:r,...U,...Ne,classes:l||"checkbox-input",disabled:f,required:I,validationState:g,errorMessage:b,hintText:d,onChange:S,onBlur:x,onFocus:h,autoFocus:c,...m}),v.createElement("label",{htmlFor:e,className:"checkbox-label"},t,I&&v.createElement("span",{className:"checkbox-required","aria-label":"required"}," *")))});le.displayName="Checkbox";var pe=({src:e="//",alt:t,width:o=480,height:s,styles:r,loading:i="lazy",placeholder:a$1,fetchpriority:l="low",decoding:p="auto",srcSet:y,sizes:u,onError:f,onLoad:I,...g})=>{let b=useMemo(()=>{let c=typeof o=="number"?o:480,m=typeof s=="number"?s:Math.round(c*.75),F=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${m}">
30
29
  <defs>
31
30
  <linearGradient id="grad-${c}-${m}" x1="0%" y1="0%" x2="100%" y2="100%">
32
31
  <stop offset="0%" style="stop-color:#6366f1;stop-opacity:1" />
@@ -38,8 +37,8 @@ var qe={default:"",info:"Information: ",success:"Success: ",warning:"Warning: ",
38
37
  <circle cx="${c*.15}" cy="${m*.2}" r="${Math.min(c,m)*.08}" fill="rgba(255,255,255,0.2)"/>
39
38
  <path d="M0,${m*.75} Q${c*.25},${m*.65} ${c*.5},${m*.75} T${c},${m*.75} L${c},${m} L0,${m} Z" fill="rgba(0,0,0,0.15)"/>
40
39
  <text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="system-ui,-apple-system,sans-serif" font-size="${Math.max(16,Math.min(c,m)*.05)}" font-weight="500" fill="rgba(255,255,255,0.9)">${c}\xD7${m}</text>
41
- </svg>`;return `data:image/svg+xml,${encodeURIComponent(F)}`},[o,s]),d=l??S;return P.createElement(a,{as:"img",src:e,alt:t,width:o,height:s||"auto",loading:i,style:r,srcSet:y,sizes:u,onError:c=>{f&&f(c),c.defaultPrevented||c.currentTarget.src!==d&&(c.currentTarget.src=d);},onLoad:c=>{I?.(c);},decoding:p,...g,...a$1&&{fetchpriority:a$1}})};ie.displayName="Img";var le=e=>{let[t,o]=useState([]),[s,r]=useState(e),[i,l]=useState(!1),[a,p]=useState(!1);return useEffect(()=>{let d=()=>{let x=window.speechSynthesis.getVoices();o(x);let h=x.find(c=>c.name==="Google US English");if(h)r(h);else {let c=x.find(m=>m.lang.startsWith("en-"));c&&r(c);}};return d(),window.speechSynthesis.onvoiceschanged=d,()=>{window.speechSynthesis.onvoiceschanged=null;}},[]),{speak:(d,x={},h)=>{let c=new SpeechSynthesisUtterance(d);c.lang=x.lang??"en-US",c.pitch=x.pitch??1,c.rate=x.rate??1,c.voice=s??x.voice??null,c.onend=()=>{l(!1),p(!1),h&&h();},"speechSynthesis"in window?(window.speechSynthesis.speak(c),l(!0),p(!1)):l(!1);},pause:()=>{i&&!a&&(window.speechSynthesis.pause(),p(!0));},resume:()=>{i&&a&&(window.speechSynthesis.resume(),p(!1));},cancel:()=>{i&&(window.speechSynthesis.cancel(),l(!1),p(!1));},isSpeaking:i,isPaused:a,availableVoices:t,changeVoice:d=>{r(d);},currentVoice:s,getAvailableLanguages:()=>[...new Set(t.map(d=>d.lang))]}};var tt=({children:e,onClick:t})=>P.createElement(a,{as:"button",type:"button",className:"tts-border","data-btn":"sm text pill",onClick:t},e),M=P.memo(tt),X=({label:e,isSpeaking:t,isPaused:o,onSpeak:s,onPause:r,onResume:i,onCancel:l})=>P.createElement(a,{as:"div","data-tts":!0},e&&P.createElement("p",null,e),!t&&P.createElement(M,{"aria-label":"Speak",onClick:s},P.createElement(b$1.PlaySolid,{size:16})),t&&!o&&P.createElement(M,{"aria-label":"Pause",onClick:r},P.createElement(b$1.PauseSolid,{size:16})),o&&P.createElement(M,{"aria-label":"Resume",onClick:i},P.createElement(b$1.ResumeSolid,{size:16})),P.createElement(M,{"aria-label":"Stop",onClick:l},P.createElement(b$1.StopSolid,{size:16})));X.displayName="TextToSpeechControls";X.TTSButton=M;var ae=X;var pe=({initialText:e="",showTextInput:t=!1,voice:o,pitch:s=1,rate:r=1,label:i,onEnd:l})=>{let{speak:a,pause:p,resume:y,cancel:u,isSpeaking:f,isPaused:I}=le(),[g,S]=useState(e);useEffect(()=>{S(e);},[e]);let d=()=>{g.trim()!==""&&a(g,{voice:o,pitch:s,rate:r},h);},x=c=>{S(c.target.value);},h=()=>{l&&l();};return P.createElement(P.Fragment,null,t&&P.createElement(b$2,{value:g,onChange:x}),P.createElement(ae,{label:i,isSpeaking:f,isPaused:I,onSpeak:d,onPause:p,onResume:y,onCancel:u}))};pe.displayName="TextToSpeechComponent";var E=e=>P.createElement(P.Fragment,null,e),rt=({id:e,children:t,headerBackground:o,styles:s,classes:r,...i})=>P.createElement(a,{as:"header",id:e,styles:s,className:r,...i},o,P.createElement(a,{as:"section"},t)),nt=({id:e,children:t,styles:o,classes:s,...r})=>P.createElement(a,{as:"main",id:e,styles:o,...r,className:s},t),it=({id:e,classes:t,children:o,styles:s={},...r})=>P.createElement(a,{as:"footer",id:e,className:t,styles:s,...r},P.createElement(a,{as:"section"},o||"Copyright \xA9 2022")),lt=({id:e,children:t,styles:o={},classes:s,...r})=>P.createElement(a,{as:"aside",id:e,styles:o,className:s,...r},P.createElement(a,{as:"section"},t)),at=({id:e,children:t,styles:o,classes:s,...r})=>P.createElement(a,{as:"section",id:e,styles:o,className:s,...r},t),pt=({id:e,children:t,styles:o,classes:s,...r})=>P.createElement(a,{as:"article",id:e,styles:o,className:s,...r},t),ct=({id:e,children:t,legend:o,description:s,descriptionId:r,styles:i,classes:l,...a$1})=>{let p=r||(s?`${e}-desc`:void 0);return P.createElement(a,{as:"fieldset",id:e,styles:i,className:l,"aria-describedby":p,...a$1},o&&P.createElement(a,{as:"legend"},o),s&&P.createElement("p",{id:p,className:"fieldset-description"},s),t)};E.displayName="Landmarks";E.Header=rt;E.Main=nt;E.Footer=it;E.Aside=lt;E.Section=at;E.Article=pt;E.Fieldset=ct;var fe=P.forwardRef(({padding:e,paddingInline:t,paddingBlock:o,margin:s,marginInline:r,marginBlock:i,width:l,maxWidth:a$1,radius:p,as:y="div",className:u,classes:f,children:I,...g},S)=>{let d=[];e&&d.push(`box-padding-${e}`),t&&d.push(`box-padding-inline-${t}`),o&&d.push(`box-padding-block-${o}`),s&&d.push(`box-margin-${s}`),r&&d.push(`box-margin-inline-${r}`),i&&d.push(`box-margin-block-${i}`),l&&d.push(`box-width-${l}`),a$1&&d.push(`box-max-width-${a$1}`),p&&d.push(`box-radius-${p}`);let x=[...d,u,f].filter(Boolean).join(" ");return P.createElement(a,{as:y,ref:S,classes:x||void 0,...g},I)});fe.displayName="Box";var me=P.forwardRef(({gap:e,direction:t="vertical",align:o,justify:s,wrap:r,as:i="div",className:l,classes:a$1,children:p,...y},u)=>{let f=["stack"];t==="horizontal"?f.push("stack-horizontal"):f.push("stack-vertical"),e&&f.push(`stack-gap-${e}`),o&&f.push(`stack-align-${o}`),s&&f.push(`stack-justify-${s}`),r&&f.push(`stack-${r}`);let I=[...f,l,a$1].filter(Boolean).join(" ");return P.createElement(a,{as:i,ref:u,classes:I,...y},p)});me.displayName="Stack";var xe=P.forwardRef(({gap:e,justify:t,align:o,as:s="div",className:r,classes:i,children:l,...a$1},p)=>{let y=["cluster"];e&&y.push(`cluster-gap-${e}`),t&&y.push(`cluster-justify-${t}`),o&&y.push(`cluster-align-${o}`);let u=[...y,r,i].filter(Boolean).join(" ");return P.createElement(a,{as:s,ref:p,classes:u,...a$1},l)});xe.displayName="Cluster";var ye=P.forwardRef(({columns:e,auto:t,minColumnWidth:o,gap:s,gapX:r,gapY:i,justifyItems:l,alignItems:a$1,as:p="div",className:y,classes:u,children:f,style:I,styles:g,...S},d)=>{let x=["grid"];e&&x.push(`grid-cols-${e}`),t&&x.push(`grid-auto-${t}`),s&&x.push(`grid-gap-${s}`),r&&x.push(`grid-gap-x-${r}`),i&&x.push(`grid-gap-y-${i}`),l&&x.push(`grid-justify-items-${l}`),a$1&&x.push(`grid-align-items-${a$1}`);let h=[...x,y,u].filter(Boolean).join(" "),c={...I||{},...g||{}};return t&&o&&(c.gridTemplateColumns=`repeat(auto-${t}, minmax(${o}, 1fr))`),P.createElement(a,{as:p,ref:d,classes:h,style:Object.keys(c).length>0?c:void 0,...S},f)});ye.displayName="Grid";var Q=P.forwardRef(({span:e,rowSpan:t,as:o="div",className:s,classes:r,children:i,...l},a$1)=>{let p=[];e&&p.push(`grid-col-span-${e}`),t&&p.push(`grid-row-span-${t}`);let y=[...p,s,r].filter(Boolean).join(" ");return P.createElement(a,{as:o,ref:a$1,classes:y,...l},i)});Q.displayName="GridItem";var he=ye;he.Item=Q;var ft=he;var Ie=P.forwardRef(({gap:e,justify:t,align:o,wrap:s,alwaysProportional:r=!1,as:i="div",className:l,classes:a$1,children:p,...y},u)=>{process.env.NODE_ENV==="development"&&r&&console.warn('[fpkit] Row: alwaysProportional is deprecated and will be removed in v5.0.0. Use responsive column utilities instead: className="col-sm-6 col-md-4"');let f=["col-row"];e&&f.push(`col-row-gap-${e}`),t&&f.push(`col-row-justify-${t}`),o&&f.push(`col-row-align-${o}`),s&&s!=="wrap"&&f.push(`col-row-${s}`),r&&f.push("col-row-proportional");let I=[...f,l,a$1].filter(Boolean).join(" ");return P.createElement(a,{as:i,ref:u,classes:I,...y},p)});Ie.displayName="Row";var ve=P.forwardRef(({span:e,offset:t,order:o,auto:s=!1,as:r="div",className:i,classes:l,children:a$1,...p},y)=>{let u=[];s?u.push("col-auto"):e==="flex"?u.push("col-flex"):e&&u.push(`col-${e}`),t!==void 0&&u.push(`col-offset-${t}`),o!==void 0&&u.push(`col-order-${o}`);let f=[...u,i,l].filter(Boolean).join(" ");return P.createElement(a,{as:r,ref:y,classes:f,...p},a$1)});ve.displayName="Col";var B=(e,t="")=>{let o=[];if(e.direction){let s={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"};o.push(`${t}${s[e.direction]}`);}if(e.wrap){let s={wrap:"flex-wrap",nowrap:"flex-nowrap","wrap-reverse":"flex-wrap-reverse"};o.push(`${t}${s[e.wrap]}`);}if(e.gap&&o.push(`${t}gap-${e.gap}`),e.rowGap&&o.push(`${t}row-gap-${e.rowGap}`),e.colGap&&o.push(`${t}col-gap-${e.colGap}`),e.justify){let s={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};o.push(`${t}${s[e.justify]}`);}if(e.align){let s={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"};o.push(`${t}${s[e.align]}`);}if(e.alignContent){let s={start:"content-start",end:"content-end",center:"content-center",between:"content-between",around:"content-around",evenly:"content-evenly",stretch:"content-stretch"};o.push(`${t}${s[e.alignContent]}`);}return o},Pe=P.forwardRef((e,t)=>{let{variant:o,inline:s=!1,as:r="div",className:i="",styles:l,children:a$1,sm:p,md:y,lg:u,xl:f,direction:I,wrap:g,gap:S,rowGap:d,colGap:x,justify:h,align:c,alignContent:m,...F}=e,C=[];if(C.push(s?"flex-inline":"flex"),o){let A={center:"flex-center",between:"flex-between",around:"flex-around",stack:"flex-stack",spread:"flex-spread"};C.push(A[o]);}C.push(...B({direction:I,wrap:g,gap:S,rowGap:d,colGap:x,justify:h,align:c,alignContent:m})),p&&C.push(...B(p,"sm:")),y&&C.push(...B(y,"md:")),u&&C.push(...B(u,"lg:")),f&&C.push(...B(f,"xl:"));let w=[...C,i].filter(Boolean).join(" ");return P.createElement(a,{as:r,ref:t,classes:w,styles:l,...F},a$1)});Pe.displayName="Flex";var Ce=P.forwardRef((e,t)=>{let{grow:o,shrink:s,basis:r,flex:i,alignSelf:l,order:a$1,as:p="div",className:y="",styles:u,children:f,sm:I,md:g,lg:S,xl:d,...x}=e,h=[];if(i){let m={1:"flex-1",auto:"flex-auto",initial:"flex-initial",none:"flex-none"};h.push(m[i]);}if(o!==void 0&&h.push(`flex-grow-${o}`),s!==void 0&&h.push(`flex-shrink-${s}`),r){let m={auto:"flex-basis-auto",0:"flex-basis-0",full:"flex-basis-full"};h.push(m[r]);}if(l){let m={auto:"self-auto",start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"};h.push(m[l]);}if(a$1){let m={first:"order-first",last:"order-last",none:"order-none"};h.push(m[a$1]);}if(I?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`sm:${m[I.flex]}`);}if(g?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`md:${m[g.flex]}`);}if(S?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`lg:${m[S.flex]}`);}if(d?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`xl:${m[d.flex]}`);}let c=[...h,y].filter(Boolean).join(" ");return P.createElement(a,{as:p,ref:t,classes:c,styles:u,...x},f)});Ce.displayName="Flex.Item";var be=P.forwardRef((e,t)=>{let{as:o="div",className:s="",styles:r,...i}=e,l=["flex-1",s].filter(Boolean).join(" ");return P.createElement(a,{as:o,ref:t,classes:l,styles:r,...i})});be.displayName="Flex.Spacer";var Y=Pe;Y.Item=Ce;Y.Spacer=be;var dt=Y;var we=({id:e,styles:t,classes:o,children:s,variant:r,...i})=>P.createElement(a,{as:"sup",id:e,styles:t,className:o,"data-badge":r||void 0,role:"status",...i},P.createElement(a,{as:"span"},s));we.displayName="Badge";var ut=({elm:e="span",role:t="note",variant:o,children:s,styles:r,...i})=>P.createElement(a,{as:e,role:t,"data-tag":o||void 0,styles:r,...i},s);ut.displayName="Tag";var xt=P.forwardRef(({summary:e,icon:t,styles:o,classes:s,ariaLabel:r,name:i,open:l,onPointerDown:a$1,onToggle:p,children:y,...u},f)=>{let I=useCallback(S=>{a$1?.(S);},[a$1]),g=useCallback(S=>{p?.(S);},[p]);return P.createElement(a,{as:"details",styles:o,classes:s,onToggle:g,ref:f,open:l,"aria-label":r,name:i,...u},P.createElement(a,{as:"summary",onPointerDown:I},t,e),P.createElement(a,{as:"section"},y))});xt.displayName="Details";
40
+ </svg>`;return `data:image/svg+xml,${encodeURIComponent(F)}`},[o,s]),d=a$1??b;return v.createElement(a,{as:"img",src:e,alt:t,width:o,height:s||"auto",loading:i,style:r,srcSet:y,sizes:u,onError:c=>{f&&f(c),c.defaultPrevented||c.currentTarget.src!==d&&(c.currentTarget.src=d);},onLoad:c=>{I?.(c);},decoding:p,...g,...l&&{fetchpriority:l}})};pe.displayName="Img";var ce=e=>{let[t,o]=useState([]),[s,r]=useState(e),[i,a]=useState(!1),[l,p]=useState(!1);return useEffect(()=>{let d=()=>{let x=window.speechSynthesis.getVoices();o(x);let h=x.find(c=>c.name==="Google US English");if(h)r(h);else {let c=x.find(m=>m.lang.startsWith("en-"));c&&r(c);}};return d(),window.speechSynthesis.onvoiceschanged=d,()=>{window.speechSynthesis.onvoiceschanged=null;}},[]),{speak:(d,x={},h)=>{let c=new SpeechSynthesisUtterance(d);c.lang=x.lang??"en-US",c.pitch=x.pitch??1,c.rate=x.rate??1,c.voice=s??x.voice??null,c.onend=()=>{a(!1),p(!1),h&&h();},"speechSynthesis"in window?(window.speechSynthesis.speak(c),a(!0),p(!1)):a(!1);},pause:()=>{i&&!l&&(window.speechSynthesis.pause(),p(!0));},resume:()=>{i&&l&&(window.speechSynthesis.resume(),p(!1));},cancel:()=>{i&&(window.speechSynthesis.cancel(),a(!1),p(!1));},isSpeaking:i,isPaused:l,availableVoices:t,changeVoice:d=>{r(d);},currentVoice:s,getAvailableLanguages:()=>[...new Set(t.map(d=>d.lang))]}};var st=({children:e,onClick:t})=>v.createElement(a,{as:"button",type:"button",className:"tts-border","data-btn":"sm text pill",onClick:t},e),A=v.memo(st),Q=({label:e,isSpeaking:t,isPaused:o,onSpeak:s,onPause:r,onResume:i,onCancel:a$1})=>v.createElement(a,{as:"div","data-tts":!0},e&&v.createElement("p",null,e),!t&&v.createElement(A,{"aria-label":"Speak",onClick:s},v.createElement(b$1.PlaySolid,{size:16})),t&&!o&&v.createElement(A,{"aria-label":"Pause",onClick:r},v.createElement(b$1.PauseSolid,{size:16})),o&&v.createElement(A,{"aria-label":"Resume",onClick:i},v.createElement(b$1.ResumeSolid,{size:16})),v.createElement(A,{"aria-label":"Stop",onClick:a$1},v.createElement(b$1.StopSolid,{size:16})));Q.displayName="TextToSpeechControls";Q.TTSButton=A;var fe=Q;var de=({initialText:e="",showTextInput:t=!1,voice:o,pitch:s=1,rate:r=1,label:i,onEnd:a})=>{let{speak:l,pause:p,resume:y,cancel:u,isSpeaking:f,isPaused:I}=ce(),[g,b]=useState(e);useEffect(()=>{b(e);},[e]);let d=()=>{g.trim()!==""&&l(g,{voice:o,pitch:s,rate:r},h);},x=c=>{b(c.target.value);},h=()=>{a&&a();};return v.createElement(v.Fragment,null,t&&v.createElement(b$2,{value:g,onChange:x}),v.createElement(fe,{label:i,isSpeaking:f,isPaused:I,onSpeak:d,onPause:p,onResume:y,onCancel:u}))};de.displayName="TextToSpeechComponent";var E=e=>v.createElement(v.Fragment,null,e),it=({id:e,children:t,headerBackground:o,styles:s,classes:r,...i})=>v.createElement(a,{as:"header",id:e,styles:s,className:r,...i},o,v.createElement(a,{as:"section"},t)),at=({id:e,children:t,styles:o,classes:s,...r})=>v.createElement(a,{as:"main",id:e,styles:o,...r,className:s},t),lt=({id:e,classes:t,children:o,styles:s={},...r})=>v.createElement(a,{as:"footer",id:e,className:t,styles:s,...r},v.createElement(a,{as:"section"},o||"Copyright \xA9 2022")),pt=({id:e,children:t,styles:o={},classes:s,...r})=>v.createElement(a,{as:"aside",id:e,styles:o,className:s,...r},v.createElement(a,{as:"section"},t)),ct=({id:e,children:t,styles:o,classes:s,...r})=>v.createElement(a,{as:"section",id:e,styles:o,className:s,...r},t),ft=({id:e,children:t,styles:o,classes:s,...r})=>v.createElement(a,{as:"article",id:e,styles:o,className:s,...r},t),dt=({id:e,children:t,legend:o,description:s,descriptionId:r,styles:i,classes:a$1,...l})=>{let p=r||(s?`${e}-desc`:void 0);return v.createElement(a,{as:"fieldset",id:e,styles:i,className:a$1,"aria-describedby":p,...l},o&&v.createElement(a,{as:"legend"},o),s&&v.createElement("p",{id:p,className:"fieldset-description"},s),t)};E.displayName="Landmarks";E.Header=it;E.Main=at;E.Footer=lt;E.Aside=pt;E.Section=ct;E.Article=ft;E.Fieldset=dt;var ue=v.forwardRef(({padding:e,paddingInline:t,paddingBlock:o,margin:s,marginInline:r,marginBlock:i,width:a$1,maxWidth:l,radius:p,as:y="div",className:u,classes:f,children:I,...g},b)=>{let d=[];e&&d.push(`box-padding-${e}`),t&&d.push(`box-padding-inline-${t}`),o&&d.push(`box-padding-block-${o}`),s&&d.push(`box-margin-${s}`),r&&d.push(`box-margin-inline-${r}`),i&&d.push(`box-margin-block-${i}`),a$1&&d.push(`box-width-${a$1}`),l&&d.push(`box-max-width-${l}`),p&&d.push(`box-radius-${p}`);let x=[...d,u,f].filter(Boolean).join(" ");return v.createElement(a,{as:y,ref:b,classes:x||void 0,...g},I)});ue.displayName="Box";var ye=v.forwardRef(({gap:e,direction:t="vertical",align:o,justify:s,wrap:r,as:i="div",className:a$1,classes:l,children:p,...y},u)=>{let f=["stack"];t==="horizontal"?f.push("stack-horizontal"):f.push("stack-vertical"),e&&f.push(`stack-gap-${e}`),o&&f.push(`stack-align-${o}`),s&&f.push(`stack-justify-${s}`),r&&f.push(`stack-${r}`);let I=[...f,a$1,l].filter(Boolean).join(" ");return v.createElement(a,{as:i,ref:u,classes:I,...y},p)});ye.displayName="Stack";var ge=v.forwardRef(({gap:e,justify:t,align:o,as:s="div",className:r,classes:i,children:a$1,...l},p)=>{let y=["cluster"];e&&y.push(`cluster-gap-${e}`),t&&y.push(`cluster-justify-${t}`),o&&y.push(`cluster-align-${o}`);let u=[...y,r,i].filter(Boolean).join(" ");return v.createElement(a,{as:s,ref:p,classes:u,...l},a$1)});ge.displayName="Cluster";var Ie=v.forwardRef(({columns:e,auto:t,minColumnWidth:o,gap:s,gapX:r,gapY:i,justifyItems:a$1,alignItems:l,as:p="div",className:y,classes:u,children:f,style:I,styles:g,...b},d)=>{let x=["grid"];e&&x.push(`grid-cols-${e}`),t&&x.push(`grid-auto-${t}`),s&&x.push(`grid-gap-${s}`),r&&x.push(`grid-gap-x-${r}`),i&&x.push(`grid-gap-y-${i}`),a$1&&x.push(`grid-justify-items-${a$1}`),l&&x.push(`grid-align-items-${l}`);let h=[...x,y,u].filter(Boolean).join(" "),c={...I||{},...g||{}};return t&&o&&(c.gridTemplateColumns=`repeat(auto-${t}, minmax(${o}, 1fr))`),v.createElement(a,{as:p,ref:d,classes:h,style:Object.keys(c).length>0?c:void 0,...b},f)});Ie.displayName="Grid";var Y=v.forwardRef(({span:e,rowSpan:t,as:o="div",className:s,classes:r,children:i,...a$1},l)=>{let p=[];e&&p.push(`grid-col-span-${e}`),t&&p.push(`grid-row-span-${t}`);let y=[...p,s,r].filter(Boolean).join(" ");return v.createElement(a,{as:o,ref:l,classes:y,...a$1},i)});Y.displayName="GridItem";var be=Ie;be.Item=Y;var mt=be;var ve=v.forwardRef(({gap:e,justify:t,align:o,wrap:s,alwaysProportional:r=!1,as:i="div",className:a$1,classes:l,children:p,...y},u)=>{process.env.NODE_ENV==="development"&&r&&console.warn('[fpkit] Row: alwaysProportional is deprecated and will be removed in v5.0.0. Use responsive column utilities instead: className="col-sm-6 col-md-4"');let f=["col-row"];e&&f.push(`col-row-gap-${e}`),t&&f.push(`col-row-justify-${t}`),o&&f.push(`col-row-align-${o}`),s&&s!=="wrap"&&f.push(`col-row-${s}`),r&&f.push("col-row-proportional");let I=[...f,a$1,l].filter(Boolean).join(" ");return v.createElement(a,{as:i,ref:u,classes:I,...y},p)});ve.displayName="Row";var Ce=v.forwardRef(({span:e,offset:t,order:o,auto:s=!1,as:r="div",className:i,classes:a$1,children:l,...p},y)=>{let u=[];s?u.push("col-auto"):e==="flex"?u.push("col-flex"):e&&u.push(`col-${e}`),t!==void 0&&u.push(`col-offset-${t}`),o!==void 0&&u.push(`col-order-${o}`);let f=[...u,i,a$1].filter(Boolean).join(" ");return v.createElement(a,{as:r,ref:y,classes:f,...p},l)});Ce.displayName="Col";var L=(e,t="")=>{let o=[];if(e.direction){let s={row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"};o.push(`${t}${s[e.direction]}`);}if(e.wrap){let s={wrap:"flex-wrap",nowrap:"flex-nowrap","wrap-reverse":"flex-wrap-reverse"};o.push(`${t}${s[e.wrap]}`);}if(e.gap&&o.push(`${t}gap-${e.gap}`),e.rowGap&&o.push(`${t}row-gap-${e.rowGap}`),e.colGap&&o.push(`${t}col-gap-${e.colGap}`),e.justify){let s={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly"};o.push(`${t}${s[e.justify]}`);}if(e.align){let s={start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"};o.push(`${t}${s[e.align]}`);}if(e.alignContent){let s={start:"content-start",end:"content-end",center:"content-center",between:"content-between",around:"content-around",evenly:"content-evenly",stretch:"content-stretch"};o.push(`${t}${s[e.alignContent]}`);}return o},Te=v.forwardRef((e,t)=>{let{variant:o,inline:s=!1,as:r="div",className:i="",styles:a$1,children:l,sm:p,md:y,lg:u,xl:f,direction:I,wrap:g,gap:b,rowGap:d,colGap:x,justify:h,align:c,alignContent:m,...F}=e,S=[];if(S.push(s?"flex-inline":"flex"),o){let U={center:"flex-center",between:"flex-between",around:"flex-around",stack:"flex-stack",spread:"flex-spread"};S.push(U[o]);}S.push(...L({direction:I,wrap:g,gap:b,rowGap:d,colGap:x,justify:h,align:c,alignContent:m})),p&&S.push(...L(p,"sm:")),y&&S.push(...L(y,"md:")),u&&S.push(...L(u,"lg:")),f&&S.push(...L(f,"xl:"));let w=[...S,i].filter(Boolean).join(" ");return v.createElement(a,{as:r,ref:t,classes:w,styles:a$1,...F},l)});Te.displayName="Flex";var we=v.forwardRef((e,t)=>{let{grow:o,shrink:s,basis:r,flex:i,alignSelf:a$1,order:l,as:p="div",className:y="",styles:u,children:f,sm:I,md:g,lg:b,xl:d,...x}=e,h=[];if(i){let m={1:"flex-1",auto:"flex-auto",initial:"flex-initial",none:"flex-none"};h.push(m[i]);}if(o!==void 0&&h.push(`flex-grow-${o}`),s!==void 0&&h.push(`flex-shrink-${s}`),r){let m={auto:"flex-basis-auto",0:"flex-basis-0",full:"flex-basis-full"};h.push(m[r]);}if(a$1){let m={auto:"self-auto",start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"};h.push(m[a$1]);}if(l){let m={first:"order-first",last:"order-last",none:"order-none"};h.push(m[l]);}if(I?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`sm:${m[I.flex]}`);}if(g?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`md:${m[g.flex]}`);}if(b?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`lg:${m[b.flex]}`);}if(d?.flex){let m={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`xl:${m[d.flex]}`);}let c=[...h,y].filter(Boolean).join(" ");return v.createElement(a,{as:p,ref:t,classes:c,styles:u,...x},f)});we.displayName="Flex.Item";var $e=v.forwardRef((e,t)=>{let{as:o="div",className:s="",styles:r,...i}=e,a$1=["flex-1",s].filter(Boolean).join(" ");return v.createElement(a,{as:o,ref:t,classes:a$1,styles:r,...i})});$e.displayName="Flex.Spacer";var Z=Te;Z.Item=we;Z.Spacer=$e;var ut=Z;var Ee=({id:e,styles:t,classes:o,children:s,variant:r,...i})=>v.createElement(a,{as:"sup",id:e,styles:t,className:o,"data-badge":r||void 0,role:"status",...i},v.createElement(a,{as:"span"},s));Ee.displayName="Badge";var yt=({elm:e="span",role:t="note",variant:o,children:s,styles:r,...i})=>v.createElement(a,{as:e,role:t,"data-tag":o||void 0,styles:r,...i},s);yt.displayName="Tag";var ht=v.forwardRef(({summary:e,icon:t,styles:o,classes:s,ariaLabel:r,name:i,open:a$1,onPointerDown:l,onToggle:p,children:y,...u},f)=>{let I=useCallback(b=>{l?.(b);},[l]),g=useCallback(b=>{p?.(b);},[p]);return v.createElement(a,{as:"details",styles:o,classes:s,onToggle:g,ref:f,open:a$1,"aria-label":r,name:i,...u},v.createElement(a,{as:"summary",onPointerDown:I},t,e),v.createElement(a,{as:"section"},y))});ht.displayName="Details";
42
41
 
43
- export { re as Alert, pt as Article, lt as Aside, we as Badge, fe as Box, ne as Checkbox, xe as Cluster, ve as Col, xt as Details, ct as Fieldset, dt as Flex, it as Footer, ft as Grid, Q as GridItem, rt as Header, ie as Img, E as Landmarks, nt as Main, Ie as Row, at as Section, me as Stack, ut as Tag, pe as TextToSpeech };
42
+ export { ae as Alert, ft as Article, pt as Aside, Ee as Badge, ue as Box, le as Checkbox, ge as Cluster, Ce as Col, ht as Details, dt as Fieldset, ut as Flex, lt as Footer, mt as Grid, Y as GridItem, it as Header, re as IconButton, pe as Img, E as Landmarks, at as Main, ve as Row, ct as Section, ye as Stack, yt as Tag, de as TextToSpeech };
44
43
  //# sourceMappingURL=out.js.map
45
44
  //# sourceMappingURL=index.js.map