@duro-app/ui 5.13.0 → 5.14.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 (109) hide show
  1. package/README.md +49 -0
  2. package/dist/{Table-Bms2ftt3.js → Table-DnaoH-h5.js} +747 -635
  3. package/dist/Table-DnaoH-h5.js.map +1 -0
  4. package/dist/components/Button/Button.d.ts.map +1 -1
  5. package/dist/components/ColorMode/ColorMode.d.ts +2 -1
  6. package/dist/components/ColorMode/ColorMode.d.ts.map +1 -1
  7. package/dist/components/ColorMode/storage.d.ts +4 -0
  8. package/dist/components/ColorMode/storage.d.ts.map +1 -0
  9. package/dist/components/ColorMode/styles.css.d.ts +4 -0
  10. package/dist/components/ColorMode/styles.css.d.ts.map +1 -1
  11. package/dist/components/ColorMode/useSystemScheme.d.ts +7 -0
  12. package/dist/components/ColorMode/useSystemScheme.d.ts.map +1 -0
  13. package/dist/components/Combobox/Combobox.d.ts +7 -2
  14. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  15. package/dist/components/Combobox/comboboxState.d.ts +29 -0
  16. package/dist/components/Combobox/comboboxState.d.ts.map +1 -0
  17. package/dist/components/Combobox/native.css.d.ts +27 -0
  18. package/dist/components/Combobox/native.css.d.ts.map +1 -0
  19. package/dist/components/Combobox/useComboboxRoot.d.ts +6 -10
  20. package/dist/components/Combobox/useComboboxRoot.d.ts.map +1 -1
  21. package/dist/components/Drawer/Drawer.d.ts +5 -2
  22. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  23. package/dist/components/Drawer/DrawerSnap.stories.d.ts +2 -0
  24. package/dist/components/Drawer/DrawerSnap.stories.d.ts.map +1 -1
  25. package/dist/components/Drawer/native.css.d.ts +4 -0
  26. package/dist/components/Drawer/native.css.d.ts.map +1 -1
  27. package/dist/components/Drawer/styles.css.d.ts +4 -0
  28. package/dist/components/Drawer/styles.css.d.ts.map +1 -1
  29. package/dist/components/Form/FormSubmitContext.d.ts +8 -0
  30. package/dist/components/Form/FormSubmitContext.d.ts.map +1 -0
  31. package/dist/components/Listbox/native.css.d.ts +84 -0
  32. package/dist/components/Listbox/native.css.d.ts.map +1 -0
  33. package/dist/components/Select/Select.d.ts +9 -2
  34. package/dist/components/Select/Select.d.ts.map +1 -1
  35. package/dist/components/Select/Select.stories.d.ts +11 -0
  36. package/dist/components/Select/Select.stories.d.ts.map +1 -1
  37. package/dist/components/Select/native.css.d.ts +11 -0
  38. package/dist/components/Select/native.css.d.ts.map +1 -0
  39. package/dist/components/Select/selectState.d.ts +21 -0
  40. package/dist/components/Select/selectState.d.ts.map +1 -0
  41. package/dist/components/Select/styles.css.d.ts +10 -0
  42. package/dist/components/Select/styles.css.d.ts.map +1 -1
  43. package/dist/components/Select/useSelectRoot.d.ts +6 -8
  44. package/dist/components/Select/useSelectRoot.d.ts.map +1 -1
  45. package/dist/components/ThemeProvider/ThemeOverrides.stories.d.ts +13 -0
  46. package/dist/components/ThemeProvider/ThemeOverrides.stories.d.ts.map +1 -0
  47. package/dist/components/ThemeProvider/ThemeProvider.d.ts +9 -2
  48. package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  49. package/dist/components/ThemeProvider/overrideRule.d.ts +7 -0
  50. package/dist/components/ThemeProvider/overrideRule.d.ts.map +1 -0
  51. package/dist/components/ThemeProvider/overrides.d.ts +16 -0
  52. package/dist/components/ThemeProvider/overrides.d.ts.map +1 -0
  53. package/dist/index.css +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +3302 -3268
  57. package/dist/index.js.map +1 -1
  58. package/dist/shared/textOf.d.ts +7 -0
  59. package/dist/shared/textOf.d.ts.map +1 -0
  60. package/dist/table.js +1 -1
  61. package/package.json +3 -2
  62. package/src/components/Button/Button.tsx +12 -1
  63. package/src/components/ColorMode/ColorMode.meta.ts +1 -1
  64. package/src/components/ColorMode/ColorMode.tsx +16 -37
  65. package/src/components/ColorMode/storage.native.ts +8 -0
  66. package/src/components/ColorMode/storage.ts +19 -0
  67. package/src/components/ColorMode/styles.css.ts +6 -0
  68. package/src/components/ColorMode/useSystemScheme.native.ts +6 -0
  69. package/src/components/ColorMode/useSystemScheme.ts +19 -0
  70. package/src/components/Combobox/Combobox.meta.ts +1 -1
  71. package/src/components/Combobox/Combobox.native.tsx +295 -0
  72. package/src/components/Combobox/Combobox.tsx +14 -8
  73. package/src/components/Combobox/comboboxState.ts +107 -0
  74. package/src/components/Combobox/native.css.ts +33 -0
  75. package/src/components/Combobox/useComboboxRoot.ts +17 -91
  76. package/src/components/Drawer/Drawer.meta.ts +1 -1
  77. package/src/components/Drawer/Drawer.native.tsx +29 -7
  78. package/src/components/Drawer/Drawer.tsx +11 -2
  79. package/src/components/Drawer/DrawerSnap.stories.tsx +22 -2
  80. package/src/components/Drawer/native.css.ts +4 -0
  81. package/src/components/Drawer/styles.css.ts +4 -0
  82. package/src/components/Form/Form.meta.ts +1 -1
  83. package/src/components/Form/Form.native.tsx +120 -0
  84. package/src/components/Form/FormSubmitContext.ts +12 -0
  85. package/src/components/Listbox/Listbox.meta.ts +1 -1
  86. package/src/components/Listbox/Listbox.native.tsx +153 -0
  87. package/src/components/Listbox/native.css.ts +91 -0
  88. package/src/components/ScrollArea/ScrollArea.meta.ts +1 -1
  89. package/src/components/ScrollArea/ScrollArea.native.tsx +61 -0
  90. package/src/components/Select/Select.meta.ts +1 -1
  91. package/src/components/Select/Select.native.tsx +224 -0
  92. package/src/components/Select/Select.stories.tsx +49 -1
  93. package/src/components/Select/Select.tsx +20 -3
  94. package/src/components/Select/native.css.ts +13 -0
  95. package/src/components/Select/selectState.ts +36 -0
  96. package/src/components/Select/styles.css.ts +11 -0
  97. package/src/components/Select/useSelectRoot.ts +9 -30
  98. package/src/components/ThemeProvider/ThemeOverrides.stories.tsx +113 -0
  99. package/src/components/ThemeProvider/ThemeProvider.meta.ts +1 -1
  100. package/src/components/ThemeProvider/ThemeProvider.native.tsx +36 -7
  101. package/src/components/ThemeProvider/ThemeProvider.tsx +42 -6
  102. package/src/components/ThemeProvider/overrideRule.ts +39 -0
  103. package/src/components/ThemeProvider/overrides.ts +27 -0
  104. package/src/form.native.ts +7 -0
  105. package/src/index.native.ts +15 -0
  106. package/src/index.ts +1 -0
  107. package/src/shared/focusInput.native.ts +18 -0
  108. package/src/shared/textOf.ts +13 -0
  109. package/dist/Table-Bms2ftt3.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ export interface ComboboxStateOptions {
2
+ defaultValue?: string;
3
+ value?: string;
4
+ onValueChange?: (value: string | null) => void;
5
+ inputValue?: string;
6
+ onInputChange?: (value: string) => void;
7
+ initialLabels?: Record<string, string>;
8
+ }
9
+ /** Whether an option's label matches what was typed: a case-insensitive substring. */
10
+ export declare function matchesQuery(label: string, query: string): boolean;
11
+ /**
12
+ * The Combobox's state both platforms share (plan N0, Decision 10): the value
13
+ * and the typed text (each controlled or not), whether it is open, each
14
+ * option's label, choosing an option, and the text/value reconcile on close.
15
+ * Highlight, document order, keys and DOM focus are the web adapter's
16
+ * (useComboboxRoot); the sheet and its pinned input are Combobox.native's.
17
+ */
18
+ export declare function useComboboxState({ defaultValue, value: controlledValue, onValueChange, inputValue: controlledInputValue, onInputChange, initialLabels, }: ComboboxStateOptions): {
19
+ value: string | null;
20
+ setValue: (v: string | null) => void;
21
+ inputValue: string;
22
+ setInputValue: (v: string) => void;
23
+ open: boolean;
24
+ setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
25
+ labels: Record<string, string>;
26
+ registerLabel: (v: string, label: string) => void;
27
+ chooseValue: (itemValue: string) => void;
28
+ };
29
+ //# sourceMappingURL=comboboxState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comboboxState.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/comboboxState.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED,sFAAsF;AACtF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,UAAU,EAAE,oBAAoB,EAChC,aAAa,EACb,aAAa,GACd,EAAE,oBAAoB;;;;uBAef,MAAM;;;;uBAU0B,MAAM,SAAS,MAAM;6BAM7C,MAAM;EA4CrB"}
@@ -0,0 +1,27 @@
1
+ import { css } from 'react-strict-dom';
2
+ /** Native Combobox additions to the shared styles: the closed field. */
3
+ export declare const nativeStyles: Readonly<{
4
+ readonly nativeFlex: Readonly<{
5
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
6
+ }>;
7
+ readonly field: Readonly<{
8
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
9
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "row">;
10
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
11
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
12
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
13
+ }>;
14
+ readonly fieldText: Readonly<{
15
+ readonly color: css.StyleXClassNameFor<"color", string>;
16
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
17
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
18
+ }>;
19
+ readonly chevronDown: Readonly<{
20
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
21
+ readonly transform: css.StyleXClassNameFor<"transform", "rotate(90deg)">;
22
+ }>;
23
+ readonly fieldPlaceholder: Readonly<{
24
+ readonly color: css.StyleXClassNameFor<"color", string>;
25
+ }>;
26
+ }>;
27
+ //# sourceMappingURL=native.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAKpC,wEAAwE;AACxE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;EA0BvB,CAAA"}
@@ -1,15 +1,11 @@
1
1
  import { ComboboxContextValue } from './ComboboxContext';
