@fpkit/acss 6.4.0 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/components/dialog/dialog.d.cts +2 -105
- package/libs/components/dialog/dialog.d.ts +2 -105
- package/libs/dialog-6c6b3588.d.ts +150 -0
- package/libs/index.cjs +34 -33
- package/libs/index.cjs.map +1 -1
- package/libs/index.d.cts +66 -2
- package/libs/index.d.ts +66 -2
- package/libs/index.js +11 -10
- package/libs/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +6 -1
- package/libs/components/alert/alert.css +0 -1
- package/libs/components/alert/alert.css.map +0 -1
- package/libs/components/alert/alert.min.css +0 -3
- package/libs/components/badge/badge.css +0 -1
- package/libs/components/badge/badge.css.map +0 -1
- package/libs/components/badge/badge.min.css +0 -3
- package/libs/components/box/box.css +0 -1
- package/libs/components/box/box.css.map +0 -1
- package/libs/components/box/box.min.css +0 -3
- package/libs/components/breadcrumbs/breadcrumb.css +0 -1
- package/libs/components/breadcrumbs/breadcrumb.css.map +0 -1
- package/libs/components/breadcrumbs/breadcrumb.min.css +0 -3
- package/libs/components/buttons/button.css +0 -1
- package/libs/components/buttons/button.css.map +0 -1
- package/libs/components/buttons/button.min.css +0 -3
- package/libs/components/buttons/icon-button.css +0 -1
- package/libs/components/buttons/icon-button.css.map +0 -1
- package/libs/components/buttons/icon-button.min.css +0 -3
- package/libs/components/cards/card-style.css +0 -1
- package/libs/components/cards/card-style.css.map +0 -1
- package/libs/components/cards/card-style.min.css +0 -3
- package/libs/components/cards/card.css +0 -1
- package/libs/components/cards/card.css.map +0 -1
- package/libs/components/cards/card.min.css +0 -3
- package/libs/components/cluster/cluster.css +0 -1
- package/libs/components/cluster/cluster.css.map +0 -1
- package/libs/components/cluster/cluster.min.css +0 -3
- package/libs/components/details/details.css +0 -1
- package/libs/components/details/details.css.map +0 -1
- package/libs/components/details/details.min.css +0 -3
- package/libs/components/dialog/dialog.css +0 -1
- package/libs/components/dialog/dialog.css.map +0 -1
- package/libs/components/dialog/dialog.min.css +0 -3
- package/libs/components/flexbox/flex.css +0 -1
- package/libs/components/flexbox/flex.css.map +0 -1
- package/libs/components/flexbox/flex.min.css +0 -3
- package/libs/components/form/checkbox.css +0 -1
- package/libs/components/form/checkbox.css.map +0 -1
- package/libs/components/form/checkbox.min.css +0 -3
- package/libs/components/form/form.css +0 -1
- package/libs/components/form/form.css.map +0 -1
- package/libs/components/form/form.min.css +0 -3
- package/libs/components/form/select.css +0 -1
- package/libs/components/form/select.css.map +0 -1
- package/libs/components/form/select.min.css +0 -3
- package/libs/components/grid/grid.css +0 -1
- package/libs/components/grid/grid.css.map +0 -1
- package/libs/components/grid/grid.min.css +0 -3
- package/libs/components/icons/icon.css +0 -1
- package/libs/components/icons/icon.css.map +0 -1
- package/libs/components/icons/icon.min.css +0 -3
- package/libs/components/images/img.css +0 -1
- package/libs/components/images/img.css.map +0 -1
- package/libs/components/images/img.min.css +0 -3
- package/libs/components/layout/landmarks.css +0 -1
- package/libs/components/layout/landmarks.css.map +0 -1
- package/libs/components/layout/landmarks.min.css +0 -3
- package/libs/components/link/link.css +0 -1
- package/libs/components/link/link.css.map +0 -1
- package/libs/components/link/link.min.css +0 -3
- package/libs/components/list/list.css +0 -1
- package/libs/components/list/list.css.map +0 -1
- package/libs/components/list/list.min.css +0 -3
- package/libs/components/nav/nav.css +0 -1
- package/libs/components/nav/nav.css.map +0 -1
- package/libs/components/nav/nav.min.css +0 -3
- package/libs/components/popover/popover.css +0 -1
- package/libs/components/popover/popover.css.map +0 -1
- package/libs/components/popover/popover.min.css +0 -3
- package/libs/components/progress/progress.css +0 -1
- package/libs/components/progress/progress.css.map +0 -1
- package/libs/components/progress/progress.min.css +0 -3
- package/libs/components/stack/stack.css +0 -1
- package/libs/components/stack/stack.css.map +0 -1
- package/libs/components/stack/stack.min.css +0 -3
- package/libs/components/styles/index.css +0 -1
- package/libs/components/styles/index.css.map +0 -1
- package/libs/components/styles/index.min.css +0 -3
- package/libs/components/tag/tag.css +0 -1
- package/libs/components/tag/tag.css.map +0 -1
- package/libs/components/tag/tag.min.css +0 -3
- package/libs/components/text-to-speech/text-to-speech.css +0 -1
- package/libs/components/text-to-speech/text-to-speech.css.map +0 -1
- package/libs/components/text-to-speech/text-to-speech.min.css +0 -3
- package/libs/components/title/title.css +0 -1
- package/libs/components/title/title.css.map +0 -1
- package/libs/components/title/title.min.css +0 -3
- package/libs/index.css +0 -1
- package/libs/index.css.map +0 -1
package/libs/index.d.cts
CHANGED
|
@@ -13,7 +13,8 @@ export { default as List } from './components/list/list.cjs';
|
|
|
13
13
|
export { Modal, ModalProps } from './components/modal.cjs';
|
|
14
14
|
export { default as Popover, PopoverProps } from './components/popover/popover.cjs';
|
|
15
15
|
export { RenderTable as TBL, TableProps } from './components/tables/table.cjs';
|
|
16
|
-
|
|
16
|
+
import { D as DialogModalProps } from './dialog-6c6b3588.js';
|
|
17
|
+
export { a as Dialog } from './dialog-6c6b3588.js';
|
|
17
18
|
import { U as UI } from './ui-993fc2e2.js';
|
|
18
19
|
import { C as ComponentProps$1 } from './component-props-50e69975.js';
|
|
19
20
|
export { Nav, NavComponent, NavItem, NavItemProps, NavList, NavListProps, NavProps } from './components/nav/nav.cjs';
|
|
@@ -800,6 +801,69 @@ declare const Img: {
|
|
|
800
801
|
displayName: string;
|
|
801
802
|
};
|
|
802
803
|
|
|
804
|
+
/**
|
|
805
|
+
* DialogModal - A wrapper component that manages dialog state and provides a trigger button.
|
|
806
|
+
*
|
|
807
|
+
* This is an **uncontrolled** component wrapper around the controlled Dialog component.
|
|
808
|
+
* It manages the dialog's open/closed state internally and provides a button to trigger it.
|
|
809
|
+
*
|
|
810
|
+
* **Use this when:**
|
|
811
|
+
* - You want a simple dialog with a trigger button
|
|
812
|
+
* - You don't need to control the dialog state externally
|
|
813
|
+
* - You want automatic focus restoration to the trigger button
|
|
814
|
+
*
|
|
815
|
+
* **Use the base Dialog component instead when:**
|
|
816
|
+
* - You need to control dialog state from parent component
|
|
817
|
+
* - You have a custom trigger mechanism
|
|
818
|
+
* - You need to open dialog programmatically from multiple places
|
|
819
|
+
*
|
|
820
|
+
* @component
|
|
821
|
+
* @param {DialogModalProps} props - Component props
|
|
822
|
+
* @param {string} props.dialogTitle - Title displayed in dialog header
|
|
823
|
+
* @param {ReactNode} props.children - Content to display inside the dialog
|
|
824
|
+
* @param {string} [props.btnLabel="Open Dialog"] - Text label for the trigger button
|
|
825
|
+
* @param {"sm" | "md" | "lg"} [props.btnSize="sm"] - Size variant for the trigger button
|
|
826
|
+
* @param {() => void} [props.btnOnClick] - Callback fired when trigger button is clicked (before opening)
|
|
827
|
+
* @param {boolean} [props.isAlertDialog=false] - If true, renders as non-modal inline alert
|
|
828
|
+
* @param {() => void} [props.onClose] - Callback fired when dialog is closed
|
|
829
|
+
* @param {() => void | Promise<void>} [props.onConfirm] - Callback when confirm button is clicked
|
|
830
|
+
* @param {string} [props.confirmLabel="Confirm"] - Text label for confirm button
|
|
831
|
+
* @param {string} [props.cancelLabel="Cancel"] - Text label for cancel button
|
|
832
|
+
* @param {boolean} [props.hideFooter=false] - If true, hides the footer with action buttons
|
|
833
|
+
* @param {string} [props.className] - Additional CSS classes for the dialog
|
|
834
|
+
* @param {string} [props.dialogLabel] - Optional aria-label for the dialog
|
|
835
|
+
* @param {ReactElement} [props.icon] - Optional icon element. When provided, renders IconButton as trigger.
|
|
836
|
+
* @returns {JSX.Element} A dialog with trigger button and automatic state management
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* ```tsx
|
|
840
|
+
* <DialogModal
|
|
841
|
+
* dialogTitle="Confirm Delete"
|
|
842
|
+
* btnLabel="Delete Item"
|
|
843
|
+
* btnSize="md"
|
|
844
|
+
* onConfirm={async () => await deleteItem()}
|
|
845
|
+
* confirmLabel="Delete"
|
|
846
|
+
* cancelLabel="Cancel"
|
|
847
|
+
* >
|
|
848
|
+
* Are you sure you want to delete this item? This action cannot be undone.
|
|
849
|
+
* </DialogModal>
|
|
850
|
+
* ```
|
|
851
|
+
*
|
|
852
|
+
* @example
|
|
853
|
+
* ```tsx
|
|
854
|
+
* // Icon trigger — renders IconButton with visible label at desktop widths
|
|
855
|
+
* <DialogModal
|
|
856
|
+
* dialogTitle="Settings"
|
|
857
|
+
* btnLabel="Settings"
|
|
858
|
+
* icon={<SettingsIcon />}
|
|
859
|
+
* btnProps={{ variant: "outline" }}
|
|
860
|
+
* >
|
|
861
|
+
* Settings content here.
|
|
862
|
+
* </DialogModal>
|
|
863
|
+
* ```
|
|
864
|
+
*/
|
|
865
|
+
declare const DialogModal: React$1.FC<DialogModalProps>;
|
|
866
|
+
|
|
803
867
|
/**
|
|
804
868
|
* Props for the TextToSpeechComponent.
|
|
805
869
|
* @interface TextToSpeechComponentProps
|
|
@@ -2899,4 +2963,4 @@ type FPComponent = {
|
|
|
2899
2963
|
*/
|
|
2900
2964
|
declare const FP: FPComponent;
|
|
2901
2965
|
|
|
2902
|
-
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 };
|
|
2966
|
+
export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, Box, BoxProps, ButtonProps, Caption, Checkbox, CheckboxProps, Cluster, ClusterProps, Col, ColProps, ComponentProps$1 as ComponentProps, Details, DialogModal, 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.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ export { default as List } from './components/list/list.js';
|
|
|
13
13
|
export { Modal, ModalProps } from './components/modal.js';
|
|
14
14
|
export { default as Popover, PopoverProps } from './components/popover/popover.js';
|
|
15
15
|
export { RenderTable as TBL, TableProps } from './components/tables/table.js';
|
|
16
|
-
|
|
16
|
+
import { D as DialogModalProps } from './dialog-6c6b3588.js';
|
|
17
|
+
export { a as Dialog } from './dialog-6c6b3588.js';
|
|
17
18
|
import { U as UI } from './ui-993fc2e2.js';
|
|
18
19
|
import { C as ComponentProps$1 } from './component-props-50e69975.js';
|
|
19
20
|
export { Nav, NavComponent, NavItem, NavItemProps, NavList, NavListProps, NavProps } from './components/nav/nav.js';
|
|
@@ -800,6 +801,69 @@ declare const Img: {
|
|
|
800
801
|
displayName: string;
|
|
801
802
|
};
|
|
802
803
|
|
|
804
|
+
/**
|
|
805
|
+
* DialogModal - A wrapper component that manages dialog state and provides a trigger button.
|
|
806
|
+
*
|
|
807
|
+
* This is an **uncontrolled** component wrapper around the controlled Dialog component.
|
|
808
|
+
* It manages the dialog's open/closed state internally and provides a button to trigger it.
|
|
809
|
+
*
|
|
810
|
+
* **Use this when:**
|
|
811
|
+
* - You want a simple dialog with a trigger button
|
|
812
|
+
* - You don't need to control the dialog state externally
|
|
813
|
+
* - You want automatic focus restoration to the trigger button
|
|
814
|
+
*
|
|
815
|
+
* **Use the base Dialog component instead when:**
|
|
816
|
+
* - You need to control dialog state from parent component
|
|
817
|
+
* - You have a custom trigger mechanism
|
|
818
|
+
* - You need to open dialog programmatically from multiple places
|
|
819
|
+
*
|
|
820
|
+
* @component
|
|
821
|
+
* @param {DialogModalProps} props - Component props
|
|
822
|
+
* @param {string} props.dialogTitle - Title displayed in dialog header
|
|
823
|
+
* @param {ReactNode} props.children - Content to display inside the dialog
|
|
824
|
+
* @param {string} [props.btnLabel="Open Dialog"] - Text label for the trigger button
|
|
825
|
+
* @param {"sm" | "md" | "lg"} [props.btnSize="sm"] - Size variant for the trigger button
|
|
826
|
+
* @param {() => void} [props.btnOnClick] - Callback fired when trigger button is clicked (before opening)
|
|
827
|
+
* @param {boolean} [props.isAlertDialog=false] - If true, renders as non-modal inline alert
|
|
828
|
+
* @param {() => void} [props.onClose] - Callback fired when dialog is closed
|
|
829
|
+
* @param {() => void | Promise<void>} [props.onConfirm] - Callback when confirm button is clicked
|
|
830
|
+
* @param {string} [props.confirmLabel="Confirm"] - Text label for confirm button
|
|
831
|
+
* @param {string} [props.cancelLabel="Cancel"] - Text label for cancel button
|
|
832
|
+
* @param {boolean} [props.hideFooter=false] - If true, hides the footer with action buttons
|
|
833
|
+
* @param {string} [props.className] - Additional CSS classes for the dialog
|
|
834
|
+
* @param {string} [props.dialogLabel] - Optional aria-label for the dialog
|
|
835
|
+
* @param {ReactElement} [props.icon] - Optional icon element. When provided, renders IconButton as trigger.
|
|
836
|
+
* @returns {JSX.Element} A dialog with trigger button and automatic state management
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* ```tsx
|
|
840
|
+
* <DialogModal
|
|
841
|
+
* dialogTitle="Confirm Delete"
|
|
842
|
+
* btnLabel="Delete Item"
|
|
843
|
+
* btnSize="md"
|
|
844
|
+
* onConfirm={async () => await deleteItem()}
|
|
845
|
+
* confirmLabel="Delete"
|
|
846
|
+
* cancelLabel="Cancel"
|
|
847
|
+
* >
|
|
848
|
+
* Are you sure you want to delete this item? This action cannot be undone.
|
|
849
|
+
* </DialogModal>
|
|
850
|
+
* ```
|
|
851
|
+
*
|
|
852
|
+
* @example
|
|
853
|
+
* ```tsx
|
|
854
|
+
* // Icon trigger — renders IconButton with visible label at desktop widths
|
|
855
|
+
* <DialogModal
|
|
856
|
+
* dialogTitle="Settings"
|
|
857
|
+
* btnLabel="Settings"
|
|
858
|
+
* icon={<SettingsIcon />}
|
|
859
|
+
* btnProps={{ variant: "outline" }}
|
|
860
|
+
* >
|
|
861
|
+
* Settings content here.
|
|
862
|
+
* </DialogModal>
|
|
863
|
+
* ```
|
|
864
|
+
*/
|
|
865
|
+
declare const DialogModal: React$1.FC<DialogModalProps>;
|
|
866
|
+
|
|
803
867
|
/**
|
|
804
868
|
* Props for the TextToSpeechComponent.
|
|
805
869
|
* @interface TextToSpeechComponentProps
|
|
@@ -2899,4 +2963,4 @@ type FPComponent = {
|
|
|
2899
2963
|
*/
|
|
2900
2964
|
declare const FP: FPComponent;
|
|
2901
2965
|
|
|
2902
|
-
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 };
|
|
2966
|
+
export { Alert, AlertProps, Article, Aside, Badge, BadgeProps, Box, BoxProps, ButtonProps, Caption, Checkbox, CheckboxProps, Cluster, ClusterProps, Col, ColProps, ComponentProps$1 as ComponentProps, Details, DialogModal, 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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { b as b$
|
|
1
|
+
import { b as b$3 } 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
|
+
import { b as b$2 } from './chunk-VQTCTLFN.js';
|
|
5
6
|
export { a as Dialog } from './chunk-VQTCTLFN.js';
|
|
6
7
|
export { c as Nav, b as NavItem, a as NavList } from './chunk-3ENBUQIB.js';
|
|
7
8
|
export { c as List } from './chunk-RQSMWB3J.js';
|
|
@@ -23,22 +24,22 @@ import './chunk-75QHTLFO.js';
|
|
|
23
24
|
export { d as Link, d as To } from './chunk-M5ES7OWP.js';
|
|
24
25
|
import { a } from './chunk-4KJP3L35.js';
|
|
25
26
|
export { a as UI } from './chunk-4KJP3L35.js';
|
|
26
|
-
import
|
|
27
|
+
import S, { useCallback, useMemo, useState, useRef, useEffect } from 'react';
|
|
27
28
|
|
|
28
|
-
var
|
|
29
|
+
var V=({icon:e,label:t,variant:o="icon",type:s="button",...r})=>S.createElement(a$2,{variant:o,"data-icon-btn":t?"has-label":"icon",...r,type:s},e,t&&S.createElement("span",{"data-icon-label":!0},t));V.displayName="IconButton";var Ye={default:"",info:"Information: ",success:"Success: ",warning:"Warning: ",error:"Error: "},J=({severity:e})=>{let t=Ye[e];return t?S.createElement("span",{className:"sr-only"},t):null};var Ze=(e,t)=>({info:S.createElement(b$1.InfoSolid,{...t}),success:S.createElement(b$1.SuccessSolid,{...t}),warning:S.createElement(b$1.WarnSolid,{...t}),error:S.createElement(b$1.AlertSolid,{...t}),default:S.createElement(b$1.AlertSquareSolid,{...t})})[e],K=({severity:e,iconProps:t,hideIcon:o})=>{if(o)return null;let s=Ze(e,t);return S.createElement(a,{"aria-hidden":"true",className:"alert-icon"},s)};var X=({title:e,titleLevel:t})=>{if(!e)return null;let o=t?`h${t}`:"strong";return S.createElement(a,{as:o,className:"alert-title"},e)};var Y=({children:e,contentType:t})=>t==="node"?S.createElement(S.Fragment,null,e):S.createElement(a,{as:"p"},e);var Z=({actions:e})=>e?S.createElement(a,{as:"div",className:"alert-actions"},e):null;var ie=S.memo(({onDismiss:e,iconSize:t=16})=>S.createElement(b,{type:"button",onClick:e,"aria-label":"Close alert",className:"alert-dismiss","data-btn":"icon sm"},S.createElement(b$1,null,S.createElement(b$1.Close,{size:t})))),le=ie;ie.displayName="DismissButton";var ot={default:"polite",info:"polite",success:"polite",warning:"polite",error:"assertive"},G=S.forwardRef(({severity:e,variant:t,isVisible:o,dismissible:s,onDismiss:r,onInteractionStart:n,onInteractionEnd:a$1,autoFocus:l,title:p,titleLevel:y,children:x,contentType:f,actions:I,hideIcon:g,iconProps:b,...m},d)=>S.createElement(a,{as:"div",ref:d,role:"alert","aria-live":ot[e],"aria-atomic":"true",className:`alert alert-${e}`,"data-alert":e,"data-visible":o,"data-variant":t,tabIndex:l?-1:void 0,onMouseEnter:n,onMouseLeave:a$1,onFocus:n,onBlur:a$1,...m},S.createElement(J,{severity:e}),S.createElement(K,{severity:e,iconProps:b,hideIcon:g}),S.createElement(a,{as:"div",classes:"alert-message"},S.createElement(X,{title:p,titleLevel:y}),S.createElement(Y,{contentType:f},x),S.createElement(Z,{actions:I})),s&&S.createElement(le,{onDismiss:r})));G.displayName="AlertView";var st=({open:e,onDismiss:t,dismissible:o,autoHideDuration:s,pauseOnHover:r,autoFocus:n,alertRef:a})=>{let[l,p]=S.useState(e),[y,x]=S.useState(e),[f,I]=S.useState(!1),g=S.useCallback(()=>{p(!1),setTimeout(()=>{x(!1),t?.();},300);},[t]);S.useEffect(()=>{e?(x(!0),p(!0)):p(!1);},[e]),S.useEffect(()=>{if(!s||!l||f)return;let d=setTimeout(()=>{g();},s);return ()=>clearTimeout(d)},[s,l,f,g]),S.useEffect(()=>{if(!o||!l)return;let d=h=>{h.key==="Escape"&&g();};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[o,l,g]),S.useEffect(()=>{n&&l&&a.current&&a.current.focus();},[n,l,a]);let b=S.useCallback(()=>{r&&s&&I(!0);},[r,s]),m=S.useCallback(()=>{r&&s&&I(!1);},[r,s]);return {isVisible:l,shouldRender:y,handleDismiss:g,handleInteractionStart:b,handleInteractionEnd:m}},pe=({open:e,severity:t="default",children:o,title:s,dismissible:r=!1,onDismiss:n,iconSize:a,iconProps:l,hideIcon:p,autoHideDuration:y,pauseOnHover:x=!0,titleLevel:f=3,actions:I,autoFocus:g=!1,variant:b="outlined",contentType:m="text",...d})=>{let h=S.useRef(null),{isVisible:c,shouldRender:u,handleDismiss:$,handleInteractionStart:P,handleInteractionEnd:w}=st({open:e,onDismiss:n,dismissible:r,autoHideDuration:y,pauseOnHover:x,autoFocus:g,alertRef:h});if(!u)return null;let U={size:a||16,...l};return S.createElement(G,{ref:h,severity:t,variant:b,isVisible:c,dismissible:r,onDismiss:$,onInteractionStart:P,onInteractionEnd:w,autoFocus:g,title:s,titleLevel:f,contentType:m,actions:I,hideIcon:p,iconProps:U,...d},o)};pe.displayName="Alert";var ce=S.forwardRef(({id:e,label:t,checked:o,defaultChecked:s,value:r="on",onChange:n,classes:a,inputClasses:l,styles:p,size:y,name:x,disabled:f,required:I,validationState:g,errorMessage:b,hintText:m,onBlur:d,onFocus:h,autoFocus:c,...u},$)=>{let P=S.useCallback(Le=>{n?.(Le.target.checked);},[n]),w=o!==void 0,U=w?{checked:o}:{},Ae=!w&&s!==void 0?{defaultChecked:s}:{},W=S.useRef(w);return S.useEffect(()=>{process.env.NODE_ENV==="development"&&(W.current!==w&&console.warn(`Checkbox with id="${e}" is changing from ${W.current?"controlled":"uncontrolled"} to ${w?"controlled":"uncontrolled"}. This is likely a bug. Decide between using "checked" (controlled) or "defaultChecked" (uncontrolled) and stick with it.`),W.current=w);},[w,e]),S.createElement("div",{className:a,style:p,"data-checkbox-size":y},S.createElement(a$1,{ref:$,type:"checkbox",id:e,name:x,value:r,...U,...Ae,classes:l||"checkbox-input",disabled:f,required:I,validationState:g,errorMessage:b,hintText:m,onChange:P,onBlur:d,onFocus:h,autoFocus:c,...u}),S.createElement("label",{htmlFor:e,className:"checkbox-label"},t,I&&S.createElement("span",{className:"checkbox-required","aria-label":"required"}," *")))});ce.displayName="Checkbox";var fe=({src:e="//",alt:t,width:o=480,height:s,styles:r,loading:n="lazy",placeholder:a$1,fetchpriority:l="low",decoding:p="auto",srcSet:y,sizes:x,onError:f,onLoad:I,...g})=>{let b=useMemo(()=>{let c=typeof o=="number"?o:480,u=typeof s=="number"?s:Math.round(c*.75),$=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${c} ${u}">
|
|
29
30
|
<defs>
|
|
30
|
-
<linearGradient id="grad-${c}-${
|
|
31
|
+
<linearGradient id="grad-${c}-${u}" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
31
32
|
<stop offset="0%" style="stop-color:#6366f1;stop-opacity:1" />
|
|
32
33
|
<stop offset="50%" style="stop-color:#8b5cf6;stop-opacity:1" />
|
|
33
34
|
<stop offset="100%" style="stop-color:#ec4899;stop-opacity:1" />
|
|
34
35
|
</linearGradient>
|
|
35
36
|
</defs>
|
|
36
|
-
<rect width="${c}" height="${
|
|
37
|
-
<circle cx="${c*.15}" cy="${
|
|
38
|
-
<path d="M0,${
|
|
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,
|
|
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";
|
|
37
|
+
<rect width="${c}" height="${u}" fill="url(#grad-${c}-${u})"/>
|
|
38
|
+
<circle cx="${c*.15}" cy="${u*.2}" r="${Math.min(c,u)*.08}" fill="rgba(255,255,255,0.2)"/>
|
|
39
|
+
<path d="M0,${u*.75} Q${c*.25},${u*.65} ${c*.5},${u*.75} T${c},${u*.75} L${c},${u} L0,${u} Z" fill="rgba(0,0,0,0.15)"/>
|
|
40
|
+
<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,u)*.05)}" font-weight="500" fill="rgba(255,255,255,0.9)">${c}\xD7${u}</text>
|
|
41
|
+
</svg>`;return `data:image/svg+xml,${encodeURIComponent($)}`},[o,s]),m=a$1??b;return S.createElement(a,{as:"img",src:e,alt:t,width:o,height:s||"auto",loading:n,style:r,srcSet:y,sizes:x,onError:c=>{f&&f(c),c.defaultPrevented||c.currentTarget.src!==m&&(c.currentTarget.src=m);},onLoad:c=>{I?.(c);},decoding:p,...g,...l&&{fetchpriority:l}})};fe.displayName="Img";var de=({isAlertDialog:e=!1,onClose:t,dialogTitle:o,dialogLabel:s,btnLabel:r="Open Dialog",btnSize:n="sm",btnOnClick:a,children:l,onConfirm:p,confirmLabel:y="Confirm",cancelLabel:x="Cancel",className:f,hideFooter:I=!1,btnProps:g,icon:b$1})=>{let[m,d]=useState(!1),h=useRef(null),c=useCallback(P=>{d(P),!P&&t&&t();},[t]),u=useCallback(()=>{h.current=document.activeElement,d(!0),a&&a();},[a]);useEffect(()=>{if(!m&&h.current){let P=setTimeout(()=>{h.current?.focus();},100);return ()=>clearTimeout(P)}},[m]);let $={type:"button",onClick:u,"aria-haspopup":"dialog",...g};return S.createElement(S.Fragment,null,b$1?S.createElement(V,{icon:b$1,"aria-label":r,label:r,size:n,...$}):S.createElement(b,{"data-btn":n,...$},r),S.createElement(b$2,{isOpen:m,onOpenChange:c,dialogTitle:o,dialogLabel:s,className:f,isAlertDialog:e,onConfirm:p,confirmLabel:y,cancelLabel:x,hideFooter:I},l))};de.displayName="DialogModal";var ue=e=>{let[t,o]=useState([]),[s,r]=useState(e),[n,a]=useState(!1),[l,p]=useState(!1);return useEffect(()=>{let m=()=>{let d=window.speechSynthesis.getVoices();o(d);let h=d.find(c=>c.name==="Google US English");if(h)r(h);else {let c=d.find(u=>u.lang.startsWith("en-"));c&&r(c);}};return m(),window.speechSynthesis.onvoiceschanged=m,()=>{window.speechSynthesis.onvoiceschanged=null;}},[]),{speak:(m,d={},h)=>{let c=new SpeechSynthesisUtterance(m);c.lang=d.lang??"en-US",c.pitch=d.pitch??1,c.rate=d.rate??1,c.voice=s??d.voice??null,c.onend=()=>{a(!1),p(!1),h&&h();},"speechSynthesis"in window?(window.speechSynthesis.speak(c),a(!0),p(!1)):a(!1);},pause:()=>{n&&!l&&(window.speechSynthesis.pause(),p(!0));},resume:()=>{n&&l&&(window.speechSynthesis.resume(),p(!1));},cancel:()=>{n&&(window.speechSynthesis.cancel(),a(!1),p(!1));},isSpeaking:n,isPaused:l,availableVoices:t,changeVoice:m=>{r(m);},currentVoice:s,getAvailableLanguages:()=>[...new Set(t.map(m=>m.lang))]}};var ct=({children:e,onClick:t})=>S.createElement(a,{as:"button",type:"button",className:"tts-border","data-btn":"sm text pill",onClick:t},e),A=S.memo(ct),ee=({label:e,isSpeaking:t,isPaused:o,onSpeak:s,onPause:r,onResume:n,onCancel:a$1})=>S.createElement(a,{as:"div","data-tts":!0},e&&S.createElement("p",null,e),!t&&S.createElement(A,{"aria-label":"Speak",onClick:s},S.createElement(b$1.PlaySolid,{size:16})),t&&!o&&S.createElement(A,{"aria-label":"Pause",onClick:r},S.createElement(b$1.PauseSolid,{size:16})),o&&S.createElement(A,{"aria-label":"Resume",onClick:n},S.createElement(b$1.ResumeSolid,{size:16})),S.createElement(A,{"aria-label":"Stop",onClick:a$1},S.createElement(b$1.StopSolid,{size:16})));ee.displayName="TextToSpeechControls";ee.TTSButton=A;var xe=ee;var ye=({initialText:e="",showTextInput:t=!1,voice:o,pitch:s=1,rate:r=1,label:n,onEnd:a})=>{let{speak:l,pause:p,resume:y,cancel:x,isSpeaking:f,isPaused:I}=ue(),[g,b]=useState(e);useEffect(()=>{b(e);},[e]);let m=()=>{g.trim()!==""&&l(g,{voice:o,pitch:s,rate:r},h);},d=c=>{b(c.target.value);},h=()=>{a&&a();};return S.createElement(S.Fragment,null,t&&S.createElement(b$3,{value:g,onChange:d}),S.createElement(xe,{label:n,isSpeaking:f,isPaused:I,onSpeak:m,onPause:p,onResume:y,onCancel:x}))};ye.displayName="TextToSpeechComponent";var F=e=>S.createElement(S.Fragment,null,e),dt=({id:e,children:t,headerBackground:o,styles:s,classes:r,...n})=>S.createElement(a,{as:"header",id:e,styles:s,className:r,...n},o,S.createElement(a,{as:"section"},t)),ut=({id:e,children:t,styles:o,classes:s,...r})=>S.createElement(a,{as:"main",id:e,styles:o,...r,className:s},t),xt=({id:e,classes:t,children:o,styles:s={},...r})=>S.createElement(a,{as:"footer",id:e,className:t,styles:s,...r},S.createElement(a,{as:"section"},o||"Copyright \xA9 2022")),yt=({id:e,children:t,styles:o={},classes:s,...r})=>S.createElement(a,{as:"aside",id:e,styles:o,className:s,...r},S.createElement(a,{as:"section"},t)),ht=({id:e,children:t,styles:o,classes:s,...r})=>S.createElement(a,{as:"section",id:e,styles:o,className:s,...r},t),gt=({id:e,children:t,styles:o,classes:s,...r})=>S.createElement(a,{as:"article",id:e,styles:o,className:s,...r},t),It=({id:e,children:t,legend:o,description:s,descriptionId:r,styles:n,classes:a$1,...l})=>{let p=r||(s?`${e}-desc`:void 0);return S.createElement(a,{as:"fieldset",id:e,styles:n,className:a$1,"aria-describedby":p,...l},o&&S.createElement(a,{as:"legend"},o),s&&S.createElement("p",{id:p,className:"fieldset-description"},s),t)};F.displayName="Landmarks";F.Header=dt;F.Main=ut;F.Footer=xt;F.Aside=yt;F.Section=ht;F.Article=gt;F.Fieldset=It;var ge=S.forwardRef(({padding:e,paddingInline:t,paddingBlock:o,margin:s,marginInline:r,marginBlock:n,width:a$1,maxWidth:l,radius:p,as:y="div",className:x,classes:f,children:I,...g},b)=>{let m=[];e&&m.push(`box-padding-${e}`),t&&m.push(`box-padding-inline-${t}`),o&&m.push(`box-padding-block-${o}`),s&&m.push(`box-margin-${s}`),r&&m.push(`box-margin-inline-${r}`),n&&m.push(`box-margin-block-${n}`),a$1&&m.push(`box-width-${a$1}`),l&&m.push(`box-max-width-${l}`),p&&m.push(`box-radius-${p}`);let d=[...m,x,f].filter(Boolean).join(" ");return S.createElement(a,{as:y,ref:b,classes:d||void 0,...g},I)});ge.displayName="Box";var be=S.forwardRef(({gap:e,direction:t="vertical",align:o,justify:s,wrap:r,as:n="div",className:a$1,classes:l,children:p,...y},x)=>{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 S.createElement(a,{as:n,ref:x,classes:I,...y},p)});be.displayName="Stack";var ve=S.forwardRef(({gap:e,justify:t,align:o,as:s="div",className:r,classes:n,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 x=[...y,r,n].filter(Boolean).join(" ");return S.createElement(a,{as:s,ref:p,classes:x,...l},a$1)});ve.displayName="Cluster";var Se=S.forwardRef(({columns:e,auto:t,minColumnWidth:o,gap:s,gapX:r,gapY:n,justifyItems:a$1,alignItems:l,as:p="div",className:y,classes:x,children:f,style:I,styles:g,...b},m)=>{let d=["grid"];e&&d.push(`grid-cols-${e}`),t&&d.push(`grid-auto-${t}`),s&&d.push(`grid-gap-${s}`),r&&d.push(`grid-gap-x-${r}`),n&&d.push(`grid-gap-y-${n}`),a$1&&d.push(`grid-justify-items-${a$1}`),l&&d.push(`grid-align-items-${l}`);let h=[...d,y,x].filter(Boolean).join(" "),c={...I||{},...g||{}};return t&&o&&(c.gridTemplateColumns=`repeat(auto-${t}, minmax(${o}, 1fr))`),S.createElement(a,{as:p,ref:m,classes:h,style:Object.keys(c).length>0?c:void 0,...b},f)});Se.displayName="Grid";var te=S.forwardRef(({span:e,rowSpan:t,as:o="div",className:s,classes:r,children:n,...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 S.createElement(a,{as:o,ref:l,classes:y,...a$1},n)});te.displayName="GridItem";var Ce=Se;Ce.Item=te;var bt=Ce;var we=S.forwardRef(({gap:e,justify:t,align:o,wrap:s,alwaysProportional:r=!1,as:n="div",className:a$1,classes:l,children:p,...y},x)=>{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 S.createElement(a,{as:n,ref:x,classes:I,...y},p)});we.displayName="Row";var Ee=S.forwardRef(({span:e,offset:t,order:o,auto:s=!1,as:r="div",className:n,classes:a$1,children:l,...p},y)=>{let x=[];s?x.push("col-auto"):e==="flex"?x.push("col-flex"):e&&x.push(`col-${e}`),t!==void 0&&x.push(`col-offset-${t}`),o!==void 0&&x.push(`col-order-${o}`);let f=[...x,n,a$1].filter(Boolean).join(" ");return S.createElement(a,{as:r,ref:y,classes:f,...p},l)});Ee.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},ke=S.forwardRef((e,t)=>{let{variant:o,inline:s=!1,as:r="div",className:n="",styles:a$1,children:l,sm:p,md:y,lg:x,xl:f,direction:I,wrap:g,gap:b,rowGap:m,colGap:d,justify:h,align:c,alignContent:u,...$}=e,P=[];if(P.push(s?"flex-inline":"flex"),o){let U={center:"flex-center",between:"flex-between",around:"flex-around",stack:"flex-stack",spread:"flex-spread"};P.push(U[o]);}P.push(...L({direction:I,wrap:g,gap:b,rowGap:m,colGap:d,justify:h,align:c,alignContent:u})),p&&P.push(...L(p,"sm:")),y&&P.push(...L(y,"md:")),x&&P.push(...L(x,"lg:")),f&&P.push(...L(f,"xl:"));let w=[...P,n].filter(Boolean).join(" ");return S.createElement(a,{as:r,ref:t,classes:w,styles:a$1,...$},l)});ke.displayName="Flex";var Fe=S.forwardRef((e,t)=>{let{grow:o,shrink:s,basis:r,flex:n,alignSelf:a$1,order:l,as:p="div",className:y="",styles:x,children:f,sm:I,md:g,lg:b,xl:m,...d}=e,h=[];if(n){let u={1:"flex-1",auto:"flex-auto",initial:"flex-initial",none:"flex-none"};h.push(u[n]);}if(o!==void 0&&h.push(`flex-grow-${o}`),s!==void 0&&h.push(`flex-shrink-${s}`),r){let u={auto:"flex-basis-auto",0:"flex-basis-0",full:"flex-basis-full"};h.push(u[r]);}if(a$1){let u={auto:"self-auto",start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"};h.push(u[a$1]);}if(l){let u={first:"order-first",last:"order-last",none:"order-none"};h.push(u[l]);}if(I?.flex){let u={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`sm:${u[I.flex]}`);}if(g?.flex){let u={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`md:${u[g.flex]}`);}if(b?.flex){let u={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`lg:${u[b.flex]}`);}if(m?.flex){let u={1:"flex-1",auto:"flex-auto",none:"flex-none"};h.push(`xl:${u[m.flex]}`);}let c=[...h,y].filter(Boolean).join(" ");return S.createElement(a,{as:p,ref:t,classes:c,styles:x,...d},f)});Fe.displayName="Flex.Item";var Ne=S.forwardRef((e,t)=>{let{as:o="div",className:s="",styles:r,...n}=e,a$1=["flex-1",s].filter(Boolean).join(" ");return S.createElement(a,{as:o,ref:t,classes:a$1,styles:r,...n})});Ne.displayName="Flex.Spacer";var oe=ke;oe.Item=Fe;oe.Spacer=Ne;var Pt=oe;var Ue=({id:e,styles:t,classes:o,children:s,variant:r,...n})=>S.createElement(a,{as:"sup",id:e,styles:t,className:o,"data-badge":r||void 0,role:"status",...n},S.createElement(a,{as:"span"},s));Ue.displayName="Badge";var St=({elm:e="span",role:t="note",variant:o,children:s,styles:r,...n})=>S.createElement(a,{as:e,role:t,"data-tag":o||void 0,styles:r,...n},s);St.displayName="Tag";var Ct=S.forwardRef(({summary:e,icon:t,styles:o,classes:s,ariaLabel:r,name:n,open:a$1,onPointerDown:l,onToggle:p,children:y,...x},f)=>{let I=useCallback(b=>{l?.(b);},[l]),g=useCallback(b=>{p?.(b);},[p]);return S.createElement(a,{as:"details",styles:o,classes:s,onToggle:g,ref:f,open:a$1,"aria-label":r,name:n,...x},S.createElement(a,{as:"summary",onPointerDown:I},t,e),S.createElement(a,{as:"section"},y))});Ct.displayName="Details";
|
|
41
42
|
|
|
42
|
-
export {
|
|
43
|
+
export { pe as Alert, gt as Article, yt as Aside, Ue as Badge, ge as Box, ce as Checkbox, ve as Cluster, Ee as Col, Ct as Details, de as DialogModal, It as Fieldset, Pt as Flex, xt as Footer, bt as Grid, te as GridItem, dt as Header, V as IconButton, fe as Img, F as Landmarks, ut as Main, we as Row, ht as Section, be as Stack, St as Tag, ye as TextToSpeech };
|
|
43
44
|
//# sourceMappingURL=out.js.map
|
|
44
45
|
//# sourceMappingURL=index.js.map
|