@unisim/sdk 0.215.0 → 0.216.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/README.md CHANGED
@@ -646,6 +646,43 @@ import { Chip, ChipToggle, ValueChip } from '@unisim/sdk'
646
646
  - `npm run test:chips` measures every label's contrast on both grounds and checks the
647
647
  sweep, the grounds and the geometry. A negative control proves the ring check can fail.
648
648
 
649
+ ### Buttons and tabs (since 0.216.0)
650
+ Owner decision 2026-11-04 (BRANDING.md → Buttons, Tabs). **Key buttons:** five ranks, and
651
+ an icon sits in a solid key at the leading edge that widens a little on hover. The primary
652
+ is a white body with an orange outline and a brand-orange key, once per view. **Tray tabs:**
653
+ the segmented tray, with the Orbit box's corner arc on the selected segment; hover draws the
654
+ arc in partway and selecting draws the rest.
655
+
656
+ ```tsx
657
+ import { Button, Tabs, Tab, buttonClass } from '@unisim/sdk'
658
+
659
+ <Button rank="primary" icon={<Plus />}>Add a product</Button>
660
+ <Button icon={<Folder />}>New folder</Button> {/* secondary */}
661
+ <Button rank="soft">Import from a sheet</Button>
662
+ <Button rank="quiet">Cancel</Button>
663
+ <Button rank="danger" icon={<Bin />}>Delete product</Button>
664
+
665
+ <Tabs aria-label="Sections">
666
+ <Tab selected={tab === 'a'} {...home.buttonProps('a', 'Clients')} onClick={…}>Clients</Tab>
667
+ </Tabs>
668
+ ```
669
+
670
+ - An app that keeps class strings uses `buttonClass('primary', 'sm')` (`u-btn
671
+ u-btn--primary u-btn--sm`) and `<span class="u-btn__key">` for the icon, and the `u-tabs`
672
+ / `u-tab` classes on its own tab markup. Call `installButtonStyles()` and
673
+ `installTabStyles()` once at start-up. A page with no build step pastes `BUTTON_CSS` /
674
+ `TAB_CSS`.
675
+ - A tab is selected by `aria-selected="true"`, `aria-current` (not `"false"`),
676
+ `aria-pressed="true"` or `.u-tab--current`, so tablists, navs and toggle groups all work.
677
+ `data-default-view="true"` (from `useDefaultView().buttonProps`) draws the "opens here" dot.
678
+ - Unlike the chips, the look is layered (`components.unisim-button`, `components.unisim-tabs`,
679
+ zero specificity) as the boxes are, so Tailwind 4 utilities on a button or tray win. The
680
+ key, the arc, the dot and the focus ring stay unlayered.
681
+ - Grounds as the chips. Knobs: `--u-btn-accent`, `--u-btn-key`, `--u-btn-surface`,
682
+ `--u-tab-accent`, `--u-tab-accent-text` (and `-dark` twins); pass `brand_color_accessible`.
683
+ - `npm run test:controls` measures every label and key icon on both grounds, the tab states
684
+ and the dot, with a negative control.
685
+
649
686
  ### Theme (light / dark / system)
650
687
  - `createThemeStore(storageKey)` (since 0.140.0) — an app's theme preference, as a hook.
651
688
  Call it once at module level: `export const useThemeStore = createThemeStore('unisim-<app>-theme')`,
