@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.
- package/CHANGELOG.md +9 -0
- package/dist/definitions/ReadMore/ReadMore.d.ts +10 -0
- package/dist/definitions/ReadMore/ReadMore.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +105 -65
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +105 -65
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +94 -51
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +101 -57
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +95 -53
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +101 -58
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +107 -61
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +114 -67
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/translations/fr-FR.json +3 -1
|
@@ -20,6 +20,7 @@ const libphonenumberJs = require('libphonenumber-js');
|
|
|
20
20
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
21
21
|
const Svg = require('react-native-svg');
|
|
22
22
|
const reactDom$1 = require('@floating-ui/react-dom');
|
|
23
|
+
const reactIntl = require('react-intl');
|
|
23
24
|
const expoLinearGradient = require('expo-linear-gradient');
|
|
24
25
|
const addons = require('@storybook/addons');
|
|
25
26
|
const isChromatic = require('chromatic/isChromatic');
|
|
@@ -11906,6 +11907,105 @@ Picker.Option = PickerOption;
|
|
|
11906
11907
|
*/
|
|
11907
11908
|
Picker.UnsafeInternalItem = PickerItem;
|
|
11908
11909
|
|
|
11910
|
+
const styles = {"displayUnderline":"TypographyLinkWebWrapper-module_displayUnderline__KxwMp","displayUnderlineWhenHovered":"TypographyLinkWebWrapper-module_displayUnderlineWhenHovered__5V5Cl"};
|
|
11911
|
+
|
|
11912
|
+
function TypographyLinkWebWrapper({
|
|
11913
|
+
children,
|
|
11914
|
+
hasNoUnderline
|
|
11915
|
+
}) {
|
|
11916
|
+
const className = hasNoUnderline ? `${styles.displayUnderline} ${styles.displayUnderlineWhenHovered}` : styles.displayUnderline;
|
|
11917
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
11918
|
+
className: className,
|
|
11919
|
+
children: children
|
|
11920
|
+
});
|
|
11921
|
+
}
|
|
11922
|
+
|
|
11923
|
+
const TypographyLink = /*#__PURE__*/react.forwardRef(({
|
|
11924
|
+
children,
|
|
11925
|
+
disabled,
|
|
11926
|
+
noUnderline,
|
|
11927
|
+
href,
|
|
11928
|
+
hrefAttrs,
|
|
11929
|
+
onPress,
|
|
11930
|
+
...otherProps
|
|
11931
|
+
}, ref) => {
|
|
11932
|
+
return /*#__PURE__*/jsxRuntime.jsx(TypographyLinkWebWrapper, {
|
|
11933
|
+
hasNoUnderline: noUnderline,
|
|
11934
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
11935
|
+
ref: ref,
|
|
11936
|
+
underline: !noUnderline,
|
|
11937
|
+
color: disabled ? 'black-disabled' : undefined,
|
|
11938
|
+
href: href,
|
|
11939
|
+
hrefAttrs: hrefAttrs,
|
|
11940
|
+
accessibilityRole: "link",
|
|
11941
|
+
dataSet: {
|
|
11942
|
+
// remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
|
|
11943
|
+
'kitt-universal': 'true'
|
|
11944
|
+
},
|
|
11945
|
+
_web: {
|
|
11946
|
+
// @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
|
|
11947
|
+
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
11948
|
+
transitionProperty: 'color',
|
|
11949
|
+
transitionDuration: '0.2s',
|
|
11950
|
+
transitionTimingFunction: 'ease-in-out'
|
|
11951
|
+
}
|
|
11952
|
+
// TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
|
|
11953
|
+
// _active={{
|
|
11954
|
+
// underline: !!noUnderline,
|
|
11955
|
+
// }}
|
|
11956
|
+
// _hover={{
|
|
11957
|
+
// underline: !!noUnderline,
|
|
11958
|
+
// }}
|
|
11959
|
+
,
|
|
11960
|
+
onPress: disabled ? undefined : onPress,
|
|
11961
|
+
...otherProps,
|
|
11962
|
+
children: children
|
|
11963
|
+
})
|
|
11964
|
+
});
|
|
11965
|
+
});
|
|
11966
|
+
|
|
11967
|
+
const messages = reactIntl.defineMessages({
|
|
11968
|
+
seeMore: {
|
|
11969
|
+
id: "shared.components.ReadMore.seeMore"
|
|
11970
|
+
},
|
|
11971
|
+
seeLess: {
|
|
11972
|
+
id: "shared.components.ReadMore.seeLess"
|
|
11973
|
+
}
|
|
11974
|
+
});
|
|
11975
|
+
function ReadMore({
|
|
11976
|
+
lines,
|
|
11977
|
+
children,
|
|
11978
|
+
textColor = 'bumper.content.base.hi',
|
|
11979
|
+
noUnderline = false
|
|
11980
|
+
}) {
|
|
11981
|
+
const [isExpanded, setIsExpanded] = react.useState(false);
|
|
11982
|
+
const nbOfLines = isExpanded ? undefined : lines;
|
|
11983
|
+
const messageProps = isExpanded ? messages.seeLess : messages.seeMore;
|
|
11984
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
11985
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(View, {
|
|
11986
|
+
flexShrink: 1,
|
|
11987
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
11988
|
+
textAlign: "left",
|
|
11989
|
+
numberOfLines: nbOfLines,
|
|
11990
|
+
ellipsizeMode: "tail",
|
|
11991
|
+
children: children
|
|
11992
|
+
})
|
|
11993
|
+
}), lines ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
11994
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyLink, {
|
|
11995
|
+
noUnderline: noUnderline,
|
|
11996
|
+
color: textColor,
|
|
11997
|
+
variant: "bold",
|
|
11998
|
+
onPress: () => {
|
|
11999
|
+
setIsExpanded(prev => !prev);
|
|
12000
|
+
},
|
|
12001
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactIntl.FormattedMessage, {
|
|
12002
|
+
...messageProps
|
|
12003
|
+
})
|
|
12004
|
+
})
|
|
12005
|
+
}) : null]
|
|
12006
|
+
});
|
|
12007
|
+
}
|
|
12008
|
+
|
|
11909
12009
|
const SvgStripesinline = props => /*#__PURE__*/jsxRuntime.jsx("svg", {
|
|
11910
12010
|
viewBox: "0 0 453 71",
|
|
11911
12011
|
fill: "none",
|
|
@@ -13510,63 +13610,6 @@ function TypographyEmoji({
|
|
|
13510
13610
|
});
|
|
13511
13611
|
}
|
|
13512
13612
|
|
|
13513
|
-
const styles = {"displayUnderline":"TypographyLinkWebWrapper-module_displayUnderline__KxwMp","displayUnderlineWhenHovered":"TypographyLinkWebWrapper-module_displayUnderlineWhenHovered__5V5Cl"};
|
|
13514
|
-
|
|
13515
|
-
function TypographyLinkWebWrapper({
|
|
13516
|
-
children,
|
|
13517
|
-
hasNoUnderline
|
|
13518
|
-
}) {
|
|
13519
|
-
const className = hasNoUnderline ? `${styles.displayUnderline} ${styles.displayUnderlineWhenHovered}` : styles.displayUnderline;
|
|
13520
|
-
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
13521
|
-
className: className,
|
|
13522
|
-
children: children
|
|
13523
|
-
});
|
|
13524
|
-
}
|
|
13525
|
-
|
|
13526
|
-
const TypographyLink = /*#__PURE__*/react.forwardRef(({
|
|
13527
|
-
children,
|
|
13528
|
-
disabled,
|
|
13529
|
-
noUnderline,
|
|
13530
|
-
href,
|
|
13531
|
-
hrefAttrs,
|
|
13532
|
-
onPress,
|
|
13533
|
-
...otherProps
|
|
13534
|
-
}, ref) => {
|
|
13535
|
-
return /*#__PURE__*/jsxRuntime.jsx(TypographyLinkWebWrapper, {
|
|
13536
|
-
hasNoUnderline: noUnderline,
|
|
13537
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
13538
|
-
ref: ref,
|
|
13539
|
-
underline: !noUnderline,
|
|
13540
|
-
color: disabled ? 'black-disabled' : undefined,
|
|
13541
|
-
href: href,
|
|
13542
|
-
hrefAttrs: hrefAttrs,
|
|
13543
|
-
accessibilityRole: "link",
|
|
13544
|
-
dataSet: {
|
|
13545
|
-
// remove data-kitt-universal when we delete kitt web. See :global(a) in Link styles.module.css
|
|
13546
|
-
'kitt-universal': 'true'
|
|
13547
|
-
},
|
|
13548
|
-
_web: {
|
|
13549
|
-
// @ts-expect-error: This is only used on web where 'not-allowed' and 'pointer' are valid cursor values
|
|
13550
|
-
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
13551
|
-
transitionProperty: 'color',
|
|
13552
|
-
transitionDuration: '0.2s',
|
|
13553
|
-
transitionTimingFunction: 'ease-in-out'
|
|
13554
|
-
}
|
|
13555
|
-
// TODO[native-base@>=3.4.19] this currently does not work. Retest when updating native-base.
|
|
13556
|
-
// _active={{
|
|
13557
|
-
// underline: !!noUnderline,
|
|
13558
|
-
// }}
|
|
13559
|
-
// _hover={{
|
|
13560
|
-
// underline: !!noUnderline,
|
|
13561
|
-
// }}
|
|
13562
|
-
,
|
|
13563
|
-
onPress: disabled ? undefined : onPress,
|
|
13564
|
-
...otherProps,
|
|
13565
|
-
children: children
|
|
13566
|
-
})
|
|
13567
|
-
});
|
|
13568
|
-
});
|
|
13569
|
-
|
|
13570
13613
|
const ChromaticReducedMotionDecorator = addons.makeDecorator({
|
|
13571
13614
|
name: 'ChromaticReducedMotionDecorator',
|
|
13572
13615
|
parameterName: 'chromaticReducedMotion',
|
|
@@ -14010,6 +14053,7 @@ exports.Picker = Picker;
|
|
|
14010
14053
|
exports.Pressable = Pressable;
|
|
14011
14054
|
exports.Radio = RadioWithRef;
|
|
14012
14055
|
exports.RadioButtonGroup = RadioButtonGroup;
|
|
14056
|
+
exports.ReadMore = ReadMore;
|
|
14013
14057
|
exports.ScrollView = ScrollView;
|
|
14014
14058
|
exports.Section = DeprecatedSection;
|
|
14015
14059
|
exports.SectionList = SectionList;
|