welcome-ui 1.0.0-beta.8 → 7.0.0-alpha.6
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/dist/{AXB53BZF-DCqNWRx3.mjs → AXB53BZF-CGoc4K3d.mjs} +3 -3
- package/dist/{AXB53BZF-CAQ85RSy.js → AXB53BZF-KWM2jKTz.js} +1 -1
- package/dist/Accordion.js +3 -3
- package/dist/Accordion.mjs +11 -11
- package/dist/Alert.js +4 -4
- package/dist/Alert.mjs +29 -29
- package/dist/AspectRatio.js +1 -1
- package/dist/AspectRatio.mjs +5 -5
- package/dist/Avatar.js +3 -3
- package/dist/Avatar.mjs +8 -8
- package/dist/{BYC7LY2E-BE1a2svb.js → BYC7LY2E-BkAEL2VD.js} +1 -1
- package/dist/{BYC7LY2E-BNqcw1O8.mjs → BYC7LY2E-CVjUW1dr.mjs} +4 -4
- package/dist/Badge.js +1 -1
- package/dist/Badge.mjs +5 -5
- package/dist/Breadcrumb.js +54 -1
- package/dist/Breadcrumb.mjs +438 -8
- package/dist/Button.js +4 -4
- package/dist/Button.mjs +10 -10
- package/dist/ButtonGroup.js +1 -1
- package/dist/ButtonGroup.mjs +5 -5
- package/dist/Card.js +2 -2
- package/dist/Card.mjs +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ClearButton.js +3 -3
- package/dist/ClearButton.mjs +10 -10
- package/dist/CloseButton.js +2 -2
- package/dist/CloseButton.mjs +6 -6
- package/dist/CustomInput-BCCxIle7.mjs +7826 -0
- package/dist/CustomInput-CDNZy-pz.js +1070 -0
- package/dist/DatePicker.js +1 -1
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.js +1 -1
- package/dist/DateTimePicker.mjs +15 -15
- package/dist/DateTimePickerCommon.js +1 -1
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.js +64 -1
- package/dist/Drawer.mjs +266 -10
- package/dist/DropdownMenu.js +1 -1
- package/dist/DropdownMenu.mjs +9 -9
- package/dist/Field.js +2 -2
- package/dist/Field.mjs +10 -10
- package/dist/FieldGroup.js +1 -1
- package/dist/FieldGroup.mjs +8 -8
- package/dist/FileDrop.js +46 -1
- package/dist/FileDrop.mjs +2324 -8
- package/dist/FileUpload.js +2 -2
- package/dist/FileUpload.mjs +10 -10
- package/dist/Hint.js +1 -1
- package/dist/Hint.mjs +6 -6
- package/dist/{ITI7HKP4-Couz1Z73.mjs → ITI7HKP4-BONrZ9Pq.mjs} +3 -3
- package/dist/Icon.js +1 -1
- package/dist/Icon.mjs +5 -5
- package/dist/{index.js → Icons.js} +6 -23
- package/dist/{index.mjs → Icons.mjs} +1346 -3475
- package/dist/{IconFont.js → IconsFont.js} +1 -1
- package/dist/{IconFont.mjs → IconsFont.mjs} +2 -2
- package/dist/InputText.js +3 -3
- package/dist/InputText.mjs +14 -14
- package/dist/{JC64G2H7-HxATiU-t.mjs → JC64G2H7-Dey-8h60.mjs} +4 -4
- package/dist/{JC64G2H7-VmOGyhc1.js → JC64G2H7-YkBMNrtl.js} +1 -1
- package/dist/{KUU7WJ55-bC4FU_j7.mjs → KUU7WJ55-3sP-w1F1.mjs} +13 -13
- package/dist/{LVA2YJMS-Dm5ieEMw.mjs → LVA2YJMS-qFC9J-lt.mjs} +18 -18
- package/dist/Label.js +35 -1
- package/dist/Label.mjs +76 -7
- package/dist/Link.js +2 -2
- package/dist/Link.mjs +9 -9
- package/dist/Loader.js +3 -3
- package/dist/Loader.mjs +9 -9
- package/dist/Logo.js +3 -1
- package/dist/Logo.mjs +45 -5
- package/dist/{MTZPJQMC-D0pYOjc_.js → MTZPJQMC-5Xg78Uyy.js} +1 -1
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +13 -0
- package/dist/Modal.js +5 -5
- package/dist/Modal.mjs +14 -14
- package/dist/{NLEBE274-FThuwZH_.mjs → NLEBE274-C94QU78N.mjs} +19 -19
- package/dist/{P2CTZE2T-5jxBu6ix.mjs → P2CTZE2T-YPes1GXe.mjs} +28 -28
- package/dist/{P4IRICAX-C0oIr4wI.mjs → P4IRICAX-DzXqUYe-.mjs} +10 -10
- package/dist/{P4IRICAX-t3xfwWga.js → P4IRICAX-nhgZ26A1.js} +1 -1
- package/dist/Pagination.js +3 -3
- package/dist/Pagination.mjs +10 -10
- package/dist/PasswordInput.js +1 -1
- package/dist/PasswordInput.mjs +53 -5
- package/dist/Picker.js +2 -2
- package/dist/Picker.mjs +13 -13
- package/dist/Popover.js +31 -1
- package/dist/Popover.mjs +141 -5
- package/dist/{QYJ6MIDR-YegHsExc.mjs → QYJ6MIDR-BLLqyXdd.mjs} +12 -12
- package/dist/{QYJ6MIDR-T-fJ_t8N.js → QYJ6MIDR-CRK3satR.js} +1 -1
- package/dist/Radio.js +3 -3
- package/dist/Radio.mjs +16 -16
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioGroup.mjs +11 -11
- package/dist/RadioTab.js +4 -4
- package/dist/RadioTab.mjs +12 -12
- package/dist/{SYRFVSLH-Babm193P.js → SYRFVSLH-BpAfr7UE.js} +1 -1
- package/dist/{SYRFVSLH-DXZgEwus.mjs → SYRFVSLH-cVmYtx36.mjs} +6 -6
- package/dist/Search.js +8 -8
- package/dist/Search.mjs +46 -46
- package/dist/Select.js +122 -1
- package/dist/Select.mjs +1070 -11
- package/dist/Shape.js +3 -3
- package/dist/Shape.mjs +5 -5
- package/dist/Slider.js +1 -1
- package/dist/Slider.mjs +3 -3
- package/dist/Swiper.js +2 -2
- package/dist/Swiper.mjs +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.js +8 -8
- package/dist/Tabs.mjs +178 -173
- package/dist/Tag.js +3 -3
- package/dist/Tag.mjs +10 -10
- package/dist/Text.js +1 -1
- package/dist/Text.mjs +4 -4
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.mjs +9 -9
- package/dist/TimePicker.js +2 -2
- package/dist/TimePicker.mjs +11 -11
- package/dist/Toast.js +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/Toggle.mjs +7 -7
- package/dist/Tooltip.js +1 -1
- package/dist/Tooltip.mjs +10 -10
- package/dist/UniversalLink.js +1 -1
- package/dist/UniversalLink.mjs +4 -4
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +20 -0
- package/dist/{VEVQD5MH-Cal9SWXl.js → VEVQD5MH-mN1wMozH.js} +1 -1
- package/dist/{VGCJ63VH-BqPfqkK_.mjs → VGCJ63VH-B39w1tBw.mjs} +19 -19
- package/dist/{VGCJ63VH-Cuf7P3qW.js → VGCJ63VH-BNLwLOaC.js} +1 -1
- package/dist/VariantIcon.js +8 -1
- package/dist/VariantIcon.mjs +30 -4
- package/dist/WelcomeLoader.js +11 -1
- package/dist/WelcomeLoader.mjs +5086 -25
- package/dist/X5NMLKT6-uFSu0Lii.mjs +25 -0
- package/dist/{YV4JVR4I-1ezWeCCz.mjs → YV4JVR4I-BGfUf3Nu.mjs} +1 -1
- package/dist/downshift.esm-BOfUfcgd.mjs +1085 -0
- package/dist/downshift.esm-dvOEflhK.js +1 -0
- package/dist/hex-to-rgba-BIDK-3ab.mjs +11 -0
- package/dist/hex-to-rgba-cCYXRc5D.js +1 -0
- package/dist/index-23RJrN0D.js +1 -0
- package/dist/{index-CQyLvMJP.js → index-BHi0wohR.js} +23 -23
- package/dist/index-BJAZgeHL.mjs +11 -0
- package/dist/index-BJzGkA7x.js +1 -0
- package/dist/index-BLom3M2B.js +2 -0
- package/dist/index-BNGGwOCo.mjs +11 -0
- package/dist/index-BQtDgQBH.mjs +11 -0
- package/dist/{index-BZmKn5VO.mjs → index-BYdkhqH4.mjs} +14 -11
- package/dist/{index-DCOLdphy.mjs → index-CDjY0N2Z.mjs} +11 -11
- package/dist/index-CExLVjET.mjs +26 -0
- package/dist/{index-C_r0bVmL.js → index-CUtaVckz.js} +1 -1
- package/dist/{index-BxWjuyQw.js → index-CxDKPhvU.js} +1 -1
- package/dist/index-D4H6DSEx.mjs +133 -0
- package/dist/index-D6MJAN7T.js +1 -0
- package/dist/index-DEJJvyGk.mjs +66 -0
- package/dist/index-DTx8atxB.js +1 -0
- package/dist/index-Db47iJVz.js +1 -0
- package/dist/{index-DRa_xux4.mjs → index-RUkz9Z2V.mjs} +27 -53
- package/dist/index-SbQUT2mU.mjs +639 -0
- package/dist/index-_wqLxu7x.js +1 -0
- package/dist/index-gts_19_n.js +1 -0
- package/dist/{index-CQ1IPLlk.mjs → index-u1oHKa7X.mjs} +13 -61
- package/dist/{radio-group-29lMl-2M.mjs → radio-group-CGC6DTFJ.mjs} +14 -14
- package/dist/theme.js +18 -0
- package/dist/theme.mjs +1649 -0
- package/dist/types/components/Badge/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +2 -2
- package/dist/types/components/Drawer/styles.d.ts +1 -1
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +1 -1
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +1 -1
- package/dist/types/components/Icon/styles.d.ts +1 -1
- package/dist/types/components/IconsFont/_hash.d.ts +1 -0
- package/dist/types/components/{IconFont → IconsFont}/index.d.ts +4 -4
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/Logo/index.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +2 -2
- package/dist/types/components/Modal/Assets/styles.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +4 -4
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/PopoverHover.d.ts +1 -1
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +2 -2
- package/dist/types/components/Slider/Range.d.ts +1 -1
- package/dist/types/components/Slider/index.d.ts +1 -1
- package/dist/types/components/Tabs/TabList.d.ts +1 -1
- package/dist/types/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +1 -1
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +4 -4
- package/dist/utils.js +1 -0
- package/dist/utils.mjs +77 -0
- package/package.json +52 -67
- package/dist/CustomInput-CHhz-wtr.js +0 -1064
- package/dist/CustomInput-DsJYqH0X.mjs +0 -1272
- package/dist/MTZPJQMC-C9lHSyrL.mjs +0 -13
- package/dist/VEVQD5MH-DOp_qaPw.mjs +0 -20
- package/dist/Welcome-BNr4uu5n.mjs +0 -48
- package/dist/Welcome-Dw9OaREs.js +0 -3
- package/dist/X5NMLKT6-DGZEtYXj.mjs +0 -25
- package/dist/index-B8roHPE-.js +0 -64
- package/dist/index-BFQbRuqA.mjs +0 -165
- package/dist/index-BjGfAqCk.mjs +0 -209
- package/dist/index-Bn9aiaUQ.mjs +0 -193
- package/dist/index-CiYwvMF0.js +0 -8
- package/dist/index-Cjf3wLkx.mjs +0 -272
- package/dist/index-CmBs24Im.mjs +0 -413
- package/dist/index-D3Tnfi3U.mjs +0 -83
- package/dist/index-DG7ovxHW.js +0 -117
- package/dist/index-DHCyCfRv.js +0 -35
- package/dist/index-DSZG0Sqy.js +0 -54
- package/dist/index-DhF591OM.js +0 -42
- package/dist/index-gPtu0TOV.js +0 -1
- package/dist/types/components/index.d.ts +0 -60
- package/dist/types/index.d.ts +0 -3
- package/dist/usePopover-AbS2gpZq.mjs +0 -144
- package/dist/usePopover-CzPtX0h_.js +0 -31
- package/dist/types/components/{IconFont → IconsFont}/styles.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
-
import { ThemeValues } from '../../theme';
|
|
3
2
|
import { ThemeFocus } from '../../theme/focus';
|
|
3
|
+
import { ThemeValues } from '../../theme';
|
|
4
4
|
type CommonAttributesButton = CSSObject;
|
|
5
5
|
type SizeAttributesButton = CSSObject;
|
|
6
6
|
type Variant = 'primary' | 'secondary' | 'tertiary' | 'ghost';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
export interface CheckboxOptions extends DefaultFieldStylesProps {
|
|
5
5
|
Component?: React.ElementType;
|
|
6
6
|
checked?: boolean;
|
|
@@ -14,4 +14,4 @@ export interface CustomInputOptions {
|
|
|
14
14
|
value?: string | null;
|
|
15
15
|
}
|
|
16
16
|
export type CustomInputProps = Omit<React.ComponentProps<'input'>, keyof CustomInputOptions> & CustomInputOptions;
|
|
17
|
-
export declare const CustomInput: React.ForwardRefExoticComponent<Pick<CustomInputProps, "
|
|
17
|
+
export declare const CustomInput: React.ForwardRefExoticComponent<Pick<CustomInputProps, "form" | "slot" | "style" | "title" | "pattern" | "type" | "name" | "hidden" | "color" | "multiple" | "disabled" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "width" | "height" | "max" | "min" | "crossOrigin" | "alt" | "list" | "src" | "autoComplete" | "accept" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "step" | keyof CustomInputOptions> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -31,7 +31,7 @@ export declare const Drawer: import('../System').CreateWuiComponent<"div", Drawe
|
|
|
31
31
|
Trigger: import('../System').CreateWuiComponent<"button", TriggerProps>;
|
|
32
32
|
Backdrop: React.FC<DrawerBackdropOptions>;
|
|
33
33
|
Close: React.FC<import('./Close').CloseProps>;
|
|
34
|
-
Title: React.FC<import('
|
|
34
|
+
Title: React.FC<import('../Text').TextProps>;
|
|
35
35
|
Content: import('../System').CreateWuiComponent<"div", Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('../System').WuiProps>, never> & Omit<import('../System').WuiProps & import('../System').WuiTestProps & {
|
|
36
36
|
as?: As;
|
|
37
37
|
}, never>>;
|
|
@@ -43,7 +43,7 @@ export declare const AssetDrawer: import('../System').CreateWuiComponent<"div",
|
|
|
43
43
|
Trigger: import('../System').CreateWuiComponent<"button", TriggerProps>;
|
|
44
44
|
Header: React.FC<{
|
|
45
45
|
action?: React.ReactNode;
|
|
46
|
-
icon?: React.FC<import('
|
|
46
|
+
icon?: React.FC<import('../Icon').IconProps>;
|
|
47
47
|
onBackButtonClick?: (props?: unknown) => void;
|
|
48
48
|
subtitle?: React.ReactNode;
|
|
49
49
|
title: React.ReactNode;
|
|
@@ -6,5 +6,5 @@ export declare const Backdrop: import('styled-components').StyledComponent<strin
|
|
|
6
6
|
}, never>;
|
|
7
7
|
export declare const Title: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
8
8
|
export declare const Content: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
9
|
-
export declare const CloseButton: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"button", import('
|
|
9
|
+
export declare const CloseButton: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"button", import('../Button').ButtonProps>, import('@xstyled/system').Theme, {}, never>;
|
|
10
10
|
export declare const Footer: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateWuiProps, WuiProps } from '../System';
|
|
2
1
|
import { ThemeValues } from '../../theme';
|
|
2
|
+
import { CreateWuiProps, WuiProps } from '../System';
|
|
3
3
|
import * as Ariakit from '@ariakit/react';
|
|
4
4
|
export interface DropdownMenuOptions extends Omit<Ariakit.MenuProps, 'gutter'> {
|
|
5
5
|
/** default 4px (space.xs) */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Accept, DropEvent, DropzoneProps, DropzoneState } from 'react-dropzone';
|
|
3
|
+
import { CreateEvent } from '../../utils/create-event';
|
|
3
4
|
import { ForceFileType } from '../Files';
|
|
4
5
|
import { CreateWuiProps } from '../System';
|
|
5
|
-
import { CreateEvent } from '../../utils/create-event';
|
|
6
6
|
export interface FileWithPreview extends File {
|
|
7
7
|
preview?: string;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { createEvent } from '../../utils/create-event';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
import { FileType } from '../Files';
|
|
5
5
|
import { TagProps } from '../Tag';
|
|
6
6
|
type FileWithPreview = File & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from '@xstyled/styled-components';
|
|
2
|
-
import { WuiProps } from '../System';
|
|
3
2
|
import { IconOptions } from './index';
|
|
3
|
+
import { WuiProps } from '../System';
|
|
4
4
|
type StyledIconProps = Pick<IconOptions, 'size'> & Pick<IconOptions['content'], 'isFlag' | 'stroked'> & WuiProps & Partial<{
|
|
5
5
|
alt: string;
|
|
6
6
|
title: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FONT_HASH = "f19d0de47a5f6f7446d37111f075c0901835bf12";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IconProps } from '../Icon';
|
|
2
1
|
import { StyledIconProps } from './styles';
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import { IconProps } from '../Icon';
|
|
3
|
+
export type IconsFontProps = StyledIconProps;
|
|
4
|
+
export declare const IconsFontStyled: import('styled-components').StyledComponent<string, import('@xstyled/system').Theme, StyledIconProps, never>;
|
|
5
5
|
type FormatIconJSX<S extends string> = S extends `${infer F}${infer R}` ? F extends '_' ? FormatIconJSX<Capitalize<R>> : `${F}${FormatIconJSX<R>}` : '';
|
|
6
6
|
declare const unicodeMap: {
|
|
7
7
|
actions: string;
|
|
@@ -307,5 +307,5 @@ declare const unicodeMap: {
|
|
|
307
307
|
export type IconKey = keyof typeof unicodeMap;
|
|
308
308
|
export type IconKeyFormatted = FormatIconJSX<Capitalize<IconKey>>;
|
|
309
309
|
export type IconsType = Record<IconKeyFormatted, (props: IconProps) => JSX.Element>;
|
|
310
|
-
export declare const
|
|
310
|
+
export declare const IconsFont: IconsType;
|
|
311
311
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
export interface InputTextOptions extends DefaultFieldStylesProps {
|
|
5
5
|
autoFocus?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BoxProps } from '../Box';
|
|
2
1
|
import { Symbol } from './Symbol';
|
|
3
2
|
import { SolutionsSymbol } from './Solutions';
|
|
4
3
|
import { WelcomeUI as WelcomeUILogo } from './Wui';
|
|
5
4
|
import { Welcome as Logo } from './Welcome';
|
|
5
|
+
import { BoxProps } from '../Box';
|
|
6
6
|
export type LogoProps = Pick<BoxProps, 'w' | 'h'>;
|
|
7
7
|
export { Logo, Symbol, SolutionsSymbol, WelcomeUILogo };
|
|
@@ -10,8 +10,8 @@ export declare const Assets: string & import('styled-components').StyledComponen
|
|
|
10
10
|
Iframe: ({ children }: {
|
|
11
11
|
children: JSX.Element;
|
|
12
12
|
}) => JSX.Element;
|
|
13
|
-
Title: import('styled-components').StyledComponent<import('../../System').CreateWuiComponent<"p", import('
|
|
13
|
+
Title: import('styled-components').StyledComponent<import('../../System').CreateWuiComponent<"p", import('../../Text').TextProps>, import('@xstyled/system').Theme, {
|
|
14
14
|
lines: 2;
|
|
15
15
|
variant: "h4";
|
|
16
|
-
}, "
|
|
16
|
+
}, "lines" | "variant">;
|
|
17
17
|
};
|
|
@@ -4,4 +4,4 @@ export declare const Dialog: import('styled-components').StyledComponent<string,
|
|
|
4
4
|
export declare const Title: import('styled-components').StyledComponent<import('../../System').CreateWuiComponent<"p", import('../../Text').TextProps>, import('@xstyled/system').Theme, {
|
|
5
5
|
lines: 2;
|
|
6
6
|
variant: "h4";
|
|
7
|
-
}, "
|
|
7
|
+
}, "lines" | "variant">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ShapeProps } from '../Shape';
|
|
3
|
-
import { BoxProps } from '../Box';
|
|
4
2
|
import { As, CreateWuiProps } from '../System';
|
|
3
|
+
import { BoxProps } from '../Box';
|
|
4
|
+
import { ShapeProps } from '../Shape';
|
|
5
5
|
import * as Ariakit from '@ariakit/react';
|
|
6
6
|
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'auto';
|
|
7
7
|
export interface ModalOptions extends Omit<Ariakit.DialogOptions<'div'>, 'as'> {
|
|
@@ -45,9 +45,9 @@ export declare const AssetModal: string & import('styled-components').StyledComp
|
|
|
45
45
|
Iframe: ({ children }: {
|
|
46
46
|
children: JSX.Element;
|
|
47
47
|
}) => JSX.Element;
|
|
48
|
-
Title: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"p", import('
|
|
48
|
+
Title: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"p", import('../Text').TextProps>, import('@xstyled/system').Theme, {
|
|
49
49
|
lines: 2;
|
|
50
50
|
variant: "h4";
|
|
51
|
-
}, "
|
|
51
|
+
}, "lines" | "variant">;
|
|
52
52
|
};
|
|
53
53
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateWuiProps } from '../System';
|
|
2
1
|
import { UsePopover } from './usePopover';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
3
|
import * as Ariakit from '@ariakit/react';
|
|
4
4
|
export interface PopoverOptions extends Ariakit.PopoverProps {
|
|
5
5
|
/** call a function when popover closed */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateWuiProps } from '../System';
|
|
2
1
|
import { UsePopoverHover } from './usePopover';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
3
|
import * as Ariakit from '@ariakit/react';
|
|
4
4
|
export interface PopoverHoverOptions extends Ariakit.HovercardProps {
|
|
5
5
|
/** call a function when popover closed */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
2
3
|
import { CreateWuiProps } from '../System';
|
|
3
4
|
import { LabelOptions } from '../Label';
|
|
4
|
-
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
5
5
|
export type RadioOptions = {
|
|
6
6
|
hint?: string;
|
|
7
7
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
import * as Ariakit from '@ariakit/react';
|
|
5
5
|
export interface RadioTabsOptions extends DefaultFieldStylesProps {
|
|
6
6
|
checked?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DownshiftProps } from 'downshift';
|
|
3
|
-
import { CreateWuiProps } from '../System';
|
|
4
3
|
import { createEvent } from '../../utils/create-event';
|
|
5
4
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
5
|
+
import { CreateWuiProps } from '../System';
|
|
6
6
|
export type SearchOption = {
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DownshiftProps } from 'downshift';
|
|
3
|
-
import { CreateWuiProps } from '../System';
|
|
4
3
|
import { CreateEvent } from '../../utils/create-event';
|
|
5
4
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
5
|
+
import { CreateWuiProps } from '../System';
|
|
6
6
|
export type SelectOptionValue = string | number;
|
|
7
7
|
export type SelectOption = {
|
|
8
8
|
disabled?: boolean;
|
|
@@ -49,6 +49,6 @@ export interface SelectOptions extends DefaultFieldStylesProps {
|
|
|
49
49
|
export type SelectProps = CreateWuiProps<'input', SelectOptions & Omit<DownshiftProps<SelectOption>, keyof SelectOptions | 'children'>>;
|
|
50
50
|
/** We need to add autoComplete off to avoid select UI issues when is an input */
|
|
51
51
|
export declare const Select: import('../System').CreateWuiComponent<"input", SelectProps>;
|
|
52
|
-
export declare const StyledSelect: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"div", import('
|
|
52
|
+
export declare const StyledSelect: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"div", import('../Box').BoxProps>, import('@xstyled/system').Theme, {
|
|
53
53
|
disabled: boolean;
|
|
54
54
|
}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { Range as RangeType } from './Range';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
export type Type = 'left-field' | 'right-field' | 'inline';
|
|
5
5
|
export type { RangeType };
|
|
6
6
|
export declare const thumbWidth = 20;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateWuiProps } from '../System';
|
|
2
1
|
import { ThemeSecondaryColors } from '../../theme/colors';
|
|
2
|
+
import { CreateWuiProps } from '../System';
|
|
3
3
|
import * as S from './styles';
|
|
4
4
|
type Size = 'xs' | 'sm' | 'md';
|
|
5
5
|
type Variant = ThemeSecondaryColors | 'default' | 'info' | 'success' | 'danger' | 'warning' | 'primary';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
-
import { ThemeValues } from '../../theme';
|
|
3
2
|
import { ThemeSecondaryColors } from '../../theme/colors';
|
|
3
|
+
import { ThemeValues } from '../../theme';
|
|
4
4
|
export type Size = 'xs' | 'sm' | 'md';
|
|
5
5
|
export type Variant = ThemeSecondaryColors | 'default' | 'danger' | 'info' | 'success' | 'warning' | 'primary';
|
|
6
6
|
export type ThemeTags = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CreateWuiProps } from '../System';
|
|
3
2
|
import { DefaultFieldStylesProps } from '../../utils/field-styles';
|
|
3
|
+
import { CreateWuiProps } from '../System';
|
|
4
4
|
export interface TextareaOptions extends DefaultFieldStylesProps {
|
|
5
5
|
autoFocus?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -22,6 +22,6 @@ export declare const Toast: {
|
|
|
22
22
|
Title: React.FC<TextProps>;
|
|
23
23
|
Growl: import('../System').CreateWuiComponent<"div", import('./Growl').GrowlProps>;
|
|
24
24
|
Snackbar: import('../System').CreateWuiComponent<"div", import('./Snackbar').SnackbarProps>;
|
|
25
|
-
SnackbarAction: import('../System').CreateWuiComponent<"button", import('
|
|
25
|
+
SnackbarAction: import('../System').CreateWuiComponent<"button", import('../Button').ButtonProps>;
|
|
26
26
|
};
|
|
27
27
|
export {};
|
|
@@ -5,14 +5,14 @@ export declare const ToastWrapper: import('styled-components').StyledComponent<i
|
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const Growl: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"div", import('../Alert').AlertProps> & {
|
|
7
7
|
Title: import('react').FC<import('../Alert/Title').AlertTitleProps>;
|
|
8
|
-
Button: import('../System').CreateWuiComponent<"button", Omit<import('
|
|
9
|
-
SecondaryButton: import('../System').CreateWuiComponent<"button", Omit<import('
|
|
8
|
+
Button: import('../System').CreateWuiComponent<"button", Omit<import('../Button').ButtonProps, "size" | "variant">>;
|
|
9
|
+
SecondaryButton: import('../System').CreateWuiComponent<"button", Omit<import('../Button').ButtonProps, "size" | "variant">>;
|
|
10
10
|
}, import('@xstyled/system').Theme, GrowlOptions, never>;
|
|
11
11
|
export declare const Title: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"div", import('../Box').BoxProps>, import('@xstyled/system').Theme, {}, never>;
|
|
12
12
|
export declare const Snackbar: import('styled-components').StyledComponent<import('../System').CreateWuiComponent<"div", import('../Alert').AlertProps> & {
|
|
13
13
|
Title: import('react').FC<import('../Alert/Title').AlertTitleProps>;
|
|
14
|
-
Button: import('../System').CreateWuiComponent<"button", Omit<import('
|
|
15
|
-
SecondaryButton: import('../System').CreateWuiComponent<"button", Omit<import('
|
|
14
|
+
Button: import('../System').CreateWuiComponent<"button", Omit<import('../Button').ButtonProps, "size" | "variant">>;
|
|
15
|
+
SecondaryButton: import('../System').CreateWuiComponent<"button", Omit<import('../Button').ButtonProps, "size" | "variant">>;
|
|
16
16
|
}, import('@xstyled/system').Theme, {}, never>;
|
|
17
17
|
export declare const SnackbarSeparator: import('styled-components').StyledComponent<"div", import('@xstyled/system').Theme, import('@xstyled/system').SystemProps<import('@xstyled/system').Theme> & {
|
|
18
18
|
variant: SnackbarProps["variant"];
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),m=require("./_commonjsHelpers-DvH0V_XJ.js");var y=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],o=0;o<e.rangeCount;o++)r.push(e.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(s){e.addRange(s)}),t&&t.focus()}},g=y,f={"text/plain":"Text","text/html":"Url",default:"Text"},b="Copy to clipboard: #{key}, Enter";function v(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function C(e,t){var r,o,s,n,l,a,i=!1;t||(t={}),r=t.debug||!1;try{s=g(),n=document.createRange(),l=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(c){if(c.stopPropagation(),t.format)if(c.preventDefault(),typeof c.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var u=f[t.format]||f.default;window.clipboardData.setData(u,e)}else c.clipboardData.clearData(),c.clipboardData.setData(t.format,e);t.onCopy&&(c.preventDefault(),t.onCopy(c.clipboardData))}),document.body.appendChild(a),n.selectNodeContents(a),l.addRange(n);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");i=!0}catch(c){r&&console.error("unable to copy using execCommand: ",c),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),i=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),o=v("message"in t?t.message:b),window.prompt(o,e)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(n):l.removeAllRanges()),a&&document.body.removeChild(a),s()}return i}var w=C;const D=m.getDefaultExportFromCjs(w);function x(e,t){const[r,o]=d.useState();return[d.useCallback(()=>{let n;typeof e=="number"||typeof e=="string"?n=e.toString():e.current instanceof HTMLInputElement?n=e.current.value:e.current instanceof HTMLElement&&(n=e.current.textContent);const l=D(n);o(l),t&&setTimeout(o,t)},[e,t]),r]}exports.useCopyText=x;
|
package/dist/utils.mjs
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as p, useCallback as m } from "react";
|
|
3
|
+
import { g } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
4
|
+
var y = function() {
|
|
5
|
+
var e = document.getSelection();
|
|
6
|
+
if (!e.rangeCount)
|
|
7
|
+
return function() {
|
|
8
|
+
};
|
|
9
|
+
for (var t = document.activeElement, r = [], o = 0; o < e.rangeCount; o++)
|
|
10
|
+
r.push(e.getRangeAt(o));
|
|
11
|
+
switch (t.tagName.toUpperCase()) {
|
|
12
|
+
case "INPUT":
|
|
13
|
+
case "TEXTAREA":
|
|
14
|
+
t.blur();
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
t = null;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
return e.removeAllRanges(), function() {
|
|
21
|
+
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(s) {
|
|
22
|
+
e.addRange(s);
|
|
23
|
+
}), t && t.focus();
|
|
24
|
+
};
|
|
25
|
+
}, b = y, f = {
|
|
26
|
+
"text/plain": "Text",
|
|
27
|
+
"text/html": "Url",
|
|
28
|
+
default: "Text"
|
|
29
|
+
}, v = "Copy to clipboard: #{key}, Enter";
|
|
30
|
+
function C(e) {
|
|
31
|
+
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
32
|
+
return e.replace(/#{\s*key\s*}/g, t);
|
|
33
|
+
}
|
|
34
|
+
function w(e, t) {
|
|
35
|
+
var r, o, s, n, l, a, i = !1;
|
|
36
|
+
t || (t = {}), r = t.debug || !1;
|
|
37
|
+
try {
|
|
38
|
+
s = b(), n = document.createRange(), l = document.getSelection(), a = document.createElement("span"), a.textContent = e, a.ariaHidden = "true", a.style.all = "unset", a.style.position = "fixed", a.style.top = 0, a.style.clip = "rect(0, 0, 0, 0)", a.style.whiteSpace = "pre", a.style.webkitUserSelect = "text", a.style.MozUserSelect = "text", a.style.msUserSelect = "text", a.style.userSelect = "text", a.addEventListener("copy", function(c) {
|
|
39
|
+
if (c.stopPropagation(), t.format)
|
|
40
|
+
if (c.preventDefault(), typeof c.clipboardData > "u") {
|
|
41
|
+
r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
42
|
+
var u = f[t.format] || f.default;
|
|
43
|
+
window.clipboardData.setData(u, e);
|
|
44
|
+
} else
|
|
45
|
+
c.clipboardData.clearData(), c.clipboardData.setData(t.format, e);
|
|
46
|
+
t.onCopy && (c.preventDefault(), t.onCopy(c.clipboardData));
|
|
47
|
+
}), document.body.appendChild(a), n.selectNodeContents(a), l.addRange(n);
|
|
48
|
+
var d = document.execCommand("copy");
|
|
49
|
+
if (!d)
|
|
50
|
+
throw new Error("copy command was unsuccessful");
|
|
51
|
+
i = !0;
|
|
52
|
+
} catch (c) {
|
|
53
|
+
r && console.error("unable to copy using execCommand: ", c), r && console.warn("trying IE specific stuff");
|
|
54
|
+
try {
|
|
55
|
+
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), i = !0;
|
|
56
|
+
} catch (u) {
|
|
57
|
+
r && console.error("unable to copy using clipboardData: ", u), r && console.error("falling back to prompt"), o = C("message" in t ? t.message : v), window.prompt(o, e);
|
|
58
|
+
}
|
|
59
|
+
} finally {
|
|
60
|
+
l && (typeof l.removeRange == "function" ? l.removeRange(n) : l.removeAllRanges()), a && document.body.removeChild(a), s();
|
|
61
|
+
}
|
|
62
|
+
return i;
|
|
63
|
+
}
|
|
64
|
+
var D = w;
|
|
65
|
+
const x = /* @__PURE__ */ g(D);
|
|
66
|
+
function S(e, t) {
|
|
67
|
+
const [r, o] = p();
|
|
68
|
+
return [m(() => {
|
|
69
|
+
let n;
|
|
70
|
+
typeof e == "number" || typeof e == "string" ? n = e.toString() : e.current instanceof HTMLInputElement ? n = e.current.value : e.current instanceof HTMLElement && (n = e.current.textContent);
|
|
71
|
+
const l = x(n);
|
|
72
|
+
o(l), t && setTimeout(o, t);
|
|
73
|
+
}, [e, t]), r];
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
S as useCopyText
|
|
77
|
+
};
|