welcome-ui 8.1.0-alpha.3 → 8.1.1
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-XKOjjeWO.mjs → AXB53BZF-BOEe01VW.mjs} +3 -3
- package/dist/Accordion.mjs +23 -30
- package/dist/Alert.mjs +70 -76
- package/dist/AspectRatio.mjs +9 -9
- package/dist/Avatar.mjs +47 -48
- package/dist/{BYC7LY2E-CWSI38FM.mjs → BYC7LY2E-B1IDizRs.mjs} +127 -128
- package/dist/Badge.mjs +25 -25
- package/dist/Box.mjs +5 -5
- package/dist/Breadcrumb.mjs +168 -172
- package/dist/Button.mjs +67 -72
- package/dist/ButtonGroup.mjs +12 -13
- package/dist/Card.mjs +14 -14
- package/dist/Checkbox.mjs +2 -2
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.mjs +9 -9
- package/dist/{CustomPopper-B2Cqfph4.mjs → CustomInput-IA_gVoXd.mjs} +1445 -1466
- package/dist/DatePicker.mjs +80 -81
- package/dist/DateTimePicker.mjs +61 -66
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +172 -188
- package/dist/DropdownMenu.mjs +411 -414
- package/dist/Field.mjs +91 -103
- package/dist/FieldGroup.mjs +9 -12
- package/dist/FileDrop.mjs +556 -587
- package/dist/FileUpload.mjs +71 -92
- package/dist/Files.mjs +46 -46
- package/dist/Flex.mjs +13 -13
- package/dist/Grid.mjs +29 -29
- package/dist/Hint.mjs +12 -12
- package/dist/{ITI7HKP4-C89kOQb8.mjs → ITI7HKP4-EL9KXYBU.mjs} +67 -68
- package/dist/Icon.mjs +25 -25
- package/dist/Icons.mjs +988 -988
- package/dist/IconsFont.mjs +22 -22
- package/dist/InputText.mjs +58 -66
- package/dist/{JC64G2H7-afsomHuH.mjs → JC64G2H7-BzklVBKM.mjs} +46 -47
- package/dist/{KUU7WJ55-CzsjuIMv.mjs → KUU7WJ55-CS4NemC6.mjs} +1 -1
- package/dist/LVA2YJMS-DDEmK0pp.mjs +1482 -0
- package/dist/Label.mjs +35 -37
- package/dist/Link.mjs +28 -32
- package/dist/Loader.mjs +16 -20
- package/dist/Logo.mjs +42 -55
- package/dist/{MTZPJQMC-TybFZCho.mjs → MTZPJQMC-CMjAwC0N.mjs} +2 -2
- package/dist/Modal.mjs +253 -276
- package/dist/{NLEBE274-oSxMftGy.mjs → NLEBE274-QOMV1l7e.mjs} +9 -9
- package/dist/{P2CTZE2T-DOT1mNnX.mjs → P2CTZE2T-Cl2w7OLV.mjs} +48 -49
- package/dist/{P4IRICAX-CWSZLTGz.mjs → P4IRICAX-DezbJY4s.mjs} +3 -3
- package/dist/Pagination.mjs +104 -104
- package/dist/PasswordInput.mjs +34 -35
- package/dist/Picker.mjs +33 -35
- package/dist/Popover.mjs +99 -106
- package/dist/{QYJ6MIDR-DJ-vUdAM.mjs → QYJ6MIDR-Bb0O5xUM.mjs} +30 -31
- package/dist/Radio.mjs +48 -54
- package/dist/RadioGroup.mjs +47 -47
- package/dist/RadioTab.mjs +35 -37
- package/dist/{SYRFVSLH-B6m278Vb.mjs → SYRFVSLH-jn06-eLy.mjs} +10 -11
- package/dist/Search.mjs +159 -175
- package/dist/Select.mjs +338 -373
- package/dist/Shape.mjs +9 -9
- package/dist/Slider.mjs +336 -359
- package/dist/Stack.mjs +24 -22
- package/dist/Swiper.mjs +224 -231
- package/dist/Table.mjs +23 -23
- package/dist/Tabs.mjs +200 -205
- package/dist/Tag.mjs +53 -55
- package/dist/Text.mjs +47 -49
- package/dist/Textarea.mjs +40 -40
- package/dist/TimePicker.mjs +57 -58
- package/dist/Toast.mjs +128 -135
- package/dist/Toggle.mjs +24 -27
- package/dist/Tooltip.mjs +99 -103
- package/dist/UniversalLink.mjs +15 -15
- package/dist/{VEVQD5MH-0w9Y7Ytc.mjs → VEVQD5MH-CuegL0m0.mjs} +3 -3
- package/dist/{VGCJ63VH-C0UPBY-5.mjs → VGCJ63VH-BMzoZtCu.mjs} +38 -39
- package/dist/VariantIcon.mjs +22 -14
- package/dist/WelcomeLoader.mjs +121 -122
- package/dist/WuiProvider.mjs +58 -69
- package/dist/{X5NMLKT6-BJw3xE-K.mjs → X5NMLKT6-CvSCix-_.mjs} +2 -2
- package/dist/{YV4JVR4I-DPC8mMuG.mjs → YV4JVR4I-Bh7B7TET.mjs} +57 -57
- package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
- package/dist/hide-focus-rings-root-BNyva1yb.mjs +14 -0
- package/dist/{index-5HBq1O6Z.mjs → index-5PUh49rV.mjs} +73 -74
- package/dist/index-B0gDDiFm.mjs +66 -0
- package/dist/index-B22SHR8h.mjs +26 -0
- package/dist/{index-DAZ1SYdj.mjs → index-BNGGwOCo.mjs} +7 -7
- package/dist/{index-SQQQ4dEE.mjs → index-BQtDgQBH.mjs} +8 -8
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-QaLwIvZS.mjs → index-Bkl89twW.mjs} +8 -8
- package/dist/{index-BaLGEKs7.mjs → index-C7zM96J_.mjs} +8 -8
- package/dist/index-CQD9fgf_.mjs +11 -0
- package/dist/index-CmsWSKKs.mjs +11 -0
- package/dist/{index-DvzWKxKE.mjs → index-DqBUFsqP.mjs} +7 -7
- package/dist/index-u1oHKa7X.mjs +16 -0
- package/dist/index-wr_b5GSV.mjs +36 -0
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +801 -801
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Accordion/index.d.ts +1 -1
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Accordion/theme.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +3 -3
- package/dist/types/components/AspectRatio/styles.d.ts +2 -3
- package/dist/types/components/Avatar/index.d.ts +3 -2
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +3 -3
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +5 -5
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +5 -4
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +7 -7
- package/dist/types/components/ButtonGroup/index.d.ts +4 -4
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/index.d.ts +3 -2
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +2 -2
- package/dist/types/components/Checkbox/styles.d.ts +1 -1
- package/dist/types/components/Checkbox/theme.d.ts +1 -1
- package/dist/types/components/ClearButton/index.d.ts +6 -5
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DatePicker/index.d.ts +3 -3
- package/dist/types/components/DateTimePicker/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +2 -2
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
- package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +12 -12
- package/dist/types/components/Drawer/styles.d.ts +5 -5
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +4 -4
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +8 -8
- package/dist/types/components/Field/styles.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
- package/dist/types/components/FileDrop/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +20 -20
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +13 -13
- package/dist/types/components/Files/index.d.ts +5 -5
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/index.d.ts +2 -1
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/index.d.ts +3 -3
- package/dist/types/components/Icon/styles.d.ts +3 -3
- package/dist/types/components/Icon/theme.d.ts +3 -3
- package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
- package/dist/types/components/Icons/index.d.ts +2 -2
- package/dist/types/components/IconsFont/index.d.ts +3 -2
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/InputText/index.d.ts +1 -1
- package/dist/types/components/InputText/styles.d.ts +1 -1
- package/dist/types/components/Label/index.d.ts +3 -2
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +5 -5
- package/dist/types/components/Link/styles.d.ts +4 -4
- package/dist/types/components/Link/theme.d.ts +1 -1
- package/dist/types/components/Loader/index.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +4 -4
- package/dist/types/components/Logo/Solutions.d.ts +2 -1
- package/dist/types/components/Logo/Symbol.d.ts +2 -1
- package/dist/types/components/Logo/Wui.d.ts +2 -1
- package/dist/types/components/Logo/index.d.ts +5 -5
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +6 -5
- package/dist/types/components/Modal/Assets/Iframe.d.ts +2 -1
- package/dist/types/components/Modal/Assets/index.d.ts +9 -9
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +4 -3
- package/dist/types/components/Modal/Content.d.ts +5 -3
- package/dist/types/components/Modal/Footer.d.ts +1 -1
- package/dist/types/components/Modal/Header.d.ts +2 -2
- package/dist/types/components/Modal/index.d.ts +17 -17
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +2 -2
- package/dist/types/components/Pagination/index.d.ts +2 -2
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Pagination/utils.d.ts +1 -1
- package/dist/types/components/Picker/index.d.ts +1 -1
- package/dist/types/components/Picker/styles.d.ts +1 -1
- package/dist/types/components/Popover/Arrow.d.ts +2 -1
- package/dist/types/components/Popover/Content.d.ts +3 -2
- package/dist/types/components/Popover/Popover.d.ts +5 -4
- package/dist/types/components/Popover/PopoverHover.d.ts +4 -3
- package/dist/types/components/Popover/Trigger.d.ts +1 -1
- package/dist/types/components/Popover/styles.d.ts +4 -4
- package/dist/types/components/Popover/theme.d.ts +1 -1
- package/dist/types/components/Popover/usePopover.d.ts +6 -6
- package/dist/types/components/Radio/index.d.ts +3 -3
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +2 -2
- package/dist/types/components/RadioTab/index.d.ts +3 -3
- package/dist/types/components/RadioTab/styles.d.ts +9 -3
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +5 -5
- package/dist/types/components/Select/index.d.ts +11 -11
- package/dist/types/components/Select/styles.d.ts +6 -6
- package/dist/types/components/Select/utils.d.ts +7 -11
- package/dist/types/components/Shape/index.d.ts +1 -1
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/Range.d.ts +3 -3
- package/dist/types/components/Slider/index.d.ts +2 -2
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Stack/index.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +17 -16
- package/dist/types/components/Swiper/styles.d.ts +53 -53
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +14 -14
- package/dist/types/components/Table/index.d.ts +7 -6
- package/dist/types/components/Table/styles.d.ts +1 -1
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
- package/dist/types/components/Tabs/TabList.d.ts +4 -4
- package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +2 -2
- package/dist/types/components/Tag/index.d.ts +3 -2
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +2 -2
- package/dist/types/components/Text/index.d.ts +2 -2
- package/dist/types/components/Textarea/index.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/TimePicker/index.d.ts +2 -2
- package/dist/types/components/Toast/Growl.d.ts +1 -1
- package/dist/types/components/Toast/Snackbar.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +5 -5
- package/dist/types/components/Toast/index.d.ts +6 -6
- package/dist/types/components/Toast/styles.d.ts +16 -16
- package/dist/types/components/Toast/theme.d.ts +2 -2
- package/dist/types/components/Toast/utils.d.ts +13 -13
- package/dist/types/components/Toggle/index.d.ts +3 -3
- package/dist/types/components/Toggle/styles.d.ts +4 -5
- package/dist/types/components/Toggle/theme.d.ts +5 -5
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/Tooltip/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/index.d.ts +1 -1
- package/dist/types/components/VariantIcon/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +2 -2
- package/dist/types/components/WuiProvider/font.d.ts +5 -3
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +11 -3
- package/dist/types/theme/dark.d.ts +1 -1
- package/dist/types/theme/defaultFields.d.ts +10 -10
- package/dist/types/theme/fonts.d.ts +5 -5
- package/dist/types/theme/index.d.ts +31 -31
- package/dist/types/theme/screens.d.ts +1 -1
- package/dist/types/theme/space.d.ts +1 -1
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/ts-utils.d.ts +1 -1
- package/dist/types/utils/use-copy-text.d.ts +1 -1
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/types/utils/wrap-children.d.ts +1 -1
- package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
- package/dist/{use-viewport-CWpjoHXy.mjs → use-viewport-CfklieD-.mjs} +2 -2
- package/dist/utils.mjs +29 -102
- package/dist/wrap-children-aq69jtFP.mjs +12 -0
- package/package.json +27 -3
- package/dist/LVA2YJMS-C-kJ1lkr.mjs +0 -873
- package/dist/hide-focus-rings-root-CCXdysih.mjs +0 -15
- package/dist/index-CYmF7qCH.mjs +0 -11
- package/dist/index-C_k-m0Rl.mjs +0 -36
- package/dist/index-D8v_VJ9z.mjs +0 -26
- package/dist/index-DpkNUfAS.mjs +0 -11
- package/dist/index-i_anpNhw.mjs +0 -66
- package/dist/index-wl3X6EM1.mjs +0 -16
- package/dist/jsx-runtime-B7I4PJ0H.mjs +0 -613
- package/dist/radio-group-C0fUHvam.mjs +0 -52
- package/dist/throttle-CW18pWlW.mjs +0 -13
- package/dist/wrap-children-DBSD-X5-.mjs +0 -9
- package/dist/{downshift.esm-B7Jil1wW.mjs → downshift.esm-D0ns_SQs.mjs} +9 -9
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { CheckboxProps } from '../Checkbox';
|
|
2
|
-
import { ToggleOptions } from './index';
|
|
3
1
|
import { Size } from './theme';
|
|
2
|
+
import { ToggleOptions } from './index';
|
|
4
3
|
import * as Ariakit from '@ariakit/react';
|
|
5
4
|
export declare const Toggle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Ariakit.CheckboxOptions<"input"> & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
6
|
-
ref?:
|
|
5
|
+
ref?: import('react').Ref<HTMLInputElement>;
|
|
7
6
|
}, keyof Ariakit.CheckboxOptions<T>> & {
|
|
8
7
|
[index: `data-${string}`]: unknown;
|
|
9
8
|
}, ToggleOptions>> & string & Omit<(props: Ariakit.CheckboxProps) => import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>>, keyof import('react').Component<any, {}, any>>;
|
|
10
9
|
export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
|
|
11
|
-
onClick:
|
|
10
|
+
onClick: React.MouseEventHandler<HTMLInputElement>;
|
|
12
11
|
}>> & string;
|
|
13
12
|
export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
|
|
14
|
-
checked
|
|
13
|
+
checked: boolean;
|
|
15
14
|
size: Size;
|
|
16
15
|
}>> & string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
-
import { ThemeValues } from '
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
3
|
export type Size = 'xs' | 'sm' | 'md';
|
|
4
|
+
type State = 'default' | 'checked' | 'disabled';
|
|
4
5
|
export type ThemeToggles = {
|
|
5
|
-
after: Record<'sizes'
|
|
6
|
-
icon: Record<'
|
|
7
|
-
item: Record<'sizes'
|
|
6
|
+
after: Record<State | 'sizes', CSSObject>;
|
|
7
|
+
icon: Record<'sizes' | 'position', CSSObject>;
|
|
8
|
+
item: Record<State | 'sizes', CSSObject>;
|
|
8
9
|
};
|
|
9
|
-
type State = 'checked' | 'default' | 'disabled';
|
|
10
10
|
export declare const getToggles: (theme: ThemeValues) => ThemeToggles;
|
|
11
11
|
export {};
|
|
@@ -3,9 +3,9 @@ import { CreateWuiProps } from '../System';
|
|
|
3
3
|
import * as Ariakit from '@ariakit/react';
|
|
4
4
|
export type TooltipOptions = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
content: JSX.Element
|
|
6
|
+
content: string | JSX.Element;
|
|
7
7
|
fixed?: boolean;
|
|
8
8
|
withArrow?: boolean;
|
|
9
|
-
} & Pick<Ariakit.
|
|
9
|
+
} & Pick<Ariakit.TooltipStoreProps, 'placement'> & Pick<Ariakit.TooltipOptions, 'gutter'>;
|
|
10
10
|
export type TooltipProps = CreateWuiProps<'div', TooltipOptions>;
|
|
11
11
|
export declare const Tooltip: import('../System').CreateWuiComponent<"div", TooltipProps>;
|
|
@@ -2,7 +2,7 @@ import { TooltipProps } from './index';
|
|
|
2
2
|
type FadeIn = {
|
|
3
3
|
fixed?: boolean;
|
|
4
4
|
placement?: TooltipProps['placement'];
|
|
5
|
-
popoverHeight
|
|
5
|
+
popoverHeight: number;
|
|
6
6
|
withArrow?: boolean;
|
|
7
7
|
};
|
|
8
8
|
export declare const FadeIn: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, FadeIn>> & string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { VariantIconOptions } from '.';
|
|
2
2
|
export declare const VariantIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>> & import('@xstyled/system').SystemProps<import('@xstyled/system').Theme>, {
|
|
3
|
-
variant:
|
|
3
|
+
variant: VariantIconOptions["variant"] | string;
|
|
4
4
|
}>> & string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
-
import { ThemeValues } from '
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
3
|
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
|
+
export type Variant = 'danger' | 'warning' | 'success' | 'info' | 'default' | 'ai';
|
|
4
5
|
export type ThemeVariantIcon = Record<Variant, CSSObject>;
|
|
5
|
-
export type Variant = 'ai' | 'danger' | 'default' | 'info' | 'success' | 'warning';
|
|
6
6
|
export declare const getVariantIcon: (theme: ThemeValues) => ThemeVariantIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from '@xstyled/styled-components';
|
|
2
|
-
import { ThemeValues } from '
|
|
2
|
+
import { ThemeValues } from '../../theme';
|
|
3
3
|
type FontVariation = {
|
|
4
4
|
display?: FontDisplay;
|
|
5
5
|
extensions?: string[];
|
|
@@ -9,6 +9,8 @@ type FontVariation = {
|
|
|
9
9
|
url: string;
|
|
10
10
|
weight?: string;
|
|
11
11
|
};
|
|
12
|
-
export declare function getSource(url: FontVariation['url'], extensions: FontVariation['extensions'], isVariable: FontVariation['isVariable']): string
|
|
13
|
-
export declare const fonts: (
|
|
12
|
+
export declare function getSource(url: FontVariation['url'], extensions: FontVariation['extensions'], isVariable: FontVariation['isVariable']): string;
|
|
13
|
+
export declare const fonts: () => ({ theme }: {
|
|
14
|
+
theme: ThemeValues;
|
|
15
|
+
}) => ReturnType<typeof css>;
|
|
14
16
|
export {};
|
|
@@ -100,7 +100,6 @@ declare const palette: {
|
|
|
100
100
|
'yellow-90': string;
|
|
101
101
|
};
|
|
102
102
|
export declare const getColors: (systemColors: typeof palette) => {
|
|
103
|
-
overlay: string;
|
|
104
103
|
'primary-10': string;
|
|
105
104
|
'primary-20': string;
|
|
106
105
|
'primary-30': string;
|
|
@@ -116,6 +115,7 @@ export declare const getColors: (systemColors: typeof palette) => {
|
|
|
116
115
|
'secondary-pink': string;
|
|
117
116
|
'secondary-teal': string;
|
|
118
117
|
'secondary-violet': string;
|
|
118
|
+
overlay: string;
|
|
119
119
|
'beige-10': string;
|
|
120
120
|
'beige-20': string;
|
|
121
121
|
'beige-30': string;
|
|
@@ -217,7 +217,6 @@ export declare const getColors: (systemColors: typeof palette) => {
|
|
|
217
217
|
'yellow-90': string;
|
|
218
218
|
};
|
|
219
219
|
export declare const colors: {
|
|
220
|
-
overlay: string;
|
|
221
220
|
'primary-10': string;
|
|
222
221
|
'primary-20': string;
|
|
223
222
|
'primary-30': string;
|
|
@@ -233,6 +232,7 @@ export declare const colors: {
|
|
|
233
232
|
'secondary-pink': string;
|
|
234
233
|
'secondary-teal': string;
|
|
235
234
|
'secondary-violet': string;
|
|
235
|
+
overlay: string;
|
|
236
236
|
'beige-10': string;
|
|
237
237
|
'beige-20': string;
|
|
238
238
|
'beige-30': string;
|
|
@@ -334,5 +334,13 @@ export declare const colors: {
|
|
|
334
334
|
'yellow-90': string;
|
|
335
335
|
};
|
|
336
336
|
export type ThemeColors = typeof colors;
|
|
337
|
-
|
|
337
|
+
declare const enum SecondaryColors {
|
|
338
|
+
'blue' = 0,
|
|
339
|
+
'green' = 1,
|
|
340
|
+
'orange' = 2,
|
|
341
|
+
'pink' = 3,
|
|
342
|
+
'teal' = 4,
|
|
343
|
+
'violet' = 5
|
|
344
|
+
}
|
|
345
|
+
export type ThemeSecondaryColors = keyof typeof SecondaryColors;
|
|
338
346
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThemeValues } from '.';
|
|
2
2
|
type RecursivePartial<T> = {
|
|
3
|
-
[P in keyof T]?:
|
|
3
|
+
[P in keyof T]?: T[P] | RecursivePartial<T[P]>;
|
|
4
4
|
};
|
|
5
5
|
export declare const colorsDark: ThemeValues['colors'];
|
|
6
6
|
export declare const darkTheme: RecursivePartial<ThemeValues>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { CSSObject } from '@xstyled/styled-components';
|
|
2
|
+
import { DefaultFieldStylesProps } from '../utils/field-styles';
|
|
2
3
|
import { ThemeValues } from '.';
|
|
3
|
-
|
|
4
|
+
type VariantsTheme = {
|
|
5
|
+
danger: CSSObject;
|
|
6
|
+
success: CSSObject;
|
|
7
|
+
warning: CSSObject;
|
|
8
|
+
};
|
|
4
9
|
export type ThemeDefaultFields = {
|
|
5
10
|
checkableField: {
|
|
6
11
|
checked: CSSObject;
|
|
@@ -13,11 +18,11 @@ export type ThemeDefaultFields = {
|
|
|
13
18
|
default: CSSObject;
|
|
14
19
|
disabled: CSSObject;
|
|
15
20
|
fieldset: CSSObject;
|
|
16
|
-
focused: {
|
|
21
|
+
focused: VariantsTheme & {
|
|
17
22
|
default: CSSObject;
|
|
18
|
-
}
|
|
23
|
+
};
|
|
19
24
|
hover: CSSObject;
|
|
20
|
-
iconPlacement: Record<
|
|
25
|
+
iconPlacement: Record<DefaultFieldStylesProps['size'], CSSObject>;
|
|
21
26
|
placeholder: CSSObject;
|
|
22
27
|
select: {
|
|
23
28
|
default: CSSObject;
|
|
@@ -27,13 +32,8 @@ export type ThemeDefaultFields = {
|
|
|
27
32
|
selected: CSSObject;
|
|
28
33
|
selectedAndHighlighted: CSSObject;
|
|
29
34
|
};
|
|
30
|
-
sizes: Record<
|
|
35
|
+
sizes: Record<DefaultFieldStylesProps['size'], CSSObject>;
|
|
31
36
|
variants: VariantsTheme;
|
|
32
37
|
};
|
|
33
|
-
type VariantsTheme = {
|
|
34
|
-
danger: CSSObject;
|
|
35
|
-
success: CSSObject;
|
|
36
|
-
warning: CSSObject;
|
|
37
|
-
};
|
|
38
38
|
export declare const getDefaultFields: (theme: ThemeValues) => ThemeDefaultFields;
|
|
39
39
|
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { ThemeValues } from '.';
|
|
2
|
-
export type ThemeFontFaces = {
|
|
3
|
-
'welcome-font': FontFace[];
|
|
4
|
-
'welcome-icon-font': FontFace[];
|
|
5
|
-
'work-sans': FontFace[];
|
|
6
|
-
};
|
|
7
2
|
type FontFace = {
|
|
8
3
|
display?: FontDisplay;
|
|
9
4
|
extensions?: string[];
|
|
@@ -14,5 +9,10 @@ type FontFace = {
|
|
|
14
9
|
url: string;
|
|
15
10
|
weight?: string;
|
|
16
11
|
};
|
|
12
|
+
export type ThemeFontFaces = {
|
|
13
|
+
'welcome-font': FontFace[];
|
|
14
|
+
'welcome-icon-font': FontFace[];
|
|
15
|
+
'work-sans': FontFace[];
|
|
16
|
+
};
|
|
17
17
|
export declare const fontFaces: (theme: ThemeValues) => ThemeFontFaces;
|
|
18
18
|
export {};
|
|
@@ -6,16 +6,16 @@ import { ThemeBadges } from '../components/Badge/theme';
|
|
|
6
6
|
import { ThemeBreadcrumbs } from '../components/Breadcrumb/theme';
|
|
7
7
|
import { ThemeButtons } from '../components/Button/theme';
|
|
8
8
|
import { ThemeCards } from '../components/Card/theme';
|
|
9
|
-
import { ThemeCheckboxes } from '../components/Checkbox/theme';
|
|
10
9
|
import { ThemeDateTimePickerCommon } from '../components/DateTimePickerCommon/theme';
|
|
10
|
+
import { ThemeCheckboxes } from '../components/Checkbox/theme';
|
|
11
11
|
import { ThemeDrawers } from '../components/Drawer/theme';
|
|
12
12
|
import { ThemeDropdownMenu } from '../components/DropdownMenu/theme';
|
|
13
13
|
import { ThemeFileDrops } from '../components/FileDrop/theme';
|
|
14
14
|
import { ThemeHints } from '../components/Hint/theme';
|
|
15
|
-
import { ThemeIcons } from '../components/Icon/theme';
|
|
16
15
|
import { ThemeLabels } from '../components/Label/theme';
|
|
17
16
|
import { ThemeLinks } from '../components/Link/theme';
|
|
18
17
|
import { ThemeLoaders } from '../components/Loader/theme';
|
|
18
|
+
import { ThemeIcons } from '../components/Icon/theme';
|
|
19
19
|
import { ThemeModals } from '../components/Modal/theme';
|
|
20
20
|
import { ThemePagination } from '../components/Pagination/theme';
|
|
21
21
|
import { ThemePopovers } from '../components/Popover/theme';
|
|
@@ -31,33 +31,24 @@ import { ThemeToasts } from '../components/Toast/theme';
|
|
|
31
31
|
import { ThemeToggles } from '../components/Toggle/theme';
|
|
32
32
|
import { ThemeTooltips } from '../components/Tooltip/theme';
|
|
33
33
|
import { ThemeVariantIcon } from '../components/VariantIcon/theme';
|
|
34
|
-
import {
|
|
34
|
+
import { darkTheme } from './dark';
|
|
35
35
|
import { ThemeColors } from './colors';
|
|
36
|
-
import { ThemeDefaultFields } from './defaultFields';
|
|
37
|
-
import { ThemeFocus } from './focus';
|
|
38
36
|
import { ThemeFontFaces } from './fonts';
|
|
37
|
+
import { ThemeFonts, ThemeFontSizes, ThemeFontWeights, ThemeLetterSpacings, ThemeLineHeights, ThemeTexts, ThemeTextsFontColors, ThemeTextsFontFamily, ThemeTextsFontWeights, ThemeTextsTextTransform } from './typography';
|
|
38
|
+
import { ThemeTimingFunction, ThemeTransitions } from './transitions';
|
|
39
|
+
import { ThemeUnderline } from './underline';
|
|
39
40
|
import { ThemeRadii } from './radii';
|
|
41
|
+
import { ThemeBorderWidths } from './borders';
|
|
40
42
|
import { ThemeScreens } from './screens';
|
|
41
|
-
import { ThemeSelection } from './selection';
|
|
42
43
|
import { ThemeShadows } from './shadows';
|
|
43
44
|
import { ThemeSpace } from './space';
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export
|
|
51
|
-
[param: string]: unknown;
|
|
52
|
-
defaultFontFamily?: string;
|
|
53
|
-
defaultFontSize?: number;
|
|
54
|
-
defaultLetterSpacing?: string;
|
|
55
|
-
defaultLineHeight?: number;
|
|
56
|
-
fontsUrl?: ThemeFontsUrl;
|
|
57
|
-
headingFontFamily?: string;
|
|
58
|
-
iconFontFamily?: string;
|
|
59
|
-
};
|
|
60
|
-
export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledComponentsTheme {
|
|
45
|
+
import { ThemeSelection } from './selection';
|
|
46
|
+
import { ThemeFocus } from './focus';
|
|
47
|
+
import { ThemeDefaultFields } from './defaultFields';
|
|
48
|
+
type OverrideKeys = 'colors' | 'radii' | 'borderWidths' | 'fontSizes' | 'lineHeights' | 'fontWeights' | 'letterSpacings' | 'fonts' | 'sizes' | 'screens' | 'space' | 'shadows' | 'texts';
|
|
49
|
+
type XStyledTheme = Omit<XStyledDefaultTheme, OverrideKeys>;
|
|
50
|
+
type StyledComponentsTheme = Omit<StyledComponentDefaultTheme, OverrideKeys>;
|
|
51
|
+
export interface ThemeValues extends XStyledTheme, StyledComponentsTheme {
|
|
61
52
|
accordions: ThemeAccordions;
|
|
62
53
|
alerts: ThemeAlerts;
|
|
63
54
|
avatars: ThemeAvatars;
|
|
@@ -77,10 +68,10 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
|
|
|
77
68
|
fileDrops: ThemeFileDrops;
|
|
78
69
|
focus: ThemeFocus;
|
|
79
70
|
fontFaces: ThemeFontFaces;
|
|
80
|
-
fonts: ThemeFonts;
|
|
81
71
|
fontSizes: ThemeFontSizes;
|
|
82
|
-
fontsUrl: ThemeFontsUrl;
|
|
83
72
|
fontWeights: ThemeFontWeights;
|
|
73
|
+
fonts: ThemeFonts;
|
|
74
|
+
fontsUrl: ThemeFontsUrl;
|
|
84
75
|
hints: ThemeHints;
|
|
85
76
|
icons: ThemeIcons;
|
|
86
77
|
inset: ThemeSpace;
|
|
@@ -111,12 +102,12 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
|
|
|
111
102
|
textsFontWeights: ThemeTextsFontWeights;
|
|
112
103
|
textsTextTransform: ThemeTextsTextTransform;
|
|
113
104
|
timingFunction: ThemeTimingFunction;
|
|
114
|
-
toasts: ThemeToasts;
|
|
115
105
|
toEm: (int: number) => string;
|
|
116
|
-
toggles: ThemeToggles;
|
|
117
|
-
tooltips: ThemeTooltips;
|
|
118
106
|
toPx: (int: number) => string;
|
|
119
107
|
toRem: (int: number) => string;
|
|
108
|
+
toasts: ThemeToasts;
|
|
109
|
+
toggles: ThemeToggles;
|
|
110
|
+
tooltips: ThemeTooltips;
|
|
120
111
|
transformers: {
|
|
121
112
|
border: (value: CSSScalar) => CSSScalar;
|
|
122
113
|
px: (value: CSSScalar) => CSSScalar;
|
|
@@ -125,8 +116,17 @@ export interface ThemeValues extends Omit<XStyledTheme, 'transitions'>, StyledCo
|
|
|
125
116
|
underline: ThemeUnderline;
|
|
126
117
|
variantIcon: ThemeVariantIcon;
|
|
127
118
|
}
|
|
128
|
-
type
|
|
129
|
-
type
|
|
130
|
-
type
|
|
119
|
+
export type ThemeFontsUrl = 'https://cdn.welcome-ui.com/fonts' | 'https://cdn.welcometothejungle.com/fonts' | string;
|
|
120
|
+
export type ThemeColorTokens = keyof ThemeColors;
|
|
121
|
+
export type ThemeProps = {
|
|
122
|
+
[param: string]: unknown;
|
|
123
|
+
defaultFontFamily?: string;
|
|
124
|
+
defaultFontSize?: number;
|
|
125
|
+
defaultLetterSpacing?: string;
|
|
126
|
+
defaultLineHeight?: number;
|
|
127
|
+
fontsUrl?: ThemeFontsUrl;
|
|
128
|
+
headingFontFamily?: string;
|
|
129
|
+
iconFontFamily?: string;
|
|
130
|
+
};
|
|
131
131
|
export declare const createTheme: (options?: ThemeProps) => ThemeValues;
|
|
132
132
|
export { darkTheme };
|
|
@@ -127,7 +127,7 @@ export type ThemeTexts = {
|
|
|
127
127
|
export declare const getTexts: (theme: ThemeValues) => ThemeTexts;
|
|
128
128
|
export type ThemeFonts = {
|
|
129
129
|
headings: string;
|
|
130
|
-
icons
|
|
130
|
+
icons: string;
|
|
131
131
|
texts: string;
|
|
132
132
|
};
|
|
133
133
|
export declare const getFonts: (defaultFontFamily: ThemeProps["defaultFontFamily"], headingFontFamily: ThemeProps["headingFontFamily"], iconFontFamily: ThemeProps["iconFontFamily"]) => ThemeFonts;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { css } from '@xstyled/styled-components';
|
|
2
2
|
export type DefaultFieldIconSize = 'sm' | 'xs';
|
|
3
|
-
export type Size = '
|
|
3
|
+
export type Size = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
4
|
export declare const FIELD_ICON_SIZE: {
|
|
5
5
|
[key in Size]: DefaultFieldIconSize;
|
|
6
6
|
};
|
|
7
|
-
export type DefaultFieldStylesProps = {
|
|
7
|
+
export type DefaultFieldStylesProps = Partial<{
|
|
8
8
|
hasIcon?: boolean;
|
|
9
|
-
iconPlacement?: '
|
|
9
|
+
iconPlacement?: 'right' | 'left' | 'both';
|
|
10
10
|
isClearable?: boolean;
|
|
11
|
-
size
|
|
11
|
+
size: Size;
|
|
12
12
|
transparent?: boolean;
|
|
13
|
-
variant
|
|
14
|
-
}
|
|
13
|
+
variant: 'danger' | 'success' | 'warning';
|
|
14
|
+
}>;
|
|
15
15
|
type DefaultFieldStyles = (args: DefaultFieldStylesProps) => ReturnType<typeof css>;
|
|
16
16
|
export declare const defaultFieldStyles: DefaultFieldStyles;
|
|
17
17
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './field-styles';
|
|
2
1
|
export * from './format-bytes';
|
|
3
2
|
export * from './hex-to-rgba';
|
|
3
|
+
export * from './field-styles';
|
|
4
4
|
export * from './overflow-ellipsis';
|
|
5
5
|
export * from './throttle';
|
|
6
|
-
export * from './ts-utils';
|
|
7
6
|
export * from './use-copy-text';
|
|
8
7
|
export * from './use-fork-ref';
|
|
9
8
|
export * from './use-isomorphic-layout-effect';
|
|
10
9
|
export * from './use-viewport';
|
|
10
|
+
export * from './ts-utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Content =
|
|
1
|
+
type Content = React.RefObject<HTMLElement | HTMLInputElement> | number | string;
|
|
2
2
|
type Timeout = number;
|
|
3
3
|
type useCopyTextReturn = [() => void, boolean];
|
|
4
4
|
export declare function useCopyText(content: Content, timeout: Timeout): useCopyTextReturn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook that mimic the React createPortal function in order to make it SSR friendly
|
|
3
3
|
*/
|
|
4
|
-
export declare function useCreatePortal(disable?: boolean): ((children: React.ReactNode) =>
|
|
4
|
+
export declare function useCreatePortal(disable?: boolean): ((children: React.ReactNode) => any) | ((children: React.ReactNode, container?: Element | DocumentFragment, key?: string | null) => import('react').ReactPortal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const wrapChildren: (children?: JSX.Element
|
|
1
|
+
export declare const wrapChildren: (children?: string | JSX.Element) => unknown;
|
|
@@ -3,13 +3,12 @@ import { useMemo as e } from "react";
|
|
|
3
3
|
function o(u, n) {
|
|
4
4
|
typeof u == "function" ? u(n) : u && (u.current = n);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return e(() => u == null && n == null ? () => {
|
|
8
|
-
} : (t) => {
|
|
6
|
+
function l(u, n) {
|
|
7
|
+
return e(() => u == null && n == null ? null : (t) => {
|
|
9
8
|
o(u, t), o(n, t);
|
|
10
9
|
}, [u, n]);
|
|
11
10
|
}
|
|
12
11
|
export {
|
|
13
12
|
o as s,
|
|
14
|
-
|
|
13
|
+
l as u
|
|
15
14
|
};
|
|
@@ -4,9 +4,9 @@ import { u as o } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
|
4
4
|
function w() {
|
|
5
5
|
const [t, e] = n({ height: void 0, width: void 0 });
|
|
6
6
|
return o(() => {
|
|
7
|
-
e({
|
|
7
|
+
e({ width: window.innerWidth, height: window.innerHeight });
|
|
8
8
|
function i() {
|
|
9
|
-
e({
|
|
9
|
+
e({ width: window.innerWidth, height: window.innerHeight });
|
|
10
10
|
}
|
|
11
11
|
return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
|
|
12
12
|
}, []), t;
|
package/dist/utils.mjs
CHANGED
|
@@ -1,106 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { o as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { s as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
c.push(e.getRangeAt(l));
|
|
21
|
-
switch (o.tagName.toUpperCase()) {
|
|
22
|
-
// .toUpperCase handles XHTML
|
|
23
|
-
case "INPUT":
|
|
24
|
-
case "TEXTAREA":
|
|
25
|
-
o.blur();
|
|
26
|
-
break;
|
|
27
|
-
default:
|
|
28
|
-
o = null;
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
return e.removeAllRanges(), function() {
|
|
32
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || c.forEach(function(u) {
|
|
33
|
-
e.addRange(u);
|
|
34
|
-
}), o && o.focus();
|
|
35
|
-
};
|
|
36
|
-
}), m;
|
|
37
|
-
}
|
|
38
|
-
var y, b;
|
|
39
|
-
function h() {
|
|
40
|
-
if (b) return y;
|
|
41
|
-
b = 1;
|
|
42
|
-
var e = T(), o = {
|
|
43
|
-
"text/plain": "Text",
|
|
44
|
-
"text/html": "Url",
|
|
45
|
-
default: "Text"
|
|
46
|
-
}, c = "Copy to clipboard: #{key}, Enter";
|
|
47
|
-
function l(a) {
|
|
48
|
-
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
49
|
-
return a.replace(/#{\s*key\s*}/g, t);
|
|
50
|
-
}
|
|
51
|
-
function u(a, t) {
|
|
52
|
-
var s, g, v, f, i, r, p = !1;
|
|
53
|
-
t || (t = {}), s = t.debug || !1;
|
|
54
|
-
try {
|
|
55
|
-
v = e(), f = document.createRange(), i = document.getSelection(), r = document.createElement("span"), r.textContent = a, r.ariaHidden = "true", r.style.all = "unset", r.style.position = "fixed", r.style.top = 0, r.style.clip = "rect(0, 0, 0, 0)", r.style.whiteSpace = "pre", r.style.webkitUserSelect = "text", r.style.MozUserSelect = "text", r.style.msUserSelect = "text", r.style.userSelect = "text", r.addEventListener("copy", function(n) {
|
|
56
|
-
if (n.stopPropagation(), t.format)
|
|
57
|
-
if (n.preventDefault(), typeof n.clipboardData > "u") {
|
|
58
|
-
s && console.warn("unable to use e.clipboardData"), s && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
59
|
-
var d = o[t.format] || o.default;
|
|
60
|
-
window.clipboardData.setData(d, a);
|
|
61
|
-
} else
|
|
62
|
-
n.clipboardData.clearData(), n.clipboardData.setData(t.format, a);
|
|
63
|
-
t.onCopy && (n.preventDefault(), t.onCopy(n.clipboardData));
|
|
64
|
-
}), document.body.appendChild(r), f.selectNodeContents(r), i.addRange(f);
|
|
65
|
-
var x = document.execCommand("copy");
|
|
66
|
-
if (!x)
|
|
67
|
-
throw new Error("copy command was unsuccessful");
|
|
68
|
-
p = !0;
|
|
69
|
-
} catch (n) {
|
|
70
|
-
s && console.error("unable to copy using execCommand: ", n), s && console.warn("trying IE specific stuff");
|
|
71
|
-
try {
|
|
72
|
-
window.clipboardData.setData(t.format || "text", a), t.onCopy && t.onCopy(window.clipboardData), p = !0;
|
|
73
|
-
} catch (d) {
|
|
74
|
-
s && console.error("unable to copy using clipboardData: ", d), s && console.error("falling back to prompt"), g = l("message" in t ? t.message : c), window.prompt(g, a);
|
|
75
|
-
}
|
|
76
|
-
} finally {
|
|
77
|
-
i && (typeof i.removeRange == "function" ? i.removeRange(f) : i.removeAllRanges()), r && document.body.removeChild(r), v();
|
|
78
|
-
}
|
|
79
|
-
return p;
|
|
80
|
-
}
|
|
81
|
-
return y = u, y;
|
|
82
|
-
}
|
|
83
|
-
var S = h();
|
|
84
|
-
const R = /* @__PURE__ */ w(S);
|
|
85
|
-
function A(e, o) {
|
|
86
|
-
const [c, l] = D(!1);
|
|
87
|
-
return [E(() => {
|
|
88
|
-
let a;
|
|
89
|
-
typeof e == "number" || typeof e == "string" ? a = e.toString() : e.current instanceof HTMLInputElement ? a = e.current.value : e.current instanceof HTMLElement && (a = e.current.textContent);
|
|
90
|
-
const t = a && R(a);
|
|
91
|
-
l(t || !1), o && setTimeout(l, o);
|
|
92
|
-
}, [e, o]), c];
|
|
2
|
+
import { f as y } from "./format-bytes-gST0dTWd.mjs";
|
|
3
|
+
import { h as C } from "./hex-to-rgba-BIDK-3ab.mjs";
|
|
4
|
+
import { F as S, d as T } from "./field-styles-CfVLcVQp.mjs";
|
|
5
|
+
import { o as h } from "./overflow-ellipsis-DGV5Kgt-.mjs";
|
|
6
|
+
import { t as L } from "./throttle-BDBzFeFj.mjs";
|
|
7
|
+
import { useState as p, useCallback as a } from "react";
|
|
8
|
+
import { c as i } from "./index-BhcLigYU.mjs";
|
|
9
|
+
import { s as g, u as v } from "./use-fork-ref-CUZErtAC.mjs";
|
|
10
|
+
import { u as k } from "./use-isomorphic-layout-effect-Izr-e2pi.mjs";
|
|
11
|
+
import { u as B } from "./use-viewport-CfklieD-.mjs";
|
|
12
|
+
function c(e, r) {
|
|
13
|
+
const [s, t] = p();
|
|
14
|
+
return [a(() => {
|
|
15
|
+
let o;
|
|
16
|
+
typeof e == "number" || typeof e == "string" ? o = e.toString() : e.current instanceof HTMLInputElement ? o = e.current.value : e.current instanceof HTMLElement && (o = e.current.textContent);
|
|
17
|
+
const f = i(o);
|
|
18
|
+
t(f), r && setTimeout(t, r);
|
|
19
|
+
}, [e, r]), s];
|
|
93
20
|
}
|
|
94
21
|
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
22
|
+
S as FIELD_ICON_SIZE,
|
|
23
|
+
T as defaultFieldStyles,
|
|
24
|
+
y as formatBytes,
|
|
25
|
+
C as hexToRGBA,
|
|
26
|
+
h as overflowEllipsis,
|
|
27
|
+
g as setRef,
|
|
28
|
+
L as throttle,
|
|
29
|
+
c as useCopyText,
|
|
30
|
+
v as useForkRef,
|
|
31
|
+
k as useIsomorphicLayoutEffect,
|
|
32
|
+
B as useViewportSize
|
|
106
33
|
};
|