@ornikar/kitt-universal 7.5.0 → 7.7.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/dist/definitions/Picker/Picker.d.ts +17 -0
- package/dist/definitions/Picker/Picker.d.ts.map +1 -0
- package/dist/definitions/Picker/Picker.web.d.ts +3 -0
- package/dist/definitions/Picker/Picker.web.d.ts.map +1 -0
- package/dist/definitions/Picker/PickerItem.d.ts +9 -0
- package/dist/definitions/Picker/PickerItem.d.ts.map +1 -0
- package/dist/definitions/TimePicker/useTimePicker.d.ts +2 -2
- package/dist/definitions/TimePicker/useTimePicker.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts +1 -1
- package/dist/definitions/forms/InputText/InputTextContainer.web.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/themes/default.d.ts +1 -0
- package/dist/definitions/themes/default.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/picker.d.ts +21 -0
- package/dist/definitions/themes/late-ocean/picker.d.ts.map +1 -0
- package/dist/definitions/typography/Typography.d.ts +3 -2
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +175 -37
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +175 -37
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +175 -37
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +74 -38
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +187 -68
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.js +51 -25
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +26 -0
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +26 -0
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +26 -0
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +27 -0
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +25 -0
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +25 -0
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +8 -3
- package/translations/fr-FR.json +2 -1
|
@@ -124,7 +124,12 @@ function getTypographyTypeConfig(type, theme) {
|
|
|
124
124
|
const StyledTypography = /*#__PURE__*/styled__default(BabelPluginStyledComponentsReactNative.Text).withConfig({
|
|
125
125
|
displayName: "Typography__StyledTypography",
|
|
126
126
|
componentId: "kitt-universal__sc-1dz700q-0"
|
|
127
|
-
})(["", " ", ""], ({
|
|
127
|
+
})(["", ";", " ", ""], ({
|
|
128
|
+
$textAlign
|
|
129
|
+
}) => {
|
|
130
|
+
if (!$textAlign) return undefined;
|
|
131
|
+
return styled.css(["text-align:", ";"], $textAlign);
|
|
132
|
+
}, ({
|
|
128
133
|
theme,
|
|
129
134
|
$isHeader,
|
|
130
135
|
$typeForCurrentWindowSize,
|
|
@@ -135,18 +140,7 @@ const StyledTypography = /*#__PURE__*/styled__default(BabelPluginStyledComponent
|
|
|
135
140
|
bodies
|
|
136
141
|
} = theme.kitt.typography.types;
|
|
137
142
|
const typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
138
|
-
return
|
|
139
|
-
/* type */
|
|
140
|
-
${!$typeForCurrentWindowSize ? '' : `
|
|
141
|
-
font-family: ${$isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant]};
|
|
142
|
-
font-size: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize}px;
|
|
143
|
-
line-height: ${$isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight}px;
|
|
144
|
-
`}
|
|
145
|
-
|
|
146
|
-
/* variant */
|
|
147
|
-
font-weight: ${$isHeader ? headers.fontWeight : bodies.fontWeight[$variant]};
|
|
148
|
-
font-style: ${$isHeader ? headers.fontStyle : bodies.fontStyle[$variant]};
|
|
149
|
-
`;
|
|
143
|
+
return styled.css(["", " font-weight:", ";font-style:", ";"], !$typeForCurrentWindowSize ? '' : styled.css(["font-family:", ";font-size:", "px;line-height:", "px;"], $isHeader ? headers.fontFamily[$variant] : bodies.fontFamily[$variant], $isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].fontSize, $isHeader ? headers.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight : bodies.configs[$typeForCurrentWindowSize][typeConfigKey].lineHeight), $isHeader ? headers.fontWeight : bodies.fontWeight[$variant], $isHeader ? headers.fontStyle : bodies.fontStyle[$variant]);
|
|
150
144
|
}, ({
|
|
151
145
|
theme,
|
|
152
146
|
$color
|
|
@@ -185,6 +179,7 @@ function Typography({
|
|
|
185
179
|
large,
|
|
186
180
|
variant,
|
|
187
181
|
color,
|
|
182
|
+
textAlign,
|
|
188
183
|
...otherProps
|
|
189
184
|
}) {
|
|
190
185
|
const isHeaderTypographyInContext = react.useContext(IsHeaderTypographyContext);
|
|
@@ -199,22 +194,21 @@ function Typography({
|
|
|
199
194
|
const typeForCurrentWindowSize = useTypographyTypeForCurrentWindowSize(baseOrDefaultToBody, small, medium, large);
|
|
200
195
|
const isHeader = isTypographyHeader(typeForCurrentWindowSize, isHeaderTypographyInContext);
|
|
201
196
|
const nonNullableVariant = variant ?? (isHeader ? 'bold' : 'regular');
|
|
202
|
-
const
|
|
203
|
-
value: isHeader,
|
|
204
|
-
children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
|
|
205
|
-
$color: colorOrDefaultToBlack,
|
|
206
|
-
$isHeader: isHeader,
|
|
207
|
-
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
208
|
-
$variant: nonNullableVariant,
|
|
209
|
-
accessibilityRole: accessibilityRole || undefined,
|
|
210
|
-
...otherProps
|
|
211
|
-
})
|
|
212
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, {
|
|
197
|
+
const sharedProps = {
|
|
213
198
|
$color: colorOrDefaultToBlack,
|
|
214
199
|
$isHeader: isHeader,
|
|
215
200
|
$variant: nonNullableVariant,
|
|
216
201
|
accessibilityRole: accessibilityRole || undefined,
|
|
202
|
+
$textAlign: textAlign,
|
|
217
203
|
...otherProps
|
|
204
|
+
};
|
|
205
|
+
const content = baseOrDefaultToBody ? /*#__PURE__*/jsxRuntime.jsx(IsHeaderTypographyContext.Provider, {
|
|
206
|
+
value: isHeader,
|
|
207
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StyledTypography, { ...sharedProps,
|
|
208
|
+
$typeForCurrentWindowSize: typeForCurrentWindowSize,
|
|
209
|
+
...otherProps
|
|
210
|
+
})
|
|
211
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(StyledTypography, { ...sharedProps
|
|
218
212
|
});
|
|
219
213
|
return color ? /*#__PURE__*/jsxRuntime.jsx(TypographyColorContext.Provider, {
|
|
220
214
|
value: color,
|
|
@@ -1358,6 +1352,30 @@ const pageLoader = {
|
|
|
1358
1352
|
}
|
|
1359
1353
|
};
|
|
1360
1354
|
|
|
1355
|
+
const picker = {
|
|
1356
|
+
ios: {
|
|
1357
|
+
default: {
|
|
1358
|
+
fontFamily: typography.types.bodies.fontFamily.regular,
|
|
1359
|
+
...typography.types.bodies.configs.body.baseAndSmall,
|
|
1360
|
+
fontSize: 16,
|
|
1361
|
+
color: typography.colors['black-light']
|
|
1362
|
+
},
|
|
1363
|
+
selected: {
|
|
1364
|
+
color: typography.colors.primary
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
android: {
|
|
1368
|
+
padding: '12px 24px',
|
|
1369
|
+
default: {
|
|
1370
|
+
backgroundColor: colors.transparent
|
|
1371
|
+
},
|
|
1372
|
+
selected: {
|
|
1373
|
+
backgroundColor: colors.primary,
|
|
1374
|
+
color: typography.colors.white
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1361
1379
|
const shadows = {
|
|
1362
1380
|
medium: '0px 10px 20px rgba(41, 48, 51, 0.25)'
|
|
1363
1381
|
};
|
|
@@ -1457,6 +1475,7 @@ const theme = {
|
|
|
1457
1475
|
iconButton,
|
|
1458
1476
|
listItem,
|
|
1459
1477
|
pageLoader,
|
|
1478
|
+
picker,
|
|
1460
1479
|
shadows,
|
|
1461
1480
|
skeleton,
|
|
1462
1481
|
tag,
|
|
@@ -1805,7 +1824,6 @@ const StyledTextInput = /*#__PURE__*/styled__default(BabelPluginStyledComponents
|
|
|
1805
1824
|
theme,
|
|
1806
1825
|
multiline
|
|
1807
1826
|
}) => {
|
|
1808
|
-
if (!multiline && "web" !== 'web') return 0;
|
|
1809
1827
|
const typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
1810
1828
|
return `${theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight}px`;
|
|
1811
1829
|
}, ({
|
|
@@ -3039,6 +3057,13 @@ function PageLoader() {
|
|
|
3039
3057
|
});
|
|
3040
3058
|
}
|
|
3041
3059
|
|
|
3060
|
+
function Picker() {
|
|
3061
|
+
return /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
3062
|
+
base: "body",
|
|
3063
|
+
children: "Picker is not implemented for the web"
|
|
3064
|
+
});
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3042
3067
|
const StyledSkeleton = withTheme( /*#__PURE__*/react$1.styled("div")({
|
|
3043
3068
|
name: "StyledSkeleton",
|
|
3044
3069
|
class: "kitt-u_StyledSkeleton_sc3upcl",
|
|
@@ -3867,6 +3892,7 @@ exports.Modal = Modal;
|
|
|
3867
3892
|
exports.Notification = Notification;
|
|
3868
3893
|
exports.Overlay = Overlay;
|
|
3869
3894
|
exports.PageLoader = PageLoader;
|
|
3895
|
+
exports.Picker = Picker;
|
|
3870
3896
|
exports.Radio = Radio;
|
|
3871
3897
|
exports.Section = DeprecatedSection;
|
|
3872
3898
|
exports.Skeleton = Skeleton;
|