@sableui/react 0.1.1 → 0.2.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 (61) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/{_contract-CYScOdf5.d.ts → _contract-o3tUc8Ig.d.ts} +1 -1
  3. package/dist/{chunk-J23ELQQZ.js → chunk-AOWBYEQ6.js} +4177 -1917
  4. package/dist/{chunk-RWP4XBSK.js → chunk-KFZ43RKU.js} +1 -1
  5. package/dist/{chunk-JI7WJP2L.js → chunk-X276MF2W.js} +5 -0
  6. package/dist/foundations/index.js +1 -1
  7. package/dist/index.d.ts +155 -101
  8. package/dist/index.js +582 -2778
  9. package/dist/ios/index.d.ts +6 -1
  10. package/dist/ios/index.js +4 -4
  11. package/dist/ios/preview.js +1 -1
  12. package/dist/ios/styles.css +20 -6
  13. package/dist/patterns/index.js +1683 -469
  14. package/dist/presets/index.d.ts +1 -1
  15. package/dist/presets/index.js +1 -1
  16. package/dist/styles.css +238 -40
  17. package/dist/{theme-provider-BWcizhAt.d.ts → theme-provider-BE-KqUG-.d.ts} +1 -1
  18. package/dist/themes/atelier/atelier.css +3 -0
  19. package/dist/themes/atelier/index.d.ts +1 -1
  20. package/dist/themes/base/base.css +11 -4
  21. package/dist/themes/base/index.d.ts +1 -1
  22. package/dist/themes/ember/ember.css +3 -0
  23. package/dist/themes/ember/index.d.ts +1 -1
  24. package/dist/themes/index.d.ts +2 -2
  25. package/dist/themes/meridian/index.d.ts +1 -1
  26. package/dist/themes/meridian/meridian.css +10 -5
  27. package/dist/themes/poppy/index.d.ts +1 -1
  28. package/dist/themes/poppy/poppy.css +16 -0
  29. package/dist/themes/prism/index.d.ts +1 -1
  30. package/dist/themes/prism/prism.css +4 -1
  31. package/dist/themes/verdant/index.d.ts +1 -1
  32. package/dist/themes/verdant/verdant.css +7 -2
  33. package/llms/components/bubble.md +5 -5
  34. package/llms/components/checkbox-card.md +1 -1
  35. package/llms/components/context-card.md +2 -2
  36. package/llms/components/dialog.md +1 -1
  37. package/llms/components/empty-state.md +4 -4
  38. package/llms/components/entity.md +1 -1
  39. package/llms/components/fieldset.md +1 -1
  40. package/llms/components/kbd.md +18 -6
  41. package/llms/components/pill.md +1 -1
  42. package/llms/components/side-nav.md +1 -1
  43. package/llms/components/skeleton.md +1 -1
  44. package/llms/components/theme-selector.md +1 -1
  45. package/llms/foundations/shape.md +1 -1
  46. package/llms/patterns/auth-page.md +132 -42
  47. package/llms/patterns/brand-landing-page.md +271 -175
  48. package/llms/patterns/chat-panel.md +120 -39
  49. package/llms/patterns/dashboard-page.md +277 -65
  50. package/llms/patterns/feed-page.md +245 -64
  51. package/llms/patterns/landing-page.md +473 -75
  52. package/llms/patterns/list-detail-page.md +385 -68
  53. package/llms/patterns/settings-page.md +279 -67
  54. package/llms/reference/token-intent.md +4 -2
  55. package/llms/reference/utilities.md +20 -5
  56. package/llms-full.txt +2244 -727
  57. package/llms.txt +14 -15
  58. package/package.json +1 -1
  59. package/registry.json +261 -238
  60. package/targets/ios.json +4 -15
  61. package/llms/components/description.md +0 -96
@@ -45,7 +45,12 @@ declare function NavigationStack({ children, active, label }: {
45
45
  label: string;
46
46
  }): react.JSX.Element;
47
47
 