@@ -0,0 +1,300 @@
1
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ReactNode } from 'react';
2
+ import type { ChipGround } from './Chip.js';
3
+ export type ButtonRank = 'primary' | 'secondary' | 'soft' | 'quiet' | 'danger';
4
+ export type ButtonSize = 'md' | 'sm';
5
+ /** The class string for a rank and size, for markup that isn't `<Button>`. */
6
+ export declare function buttonClass(rank?: ButtonRank, size?: ButtonSize): string;
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download'> {
8
+ /** primary is once per view; no rank is secondary. */
9
+ rank?: ButtonRank;
10
+ size?: ButtonSize;
11
+ /** An icon (an svg). It sits in the key on primary, secondary and danger buttons. */
12
+ icon?: ReactNode;
13
+ /** A link that looks like a button is an `a`. */
14
+ as?: 'button' | 'a';
15
+ /** Forces a ground; otherwise the nearest `data-u-ground` / `dark` ancestor decides (light if none). */
16
+ ground?: ChipGround;
17
+ }
18
+ /** A button in one of the suite's five ranks. */
19
+ export declare function Button({ rank, size, icon, as, ground, className, type, children, ...rest }: ButtonProps): import("react").DetailedReactHTMLElement<{
20
+ className: string;
21
+ 'data-u-ground': ChipGround | undefined;
22
+ type?: "button" | "reset" | "submit" | undefined;
23
+ disabled?: boolean | undefined;
24
+ form?: string | undefined;
25
+ formAction?: string | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
26
+ formEncType?: string | undefined;
27
+ formMethod?: string | undefined;
28
+ formNoValidate?: boolean | undefined;
29
+ formTarget?: string | undefined;
30
+ name?: string | undefined;
31
+ value?: string | readonly string[] | number | undefined;
32
+ defaultChecked?: boolean | undefined;
33
+ defaultValue?: string | number | readonly string[] | undefined;
34
+ suppressContentEditableWarning?: boolean | undefined;
35
+ suppressHydrationWarning?: boolean | undefined;
36
+ accessKey?: string | undefined;
37
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
38
+ autoFocus?: boolean | undefined;
39
+ contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
40
+ contextMenu?: string | undefined;
41
+ dir?: string | undefined;
42
+ draggable?: (boolean | "false" | "true") | undefined;
43
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
44
+ hidden?: boolean | undefined;
45
+ id?: string | undefined;
46
+ lang?: string | undefined;
47
+ nonce?: string | undefined;
48
+ slot?: string | undefined;
49
+ spellCheck?: (boolean | "false" | "true") | undefined;
50
+ style?: import("react").CSSProperties | undefined;
51
+ tabIndex?: number | undefined;
52
+ title?: string | undefined;
53
+ translate?: "yes" | "no" | undefined;
54
+ radioGroup?: string | undefined;
55
+ role?: import("react").AriaRole | undefined;
56
+ about?: string | undefined;
57
+ content?: string | undefined;
58
+ datatype?: string | undefined;
59
+ inlist?: any;
60
+ prefix?: string | undefined;
61
+ property?: string | undefined;
62
+ rel?: string | undefined;
63
+ resource?: string | undefined;
64
+ rev?: string | undefined;
65
+ typeof?: string | undefined;
66
+ vocab?: string | undefined;
67
+ autoCorrect?: string | undefined;
68
+ autoSave?: string | undefined;
69
+ color?: string | undefined;
70
+ itemProp?: string | undefined;
71
+ itemScope?: boolean | undefined;
72
+ itemType?: string | undefined;
73
+ itemID?: string | undefined;
74
+ itemRef?: string | undefined;
75
+ results?: number | undefined;
76
+ security?: string | undefined;
77
+ unselectable?: "on" | "off" | undefined;
78
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
79
+ is?: string | undefined;
80
+ exportparts?: string | undefined;
81
+ part?: string | undefined;
82
+ "aria-activedescendant"?: string | undefined;
83
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
84
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
85
+ "aria-braillelabel"?: string | undefined;
86
+ "aria-brailleroledescription"?: string | undefined;
87
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
88
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
89
+ "aria-colcount"?: number | undefined;
90
+ "aria-colindex"?: number | undefined;
91
+ "aria-colindextext"?: string | undefined;
92
+ "aria-colspan"?: number | undefined;
93
+ "aria-controls"?: string | undefined;
94
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
95
+ "aria-describedby"?: string | undefined;
96
+ "aria-description"?: string | undefined;
97
+ "aria-details"?: string | undefined;
98
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
99
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
100
+ "aria-errormessage"?: string | undefined;
101
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
102
+ "aria-flowto"?: string | undefined;
103
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
104
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
105
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
106
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
107
+ "aria-keyshortcuts"?: string | undefined;
108
+ "aria-label"?: string | undefined;
109
+ "aria-labelledby"?: string | undefined;
110
+ "aria-level"?: number | undefined;
111
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
112
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
113
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
114
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
115
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
116
+ "aria-owns"?: string | undefined;
117
+ "aria-placeholder"?: string | undefined;
118
+ "aria-posinset"?: number | undefined;
119
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
120
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
121
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
122
+ "aria-required"?: (boolean | "false" | "true") | undefined;
123
+ "aria-roledescription"?: string | undefined;
124
+ "aria-rowcount"?: number | undefined;
125
+ "aria-rowindex"?: number | undefined;
126
+ "aria-rowindextext"?: string | undefined;
127
+ "aria-rowspan"?: number | undefined;
128
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
129
+ "aria-setsize"?: number | undefined;
130
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
131
+ "aria-valuemax"?: number | undefined;
132
+ "aria-valuemin"?: number | undefined;
133
+ "aria-valuenow"?: number | undefined;
134
+ "aria-valuetext"?: string | undefined;
135
+ dangerouslySetInnerHTML?: {
136
+ __html: string | TrustedHTML;
137
+ } | undefined;
138
+ onCopy?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
139
+ onCopyCapture?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
140
+ onCut?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
141
+ onCutCapture?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
142
+ onPaste?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
143
+ onPasteCapture?: import("react").ClipboardEventHandler<HTMLButtonElement> | undefined;
144
+ onCompositionEnd?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
145
+ onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
146
+ onCompositionStart?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
147
+ onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
148
+ onCompositionUpdate?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
149
+ onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLButtonElement> | undefined;
150
+ onFocus?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
151
+ onFocusCapture?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
152
+ onBlur?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
153
+ onBlurCapture?: import("react").FocusEventHandler<HTMLButtonElement> | undefined;
154
+ onChange?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
155
+ onChangeCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
156
+ onBeforeInput?: import("react").InputEventHandler<HTMLButtonElement> | undefined;
157
+ onBeforeInputCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
158
+ onInput?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
159
+ onInputCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
160
+ onReset?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
161
+ onResetCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
162
+ onSubmit?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
163
+ onSubmitCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
164
+ onInvalid?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
165
+ onInvalidCapture?: import("react").FormEventHandler<HTMLButtonElement> | undefined;
166
+ onLoad?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
167
+ onLoadCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
168
+ onError?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
169
+ onErrorCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
170
+ onKeyDown?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
171
+ onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
172
+ onKeyPress?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
173
+ onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
174
+ onKeyUp?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
175
+ onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLButtonElement> | undefined;
176
+ onAbort?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
177
+ onAbortCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
178
+ onCanPlay?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
179
+ onCanPlayCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
180
+ onCanPlayThrough?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
181
+ onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
182
+ onDurationChange?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
183
+ onDurationChangeCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
184
+ onEmptied?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
185
+ onEmptiedCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
186
+ onEncrypted?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
187
+ onEncryptedCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
188
+ onEnded?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
189
+ onEndedCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
190
+ onLoadedData?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
191
+ onLoadedDataCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
192
+ onLoadedMetadata?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
193
+ onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
194
+ onLoadStart?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
195
+ onLoadStartCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
196
+ onPause?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
197
+ onPauseCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
198
+ onPlay?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
199
+ onPlayCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
200
+ onPlaying?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
201
+ onPlayingCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
202
+ onProgress?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
203
+ onProgressCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
204
+ onRateChange?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
205
+ onRateChangeCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
206
+ onSeeked?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
207
+ onSeekedCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
208
+ onSeeking?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
209
+ onSeekingCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
210
+ onStalled?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
211
+ onStalledCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
212
+ onSuspend?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
213
+ onSuspendCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
214
+ onTimeUpdate?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
215
+ onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
216
+ onVolumeChange?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
217
+ onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
218
+ onWaiting?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
219
+ onWaitingCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
220
+ onAuxClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
221
+ onAuxClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
222
+ onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
223
+ onClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
224
+ onContextMenu?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
225
+ onContextMenuCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
226
+ onDoubleClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
227
+ onDoubleClickCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
228
+ onDrag?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
229
+ onDragCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
230
+ onDragEnd?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
231
+ onDragEndCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
232
+ onDragEnter?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
233
+ onDragEnterCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
234
+ onDragExit?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
235
+ onDragExitCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
236
+ onDragLeave?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
237
+ onDragLeaveCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
238
+ onDragOver?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
239
+ onDragOverCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
240
+ onDragStart?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
241
+ onDragStartCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
242
+ onDrop?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
243
+ onDropCapture?: import("react").DragEventHandler<HTMLButtonElement> | undefined;
244
+ onMouseDown?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
245
+ onMouseDownCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
246
+ onMouseEnter?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
247
+ onMouseLeave?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
248
+ onMouseMove?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
249
+ onMouseMoveCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
250
+ onMouseOut?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
251
+ onMouseOutCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
252
+ onMouseOver?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
253
+ onMouseOverCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
254
+ onMouseUp?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
255
+ onMouseUpCapture?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
256
+ onSelect?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
257
+ onSelectCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
258
+ onTouchCancel?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
259
+ onTouchCancelCapture?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
260
+ onTouchEnd?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
261
+ onTouchEndCapture?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
262
+ onTouchMove?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
263
+ onTouchMoveCapture?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
264
+ onTouchStart?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
265
+ onTouchStartCapture?: import("react").TouchEventHandler<HTMLButtonElement> | undefined;
266
+ onPointerDown?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
267
+ onPointerDownCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
268
+ onPointerMove?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
269
+ onPointerMoveCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
270
+ onPointerUp?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
271
+ onPointerUpCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
272
+ onPointerCancel?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
273
+ onPointerCancelCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
274
+ onPointerEnter?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
275
+ onPointerLeave?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
276
+ onPointerOver?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
277
+ onPointerOverCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
278
+ onPointerOut?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
279
+ onPointerOutCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
280
+ onGotPointerCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
281
+ onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
282
+ onLostPointerCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
283
+ onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLButtonElement> | undefined;
284
+ onScroll?: import("react").UIEventHandler<HTMLButtonElement> | undefined;
285
+ onScrollCapture?: import("react").UIEventHandler<HTMLButtonElement> | undefined;
286
+ onWheel?: import("react").WheelEventHandler<HTMLButtonElement> | undefined;
287
+ onWheelCapture?: import("react").WheelEventHandler<HTMLButtonElement> | undefined;
288
+ onAnimationStart?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
289
+ onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
290
+ onAnimationEnd?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
291
+ onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
292
+ onAnimationIteration?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
293
+ onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLButtonElement> | undefined;
294
+ onTransitionEnd?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
295
+ onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLButtonElement> | undefined;
296
+ download?: any;
297
+ target?: import("react").HTMLAttributeAnchorTarget | undefined;
298
+ href?: string | undefined | undefined;
299
+ }, HTMLElement>;
300
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,oBAAoB,EAAE,KAAK,oBAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE/H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAe3C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC9E,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAA;AAWpC,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,GAAE,UAAwB,EAAE,IAAI,GAAE,UAAiB,GAAG,MAAM,CAE3F;AAED,MAAM,WAAW,WACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;IACvF,sDAAsD;IACtD,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,iDAAiD;IACjD,EAAE,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAA;IACnB,wGAAwG;IACxG,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,iDAAiD;AACjD,wBAAgB,MAAM,CAAC,EAAE,IAAkB,EAAE,IAAW,EAAE,IAAI,EAAE,EAAa,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAcvI"}
package/dist/Button.js ADDED
@@ -0,0 +1,25 @@
1
+ import { createElement, useInsertionEffect } from 'react';
2
+ import { installButtonStyles } from './buttonStyles.js';
3
+ // Before layout, so the first paint already has the styles.
4
+ function useButtonStyles() {
5
+ useInsertionEffect(() => {
6
+ installButtonStyles();
7
+ }, []);
8
+ }
9
+ const cx = (...names) => names.filter(Boolean).join(' ');
10
+ /** The class string for a rank and size, for markup that isn't `<Button>`. */
11
+ export function buttonClass(rank = 'secondary', size = 'md') {
12
+ return cx('u-btn', rank !== 'secondary' && `u-btn--${rank}`, size === 'sm' && 'u-btn--sm');
13
+ }
14
+ /** A button in one of the suite's five ranks. */
15
+ export function Button({ rank = 'secondary', size = 'md', icon, as = 'button', ground, className, type, children, ...rest }) {
16
+ useButtonStyles();
17
+ const keyed = icon != null && icon !== false && (rank === 'primary' || rank === 'secondary' || rank === 'danger');
18
+ return createElement(as, {
19
+ ...rest,
20
+ ...(as === 'button' ? { type: type ?? 'button' } : {}),
21
+ className: cx(buttonClass(rank, size), className),
22
+ 'data-u-ground': ground,
23
+ }, keyed ? createElement('span', { className: 'u-btn__key', 'aria-hidden': true }, icon) : icon ?? null, children);
24
+ }
25
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAwE,MAAM,OAAO,CAAA;AAC/H,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAmBvD,4DAA4D;AAC5D,SAAS,eAAe;IACtB,kBAAkB,CAAC,GAAG,EAAE;QACtB,mBAAmB,EAAE,CAAA;IACvB,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC;AAED,MAAM,EAAE,GAAG,CAAC,GAAG,KAAqC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAExF,8EAA8E;AAC9E,MAAM,UAAU,WAAW,CAAC,OAAmB,WAAW,EAAE,OAAmB,IAAI;IACjF,OAAO,EAAE,CAAC,OAAO,EAAE,IAAI,KAAK,WAAW,IAAI,UAAU,IAAI,EAAE,EAAE,IAAI,KAAK,IAAI,IAAI,WAAW,CAAC,CAAA;AAC5F,CAAC;AAgBD,iDAAiD;AACjD,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,GAAG,WAAW,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAe;IACtI,eAAe,EAAE,CAAA;IACjB,MAAM,KAAK,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,QAAQ,CAAC,CAAA;IACjH,OAAO,aAAa,CAClB,EAAE,EACF;QACE,GAAG,IAAI;QACP,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,SAAS,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS,CAAC;QACjD,eAAe,EAAE,MAAM;KACxB,EACD,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,EACpG,QAAQ,CACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type CSSProperties } from 'react';
2
+ import type { SupabaseClient } from '@supabase/supabase-js';
3
+ export interface DevelopmentRibbonProps {
4
+ /** Where "Finished apps" goes. Defaults to the open-source portal. */
5
+ href?: string;
6
+ /**
7
+ * Language for the wording. Defaults to the <UniversalProvider>'s, and to
8
+ * English (UK) on a page without one.
9
+ */
10
+ language?: string;
11
+ /** Side of the triangle in px. Default 150 on a wide screen, 128 on a phone. */
12
+ size?: number;
13
+ /** The app's name, for the panel's heading ("Universal USB is still in development"). */
14
+ appName?: string;
15
+ /**
16
+ * Sends a "tell me when it launches" sign-up. With it the triangle opens a
17
+ * panel with an email field; without it the triangle is a link to `href`.
18
+ * Reject to show the error line. See requestLaunchNotification().
19
+ */
20
+ onNotify?: (email: string) => Promise<void>;
21
+ /** Prefills the email field (the signed-in person's address). */
22
+ defaultEmail?: string;
23
+ /** The panel's colours. Default light. */
24
+ theme?: 'light' | 'dark';
25
+ className?: string;
26
+ style?: CSSProperties;
27
+ }
28
+ export declare const DEVELOPMENT_RIBBON_DEFAULT_HREF = "https://opensource.unisim.co.uk";
29
+ /**
30
+ * Stores a launch sign-up for `productId` in the platform project (0323).
31
+ * Works signed out. Resolves the same whether the address was new or already
32
+ * there, so the form never reveals who has signed up.
33
+ */
34
+ export declare function requestLaunchNotification(supabase: SupabaseClient, productId: string, email: string, language?: string): Promise<void>;
35
+ export declare function DevelopmentRibbon({ href, language: languageProp, size, appName, onNotify, defaultEmail, theme, className, style, }: DevelopmentRibbonProps): import("react/jsx-runtime").JSX.Element;
36
+ //# sourceMappingURL=DevelopmentRibbon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevelopmentRibbon.d.ts","sourceRoot":"","sources":["../src/DevelopmentRibbon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsC,KAAK,aAAa,EAAkC,MAAM,OAAO,CAAA;AAC9G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAoC3D,MAAM,WAAW,sBAAsB;IACrC,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3C,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB;AAED,eAAO,MAAM,+BAA+B,oCAAoC,CAAA;AAEhF;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAOf;AAaD,wBAAgB,iBAAiB,CAAC,EAChC,IAAsC,EACtC,QAAQ,EAAE,YAAY,EACtB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,KAAe,EACf,SAAS,EACT,KAAK,GACN,EAAE,sBAAsB,2CAkIxB"}
@@ -0,0 +1,177 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useEffect, useId, useRef, useState } from 'react';
4
+ import { BRAND } from './brand.js';
5
+ import { t } from './i18n.js';
6
+ import { useLanguageIfProvided } from './provider.js';
7
+ export const DEVELOPMENT_RIBBON_DEFAULT_HREF = 'https://opensource.unisim.co.uk';
8
+ /**
9
+ * Stores a launch sign-up for `productId` in the platform project (0323).
10
+ * Works signed out. Resolves the same whether the address was new or already
11
+ * there, so the form never reveals who has signed up.
12
+ */
13
+ export async function requestLaunchNotification(supabase, productId, email, language) {
14
+ const { error } = await supabase.rpc('request_launch_notification', {
15
+ p_product: productId,
16
+ p_email: email,
17
+ p_language: language ?? null,
18
+ });
19
+ if (error)
20
+ throw error;
21
+ }
22
+ const AMBER = '#fbbf24';
23
+ const AMBER_EDGE = '#d97706';
24
+ const INK = '#1c1300'; // 11.9:1 on AMBER
25
+ const PANEL = {
26
+ light: { bg: '#ffffff', text: '#1a1a1a', muted: '#4b5563', border: '#e5e7eb', field: '#ffffff', link: BRAND.orangeText, ok: '#166534', err: '#b91c1c' },
27
+ dark: { bg: '#161b26', text: '#f3f4f6', muted: '#a1a1aa', border: '#2a3140', field: '#0f131c', link: '#fdba74', ok: '#86efac', err: '#fca5a5' },
28
+ };
29
+ const EMAIL_RE = /^[^@\s]+@[^@\s]+\.[^@\s]+$/;
30
+ export function DevelopmentRibbon({ href = DEVELOPMENT_RIBBON_DEFAULT_HREF, language: languageProp, size, appName, onNotify, defaultEmail, theme = 'light', className, style, }) {
31
+ const provided = useLanguageIfProvided();
32
+ const language = languageProp ?? provided ?? 'en-gb';
33
+ const narrow = useNarrow();
34
+ const s = size ?? (narrow ? 128 : 150);
35
+ const big = s >= 140;
36
+ // Centre of the two-line label: on the perpendicular from the hypotenuse's
37
+ // midpoint towards the right-angle corner. The top line of the text faces
38
+ // the hypotenuse, where the triangle is widest, so the longer phrase goes
39
+ // first. tests/development-ribbon.browser.mjs checks every language fits.
40
+ const d = s * 0.19;
41
+ const cx = s / 2 - d / Math.SQRT2;
42
+ const cy = s / 2 + d / Math.SQRT2;
43
+ const withPanel = !!onNotify;
44
+ const label = t(language, withPanel ? 'dev.ribbon_label_notify' : 'dev.ribbon_label');
45
+ const [open, setOpen] = useState(false);
46
+ const panelId = useId();
47
+ const triggerRef = useRef(null);
48
+ const panelRef = useRef(null);
49
+ // Escape and a click outside close the panel; focus goes back to the flag.
50
+ useEffect(() => {
51
+ if (!open)
52
+ return;
53
+ const onKey = (e) => {
54
+ if (e.key === 'Escape') {
55
+ setOpen(false);
56
+ triggerRef.current?.focus();
57
+ }
58
+ };
59
+ const onDown = (e) => {
60
+ const tgt = e.target;
61
+ if (panelRef.current?.contains(tgt) || triggerRef.current?.contains(tgt))
62
+ return;
63
+ setOpen(false);
64
+ };
65
+ document.addEventListener('keydown', onKey);
66
+ document.addEventListener('pointerdown', onDown);
67
+ return () => {
68
+ document.removeEventListener('keydown', onKey);
69
+ document.removeEventListener('pointerdown', onDown);
70
+ };
71
+ }, [open]);
72
+ const triangleStyle = {
73
+ position: 'fixed',
74
+ left: 0,
75
+ bottom: 0,
76
+ width: s,
77
+ height: s,
78
+ zIndex: 999,
79
+ display: 'block',
80
+ margin: 0,
81
+ padding: 0,
82
+ border: 'none',
83
+ cursor: 'pointer',
84
+ textDecoration: 'none',
85
+ color: INK,
86
+ // A thin darker edge along the hypotenuse, so the triangle reads as a
87
+ // flag on a page that is itself yellow-ish.
88
+ background: `linear-gradient(45deg, ${AMBER} 0%, ${AMBER} calc(50% - 2px), ${AMBER_EDGE} calc(50% - 2px), ${AMBER_EDGE} 50%, transparent 50%)`,
89
+ clipPath: 'polygon(0 0, 0 100%, 100% 100%)',
90
+ WebkitClipPath: 'polygon(0 0, 0 100%, 100% 100%)',
91
+ fontFamily: 'inherit',
92
+ ...style,
93
+ };
94
+ const face = (_jsxs("span", { "aria-hidden": true, style: {
95
+ position: 'absolute',
96
+ left: cx,
97
+ top: cy,
98
+ transform: 'translate(-50%, -50%) rotate(45deg)',
99
+ display: 'flex',
100
+ flexDirection: 'column',
101
+ alignItems: 'center',
102
+ gap: 1,
103
+ whiteSpace: 'nowrap',
104
+ lineHeight: 1.15,
105
+ pointerEvents: 'none',
106
+ }, children: [_jsxs("span", { style: { fontSize: big ? 12 : 10.5, fontWeight: 800, display: 'inline-flex', alignItems: 'center', gap: 3 }, children: [_jsx(WarningGlyph, {}), t(language, 'dev.in_development')] }), _jsxs("span", { style: { fontSize: big ? 10.5 : 9.5, fontWeight: 600, textDecoration: 'underline', textUnderlineOffset: 2 }, children: [t(language, withPanel ? 'dev.ribbon_action' : 'dev.finished_apps'), " \u2192"] })] }));
107
+ if (!withPanel) {
108
+ return (_jsx("a", { href: href, className: className, "aria-label": label, title: label, "data-unisim-development-ribbon": "", style: triangleStyle, children: face }));
109
+ }
110
+ return (_jsxs(_Fragment, { children: [_jsx("button", { ref: triggerRef, type: "button", className: className, "aria-label": label, title: label, "aria-expanded": open, "aria-controls": panelId, "data-unisim-development-ribbon": "", onClick: () => setOpen((o) => !o), style: triangleStyle, children: face }), open && (_jsx(LaunchPanel, { id: panelId, panelRef: panelRef, language: language, appName: appName, href: href, bottom: s + 8, onNotify: onNotify, defaultEmail: defaultEmail, theme: theme, onClose: () => { setOpen(false); triggerRef.current?.focus(); } }))] }));
111
+ }
112
+ function LaunchPanel({ id, panelRef, language, appName, href, bottom, onNotify, defaultEmail, theme, onClose, }) {
113
+ const c = PANEL[theme];
114
+ const [email, setEmail] = useState(defaultEmail ?? '');
115
+ const [state, setState] = useState('idle');
116
+ const titleId = `${id}-title`;
117
+ const msgId = `${id}-msg`;
118
+ const inputRef = useRef(null);
119
+ useEffect(() => { inputRef.current?.focus(); }, []);
120
+ const submit = async (e) => {
121
+ e.preventDefault();
122
+ const value = email.trim();
123
+ if (!EMAIL_RE.test(value)) {
124
+ setState('invalid');
125
+ inputRef.current?.focus();
126
+ return;
127
+ }
128
+ setState('sending');
129
+ try {
130
+ await onNotify(value);
131
+ setState('done');
132
+ }
133
+ catch {
134
+ setState('error');
135
+ }
136
+ };
137
+ const title = appName
138
+ ? t(language, 'dev.panel_title_named').replace('{app}', appName)
139
+ : t(language, 'dev.panel_title');
140
+ return (_jsxs("div", { ref: panelRef, id: id, role: "dialog", "aria-labelledby": titleId, "data-unisim-development-panel": "", style: {
141
+ position: 'fixed',
142
+ left: 12,
143
+ bottom,
144
+ zIndex: 999,
145
+ width: 320,
146
+ maxWidth: 'calc(100vw - 24px)',
147
+ boxSizing: 'border-box',
148
+ padding: '16px 16px 14px',
149
+ background: c.bg,
150
+ color: c.text,
151
+ border: `1px solid ${c.border}`,
152
+ borderTop: `4px solid ${AMBER}`,
153
+ borderRadius: 12,
154
+ boxShadow: '0 12px 32px rgba(0,0,0,0.18)',
155
+ fontFamily: 'inherit',
156
+ fontSize: 14,
157
+ lineHeight: 1.45,
158
+ }, children: [_jsx("button", { type: "button", onClick: onClose, "aria-label": t(language, 'dev.close'), style: { position: 'absolute', top: 8, right: 8, width: 28, height: 28, border: 'none', background: 'transparent', color: c.muted, fontSize: 20, lineHeight: 1, cursor: 'pointer', borderRadius: 6 }, children: "\u00D7" }), _jsxs("h2", { id: titleId, style: { margin: '0 28px 4px 0', fontSize: 15, fontWeight: 700, display: 'flex', alignItems: 'center', gap: 6 }, children: [_jsx("span", { style: { color: AMBER_EDGE, display: 'inline-flex' }, children: _jsx(WarningGlyph, { size: 15 }) }), title] }), _jsx("p", { style: { margin: '0 0 12px', color: c.muted }, children: t(language, 'dev.panel_body') }), state === 'done' ? (_jsx("p", { role: "status", style: { margin: '0 0 12px', color: c.ok, fontWeight: 600 }, children: t(language, 'dev.notify_done') })) : (_jsxs("form", { onSubmit: submit, noValidate: true, style: { margin: '0 0 12px' }, children: [_jsx("label", { htmlFor: `${id}-email`, style: { display: 'block', fontWeight: 600, marginBottom: 6 }, children: t(language, 'dev.notify_label') }), _jsxs("div", { style: { display: 'flex', gap: 8 }, children: [_jsx("input", { ref: inputRef, id: `${id}-email`, type: "email", inputMode: "email", autoComplete: "email", required: true, maxLength: 254, value: email, onChange: (e) => { setEmail(e.target.value); if (state !== 'sending')
159
+ setState('idle'); }, placeholder: t(language, 'dev.notify_placeholder'), "aria-invalid": state === 'invalid' || undefined, "aria-describedby": msgId, style: { flex: 1, minWidth: 0, padding: '8px 10px', fontSize: 14, fontFamily: 'inherit', color: c.text, background: c.field, border: `1px solid ${state === 'invalid' ? c.err : c.border}`, borderRadius: 8 } }), _jsx("button", { type: "submit", disabled: state === 'sending', style: { flexShrink: 0, padding: '8px 12px', fontSize: 14, fontWeight: 700, fontFamily: 'inherit', color: BRAND.onOrange, background: BRAND.orangeFill, border: 'none', borderRadius: 8, cursor: state === 'sending' ? 'default' : 'pointer', opacity: state === 'sending' ? 0.7 : 1 }, children: t(language, state === 'sending' ? 'dev.notify_sending' : 'dev.notify_button') })] }), _jsx("p", { id: msgId, role: state === 'invalid' || state === 'error' ? 'alert' : undefined, style: { margin: '6px 0 0', fontSize: 12, color: state === 'invalid' || state === 'error' ? c.err : c.muted }, children: t(language, state === 'invalid' ? 'dev.notify_invalid' : state === 'error' ? 'dev.notify_error' : 'dev.notify_privacy') })] })), _jsxs("a", { href: href, style: { color: c.link, fontWeight: 600, textDecoration: 'underline', textUnderlineOffset: 2 }, children: [t(language, 'dev.finished_apps_link'), " \u2192"] })] }));
160
+ }
161
+ function WarningGlyph({ size = 11 }) {
162
+ return (_jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: [_jsx("path", { d: "M12 3 2 21h20L12 3z" }), _jsx("path", { d: "M12 10v5" }), _jsx("path", { d: "M12 18h.01" })] }));
163
+ }
164
+ function useNarrow() {
165
+ const [narrow, setNarrow] = useState(false);
166
+ useEffect(() => {
167
+ if (typeof window === 'undefined' || !window.matchMedia)
168
+ return;
169
+ const mq = window.matchMedia('(max-width: 640px)');
170
+ const update = () => setNarrow(mq.matches);
171
+ update();
172
+ mq.addEventListener?.('change', update);
173
+ return () => mq.removeEventListener?.('change', update);
174
+ }, []);
175
+ return narrow;
176
+ }
177
+ //# sourceMappingURL=DevelopmentRibbon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevelopmentRibbon.js","sourceRoot":"","sources":["../src/DevelopmentRibbon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAsD,MAAM,OAAO,CAAA;AAE9G,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AA2DrD,MAAM,CAAC,MAAM,+BAA+B,GAAG,iCAAiC,CAAA;AAEhF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,QAAwB,EACxB,SAAiB,EACjB,KAAa,EACb,QAAiB;IAEjB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,QAAQ,CAAC,GAAG,CAAC,6BAA6B,EAAE;QAClE,SAAS,EAAE,SAAS;QACpB,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,QAAQ,IAAI,IAAI;KAC7B,CAAC,CAAA;IACF,IAAI,KAAK;QAAE,MAAM,KAAK,CAAA;AACxB,CAAC;AAED,MAAM,KAAK,GAAG,SAAS,CAAA;AACvB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