2
- interface UseComboboxRootOptions {
3
- defaultValue?: string;
4
- value?: string;
5
- onValueChange?: (value: string | null) => void;
6
- inputValue?: string;
7
- onInputChange?: (value: string) => void;
8
- initialLabels?: Record<string, string>;
9
- }
10
- export declare function useComboboxRoot({ defaultValue, value: controlledValue, onValueChange, inputValue: controlledInputValue, onInputChange, initialLabels, }: UseComboboxRootOptions): {
2
+ import { ComboboxStateOptions } from './comboboxState';
3
+ /**
4
+ * The web adapter over the shared Combobox state: the highlighted option,
5
+ * document order, keys and DOM focus (the WAI-ARIA editable combobox).
6
+ */
7
+ export declare function useComboboxRoot(options: ComboboxStateOptions): {
11
8
  ctx: ComboboxContextValue;
12
9
  rootRef: import('react').RefObject<HTMLDivElement | null>;
13
10
  };
14
- export {};
15
11
  //# sourceMappingURL=useComboboxRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useComboboxRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/useComboboxRoot.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAA;AAE3D,UAAU,sBAAsB;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,UAAU,EAAE,oBAAoB,EAChC,aAAa,EACb,aAAa,GACd,EAAE,sBAAsB;;;EA+OxB"}
1
+ {"version":3,"file":"useComboboxRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/useComboboxRoot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAiC,KAAK,oBAAoB,EAAC,MAAM,iBAAiB,CAAA;AAEzF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,oBAAoB;;;EAiL5D"}
@@ -13,9 +13,12 @@ interface PortalProps {
13
13
  grabberLabels?: GrabberLabels;
14
14
  }
15
15
  declare function Portal({ children, size, grabberLabels }: PortalProps): import("react/jsx-runtime").JSX.Element | null;
16
- declare function Body({ children }: {
16
+ interface BodyProps {
17
17
  children: ReactNode;
18
- }): import("react/jsx-runtime").JSX.Element;
18
+ /** No side padding: rows that run to the panel's edges, as a picker's list. */
19
+ flush?: boolean;
20
+ }
21
+ declare function Body({ children, flush }: BodyProps): import("react/jsx-runtime").JSX.Element;
19
22
  interface CloseProps {
20
23
  children?: ReactNode;
21
24
  'aria-label'?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,SAAS,EAAmC,MAAM,OAAO,CAAA;AAWtE,OAAO,EAEL,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AChB,OAAO,EAAgB,KAAK,eAAe,EAAC,MAAM,iBAAiB,CAAA;AAEnE,YAAY,EAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,SAAS,CAAA;AAchE,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,eAAe,2CA+BlD;AAID,iBAAS,OAAO,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAQjD;AAID,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,kFAAkF;IAClF,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAqBD,iBAAS,MAAM,CAAC,EAAC,QAAQ,EAAE,IAAW,EAAE,aAAsC,EAAC,EAAE,WAAW,kDAmH3F;AAID,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,iBAAS,IAAI,CAAC,EAAC,QAAQ,EAAE,KAAa,EAAC,EAAE,SAAS,2CAYjD;AAID,UAAU,UAAU;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,iBAAS,KAAK,CAAC,EAAC,QAAQ,EAAE,YAAY,EAAE,SAAmB,EAAC,EAAE,UAAU,2CAuBvE;AAID,eAAO,MAAM,MAAM;;;;;;;;;;CAUlB,CAAA"}
@@ -7,6 +7,7 @@ interface SheetArgs {
7
7
  snapPoints: SnapPoint[];
8
8
  defaultSnapPoint: SnapPoint;
9
9
  titleAlign: 'start' | 'center';
10
+ flush: boolean;
10
11
  onOpenChange?: (open: boolean) => void;
11
12
  }
12
13
  export declare const SnapSheet: StoryObj<SheetArgs>;
@@ -17,4 +18,5 @@ export declare const SlowShortDragSnapsBack: Story;
17
18
  export declare const GrabberTapCyclesDetents: Story;
18
19
  export declare const DragUpOnContentGrowsThenScrolls: Story;
19
20
  export declare const DoneCloses: Story;
21
+ export declare const FlushBody: Story;
20
22
  //# sourceMappingURL=DrawerSnap.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerSnap.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerSnap.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAS,KAAK,SAAS,EAAC,MAAM,UAAU,CAAA;AAK/C,QAAA,MAAM,IAAI,EAAE,IAGX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAIrB,UAAU,SAAS;IACjB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,gBAAgB,EAAE,SAAS,CAAA;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC;AAwCD,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,SAAS,CA2BzC,CAAA;AA8BD,eAAO,MAAM,kBAAkB,EAAE,KAQhC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAQrC,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAQ1C,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAWpC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,KAiB7C,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KASxB,CAAA"}
1
+ {"version":3,"file":"DrawerSnap.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerSnap.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAEpD,OAAO,EAAS,KAAK,SAAS,EAAC,MAAM,UAAU,CAAA;AAK/C,QAAA,MAAM,IAAI,EAAE,IAGX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAIrB,UAAU,SAAS;IACjB,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,gBAAgB,EAAE,SAAS,CAAA;IAC3B,UAAU,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC9B,KAAK,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC;AA4CD,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,SAAS,CAgCzC,CAAA;AA8BD,eAAO,MAAM,kBAAkB,EAAE,KAQhC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAQrC,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,KAQ1C,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,KAWpC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,KAYrC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,KAiB7C,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KASxB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAA"}
@@ -48,6 +48,10 @@ export declare const nativeStyles: Readonly<{
48
48
  readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
49
49
  readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
50
50
  }>;
51
+ readonly bodyFlush: Readonly<{
52
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", 0>;
53
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", 0>;
54
+ }>;
51
55
  readonly hiddenBelow: (height: number) => readonly [Readonly<{
52
56
  paddingBottom: css.StyleXClassNameFor<"paddingBottom", number>;
53
57
  }>, css.InlineStyles];
@@ -1 +1 @@
1
- {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+CvB,CAAA"}
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAMpC;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDvB,CAAA"}
@@ -159,5 +159,9 @@ export declare const styles: Readonly<{
159
159
  readonly overflowY: css.StyleXClassNameFor<"overflowY", "auto">;
160
160
  readonly flex: css.StyleXClassNameFor<"flex", 1>;
161
161
  }>;
162
+ readonly bodyFlush: Readonly<{
163
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", 0>;
164
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", 0>;
165
+ }>;
162
166
  }>;
163
167
  //# sourceMappingURL=styles.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AASpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmMjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AASpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuMjB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * How a `type="submit"` Button submits its Form where there is no DOM submit
3
+ * event: on native, Form provides its validated submit here. The web Form
4
+ * provides nothing; the browser's form submission does it.
5
+ */
6
+ export declare const FormSubmitContext: import('react').Context<(() => void) | null>;
7
+ export declare function useFormSubmit(): (() => void) | null;
8
+ //# sourceMappingURL=FormSubmitContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormSubmitContext.d.ts","sourceRoot":"","sources":["../../../src/components/Form/FormSubmitContext.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iCAAwB,IAAI,SAAe,CAAA;AAEzE,wBAAgB,aAAa,WAFyB,IAAI,SAIzD"}
@@ -0,0 +1,84 @@
1
+ import { css } from 'react-strict-dom';
2
+ /**
3
+ * A picker sheet's rows on native (plan N0, C0 direction A "Check"): a
4
+ * touch-target row per option, the chosen one filled and checked.
5
+ */
6
+ export declare const sheetStyles: Readonly<{
7
+ readonly list: Readonly<{
8
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
9
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
10
+ }>;
11
+ readonly option: Readonly<{
12
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
13
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "row">;
14
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
15
+ readonly gap: css.StyleXClassNameFor<"gap", string>;
16
+ readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
17
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
18
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
19
+ readonly borderBottomWidth: css.StyleXClassNameFor<"borderBottomWidth", string>;
20
+ readonly borderBottomStyle: css.StyleXClassNameFor<"borderBottomStyle", "solid">;
21
+ readonly borderBottomColor: css.StyleXClassNameFor<"borderBottomColor", string>;
22
+ }>;
23
+ readonly optionFilled: Readonly<{
24
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
25
+ }>;
26
+ readonly label: Readonly<{
27
+ readonly flex: css.StyleXClassNameFor<"flex", 1>;
28
+ readonly color: css.StyleXClassNameFor<"color", string>;
29
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
30
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
31
+ }>;
32
+ readonly labelDisabled: Readonly<{
33
+ readonly color: css.StyleXClassNameFor<"color", string>;
34
+ }>;
35
+ readonly check: Readonly<{
36
+ readonly color: css.StyleXClassNameFor<"color", string>;
37
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
38
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
39
+ readonly fontWeight: css.StyleXClassNameFor<"fontWeight", string>;
40
+ }>;
41
+ readonly empty: Readonly<{
42
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
43
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "column">;
44
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
45
+ readonly gap: css.StyleXClassNameFor<"gap", string>;
46
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
47
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
48
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
49
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
50
+ readonly color: css.StyleXClassNameFor<"color", string>;
51
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
52
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
53
+ readonly textAlign: css.StyleXClassNameFor<"textAlign", "center">;
54
+ }>;
55
+ readonly search: Readonly<{
56
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
57
+ readonly flexDirection: css.StyleXClassNameFor<"flexDirection", "row">;
58
+ readonly alignItems: css.StyleXClassNameFor<"alignItems", "center">;
59
+ readonly gap: css.StyleXClassNameFor<"gap", string>;
60
+ readonly minHeight: css.StyleXClassNameFor<"minHeight", string>;
61
+ readonly marginLeft: css.StyleXClassNameFor<"marginLeft", string>;
62
+ readonly marginRight: css.StyleXClassNameFor<"marginRight", string>;
63
+ readonly marginBottom: css.StyleXClassNameFor<"marginBottom", string>;
64
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
65
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
66
+ readonly borderRadius: css.StyleXClassNameFor<"borderRadius", string>;
67
+ readonly borderWidth: css.StyleXClassNameFor<"borderWidth", string>;
68
+ readonly borderStyle: css.StyleXClassNameFor<"borderStyle", "solid">;
69
+ readonly borderColor: css.StyleXClassNameFor<"borderColor", string>;
70
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", string>;
71
+ }>;
72
+ readonly searchInput: Readonly<{
73
+ readonly flex: css.StyleXClassNameFor<"flex", 1>;
74
+ readonly color: css.StyleXClassNameFor<"color", string>;
75
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
76
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
77
+ readonly backgroundColor: css.StyleXClassNameFor<"backgroundColor", "transparent">;
78
+ readonly borderWidth: css.StyleXClassNameFor<"borderWidth", 0>;
79
+ readonly '::placeholder': css.StyleXClassNameFor<"::placeholder", {
80
+ readonly color: css.StyleXVar<string>;
81
+ }>;
82
+ }>;
83
+ }>;
84
+ //# sourceMappingURL=native.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Listbox/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAOpC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+EtB,CAAA"}
@@ -21,9 +21,16 @@ declare function Value({ placeholder }: {
21
21
  declare function Icon({ children }: {
22
22
  children?: ReactNode;
23
23
  }): import("react/jsx-runtime").JSX.Element;
24
- declare function Popup({ children }: {
24
+ interface PopupProps {
25
25
  children: ReactNode;
26
- }): import("react/jsx-runtime").JSX.Element;
26
+ /** The list's accessible name; on native also the sheet's title. */
27
+ label?: string;
28
+ /** Native only: the sheet header's text button that closes it unchanged. Default: 'Cancel' */
29
+ cancelLabel?: string;
30
+ /** Shown in place of the list when there are no items. */
31
+ empty?: ReactNode;
32
+ }
33
+ declare function Popup({ children, label, empty }: PopupProps): import("react/jsx-runtime").JSX.Element;
27
34
  interface ItemProps {
28
35
  value: string;
29
36
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,SAAS,EAAsD,MAAM,OAAO,CAAA;AAYzF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAA;AAGnD,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,iBAA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D,iBAAS,QAAQ,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,2CAElD;AAED,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAA"}
@@ -9,4 +9,15 @@ export declare const KeyboardNavigation: Story;
9
9
  export declare const InsideDialog: Story;
10
10
  /** Closed, the trigger opens on ArrowDown or ArrowUp, on the selected option (5.3). */
11
11
  export declare const ArrowKeysOpen: Story;
12
+ interface LabelledArgs {
13
+ label: string;
14
+ empty: string;
15
+ itemCount: number;
16
+ onValueChange?: (value: string | null) => void;
17
+ }
18
+ /**
19
+ * Popup's label names the list (and titles the native sheet); empty replaces
20
+ * the list when there are no items. Set itemCount to 0 for the empty state.
21
+ */
22
+ export declare const LabelledAndEmpty: StoryObj<LabelledArgs>;
12
23
  //# sourceMappingURL=Select.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAKpD,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAErB,eAAO,MAAM,OAAO,EAAE,KA0BrB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAoC3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA0C7B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAyBhC,CAAA;AAMD,eAAO,MAAM,YAAY,EAAE,KA0C1B,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,aAAa,EAAE,KAgB3B,CAAA"}
1
+ {"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAKpD,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAA;AAErB,eAAO,MAAM,OAAO,EAAE,KA0BrB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAoC3B,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA0C7B,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAyBhC,CAAA;AAMD,eAAO,MAAM,YAAY,EAAE,KA0C1B,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,aAAa,EAAE,KAgB3B,CAAA;AAID,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,YAAY,CAiCnD,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { css } from 'react-strict-dom';
2
+ /** Native Select additions to the shared styles. */
3
+ export declare const nativeStyles: Readonly<{
4
+ readonly nativeFlex: Readonly<{
5
+ readonly display: css.StyleXClassNameFor<"display", "flex">;
6
+ }>;
7
+ readonly iconDown: Readonly<{
8
+ readonly transform: css.StyleXClassNameFor<"transform", "rotate(90deg)">;
9
+ }>;
10
+ }>;
11
+ //# sourceMappingURL=native.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/native.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAEpC,oDAAoD;AACpD,eAAO,MAAM,YAAY;;;;;;;EASvB,CAAA"}
@@ -0,0 +1,21 @@
1
+ export interface SelectStateOptions {
2
+ defaultValue?: string;
3
+ value?: string;
4
+ onValueChange?: (value: string | null) => void;
5
+ initialLabels?: Record<string, string>;
6
+ }
7
+ /**
8
+ * The Select's state both platforms share (plan N0, Decision 10): the value
9
+ * (controlled or not), whether it is open, and each option's label. Focus,
10
+ * highlight, document order and keys are the web adapter's (useSelectRoot);
11
+ * native presses and the sheet are Select.native's.
12
+ */
13
+ export declare function useSelectState({ defaultValue, value: controlledValue, onValueChange, initialLabels, }: SelectStateOptions): {
14
+ value: string | null;
15
+ setValue: (v: string | null) => void;
16
+ open: boolean;
17
+ setOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
18
+ labels: Record<string, string>;
19
+ registerLabel: (v: string, label: string) => void;
20
+ };
21
+ //# sourceMappingURL=selectState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectState.d.ts","sourceRoot":"","sources":["../../../src/components/Select/selectState.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,aAAa,GACd,EAAE,kBAAkB;;;;;;uBASmB,MAAM,SAAS,MAAM;EAK5D"}
@@ -101,5 +101,15 @@ export declare const styles: Readonly<{
101
101
  readonly hidden: Readonly<{
102
102
  readonly display: css.StyleXClassNameFor<"display", "none">;
103
103
  }>;
104
+ readonly empty: Readonly<{
105
+ readonly paddingTop: css.StyleXClassNameFor<"paddingTop", string>;
106
+ readonly paddingBottom: css.StyleXClassNameFor<"paddingBottom", string>;
107
+ readonly paddingLeft: css.StyleXClassNameFor<"paddingLeft", string>;
108
+ readonly paddingRight: css.StyleXClassNameFor<"paddingRight", string>;
109
+ readonly fontFamily: css.StyleXClassNameFor<"fontFamily", string>;
110
+ readonly fontSize: css.StyleXClassNameFor<"fontSize", string>;
111
+ readonly color: css.StyleXClassNameFor<"color", string>;
112
+ readonly textAlign: css.StyleXClassNameFor<"textAlign", "center">;
113
+ }>;
104
114
  }>;
105
115
  //# sourceMappingURL=styles.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoHjB,CAAA"}
1
+ {"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Select/styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,kBAAkB,CAAA;AAUpC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+HjB,CAAA"}
@@ -1,13 +1,11 @@
1
1
  import { SelectContextValue } from './SelectContext';
2
- interface UseSelectRootOptions {
3
- defaultValue?: string;
4
- value?: string;
5
- onValueChange?: (value: string | null) => void;
6
- initialLabels?: Record<string, string>;
7
- }
8
- export declare function useSelectRoot({ defaultValue, value: controlledValue, onValueChange, initialLabels, }: UseSelectRootOptions): {
2
+ import { SelectStateOptions } from './selectState';
3
+ /**
4
+ * The web adapter over the shared Select state: the highlighted option,
5
+ * document order, keys and DOM focus (the WAI-ARIA select-only combobox).
6
+ */
7
+ export declare function useSelectRoot(options: SelectStateOptions): {
9
8
  ctx: SelectContextValue;
10
9
  rootRef: import('react').RefObject<HTMLDivElement | null>;
11
10
  };
12
- export {};
13
11
  //# sourceMappingURL=useSelectRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Select/useSelectRoot.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAA;AAEvD,UAAU,oBAAoB;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAY,EACZ,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,aAAa,GACd,EAAE,oBAAoB;;;EAsLtB"}
1
+ {"version":3,"file":"useSelectRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Select/useSelectRoot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAiB,KAAK,kBAAkB,EAAC,MAAM,eAAe,CAAA;AAErE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,kBAAkB;;;EAyKxD"}
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { ThemeName } from './ThemeProvider';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ interface OverrideArgs {
6
+ theme: ThemeName;
7
+ bg: string;
8
+ accent: string;
9
+ }
10
+ /** Colours replaced by token key; the controls change them in place. */
11
+ export declare const Playground: StoryObj<OverrideArgs>;
12
+ export declare const OverridesUpdateInPlace: StoryObj;
13
+ //# sourceMappingURL=ThemeOverrides.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeOverrides.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/ThemeOverrides.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AAKpD,OAAO,EAAqC,KAAK,SAAS,EAAC,MAAM,iBAAiB,CAAA;AAIlF,QAAA,MAAM,IAAI,EAAE,IAEX,CAAA;AAED,eAAe,IAAI,CAAA;AAYnB,UAAU,YAAY;IACpB,KAAK,EAAE,SAAS,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;CACf;AAED,wEAAwE;AACxE,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,YAAY,CAe7C,CAAA;AA4BD,eAAO,MAAM,sBAAsB,EAAE,QAoCpC,CAAA"}
@@ -1,10 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
+ import { ColorOverrides } from './overrides';
2
3
  export type ThemeName = 'dark' | 'light' | 'high-contrast';
4
+ export type { ColorOverrides };
3
5
  interface ThemeProviderProps {
4
6
  theme?: ThemeName;
7
+ /**
8
+ * Colours that replace the theme's own, by token key (`{accent: '#ff5a1f'}`).
9
+ * They update in place, without a re-mount. A nested provider on the same
10
+ * theme keeps these and lays its own over them.
11
+ */
12
+ overrides?: ColorOverrides;
5
13
  children: ReactNode;
6
14
  }
7
15
  export declare function usePortalMount(): HTMLElement | null;
8
- export declare function ThemeProvider({ theme, children }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
9
- export {};
16
+ export declare function ThemeProvider({ theme, overrides, children }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
10
17
  //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAOzE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAA;AAE1D,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAmCD,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD;AAED,wBAAgB,aAAa,CAAC,EAAC,KAAc,EAAE,QAAQ,EAAC,EAAE,kBAAkB,2CAW3E"}
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,SAAS,EAAuC,MAAM,OAAO,CAAA;AAOzF,OAAO,EAAmC,KAAK,cAAc,EAAC,MAAM,aAAa,CAAA;AAGjF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAAA;AAC1D,YAAY,EAAC,cAAc,EAAC,CAAA;AAE5B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAmCD,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD;AASD,wBAAgB,aAAa,CAAC,EAAC,KAAc,EAAE,SAAS,EAAE,QAAQ,EAAC,EAAE,kBAAkB,2CA8BtF"}
@@ -0,0 +1,7 @@
1
+ import { ColorToken } from '@duro-app/tokens/keys';
2
+ import { ColorOverrides } from './overrides';
3
+ /** A value that is a colour and nothing else, so it cannot leave its rule. */
4
+ export declare function isSafeColor(value: string): boolean;
5
+ /** The scoped rule for a provider's overrides, or null when it has none. */
6
+ export declare function overrideRule(scope: string, overrides: ColorOverrides, variableOf: (key: ColorToken) => string | null): string | null;
7
+ //# sourceMappingURL=overrideRule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrideRule.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/overrideRule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,aAAa,CAAA;AAE/C,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAUlD;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,MAAM,GAAG,IAAI,GAC7C,MAAM,GAAG,IAAI,CAaf"}
@@ -0,0 +1,16 @@
1
+ import { ColorToken } from '@duro-app/tokens/keys';
2
+ /** Colours that replace a theme's own, by token key. */
3
+ export type ColorOverrides = Partial<Record<ColorToken, string>>;
4
+ /** The overrides in force at a provider, and the theme they were made for. */
5
+ export interface EffectiveOverrides {
6
+ theme: string | null;
7
+ colors: ColorOverrides;
8
+ }
9
+ export declare const OverridesContext: import('react').Context<EffectiveOverrides>;
10
+ /**
11
+ * One rule on both platforms (plan N0, slice C): a provider on the same theme
12
+ * as the one above it keeps that one's overrides and lays its own over them;
13
+ * a provider on another theme starts from its own theme's colours.
14
+ */
15
+ export declare function mergeOverrides(outer: EffectiveOverrides, theme: string, own: ColorOverrides | undefined): EffectiveOverrides;
16
+ //# sourceMappingURL=overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeProvider/overrides.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAA;AAErD,wDAAwD;AACxD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAA;AAEhE,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,cAAc,CAAA;CACvB;AAED,eAAO,MAAM,gBAAgB,6CAA+D,CAAA;AAE5F;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,EACzB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,cAAc,GAAG,SAAS,GAC9B,kBAAkB,CAGpB"}