@kanso-labs/react-native-kanso-ui 0.0.0-stage → 0.1.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/LICENSE.md +20 -0
- package/README.md +205 -2
- package/dist/button/index.d.ts +56 -0
- package/dist/button/index.js +169 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/palettes.js +47 -0
- package/dist/button/palettes.js.map +1 -0
- package/dist/chip/index.js +194 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/chip/styles.js +36 -0
- package/dist/chip/styles.js.map +1 -0
- package/dist/clipboard/index.js +58 -0
- package/dist/clipboard/index.js.map +1 -0
- package/dist/components/avatar/index.d.ts +82 -0
- package/dist/components/avatar/index.js +62 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/button/index.d.ts +87 -0
- package/dist/components/button/index.js +377 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/index.d.ts +78 -0
- package/dist/components/card/index.js +315 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +76 -0
- package/dist/components/checkbox/index.js +360 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/chip/index.d.ts +84 -0
- package/dist/components/chip/index.js +257 -0
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/chip-group/index.d.ts +143 -0
- package/dist/components/chip-group/index.js +669 -0
- package/dist/components/chip-group/index.js.map +1 -0
- package/dist/components/copy-field/index.d.ts +60 -0
- package/dist/components/copy-field/index.js +277 -0
- package/dist/components/copy-field/index.js.map +1 -0
- package/dist/components/currency/index.d.ts +69 -0
- package/dist/components/currency/index.js +162 -0
- package/dist/components/currency/index.js.map +1 -0
- package/dist/components/form/index.d.ts +84 -0
- package/dist/components/form/index.js +95 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/icon-button/index.d.ts +68 -0
- package/dist/components/icon-button/index.js +289 -0
- package/dist/components/icon-button/index.js.map +1 -0
- package/dist/components/link/index.d.ts +59 -0
- package/dist/components/link/index.js +191 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/number-field/index.d.ts +151 -0
- package/dist/components/number-field/index.js +832 -0
- package/dist/components/number-field/index.js.map +1 -0
- package/dist/components/product-icon/index.d.ts +70 -0
- package/dist/components/product-icon/index.js +60 -0
- package/dist/components/product-icon/index.js.map +1 -0
- package/dist/components/radio-group/index.d.ts +105 -0
- package/dist/components/radio-group/index.js +597 -0
- package/dist/components/radio-group/index.js.map +1 -0
- package/dist/components/search-field/index.d.ts +98 -0
- package/dist/components/search-field/index.js +521 -0
- package/dist/components/search-field/index.js.map +1 -0
- package/dist/components/segmented-button/index.d.ts +113 -0
- package/dist/components/segmented-button/index.js +937 -0
- package/dist/components/segmented-button/index.js.map +1 -0
- package/dist/components/separator/index.d.ts +45 -0
- package/dist/components/separator/index.js +109 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/stack/index.d.ts +70 -0
- package/dist/components/stack/index.js +107 -0
- package/dist/components/stack/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +76 -0
- package/dist/components/switch/index.js +591 -0
- package/dist/components/switch/index.js.map +1 -0
- package/dist/components/text/index.d.ts +44 -0
- package/dist/components/text/index.js +78 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +146 -0
- package/dist/components/text-field/index.js +228 -0
- package/dist/components/text-field/index.js.map +1 -0
- package/dist/control/index.js +117 -0
- package/dist/control/index.js.map +1 -0
- package/dist/control/styles.js +36 -0
- package/dist/control/styles.js.map +1 -0
- package/dist/field/index.d.ts +13 -0
- package/dist/field/index.js +1007 -0
- package/dist/field/index.js.map +1 -0
- package/dist/field/styles.js +131 -0
- package/dist/field/styles.js.map +1 -0
- package/dist/form/index.d.ts +24 -0
- package/dist/form/index.js +209 -0
- package/dist/form/index.js.map +1 -0
- package/dist/glyphs/icon-style.d.ts +25 -0
- package/dist/glyphs/icon-style.js +22 -0
- package/dist/glyphs/icon-style.js.map +1 -0
- package/dist/glyphs/index.js +170 -0
- package/dist/glyphs/index.js.map +1 -0
- package/dist/glyphs/styles.js +7 -0
- package/dist/glyphs/styles.js.map +1 -0
- package/dist/hooks/useWindowSizeClass.d.ts +25 -0
- package/dist/hooks/useWindowSizeClass.js +39 -0
- package/dist/hooks/useWindowSizeClass.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +27 -0
- package/dist/mark/image.js +61 -0
- package/dist/mark/image.js.map +1 -0
- package/dist/mark/index.d.ts +9 -0
- package/dist/mark/index.js +234 -0
- package/dist/mark/index.js.map +1 -0
- package/dist/mark/initials.js +65 -0
- package/dist/mark/initials.js.map +1 -0
- package/dist/mark/styles.d.ts +1 -0
- package/dist/mark/styles.js +73 -0
- package/dist/mark/styles.js.map +1 -0
- package/dist/number/parser.js +321 -0
- package/dist/number/parser.js.map +1 -0
- package/dist/number/state.js +235 -0
- package/dist/number/state.js.map +1 -0
- package/dist/overlay/host.js +111 -0
- package/dist/overlay/host.js.map +1 -0
- package/dist/press/index.js +350 -0
- package/dist/press/index.js.map +1 -0
- package/dist/press/styles.js +31 -0
- package/dist/press/styles.js.map +1 -0
- package/dist/router/index.d.ts +28 -0
- package/dist/router/index.js +82 -0
- package/dist/router/index.js.map +1 -0
- package/dist/theme/color.js +25 -0
- package/dist/theme/color.js.map +1 -0
- package/dist/theme/resolve.d.ts +6 -0
- package/dist/theme/resolve.js +310 -0
- package/dist/theme/resolve.js.map +1 -0
- package/dist/theme/scope.d.ts +42 -0
- package/dist/theme/scope.js +80 -0
- package/dist/theme/scope.js.map +1 -0
- package/dist/theme/styles.js +39 -0
- package/dist/theme/styles.js.map +1 -0
- package/dist/theme-scope.d.ts +56 -0
- package/dist/theme-scope.js +127 -0
- package/dist/theme-scope.js.map +1 -0
- package/dist/tokens/defaults.d.ts +407 -0
- package/dist/tokens/defaults.js +403 -0
- package/dist/tokens/defaults.js.map +1 -0
- package/dist/typography/fonts.js +84 -0
- package/dist/typography/fonts.js.map +1 -0
- package/dist/typography/roles.d.ts +10 -0
- package/dist/typography/roles.js +82 -0
- package/dist/typography/roles.js.map +1 -0
- package/package.json +132 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fonts.js","names":["useSyncExternalStore","Platform","FontRegistry","isLoaded","family","registry","loading","Promise","listeners","Set","load","settle","listener","snapshot","start","subscribe","add","delete","SYSTEM_FONT","select","android","default","undefined","ios","cssStack","families","map","test","join","useFontFamily","$","_c","fonts","OS","t0","first","at","_c"],"sources":["../../src/typography/fonts.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\nimport { Platform } from 'react-native'\n\ntype FontRegistry = { readonly isLoaded: (family: string) => boolean }\n\n// expo-font is an optional peer, so it is imported where its absence can be\n// caught. Metro takes an import inside a `try` as optional and bundles the\n// app without it, where an import at the top of the module would fail the\n// bundle of every app that does not have it. Until the import settles the\n// registry is `undefined`, and `null` once it has failed.\nlet registry: FontRegistry | null | undefined\nlet loading: Promise<void> | undefined\nconst listeners = new Set<() => void>()\n\nasync function load(): Promise<FontRegistry | null> {\n try {\n return await import(/* @vite-ignore */ 'expo-font')\n } catch {\n return null\n }\n}\n\nasync function settle() {\n registry = await load()\n\n for (const listener of listeners) {\n listener()\n }\n}\n\nfunction snapshot() {\n start()\n return registry\n}\n\nfunction start() {\n loading ??= settle()\n}\n\nfunction subscribe(listener: () => void) {\n start()\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\n\n// What a role draws in when its own family is not there: the platform's\n// system font, named rather than left unset, so a role nested in another's\n// text does not inherit the outer role's family.\nconst SYSTEM_FONT = Platform.select({\n android: 'sans-serif',\n default: undefined,\n ios: 'System',\n})\n\n/** A family list as CSS writes it, quoting the names with spaces in them. */\nfunction cssStack(families: readonly string[]): string {\n return families\n .map((family) => (/\\s/u.test(family) ? `'${family}'` : family))\n .join(', ')\n}\n\n/**\n * The family a type role draws in, from the token's list of families.\n *\n * On iOS and Android that is the list's first family when the app has\n * registered it with expo-font, under the name the token gives it, and the\n * system font otherwise. Neither package ships a font, and React Native names\n * one family rather than falling through a list, so the rest of the list is\n * the browser's alone. Under React Native Web the whole list goes to CSS, as\n * it does on kanso-ui.\n *\n * A family registered after its text has drawn takes effect when that text\n * next renders, which is what an app gating its first screen on `useFonts()`\n * already arranges.\n */\nfunction useFontFamily(families: readonly string[]): string | undefined {\n const fonts = useSyncExternalStore(subscribe, snapshot)\n\n if (Platform.OS === 'web') {\n return cssStack(families)\n }\n\n const first = families.at(0)\n\n return first !== undefined && fonts?.isLoaded(first) === true\n ? first\n : SYSTEM_FONT\n}\n\nexport { useFontFamily }\n"],"mappings":";;;;AAUA,IAAIK;AACJ,IAAIC;AACJ,MAAME,4BAAY,IAAIC,IAAgB;AAEtC,eAAeC,OAAqC;CAClD,IAAI;EACF,OAAO,MAAM;;GAA0B;;CACzC,QAAQ;EACN,OAAO;CACT;AACF;AAEA,eAAeC,SAAS;CACtBN,WAAW,MAAMK,KAAK;CAEtB,KAAK,MAAME,YAAYJ,WACrBI,SAAS;AAEb;AAEA,SAASC,WAAW;CAClBC,MAAM;CACN,OAAOT;AACT;AAEA,SAASS,QAAQ;CACfR,YAAYK,OAAO;AACrB;AAEA,SAASI,UAAUH,UAAsB;CACvCE,MAAM;CACNN,UAAUQ,IAAIJ,QAAQ;CACtB,aAAa;EACXJ,UAAUS,OAAOL,QAAQ;CAC3B;AACF;AAKA,MAAMM,cAAcjB,SAASkB,OAAO;CAClCC,SAAS;CACTC,SAASC,KAAAA;CACTC,KAAK;AACP,CAAC;;AAGD,SAASC,SAASC,UAAqC;CACrD,OAAOA,SACJC,KAAKtB,WAAY,MAAMuB,KAAKvB,MAAM,IAAI,IAAIA,OAAM,KAAMA,MAAO,CAAC,CAC9DwB,KAAK,IAAI;AACd;;;;;;;;;;;;;;;AAgBA,SAAAC,cAAAJ,UAAA;CAAA,MAAAK,IAAAC,EAAA,CAAA;CACE,MAAAC,QAAchC,qBAAqBe,WAAWF,QAAQ;CAEtD,IAAIZ,SAAQgC,OAAQ,OAAK;EAAA,IAAAC;EAAA,IAAAJ,EAAA,OAAAL,UAAA;GAChBS,KAAAV,SAASC,QAAQ;GAACK,EAAA,KAAAL;GAAAK,EAAA,KAAAI;EAAA,OAAAA,KAAAJ,EAAA;EAAA,OAAlBI;CAAkB;CAC1B,IAAAA;CAAA,IAAAJ,EAAA,OAAAL,YAAAK,EAAA,OAAAE,OAAA;EAED,MAAAG,QAAcV,SAAQW,GAAI,CAAC;EAEpBF,KAAAC,UAAUb,KAAAA,KAAaU,OAAK7B,SAAWgC,KAAK,MAAM,OAAlDA,QAAAjB;EAEQY,EAAA,KAAAL;EAAAK,EAAA,KAAAE;EAAAF,EAAA,KAAAI;CAAA,OAAAA,KAAAJ,EAAA;CAAA,OAFRI;AAEQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StyleProp } from "react-native";
|
|
2
|
+
//#region src/typography/roles.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The type scale on Material Design's typography pages: the display, headline,
|
|
5
|
+
* title, body and label roles at large, medium and small.
|
|
6
|
+
*/
|
|
7
|
+
type TypeRole = 'bodyLarge' | 'bodyMedium' | 'bodySmall' | 'displayLarge' | 'displayMedium' | 'displaySmall' | 'headlineLarge' | 'headlineMedium' | 'headlineSmall' | 'labelLarge' | 'labelMedium' | 'labelSmall' | 'titleLarge' | 'titleMedium' | 'titleSmall';
|
|
8
|
+
//#endregion
|
|
9
|
+
export type { TypeRole };
|
|
10
|
+
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { useTheme } from "../theme/scope.js";
|
|
2
|
+
import { composeStyles, themedStyles } from "../theme/styles.js";
|
|
3
|
+
import { useFontFamily } from "./fonts.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
//#region src/typography/roles.ts
|
|
7
|
+
const WEIGHTS = [
|
|
8
|
+
100,
|
|
9
|
+
200,
|
|
10
|
+
300,
|
|
11
|
+
400,
|
|
12
|
+
500,
|
|
13
|
+
600,
|
|
14
|
+
700,
|
|
15
|
+
800,
|
|
16
|
+
900
|
|
17
|
+
];
|
|
18
|
+
const familyStyles = /* @__PURE__ */ new Map();
|
|
19
|
+
/**
|
|
20
|
+
* The style that sets a family `useFontFamily` chose, one object per family,
|
|
21
|
+
* so every text drawn in it is handed the same one.
|
|
22
|
+
*/
|
|
23
|
+
function familyStyle(family) {
|
|
24
|
+
if (family === void 0) return;
|
|
25
|
+
const known = familyStyles.get(family);
|
|
26
|
+
if (known !== void 0) return known;
|
|
27
|
+
const style = { fontFamily: family };
|
|
28
|
+
familyStyles.set(family, style);
|
|
29
|
+
return style;
|
|
30
|
+
}
|
|
31
|
+
/** The weight React Native takes nearest a token's, from 1 to 1000. */
|
|
32
|
+
function nativeWeight(weight) {
|
|
33
|
+
return WEIGHTS[Math.min(Math.max(Math.round(weight / 100), 1), 9) - 1];
|
|
34
|
+
}
|
|
35
|
+
function roleStyle(typography, role) {
|
|
36
|
+
return {
|
|
37
|
+
fontSize: typography[`${role}Size`],
|
|
38
|
+
fontWeight: nativeWeight(typography[`${role}Weight`]),
|
|
39
|
+
letterSpacing: typography[`${role}Tracking`],
|
|
40
|
+
lineHeight: typography[`${role}LineHeight`]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const stylesOf = themedStyles(({ typography }) => StyleSheet.create({
|
|
44
|
+
bodyLarge: roleStyle(typography, "bodyLarge"),
|
|
45
|
+
bodyMedium: roleStyle(typography, "bodyMedium"),
|
|
46
|
+
bodySmall: roleStyle(typography, "bodySmall"),
|
|
47
|
+
displayLarge: roleStyle(typography, "displayLarge"),
|
|
48
|
+
displayMedium: roleStyle(typography, "displayMedium"),
|
|
49
|
+
displaySmall: roleStyle(typography, "displaySmall"),
|
|
50
|
+
headlineLarge: roleStyle(typography, "headlineLarge"),
|
|
51
|
+
headlineMedium: roleStyle(typography, "headlineMedium"),
|
|
52
|
+
headlineSmall: roleStyle(typography, "headlineSmall"),
|
|
53
|
+
labelLarge: roleStyle(typography, "labelLarge"),
|
|
54
|
+
labelMedium: roleStyle(typography, "labelMedium"),
|
|
55
|
+
labelSmall: roleStyle(typography, "labelSmall"),
|
|
56
|
+
titleLarge: roleStyle(typography, "titleLarge"),
|
|
57
|
+
titleMedium: roleStyle(typography, "titleMedium"),
|
|
58
|
+
titleSmall: roleStyle(typography, "titleSmall")
|
|
59
|
+
}));
|
|
60
|
+
/**
|
|
61
|
+
* The style a type role draws in under the theme around the caller: its size,
|
|
62
|
+
* line height, weight and tracking from the role's tokens, and its family.
|
|
63
|
+
* Every component that sets text in a role draws it through this.
|
|
64
|
+
*/
|
|
65
|
+
function useTypeRole(role) {
|
|
66
|
+
const $ = c(4);
|
|
67
|
+
const theme = useTheme();
|
|
68
|
+
const family = useFontFamily(theme.typography[`${role}Font`]);
|
|
69
|
+
let t0;
|
|
70
|
+
if ($[0] !== family || $[1] !== role || $[2] !== theme) {
|
|
71
|
+
t0 = composeStyles(stylesOf(theme)[role], familyStyle(family));
|
|
72
|
+
$[0] = family;
|
|
73
|
+
$[1] = role;
|
|
74
|
+
$[2] = theme;
|
|
75
|
+
$[3] = t0;
|
|
76
|
+
} else t0 = $[3];
|
|
77
|
+
return t0;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { familyStyle, nativeWeight, useTypeRole };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=roles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.js","names":["StyleProp","TextStyle","StyleSheet","ResolvedTheme","useTheme","composeStyles","themedStyles","useFontFamily","TypeRole","WEIGHTS","const","familyStyles","Map","familyStyle","family","undefined","known","get","style","fontFamily","set","nativeWeight","weight","Math","min","max","round","roleStyle","typography","role","fontSize","fontWeight","letterSpacing","lineHeight","stylesOf","create","bodyLarge","bodyMedium","bodySmall","displayLarge","displayMedium","displaySmall","headlineLarge","headlineMedium","headlineSmall","labelLarge","labelMedium","labelSmall","titleLarge","titleMedium","titleSmall","useTypeRole","$","_c","theme","t0","_c"],"sources":["../../src/typography/roles.ts"],"sourcesContent":["import type { StyleProp, TextStyle } from 'react-native'\n\nimport { StyleSheet } from 'react-native'\n\nimport type { ResolvedTheme } from '../theme/scope'\n\nimport { useTheme } from '../theme/scope'\nimport { composeStyles, themedStyles } from '../theme/styles'\nimport { useFontFamily } from './fonts'\n\n/**\n * The type scale on Material Design's typography pages: the display, headline,\n * title, body and label roles at large, medium and small.\n */\ntype TypeRole =\n | 'bodyLarge'\n | 'bodyMedium'\n | 'bodySmall'\n | 'displayLarge'\n | 'displayMedium'\n | 'displaySmall'\n | 'headlineLarge'\n | 'headlineMedium'\n | 'headlineSmall'\n | 'labelLarge'\n | 'labelMedium'\n | 'labelSmall'\n | 'titleLarge'\n | 'titleMedium'\n | 'titleSmall'\n\n// The weights React Native names. A variable font on web takes any weight from\n// 1 to 1000, and native takes the nearest of these.\nconst WEIGHTS = [100, 200, 300, 400, 500, 600, 700, 800, 900] as const\n\nconst familyStyles = new Map<string, TextStyle>()\n\n/**\n * The style that sets a family `useFontFamily` chose, one object per family,\n * so every text drawn in it is handed the same one.\n */\nfunction familyStyle(family: string | undefined): TextStyle | undefined {\n if (family === undefined) {\n return undefined\n }\n\n const known = familyStyles.get(family)\n\n if (known !== undefined) {\n return known\n }\n\n const style = { fontFamily: family }\n\n familyStyles.set(family, style)\n\n return style\n}\n\n/** The weight React Native takes nearest a token's, from 1 to 1000. */\nfunction nativeWeight(weight: number) {\n return WEIGHTS[Math.min(Math.max(Math.round(weight / 100), 1), 9) - 1]\n}\n\n// Every role sets all four of its measures rather than inheriting any, so a\n// role nested in another's text keeps its own line height and tracking, as on\n// web. The family is the fifth, and is chosen at render by useFontFamily.\nfunction roleStyle(\n typography: ResolvedTheme['typography'],\n role: TypeRole,\n): TextStyle {\n return {\n fontSize: typography[`${role}Size`],\n fontWeight: nativeWeight(typography[`${role}Weight`]),\n letterSpacing: typography[`${role}Tracking`],\n lineHeight: typography[`${role}LineHeight`],\n }\n}\n\nconst stylesOf = themedStyles(({ typography }) =>\n StyleSheet.create({\n bodyLarge: roleStyle(typography, 'bodyLarge'),\n bodyMedium: roleStyle(typography, 'bodyMedium'),\n bodySmall: roleStyle(typography, 'bodySmall'),\n displayLarge: roleStyle(typography, 'displayLarge'),\n displayMedium: roleStyle(typography, 'displayMedium'),\n displaySmall: roleStyle(typography, 'displaySmall'),\n headlineLarge: roleStyle(typography, 'headlineLarge'),\n headlineMedium: roleStyle(typography, 'headlineMedium'),\n headlineSmall: roleStyle(typography, 'headlineSmall'),\n labelLarge: roleStyle(typography, 'labelLarge'),\n labelMedium: roleStyle(typography, 'labelMedium'),\n labelSmall: roleStyle(typography, 'labelSmall'),\n titleLarge: roleStyle(typography, 'titleLarge'),\n titleMedium: roleStyle(typography, 'titleMedium'),\n titleSmall: roleStyle(typography, 'titleSmall'),\n }),\n)\n\n/**\n * The style a type role draws in under the theme around the caller: its size,\n * line height, weight and tracking from the role's tokens, and its family.\n * Every component that sets text in a role draws it through this.\n */\nfunction useTypeRole(role: TypeRole): StyleProp<TextStyle> {\n const theme = useTheme()\n const family = useFontFamily(theme.typography[`${role}Font`])\n\n return composeStyles(stylesOf(theme)[role], familyStyle(family))\n}\n\nexport { familyStyle, nativeWeight, useTypeRole }\nexport type { TypeRole }\n"],"mappings":";;;;;;AAiCA,MAAMS,UAAU;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG;AAE5D,MAAME,+BAAe,IAAIC,IAAuB;;;;;AAMhD,SAASC,YAAYC,QAAmD;CACtE,IAAIA,WAAWC,KAAAA,GACb;CAGF,MAAMC,QAAQL,aAAaM,IAAIH,MAAM;CAErC,IAAIE,UAAUD,KAAAA,GACZ,OAAOC;CAGT,MAAME,QAAQ,EAAEC,YAAYL,OAAO;CAEnCH,aAAaS,IAAIN,QAAQI,KAAK;CAE9B,OAAOA;AACT;;AAGA,SAASG,aAAaC,QAAgB;CACpC,OAAOb,QAAQc,KAAKC,IAAID,KAAKE,IAAIF,KAAKG,MAAMJ,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI;AACtE;AAKA,SAASK,UACPC,YACAC,MACW;CACX,OAAO;EACLC,UAAUF,WAAW,GAAGC,KAAI;EAC5BE,YAAYV,aAAaO,WAAW,GAAGC,KAAI,QAAS;EACpDG,eAAeJ,WAAW,GAAGC,KAAI;EACjCI,YAAYL,WAAW,GAAGC,KAAI;CAChC;AACF;AAEA,MAAMK,WAAW5B,cAAc,EAAEsB,iBAC/B1B,WAAWiC,OAAO;CAChBC,WAAWT,UAAUC,YAAY,WAAW;CAC5CS,YAAYV,UAAUC,YAAY,YAAY;CAC9CU,WAAWX,UAAUC,YAAY,WAAW;CAC5CW,cAAcZ,UAAUC,YAAY,cAAc;CAClDY,eAAeb,UAAUC,YAAY,eAAe;CACpDa,cAAcd,UAAUC,YAAY,cAAc;CAClDc,eAAef,UAAUC,YAAY,eAAe;CACpDe,gBAAgBhB,UAAUC,YAAY,gBAAgB;CACtDgB,eAAejB,UAAUC,YAAY,eAAe;CACpDiB,YAAYlB,UAAUC,YAAY,YAAY;CAC9CkB,aAAanB,UAAUC,YAAY,aAAa;CAChDmB,YAAYpB,UAAUC,YAAY,YAAY;CAC9CoB,YAAYrB,UAAUC,YAAY,YAAY;CAC9CqB,aAAatB,UAAUC,YAAY,aAAa;CAChDsB,YAAYvB,UAAUC,YAAY,YAAY;AAChD,CAAC,CACH;;;;;;AAOA,SAAAuB,YAAAtB,MAAA;CAAA,MAAAuB,IAAAC,EAAA,CAAA;CACE,MAAAC,QAAclD,SAAS;CACvB,MAAAU,SAAeP,cAAc+C,MAAK1B,WAAY,GAAGC,KAAI,MAAO;CAAC,IAAA0B;CAAA,IAAAH,EAAA,OAAAtC,UAAAsC,EAAA,OAAAvB,QAAAuB,EAAA,OAAAE,OAAA;EAEtDC,KAAAlD,cAAc6B,SAASoB,KAAK,CAAC,CAACzB,OAAOhB,YAAYC,MAAM,CAAC;EAACsC,EAAA,KAAAtC;EAAAsC,EAAA,KAAAvB;EAAAuB,EAAA,KAAAE;EAAAF,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAAzDG;AAAyD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,134 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanso-labs/react-native-kanso-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Kanso UI's Material Design components for React Native, themed through the same --kui-* design tokens as the web library",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react-native",
|
|
7
|
+
"expo",
|
|
8
|
+
"material-design",
|
|
9
|
+
"design-system",
|
|
10
|
+
"design-tokens",
|
|
11
|
+
"components"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"type": "module",
|
|
31
|
+
"sideEffects": false,
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/kanso-labs/react-native-kanso-ui.git"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "npm run tokens:build && tsc -b && tsdown",
|
|
38
|
+
"build-storybook": "storybook build",
|
|
39
|
+
"format": "oxfmt",
|
|
40
|
+
"format:check": "oxfmt --check",
|
|
41
|
+
"lint": "npm run tokens:build && oxlint --type-aware . && eslint . && npm run format:check",
|
|
42
|
+
"package:check": "publint && attw --pack --profile esm-only",
|
|
43
|
+
"prepare": "husky || true",
|
|
44
|
+
"storybook": "storybook dev -p ${PORT:-6006}",
|
|
45
|
+
"test": "npm run tokens:build && jest",
|
|
46
|
+
"test:coverage": "npm run tokens:build && jest --coverage",
|
|
47
|
+
"test:storybook": "vitest run --mode development",
|
|
48
|
+
"tokens:build": "node scripts/build-tokens.mjs"
|
|
49
|
+
},
|
|
50
|
+
"author": "Kanso Labs <kanso.labs.org@gmail.com>",
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@internationalized/number": "3.6.9",
|
|
53
|
+
"react-stately": "3.51.0"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@arethetypeswrong/cli": "0.18.5",
|
|
57
|
+
"@babel/core": "7.29.7",
|
|
58
|
+
"@babel/plugin-transform-dynamic-import": "7.29.7",
|
|
59
|
+
"@codecov/rollup-plugin": "2.0.1",
|
|
60
|
+
"@commitlint/cli": "21.2.3",
|
|
61
|
+
"@commitlint/config-conventional": "21.2.3",
|
|
62
|
+
"@eslint/js": "10.0.1",
|
|
63
|
+
"@jest/globals": "29.7.0",
|
|
64
|
+
"@kanso-labs/kanso-ui": "0.43.2",
|
|
65
|
+
"@kanso-labs/unplugin-style-dictionary": "0.10.29",
|
|
66
|
+
"@react-native/babel-preset": "0.86.3",
|
|
67
|
+
"@react-native/jest-preset": "0.86.3",
|
|
68
|
+
"@rolldown/plugin-babel": "0.2.4",
|
|
69
|
+
"@storybook/addon-a11y": "10.6.2",
|
|
70
|
+
"@storybook/addon-docs": "10.6.2",
|
|
71
|
+
"@storybook/addon-vitest": "10.6.2",
|
|
72
|
+
"@storybook/react": "10.6.2",
|
|
73
|
+
"@storybook/react-native-web-vite": "10.6.2",
|
|
74
|
+
"@testing-library/react-native": "14.1.0",
|
|
75
|
+
"@types/node": "26.6.5",
|
|
76
|
+
"@types/react": "19.2.18",
|
|
77
|
+
"@vitest/browser-playwright": "5.0.4",
|
|
78
|
+
"babel-plugin-react-compiler": "1.0.0",
|
|
79
|
+
"eslint": "10.12.0",
|
|
80
|
+
"eslint-plugin-oxlint": "1.88.0",
|
|
81
|
+
"eslint-plugin-perfectionist": "5.12.1",
|
|
82
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
83
|
+
"globals": "17.13.0",
|
|
84
|
+
"husky": "9.1.7",
|
|
85
|
+
"jest": "29.7.0",
|
|
86
|
+
"jest-junit": "17.0.0",
|
|
87
|
+
"lint-staged": "17.6.0",
|
|
88
|
+
"oxfmt": "0.73.0",
|
|
89
|
+
"oxlint": "1.88.0",
|
|
90
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
91
|
+
"playwright": "1.64.1",
|
|
92
|
+
"publint": "0.3.25",
|
|
93
|
+
"react": "19.2.3",
|
|
94
|
+
"react-dom": "19.2.3",
|
|
95
|
+
"react-native": "0.86.3",
|
|
96
|
+
"react-native-gesture-handler": "2.33.0",
|
|
97
|
+
"react-native-reanimated": "4.5.1",
|
|
98
|
+
"react-native-safe-area-context": "5.10.1",
|
|
99
|
+
"react-native-svg": "15.15.5",
|
|
100
|
+
"react-native-web": "0.21.4",
|
|
101
|
+
"react-native-worklets": "0.10.1",
|
|
102
|
+
"storybook": "10.6.2",
|
|
103
|
+
"style-dictionary": "5.6.1",
|
|
104
|
+
"test-renderer": "1.3.1",
|
|
105
|
+
"tsdown": "0.23.1",
|
|
106
|
+
"typescript": "6.0.3",
|
|
107
|
+
"typescript-eslint": "8.71.2",
|
|
108
|
+
"vite": "8.3.4",
|
|
109
|
+
"vitest": "5.0.4"
|
|
110
|
+
},
|
|
111
|
+
"peerDependencies": {
|
|
112
|
+
"expo-clipboard": ">=57.0.0",
|
|
113
|
+
"expo-font": ">=57.0.0",
|
|
114
|
+
"react": ">=19.2.0",
|
|
115
|
+
"react-native": ">=0.86.0",
|
|
116
|
+
"react-native-gesture-handler": "^2.32.0 || ^3.0.0",
|
|
117
|
+
"react-native-reanimated": "^4.5.0",
|
|
118
|
+
"react-native-safe-area-context": "^5.0.0",
|
|
119
|
+
"react-native-svg": "^15.15.0"
|
|
120
|
+
},
|
|
121
|
+
"peerDependenciesMeta": {
|
|
122
|
+
"expo-clipboard": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"expo-font": {
|
|
126
|
+
"optional": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"overrides": {
|
|
130
|
+
"eslint-plugin-oxlint": {
|
|
131
|
+
"oxlint": "$oxlint"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|