@korzun/design 0.1.0 → 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.
- package/AGENTS.md +7 -4
- package/dist/component/heading/index.d.ts +303 -0
- package/dist/component/heading/index.d.ts.map +1 -0
- package/dist/component/heading/index.js +21 -0
- package/dist/component/heading/index.js.map +1 -0
- package/dist/component/heading/style.d.ts +5 -0
- package/dist/component/heading/style.d.ts.map +1 -0
- package/dist/component/heading/style.js +5 -0
- package/dist/component/heading/style.js.map +1 -0
- package/dist/component/index.d.ts +4 -0
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component/index.js +4 -0
- package/dist/component/index.js.map +1 -1
- package/dist/component/inline/index.d.ts +303 -0
- package/dist/component/inline/index.d.ts.map +1 -0
- package/dist/component/inline/index.js +13 -0
- package/dist/component/inline/index.js.map +1 -0
- package/dist/component/inline/style.d.ts +5 -0
- package/dist/component/inline/style.d.ts.map +1 -0
- package/dist/component/inline/style.js +18 -0
- package/dist/component/inline/style.js.map +1 -0
- package/dist/component/stack/gap.d.ts +4 -0
- package/dist/component/stack/gap.d.ts.map +1 -0
- package/dist/component/stack/gap.js +10 -0
- package/dist/component/stack/gap.js.map +1 -0
- package/dist/component/stack/index.d.ts +299 -0
- package/dist/component/stack/index.d.ts.map +1 -0
- package/dist/component/stack/index.js +13 -0
- package/dist/component/stack/index.js.map +1 -0
- package/dist/component/stack/style.d.ts +5 -0
- package/dist/component/stack/style.d.ts.map +1 -0
- package/dist/component/stack/style.js +12 -0
- package/dist/component/stack/style.js.map +1 -0
- package/dist/component/text/index.d.ts +307 -0
- package/dist/component/text/index.d.ts.map +1 -0
- package/dist/component/text/index.js +15 -0
- package/dist/component/text/index.js.map +1 -0
- package/dist/component/text/style.d.ts +11 -0
- package/dist/component/text/style.d.ts.map +1 -0
- package/dist/component/text/style.js +48 -0
- package/dist/component/text/style.js.map +1 -0
- package/dist/theme/theme.d.ts +1 -0
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +7 -1
- package/dist/theme/theme.js.map +1 -1
- package/docs/component/heading.md +85 -0
- package/docs/component/inline.md +64 -0
- package/docs/component/meta-line.md +13 -17
- package/docs/component/stack.md +68 -0
- package/docs/component/text.md +94 -0
- package/docs/patterns.md +28 -9
- package/docs/theme.md +6 -7
- package/docs/tokens.md +1 -1
- package/package.json +1 -1
- package/src/component/heading/index.tsx +64 -0
- package/src/component/heading/style.ts +5 -0
- package/src/component/index.ts +4 -0
- package/src/component/inline/index.tsx +57 -0
- package/src/component/inline/style.ts +18 -0
- package/src/component/stack/gap.ts +16 -0
- package/src/component/stack/index.tsx +49 -0
- package/src/component/stack/style.ts +12 -0
- package/src/component/text/index.tsx +61 -0
- package/src/component/text/style.ts +67 -0
- package/src/theme/theme.ts +14 -2
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
+
import type { Gap } from '../stack/gap.js';
|
|
3
|
+
export interface InlineProps extends Omit<HTMLAttributes<HTMLElement>, 'style'> {
|
|
4
|
+
/** The element to render. `ul`/`ol` also reset list margin, padding and bullets. Default `'div'`. */
|
|
5
|
+
as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'nav';
|
|
6
|
+
/** Space between children, from the theme's `space` tokens, or `'none'`. Default `'sm'`. */
|
|
7
|
+
gap?: Gap;
|
|
8
|
+
/** Cross-axis (vertical) alignment of children. Default `'center'`. */
|
|
9
|
+
align?: 'center' | 'start' | 'end' | 'baseline' | 'stretch';
|
|
10
|
+
/** Main-axis (horizontal) distribution. `'between'` pushes the first and last child to opposite edges. Default `'start'`. */
|
|
11
|
+
justify?: 'start' | 'center' | 'end' | 'between';
|
|
12
|
+
/** Let children wrap onto further lines instead of overflowing. Default `false`. */
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
/** Extra class on the root. Override with `'&&'` specificity, never `!important`. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** The children, laid out left to right. */
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
/** Ref to the root element. */
|
|
19
|
+
ref?: Ref<HTMLElement>;
|
|
20
|
+
}
|
|
21
|
+
/** Lays children out in a horizontal row with a themed gap between them. */
|
|
22
|
+
export declare const Inline: ({ as, gap, align, justify, wrap, className, children, ref, ...rest }: InlineProps) => import("react").DetailedReactHTMLElement<{
|
|
23
|
+
dangerouslySetInnerHTML?: {
|
|
24
|
+
__html: string | TrustedHTML;
|
|
25
|
+
} | undefined;
|
|
26
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
27
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
28
|
+
onCut?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
29
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
30
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
31
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
32
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
33
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
34
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
35
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
36
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
37
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElement> | undefined;
|
|
38
|
+
onFocus?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
39
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
40
|
+
onBlur?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
41
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLElement> | undefined;
|
|
42
|
+
onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
43
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
|
|
44
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
45
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
46
|
+
onInput?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
47
|
+
onInputCapture?: import("react").InputEventHandler<HTMLElement> | undefined;
|
|
48
|
+
onReset?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
49
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
50
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
51
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLElement> | undefined;
|
|
52
|
+
onInvalid?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
53
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
54
|
+
onLoad?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
55
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
56
|
+
onError?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
57
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
58
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
59
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
60
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
61
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
62
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
63
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
64
|
+
onAbort?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
65
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
66
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
67
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
68
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
69
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
70
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
71
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
72
|
+
onEmptied?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
73
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
74
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
75
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
76
|
+
onEnded?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
77
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
78
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
79
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
80
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
81
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
82
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
83
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
84
|
+
onPause?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
85
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
86
|
+
onPlay?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
87
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
88
|
+
onPlaying?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
89
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
90
|
+
onProgress?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
91
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
92
|
+
onRateChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
93
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
94
|
+
onSeeked?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
95
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
96
|
+
onSeeking?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
97
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
98
|
+
onStalled?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
99
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
100
|
+
onSuspend?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
101
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
102
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
103
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
104
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
105
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
106
|
+
onWaiting?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
107
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
108
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
109
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
110
|
+
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
111
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
112
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
113
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
114
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
115
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
116
|
+
onDrag?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
117
|
+
onDragCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
118
|
+
onDragEnd?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
119
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
120
|
+
onDragEnter?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
121
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
122
|
+
onDragExit?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
123
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
124
|
+
onDragLeave?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
125
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
126
|
+
onDragOver?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
127
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
128
|
+
onDragStart?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
129
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
130
|
+
onDrop?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
131
|
+
onDropCapture?: import("react").DragEventHandler<HTMLElement> | undefined;
|
|
132
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
133
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
134
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
135
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
136
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
137
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
138
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
139
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
140
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onSelect?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onScroll?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onWheel?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
192
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
193
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
194
|
+
"aria-activedescendant"?: string | undefined;
|
|
195
|
+
"aria-atomic"?: ("false" | "true" | boolean) | undefined;
|
|
196
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
197
|
+
"aria-braillelabel"?: string | undefined;
|
|
198
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
199
|
+
"aria-busy"?: ("false" | "true" | boolean) | undefined;
|
|
200
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
201
|
+
"aria-colcount"?: number | undefined;
|
|
202
|
+
"aria-colindex"?: number | undefined;
|
|
203
|
+
"aria-colindextext"?: string | undefined;
|
|
204
|
+
"aria-colspan"?: number | undefined;
|
|
205
|
+
"aria-controls"?: string | undefined;
|
|
206
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
207
|
+
"aria-describedby"?: string | undefined;
|
|
208
|
+
"aria-description"?: string | undefined;
|
|
209
|
+
"aria-details"?: string | undefined;
|
|
210
|
+
"aria-disabled"?: ("false" | "true" | boolean) | undefined;
|
|
211
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
212
|
+
"aria-errormessage"?: string | undefined;
|
|
213
|
+
"aria-expanded"?: ("false" | "true" | boolean) | undefined;
|
|
214
|
+
"aria-flowto"?: string | undefined;
|
|
215
|
+
"aria-grabbed"?: ("false" | "true" | boolean) | undefined;
|
|
216
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
217
|
+
"aria-hidden"?: ("false" | "true" | boolean) | undefined;
|
|
218
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
219
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
220
|
+
"aria-label"?: string | undefined;
|
|
221
|
+
"aria-labelledby"?: string | undefined;
|
|
222
|
+
"aria-level"?: number | undefined;
|
|
223
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
224
|
+
"aria-modal"?: ("false" | "true" | boolean) | undefined;
|
|
225
|
+
"aria-multiline"?: ("false" | "true" | boolean) | undefined;
|
|
226
|
+
"aria-multiselectable"?: ("false" | "true" | boolean) | undefined;
|
|
227
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
228
|
+
"aria-owns"?: string | undefined;
|
|
229
|
+
"aria-placeholder"?: string | undefined;
|
|
230
|
+
"aria-posinset"?: number | undefined;
|
|
231
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
232
|
+
"aria-readonly"?: ("false" | "true" | boolean) | undefined;
|
|
233
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
234
|
+
"aria-required"?: ("false" | "true" | boolean) | undefined;
|
|
235
|
+
"aria-roledescription"?: string | undefined;
|
|
236
|
+
"aria-rowcount"?: number | undefined;
|
|
237
|
+
"aria-rowindex"?: number | undefined;
|
|
238
|
+
"aria-rowindextext"?: string | undefined;
|
|
239
|
+
"aria-rowspan"?: number | undefined;
|
|
240
|
+
"aria-selected"?: ("false" | "true" | boolean) | undefined;
|
|
241
|
+
"aria-setsize"?: number | undefined;
|
|
242
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
243
|
+
"aria-valuemax"?: number | undefined;
|
|
244
|
+
"aria-valuemin"?: number | undefined;
|
|
245
|
+
"aria-valuenow"?: number | undefined;
|
|
246
|
+
"aria-valuetext"?: string | undefined;
|
|
247
|
+
defaultChecked?: boolean | undefined;
|
|
248
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
249
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
250
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
251
|
+
accessKey?: string | undefined;
|
|
252
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
253
|
+
autoFocus?: boolean | undefined;
|
|
254
|
+
contentEditable?: ("false" | "true" | boolean) | "inherit" | "plaintext-only" | undefined;
|
|
255
|
+
contextMenu?: string | undefined;
|
|
256
|
+
dir?: string | undefined;
|
|
257
|
+
draggable?: ("false" | "true" | boolean) | undefined;
|
|
258
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
259
|
+
hidden?: boolean | undefined;
|
|
260
|
+
id?: string | undefined;
|
|
261
|
+
lang?: string | undefined;
|
|
262
|
+
nonce?: string | undefined;
|
|
263
|
+
slot?: string | undefined;
|
|
264
|
+
spellCheck?: ("false" | "true" | boolean) | undefined;
|
|
265
|
+
tabIndex?: number | undefined;
|
|
266
|
+
title?: string | undefined;
|
|
267
|
+
translate?: "yes" | "no" | undefined;
|
|
268
|
+
radioGroup?: string | undefined;
|
|
269
|
+
role?: import("react").AriaRole | undefined;
|
|
270
|
+
about?: string | undefined;
|
|
271
|
+
content?: string | undefined;
|
|
272
|
+
datatype?: string | undefined;
|
|
273
|
+
inlist?: any;
|
|
274
|
+
prefix?: string | undefined;
|
|
275
|
+
property?: string | undefined;
|
|
276
|
+
rel?: string | undefined;
|
|
277
|
+
resource?: string | undefined;
|
|
278
|
+
rev?: string | undefined;
|
|
279
|
+
typeof?: string | undefined;
|
|
280
|
+
vocab?: string | undefined;
|
|
281
|
+
autoCorrect?: string | undefined;
|
|
282
|
+
autoSave?: string | undefined;
|
|
283
|
+
color?: string | undefined;
|
|
284
|
+
itemProp?: string | undefined;
|
|
285
|
+
itemScope?: boolean | undefined;
|
|
286
|
+
itemType?: string | undefined;
|
|
287
|
+
itemID?: string | undefined;
|
|
288
|
+
itemRef?: string | undefined;
|
|
289
|
+
results?: number | undefined;
|
|
290
|
+
security?: string | undefined;
|
|
291
|
+
unselectable?: "on" | "off" | undefined;
|
|
292
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
293
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
294
|
+
popoverTarget?: string | undefined;
|
|
295
|
+
inert?: boolean | undefined;
|
|
296
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
297
|
+
is?: string | undefined;
|
|
298
|
+
exportparts?: string | undefined;
|
|
299
|
+
part?: string | undefined;
|
|
300
|
+
ref: Ref<HTMLElement> | undefined;
|
|
301
|
+
className: string;
|
|
302
|
+
}, HTMLElement>;
|
|
303
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/inline/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAG3C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC7E,qGAAqG;IACrG,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IACjD,4FAA4F;IAC5F,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,uEAAuE;IACvE,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,6HAA6H;IAC7H,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACjD,oFAAoF;IACpF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,4EAA4E;AAC5E,eAAO,MAAM,MAAM,yEAUhB,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAmBb,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import cx from 'classnames';
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { useStyle } from './style.js';
|
|
4
|
+
/** Lays children out in a horizontal row with a themed gap between them. */
|
|
5
|
+
export const Inline = ({ as = 'div', gap = 'sm', align = 'center', justify = 'start', wrap = false, className, children, ref, ...rest }) => {
|
|
6
|
+
const style = useStyle();
|
|
7
|
+
return createElement(as, {
|
|
8
|
+
...rest,
|
|
9
|
+
ref,
|
|
10
|
+
className: cx(style.root, style[`gap-${gap}`], style[`align-${align}`], style[`justify-${justify}`], wrap && style.wrap, (as === 'ul' || as === 'ol') && style.list, className),
|
|
11
|
+
}, children);
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/component/inline/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAqBtC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,EAAE,GAAG,KAAK,EACV,GAAG,GAAG,IAAI,EACV,KAAK,GAAG,QAAQ,EAChB,OAAO,GAAG,OAAO,EACjB,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACK,EAAE,EAAE;IAChB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,aAAa,CAClB,EAAE,EACF;QACE,GAAG,IAAI;QACP,GAAG;QACH,SAAS,EAAE,EAAE,CACX,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,EACnB,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,EACvB,KAAK,CAAC,WAAW,OAAO,EAAE,CAAC,EAC3B,IAAI,IAAI,KAAK,CAAC,IAAI,EAClB,CAAC,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,EAC1C,SAAS,CACV;KACF,EACD,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import cx from 'classnames';\nimport type { HTMLAttributes, ReactNode, Ref } from 'react';\nimport { createElement } from 'react';\n\nimport type { Gap } from '../stack/gap.js';\nimport { useStyle } from './style.js';\n\nexport interface InlineProps extends Omit<HTMLAttributes<HTMLElement>, 'style'> {\n /** The element to render. `ul`/`ol` also reset list margin, padding and bullets. Default `'div'`. */\n as?: 'div' | 'span' | 'ul' | 'ol' | 'li' | 'nav';\n /** Space between children, from the theme's `space` tokens, or `'none'`. Default `'sm'`. */\n gap?: Gap;\n /** Cross-axis (vertical) alignment of children. Default `'center'`. */\n align?: 'center' | 'start' | 'end' | 'baseline' | 'stretch';\n /** Main-axis (horizontal) distribution. `'between'` pushes the first and last child to opposite edges. Default `'start'`. */\n justify?: 'start' | 'center' | 'end' | 'between';\n /** Let children wrap onto further lines instead of overflowing. Default `false`. */\n wrap?: boolean;\n /** Extra class on the root. Override with `'&&'` specificity, never `!important`. */\n className?: string;\n /** The children, laid out left to right. */\n children?: ReactNode;\n /** Ref to the root element. */\n ref?: Ref<HTMLElement>;\n}\n\n/** Lays children out in a horizontal row with a themed gap between them. */\nexport const Inline = ({\n as = 'div',\n gap = 'sm',\n align = 'center',\n justify = 'start',\n wrap = false,\n className,\n children,\n ref,\n ...rest\n}: InlineProps) => {\n const style = useStyle();\n return createElement(\n as,\n {\n ...rest,\n ref,\n className: cx(\n style.root,\n style[`gap-${gap}`],\n style[`align-${align}`],\n style[`justify-${justify}`],\n wrap && style.wrap,\n (as === 'ul' || as === 'ol') && style.list,\n className\n ),\n },\n children\n );\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type Theme } from '../../theme/index.js';
|
|
2
|
+
export declare const useStyle: (data?: {
|
|
3
|
+
theme?: Theme | undefined;
|
|
4
|
+
} | undefined) => import("jss").Classes<"align-baseline" | "align-center" | "align-end" | "align-start" | "align-stretch" | "gap-lg" | "gap-md" | "gap-none" | "gap-sm" | "gap-xl" | "gap-xs" | "gap-xxl" | "gap-xxs" | "gap-xxxl" | "gap-xxxs" | "gap-xxxxl" | "gap-xxxxxl" | "justify-between" | "justify-center" | "justify-end" | "justify-start" | "list" | "root" | "wrap">;
|
|
5
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/component/inline/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGnE,eAAO,MAAM,QAAQ;;iXAclB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createUseStyles } from '../../theme/index.js';
|
|
2
|
+
import { gapRules } from '../stack/gap.js';
|
|
3
|
+
export const useStyle = createUseStyles((theme) => ({
|
|
4
|
+
root: { display: 'flex', flexDirection: 'row', minWidth: 0 },
|
|
5
|
+
list: { margin: 0, padding: 0, listStyle: 'none' },
|
|
6
|
+
wrap: { flexWrap: 'wrap' },
|
|
7
|
+
'align-start': { alignItems: 'flex-start' },
|
|
8
|
+
'align-center': { alignItems: 'center' },
|
|
9
|
+
'align-end': { alignItems: 'flex-end' },
|
|
10
|
+
'align-baseline': { alignItems: 'baseline' },
|
|
11
|
+
'align-stretch': { alignItems: 'stretch' },
|
|
12
|
+
'justify-start': { justifyContent: 'flex-start' },
|
|
13
|
+
'justify-center': { justifyContent: 'center' },
|
|
14
|
+
'justify-end': { justifyContent: 'flex-end' },
|
|
15
|
+
'justify-between': { justifyContent: 'space-between' },
|
|
16
|
+
...gapRules(theme),
|
|
17
|
+
}));
|
|
18
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/component/inline/style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC;IACzD,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE;IAC5D,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE;IAClD,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;IAC1B,aAAa,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;IAC3C,cAAc,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;IACxC,WAAW,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;IACvC,gBAAgB,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;IAC5C,eAAe,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;IAC1C,eAAe,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE;IACjD,gBAAgB,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE;IAC9C,aAAa,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE;IAC7C,iBAAiB,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE;IACtD,GAAG,QAAQ,CAAC,KAAK,CAAC;CACnB,CAAC,CAAC,CAAC","sourcesContent":["import { createUseStyles, type Theme } from '../../theme/index.js';\nimport { gapRules } from '../stack/gap.js';\n\nexport const useStyle = createUseStyles((theme: Theme) => ({\n root: { display: 'flex', flexDirection: 'row', minWidth: 0 },\n list: { margin: 0, padding: 0, listStyle: 'none' },\n wrap: { flexWrap: 'wrap' },\n 'align-start': { alignItems: 'flex-start' },\n 'align-center': { alignItems: 'center' },\n 'align-end': { alignItems: 'flex-end' },\n 'align-baseline': { alignItems: 'baseline' },\n 'align-stretch': { alignItems: 'stretch' },\n 'justify-start': { justifyContent: 'flex-start' },\n 'justify-center': { justifyContent: 'center' },\n 'justify-end': { justifyContent: 'flex-end' },\n 'justify-between': { justifyContent: 'space-between' },\n ...gapRules(theme),\n}));\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap.d.ts","sourceRoot":"","sources":["../../../src/component/stack/gap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC;AAIhD,eAAO,MAAM,QAAQ,UAAW,KAAK,KAS7B,MAAM,CAAC,OAAO,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// One static class per space token (shared by Stack and Inline), so a gap is a
|
|
2
|
+
// class swap rather than a per-instance dynamic style sheet.
|
|
3
|
+
export const gapRules = (theme) => ({
|
|
4
|
+
...Object.fromEntries(Object.keys(theme.space).map((key) => [
|
|
5
|
+
`gap-${key}`,
|
|
6
|
+
{ gap: theme.space[key] },
|
|
7
|
+
])),
|
|
8
|
+
'gap-none': { gap: 0 },
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=gap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap.js","sourceRoot":"","sources":["../../../src/component/stack/gap.ts"],"names":[],"mappings":"AAIA,+EAA+E;AAC/E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE,CACvC,CAAC;IACC,GAAG,MAAM,CAAC,WAAW,CAClB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAA8B,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC;QAClE,OAAO,GAAG,EAAE;QACZ,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;KAC1B,CAAC,CACH;IACD,UAAU,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;CACvB,CAAiC,CAAC","sourcesContent":["import type { Theme } from '../../theme/index.js';\n\nexport type Gap = keyof Theme['space'] | 'none';\n\n// One static class per space token (shared by Stack and Inline), so a gap is a\n// class swap rather than a per-instance dynamic style sheet.\nexport const gapRules = (theme: Theme) =>\n ({\n ...Object.fromEntries(\n (Object.keys(theme.space) as (keyof Theme['space'])[]).map((key) => [\n `gap-${key}`,\n { gap: theme.space[key] },\n ])\n ),\n 'gap-none': { gap: 0 },\n }) as Record<`gap-${Gap}`, object>;\n"]}
|