@kanso-labs/kanso-ui 0.4.6 → 0.5.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.
Files changed (77) hide show
  1. package/dist/assets/stylex.css +50 -0
  2. package/dist/components/card/index.d.ts +19 -7
  3. package/dist/components/card/index.js +35 -14
  4. package/dist/components/card/index.js.map +1 -1
  5. package/dist/components/index.d.ts +3 -1
  6. package/dist/components/list-detail/index.d.ts +41 -0
  7. package/dist/components/list-detail/index.js +42 -0
  8. package/dist/components/list-detail/index.js.map +1 -0
  9. package/dist/components/supporting-pane/index.d.ts +29 -0
  10. package/dist/components/supporting-pane/index.js +94 -0
  11. package/dist/components/supporting-pane/index.js.map +1 -0
  12. package/dist/index.d.ts +3 -1
  13. package/dist/index.js +3 -1
  14. package/package.json +7 -5
  15. package/dist/cjs/assets/stylex.css +0 -1655
  16. package/dist/cjs/components/avatar/index.cjs +0 -89
  17. package/dist/cjs/components/avatar/index.cjs.map +0 -1
  18. package/dist/cjs/components/avatar/index.d.cts +0 -29
  19. package/dist/cjs/components/badge/index.cjs +0 -93
  20. package/dist/cjs/components/badge/index.cjs.map +0 -1
  21. package/dist/cjs/components/badge/index.d.cts +0 -27
  22. package/dist/cjs/components/button/index.cjs +0 -101
  23. package/dist/cjs/components/button/index.cjs.map +0 -1
  24. package/dist/cjs/components/button/index.d.cts +0 -22
  25. package/dist/cjs/components/card/index.cjs +0 -84
  26. package/dist/cjs/components/card/index.cjs.map +0 -1
  27. package/dist/cjs/components/card/index.d.cts +0 -29
  28. package/dist/cjs/components/chip/index.cjs +0 -53
  29. package/dist/cjs/components/chip/index.cjs.map +0 -1
  30. package/dist/cjs/components/chip/index.d.cts +0 -13
  31. package/dist/cjs/components/code/index.cjs +0 -51
  32. package/dist/cjs/components/code/index.cjs.map +0 -1
  33. package/dist/cjs/components/code/index.d.cts +0 -11
  34. package/dist/cjs/components/copy-field/index.cjs +0 -59
  35. package/dist/cjs/components/copy-field/index.cjs.map +0 -1
  36. package/dist/cjs/components/copy-field/index.d.cts +0 -36
  37. package/dist/cjs/components/currency/index.cjs +0 -56
  38. package/dist/cjs/components/currency/index.cjs.map +0 -1
  39. package/dist/cjs/components/currency/index.d.cts +0 -36
  40. package/dist/cjs/components/icon-button/index.cjs +0 -80
  41. package/dist/cjs/components/icon-button/index.cjs.map +0 -1
  42. package/dist/cjs/components/icon-button/index.d.cts +0 -32
  43. package/dist/cjs/components/index.d.cts +0 -18
  44. package/dist/cjs/components/keycap/index.cjs +0 -52
  45. package/dist/cjs/components/keycap/index.cjs.map +0 -1
  46. package/dist/cjs/components/keycap/index.d.cts +0 -12
  47. package/dist/cjs/components/link/index.cjs +0 -61
  48. package/dist/cjs/components/link/index.cjs.map +0 -1
  49. package/dist/cjs/components/link/index.d.cts +0 -30
  50. package/dist/cjs/components/list-item/index.cjs +0 -42
  51. package/dist/cjs/components/list-item/index.cjs.map +0 -1
  52. package/dist/cjs/components/list-item/index.d.cts +0 -22
  53. package/dist/cjs/components/separator/index.cjs +0 -34
  54. package/dist/cjs/components/separator/index.cjs.map +0 -1
  55. package/dist/cjs/components/separator/index.d.cts +0 -14
  56. package/dist/cjs/components/sheet/index.cjs +0 -266
  57. package/dist/cjs/components/sheet/index.cjs.map +0 -1
  58. package/dist/cjs/components/sheet/index.d.cts +0 -73
  59. package/dist/cjs/components/tabs/index.cjs +0 -77
  60. package/dist/cjs/components/tabs/index.cjs.map +0 -1
  61. package/dist/cjs/components/tabs/index.d.cts +0 -24
  62. package/dist/cjs/components/text/index.cjs +0 -173
  63. package/dist/cjs/components/text/index.cjs.map +0 -1
  64. package/dist/cjs/components/text/index.d.cts +0 -19
  65. package/dist/cjs/components/text-field/index.cjs +0 -53
  66. package/dist/cjs/components/text-field/index.cjs.map +0 -1
  67. package/dist/cjs/components/text-field/index.d.cts +0 -30
  68. package/dist/cjs/hooks/useRipple.cjs +0 -391
  69. package/dist/cjs/hooks/useRipple.cjs.map +0 -1
  70. package/dist/cjs/index.cjs +0 -35
  71. package/dist/cjs/index.d.cts +0 -19
  72. package/dist/cjs/node_modules/@stylexjs/stylex/lib/es/stylex.cjs +0 -121
  73. package/dist/cjs/node_modules/@stylexjs/stylex/lib/es/stylex.cjs.map +0 -1
  74. package/dist/cjs/styles/ripple.cjs +0 -33
  75. package/dist/cjs/styles/ripple.cjs.map +0 -1
  76. package/dist/cjs/tokens/values.cjs +0 -36
  77. package/dist/cjs/tokens/values.cjs.map +0 -1
