@semcore/typography 4.3.30 → 4.4.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 +9 -5
- package/lib/cjs/Blockquote.js +4 -4
- package/lib/cjs/Blockquote.js.map +1 -1
- package/lib/cjs/Hint.js +7 -7
- package/lib/cjs/Hint.js.map +1 -1
- package/lib/cjs/List.js +5 -5
- package/lib/cjs/List.js.map +1 -1
- package/lib/cjs/Text.js +29 -26
- package/lib/cjs/Text.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/text.shadow.css +12 -0
- package/lib/es6/Blockquote.js +4 -4
- package/lib/es6/Blockquote.js.map +1 -1
- package/lib/es6/Hint.js +7 -7
- package/lib/es6/Hint.js.map +1 -1
- package/lib/es6/List.js +5 -5
- package/lib/es6/List.js.map +1 -1
- package/lib/es6/Text.js +29 -26
- package/lib/es6/Text.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/text.shadow.css +12 -0
- package/lib/types/index.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [4.
|
|
5
|
+
## [4.4.1] - 2023-05-03
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.50.
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.50.4 ~> 3.50.5], `@semcore/flex-box` [4.7.20 ~> 4.7.21], `@semcore/icon` [3.14.8 ~> 3.14.9]).
|
|
10
10
|
|
|
11
|
-
## [4.
|
|
11
|
+
## [4.4.0] - 2023-04-25
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added `uppercase`, `lowercase`, `capitalize` text transformation props.
|
|
16
|
+
|
|
17
|
+
## [4.3.29] - 2023-04-17
|
|
14
18
|
|
|
15
19
|
### Changed
|
|
16
20
|
|
|
17
|
-
- Version patch update due to children dependencies update (`@semcore/
|
|
21
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.50.0 ~> 3.50.3], `@semcore/flex-box` [4.7.18 ~> 4.7.19], `@semcore/icon` [3.14.6 ~> 3.14.7]).
|
|
18
22
|
|
|
19
23
|
## [4.3.16] - 2023-02-22
|
|
20
24
|
|
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_1d25c_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_1d25c_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_1d25c_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__*/, "1d25c_gg_") /*__reshadow_css_end__*/, {
|
|
15
|
+
"__SBlockquote": "___SBlockquote_1d25c_gg_",
|
|
16
|
+
"__SDoubleQuotation": "___SDoubleQuotation_1d25c_gg_",
|
|
17
|
+
"__SAuthor": "___SAuthor_1d25c_gg_"
|
|
18
18
|
});
|
|
19
19
|
function Blockquote(props, ref) {
|
|
20
20
|
var _ref = arguments[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blockquote.js","names":["_core","require","_react","_interopRequireDefault","_isNode","_flexBox","styles","sstyled","insert","Blockquote","props","ref","_ref","arguments[0]","_ref2","SBlockquote","Box","SDoubleQuotation","SAuthor","children","author","createElement","cn","_objectSpread2","assignProps","isNode","displayName","_default","createBaseComponent","exports"],"sources":["../../src/Blockquote.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport { Box } from '@semcore/flex-box';\n\nimport styles from './style/blockquote.shadow.css';\n\nfunction Blockquote(props, ref) {\n const SBlockquote = Root;\n const SDoubleQuotation = 'span';\n const SAuthor = 'cite';\n const { children, author } = props;\n\n return sstyled(styles)(\n <SBlockquote render={Box} tag=\"blockquote\" ref={ref}>\n <SDoubleQuotation>“</SDoubleQuotation>\n <span>\n {children}\n {isNode(author) && <SAuthor>{author}</SAuthor>}\n </span>\n </SBlockquote>,\n );\n}\n\nBlockquote.displayName = 'Blockquote';\n\nexport default createBaseComponent(Blockquote);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAwC;AAAA,IAAAK,MAAA,+BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;AAAA;AAIxC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAC9B,IAAMC,WAAW,GAMMC,
|
|
1
|
+
{"version":3,"file":"Blockquote.js","names":["_core","require","_react","_interopRequireDefault","_isNode","_flexBox","styles","sstyled","insert","Blockquote","props","ref","_ref","arguments[0]","_ref2","SBlockquote","Box","SDoubleQuotation","SAuthor","children","author","createElement","cn","_objectSpread2","assignProps","isNode","displayName","_default","createBaseComponent","exports"],"sources":["../../src/Blockquote.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport { Box } from '@semcore/flex-box';\n\nimport styles from './style/blockquote.shadow.css';\n\nfunction Blockquote(props, ref) {\n const SBlockquote = Root;\n const SDoubleQuotation = 'span';\n const SAuthor = 'cite';\n const { children, author } = props;\n\n return sstyled(styles)(\n <SBlockquote render={Box} tag=\"blockquote\" ref={ref}>\n <SDoubleQuotation>“</SDoubleQuotation>\n <span>\n {children}\n {isNode(author) && <SAuthor>{author}</SAuthor>}\n </span>\n </SBlockquote>,\n );\n}\n\nBlockquote.displayName = 'Blockquote';\n\nexport default createBaseComponent(Blockquote);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAwC;AAAA,IAAAK,MAAA,+BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;AAAA;AAIxC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAC9B,IAAMC,WAAW,GAMMC,YAAG;EAL1B,IAAMC,gBAAgB,GAAG,MAAM;EAC/B,IAAMC,OAAO,GAAG,MAAM;EACtB,IAAQC,QAAQ,GAAaT,KAAK,CAA1BS,QAAQ;IAAEC,MAAM,GAAKV,KAAK,CAAhBU,MAAM;EAExB,OAAAN,KAAA,GAAO,IAAAP,aAAO,EAACD,MAAM,CAAC,eACpBJ,MAAA,YAAAmB,aAAA,CAACN,WAAW,EAAAD,KAAA,CAAAQ,EAAA,oBAAAC,cAAA,qBAAAvB,KAAA,CAAAwB,WAAA;IAAA,OAAkB,YAAY;IAAA,OAAMb;EAAG,GAAAC,IAAA,kBACjDV,MAAA,YAAAmB,aAAA,CAACJ,gBAAgB,EAAAH,KAAA,CAAAQ,EAAA,0BAAC,QAAC,CAAmB,eACtCpB,MAAA,YAAAmB,aAAA,SAAAP,KAAA,CAAAQ,EAAA,cACGH,QAAQ,EACR,IAAAM,kBAAM,EAACL,MAAM,CAAC,iBAAIlB,MAAA,YAAAmB,aAAA,CAACH,OAAO,EAAAJ,KAAA,CAAAQ,EAAA,iBAAEF,MAAM,CAAW,CACzC,CACK;AAElB;AAEAX,UAAU,CAACiB,WAAW,GAAG,YAAY;AAAC,IAAAC,QAAA,GAEvB,IAAAC,yBAAmB,EAACnB,UAAU,CAAC;AAAAoB,OAAA,cAAAF,QAAA"}
|
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_na6oz_gg_{display:inline-block;transition:all .15s ease-in-out;text-decoration:none;outline:0;cursor:pointer;color:var(--intergalactic-text-secondary, #6c6e79)}.___SHint_na6oz_gg_.__active_na6oz_gg_,.___SHint_na6oz_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SHint_na6oz_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SHint_na6oz_gg_.__keyboardFocused_na6oz_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.3))}.___SHint_na6oz_gg_.__disabled_na6oz_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_na6oz_gg_{vertical-align:middle;display:inline-flex}.___SHint_na6oz_gg_ .___SAddon_na6oz_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SHint_na6oz_gg_ .___SAddon_na6oz_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SText_na6oz_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}@media (prefers-reduced-motion){.___SHint_na6oz_gg_{transition:none}}" /*__inner_css_end__*/, "na6oz_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SHint": "___SHint_na6oz_gg_",
|
|
24
|
+
"_active": "__active_na6oz_gg_",
|
|
25
|
+
"_keyboardFocused": "__keyboardFocused_na6oz_gg_",
|
|
26
|
+
"_disabled": "__disabled_na6oz_gg_",
|
|
27
|
+
"__SAddon": "___SAddon_na6oz_gg_",
|
|
28
|
+
"__SText": "___SText_na6oz_gg_"
|
|
29
29
|
});
|
|
30
30
|
var RootHint = /*#__PURE__*/function (_Component) {
|
|
31
31
|
(0, _inherits2["default"])(RootHint, _Component);
|
package/lib/cjs/Hint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hint.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_keyboardFocusEnhance","_addonTextChildren","_Text","style","sstyled","insert","RootHint","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref4","SHint","Text","_this$asProps","styles","Children","addonLeft","addonRight","createElement","cn","_objectSpread2","assignProps","Hint","Addon","tag","addonTextChildren","Component","_defineProperty2","keyboardFocusEnhance","props","_ref2","arguments[0]","_ref5","SAddon","Box","HintText","_ref3","_ref6","SText","createComponent","_default","exports"],"sources":["../../src/Hint.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport Text from './Text';\n\nimport style from './style/hint.shadow.css';\n\nclass RootHint extends Component {\n static displayName = 'Hint';\n static style = style;\n static enhance = [keyboardFocusEnhance()];\n\n render() {\n const SHint = Root;\n const { styles, Children, addonLeft, addonRight } = this.asProps;\n return sstyled(styles)(\n <SHint render={Text} tag=\"abbr\">\n {addonLeft ? <Hint.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Hint.Text, Hint.Addon)}\n {addonRight ? <Hint.Addon tag={addonRight} /> : null}\n </SHint>,\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nfunction HintText(props) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Box} tag=\"span\" />);\n}\n\nconst Hint = createComponent(RootHint, {\n Text: HintText,\n Addon,\n});\n\nexport default Hint;\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAA0B;AAAA,IAAAO,KAAA,+BAAAT,KAAA,CAAAU,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,QAAQ,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,QAAA;EAAA,SAAAA,SAAA;IAAA,IAAAK,gBAAA,mBAAAL,QAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAA,IAAAC,aAAA,aAAAR,QAAA;IAAAS,GAAA;IAAAC,KAAA,EAKZ,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;MACP,IAAMC,KAAK,GAGMC,
|
|
1
|
+
{"version":3,"file":"Hint.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_keyboardFocusEnhance","_addonTextChildren","_Text","style","sstyled","insert","RootHint","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","render","_ref","asProps","_ref4","SHint","Text","_this$asProps","styles","Children","addonLeft","addonRight","createElement","cn","_objectSpread2","assignProps","Hint","Addon","tag","addonTextChildren","Component","_defineProperty2","keyboardFocusEnhance","props","_ref2","arguments[0]","_ref5","SAddon","Box","HintText","_ref3","_ref6","SText","createComponent","_default","exports"],"sources":["../../src/Hint.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport Text from './Text';\n\nimport style from './style/hint.shadow.css';\n\nclass RootHint extends Component {\n static displayName = 'Hint';\n static style = style;\n static enhance = [keyboardFocusEnhance()];\n\n render() {\n const SHint = Root;\n const { styles, Children, addonLeft, addonRight } = this.asProps;\n return sstyled(styles)(\n <SHint render={Text} tag=\"abbr\">\n {addonLeft ? <Hint.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Hint.Text, Hint.Addon)}\n {addonRight ? <Hint.Addon tag={addonRight} /> : null}\n </SHint>,\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nfunction HintText(props) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Box} tag=\"span\" />);\n}\n\nconst Hint = createComponent(RootHint, {\n Text: HintText,\n Addon,\n});\n\nexport default Hint;\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,kBAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAA0B;AAAA,IAAAO,KAAA,+BAAAT,KAAA,CAAAU,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,QAAQ,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,QAAA;EAAA,SAAAA,SAAA;IAAA,IAAAK,gBAAA,mBAAAL,QAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAA,IAAAC,aAAA,aAAAR,QAAA;IAAAS,GAAA;IAAAC,KAAA,EAKZ,SAAAC,OAAA,EAAS;MAAA,IAAAC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AAO,EAACoB,MAAM,CAAC,eAAC3B,MAAA,YAAA+B,aAAA,CAACe,MAAM,EAAAD,KAAA,CAAAb,EAAA,eAAAC,cAAA,qBAAApC,KAAA,CAAAqC,WAAA;IAAA,OAAkB;EAAM,GAAAS,KAAA,IAAG;AAC3D;AAEA,SAASK,QAAQA,CAACN,KAAK,EAAE;EAAA,IAAAO,KAAA,GAAAL,YAAA;IAAAM,KAAA;EACvB,IAAMC,KAAK,GAE2BJ,YAAG;EADzC,IAAQpB,MAAM,GAAKe,KAAK,CAAhBf,MAAM;EACd,OAAAuB,KAAA,GAAO,IAAA3C,aAAO,EAACoB,MAAM,CAAC,eAAC3B,MAAA,YAAA+B,aAAA,CAACoB,KAAK,EAAAD,KAAA,CAAAlB,EAAA,cAAAC,cAAA,qBAAApC,KAAA,CAAAqC,WAAA;IAAA,OAAkB;EAAM,GAAAe,KAAA,IAAG;AAC1D;AAEA,IAAMd,IAAI,GAAG,IAAAiB,gBAAe,EAAC3C,QAAQ,EAAE;EACrCgB,IAAI,EAAEuB,QAAQ;EACdZ,KAAK,EAALA;AACF,CAAC,CAAC;AAAC,IAAAiB,QAAA,GAEYlB,IAAI;AAAAmB,OAAA,cAAAD,QAAA"}
|
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_13usg_gg_{padding:0;margin:0;list-style-type:none}.___SContent_13usg_gg_{overflow:inherit;text-overflow:inherit}.___SItem_13usg_gg_+.___SItem_13usg_gg_,.___SList_13usg_gg_ .___SList_13usg_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}.___SItem_13usg_gg_{display:flex}.___SMarker_13usg_gg_{margin-right:calc(var(--intergalactic-spacing-2x, 8px) + var(--intergalactic-spacing-05x, 2px));color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "13usg_gg_") /*__reshadow_css_end__*/, {
|
|
21
|
+
"__SList": "___SList_13usg_gg_",
|
|
22
|
+
"__SContent": "___SContent_13usg_gg_",
|
|
23
|
+
"__SItem": "___SItem_13usg_gg_",
|
|
24
|
+
"__SMarker": "___SMarker_13usg_gg_"
|
|
25
25
|
});
|
|
26
26
|
var List = /*#__PURE__*/function (_Component) {
|
|
27
27
|
(0, _inherits2["default"])(List, _Component);
|
package/lib/cjs/List.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_isNode","_Text","style","sstyled","insert","List","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getItemProps","marker","asProps","render","_ref","_ref3","SList","Text","styles","createElement","cn","_objectSpread2","assignProps","Component","_defineProperty2","Item","props","_ref2","arguments[0]","_ref4","SItem","children","markerNode","SMarker","SContent","isNode","_default","createComponent","exports"],"sources":["../../src/List.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport Text from './Text';\n\nimport style from './style/list.shadow.css';\n\nclass List extends Component {\n static displayName = 'List';\n static style = style;\n static defaultProps = {\n marker: '•',\n };\n\n getItemProps() {\n const { marker } = this.asProps;\n return {\n marker,\n };\n }\n\n render() {\n const SList = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SList render={Text} tag=\"ul\" role=\"list\" />);\n }\n}\n\nfunction Item(props) {\n const SItem = Root;\n const { styles, children, marker: markerNode } = props;\n const SMarker = 'span';\n const SContent = 'div';\n\n return sstyled(styles)(\n <SItem render={Text} tag=\"li\" role=\"listitem\">\n {isNode(markerNode) && <SMarker aria-hidden=\"true\">{markerNode}</SMarker>}\n <SContent>{children}</SContent>\n </SItem>,\n );\n}\n\nexport default createComponent(List, { Item });\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0B;AAAA,IAAAK,KAAA,+BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,IAAI,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,IAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,IAAA;EAAA,SAAAA,KAAA;IAAA,IAAAK,gBAAA,mBAAAL,IAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAA,IAAAC,aAAA,aAAAR,IAAA;IAAAS,GAAA;IAAAC,KAAA,EAOR,SAAAC,aAAA,EAAe;MACb,IAAQC,MAAM,GAAK,IAAI,CAACC,OAAO,CAAvBD,MAAM;MACd,OAAO;QACLA,MAAM,EAANA;MACF,CAAC;IACH;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAF,OAAA;QAAAG,KAAA;MACP,IAAMC,KAAK,GAE2BC,
|
|
1
|
+
{"version":3,"file":"List.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_isNode","_Text","style","sstyled","insert","List","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getItemProps","marker","asProps","render","_ref","_ref3","SList","Text","styles","createElement","cn","_objectSpread2","assignProps","Component","_defineProperty2","Item","props","_ref2","arguments[0]","_ref4","SItem","children","markerNode","SMarker","SContent","isNode","_default","createComponent","exports"],"sources":["../../src/List.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport Text from './Text';\n\nimport style from './style/list.shadow.css';\n\nclass List extends Component {\n static displayName = 'List';\n static style = style;\n static defaultProps = {\n marker: '•',\n };\n\n getItemProps() {\n const { marker } = this.asProps;\n return {\n marker,\n };\n }\n\n render() {\n const SList = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SList render={Text} tag=\"ul\" role=\"list\" />);\n }\n}\n\nfunction Item(props) {\n const SItem = Root;\n const { styles, children, marker: markerNode } = props;\n const SMarker = 'span';\n const SContent = 'div';\n\n return sstyled(styles)(\n <SItem render={Text} tag=\"li\" role=\"listitem\">\n {isNode(markerNode) && <SMarker aria-hidden=\"true\">{markerNode}</SMarker>}\n <SContent>{children}</SContent>\n </SItem>,\n );\n}\n\nexport default createComponent(List, { Item });\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0B;AAAA,IAAAK,KAAA,+BAAAP,KAAA,CAAAQ,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,IAAI,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,IAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,IAAA;EAAA,SAAAA,KAAA;IAAA,IAAAK,gBAAA,mBAAAL,IAAA;IAAA,OAAAG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AACqB,MAAM,CAAC,eACpB1B,MAAA,YAAA2B,aAAA,CAACW,KAAK,EAAAD,KAAA,CAAAT,EAAA,cAAAC,cAAA,qBAAAhC,KAAA,CAAAiC,WAAA;IAAA,OAAmB,IAAI;IAAA,QAAM;EAAU,GAAAK,KAAA,KAC1C,IAAAQ,kBAAM,EAACH,UAAU,CAAC,iBAAIxC,MAAA,YAAA2B,aAAA,CAACc,OAAO,EAAAJ,KAAA,CAAAT,EAAA;IAAA,eAAa;EAAM,IAAEY,UAAU,CAAW,eACzExC,MAAA,YAAA2B,aAAA,CAACe,QAAQ,EAAAL,KAAA,CAAAT,EAAA,kBAAEW,QAAQ,CAAY,CACzB;AAEZ;AAAC,IAAAK,QAAA,GAEc,IAAAC,gBAAe,EAACtC,IAAI,EAAE;EAAE0B,IAAI,EAAJA;AAAK,CAAC,CAAC;AAAAa,OAAA,cAAAF,QAAA"}
|
package/lib/cjs/Text.js
CHANGED
|
@@ -11,32 +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
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
14
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SText_uwx0t_gg_{padding:0;margin:0}.___SText_uwx0t_gg_._size_100_uwx0t_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SText_uwx0t_gg_._size_200_uwx0t_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_uwx0t_gg_._size_300_uwx0t_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SText_uwx0t_gg_._size_400_uwx0t_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SText_uwx0t_gg_._size_500_uwx0t_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SText_uwx0t_gg_._size_600_uwx0t_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SText_uwx0t_gg_._size_700_uwx0t_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SText_uwx0t_gg_._size_800_uwx0t_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}.___SText_uwx0t_gg_.__noWrap_uwx0t_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_uwx0t_gg_.__medium_uwx0t_gg_{font-weight:var(--intergalactic-medium, 500)}.___SText_uwx0t_gg_.__bold_uwx0t_gg_{font-weight:var(--intergalactic-bold, 700)}.___SText_uwx0t_gg_.__italic_uwx0t_gg_{font-style:italic}.___SText_uwx0t_gg_.__uppercase_uwx0t_gg_{text-transform:uppercase}.___SText_uwx0t_gg_.__lowercase_uwx0t_gg_{text-transform:lowercase}.___SText_uwx0t_gg_.__capitalize_uwx0t_gg_{text-transform:capitalize}.___SText_uwx0t_gg_.__decoration_uwx0t_gg_{-webkit-text-decoration:var(--decoration_uwx0t);text-decoration:var(--decoration_uwx0t)}.___SText_uwx0t_gg_.__color_uwx0t_gg_{color:var(--color_uwx0t)}.___SText_uwx0t_gg_.__fontSize_uwx0t_gg_{font-size:var(--fontSize_uwx0t)}.___SText_uwx0t_gg_.__lineHeight_uwx0t_gg_{line-height:var(--lineHeight_uwx0t)}.___SText_uwx0t_gg_.__fontWeight_uwx0t_gg_{font-weight:var(--fontWeight_uwx0t)}.___SText_uwx0t_gg_.__textAlign_uwx0t_gg_{text-align:var(--textAlign_uwx0t)}" /*__inner_css_end__*/, "uwx0t_gg_") /*__reshadow_css_end__*/, {
|
|
15
|
+
"__SText": "___SText_uwx0t_gg_",
|
|
16
|
+
"_size_100": "_size_100_uwx0t_gg_",
|
|
17
|
+
"_size_200": "_size_200_uwx0t_gg_",
|
|
18
|
+
"_size_300": "_size_300_uwx0t_gg_",
|
|
19
|
+
"_size_400": "_size_400_uwx0t_gg_",
|
|
20
|
+
"_size_500": "_size_500_uwx0t_gg_",
|
|
21
|
+
"_size_600": "_size_600_uwx0t_gg_",
|
|
22
|
+
"_size_700": "_size_700_uwx0t_gg_",
|
|
23
|
+
"_size_800": "_size_800_uwx0t_gg_",
|
|
24
|
+
"_noWrap": "__noWrap_uwx0t_gg_",
|
|
25
|
+
"_medium": "__medium_uwx0t_gg_",
|
|
26
|
+
"_bold": "__bold_uwx0t_gg_",
|
|
27
|
+
"_italic": "__italic_uwx0t_gg_",
|
|
28
|
+
"_uppercase": "__uppercase_uwx0t_gg_",
|
|
29
|
+
"_lowercase": "__lowercase_uwx0t_gg_",
|
|
30
|
+
"_capitalize": "__capitalize_uwx0t_gg_",
|
|
31
|
+
"_decoration": "__decoration_uwx0t_gg_",
|
|
32
|
+
"--decoration": "--decoration_uwx0t",
|
|
33
|
+
"_color": "__color_uwx0t_gg_",
|
|
34
|
+
"--color": "--color_uwx0t",
|
|
35
|
+
"_fontSize": "__fontSize_uwx0t_gg_",
|
|
36
|
+
"--fontSize": "--fontSize_uwx0t",
|
|
37
|
+
"_lineHeight": "__lineHeight_uwx0t_gg_",
|
|
38
|
+
"--lineHeight": "--lineHeight_uwx0t",
|
|
39
|
+
"_fontWeight": "__fontWeight_uwx0t_gg_",
|
|
40
|
+
"--fontWeight": "--fontWeight_uwx0t",
|
|
41
|
+
"_textAlign": "__textAlign_uwx0t_gg_",
|
|
42
|
+
"--textAlign": "--textAlign_uwx0t"
|
|
40
43
|
});
|
|
41
44
|
function getTextDecoration(underline, lineThrough) {
|
|
42
45
|
if (underline) {
|
package/lib/cjs/Text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_color","styles","sstyled","insert","getTextDecoration","underline","lineThrough","Text","props","ref","_ref","arguments[0]","_ref2","SText","Box","color","textDecoration","createElement","cn","_objectSpread2","assignProps","resolveColor","displayName","_default","createBaseComponent","exports"],"sources":["../../src/Text.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport styles from './style/text.shadow.css';\n\nfunction getTextDecoration(underline, lineThrough) {\n if (underline) {\n return 'underline';\n }\n\n if (lineThrough) {\n return 'line-through';\n }\n}\n\nfunction Text(props, ref) {\n const SText = Root;\n const { color, underline, lineThrough } = props;\n const textDecoration = getTextDecoration(underline, lineThrough);\n\n return sstyled(styles)(\n <SText\n render={Box}\n tag=\"span\"\n data-ui-name=\"Text\"\n ref={ref}\n use:decoration={textDecoration}\n use:color={resolveColor(color)}\n />,\n );\n}\n\nText.displayName = 'Text';\n\nexport default createBaseComponent(Text);\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAoD;AAAA,IAAAK,MAAA,+BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpD,SAASC,iBAAiBA,CAACC,SAAS,EAAEC,WAAW,EAAE;EACjD,IAAID,SAAS,EAAE;IACb,OAAO,WAAW;EACpB;EAEA,IAAIC,WAAW,EAAE;IACf,OAAO,cAAc;EACvB;AACF;AAEA,SAASC,IAAIA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACxB,IAAMC,KAAK,GAMCC,
|
|
1
|
+
{"version":3,"file":"Text.js","names":["_core","require","_react","_interopRequireDefault","_flexBox","_color","styles","sstyled","insert","getTextDecoration","underline","lineThrough","Text","props","ref","_ref","arguments[0]","_ref2","SText","Box","color","textDecoration","createElement","cn","_objectSpread2","assignProps","resolveColor","displayName","_default","createBaseComponent","exports"],"sources":["../../src/Text.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport styles from './style/text.shadow.css';\n\nfunction getTextDecoration(underline, lineThrough) {\n if (underline) {\n return 'underline';\n }\n\n if (lineThrough) {\n return 'line-through';\n }\n}\n\nfunction Text(props, ref) {\n const SText = Root;\n const { color, underline, lineThrough } = props;\n const textDecoration = getTextDecoration(underline, lineThrough);\n\n return sstyled(styles)(\n <SText\n render={Box}\n tag=\"span\"\n data-ui-name=\"Text\"\n ref={ref}\n use:decoration={textDecoration}\n use:color={resolveColor(color)}\n />,\n );\n}\n\nText.displayName = 'Text';\n\nexport default createBaseComponent(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,WAAW,GAAG,MAAM;AAAC,IAAAC,QAAA,GAEX,IAAAC,yBAAmB,EAACjB,IAAI,CAAC;AAAAkB,OAAA,cAAAF,QAAA"}
|
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, { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface ITextProps extends IBoxProps {\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 /** 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\nexport interface IListProps extends ITextProps {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n}\n\nexport interface IListItemProps extends ITextProps {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n}\n\nexport interface IListContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IHintProps extends ITextProps {\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\nexport interface IBlockquoteProps extends IBoxProps {\n /** Source of the quote */\n author?: React.ReactNode;\n}\n\ndeclare const Hint: ((props: CProps<IHintProps>) => ReturnEl) & {\n Addon: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Text: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\ndeclare const List: ((props: CProps<IListProps, IListContext>) => ReturnEl) & {\n Item: <T>(props: IListItemProps & T) => ReturnEl;\n};\n\ndeclare const Text: <T>(props: ITextProps & T) => ReturnEl;\n\ndeclare const Blockquote: <T>(props: IBlockquoteProps & T) => ReturnEl;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface ITextProps extends IBoxProps {\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\nexport interface IListProps extends ITextProps {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n}\n\nexport interface IListItemProps extends ITextProps {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n}\n\nexport interface IListContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IHintProps extends ITextProps {\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\nexport interface IBlockquoteProps extends IBoxProps {\n /** Source of the quote */\n author?: React.ReactNode;\n}\n\ndeclare const Hint: ((props: CProps<IHintProps>) => ReturnEl) & {\n Addon: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Text: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\ndeclare const List: ((props: CProps<IListProps, IListContext>) => ReturnEl) & {\n Item: <T>(props: IListItemProps & T) => ReturnEl;\n};\n\ndeclare const Text: <T>(props: ITextProps & T) => ReturnEl;\n\ndeclare const Blockquote: <T>(props: IBlockquoteProps & T) => ReturnEl;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
|
@@ -61,6 +61,18 @@ SText[italic] {
|
|
|
61
61
|
font-style: italic;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
SText[uppercase] {
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
SText[lowercase] {
|
|
69
|
+
text-transform: lowercase;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
SText[capitalize] {
|
|
73
|
+
text-transform: capitalize;
|
|
74
|
+
}
|
|
75
|
+
|
|
64
76
|
SText[decoration] {
|
|
65
77
|
text-decoration: var(--decoration);
|
|
66
78
|
}
|
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_1d25c_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_1d25c_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_1d25c_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__*/, "1d25c_gg_") /*__reshadow_css_end__*/, {
|
|
10
|
+
"__SBlockquote": "___SBlockquote_1d25c_gg_",
|
|
11
|
+
"__SDoubleQuotation": "___SDoubleQuotation_1d25c_gg_",
|
|
12
|
+
"__SAuthor": "___SAuthor_1d25c_gg_"
|
|
13
13
|
});
|
|
14
14
|
function Blockquote(props, ref) {
|
|
15
15
|
var _ref = arguments[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blockquote.js","names":["React","createBaseComponent","Root","sstyled","isNode","Box","styles","_sstyled","insert","Blockquote","props","ref","_ref","arguments[0]","_ref2","SBlockquote","SDoubleQuotation","SAuthor","children","author","createElement","cn","_objectSpread","_assignProps","displayName"],"sources":["../../src/Blockquote.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport { Box } from '@semcore/flex-box';\n\nimport styles from './style/blockquote.shadow.css';\n\nfunction Blockquote(props, ref) {\n const SBlockquote = Root;\n const SDoubleQuotation = 'span';\n const SAuthor = 'cite';\n const { children, author } = props;\n\n return sstyled(styles)(\n <SBlockquote render={Box} tag=\"blockquote\" ref={ref}>\n <SDoubleQuotation>“</SDoubleQuotation>\n <span>\n {children}\n {isNode(author) && <SAuthor>{author}</SAuthor>}\n </span>\n </SBlockquote>,\n );\n}\n\nBlockquote.displayName = 'Blockquote';\n\nexport default createBaseComponent(Blockquote);\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAClE,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;AAAA;AAIxC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAC9B,IAAMC,WAAW,GAMMV,
|
|
1
|
+
{"version":3,"file":"Blockquote.js","names":["React","createBaseComponent","Root","sstyled","isNode","Box","styles","_sstyled","insert","Blockquote","props","ref","_ref","arguments[0]","_ref2","SBlockquote","SDoubleQuotation","SAuthor","children","author","createElement","cn","_objectSpread","_assignProps","displayName"],"sources":["../../src/Blockquote.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\nimport { Box } from '@semcore/flex-box';\n\nimport styles from './style/blockquote.shadow.css';\n\nfunction Blockquote(props, ref) {\n const SBlockquote = Root;\n const SDoubleQuotation = 'span';\n const SAuthor = 'cite';\n const { children, author } = props;\n\n return sstyled(styles)(\n <SBlockquote render={Box} tag=\"blockquote\" ref={ref}>\n <SDoubleQuotation>“</SDoubleQuotation>\n <span>\n {children}\n {isNode(author) && <SAuthor>{author}</SAuthor>}\n </span>\n </SBlockquote>,\n );\n}\n\nBlockquote.displayName = 'Blockquote';\n\nexport default createBaseComponent(Blockquote);\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAClE,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,SAASC,GAAG,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;AAAA;AAIxC,SAASC,UAAUA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EAC9B,IAAMC,WAAW,GAMMV,GAAG;EAL1B,IAAMW,gBAAgB,GAAG,MAAM;EAC/B,IAAMC,OAAO,GAAG,MAAM;EACtB,IAAQC,QAAQ,GAAaR,KAAK,CAA1BQ,QAAQ;IAAEC,MAAM,GAAKT,KAAK,CAAhBS,MAAM;EAExB,OAAAL,KAAA,GAAOX,OAAO,CAACG,MAAM,CAAC,eACpBN,KAAA,CAAAoB,aAAA,CAACL,WAAW,EAAAD,KAAA,CAAAO,EAAA,gBAAAC,aAAA,KAAAC,YAAA;IAAA,OAAkB,YAAY;IAAA,OAAMZ;EAAG,GAAAC,IAAA,kBACjDZ,KAAA,CAAAoB,aAAA,CAACJ,gBAAgB,EAAAF,KAAA,CAAAO,EAAA,0BAAC,QAAC,CAAmB,eACtCrB,KAAA,CAAAoB,aAAA,SAAAN,KAAA,CAAAO,EAAA,cACGH,QAAQ,EACRd,MAAM,CAACe,MAAM,CAAC,iBAAInB,KAAA,CAAAoB,aAAA,CAACH,OAAO,EAAAH,KAAA,CAAAO,EAAA,iBAAEF,MAAM,CAAW,CACzC,CACK;AAElB;AAEAV,UAAU,CAACe,WAAW,GAAG,YAAY;AAErC,eAAevB,mBAAmB,CAACQ,UAAU,CAAC"}
|
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_na6oz_gg_{display:inline-block;transition:all .15s ease-in-out;text-decoration:none;outline:0;cursor:pointer;color:var(--intergalactic-text-secondary, #6c6e79)}.___SHint_na6oz_gg_.__active_na6oz_gg_,.___SHint_na6oz_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SHint_na6oz_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SHint_na6oz_gg_.__keyboardFocused_na6oz_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.3))}.___SHint_na6oz_gg_.__disabled_na6oz_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SAddon_na6oz_gg_{vertical-align:middle;display:inline-flex}.___SHint_na6oz_gg_ .___SAddon_na6oz_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SHint_na6oz_gg_ .___SAddon_na6oz_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SText_na6oz_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}@media (prefers-reduced-motion){.___SHint_na6oz_gg_{transition:none}}" /*__inner_css_end__*/, "na6oz_gg_") /*__reshadow_css_end__*/, {
|
|
19
|
+
"__SHint": "___SHint_na6oz_gg_",
|
|
20
|
+
"_active": "__active_na6oz_gg_",
|
|
21
|
+
"_keyboardFocused": "__keyboardFocused_na6oz_gg_",
|
|
22
|
+
"_disabled": "__disabled_na6oz_gg_",
|
|
23
|
+
"__SAddon": "___SAddon_na6oz_gg_",
|
|
24
|
+
"__SText": "___SText_na6oz_gg_"
|
|
25
25
|
});
|
|
26
26
|
var RootHint = /*#__PURE__*/function (_Component) {
|
|
27
27
|
_inherits(RootHint, _Component);
|
package/lib/es6/Hint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hint.js","names":["React","createComponent","Component","Root","sstyled","Box","keyboardFocusEnhance","addonTextChildren","Text","style","_sstyled","insert","RootHint","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref4","SHint","_this$asProps","styles","Children","addonLeft","addonRight","createElement","cn","_objectSpread","_assignProps","Hint","Addon","tag","_defineProperty","props","_ref2","arguments[0]","_ref5","SAddon","_assignProps2","HintText","_ref3","_ref6","SText","_assignProps3"],"sources":["../../src/Hint.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport Text from './Text';\n\nimport style from './style/hint.shadow.css';\n\nclass RootHint extends Component {\n static displayName = 'Hint';\n static style = style;\n static enhance = [keyboardFocusEnhance()];\n\n render() {\n const SHint = Root;\n const { styles, Children, addonLeft, addonRight } = this.asProps;\n return sstyled(styles)(\n <SHint render={Text} tag=\"abbr\">\n {addonLeft ? <Hint.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Hint.Text, Hint.Addon)}\n {addonRight ? <Hint.Addon tag={addonRight} /> : null}\n </SHint>,\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nfunction HintText(props) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Box} tag=\"span\" />);\n}\n\nconst Hint = createComponent(RootHint, {\n Text: HintText,\n Addon,\n});\n\nexport default Hint;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,oBAAoB,MAAM,kDAAkD;AACnF,OAAOC,iBAAiB,MAAM,sCAAsC;AAEpE,OAAOC,IAAI,MAAM,QAAQ;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,QAAQ,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,QAAA;EAAA,SAAAA,SAAA;IAAAK,eAAA,OAAAL,QAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,QAAA;IAAAS,GAAA;IAAAC,KAAA,EAKZ,SAAAC,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAC,OAAA;QAAAC,KAAA;MACP,IAAMC,KAAK,GAGMnB,
|
|
1
|
+
{"version":3,"file":"Hint.js","names":["React","createComponent","Component","Root","sstyled","Box","keyboardFocusEnhance","addonTextChildren","Text","style","_sstyled","insert","RootHint","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_ref","asProps","_ref4","SHint","_this$asProps","styles","Children","addonLeft","addonRight","createElement","cn","_objectSpread","_assignProps","Hint","Addon","tag","_defineProperty","props","_ref2","arguments[0]","_ref5","SAddon","_assignProps2","HintText","_ref3","_ref6","SText","_assignProps3"],"sources":["../../src/Hint.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport addonTextChildren from '@semcore/utils/lib/addonTextChildren';\n\nimport Text from './Text';\n\nimport style from './style/hint.shadow.css';\n\nclass RootHint extends Component {\n static displayName = 'Hint';\n static style = style;\n static enhance = [keyboardFocusEnhance()];\n\n render() {\n const SHint = Root;\n const { styles, Children, addonLeft, addonRight } = this.asProps;\n return sstyled(styles)(\n <SHint render={Text} tag=\"abbr\">\n {addonLeft ? <Hint.Addon tag={addonLeft} /> : null}\n {addonTextChildren(Children, Hint.Text, Hint.Addon)}\n {addonRight ? <Hint.Addon tag={addonRight} /> : null}\n </SHint>,\n );\n }\n}\n\nfunction Addon(props) {\n const SAddon = Root;\n const { styles } = props;\n return sstyled(styles)(<SAddon render={Box} tag=\"span\" />);\n}\n\nfunction HintText(props) {\n const SText = Root;\n const { styles } = props;\n return sstyled(styles)(<SText render={Box} tag=\"span\" />);\n}\n\nconst Hint = createComponent(RootHint, {\n Text: HintText,\n Addon,\n});\n\nexport default Hint;\n"],"mappings":";;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,oBAAoB,MAAM,kDAAkD;AACnF,OAAOC,iBAAiB,MAAM,sCAAsC;AAEpE,OAAOC,IAAI,MAAM,QAAQ;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,QAAQ,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,QAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,QAAA;EAAA,SAAAA,SAAA;IAAAK,eAAA,OAAAL,QAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC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,KAAK,CAAhBZ,MAAM;EACd,OAAAe,KAAA,GAAOxC,OAAO,CAACyB,MAAM,CAAC,eAAC7B,KAAA,CAAAiC,aAAA,CAACY,MAAM,EAAAD,KAAA,CAAAV,EAAA,WAAAC,aAAA,KAAAW,aAAA;IAAA,OAAkB;EAAM,GAAAJ,KAAA,IAAG;AAC3D;AAEA,SAASK,QAAQA,CAACN,KAAK,EAAE;EAAA,IAAAO,KAAA,GAAAL,YAAA;IAAAM,KAAA;EACvB,IAAMC,KAAK,GAE2B7C,GAAG;EADzC,IAAQwB,MAAM,GAAKY,KAAK,CAAhBZ,MAAM;EACd,OAAAoB,KAAA,GAAO7C,OAAO,CAACyB,MAAM,CAAC,eAAC7B,KAAA,CAAAiC,aAAA,CAACiB,KAAK,EAAAD,KAAA,CAAAf,EAAA,UAAAC,aAAA,KAAAgB,aAAA;IAAA,OAAkB;EAAM,GAAAH,KAAA,IAAG;AAC1D;AAEA,IAAMX,IAAI,GAAGpC,eAAe,CAACW,QAAQ,EAAE;EACrCJ,IAAI,EAAEuC,QAAQ;EACdT,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,eAAeD,IAAI"}
|
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_13usg_gg_{padding:0;margin:0;list-style-type:none}.___SContent_13usg_gg_{overflow:inherit;text-overflow:inherit}.___SItem_13usg_gg_+.___SItem_13usg_gg_,.___SList_13usg_gg_ .___SList_13usg_gg_{margin-top:var(--intergalactic-spacing-2x, 8px)}.___SItem_13usg_gg_{display:flex}.___SMarker_13usg_gg_{margin-right:calc(var(--intergalactic-spacing-2x, 8px) + var(--intergalactic-spacing-05x, 2px));color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "13usg_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SList": "___SList_13usg_gg_",
|
|
17
|
+
"__SContent": "___SContent_13usg_gg_",
|
|
18
|
+
"__SItem": "___SItem_13usg_gg_",
|
|
19
|
+
"__SMarker": "___SMarker_13usg_gg_"
|
|
20
20
|
});
|
|
21
21
|
var List = /*#__PURE__*/function (_Component) {
|
|
22
22
|
_inherits(List, _Component);
|
package/lib/es6/List.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["React","createComponent","Component","Root","sstyled","isNode","Text","style","_sstyled","insert","List","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getItemProps","marker","asProps","render","_ref","_ref3","SList","styles","createElement","cn","_objectSpread","_assignProps","_defineProperty","Item","props","_ref2","arguments[0]","_ref4","SItem","children","markerNode","SMarker","SContent","_assignProps2"],"sources":["../../src/List.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport Text from './Text';\n\nimport style from './style/list.shadow.css';\n\nclass List extends Component {\n static displayName = 'List';\n static style = style;\n static defaultProps = {\n marker: '•',\n };\n\n getItemProps() {\n const { marker } = this.asProps;\n return {\n marker,\n };\n }\n\n render() {\n const SList = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SList render={Text} tag=\"ul\" role=\"list\" />);\n }\n}\n\nfunction Item(props) {\n const SItem = Root;\n const { styles, children, marker: markerNode } = props;\n const SMarker = 'span';\n const SContent = 'div';\n\n return sstyled(styles)(\n <SItem render={Text} tag=\"li\" role=\"listitem\">\n {isNode(markerNode) && <SMarker aria-hidden=\"true\">{markerNode}</SMarker>}\n <SContent>{children}</SContent>\n </SItem>,\n );\n}\n\nexport default createComponent(List, { Item });\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,OAAOC,MAAM,MAAM,2BAA2B;AAE9C,OAAOC,IAAI,MAAM,QAAQ;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,IAAI,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA;EAAA,SAAAA,KAAA;IAAAK,eAAA,OAAAL,IAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,IAAA;IAAAS,GAAA;IAAAC,KAAA,EAOR,SAAAC,aAAA,EAAe;MACb,IAAQC,MAAM,GAAK,IAAI,CAACC,OAAO,CAAvBD,MAAM;MACd,OAAO;QACLA,MAAM,EAANA;MACF,CAAC;IACH;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAI,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAF,OAAA;QAAAG,KAAA;MACP,IAAMC,KAAK,GAE2BrB,
|
|
1
|
+
{"version":3,"file":"List.js","names":["React","createComponent","Component","Root","sstyled","isNode","Text","style","_sstyled","insert","List","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getItemProps","marker","asProps","render","_ref","_ref3","SList","styles","createElement","cn","_objectSpread","_assignProps","_defineProperty","Item","props","_ref2","arguments[0]","_ref4","SItem","children","markerNode","SMarker","SContent","_assignProps2"],"sources":["../../src/List.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport isNode from '@semcore/utils/lib/isNode';\n\nimport Text from './Text';\n\nimport style from './style/list.shadow.css';\n\nclass List extends Component {\n static displayName = 'List';\n static style = style;\n static defaultProps = {\n marker: '•',\n };\n\n getItemProps() {\n const { marker } = this.asProps;\n return {\n marker,\n };\n }\n\n render() {\n const SList = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SList render={Text} tag=\"ul\" role=\"list\" />);\n }\n}\n\nfunction Item(props) {\n const SItem = Root;\n const { styles, children, marker: markerNode } = props;\n const SMarker = 'span';\n const SContent = 'div';\n\n return sstyled(styles)(\n <SItem render={Text} tag=\"li\" role=\"listitem\">\n {isNode(markerNode) && <SMarker aria-hidden=\"true\">{markerNode}</SMarker>}\n <SContent>{children}</SContent>\n </SItem>,\n );\n}\n\nexport default createComponent(List, { Item });\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,OAAOC,MAAM,MAAM,2BAA2B;AAE9C,OAAOC,IAAI,MAAM,QAAQ;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAIpBC,IAAI,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA;EAAA,SAAAA,KAAA;IAAAK,eAAA,OAAAL,IAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,IAAA;IAAAS,GAAA;IAAAC,KAAA,EAOR,SAAAC,aAAA,EAAe;MACb,IAAQC,MAAM,GAAK,IAAI,CAACC,OAAO,CAAvBD,MAAM;MACd,OAAO;QACLA,MAAM,EAANA;MACF,CAAC;IACH;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SA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AAA,CAAA6B,aAAA,CAACc,QAAQ,EAAAL,KAAA,CAAAR,EAAA,kBAAEU,QAAQ,CAAY,CACzB;AAEZ;AAEA,eAAevC,eAAe,CAACS,IAAI,EAAE;EAAEwB,IAAI,EAAJA;AAAK,CAAC,CAAC"}
|
package/lib/es6/Text.js
CHANGED
|
@@ -6,32 +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
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
9
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SText_uwx0t_gg_{padding:0;margin:0}.___SText_uwx0t_gg_._size_100_uwx0t_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SText_uwx0t_gg_._size_200_uwx0t_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SText_uwx0t_gg_._size_300_uwx0t_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SText_uwx0t_gg_._size_400_uwx0t_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SText_uwx0t_gg_._size_500_uwx0t_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SText_uwx0t_gg_._size_600_uwx0t_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SText_uwx0t_gg_._size_700_uwx0t_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SText_uwx0t_gg_._size_800_uwx0t_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}.___SText_uwx0t_gg_.__noWrap_uwx0t_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___SText_uwx0t_gg_.__medium_uwx0t_gg_{font-weight:var(--intergalactic-medium, 500)}.___SText_uwx0t_gg_.__bold_uwx0t_gg_{font-weight:var(--intergalactic-bold, 700)}.___SText_uwx0t_gg_.__italic_uwx0t_gg_{font-style:italic}.___SText_uwx0t_gg_.__uppercase_uwx0t_gg_{text-transform:uppercase}.___SText_uwx0t_gg_.__lowercase_uwx0t_gg_{text-transform:lowercase}.___SText_uwx0t_gg_.__capitalize_uwx0t_gg_{text-transform:capitalize}.___SText_uwx0t_gg_.__decoration_uwx0t_gg_{-webkit-text-decoration:var(--decoration_uwx0t);text-decoration:var(--decoration_uwx0t)}.___SText_uwx0t_gg_.__color_uwx0t_gg_{color:var(--color_uwx0t)}.___SText_uwx0t_gg_.__fontSize_uwx0t_gg_{font-size:var(--fontSize_uwx0t)}.___SText_uwx0t_gg_.__lineHeight_uwx0t_gg_{line-height:var(--lineHeight_uwx0t)}.___SText_uwx0t_gg_.__fontWeight_uwx0t_gg_{font-weight:var(--fontWeight_uwx0t)}.___SText_uwx0t_gg_.__textAlign_uwx0t_gg_{text-align:var(--textAlign_uwx0t)}" /*__inner_css_end__*/, "uwx0t_gg_") /*__reshadow_css_end__*/, {
|
|
10
|
+
"__SText": "___SText_uwx0t_gg_",
|
|
11
|
+
"_size_100": "_size_100_uwx0t_gg_",
|
|
12
|
+
"_size_200": "_size_200_uwx0t_gg_",
|
|
13
|
+
"_size_300": "_size_300_uwx0t_gg_",
|
|
14
|
+
"_size_400": "_size_400_uwx0t_gg_",
|
|
15
|
+
"_size_500": "_size_500_uwx0t_gg_",
|
|
16
|
+
"_size_600": "_size_600_uwx0t_gg_",
|
|
17
|
+
"_size_700": "_size_700_uwx0t_gg_",
|
|
18
|
+
"_size_800": "_size_800_uwx0t_gg_",
|
|
19
|
+
"_noWrap": "__noWrap_uwx0t_gg_",
|
|
20
|
+
"_medium": "__medium_uwx0t_gg_",
|
|
21
|
+
"_bold": "__bold_uwx0t_gg_",
|
|
22
|
+
"_italic": "__italic_uwx0t_gg_",
|
|
23
|
+
"_uppercase": "__uppercase_uwx0t_gg_",
|
|
24
|
+
"_lowercase": "__lowercase_uwx0t_gg_",
|
|
25
|
+
"_capitalize": "__capitalize_uwx0t_gg_",
|
|
26
|
+
"_decoration": "__decoration_uwx0t_gg_",
|
|
27
|
+
"--decoration": "--decoration_uwx0t",
|
|
28
|
+
"_color": "__color_uwx0t_gg_",
|
|
29
|
+
"--color": "--color_uwx0t",
|
|
30
|
+
"_fontSize": "__fontSize_uwx0t_gg_",
|
|
31
|
+
"--fontSize": "--fontSize_uwx0t",
|
|
32
|
+
"_lineHeight": "__lineHeight_uwx0t_gg_",
|
|
33
|
+
"--lineHeight": "--lineHeight_uwx0t",
|
|
34
|
+
"_fontWeight": "__fontWeight_uwx0t_gg_",
|
|
35
|
+
"--fontWeight": "--fontWeight_uwx0t",
|
|
36
|
+
"_textAlign": "__textAlign_uwx0t_gg_",
|
|
37
|
+
"--textAlign": "--textAlign_uwx0t"
|
|
35
38
|
});
|
|
36
39
|
function getTextDecoration(underline, lineThrough) {
|
|
37
40
|
if (underline) {
|
package/lib/es6/Text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["React","createBaseComponent","Root","sstyled","Box","resolveColor","styles","_sstyled","insert","getTextDecoration","underline","lineThrough","Text","props","ref","_ref","arguments[0]","_ref2","SText","color","textDecoration","createElement","cn","_objectSpread","_assignProps","displayName"],"sources":["../../src/Text.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport styles from './style/text.shadow.css';\n\nfunction getTextDecoration(underline, lineThrough) {\n if (underline) {\n return 'underline';\n }\n\n if (lineThrough) {\n return 'line-through';\n }\n}\n\nfunction Text(props, ref) {\n const SText = Root;\n const { color, underline, lineThrough } = props;\n const textDecoration = getTextDecoration(underline, lineThrough);\n\n return sstyled(styles)(\n <SText\n render={Box}\n tag=\"span\"\n data-ui-name=\"Text\"\n ref={ref}\n use:decoration={textDecoration}\n use:color={resolveColor(color)}\n />,\n );\n}\n\nText.displayName = 'Text';\n\nexport default createBaseComponent(Text);\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAClE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,YAAY,MAAM,0BAA0B;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpD,SAASC,iBAAiBA,CAACC,SAAS,EAAEC,WAAW,EAAE;EACjD,IAAID,SAAS,EAAE;IACb,OAAO,WAAW;EACpB;EAEA,IAAIC,WAAW,EAAE;IACf,OAAO,cAAc;EACvB;AACF;AAEA,SAASC,IAAIA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACxB,IAAMC,KAAK,GAMCd,
|
|
1
|
+
{"version":3,"file":"Text.js","names":["React","createBaseComponent","Root","sstyled","Box","resolveColor","styles","_sstyled","insert","getTextDecoration","underline","lineThrough","Text","props","ref","_ref","arguments[0]","_ref2","SText","color","textDecoration","createElement","cn","_objectSpread","_assignProps","displayName"],"sources":["../../src/Text.jsx"],"sourcesContent":["import React from 'react';\nimport { createBaseComponent, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport styles from './style/text.shadow.css';\n\nfunction getTextDecoration(underline, lineThrough) {\n if (underline) {\n return 'underline';\n }\n\n if (lineThrough) {\n return 'line-through';\n }\n}\n\nfunction Text(props, ref) {\n const SText = Root;\n const { color, underline, lineThrough } = props;\n const textDecoration = getTextDecoration(underline, lineThrough);\n\n return sstyled(styles)(\n <SText\n render={Box}\n tag=\"span\"\n data-ui-name=\"Text\"\n ref={ref}\n use:decoration={textDecoration}\n use:color={resolveColor(color)}\n />,\n );\n}\n\nText.displayName = 'Text';\n\nexport default createBaseComponent(Text);\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAClE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,YAAY,MAAM,0BAA0B;AAAC;AAAA,IAAAC,MAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIpD,SAASC,iBAAiBA,CAACC,SAAS,EAAEC,WAAW,EAAE;EACjD,IAAID,SAAS,EAAE;IACb,OAAO,WAAW;EACpB;EAEA,IAAIC,WAAW,EAAE;IACf,OAAO,cAAc;EACvB;AACF;AAEA,SAASC,IAAIA,CAACC,KAAK,EAAEC,GAAG,EAAE;EAAA,IAAAC,IAAA,GAAAC,YAAA;IAAAC,KAAA;EACxB,IAAMC,KAAK,GAMCd,GAAG;EALf,IAAQe,KAAK,GAA6BN,KAAK,CAAvCM,KAAK;IAAET,SAAS,GAAkBG,KAAK,CAAhCH,SAAS;IAAEC,WAAW,GAAKE,KAAK,CAArBF,WAAW;EACrC,IAAMS,cAAc,GAAGX,iBAAiB,CAACC,SAAS,EAAEC,WAAW,CAAC;EAEhE,OAAAM,KAAA,GAAOd,OAAO,CAACG,MAAM,CAAC,eACpBN,KAAA,CAAAqB,aAAA,CAACH,KAAK,EAAAD,KAAA,CAAAK,EAAA,UAAAC,aAAA,KAAAC,YAAA;IAAA,OAEA,MAAM;IAAA,gBACG,MAAM;IAAA,OACdV,GAAG;IAAA,kBACQM,cAAc;IAAA,aACnBf,YAAY,CAACc,KAAK;EAAC,GAAAJ,IAAA,IAC9B;AAEN;AAEAH,IAAI,CAACa,WAAW,GAAG,MAAM;AAEzB,eAAexB,mBAAmB,CAACW,IAAI,CAAC"}
|
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, { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface ITextProps extends IBoxProps {\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 /** 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\nexport interface IListProps extends ITextProps {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n}\n\nexport interface IListItemProps extends ITextProps {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n}\n\nexport interface IListContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IHintProps extends ITextProps {\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\nexport interface IBlockquoteProps extends IBoxProps {\n /** Source of the quote */\n author?: React.ReactNode;\n}\n\ndeclare const Hint: ((props: CProps<IHintProps>) => ReturnEl) & {\n Addon: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Text: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\ndeclare const List: ((props: CProps<IListProps, IListContext>) => ReturnEl) & {\n Item: <T>(props: IListItemProps & T) => ReturnEl;\n};\n\ndeclare const Text: <T>(props: ITextProps & T) => ReturnEl;\n\ndeclare const Blockquote: <T>(props: IBlockquoteProps & T) => ReturnEl;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\n\nimport { Property } from 'csstype';\nimport { Box, IBoxProps } from '@semcore/flex-box';\n\nexport interface ITextProps extends IBoxProps {\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\nexport interface IListProps extends ITextProps {\n /** Marker of the entire list\n * @default • */\n marker?: React.ReactNode;\n}\n\nexport interface IListItemProps extends ITextProps {\n /** Individual marker of a list item */\n marker?: React.ReactNode;\n}\n\nexport interface IListContext {\n getItemProps: PropGetterFn;\n}\n\nexport interface IHintProps extends ITextProps {\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\nexport interface IBlockquoteProps extends IBoxProps {\n /** Source of the quote */\n author?: React.ReactNode;\n}\n\ndeclare const Hint: ((props: CProps<IHintProps>) => ReturnEl) & {\n Addon: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n Text: <T>(props: ComponentProps<typeof Box> & T) => ReturnEl;\n};\n\ndeclare const List: ((props: CProps<IListProps, IListContext>) => ReturnEl) & {\n Item: <T>(props: IListItemProps & T) => ReturnEl;\n};\n\ndeclare const Text: <T>(props: ITextProps & T) => ReturnEl;\n\ndeclare const Blockquote: <T>(props: IBlockquoteProps & T) => ReturnEl;\n\nexport { Text, List, Hint, Blockquote };\n"],"mappings":""}
|
|
@@ -61,6 +61,18 @@ SText[italic] {
|
|
|
61
61
|
font-style: italic;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
SText[uppercase] {
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
SText[lowercase] {
|
|
69
|
+
text-transform: lowercase;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
SText[capitalize] {
|
|
73
|
+
text-transform: capitalize;
|
|
74
|
+
}
|
|
75
|
+
|
|
64
76
|
SText[decoration] {
|
|
65
77
|
text-decoration: var(--decoration);
|
|
66
78
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -19,6 +19,12 @@ export interface ITextProps extends IBoxProps {
|
|
|
19
19
|
underline?: boolean;
|
|
20
20
|
/** Strikethrough text */
|
|
21
21
|
lineThrough?: boolean;
|
|
22
|
+
/** Uppercase text */
|
|
23
|
+
uppercase?: boolean;
|
|
24
|
+
/** Lowercase text */
|
|
25
|
+
lowercase?: boolean;
|
|
26
|
+
/** Capitalized text */
|
|
27
|
+
capitalize?: boolean;
|
|
22
28
|
/** Text color **/
|
|
23
29
|
color?: string;
|
|
24
30
|
/** Custom `font-size` */
|