@ornikar/kitt-universal 32.7.0 → 32.8.0

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.
@@ -12528,6 +12528,99 @@ Picker.Option = PickerOption;
12528
12528
  */
12529
12529
  Picker.UnsafeInternalItem = PickerItem;
12530
12530
 
12531
+ function TypographyLinkWebWrapper({
12532
+ children,
12533
+ ...props
12534
+ }) {
12535
+ return children;
12536
+ }
12537
+
12538
+ const TypographyLink = /*#__PURE__*/React.forwardRef(({
12539
+ children,
12540
+ disabled,
12541
+ noUnderline,
12542
+ href,
12543
+ hrefAttrs,
12544
+ onPress,
12545
+ ...otherProps
12546
+ }, ref) => {
12547
+ return /*#__PURE__*/jsxRuntime.jsx(TypographyLinkWebWrapper, {
12548
+ hasNoUnderline: noUnderline,
12549
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
12550
+ ref: ref,
12551
+ underline: !noUnderline,
12552
+ color: disabled ? 'black-disabled' : undefined,
12553
+ href: href,
12554
+ hrefAttrs: hrefAttrs,
12555
+ accessibilityRole: "link",
12556
+ dataSet: {
12557
+ // remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
12558
+ 'kitt-universal': 'true'
12559
+ },
12560
+ _web: {
12561
+ // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
12562
+ cursor: disabled ? 'not-allowed' : 'pointer',
12563
+ transitionProperty: 'color',
12564
+ transitionDuration: '0.2s',
12565
+ transitionTimingFunction: 'ease-in-out'
12566
+ }
12567
+ // TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
12568
+ // _active={{
12569
+ // underline: !!noUnderline,
12570
+ // }}
12571
+ // _hover={{
12572
+ // underline: !!noUnderline,
12573
+ // }}
12574
+ ,
12575
+ onPress: disabled ? undefined : onPress,
12576
+ ...otherProps,
12577
+ children: children
12578
+ })
12579
+ });
12580
+ });
12581
+
12582
+ const messages = reactIntl.defineMessages({
12583
+ seeMore: {
12584
+ id: "shared.components.ReadMore.seeMore"
12585
+ },
12586
+ seeLess: {
12587
+ id: "shared.components.ReadMore.seeLess"
12588
+ }
12589
+ });
12590
+ function ReadMore({
12591
+ lines,
12592
+ children,
12593
+ textColor = 'bumper.content.base.hi',
12594
+ noUnderline = false
12595
+ }) {
12596
+ const [isExpanded, setIsExpanded] = React.useState(false);
12597
+ const nbOfLines = isExpanded ? undefined : lines;
12598
+ const messageProps = isExpanded ? messages.seeLess : messages.seeMore;
12599
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
12600
+ children: [/*#__PURE__*/jsxRuntime.jsx(View, {
12601
+ flexShrink: 1,
12602
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
12603
+ textAlign: "left",
12604
+ numberOfLines: nbOfLines,
12605
+ ellipsizeMode: "tail",
12606
+ children: children
12607
+ })
12608
+ }), lines ? /*#__PURE__*/jsxRuntime.jsx(View, {
12609
+ children: /*#__PURE__*/jsxRuntime.jsx(TypographyLink, {
12610
+ noUnderline: noUnderline,
12611
+ color: textColor,
12612
+ variant: "bold",
12613
+ onPress: () => {
12614
+ setIsExpanded(prev => !prev);
12615
+ },
12616
+ children: /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
12617
+ ...messageProps
12618
+ })
12619
+ })
12620
+ }) : null]
12621
+ });
12622
+ }
12623
+
12531
12624
  const SvgStripesinline = props => /*#__PURE__*/jsxRuntime.jsx("svg", {
12532
12625
  viewBox: "0 0 453 71",
12533
12626
  fill: "none",
@@ -14178,57 +14271,6 @@ function TypographyEmoji({
14178
14271
  });
14179
14272
  }
14180
14273
 
14181
- function TypographyLinkWebWrapper({
14182
- children,
14183
- ...props
14184
- }) {
14185
- return children;
14186
- }
14187
-
14188
- const TypographyLink = /*#__PURE__*/React.forwardRef(({
14189
- children,
14190
- disabled,
14191
- noUnderline,
14192
- href,
14193
- hrefAttrs,
14194
- onPress,
14195
- ...otherProps
14196
- }, ref) => {
14197
- return /*#__PURE__*/jsxRuntime.jsx(TypographyLinkWebWrapper, {
14198
- hasNoUnderline: noUnderline,
14199
- children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
14200
- ref: ref,
14201
- underline: !noUnderline,
14202
- color: disabled ? 'black-disabled' : undefined,
14203
- href: href,
14204
- hrefAttrs: hrefAttrs,
14205
- accessibilityRole: "link",
14206
- dataSet: {
14207
- // remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
14208
- 'kitt-universal': 'true'
14209
- },
14210
- _web: {
14211
- // @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
14212
- cursor: disabled ? 'not-allowed' : 'pointer',
14213
- transitionProperty: 'color',
14214
- transitionDuration: '0.2s',
14215
- transitionTimingFunction: 'ease-in-out'
14216
- }
14217
- // TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
14218
- // _active={{
14219
- // underline: !!noUnderline,
14220
- // }}
14221
- // _hover={{
14222
- // underline: !!noUnderline,
14223
- // }}
14224
- ,
14225
- onPress: disabled ? undefined : onPress,
14226
- ...otherProps,
14227
- children: children
14228
- })
14229
- });
14230
- });
14231
-
14232
14274
  const ChromaticReducedMotionDecorator = addons.makeDecorator({
14233
14275
  name: 'ChromaticReducedMotionDecorator',
14234
14276
  parameterName: 'chromaticReducedMotion',
@@ -14673,6 +14715,7 @@ exports.Picker = Picker;
14673
14715
  exports.Pressable = Pressable;
14674
14716
  exports.Radio = RadioWithRef;
14675
14717
  exports.RadioButtonGroup = RadioButtonGroup;
14718
+ exports.ReadMore = ReadMore;
14676
14719
  exports.ScrollView = ScrollView;
14677
14720
  exports.Section = DeprecatedSection;
14678
14721
  exports.SectionList = SectionList;