@semcore/typography 4.4.14 → 5.0.0-beta.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/CHANGELOG.md +3 -3
- package/lib/cjs/Blockquote.js +4 -4
- package/lib/cjs/Hint.js +7 -7
- package/lib/cjs/List.js +5 -5
- package/lib/cjs/Text.js +29 -29
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/es6/Blockquote.js +4 -4
- package/lib/es6/Hint.js +7 -7
- package/lib/es6/List.js +5 -5
- package/lib/es6/Text.js +29 -29
- package/lib/es6/index.d.js.map +1 -1
- package/lib/types/index.d.ts +46 -32
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [5.0.0] - 2023-07-15
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Break
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Strict, backward incompatible typings.
|
|
10
10
|
|
|
11
11
|
## [4.4.13] - 2023-06-28
|
|
12
12
|
|
package/lib/cjs/Blockquote.js
CHANGED
|
@@ -11,10 +11,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _isNode = _interopRequireDefault(require("@semcore/utils/lib/isNode"));
|
|
12
12
|
var _flexBox = require("@semcore/flex-box");
|
|
13
13
|
/*__reshadow-styles__:"./style/blockquote.shadow.css"*/
|
|
14
|
-
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
15
|
-
"__SBlockquote": "
|
|
16
|
-
"__SDoubleQuotation": "
|
|
17
|
-
"__SAuthor": "
|
|
14
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SBlockquote_welyy_gg_{position:relative;display:flex;font-style:italic;font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%);color:var(--intergalactic-text-primary, #191b23)}.___SDoubleQuotation_welyy_gg_{position:relative;margin-right:var(--intergalactic-spacing-5x, 20px);font-family:\"Times New Roman\",serif;font-style:normal;font-size:68px;line-height:52px;color:var(--intergalactic-text-large-secondary, #a9abb6)}.___SAuthor_welyy_gg_{display:block;margin-top:var(--intergalactic-spacing-4x, 16px);color:var(--intergalactic-text-secondary, #6c6e79);font-style:normal;font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}" /*__inner_css_end__*/, "welyy_gg_") /*__reshadow_css_end__*/, {
|
|
15
|
+
"__SBlockquote": "___SBlockquote_welyy_gg_",
|
|
16
|
+
"__SDoubleQuotation": "___SDoubleQuotation_welyy_gg_",
|
|
17
|
+
"__SAuthor": "___SAuthor_welyy_gg_"
|
|
18
18
|
});
|
|
19
19
|
function Blockquote(props, ref) {
|
|
20
20
|
var _ref = arguments[0],
|
package/lib/cjs/Hint.js
CHANGED
|
@@ -19,13 +19,13 @@ var _keyboardFocusEnhance = _interopRequireDefault(require("@semcore/utils/lib/e
|
|
|
19
19
|
var _addonTextChildren = _interopRequireDefault(require("@semcore/utils/lib/addonTextChildren"));
|
|
20
20
|
var _Text = _interopRequireDefault(require("./Text"));
|
|
21
21
|
/*__reshadow-styles__:"./style/hint.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
23
|
-
"__SHint": "
|
|
24
|
-
"_active": "
|
|
25
|
-
"_keyboardFocused": "
|
|
26
|
-
"_disabled": "
|
|
27
|
-
"__SAddon": "
|
|
28
|
-
"__SText": "
|
|
22
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SHint_11sl1_gg_{display:inline-block;transition:all .15s ease-in-out;text-decoration:none;outline:0;cursor:pointer;color:var(--intergalactic-text-secondary, #6c6e79)}.___SHint_11sl1_gg_.__active_11sl1_gg_,.___SHint_11sl1_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SHint_11sl1_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SHint_11sl1_gg_.__keyboardFocused_11sl1_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHint_11sl1_gg_.__disabled_11sl1_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_11sl1_gg_{vertical-align:middle;display:inline-flex}.___SHint_11sl1_gg_ .___SAddon_11sl1_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SHint_11sl1_gg_ .___SAddon_11sl1_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SText_11sl1_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}@media (prefers-reduced-motion){.___SHint_11sl1_gg_{transition:none}}" /*__inner_css_end__*/, "11sl1_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SHint": "___SHint_11sl1_gg_",
|
|
24
|
+
"_active": "__active_11sl1_gg_",
|
|
25
|
+
"_keyboardFocused": "__keyboardFocused_11sl1_gg_",
|
|
26
|
+
"_disabled": "__disabled_11sl1_gg_",
|
|
27
|
+
"__SAddon": "___SAddon_11sl1_gg_",
|
|
28
|
+
"__SText": "___SText_11sl1_gg_"
|
|
29
29
|
});
|
|
30
30
|
var RootHint = /*#__PURE__*/function (_Component) {
|
|
31
31
|
(0, _inherits2["default"])(RootHint, _Component);
|
package/lib/cjs/List.js
CHANGED
|
@@ -17,11 +17,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _isNode = _interopRequireDefault(require("@semcore/utils/lib/isNode"));
|
|
18
18
|
var _Text = _interopRequireDefault(require("./Text"));
|
|
19
19
|
/*__reshadow-styles__:"./style/list.shadow.css"*/
|
|
20
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
21
|
-
"__SList": "
|
|
22
|
-
"__SContent": "
|
|
23
|
-
"__SItem": "
|
|
24
|
-
"__SMarker": "
|
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SList_z1vc9_gg_{padding:0;margin:0;list-style-type:none}.___SContent_z1vc9_gg_{overflow:inherit;text-overflow:inherit}.___SItem_z1vc9_gg_+.___SItem_z1vc9_gg_,.___SList_z1vc9_gg_ .___SList_z1vc9_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}.___SItem_z1vc9_gg_{display:flex}.___SMarker_z1vc9_gg_{margin-right:calc(var(--intergalactic-spacing-2x, 8px) + var(--intergalactic-spacing-05x, 2px));color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "z1vc9_gg_") /*__reshadow_css_end__*/, {
|
|
21
|
+
"__SList": "___SList_z1vc9_gg_",
|
|
22
|
+
"__SContent": "___SContent_z1vc9_gg_",
|
|
23
|
+
"__SItem": "___SItem_z1vc9_gg_",
|
|
24
|
+
"__SMarker": "___SMarker_z1vc9_gg_"
|
|
25
25
|
});
|
|
26
26
|
var List = /*#__PURE__*/function (_Component) {
|
|
27
27
|
(0, _inherits2["default"])(List, _Component);
|
package/lib/cjs/Text.js
CHANGED
|
@@ -11,35 +11,35 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _flexBox = require("@semcore/flex-box");
|
|
12
12
|
var _color = _interopRequireDefault(require("@semcore/utils/lib/color"));
|
|
13
13
|
/*__reshadow-styles__:"./style/text.shadow.css"*/
|
|
14
|
-
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
15
|
-
"__SText": "
|
|
16
|
-
"_size_100": "
|
|
17
|
-
"_size_200": "
|
|
18
|
-
"_size_300": "
|
|
19
|
-
"_size_400": "
|
|
20
|
-
"_size_500": "
|
|
21
|
-
"_size_600": "
|
|
22
|
-
"_size_700": "
|
|
23
|
-
"_size_800": "
|
|
24
|
-
"_noWrap": "
|
|
25
|
-
"_medium": "
|
|
26
|
-
"_bold": "
|
|
27
|
-
"_italic": "
|
|
28
|
-
"_uppercase": "
|
|
29
|
-
"_lowercase": "
|
|
30
|
-
"_capitalize": "
|
|
31
|
-
"_decoration": "
|
|
32
|
-
"--decoration": "--
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_fontSize": "
|
|
36
|
-
"--fontSize": "--
|
|
37
|
-
"_lineHeight": "
|
|
38
|
-
"--lineHeight": "--
|
|
39
|
-
"_fontWeight": "
|
|
40
|
-
"--fontWeight": "--
|
|
41
|
-
"_textAlign": "
|
|
42
|
-
"--textAlign": "--
|
|
14
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SText_na381_gg_{padding:0;margin:0}.___SText_na381_gg_._size_100_na381_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SText_na381_gg_._size_200_na381_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_na381_gg_._size_300_na381_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SText_na381_gg_._size_400_na381_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SText_na381_gg_._size_500_na381_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SText_na381_gg_._size_600_na381_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SText_na381_gg_._size_700_na381_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SText_na381_gg_._size_800_na381_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}.___SText_na381_gg_.__noWrap_na381_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_na381_gg_.__medium_na381_gg_{font-weight:var(--intergalactic-medium, 500)}.___SText_na381_gg_.__bold_na381_gg_{font-weight:var(--intergalactic-bold, 700)}.___SText_na381_gg_.__italic_na381_gg_{font-style:italic}.___SText_na381_gg_.__uppercase_na381_gg_{text-transform:uppercase}.___SText_na381_gg_.__lowercase_na381_gg_{text-transform:lowercase}.___SText_na381_gg_.__capitalize_na381_gg_{text-transform:capitalize}.___SText_na381_gg_.__decoration_na381_gg_{-webkit-text-decoration:var(--decoration_na381);text-decoration:var(--decoration_na381)}.___SText_na381_gg_.__color_na381_gg_{color:var(--color_na381)}.___SText_na381_gg_.__fontSize_na381_gg_{font-size:var(--fontSize_na381)}.___SText_na381_gg_.__lineHeight_na381_gg_{line-height:var(--lineHeight_na381)}.___SText_na381_gg_.__fontWeight_na381_gg_{font-weight:var(--fontWeight_na381)}.___SText_na381_gg_.__textAlign_na381_gg_{text-align:var(--textAlign_na381)}" /*__inner_css_end__*/, "na381_gg_") /*__reshadow_css_end__*/, {
|
|
15
|
+
"__SText": "___SText_na381_gg_",
|
|
16
|
+
"_size_100": "_size_100_na381_gg_",
|
|
17
|
+
"_size_200": "_size_200_na381_gg_",
|
|
18
|
+
"_size_300": "_size_300_na381_gg_",
|
|
19
|
+
"_size_400": "_size_400_na381_gg_",
|
|
20
|
+
"_size_500": "_size_500_na381_gg_",
|
|
21
|
+
"_size_600": "_size_600_na381_gg_",
|
|
22
|
+
"_size_700": "_size_700_na381_gg_",
|
|
23
|
+
"_size_800": "_size_800_na381_gg_",
|
|
24
|
+
"_noWrap": "__noWrap_na381_gg_",
|
|
25
|
+
"_medium": "__medium_na381_gg_",
|
|
26
|
+
"_bold": "__bold_na381_gg_",
|
|
27
|
+
"_italic": "__italic_na381_gg_",
|
|
28
|
+
"_uppercase": "__uppercase_na381_gg_",
|
|
29
|
+
"_lowercase": "__lowercase_na381_gg_",
|
|
30
|
+
"_capitalize": "__capitalize_na381_gg_",
|
|
31
|
+
"_decoration": "__decoration_na381_gg_",
|
|
32
|
+
"--decoration": "--decoration_na381",
|
|
33
|
+
"_color": "__color_na381_gg_",
|
|
34
|
+
"--color": "--color_na381",
|
|
35
|
+
"_fontSize": "__fontSize_na381_gg_",
|
|
36
|
+
"--fontSize": "--fontSize_na381",
|
|
37
|
+
"_lineHeight": "__lineHeight_na381_gg_",
|
|
38
|
+
"--lineHeight": "--lineHeight_na381",
|
|
39
|
+
"_fontWeight": "__fontWeight_na381_gg_",
|
|
40
|
+
"--fontWeight": "--fontWeight_na381",
|
|
41
|
+
"_textAlign": "__textAlign_na381_gg_",
|
|
42
|
+
"--textAlign": "--textAlign_na381"
|
|
43
43
|
});
|
|
44
44
|
function getTextDecoration(underline, lineThrough) {
|
|
45
45
|
if (underline) {
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\n/** @deprecated */\nexport interface ITextProps extends TextProps, UnknownProperties {}\nexport type TextProps = BoxProps & {\n /** Font size and line-heights */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;\n /** The text will not be wrapped on a new line and will be cut off with ellipsis */\n noWrap?: boolean;\n /** CSS property `font-weight: 700;` */\n bold?: boolean;\n /** CSS property `font-weight: 500;` */\n medium?: boolean;\n /** Italicized text */\n italic?: boolean;\n /** Underlined text */\n underline?: boolean;\n /** Strikethrough text */\n lineThrough?: boolean;\n /** Uppercase text */\n uppercase?: boolean;\n /** Lowercase text */\n lowercase?: boolean;\n /** Capitalized text */\n capitalize?: boolean;\n /** Text color **/\n color?: string;\n /** Custom `font-size` */\n fontSize?: Property.FontSize<any>;\n /** Custom `line-height` */\n lineHeight?: Property.LineHeight<any>;\n /** Custom `font-weight` */\n fontWeight?: Property.FontWeight;\n /** Text alignment */\n textAlign?: Property.TextAlign;\n};\n\n/** @deprecated */\nexport interface IListProps extends ListProps, UnknownProperties {}\nexport type ListProps = TextProps & {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IListItemProps extends ListItemProps, UnknownProperties {}\nexport type ListItemProps = TextProps & {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IListContext extends ListContext, UnknownProperties {}\nexport type ListContext = {\n getItemProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IHintProps extends HintProps, UnknownProperties {}\nexport type HintProps = TextProps &\n KeyboardFocusProps & {\n /** The value responsible for the activity of the element\n * @default false\n */\n disabled?: boolean;\n /** Enable `active` state */\n active?: boolean;\n /** Left addon hint */\n addonLeft?: React.ElementType;\n /** Right addon hint */\n addonRight?: React.ElementType;\n };\n\n/** @deprecated */\nexport interface IBlockquoteProps extends BlockquoteProps, UnknownProperties {}\nexport type BlockquoteProps = BoxProps & {\n /** Source of the quote */\n author?: React.ReactNode;\n};\n\ndeclare const Hint: Intergalactic.Component<'abbr', HintProps> & {\n Addon: typeof Box;\n Text: typeof Box;\n};\n\ndeclare const List: Intergalactic.Component<'ul', ListProps> & {\n Item: Intergalactic.Component<'li', ListItemProps>;\n};\n\ndeclare const Text: Intergalactic.Component<'span', TextProps>;\n\ndeclare const Blockquote: Intergalactic.Component<'blockquote', BlockquoteProps>;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
package/lib/es6/Blockquote.js
CHANGED
|
@@ -6,10 +6,10 @@ import { createBaseComponent, Root, sstyled } from '@semcore/core';
|
|
|
6
6
|
import isNode from '@semcore/utils/lib/isNode';
|
|
7
7
|
import { Box } from '@semcore/flex-box';
|
|
8
8
|
/*__reshadow-styles__:"./style/blockquote.shadow.css"*/
|
|
9
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
10
|
-
"__SBlockquote": "
|
|
11
|
-
"__SDoubleQuotation": "
|
|
12
|
-
"__SAuthor": "
|
|
9
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBlockquote_welyy_gg_{position:relative;display:flex;font-style:italic;font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%);color:var(--intergalactic-text-primary, #191b23)}.___SDoubleQuotation_welyy_gg_{position:relative;margin-right:var(--intergalactic-spacing-5x, 20px);font-family:\"Times New Roman\",serif;font-style:normal;font-size:68px;line-height:52px;color:var(--intergalactic-text-large-secondary, #a9abb6)}.___SAuthor_welyy_gg_{display:block;margin-top:var(--intergalactic-spacing-4x, 16px);color:var(--intergalactic-text-secondary, #6c6e79);font-style:normal;font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}" /*__inner_css_end__*/, "welyy_gg_") /*__reshadow_css_end__*/, {
|
|
10
|
+
"__SBlockquote": "___SBlockquote_welyy_gg_",
|
|
11
|
+
"__SDoubleQuotation": "___SDoubleQuotation_welyy_gg_",
|
|
12
|
+
"__SAuthor": "___SAuthor_welyy_gg_"
|
|
13
13
|
});
|
|
14
14
|
function Blockquote(props, ref) {
|
|
15
15
|
var _ref = arguments[0],
|
package/lib/es6/Hint.js
CHANGED
|
@@ -15,13 +15,13 @@ import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhan
|
|
|
15
15
|
import addonTextChildren from '@semcore/utils/lib/addonTextChildren';
|
|
16
16
|
import Text from './Text';
|
|
17
17
|
/*__reshadow-styles__:"./style/hint.shadow.css"*/
|
|
18
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
19
|
-
"__SHint": "
|
|
20
|
-
"_active": "
|
|
21
|
-
"_keyboardFocused": "
|
|
22
|
-
"_disabled": "
|
|
23
|
-
"__SAddon": "
|
|
24
|
-
"__SText": "
|
|
18
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SHint_11sl1_gg_{display:inline-block;transition:all .15s ease-in-out;text-decoration:none;outline:0;cursor:pointer;color:var(--intergalactic-text-secondary, #6c6e79)}.___SHint_11sl1_gg_.__active_11sl1_gg_,.___SHint_11sl1_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SHint_11sl1_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SHint_11sl1_gg_.__keyboardFocused_11sl1_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SHint_11sl1_gg_.__disabled_11sl1_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_11sl1_gg_{vertical-align:middle;display:inline-flex}.___SHint_11sl1_gg_ .___SAddon_11sl1_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SHint_11sl1_gg_ .___SAddon_11sl1_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SText_11sl1_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}@media (prefers-reduced-motion){.___SHint_11sl1_gg_{transition:none}}" /*__inner_css_end__*/, "11sl1_gg_") /*__reshadow_css_end__*/, {
|
|
19
|
+
"__SHint": "___SHint_11sl1_gg_",
|
|
20
|
+
"_active": "__active_11sl1_gg_",
|
|
21
|
+
"_keyboardFocused": "__keyboardFocused_11sl1_gg_",
|
|
22
|
+
"_disabled": "__disabled_11sl1_gg_",
|
|
23
|
+
"__SAddon": "___SAddon_11sl1_gg_",
|
|
24
|
+
"__SText": "___SText_11sl1_gg_"
|
|
25
25
|
});
|
|
26
26
|
var RootHint = /*#__PURE__*/function (_Component) {
|
|
27
27
|
_inherits(RootHint, _Component);
|
package/lib/es6/List.js
CHANGED
|
@@ -12,11 +12,11 @@ import createComponent, { Component, Root, sstyled } from '@semcore/core';
|
|
|
12
12
|
import isNode from '@semcore/utils/lib/isNode';
|
|
13
13
|
import Text from './Text';
|
|
14
14
|
/*__reshadow-styles__:"./style/list.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SList": "
|
|
17
|
-
"__SContent": "
|
|
18
|
-
"__SItem": "
|
|
19
|
-
"__SMarker": "
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SList_z1vc9_gg_{padding:0;margin:0;list-style-type:none}.___SContent_z1vc9_gg_{overflow:inherit;text-overflow:inherit}.___SItem_z1vc9_gg_+.___SItem_z1vc9_gg_,.___SList_z1vc9_gg_ .___SList_z1vc9_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}.___SItem_z1vc9_gg_{display:flex}.___SMarker_z1vc9_gg_{margin-right:calc(var(--intergalactic-spacing-2x, 8px) + var(--intergalactic-spacing-05x, 2px));color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "z1vc9_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SList": "___SList_z1vc9_gg_",
|
|
17
|
+
"__SContent": "___SContent_z1vc9_gg_",
|
|
18
|
+
"__SItem": "___SItem_z1vc9_gg_",
|
|
19
|
+
"__SMarker": "___SMarker_z1vc9_gg_"
|
|
20
20
|
});
|
|
21
21
|
var List = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(List, _Component);
|
package/lib/es6/Text.js
CHANGED
|
@@ -6,35 +6,35 @@ import { createBaseComponent, Root, sstyled } from '@semcore/core';
|
|
|
6
6
|
import { Box } from '@semcore/flex-box';
|
|
7
7
|
import resolveColor from '@semcore/utils/lib/color';
|
|
8
8
|
/*__reshadow-styles__:"./style/text.shadow.css"*/
|
|
9
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
10
|
-
"__SText": "
|
|
11
|
-
"_size_100": "
|
|
12
|
-
"_size_200": "
|
|
13
|
-
"_size_300": "
|
|
14
|
-
"_size_400": "
|
|
15
|
-
"_size_500": "
|
|
16
|
-
"_size_600": "
|
|
17
|
-
"_size_700": "
|
|
18
|
-
"_size_800": "
|
|
19
|
-
"_noWrap": "
|
|
20
|
-
"_medium": "
|
|
21
|
-
"_bold": "
|
|
22
|
-
"_italic": "
|
|
23
|
-
"_uppercase": "
|
|
24
|
-
"_lowercase": "
|
|
25
|
-
"_capitalize": "
|
|
26
|
-
"_decoration": "
|
|
27
|
-
"--decoration": "--
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_fontSize": "
|
|
31
|
-
"--fontSize": "--
|
|
32
|
-
"_lineHeight": "
|
|
33
|
-
"--lineHeight": "--
|
|
34
|
-
"_fontWeight": "
|
|
35
|
-
"--fontWeight": "--
|
|
36
|
-
"_textAlign": "
|
|
37
|
-
"--textAlign": "--
|
|
9
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SText_na381_gg_{padding:0;margin:0}.___SText_na381_gg_._size_100_na381_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SText_na381_gg_._size_200_na381_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_na381_gg_._size_300_na381_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SText_na381_gg_._size_400_na381_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SText_na381_gg_._size_500_na381_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SText_na381_gg_._size_600_na381_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SText_na381_gg_._size_700_na381_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SText_na381_gg_._size_800_na381_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}.___SText_na381_gg_.__noWrap_na381_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_na381_gg_.__medium_na381_gg_{font-weight:var(--intergalactic-medium, 500)}.___SText_na381_gg_.__bold_na381_gg_{font-weight:var(--intergalactic-bold, 700)}.___SText_na381_gg_.__italic_na381_gg_{font-style:italic}.___SText_na381_gg_.__uppercase_na381_gg_{text-transform:uppercase}.___SText_na381_gg_.__lowercase_na381_gg_{text-transform:lowercase}.___SText_na381_gg_.__capitalize_na381_gg_{text-transform:capitalize}.___SText_na381_gg_.__decoration_na381_gg_{-webkit-text-decoration:var(--decoration_na381);text-decoration:var(--decoration_na381)}.___SText_na381_gg_.__color_na381_gg_{color:var(--color_na381)}.___SText_na381_gg_.__fontSize_na381_gg_{font-size:var(--fontSize_na381)}.___SText_na381_gg_.__lineHeight_na381_gg_{line-height:var(--lineHeight_na381)}.___SText_na381_gg_.__fontWeight_na381_gg_{font-weight:var(--fontWeight_na381)}.___SText_na381_gg_.__textAlign_na381_gg_{text-align:var(--textAlign_na381)}" /*__inner_css_end__*/, "na381_gg_") /*__reshadow_css_end__*/, {
|
|
10
|
+
"__SText": "___SText_na381_gg_",
|
|
11
|
+
"_size_100": "_size_100_na381_gg_",
|
|
12
|
+
"_size_200": "_size_200_na381_gg_",
|
|
13
|
+
"_size_300": "_size_300_na381_gg_",
|
|
14
|
+
"_size_400": "_size_400_na381_gg_",
|
|
15
|
+
"_size_500": "_size_500_na381_gg_",
|
|
16
|
+
"_size_600": "_size_600_na381_gg_",
|
|
17
|
+
"_size_700": "_size_700_na381_gg_",
|
|
18
|
+
"_size_800": "_size_800_na381_gg_",
|
|
19
|
+
"_noWrap": "__noWrap_na381_gg_",
|
|
20
|
+
"_medium": "__medium_na381_gg_",
|
|
21
|
+
"_bold": "__bold_na381_gg_",
|
|
22
|
+
"_italic": "__italic_na381_gg_",
|
|
23
|
+
"_uppercase": "__uppercase_na381_gg_",
|
|
24
|
+
"_lowercase": "__lowercase_na381_gg_",
|
|
25
|
+
"_capitalize": "__capitalize_na381_gg_",
|
|
26
|
+
"_decoration": "__decoration_na381_gg_",
|
|
27
|
+
"--decoration": "--decoration_na381",
|
|
28
|
+
"_color": "__color_na381_gg_",
|
|
29
|
+
"--color": "--color_na381",
|
|
30
|
+
"_fontSize": "__fontSize_na381_gg_",
|
|
31
|
+
"--fontSize": "--fontSize_na381",
|
|
32
|
+
"_lineHeight": "__lineHeight_na381_gg_",
|
|
33
|
+
"--lineHeight": "--lineHeight_na381",
|
|
34
|
+
"_fontWeight": "__fontWeight_na381_gg_",
|
|
35
|
+
"--fontWeight": "--fontWeight_na381",
|
|
36
|
+
"_textAlign": "__textAlign_na381_gg_",
|
|
37
|
+
"--textAlign": "--textAlign_na381"
|
|
38
38
|
});
|
|
39
39
|
function getTextDecoration(underline, lineThrough) {
|
|
40
40
|
if (underline) {
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, BoxProps } from '@semcore/flex-box';\nimport { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\n/** @deprecated */\nexport interface ITextProps extends TextProps, UnknownProperties {}\nexport type TextProps = BoxProps & {\n /** Font size and line-heights */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;\n /** The text will not be wrapped on a new line and will be cut off with ellipsis */\n noWrap?: boolean;\n /** CSS property `font-weight: 700;` */\n bold?: boolean;\n /** CSS property `font-weight: 500;` */\n medium?: boolean;\n /** Italicized text */\n italic?: boolean;\n /** Underlined text */\n underline?: boolean;\n /** Strikethrough text */\n lineThrough?: boolean;\n /** Uppercase text */\n uppercase?: boolean;\n /** Lowercase text */\n lowercase?: boolean;\n /** Capitalized text */\n capitalize?: boolean;\n /** Text color **/\n color?: string;\n /** Custom `font-size` */\n fontSize?: Property.FontSize<any>;\n /** Custom `line-height` */\n lineHeight?: Property.LineHeight<any>;\n /** Custom `font-weight` */\n fontWeight?: Property.FontWeight;\n /** Text alignment */\n textAlign?: Property.TextAlign;\n};\n\n/** @deprecated */\nexport interface IListProps extends ListProps, UnknownProperties {}\nexport type ListProps = TextProps & {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IListItemProps extends ListItemProps, UnknownProperties {}\nexport type ListItemProps = TextProps & {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface IListContext extends ListContext, UnknownProperties {}\nexport type ListContext = {\n getItemProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IHintProps extends HintProps, UnknownProperties {}\nexport type HintProps = TextProps &\n KeyboardFocusProps & {\n /** The value responsible for the activity of the element\n * @default false\n */\n disabled?: boolean;\n /** Enable `active` state */\n active?: boolean;\n /** Left addon hint */\n addonLeft?: React.ElementType;\n /** Right addon hint */\n addonRight?: React.ElementType;\n };\n\n/** @deprecated */\nexport interface IBlockquoteProps extends BlockquoteProps, UnknownProperties {}\nexport type BlockquoteProps = BoxProps & {\n /** Source of the quote */\n author?: React.ReactNode;\n};\n\ndeclare const Hint: Intergalactic.Component<'abbr', HintProps> & {\n Addon: typeof Box;\n Text: typeof Box;\n};\n\ndeclare const List: Intergalactic.Component<'ul', ListProps> & {\n Item: Intergalactic.Component<'li', ListItemProps>;\n};\n\ndeclare const Text: Intergalactic.Component<'span', TextProps>;\n\ndeclare const Blockquote: Intergalactic.Component<'blockquote', BlockquoteProps>;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
3
3
|
|
|
4
4
|
import { Property } from 'csstype';
|
|
5
|
-
import { Box,
|
|
5
|
+
import { Box, BoxProps } from '@semcore/flex-box';
|
|
6
|
+
import { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
/** @deprecated */
|
|
9
|
+
export interface ITextProps extends TextProps, UnknownProperties {}
|
|
10
|
+
export type TextProps = BoxProps & {
|
|
8
11
|
/** Font size and line-heights */
|
|
9
12
|
size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
10
13
|
/** The text will not be wrapped on a new line and will be cut off with ellipsis */
|
|
@@ -35,52 +38,63 @@ export interface ITextProps extends IBoxProps {
|
|
|
35
38
|
fontWeight?: Property.FontWeight;
|
|
36
39
|
/** Text alignment */
|
|
37
40
|
textAlign?: Property.TextAlign;
|
|
38
|
-
}
|
|
41
|
+
};
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
/** @deprecated */
|
|
44
|
+
export interface IListProps extends ListProps, UnknownProperties {}
|
|
45
|
+
export type ListProps = TextProps & {
|
|
41
46
|
/** Marker of the entire list
|
|
42
47
|
* @default • */
|
|
43
48
|
marker?: React.ReactNode;
|
|
44
|
-
}
|
|
49
|
+
};
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
/** @deprecated */
|
|
52
|
+
export interface IListItemProps extends ListItemProps, UnknownProperties {}
|
|
53
|
+
export type ListItemProps = TextProps & {
|
|
47
54
|
/** Individual marker of a list item */
|
|
48
55
|
marker?: React.ReactNode;
|
|
49
|
-
}
|
|
56
|
+
};
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
/** @deprecated */
|
|
59
|
+
export interface IListContext extends ListContext, UnknownProperties {}
|
|
60
|
+
export type ListContext = {
|
|
52
61
|
getItemProps: PropGetterFn;
|
|
53
|
-
}
|
|
62
|
+
};
|
|
54
63
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
/** @deprecated */
|
|
65
|
+
export interface IHintProps extends HintProps, UnknownProperties {}
|
|
66
|
+
export type HintProps = TextProps &
|
|
67
|
+
KeyboardFocusProps & {
|
|
68
|
+
/** The value responsible for the activity of the element
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/** Enable `active` state */
|
|
73
|
+
active?: boolean;
|
|
74
|
+
/** Left addon hint */
|
|
75
|
+
addonLeft?: React.ElementType;
|
|
76
|
+
/** Right addon hint */
|
|
77
|
+
addonRight?: React.ElementType;
|
|
78
|
+
};
|
|
67
79
|
|
|
68
|
-
|
|
80
|
+
/** @deprecated */
|
|
81
|
+
export interface IBlockquoteProps extends BlockquoteProps, UnknownProperties {}
|
|
82
|
+
export type BlockquoteProps = BoxProps & {
|
|
69
83
|
/** Source of the quote */
|
|
70
84
|
author?: React.ReactNode;
|
|
71
|
-
}
|
|
85
|
+
};
|
|
72
86
|
|
|
73
|
-
declare const Hint:
|
|
74
|
-
Addon:
|
|
75
|
-
Text:
|
|
87
|
+
declare const Hint: Intergalactic.Component<'abbr', HintProps> & {
|
|
88
|
+
Addon: typeof Box;
|
|
89
|
+
Text: typeof Box;
|
|
76
90
|
};
|
|
77
91
|
|
|
78
|
-
declare const List:
|
|
79
|
-
Item: <
|
|
92
|
+
declare const List: Intergalactic.Component<'ul', ListProps> & {
|
|
93
|
+
Item: Intergalactic.Component<'li', ListItemProps>;
|
|
80
94
|
};
|
|
81
95
|
|
|
82
|
-
declare const Text: <
|
|
96
|
+
declare const Text: Intergalactic.Component<'span', TextProps>;
|
|
83
97
|
|
|
84
|
-
declare const Blockquote: <
|
|
98
|
+
declare const Blockquote: Intergalactic.Component<'blockquote', BlockquoteProps>;
|
|
85
99
|
|
|
86
100
|
export { Text, List, Hint, Blockquote };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/typography",
|
|
3
3
|
"description": "Semrush Typography Component",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0-beta.1",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/utils": "
|
|
13
|
-
"@semcore/flex-box": "
|
|
14
|
-
"@semcore/icon": "
|
|
12
|
+
"@semcore/utils": "4.0.0-beta.1",
|
|
13
|
+
"@semcore/flex-box": "5.0.0-beta.1",
|
|
14
|
+
"@semcore/icon": "4.0.0-beta.1",
|
|
15
15
|
"csstype": "3.0.8"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@semcore/core": "
|
|
18
|
+
"@semcore/core": "2.0.0-beta.1",
|
|
19
19
|
"react": "16.8 - 18",
|
|
20
20
|
"react-dom": "16.8 - 18"
|
|
21
21
|
},
|