@@ -1,33 +0,0 @@
1
- //#region src/styles/ripple.ts
2
- const styles = {
3
- press: {
4
- kKwaWg: "xliahv6",
5
- kbCHJM: "xu96u03",
6
- kSiTet: "xg01cxk",
7
- kVAEAm: "x10l6tqk",
8
- k87sOh: "x13vifvy",
9
- k3nNDw: "x1g0ag68",
10
- kIyJzY: "xbg8nd6",
11
- k1ekBW: "x19991ni",
12
- kAMwcw: "xcj1dhv",
13
- $$css: true
14
- },
15
- pressed: {
16
- kSiTet: "xjg27g",
17
- kIyJzY: "xjl7l83",
18
- $$css: true
19
- },
20
- surface: {
21
- kaIpWk: "x1pjcqnp",
22
- k1xSpc: "x1lliihq x1c7sf14",
23
- kpwlN0: "x10a8y8t",
24
- kVQacm: "xb3r6kr",
25
- kfzvcC: "x47corl",
26
- kVAEAm: "x10l6tqk",
27
- $$css: true
28
- }
29
- };
30
- //#endregion
31
- exports.rippleStyles = styles;
32
-
33
- //# sourceMappingURL=ripple.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ripple.cjs","names":[],"sources":["../../../src/styles/ripple.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { stateLayerOpacity } from '../tokens/design.tokens.stylex';\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// Growth and opacity are two independent mechanisms. Growth (width/height/\n// transform) is driven imperatively via the Web Animations API in\n// useRipple, decoupled from press/release timing so it always plays out\n// over a fixed duration. Opacity is what this file owns — toggled by the\n// `pressed` class — with a fast fade-in and a slower fade-out, so a quick\n// tap still reads as a deliberate, visible ripple rather than a flicker.\n//\n// None of the three timings below is a motion token, and that is deliberate\n// rather than an oversight predating them. The fade pair is the asymmetry\n// the paragraph above describes: 105ms in against 375ms out, hand-tuned as\n// a ratio to each other, and neither lands on the scale (105ms is near\n// durationShort1's 100ms; 375ms sits between durationMedium3 and\n// durationLong1). Snapping either to its nearest token would flatten a\n// tuned asymmetry into two arbitrary values, and adding tokens to fit would\n// make a scale that documents itself as three bands of three describe this\n// component instead. `linear` is likewise not on the easing scale, and\n// belongs off it — a fade to and from a state layer wants no acceleration,\n// which is why every curve in the token set is the wrong answer here.\n//\n// These three are now the only ripple timings off the scale. Everything\n// useRipple drives from JS is a token, read through src/tokens/values\n// because element.animate() and setTimeout both reject the StyleX form.\n//\n// The gradient's soft edge (a currentColor disc fading to transparent over\n// its outer 30-35%, capped at 70px) replaces a hard-edged circle so the\n// ripple blends into the surface rather than looking like a solid dot.\n//\n// `closest-side` + a plain circular box means no `border-radius` is needed\n// on the ripple itself — the gradient's own shape reads as a circle.\nconst styles = {\n press: {\n kKwaWg: \"xliahv6\",\n kbCHJM: \"xu96u03\",\n kSiTet: \"xg01cxk\",\n kVAEAm: \"x10l6tqk\",\n k87sOh: \"x13vifvy\",\n k3nNDw: \"x1g0ag68\",\n kIyJzY: \"xbg8nd6\",\n k1ekBW: \"x19991ni\",\n kAMwcw: \"xcj1dhv\",\n $$css: true\n },\n pressed: {\n kSiTet: \"xjg27g\",\n kIyJzY: \"xjl7l83\",\n $$css: true\n },\n surface: {\n kaIpWk: \"x1pjcqnp\",\n k1xSpc: \"x1lliihq x1c7sf14\",\n kpwlN0: \"x10a8y8t\",\n kVQacm: \"xb3r6kr\",\n kfzvcC: \"x47corl\",\n kVAEAm: \"x10l6tqk\",\n $$css: true\n }\n};\nexport { styles as rippleStyles };"],"mappings":";AAkCA,MAAM,SAAS;CACb,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
@@ -1,36 +0,0 @@
1
- //#region src/tokens/values.ts
2
- const motionDurationMs = {
3
- long1: 450,
4
- long2: 500,
5
- long3: 600,
6
- medium1: 250,
7
- medium2: 300,
8
- medium3: 350,
9
- short1: 100,
10
- short2: 150,
11
- short3: 200
12
- };
13
- const motionEasing = {
14
- emphasized: "cubic-bezier(0.2, 0, 0, 1)",
15
- emphasizedAccelerate: "cubic-bezier(0.3, 0, 0.8, 0.15)",
16
- emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1)",
17
- springFast: "cubic-bezier(0.34, 1.56, 0.64, 1)",
18
- springSlow: "cubic-bezier(0.16, 1, 0.3, 1)",
19
- standard: "cubic-bezier(0.2, 0, 0, 1)"
20
- };
21
- const spacingPx = {
22
- lg: 16,
23
- md: 12,
24
- sm: 8,
25
- xl: 24,
26
- xs: 4,
27
- xxl: 32,
28
- xxs: 2,
29
- xxxl: 40
30
- };
31
- //#endregion
32
- exports.motionDurationMs = motionDurationMs;
33
- exports.motionEasing = motionEasing;
34
- exports.spacingPx = spacingPx;
35
-
36
- //# sourceMappingURL=values.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"values.cjs","names":[],"sources":["../../../src/tokens/values.ts"],"sourcesContent":["// AUTO-GENERATED by scripts/build-tokens.mjs from the sibling design.tokens.json.\n// Do not hand-edit — change design.tokens.json and run `npm run tokens:build`.\n//\n// Tokens as plain JS values, for the code that cannot take a CSS one. Reach for\n// the StyleX theme in design.tokens.stylex.ts anywhere a CSS property value\n// will do: those are var(--kui-*, literal) references, so a consumer who\n// redeclares the custom property moves them. The literals below are frozen at\n// build time and cannot honour such an override, which is the whole cost of\n// using them.\n//\n// So a group appears here only once something has to compute with it rather\n// than declare it, which today means two:\n//\n// motion — element.animate() throws a TypeError on a var() duration or\n// easing, and its duration wants a number of milliseconds, so even\n// '450ms' throws. setTimeout coerces a string to NaN and fires\n// immediately, silently.\n// spacing — useRipple does arithmetic with it, growing the ripple past the\n// host's corners by a fixed inset. A var() would concatenate into\n// nonsense rather than add.\n//\n// Colours, radii, shadows, typography and the state-layer opacities are all\n// declared rather than computed, so none of them is generated here.\n\nconst motionDurationMs = {\n long1: 450,\n long2: 500,\n long3: 600,\n medium1: 250,\n medium2: 300,\n medium3: 350,\n short1: 100,\n short2: 150,\n short3: 200,\n} as const\n\nconst motionEasing = {\n emphasized: 'cubic-bezier(0.2, 0, 0, 1)',\n emphasizedAccelerate: 'cubic-bezier(0.3, 0, 0.8, 0.15)',\n emphasizedDecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1)',\n springFast: 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n springSlow: 'cubic-bezier(0.16, 1, 0.3, 1)',\n standard: 'cubic-bezier(0.2, 0, 0, 1)',\n} as const\n\nconst spacingPx = {\n lg: 16,\n md: 12,\n sm: 8,\n xl: 24,\n xs: 4,\n xxl: 32,\n xxs: 2,\n xxxl: 40,\n} as const\n\nexport { motionDurationMs, motionEasing, spacingPx }\n"],"mappings":";AAwBA,MAAM,mBAAmB;CACvB,OAAO;CACP,OAAO;CACP,OAAO;CACP,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,QAAQ;AACV;AAEA,MAAM,eAAe;CACnB,YAAY;CACZ,sBAAsB;CACtB,sBAAsB;CACtB,YAAY;CACZ,YAAY;CACZ,UAAU;AACZ;AAEA,MAAM,YAAY;CAChB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,KAAK;CACL,KAAK;CACL,MAAM;AACR"}