@openfin/ui-library 0.1.40-alpha.1657030820 → 0.1.40
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/README.md +7 -0
- package/dist/assets/fonts/index.d.ts +6 -0
- package/dist/assets/fonts/index.js +11 -0
- package/dist/components/controls/Button/button.js +83 -0
- package/dist/components/controls/Button/button.variants.js +124 -0
- package/dist/components/controls/Button/index.js +14 -0
- package/dist/components/controls/Toggle/index.js +13 -0
- package/dist/components/controls/Toggle/toggle.js +98 -0
- package/dist/components/elements/Badge/badge.js +41 -0
- package/dist/components/elements/Badge/index.js +13 -0
- package/dist/components/elements/Icon/icon.js +56 -0
- package/dist/components/elements/Icon/icon.variants.js +60 -0
- package/dist/components/elements/Icon/index.js +13 -0
- package/dist/{types/components → components}/elements/Icon/openfin/BellIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/BellIcon.js +24 -0
- package/dist/{types/components → components}/elements/Icon/openfin/BrokenLinkIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/BrokenLinkIcon.js +21 -0
- package/dist/{types/components → components}/elements/Icon/openfin/FilterIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/FilterIcon.js +20 -0
- package/dist/{types/components → components}/elements/Icon/openfin/FloppyDiskIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/FloppyDiskIcon.js +23 -0
- package/dist/{types/components → components}/elements/Icon/openfin/LightBulbFilledIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/LightBulbFilledIcon.js +21 -0
- package/dist/{types/components → components}/elements/Icon/openfin/LightBulbOutlinedIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/LightBulbOutlinedIcon.js +20 -0
- package/dist/{types/components → components}/elements/Icon/openfin/LockedClosedFilledIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/LockedClosedFilledIcon.js +23 -0
- package/dist/{types/components → components}/elements/Icon/openfin/MinimizeIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/MinimizeIcon.js +23 -0
- package/dist/{types/components → components}/elements/Icon/openfin/OpenFinIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/OpenFinIcon.js +23 -0
- package/dist/{types/components → components}/elements/Icon/openfin/WorkspaceIcon.d.ts +1 -0
- package/dist/components/elements/Icon/openfin/WorkspaceIcon.js +26 -0
- package/dist/components/elements/Icon/openfin/index.js +22 -0
- package/dist/components/elements/Loader/index.js +13 -0
- package/dist/components/elements/Loader/loader.js +25 -0
- package/dist/components/input/BaseInput/baseInput.js +94 -0
- package/dist/components/input/BaseInput/index.js +13 -0
- package/dist/components/input/Checkbox/checkbox.js +96 -0
- package/dist/components/input/Checkbox/index.js +13 -0
- package/dist/components/input/NumberInput/index.js +13 -0
- package/dist/components/input/NumberInput/numberInput.js +108 -0
- package/dist/components/input/RawInput/index.js +13 -0
- package/dist/components/input/RawInput/rawInput.js +12 -0
- package/dist/components/input/TextInput/index.js +13 -0
- package/dist/components/input/TextInput/textInput.js +10 -0
- package/dist/components/layout/Box/box.js +50 -0
- package/dist/components/layout/Box/index.js +13 -0
- package/dist/components/layout/Box/types.js +2 -0
- package/dist/components/layout/DefinitionList/definitionList.js +49 -0
- package/dist/components/layout/DefinitionList/index.js +13 -0
- package/dist/components/system/GlobalStyles/globalStyles.js +53 -0
- package/dist/components/system/GlobalStyles/index.js +13 -0
- package/dist/components/system/HOC/index.js +2 -0
- package/dist/components/system/ThemeProvider/index.js +21 -0
- package/dist/{types/components → components}/system/ThemeProvider/lib/colors.d.ts +2 -2
- package/dist/components/system/ThemeProvider/lib/colors.js +21 -0
- package/dist/components/system/ThemeProvider/lib/config.js +6 -0
- package/dist/{types/components → components}/system/ThemeProvider/lib/constants.d.ts +1 -0
- package/dist/components/system/ThemeProvider/lib/constants.js +271 -0
- package/dist/components/system/ThemeProvider/lib/createFontFaceCss.js +43 -0
- package/dist/components/system/ThemeProvider/lib/createTheme.js +43 -0
- package/dist/components/system/ThemeProvider/lib/fonts.d.js +1 -0
- package/dist/{types/components → components}/system/ThemeProvider/lib/helpers.d.ts +1 -2
- package/dist/components/system/ThemeProvider/lib/helpers.js +54 -0
- package/dist/components/system/ThemeProvider/lib/interface.js +2 -0
- package/dist/components/system/ThemeProvider/lib/mixins.js +85 -0
- package/dist/components/system/ThemeProvider/lib/palette.js +38 -0
- package/dist/components/system/ThemeProvider/lib/types.js +2 -0
- package/dist/components/system/ThemeProvider/theme/index.js +13 -0
- package/dist/components/system/ThemeProvider/theme/openfin.js +39 -0
- package/dist/components/system/ThemeProvider/themeProvider.js +20 -0
- package/dist/components/templates/ContactCard/contactCard.js +114 -0
- package/dist/components/templates/ContactCard/index.js +13 -0
- package/dist/components/templates/utils/name.js +22 -0
- package/dist/{types/components → components}/typography/Heading/heading.d.ts +24 -24
- package/dist/components/typography/Heading/heading.js +64 -0
- package/dist/components/typography/Heading/index.js +13 -0
- package/dist/components/typography/Text/index.js +13 -0
- package/dist/components/typography/Text/text.js +21 -0
- package/dist/hooks/useColorScheme.js +33 -0
- package/dist/hooks/useMediaQuery.js +39 -0
- package/dist/hooks/usePrevious.js +12 -0
- package/dist/hooks/useTheme.js +34 -0
- package/dist/{types/index.d.ts → index.d.ts} +0 -2
- package/dist/index.js +46 -0
- package/dist/{types/lib → lib}/math.d.ts +1 -5
- package/dist/lib/math.js +24 -0
- package/dist/lib/whenFin.js +13 -0
- package/dist/lib/whenFin.spec.js +39 -0
- package/dist/react-app-env.d.js +2 -0
- package/dist/{types/storybookHelpers.d.ts → storybookHelpers.d.ts} +1 -1
- package/dist/storybookHelpers.js +58 -0
- package/package.json +70 -93
- package/dist/openfin.ui.js +0 -660
- package/dist/openfin.ui.js.LICENSE.txt +0 -14
- package/dist/types/components/controls/Button/button.stories.d.ts +0 -6
- package/dist/types/components/controls/Button/button.test.d.ts +0 -1
- package/dist/types/components/controls/Toggle/toggle.stories.d.ts +0 -6
- package/dist/types/components/controls/Toggle/toggle.test.d.ts +0 -1
- package/dist/types/components/elements/Badge/badge.stories.d.ts +0 -5
- package/dist/types/components/elements/Badge/badge.test.d.ts +0 -1
- package/dist/types/components/elements/Icon/icon.stories.d.ts +0 -15
- package/dist/types/components/elements/Icon/icon.test.d.ts +0 -1
- package/dist/types/components/elements/Loader/loader.stories.d.ts +0 -6
- package/dist/types/components/elements/Loader/loader.test.d.ts +0 -1
- package/dist/types/components/elements/Scrollbar/scrollbar.stories.d.ts +0 -6
- package/dist/types/components/elements/Scrollbar/scrollbarSmall.stories.d.ts +0 -9
- package/dist/types/components/input/BaseInput/baseInput.stories.d.ts +0 -7
- package/dist/types/components/input/Checkbox/checkbox.stories.d.ts +0 -7
- package/dist/types/components/input/NumberInput/numberInput.stories.d.ts +0 -7
- package/dist/types/components/input/RadioGroup/index.d.ts +0 -1
- package/dist/types/components/input/RadioGroup/radioGroup.d.ts +0 -12
- package/dist/types/components/input/RadioGroup/radioGroup.stories.d.ts +0 -6
- package/dist/types/components/input/RadioInput/index.d.ts +0 -1
- package/dist/types/components/input/RadioInput/radioInput.d.ts +0 -11
- package/dist/types/components/input/RadioInput/radioInput.stories.d.ts +0 -7
- package/dist/types/components/input/RadioInput/radioInput.test.d.ts +0 -1
- package/dist/types/components/input/RawInput/rawInput.stories.d.ts +0 -4
- package/dist/types/components/input/TextInput/textInput.stories.d.ts +0 -7
- package/dist/types/components/input/TextInput/textInput.test.d.ts +0 -1
- package/dist/types/components/layout/Box/box.stories.d.ts +0 -6
- package/dist/types/components/layout/Box/box.test.d.ts +0 -1
- package/dist/types/components/layout/DefinitionList/definitionList.stories.d.ts +0 -5
- package/dist/types/components/layout/DefinitionList/definitionList.test.d.ts +0 -1
- package/dist/types/components/system/ThemeProvider/palette.stories.d.ts +0 -7
- package/dist/types/components/system/ThemeProvider/theme.stories.d.ts +0 -7
- package/dist/types/components/system/ThemeProvider/themeProvider.stories.d.ts +0 -10
- package/dist/types/components/templates/ContactCard/contactCard.stories.d.ts +0 -7
- package/dist/types/components/templates/ContactCard/contactCard.test.d.ts +0 -1
- package/dist/types/components/typography/Heading/heading.stories.d.ts +0 -6
- package/dist/types/components/typography/Text/text.stories.d.ts +0 -6
- package/dist/types/hooks/usePrevious.stories.d.ts +0 -6
- package/dist/types/setupTests.d.ts +0 -1
- package/dist/types/testUtils.d.ts +0 -9
- /package/dist/{types/components → components}/controls/Button/button.d.ts +0 -0
- /package/dist/{types/components → components}/controls/Button/button.variants.d.ts +0 -0
- /package/dist/{types/components → components}/controls/Button/index.d.ts +0 -0
- /package/dist/{types/components → components}/controls/Toggle/index.d.ts +0 -0
- /package/dist/{types/components → components}/controls/Toggle/toggle.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Badge/badge.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Badge/index.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Icon/icon.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Icon/icon.variants.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Icon/index.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Icon/openfin/index.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Loader/index.d.ts +0 -0
- /package/dist/{types/components → components}/elements/Loader/loader.d.ts +0 -0
- /package/dist/{types/components → components}/input/BaseInput/baseInput.d.ts +0 -0
- /package/dist/{types/components → components}/input/BaseInput/index.d.ts +0 -0
- /package/dist/{types/components → components}/input/Checkbox/checkbox.d.ts +0 -0
- /package/dist/{types/components → components}/input/Checkbox/index.d.ts +0 -0
- /package/dist/{types/components → components}/input/NumberInput/index.d.ts +0 -0
- /package/dist/{types/components → components}/input/NumberInput/numberInput.d.ts +0 -0
- /package/dist/{types/components → components}/input/RawInput/index.d.ts +0 -0
- /package/dist/{types/components → components}/input/RawInput/rawInput.d.ts +0 -0
- /package/dist/{types/components → components}/input/TextInput/index.d.ts +0 -0
- /package/dist/{types/components → components}/input/TextInput/textInput.d.ts +0 -0
- /package/dist/{types/components → components}/layout/Box/box.d.ts +0 -0
- /package/dist/{types/components → components}/layout/Box/index.d.ts +0 -0
- /package/dist/{types/components → components}/layout/Box/types.d.ts +0 -0
- /package/dist/{types/components → components}/layout/DefinitionList/definitionList.d.ts +0 -0
- /package/dist/{types/components → components}/layout/DefinitionList/index.d.ts +0 -0
- /package/dist/{types/components → components}/system/GlobalStyles/globalStyles.d.ts +0 -0
- /package/dist/{types/components → components}/system/GlobalStyles/index.d.ts +0 -0
- /package/dist/{types/components → components}/system/HOC/index.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/index.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/config.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/createFontFaceCss.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/createTheme.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/interface.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/mixins.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/palette.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/lib/types.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/theme/index.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/theme/openfin.d.ts +0 -0
- /package/dist/{types/components → components}/system/ThemeProvider/themeProvider.d.ts +0 -0
- /package/dist/{types/components → components}/templates/ContactCard/contactCard.d.ts +0 -0
- /package/dist/{types/components → components}/templates/ContactCard/index.d.ts +0 -0
- /package/dist/{types/components → components}/templates/utils/name.d.ts +0 -0
- /package/dist/{types/components → components}/typography/Heading/index.d.ts +0 -0
- /package/dist/{types/components → components}/typography/Text/index.d.ts +0 -0
- /package/dist/{types/components → components}/typography/Text/text.d.ts +0 -0
- /package/dist/{types/hooks → hooks}/useColorScheme.d.ts +0 -0
- /package/dist/{types/hooks → hooks}/useMediaQuery.d.ts +0 -0
- /package/dist/{types/hooks → hooks}/usePrevious.d.ts +0 -0
- /package/dist/{types/hooks → hooks}/useTheme.d.ts +0 -0
- /package/dist/{types/lib → lib}/whenFin.d.ts +0 -0
- /package/dist/{types/lib → lib}/whenFin.spec.d.ts +0 -0
|
@@ -42,7 +42,7 @@ export declare const H1: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
42
42
|
suppressHydrationWarning?: boolean | undefined;
|
|
43
43
|
accessKey?: string | undefined;
|
|
44
44
|
className?: string | undefined;
|
|
45
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
45
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
46
46
|
contextMenu?: string | undefined;
|
|
47
47
|
dir?: string | undefined;
|
|
48
48
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -55,7 +55,7 @@ export declare const H1: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
55
55
|
style?: import("react").CSSProperties | undefined;
|
|
56
56
|
tabIndex?: number | undefined;
|
|
57
57
|
title?: string | undefined;
|
|
58
|
-
translate?: "
|
|
58
|
+
translate?: "no" | "yes" | undefined;
|
|
59
59
|
radioGroup?: string | undefined;
|
|
60
60
|
role?: string | undefined;
|
|
61
61
|
about?: string | undefined;
|
|
@@ -77,7 +77,7 @@ export declare const H1: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
77
77
|
itemRef?: string | undefined;
|
|
78
78
|
results?: number | undefined;
|
|
79
79
|
security?: string | undefined;
|
|
80
|
-
unselectable?: "
|
|
80
|
+
unselectable?: "off" | "on" | undefined;
|
|
81
81
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
82
82
|
is?: string | undefined;
|
|
83
83
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -295,7 +295,7 @@ export declare const H1: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
295
295
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
296
296
|
weight?: "bold" | "normal" | undefined;
|
|
297
297
|
theme: import("styled-components").DefaultTheme;
|
|
298
|
-
}, "
|
|
298
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
299
299
|
export declare const H2: import("styled-components").StyledComponent<FC<HeadingProps>, import("styled-components").DefaultTheme, {
|
|
300
300
|
level: 2;
|
|
301
301
|
defaultChecked?: boolean | undefined;
|
|
@@ -304,7 +304,7 @@ export declare const H2: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
304
304
|
suppressHydrationWarning?: boolean | undefined;
|
|
305
305
|
accessKey?: string | undefined;
|
|
306
306
|
className?: string | undefined;
|
|
307
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
307
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
308
308
|
contextMenu?: string | undefined;
|
|
309
309
|
dir?: string | undefined;
|
|
310
310
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -317,7 +317,7 @@ export declare const H2: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
317
317
|
style?: import("react").CSSProperties | undefined;
|
|
318
318
|
tabIndex?: number | undefined;
|
|
319
319
|
title?: string | undefined;
|
|
320
|
-
translate?: "
|
|
320
|
+
translate?: "no" | "yes" | undefined;
|
|
321
321
|
radioGroup?: string | undefined;
|
|
322
322
|
role?: string | undefined;
|
|
323
323
|
about?: string | undefined;
|
|
@@ -339,7 +339,7 @@ export declare const H2: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
339
339
|
itemRef?: string | undefined;
|
|
340
340
|
results?: number | undefined;
|
|
341
341
|
security?: string | undefined;
|
|
342
|
-
unselectable?: "
|
|
342
|
+
unselectable?: "off" | "on" | undefined;
|
|
343
343
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
344
344
|
is?: string | undefined;
|
|
345
345
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -557,7 +557,7 @@ export declare const H2: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
557
557
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
558
558
|
weight?: "bold" | "normal" | undefined;
|
|
559
559
|
theme: import("styled-components").DefaultTheme;
|
|
560
|
-
}, "
|
|
560
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
561
561
|
export declare const H3: import("styled-components").StyledComponent<FC<HeadingProps>, import("styled-components").DefaultTheme, {
|
|
562
562
|
level: 3;
|
|
563
563
|
defaultChecked?: boolean | undefined;
|
|
@@ -566,7 +566,7 @@ export declare const H3: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
566
566
|
suppressHydrationWarning?: boolean | undefined;
|
|
567
567
|
accessKey?: string | undefined;
|
|
568
568
|
className?: string | undefined;
|
|
569
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
569
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
570
570
|
contextMenu?: string | undefined;
|
|
571
571
|
dir?: string | undefined;
|
|
572
572
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -579,7 +579,7 @@ export declare const H3: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
579
579
|
style?: import("react").CSSProperties | undefined;
|
|
580
580
|
tabIndex?: number | undefined;
|
|
581
581
|
title?: string | undefined;
|
|
582
|
-
translate?: "
|
|
582
|
+
translate?: "no" | "yes" | undefined;
|
|
583
583
|
radioGroup?: string | undefined;
|
|
584
584
|
role?: string | undefined;
|
|
585
585
|
about?: string | undefined;
|
|
@@ -601,7 +601,7 @@ export declare const H3: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
601
601
|
itemRef?: string | undefined;
|
|
602
602
|
results?: number | undefined;
|
|
603
603
|
security?: string | undefined;
|
|
604
|
-
unselectable?: "
|
|
604
|
+
unselectable?: "off" | "on" | undefined;
|
|
605
605
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
606
606
|
is?: string | undefined;
|
|
607
607
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -819,7 +819,7 @@ export declare const H3: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
819
819
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
820
820
|
weight?: "bold" | "normal" | undefined;
|
|
821
821
|
theme: import("styled-components").DefaultTheme;
|
|
822
|
-
}, "
|
|
822
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
823
823
|
export declare const H4: import("styled-components").StyledComponent<FC<HeadingProps>, import("styled-components").DefaultTheme, {
|
|
824
824
|
level: 4;
|
|
825
825
|
defaultChecked?: boolean | undefined;
|
|
@@ -828,7 +828,7 @@ export declare const H4: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
828
828
|
suppressHydrationWarning?: boolean | undefined;
|
|
829
829
|
accessKey?: string | undefined;
|
|
830
830
|
className?: string | undefined;
|
|
831
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
831
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
832
832
|
contextMenu?: string | undefined;
|
|
833
833
|
dir?: string | undefined;
|
|
834
834
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -841,7 +841,7 @@ export declare const H4: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
841
841
|
style?: import("react").CSSProperties | undefined;
|
|
842
842
|
tabIndex?: number | undefined;
|
|
843
843
|
title?: string | undefined;
|
|
844
|
-
translate?: "
|
|
844
|
+
translate?: "no" | "yes" | undefined;
|
|
845
845
|
radioGroup?: string | undefined;
|
|
846
846
|
role?: string | undefined;
|
|
847
847
|
about?: string | undefined;
|
|
@@ -863,7 +863,7 @@ export declare const H4: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
863
863
|
itemRef?: string | undefined;
|
|
864
864
|
results?: number | undefined;
|
|
865
865
|
security?: string | undefined;
|
|
866
|
-
unselectable?: "
|
|
866
|
+
unselectable?: "off" | "on" | undefined;
|
|
867
867
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
868
868
|
is?: string | undefined;
|
|
869
869
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -1081,7 +1081,7 @@ export declare const H4: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1081
1081
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
1082
1082
|
weight?: "bold" | "normal" | undefined;
|
|
1083
1083
|
theme: import("styled-components").DefaultTheme;
|
|
1084
|
-
}, "
|
|
1084
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
1085
1085
|
export declare const H5: import("styled-components").StyledComponent<FC<HeadingProps>, import("styled-components").DefaultTheme, {
|
|
1086
1086
|
level: 5;
|
|
1087
1087
|
defaultChecked?: boolean | undefined;
|
|
@@ -1090,7 +1090,7 @@ export declare const H5: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1090
1090
|
suppressHydrationWarning?: boolean | undefined;
|
|
1091
1091
|
accessKey?: string | undefined;
|
|
1092
1092
|
className?: string | undefined;
|
|
1093
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
1093
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
1094
1094
|
contextMenu?: string | undefined;
|
|
1095
1095
|
dir?: string | undefined;
|
|
1096
1096
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1103,7 +1103,7 @@ export declare const H5: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1103
1103
|
style?: import("react").CSSProperties | undefined;
|
|
1104
1104
|
tabIndex?: number | undefined;
|
|
1105
1105
|
title?: string | undefined;
|
|
1106
|
-
translate?: "
|
|
1106
|
+
translate?: "no" | "yes" | undefined;
|
|
1107
1107
|
radioGroup?: string | undefined;
|
|
1108
1108
|
role?: string | undefined;
|
|
1109
1109
|
about?: string | undefined;
|
|
@@ -1125,7 +1125,7 @@ export declare const H5: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1125
1125
|
itemRef?: string | undefined;
|
|
1126
1126
|
results?: number | undefined;
|
|
1127
1127
|
security?: string | undefined;
|
|
1128
|
-
unselectable?: "
|
|
1128
|
+
unselectable?: "off" | "on" | undefined;
|
|
1129
1129
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
1130
1130
|
is?: string | undefined;
|
|
1131
1131
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -1343,7 +1343,7 @@ export declare const H5: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1343
1343
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
1344
1344
|
weight?: "bold" | "normal" | undefined;
|
|
1345
1345
|
theme: import("styled-components").DefaultTheme;
|
|
1346
|
-
}, "
|
|
1346
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
1347
1347
|
export declare const H6: import("styled-components").StyledComponent<FC<HeadingProps>, import("styled-components").DefaultTheme, {
|
|
1348
1348
|
level: 6;
|
|
1349
1349
|
defaultChecked?: boolean | undefined;
|
|
@@ -1352,7 +1352,7 @@ export declare const H6: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1352
1352
|
suppressHydrationWarning?: boolean | undefined;
|
|
1353
1353
|
accessKey?: string | undefined;
|
|
1354
1354
|
className?: string | undefined;
|
|
1355
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
1355
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
1356
1356
|
contextMenu?: string | undefined;
|
|
1357
1357
|
dir?: string | undefined;
|
|
1358
1358
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1365,7 +1365,7 @@ export declare const H6: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1365
1365
|
style?: import("react").CSSProperties | undefined;
|
|
1366
1366
|
tabIndex?: number | undefined;
|
|
1367
1367
|
title?: string | undefined;
|
|
1368
|
-
translate?: "
|
|
1368
|
+
translate?: "no" | "yes" | undefined;
|
|
1369
1369
|
radioGroup?: string | undefined;
|
|
1370
1370
|
role?: string | undefined;
|
|
1371
1371
|
about?: string | undefined;
|
|
@@ -1387,7 +1387,7 @@ export declare const H6: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1387
1387
|
itemRef?: string | undefined;
|
|
1388
1388
|
results?: number | undefined;
|
|
1389
1389
|
security?: string | undefined;
|
|
1390
|
-
unselectable?: "
|
|
1390
|
+
unselectable?: "off" | "on" | undefined;
|
|
1391
1391
|
inputMode?: "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
1392
1392
|
is?: string | undefined;
|
|
1393
1393
|
'aria-activedescendant'?: string | undefined;
|
|
@@ -1605,4 +1605,4 @@ export declare const H6: import("styled-components").StyledComponent<FC<HeadingP
|
|
|
1605
1605
|
size?: "base" | "small" | "xsmall" | "large" | "xlarge" | "xxlarge" | "xxxlarge" | "xxxxlarge" | undefined;
|
|
1606
1606
|
weight?: "bold" | "normal" | undefined;
|
|
1607
1607
|
theme: import("styled-components").DefaultTheme;
|
|
1608
|
-
}, "
|
|
1608
|
+
}, "color" | "children" | "className" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "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" | "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" | "slot" | "title" | "theme" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "size" | "weight" | "level">;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.H6 = exports.H5 = exports.H4 = exports.H3 = exports.H2 = exports.H1 = exports.Heading = exports.defaultSize = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
20
|
+
const constants_1 = require("../../system/ThemeProvider/lib/constants");
|
|
21
|
+
const Text_1 = require("../Text");
|
|
22
|
+
exports.defaultSize = {
|
|
23
|
+
h1: constants_1.Size.xxxlarge,
|
|
24
|
+
h2: constants_1.Size.xxlarge,
|
|
25
|
+
h3: constants_1.Size.xlarge,
|
|
26
|
+
h4: constants_1.Size.large,
|
|
27
|
+
h5: constants_1.Size.base,
|
|
28
|
+
h6: constants_1.Size.small,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* ## Heading
|
|
32
|
+
*
|
|
33
|
+
* @example <Heading level={1}>Pizza</Heading>
|
|
34
|
+
* <Heading level={2}>Pizza</Heading>
|
|
35
|
+
* <Heading level={3}>Pizza</Heading>
|
|
36
|
+
* <Heading level={4}>Pizza</Heading>
|
|
37
|
+
* <Heading level={5}>Pizza</Heading>
|
|
38
|
+
* <Heading level={6}>Pizza</Heading>
|
|
39
|
+
*
|
|
40
|
+
* @example <H1>Pizza</H1>
|
|
41
|
+
* <H2>Pizza</H2>
|
|
42
|
+
* <H3>Pizza</H3>
|
|
43
|
+
* <H4>Pizza</H4>
|
|
44
|
+
* <H5>Pizza</H5>
|
|
45
|
+
* <H6>Pizza</H6>
|
|
46
|
+
*/
|
|
47
|
+
const Heading = (_a) => {
|
|
48
|
+
var { level = 1, className } = _a, props = __rest(_a, ["level", "className"]);
|
|
49
|
+
const htag = `h${level}`;
|
|
50
|
+
return (jsx_runtime_1.jsx(StyledHeading, Object.assign({ className: className, as: htag, size: exports.defaultSize[htag], weight: "bold" }, props), void 0));
|
|
51
|
+
};
|
|
52
|
+
exports.Heading = Heading;
|
|
53
|
+
const StyledHeading = styled_components_1.default(Text_1.Text) `
|
|
54
|
+
line-height: ${({ theme }) => theme.lineHeight.heading};
|
|
55
|
+
`;
|
|
56
|
+
/**
|
|
57
|
+
* ## Heading Variants
|
|
58
|
+
*/
|
|
59
|
+
exports.H1 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 1 }))) ``;
|
|
60
|
+
exports.H2 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 2 }))) ``;
|
|
61
|
+
exports.H3 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 3 }))) ``;
|
|
62
|
+
exports.H4 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 4 }))) ``;
|
|
63
|
+
exports.H5 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 5 }))) ``;
|
|
64
|
+
exports.H6 = styled_components_1.default(exports.Heading).attrs((props) => (Object.assign(Object.assign({}, props), { level: 6 }))) ``;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./heading"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./text"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Text = void 0;
|
|
7
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
+
/**
|
|
9
|
+
* ## Text
|
|
10
|
+
*
|
|
11
|
+
* @example <Text>Okay Cool</Text>
|
|
12
|
+
* <Text size="small">Okay Cool</Text>
|
|
13
|
+
* <Text weight="bold">Okay Cool</Text>
|
|
14
|
+
*/
|
|
15
|
+
exports.Text = styled_components_1.default.span `
|
|
16
|
+
color: ${({ theme }) => theme.palette.textDefault};
|
|
17
|
+
font-size: ${({ theme, size = 'base' }) => theme.fontSize[size]};
|
|
18
|
+
font-weight: ${({ theme, weight = 'normal' }) => theme.fontWeight[weight]};
|
|
19
|
+
line-height: ${({ theme }) => theme.lineHeight.text};
|
|
20
|
+
`;
|
|
21
|
+
exports.Text.displayName = 'Text';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useColorScheme = exports.ColorScheme = void 0;
|
|
4
|
+
const useMediaQuery_1 = require("./useMediaQuery");
|
|
5
|
+
exports.ColorScheme = {
|
|
6
|
+
dark: 'dark',
|
|
7
|
+
light: 'light',
|
|
8
|
+
/**
|
|
9
|
+
* This is a valid MediaQuery string that we're not using to identify Browsers (older Operating Systems)
|
|
10
|
+
* that maybe do not have a concept of color scheme.
|
|
11
|
+
*/
|
|
12
|
+
// none = 'no-preference',
|
|
13
|
+
};
|
|
14
|
+
const buildQuery = (scheme) => `(prefers-color-scheme: ${scheme})`;
|
|
15
|
+
/**
|
|
16
|
+
* ## useColorScheme
|
|
17
|
+
* Returns system preference for Color Scheme
|
|
18
|
+
*/
|
|
19
|
+
const useColorScheme = ({ defaultScheme = exports.ColorScheme.light, }) => {
|
|
20
|
+
const isDark = useMediaQuery_1.useMediaQuery(buildQuery(exports.ColorScheme.dark));
|
|
21
|
+
const isLight = useMediaQuery_1.useMediaQuery(buildQuery(exports.ColorScheme.light));
|
|
22
|
+
const isNone = !isDark && !isLight;
|
|
23
|
+
switch (true) {
|
|
24
|
+
case isDark:
|
|
25
|
+
return exports.ColorScheme.dark;
|
|
26
|
+
case isLight:
|
|
27
|
+
return exports.ColorScheme.light;
|
|
28
|
+
case isNone:
|
|
29
|
+
default:
|
|
30
|
+
return defaultScheme;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.useColorScheme = useColorScheme;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLayoutMediaQuery = exports.useMediaQuery = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
/**
|
|
6
|
+
* ## MediaQuery Hooks
|
|
7
|
+
*
|
|
8
|
+
* Inspired by:
|
|
9
|
+
* @link https://github.com/streamich/use-media
|
|
10
|
+
*/
|
|
11
|
+
const useMq = (effect) => (query) => {
|
|
12
|
+
const [matches, setMatches] = react_1.useState(false);
|
|
13
|
+
effect(() => {
|
|
14
|
+
const media = window.matchMedia(query);
|
|
15
|
+
if (media) {
|
|
16
|
+
if (media.matches !== matches) {
|
|
17
|
+
setMatches(media.matches);
|
|
18
|
+
}
|
|
19
|
+
const listener = () => setMatches(media.matches);
|
|
20
|
+
const cleanup = () => media.removeEventListener('change', listener);
|
|
21
|
+
media.addEventListener('change', listener);
|
|
22
|
+
return cleanup;
|
|
23
|
+
}
|
|
24
|
+
return;
|
|
25
|
+
}, [matches, query]);
|
|
26
|
+
return matches;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* ## useMediaQuery
|
|
30
|
+
* @example const isPageWide = useMediaQuery('(min-width: 800px)')
|
|
31
|
+
* @example const reduceMotion = useMediaQuery('(prefers-reduced-motion: reduce)');
|
|
32
|
+
*/
|
|
33
|
+
exports.useMediaQuery = useMq(react_1.useEffect);
|
|
34
|
+
/**
|
|
35
|
+
* ## useLayoutMediaQuery
|
|
36
|
+
* @example const isPageWide = useLayoutMediaQuery('(min-width: 800px)')
|
|
37
|
+
* @example const reduceMotion = useLayoutMediaQuery('(prefers-reduced-motion: reduce)');
|
|
38
|
+
*/
|
|
39
|
+
exports.useLayoutMediaQuery = useMq(react_1.useLayoutEffect);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.usePrevious = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const usePrevious = (value) => {
|
|
6
|
+
const ref = react_1.useRef();
|
|
7
|
+
react_1.useEffect(() => {
|
|
8
|
+
ref.current = value;
|
|
9
|
+
}, [value]);
|
|
10
|
+
return ref.current;
|
|
11
|
+
};
|
|
12
|
+
exports.usePrevious = usePrevious;
|