48
- /** Browser dialog owns focus trapping, Escape, inert background, and restoration. */
48
+ /**
49
+ * An iOS 26 sheet. At the medium detent it floats inset from the screen edges in
50
+ * Liquid Glass; at the large detent it is opaque and meets the bottom edge. The
51
+ * header is a glass close button and a centered inline title.
52
+ * Browser dialog owns focus trapping, Escape, inert background, and restoration.
53
+ */
49
54
  declare function IosSheet({ open, onOpenChange, title, children, detent }: {
50
55
  open: boolean;
51
56
  onOpenChange: (open: boolean) => void;
package/dist/ios/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { StatusIcons } from '../chunk-NEQNXI2G.js';
2
- import { App, Sheet, Button, Page, NavbarBackLink, TabbarLink, Navbar, Tabbar, Glass } from 'konsta/react';
2
+ import { App, Sheet, Button, Glass, Page, NavbarBackLink, TabbarLink, Navbar, Tabbar } from 'konsta/react';
3
3
  import { createContext, useEffect, useContext, useState, useRef, useId } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -245,7 +245,7 @@ function IosSheet({ open, onOpenChange, title, children, detent = "medium" }) {
245
245
  onClick: (event) => {
246
246
  if (event.target === event.currentTarget) onOpenChange(false);
247
247
  },
248
- children: /* @__PURE__ */ jsxs(Sheet, { opened: shown, backdrop: false, className: "ios-sheet", style: { height: expanded ? "90%" : "56%" }, children: [
248
+ children: /* @__PURE__ */ jsxs(Sheet, { opened: shown, backdrop: false, className: "ios-sheet", "data-detent": expanded ? "large" : "medium", style: { height: expanded ? "90%" : "56%" }, children: [
249
249
  /* @__PURE__ */ jsx(
250
250
  Button,
251
251
  {
@@ -276,8 +276,8 @@ function IosSheet({ open, onOpenChange, title, children, detent = "medium" }) {
276
276
  }
277
277
  ),
278
278
  /* @__PURE__ */ jsxs("div", { className: "ios-sheet-heading", children: [
279
- /* @__PURE__ */ jsx("h2", { id: titleId, tabIndex: -1, children: title }),
280
- /* @__PURE__ */ jsx(Button, { clear: true, onClick: () => onOpenChange(false), children: "Cancel" })
279
+ /* @__PURE__ */ jsx(Glass, { className: "ios-sheet-close", children: /* @__PURE__ */ jsx(Button, { inline: true, rounded: true, clear: true, className: "ios-icon-action", "aria-label": "Close", onClick: () => onOpenChange(false), children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M3.5 3.5l9 9m0-9l-9 9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", fill: "none" }) }) }) }),
280
+ /* @__PURE__ */ jsx("h2", { id: titleId, tabIndex: -1, children: title })
281
281
  ] }),
282
282
  /* @__PURE__ */ jsx("div", { className: "ios-sheet-content", children })
283
283
  ] })
@@ -1,4 +1,4 @@
1
- import { Phone } from '../chunk-RWP4XBSK.js';
1
+ import { Phone } from '../chunk-KFZ43RKU.js';
2
2
  import '../chunk-NEQNXI2G.js';
3
3
  import '../chunk-SRQWQUTW.js';
4
4
  import { useRef, useState, useEffect, useCallback } from 'react';
@@ -61,17 +61,31 @@
61
61
  .ios-prototype .native-tabbar > .k-glass { width: 100%; }
62
62
  .ios-sheet-dialog { position: fixed; inset: 0; padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; color: var(--ios-ink); overflow: hidden; }
63
63
  .ios-sheet-dialog::backdrop { background: #0005; }
64
- .ios-sheet { border-radius: 32px 32px 0 0; background: var(--ios-canvas); transition-duration: var(--ios-motion); padding-bottom: 34px; }
64
+ /* iOS 26 sheets. Large: opaque, attached to the bottom edge. Medium: floats 8px in from
65
+ the edges, concentric with the screen corners, in the same glass as the bars. */
66
+ .ios-sheet { border-radius: 38px 38px 0 0; background: var(--ios-canvas); transition-duration: var(--ios-motion); padding-bottom: 34px; }
67
+ .ios-sheet[data-detent='medium'] {
68
+ /* Concentric: the top with the close button (its 22px radius + 16px inset), the
69
+ bottom with the 62px screen corner, less the 8px float. */
70
+ left: 8px; right: 8px; top: calc(100% - 8px); border-radius: 38px 38px 54px 54px; padding-bottom: 26px;
71
+ background: color-mix(in srgb, var(--ios-canvas) calc(max(var(--ios-glass-tint, .7), .7) * 100%), transparent);
72
+ -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
73
+ box-shadow: inset 0 .75px .5px rgb(255 255 255 / .6), 0 8px 40px color-mix(in srgb, var(--ios-ink) 14%, transparent);
74
+ }
75
+ .ios-prototype.dark .ios-sheet[data-detent='medium'], .dark .ios-sheet[data-detent='medium'] { box-shadow: inset 0 .75px .5px rgb(255 255 255 / .25), 0 8px 40px rgb(0 0 0 / .4); }
65
76
  .ios-sheet-grabber { display: flex; margin-inline: auto; width: 80px; touch-action: none; }
66
77
  .ios-grabber-mark { width: 36px; height: 5px; border-radius: 4px; background: var(--ios-secondary); }
67
- .ios-sheet-heading { display: flex; align-items: center; justify-content: space-between; padding-inline: 20px; }
68
- .ios-sheet-heading h2 { font-size: 22px; font-weight: 700; }
69
- .ios-sheet-heading > button { width: auto; flex-shrink: 0; }
70
- .ios-sheet::after { content: ''; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 4px; background: var(--ios-ink); }
78
+ /* A glass close button, a centered inline title, and an empty column that keeps it centered. */
79
+ .ios-sheet-heading { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding-inline: 16px; }
80
+ .ios-sheet-heading h2 { grid-column: 2; text-align: center; font-size: 17px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
81
+ .ios-sheet-close { grid-column: 1; grid-row: 1; border-radius: 9999px; color: var(--ios-ink); }
82
+ /* Glass on glass: the sheet already blurs what's behind, and refracting the sheet's own
83
+ flat surface only smears pale patches into the rim. Keep the fill and highlights. */
84
+ .ios-prototype .ios-sheet .k-glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
71
85
  .ios-sheet-content { height: calc(100% - 88px); overflow-y: auto; scrollbar-width: none; padding: 16px 20px; }
72
86
  .ios-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
73
87
  @keyframes ios-route-enter { from { opacity: .7; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
74
88
  @keyframes ios-route-back { from { opacity: .7; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
75
89
  .ios-prototype[data-reduced-motion] *, .ios-prototype[data-reduced-motion] *::before, .ios-prototype[data-reduced-motion] *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
76
90
  @media (prefers-reduced-motion: reduce) { .ios-prototype *, .ios-prototype *::before, .ios-prototype *::after { animation-duration: 0s !important; transition-duration: 0s !important; } }
77
- @media (prefers-reduced-transparency: reduce) { .ios-prototype { --ios-glass-tint: 1 !important; } }
91
+ @media (prefers-reduced-transparency: reduce) { .ios-prototype { --ios-glass-tint: 1 !important; } .ios-sheet[data-detent='medium'] { background: var(--ios-canvas); } }