@ornikar/kitt-universal 32.7.0 → 32.8.1-canary.9789a78a274b9d336c93fc42d4a6561d0d61ff73.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 +30 -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/definitions/story-components/StoryDecorator.d.ts +1 -1
- package/dist/definitions/story-components/StoryDecorator.d.ts.map +1 -1
- package/dist/definitions/utils/storybook/ChromaticReducedMotionDecorator.d.ts +1 -1
- package/dist/definitions/utils/storybook/ChromaticReducedMotionDecorator.d.ts.map +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts +1 -1
- package/dist/definitions/utils/storybook/KittThemeDecorator.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +106 -66
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +106 -66
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +98 -55
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.js +105 -61
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +96 -54
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.mjs +102 -59
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +108 -62
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +115 -68
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +4 -4
- package/translations/fr-FR.json +3 -1
|
@@ -23,7 +23,7 @@ const Svg = require('react-native-svg');
|
|
|
23
23
|
const picker$1 = require('@react-native-picker/picker');
|
|
24
24
|
const expoLinearGradient = require('expo-linear-gradient');
|
|
25
25
|
const reactNative$1 = require('@floating-ui/react-native');
|
|
26
|
-
const
|
|
26
|
+
const previewApi = require('@storybook/preview-api');
|
|
27
27
|
const isChromatic = require('chromatic/isChromatic');
|
|
28
28
|
|
|
29
29
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
@@ -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",
|
|
@@ -13224,7 +13317,7 @@ function StoryContainer({
|
|
|
13224
13317
|
});
|
|
13225
13318
|
}
|
|
13226
13319
|
|
|
13227
|
-
const StoryDecorator =
|
|
13320
|
+
const StoryDecorator = previewApi.makeDecorator({
|
|
13228
13321
|
name: 'StoryDecorator',
|
|
13229
13322
|
parameterName: 'storyDecorator',
|
|
13230
13323
|
wrapper: (storyFn, context) => {
|
|
@@ -14178,58 +14271,7 @@ function TypographyEmoji({
|
|
|
14178
14271
|
});
|
|
14179
14272
|
}
|
|
14180
14273
|
|
|
14181
|
-
|
|
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
|
-
const ChromaticReducedMotionDecorator = addons.makeDecorator({
|
|
14274
|
+
const ChromaticReducedMotionDecorator = previewApi.makeDecorator({
|
|
14233
14275
|
name: 'ChromaticReducedMotionDecorator',
|
|
14234
14276
|
parameterName: 'chromaticReducedMotion',
|
|
14235
14277
|
wrapper: (storyFn, context) => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -14252,7 +14294,7 @@ function KittThemeProvider({
|
|
|
14252
14294
|
children: children
|
|
14253
14295
|
});
|
|
14254
14296
|
}
|
|
14255
|
-
const KittThemeDecorator =
|
|
14297
|
+
const KittThemeDecorator = previewApi.makeDecorator({
|
|
14256
14298
|
name: 'ThemeDecorator',
|
|
14257
14299
|
parameterName: 'theme',
|
|
14258
14300
|
wrapper: (storyFn, context, {
|
|
@@ -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;
|