@castui/cast-ui 0.5.0 → 1.1.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/README.md +1 -1
- package/dist/components/Alert/Alert.d.ts +14 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -0
- package/dist/components/Alert/Alert.js +57 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppBar/AppBar.d.ts +11 -0
- package/dist/components/AppBar/AppBar.d.ts.map +1 -0
- package/dist/components/AppBar/AppBar.js +32 -0
- package/dist/components/AppBar/AppBar.js.map +1 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +18 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete/Autocomplete.js +72 -0
- package/dist/components/Autocomplete/Autocomplete.js.map +1 -0
- package/dist/components/Backdrop/Backdrop.d.ts +8 -0
- package/dist/components/Backdrop/Backdrop.d.ts.map +1 -0
- package/dist/components/Backdrop/Backdrop.js +25 -0
- package/dist/components/Backdrop/Backdrop.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +11 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/Badge.js +42 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Card/Card.js +3 -3
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +39 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Chip/Chip.d.ts +13 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +29 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +15 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.js +41 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/Divider/Divider.d.ts.map +1 -0
- package/dist/components/Divider/Divider.js +25 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/FAB/FAB.d.ts +14 -0
- package/dist/components/FAB/FAB.d.ts.map +1 -0
- package/dist/components/FAB/FAB.js +55 -0
- package/dist/components/FAB/FAB.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +11 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +29 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Link/Link.d.ts +11 -0
- package/dist/components/Link/Link.d.ts.map +1 -0
- package/dist/components/Link/Link.js +26 -0
- package/dist/components/Link/Link.js.map +1 -0
- package/dist/components/Select/Select.d.ts +18 -0
- package/dist/components/Select/Select.d.ts.map +1 -0
- package/dist/components/Select/Select.js +72 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +11 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +27 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +14 -0
- package/dist/components/Snackbar/Snackbar.d.ts.map +1 -0
- package/dist/components/Snackbar/Snackbar.js +40 -0
- package/dist/components/Snackbar/Snackbar.js.map +1 -0
- package/dist/components/SpeedDial/SpeedDial.d.ts +18 -0
- package/dist/components/SpeedDial/SpeedDial.d.ts.map +1 -0
- package/dist/components/SpeedDial/SpeedDial.js +55 -0
- package/dist/components/SpeedDial/SpeedDial.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +12 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +39 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Table/Table.d.ts +15 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/Table.js +62 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/TextField/TextField.d.ts +19 -0
- package/dist/components/TextField/TextField.d.ts.map +1 -0
- package/dist/components/TextField/TextField.js +60 -0
- package/dist/components/TextField/TextField.js.map +1 -0
- package/dist/components/Typography/Typography.d.ts +21 -0
- package/dist/components/Typography/Typography.d.ts.map +1 -0
- package/dist/components/Typography/Typography.js +42 -0
- package/dist/components/Typography/Typography.js.map +1 -0
- package/dist/default.reference.json +54 -7
- package/dist/index.d.ts +41 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/theme/types.d.ts +49 -2
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/tokens/generated/default.d.ts.map +1 -1
- package/dist/tokens/generated/default.js +51 -4
- package/dist/tokens/generated/default.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { View, Text, Pressable, } from 'react-native';
|
|
4
|
+
import { useTheme, resolveFont } from '../../theme';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Component
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
export function Table({ columns, data, onRowPress }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const tb = theme.component.table;
|
|
11
|
+
const [hoveredRow, setHoveredRow] = useState(null);
|
|
12
|
+
// --- styles ----------------------------------------------------------------
|
|
13
|
+
const tableStyle = {
|
|
14
|
+
borderRadius: tb.cornerRadius,
|
|
15
|
+
overflow: 'hidden',
|
|
16
|
+
};
|
|
17
|
+
const headerRowStyle = {
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
backgroundColor: tb.headerBackground,
|
|
20
|
+
};
|
|
21
|
+
const headerCellStyle = (col) => ({
|
|
22
|
+
paddingHorizontal: tb.cellPaddingHorizontal,
|
|
23
|
+
paddingVertical: tb.cellPaddingVertical,
|
|
24
|
+
...(col.width ? { width: col.width } : { flex: 1 }),
|
|
25
|
+
});
|
|
26
|
+
const headerTextStyle = {
|
|
27
|
+
fontSize: tb.headerTextSize,
|
|
28
|
+
lineHeight: tb.headerLineHeight,
|
|
29
|
+
color: tb.headerTextColor,
|
|
30
|
+
...resolveFont(tb.fontFamily, tb.headerFontWeight),
|
|
31
|
+
};
|
|
32
|
+
const rowStyle = (index) => ({
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
borderTopWidth: tb.rowBorderWidth,
|
|
35
|
+
borderTopColor: tb.rowBorderColor,
|
|
36
|
+
...(hoveredRow === index ? { backgroundColor: tb.rowHoverBackground } : {}),
|
|
37
|
+
});
|
|
38
|
+
const cellStyle = (col) => ({
|
|
39
|
+
paddingHorizontal: tb.cellPaddingHorizontal,
|
|
40
|
+
paddingVertical: tb.cellPaddingVertical,
|
|
41
|
+
...(col.width ? { width: col.width } : { flex: 1 }),
|
|
42
|
+
});
|
|
43
|
+
const cellTextStyle = {
|
|
44
|
+
fontSize: tb.cellTextSize,
|
|
45
|
+
lineHeight: tb.cellLineHeight,
|
|
46
|
+
color: tb.cellTextColor,
|
|
47
|
+
...resolveFont(tb.fontFamily, tb.cellFontWeight),
|
|
48
|
+
};
|
|
49
|
+
return (_jsxs(View, { style: tableStyle, children: [_jsx(View, { style: headerRowStyle, children: columns.map((col) => (_jsx(View, { style: headerCellStyle(col), children: _jsx(Text, { style: headerTextStyle, children: col.header }) }, col.key))) }), data.map((row, index) => {
|
|
50
|
+
const RowWrapper = onRowPress ? Pressable : View;
|
|
51
|
+
return (_jsx(RowWrapper, { style: rowStyle(index), ...(onRowPress
|
|
52
|
+
? {
|
|
53
|
+
onPress: () => onRowPress(row),
|
|
54
|
+
...{
|
|
55
|
+
onHoverIn: () => setHoveredRow(index),
|
|
56
|
+
onHoverOut: () => setHoveredRow(null),
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
: {}), children: columns.map((col) => (_jsx(View, { style: cellStyle(col), children: _jsx(Text, { style: cellTextStyle, children: String(row[col.key] ?? '') }) }, col.key))) }, index));
|
|
60
|
+
})] }));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,GAGV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAqBpD,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,UAAU,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAc;IAC7D,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;IAEjC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAElE,8EAA8E;IAE9E,MAAM,UAAU,GAAc;QAC5B,YAAY,EAAE,EAAE,CAAC,YAAY;QAC7B,QAAQ,EAAE,QAAQ;KACnB,CAAC;IAEF,MAAM,cAAc,GAAc;QAChC,aAAa,EAAE,KAAK;QACpB,eAAe,EAAE,EAAE,CAAC,gBAAgB;KACrC,CAAC;IAEF,MAAM,eAAe,GAAG,CAAC,GAAgB,EAAa,EAAE,CAAC,CAAC;QACxD,iBAAiB,EAAE,EAAE,CAAC,qBAAqB;QAC3C,eAAe,EAAE,EAAE,CAAC,mBAAmB;QACvC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC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AAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,KAAC,IAAI,IAAe,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC,YAC7C,KAAC,IAAI,IAAC,KAAK,EAAE,eAAe,YAAG,GAAG,CAAC,MAAM,GAAQ,IADxC,GAAG,CAAC,GAAG,CAEX,CACR,CAAC,GACG,EACN,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBACvB,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;gBACjD,OAAO,CACL,KAAC,UAAU,IAET,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,KAClB,CAAC,UAAU;wBACb,CAAC,CAAC;4BACE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;4BAC9B,GAAI;gCACF,SAAS,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC;gCACrC,UAAU,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC;6BACV;yBAC9B;wBACH,CAAC,CAAC,EAAE,CAAC,YAEN,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CACpB,KAAC,IAAI,IAAe,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,YACvC,KAAC,IAAI,IAAC,KAAK,EAAE,aAAa,YAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAQ,IADtD,GAAG,CAAC,GAAG,CAEX,CACR,CAAC,IAhBG,KAAK,CAiBC,CACd,CAAC;YACJ,CAAC,CAAC,IACG,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type TextInputProps } from 'react-native';
|
|
2
|
+
export interface TextFieldProps extends Omit<TextInputProps, 'style'> {
|
|
3
|
+
/** Input value. */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Change handler. */
|
|
6
|
+
onChangeText?: (text: string) => void;
|
|
7
|
+
/** Field label displayed above the input. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Placeholder text. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Helper or error message displayed below the input. */
|
|
12
|
+
helperText?: string;
|
|
13
|
+
/** Error state. @default false */
|
|
14
|
+
error?: boolean;
|
|
15
|
+
/** Disabled state. @default false */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function TextField({ value, onChangeText, label, placeholder, helperText, error, disabled, ...inputProps }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IACnE,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAMD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAa,EACb,QAAgB,EAChB,GAAG,UAAU,EACd,EAAE,cAAc,2CA4EhB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { View, TextInput, Text, } from 'react-native';
|
|
4
|
+
import { useTheme, resolveFont } from '../../theme';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Component
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
export function TextField({ value, onChangeText, label, placeholder, helperText, error = false, disabled = false, ...inputProps }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const tf = theme.component.textField;
|
|
11
|
+
const sem = theme.semantic;
|
|
12
|
+
const [focused, setFocused] = useState(false);
|
|
13
|
+
const resolveBorderColor = () => {
|
|
14
|
+
if (error)
|
|
15
|
+
return tf.errorBorderColor;
|
|
16
|
+
if (focused)
|
|
17
|
+
return tf.focusBorderColor;
|
|
18
|
+
return tf.borderColor;
|
|
19
|
+
};
|
|
20
|
+
// --- styles ----------------------------------------------------------------
|
|
21
|
+
const containerStyle = {
|
|
22
|
+
gap: 4,
|
|
23
|
+
opacity: disabled ? sem.opacity.disabled : 1,
|
|
24
|
+
};
|
|
25
|
+
const labelStyle = {
|
|
26
|
+
fontSize: tf.labelSize,
|
|
27
|
+
lineHeight: tf.labelLineHeight,
|
|
28
|
+
color: tf.labelColor,
|
|
29
|
+
...resolveFont(tf.labelFontFamily, tf.labelFontWeight),
|
|
30
|
+
};
|
|
31
|
+
const inputContainerStyle = {
|
|
32
|
+
paddingHorizontal: tf.paddingHorizontal,
|
|
33
|
+
paddingVertical: tf.paddingVertical,
|
|
34
|
+
borderRadius: tf.cornerRadius,
|
|
35
|
+
borderWidth: tf.borderWidth,
|
|
36
|
+
backgroundColor: tf.background,
|
|
37
|
+
borderColor: resolveBorderColor(),
|
|
38
|
+
};
|
|
39
|
+
const inputStyle = {
|
|
40
|
+
fontSize: tf.textSize,
|
|
41
|
+
lineHeight: tf.textLineHeight,
|
|
42
|
+
color: tf.textColor,
|
|
43
|
+
padding: 0,
|
|
44
|
+
...resolveFont(tf.fontFamily, tf.textFontWeight),
|
|
45
|
+
};
|
|
46
|
+
const helperStyle = {
|
|
47
|
+
fontSize: tf.helperSize,
|
|
48
|
+
lineHeight: tf.helperLineHeight,
|
|
49
|
+
color: error ? tf.errorColor : tf.helperColor,
|
|
50
|
+
...resolveFont(tf.helperFontFamily, tf.helperFontWeight),
|
|
51
|
+
};
|
|
52
|
+
return (_jsxs(View, { style: containerStyle, children: [label ? _jsx(Text, { style: labelStyle, children: label }) : null, _jsx(View, { style: inputContainerStyle, children: _jsx(TextInput, { ...inputProps, value: value, onChangeText: onChangeText, placeholder: placeholder, placeholderTextColor: tf.placeholderColor, editable: !disabled, onFocus: (e) => {
|
|
53
|
+
setFocused(true);
|
|
54
|
+
inputProps.onFocus?.(e);
|
|
55
|
+
}, onBlur: (e) => {
|
|
56
|
+
setFocused(false);
|
|
57
|
+
inputProps.onBlur?.(e);
|
|
58
|
+
}, style: inputStyle }) }), helperText ? _jsx(Text, { style: helperStyle, children: helperText }) : null] }));
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=TextField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,IAAI,EACJ,SAAS,EACT,IAAI,GAIL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuBpD,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAU,EACV,KAAK,GAAG,KAAK,EACb,QAAQ,GAAG,KAAK,EAChB,GAAG,UAAU,EACE;IACf,MAAM,KA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}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type TextProps } from 'react-native';
|
|
2
|
+
export type TypographyVariant = 'display' | 'h1' | 'h2' | 'h3' | 'subtitle' | 'body' | 'small' | 'caption' | 'overline' | 'label' | 'button';
|
|
3
|
+
export interface TypographyProps extends Omit<TextProps, 'style'> {
|
|
4
|
+
/** Text style variant. @default 'body' */
|
|
5
|
+
variant?: TypographyVariant;
|
|
6
|
+
/** Override text color. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Text alignment. @default 'left' */
|
|
9
|
+
align?: 'left' | 'center' | 'right';
|
|
10
|
+
/** Text content. */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Typography component for rendering themed text.
|
|
15
|
+
*
|
|
16
|
+
* Maps each variant to the Cast semantic text tokens (fontSize, fontWeight,
|
|
17
|
+
* lineHeight, letterSpacing, fontFamily). Uses `resolveFont()` for
|
|
18
|
+
* cross-platform font handling.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Typography({ variant, color, align, children, ...textProps }: TypographyProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
//# sourceMappingURL=Typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAkB,MAAM,cAAc,CAAC;AAOpE,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,GACT,UAAU,GACV,OAAO,GACP,QAAQ,CAAC;AAEb,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC;IAC/D,0CAA0C;IAC1C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,oBAAoB;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAkCD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAgB,EAChB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,eAAe,2CAuBjB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
import { useTheme, resolveFont } from '../../theme';
|
|
4
|
+
const VARIANT_MAP = {
|
|
5
|
+
display: { fontWeight: 'heading', letterSpacing: 'heading', fontFamily: 'brand' },
|
|
6
|
+
h1: { fontWeight: 'heading', letterSpacing: 'heading', fontFamily: 'brand' },
|
|
7
|
+
h2: { fontWeight: 'heading', letterSpacing: 'heading', fontFamily: 'brand' },
|
|
8
|
+
h3: { fontWeight: 'heading', letterSpacing: 'heading', fontFamily: 'brand' },
|
|
9
|
+
subtitle: { fontWeight: 'button', letterSpacing: 'body', fontFamily: 'interface' },
|
|
10
|
+
body: { fontWeight: 'body', letterSpacing: 'body', fontFamily: 'interface' },
|
|
11
|
+
small: { fontWeight: 'body', letterSpacing: 'body', fontFamily: 'interface' },
|
|
12
|
+
caption: { fontWeight: 'body', letterSpacing: 'body', fontFamily: 'interface' },
|
|
13
|
+
overline: { fontWeight: 'button', letterSpacing: 'label', fontFamily: 'interface' },
|
|
14
|
+
label: { fontWeight: 'button', letterSpacing: 'body', fontFamily: 'interface' },
|
|
15
|
+
button: { fontWeight: 'button', letterSpacing: 'label', fontFamily: 'interface' },
|
|
16
|
+
};
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// Component
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
/**
|
|
21
|
+
* Typography component for rendering themed text.
|
|
22
|
+
*
|
|
23
|
+
* Maps each variant to the Cast semantic text tokens (fontSize, fontWeight,
|
|
24
|
+
* lineHeight, letterSpacing, fontFamily). Uses `resolveFont()` for
|
|
25
|
+
* cross-platform font handling.
|
|
26
|
+
*/
|
|
27
|
+
export function Typography({ variant = 'body', color, align, children, ...textProps }) {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const sem = theme.semantic;
|
|
30
|
+
const mapping = VARIANT_MAP[variant];
|
|
31
|
+
const textStyle = {
|
|
32
|
+
fontSize: sem.fontSize[variant],
|
|
33
|
+
lineHeight: sem.lineHeight[variant],
|
|
34
|
+
letterSpacing: sem.letterSpacing[mapping.letterSpacing],
|
|
35
|
+
color: color ?? sem.color.onSurface,
|
|
36
|
+
...(align && { textAlign: align }),
|
|
37
|
+
...(variant === 'overline' && { textTransform: 'uppercase' }),
|
|
38
|
+
...resolveFont(sem.fontFamily[mapping.fontFamily], sem.fontWeight[mapping.fontWeight]),
|
|
39
|
+
};
|
|
40
|
+
return (_jsx(Text, { ...textProps, style: textStyle, children: children }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=Typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA4CpD,MAAM,WAAW,GAA8C;IAC7D,OAAO,EAAG,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE;IAClF,EAAE,EAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE;IAClF,EAAE,EAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,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E,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC;QACnC,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,aAAa,CAAC;QACvD,KAAK,EAAE,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,SAAS;QACnC,GAAG,CAAC,KAAK,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAClC,GAAG,CAAC,OAAO,KAAK,UAAU,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC;QAC7D,GAAG,WAAW,CACZ,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,EAClC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,CACnC;KACF,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,OAAK,SAAS,EAAE,KAAK,EAAE,SAAS,YAClC,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -45,7 +45,11 @@
|
|
|
45
45
|
"h2": 25,
|
|
46
46
|
"h3": 20,
|
|
47
47
|
"body": 16,
|
|
48
|
+
"subtitle": 20,
|
|
48
49
|
"small": 12.8,
|
|
50
|
+
"caption": 12.8,
|
|
51
|
+
"overline": 12.8,
|
|
52
|
+
"label": 12.8,
|
|
49
53
|
"button": 16
|
|
50
54
|
},
|
|
51
55
|
"fontWeight": {
|
|
@@ -54,9 +58,17 @@
|
|
|
54
58
|
"button": 500
|
|
55
59
|
},
|
|
56
60
|
"lineHeight": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
61
|
+
"display": 48,
|
|
62
|
+
"h1": 40,
|
|
63
|
+
"h2": 32,
|
|
64
|
+
"h3": 24,
|
|
65
|
+
"body": 24,
|
|
66
|
+
"subtitle": 24,
|
|
67
|
+
"small": 20,
|
|
68
|
+
"caption": 16,
|
|
69
|
+
"overline": 16,
|
|
70
|
+
"label": 16,
|
|
71
|
+
"button": 16
|
|
60
72
|
},
|
|
61
73
|
"letterSpacing": {
|
|
62
74
|
"heading": -0.02,
|
|
@@ -118,7 +130,7 @@
|
|
|
118
130
|
"borderWidth": 2,
|
|
119
131
|
"textSize": 16,
|
|
120
132
|
"fontWeight": 500,
|
|
121
|
-
"lineHeight":
|
|
133
|
+
"lineHeight": 16,
|
|
122
134
|
"fontFamily": "system-ui",
|
|
123
135
|
"filled": {
|
|
124
136
|
"background": "#0F172A",
|
|
@@ -150,9 +162,11 @@
|
|
|
150
162
|
"elevation": 1,
|
|
151
163
|
"headingSize": 20,
|
|
152
164
|
"headingWeight": 700,
|
|
165
|
+
"headingLineHeight": 24,
|
|
153
166
|
"headingFontFamily": "system-ui",
|
|
154
167
|
"bodySize": 16,
|
|
155
168
|
"bodyWeight": 400,
|
|
169
|
+
"bodyLineHeight": 24,
|
|
156
170
|
"bodyFontFamily": "system-ui",
|
|
157
171
|
"headingColor": "#0F172A",
|
|
158
172
|
"bodyColor": "#475569"
|
|
@@ -169,12 +183,20 @@
|
|
|
169
183
|
"textColor": "#0F172A",
|
|
170
184
|
"placeholderColor": "#475569",
|
|
171
185
|
"textSize": 16,
|
|
186
|
+
"textFontWeight": 400,
|
|
187
|
+
"textLineHeight": 24,
|
|
172
188
|
"fontFamily": "system-ui",
|
|
173
189
|
"labelColor": "#0F172A",
|
|
174
190
|
"labelSize": 12.8,
|
|
191
|
+
"labelFontWeight": 500,
|
|
192
|
+
"labelLineHeight": 20,
|
|
193
|
+
"labelFontFamily": "system-ui",
|
|
175
194
|
"helperColor": "#475569",
|
|
176
195
|
"errorColor": "#6F0C0C",
|
|
177
|
-
"helperSize": 12.8
|
|
196
|
+
"helperSize": 12.8,
|
|
197
|
+
"helperFontWeight": 400,
|
|
198
|
+
"helperLineHeight": 20,
|
|
199
|
+
"helperFontFamily": "system-ui"
|
|
178
200
|
},
|
|
179
201
|
"checkbox": {
|
|
180
202
|
"size": 16,
|
|
@@ -186,6 +208,8 @@
|
|
|
186
208
|
"checkedIconColor": "#FFFFFF",
|
|
187
209
|
"labelColor": "#0F172A",
|
|
188
210
|
"labelSize": 16,
|
|
211
|
+
"labelFontWeight": 400,
|
|
212
|
+
"labelLineHeight": 24,
|
|
189
213
|
"labelFontFamily": "system-ui",
|
|
190
214
|
"disabledOpacity": 0.4
|
|
191
215
|
},
|
|
@@ -208,6 +232,8 @@
|
|
|
208
232
|
"optionHoverBackground": "#F8FAFC",
|
|
209
233
|
"optionTextColor": "#0F172A",
|
|
210
234
|
"optionTextSize": 16,
|
|
235
|
+
"optionFontWeight": 400,
|
|
236
|
+
"optionLineHeight": 24,
|
|
211
237
|
"optionPaddingHorizontal": 16,
|
|
212
238
|
"optionPaddingVertical": 8,
|
|
213
239
|
"fontFamily": "system-ui"
|
|
@@ -220,6 +246,8 @@
|
|
|
220
246
|
"indicatorColor": "#475569",
|
|
221
247
|
"optionTextColor": "#0F172A",
|
|
222
248
|
"optionTextSize": 16,
|
|
249
|
+
"optionFontWeight": 400,
|
|
250
|
+
"optionLineHeight": 24,
|
|
223
251
|
"optionPaddingHorizontal": 16,
|
|
224
252
|
"optionPaddingVertical": 8,
|
|
225
253
|
"fontFamily": "system-ui",
|
|
@@ -238,6 +266,8 @@
|
|
|
238
266
|
"thumbOffset": 4,
|
|
239
267
|
"labelColor": "#0F172A",
|
|
240
268
|
"labelSize": 16,
|
|
269
|
+
"labelFontWeight": 400,
|
|
270
|
+
"labelLineHeight": 24,
|
|
241
271
|
"labelFontFamily": "system-ui",
|
|
242
272
|
"gap": 8
|
|
243
273
|
},
|
|
@@ -249,6 +279,7 @@
|
|
|
249
279
|
"contentColor": "#FFFFFF",
|
|
250
280
|
"textSize": 12.8,
|
|
251
281
|
"fontWeight": 500,
|
|
282
|
+
"lineHeight": 20,
|
|
252
283
|
"fontFamily": "system-ui"
|
|
253
284
|
},
|
|
254
285
|
"chip": {
|
|
@@ -263,6 +294,8 @@
|
|
|
263
294
|
"borderWidth": 2,
|
|
264
295
|
"borderColor": "#E2E8F0",
|
|
265
296
|
"textSize": 12.8,
|
|
297
|
+
"fontWeight": 400,
|
|
298
|
+
"lineHeight": 20,
|
|
266
299
|
"fontFamily": "system-ui"
|
|
267
300
|
},
|
|
268
301
|
"divider": {
|
|
@@ -280,8 +313,11 @@
|
|
|
280
313
|
"headerTextColor": "#0F172A",
|
|
281
314
|
"headerFontWeight": 700,
|
|
282
315
|
"headerTextSize": 12.8,
|
|
316
|
+
"headerLineHeight": 20,
|
|
283
317
|
"cellTextColor": "#0F172A",
|
|
284
318
|
"cellTextSize": 16,
|
|
319
|
+
"cellFontWeight": 400,
|
|
320
|
+
"cellLineHeight": 24,
|
|
285
321
|
"cellPaddingHorizontal": 12,
|
|
286
322
|
"cellPaddingVertical": 8,
|
|
287
323
|
"rowBorderColor": "#F8FAFC",
|
|
@@ -304,7 +340,10 @@
|
|
|
304
340
|
"iconSize": 24,
|
|
305
341
|
"titleSize": 16,
|
|
306
342
|
"titleFontWeight": 700,
|
|
307
|
-
"
|
|
343
|
+
"titleLineHeight": 24,
|
|
344
|
+
"bodySize": 12.8,
|
|
345
|
+
"bodyFontWeight": 400,
|
|
346
|
+
"bodyLineHeight": 20
|
|
308
347
|
},
|
|
309
348
|
"backdrop": {
|
|
310
349
|
"color": "#000000",
|
|
@@ -326,6 +365,7 @@
|
|
|
326
365
|
"elevation": 3,
|
|
327
366
|
"textSize": 16,
|
|
328
367
|
"fontWeight": 400,
|
|
368
|
+
"lineHeight": 24,
|
|
329
369
|
"fontFamily": "system-ui"
|
|
330
370
|
},
|
|
331
371
|
"dialog": {
|
|
@@ -336,9 +376,12 @@
|
|
|
336
376
|
"elevation": 6,
|
|
337
377
|
"titleSize": 20,
|
|
338
378
|
"titleFontWeight": 700,
|
|
379
|
+
"titleLineHeight": 24,
|
|
339
380
|
"titleFontFamily": "system-ui",
|
|
340
381
|
"titleColor": "#0F172A",
|
|
341
382
|
"bodySize": 16,
|
|
383
|
+
"bodyFontWeight": 400,
|
|
384
|
+
"bodyLineHeight": 24,
|
|
342
385
|
"bodyFontFamily": "system-ui",
|
|
343
386
|
"bodyColor": "#0F172A"
|
|
344
387
|
},
|
|
@@ -349,6 +392,7 @@
|
|
|
349
392
|
"titleColor": "#0F172A",
|
|
350
393
|
"titleSize": 20,
|
|
351
394
|
"titleFontWeight": 700,
|
|
395
|
+
"titleLineHeight": 24,
|
|
352
396
|
"titleFontFamily": "system-ui",
|
|
353
397
|
"iconColor": "#0F172A",
|
|
354
398
|
"borderColor": "#F8FAFC",
|
|
@@ -359,7 +403,10 @@
|
|
|
359
403
|
"hoverColor": "#1E293B",
|
|
360
404
|
"visitedColor": "#475569",
|
|
361
405
|
"underlineOffset": 2,
|
|
362
|
-
"
|
|
406
|
+
"fontSize": 16,
|
|
407
|
+
"fontWeight": 400,
|
|
408
|
+
"lineHeight": 24,
|
|
409
|
+
"fontFamily": "system-ui"
|
|
363
410
|
},
|
|
364
411
|
"speedDial": {
|
|
365
412
|
"actionSize": 32,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CastThemeProvider, useTheme } from './theme';
|
|
2
2
|
export type { CastThemeProviderProps } from './theme';
|
|
3
|
-
export type { CastTheme, ThemeName, SemanticTokens, ComponentTokens, ButtonTokens, CardTokens, } from './theme';
|
|
3
|
+
export type { CastTheme, ThemeName, SemanticTokens, ComponentTokens, ButtonTokens, CardTokens, TextFieldTokens, CheckboxTokens, FABTokens, AutocompleteTokens, SelectTokens, SwitchTokens, BadgeTokens, ChipTokens, DividerTokens, IconTokens, TableTokens, AlertTokens, BackdropTokens, SkeletonTokens, SnackbarTokens, DialogTokens, AppBarTokens, LinkTokens, SpeedDialTokens, } from './theme';
|
|
4
4
|
export { createTheme } from './theme';
|
|
5
5
|
export type { DeepPartial } from './theme';
|
|
6
6
|
export { getThemeFontFamilies, googleFontsUrl, resolveFont, ANDROID_WEIGHT_SUFFIX } from './theme';
|
|
@@ -9,4 +9,44 @@ export { Button } from './components/Button/Button';
|
|
|
9
9
|
export type { ButtonProps, ButtonVariant } from './components/Button/Button';
|
|
10
10
|
export { Card } from './components/Card/Card';
|
|
11
11
|
export type { CardProps } from './components/Card/Card';
|
|
12
|
+
export { Typography } from './components/Typography/Typography';
|
|
13
|
+
export type { TypographyProps, TypographyVariant } from './components/Typography/Typography';
|
|
14
|
+
export { TextField } from './components/TextField/TextField';
|
|
15
|
+
export type { TextFieldProps } from './components/TextField/TextField';
|
|
16
|
+
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
17
|
+
export type { CheckboxProps } from './components/Checkbox/Checkbox';
|
|
18
|
+
export { FAB } from './components/FAB/FAB';
|
|
19
|
+
export type { FABProps, FABVariant } from './components/FAB/FAB';
|
|
20
|
+
export { Autocomplete } from './components/Autocomplete/Autocomplete';
|
|
21
|
+
export type { AutocompleteProps, AutocompleteOption } from './components/Autocomplete/Autocomplete';
|
|
22
|
+
export { Select } from './components/Select/Select';
|
|
23
|
+
export type { SelectProps, SelectOption } from './components/Select/Select';
|
|
24
|
+
export { Switch } from './components/Switch/Switch';
|
|
25
|
+
export type { SwitchProps } from './components/Switch/Switch';
|
|
26
|
+
export { Badge } from './components/Badge/Badge';
|
|
27
|
+
export type { BadgeProps } from './components/Badge/Badge';
|
|
28
|
+
export { Chip } from './components/Chip/Chip';
|
|
29
|
+
export type { ChipProps } from './components/Chip/Chip';
|
|
30
|
+
export { Divider } from './components/Divider/Divider';
|
|
31
|
+
export type { DividerProps } from './components/Divider/Divider';
|
|
32
|
+
export { Icon } from './components/Icon/Icon';
|
|
33
|
+
export type { IconProps, IconSize } from './components/Icon/Icon';
|
|
34
|
+
export { Table } from './components/Table/Table';
|
|
35
|
+
export type { TableProps, TableColumn } from './components/Table/Table';
|
|
36
|
+
export { Alert } from './components/Alert/Alert';
|
|
37
|
+
export type { AlertProps, AlertSeverity } from './components/Alert/Alert';
|
|
38
|
+
export { Backdrop } from './components/Backdrop/Backdrop';
|
|
39
|
+
export type { BackdropProps } from './components/Backdrop/Backdrop';
|
|
40
|
+
export { Skeleton } from './components/Skeleton/Skeleton';
|
|
41
|
+
export type { SkeletonProps, SkeletonVariant } from './components/Skeleton/Skeleton';
|
|
42
|
+
export { Snackbar } from './components/Snackbar/Snackbar';
|
|
43
|
+
export type { SnackbarProps } from './components/Snackbar/Snackbar';
|
|
44
|
+
export { Dialog } from './components/Dialog/Dialog';
|
|
45
|
+
export type { DialogProps } from './components/Dialog/Dialog';
|
|
46
|
+
export { AppBar } from './components/AppBar/AppBar';
|
|
47
|
+
export type { AppBarProps } from './components/AppBar/AppBar';
|
|
48
|
+
export { Link } from './components/Link/Link';
|
|
49
|
+
export type { LinkProps } from './components/Link/Link';
|
|
50
|
+
export { SpeedDial } from './components/SpeedDial/SpeedDial';
|
|
51
|
+
export type { SpeedDialProps, SpeedDialAction } from './components/SpeedDial/SpeedDial';
|
|
12
52
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,UAAU,EACV,eAAe,EACf,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,WAAW,EACX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,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,4 +10,24 @@ export { defaultTheme } from './tokens/generated';
|
|
|
10
10
|
// Components
|
|
11
11
|
export { Button } from './components/Button/Button';
|
|
12
12
|
export { Card } from './components/Card/Card';
|
|
13
|
+
export { Typography } from './components/Typography/Typography';
|
|
14
|
+
export { TextField } from './components/TextField/TextField';
|
|
15
|
+
export { Checkbox } from './components/Checkbox/Checkbox';
|
|
16
|
+
export { FAB } from './components/FAB/FAB';
|
|
17
|
+
export { Autocomplete } from './components/Autocomplete/Autocomplete';
|
|
18
|
+
export { Select } from './components/Select/Select';
|
|
19
|
+
export { Switch } from './components/Switch/Switch';
|
|
20
|
+
export { Badge } from './components/Badge/Badge';
|
|
21
|
+
export { Chip } from './components/Chip/Chip';
|
|
22
|
+
export { Divider } from './components/Divider/Divider';
|
|
23
|
+
export { Icon } from './components/Icon/Icon';
|
|
24
|
+
export { Table } from './components/Table/Table';
|
|
25
|
+
export { Alert } from './components/Alert/Alert';
|
|
26
|
+
export { Backdrop } from './components/Backdrop/Backdrop';
|
|
27
|
+
export { Skeleton } from './components/Skeleton/Skeleton';
|
|
28
|
+
export { Snackbar } from './components/Snackbar/Snackbar';
|
|
29
|
+
export { Dialog } from './components/Dialog/Dialog';
|
|
30
|
+
export { AppBar } from './components/AppBar/AppBar';
|
|
31
|
+
export { Link } from './components/Link/Link';
|
|
32
|
+
export { SpeedDial } from './components/SpeedDial/SpeedDial';
|
|
13
33
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,kCAAkC;AAClC,8EAA8E;AAE9E,eAAe;AACf,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA6BtD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEnG,gBAAgB;AAChB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,aAAa;AACb,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAGhE,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG1D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAGtE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGjD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAGvD,OAAO,E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