@chayns-components/core 5.0.0-beta.410 → 5.0.0-beta.413
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/lib/components/checkbox/Checkbox.d.ts +1 -1
- package/lib/components/checkbox/Checkbox.js.map +1 -1
- package/lib/components/input/Input.d.ts +4 -0
- package/lib/components/input/Input.js +5 -3
- package/lib/components/input/Input.js.map +1 -1
- package/lib/components/input/Input.styles.d.ts +4 -1
- package/lib/components/input/Input.styles.js +29 -10
- package/lib/components/input/Input.styles.js.map +1 -1
- package/lib/components/number-input/NumberInput.d.ts +9 -1
- package/lib/components/number-input/NumberInput.js +40 -21
- package/lib/components/number-input/NumberInput.js.map +1 -1
- package/lib/components/number-input/constants/number.d.ts +1 -0
- package/lib/components/number-input/constants/number.js +3 -2
- package/lib/components/number-input/constants/number.js.map +1 -1
- package/lib/components/number-input/utils/number.d.ts +4 -2
- package/lib/components/number-input/utils/number.js +30 -2
- package/lib/components/number-input/utils/number.js.map +1 -1
- package/lib/components/opening-times/OpeningTimes.d.ts +19 -0
- package/lib/components/opening-times/OpeningTimes.js +92 -0
- package/lib/components/opening-times/OpeningTimes.js.map +1 -0
- package/lib/components/opening-times/OpeningTimes.styles.d.ts +8 -0
- package/lib/components/opening-times/OpeningTimes.styles.js +19 -0
- package/lib/components/opening-times/OpeningTimes.styles.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.d.ts +10 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.js +95 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.d.ts +2 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.js +13 -0
- package/lib/components/opening-times/opening-inputs/OpeningInputs.styles.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.d.ts +14 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js +100 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.js.map +1 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.d.ts +274 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js +46 -0
- package/lib/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.js.map +1 -0
- package/lib/components/progress-bar/ProgressBar.d.ts +2 -2
- package/lib/components/progress-bar/ProgressBar.js +2 -2
- package/lib/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/components/slider/Slider.d.ts +2 -2
- package/lib/components/slider/Slider.js +4 -4
- package/lib/components/slider/Slider.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/types/openingTimes.d.ts +19 -0
- package/lib/types/openingTimes.js +13 -0
- package/lib/types/openingTimes.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import type { WithTheme } from '../../../color-scheme-provider/ColorSchemeProvider';
|
|
4
|
+
export declare const StyledOpeningInput: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<{
|
|
5
|
+
slot?: string | undefined;
|
|
6
|
+
title?: string | undefined;
|
|
7
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
8
|
+
defaultChecked?: boolean | undefined;
|
|
9
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
10
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
11
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
12
|
+
accessKey?: string | undefined;
|
|
13
|
+
autoFocus?: boolean | undefined;
|
|
14
|
+
className?: string | undefined;
|
|
15
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
16
|
+
contextMenu?: string | undefined;
|
|
17
|
+
dir?: string | undefined;
|
|
18
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
19
|
+
hidden?: boolean | undefined;
|
|
20
|
+
id?: string | undefined;
|
|
21
|
+
lang?: string | undefined;
|
|
22
|
+
nonce?: string | undefined;
|
|
23
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
tabIndex?: number | undefined;
|
|
25
|
+
translate?: "yes" | "no" | undefined;
|
|
26
|
+
radioGroup?: string | undefined;
|
|
27
|
+
role?: import("react").AriaRole | undefined;
|
|
28
|
+
about?: string | undefined;
|
|
29
|
+
content?: string | undefined;
|
|
30
|
+
datatype?: string | undefined;
|
|
31
|
+
inlist?: any;
|
|
32
|
+
prefix?: string | undefined;
|
|
33
|
+
property?: string | undefined;
|
|
34
|
+
rel?: string | undefined;
|
|
35
|
+
resource?: string | undefined;
|
|
36
|
+
rev?: string | undefined;
|
|
37
|
+
typeof?: string | undefined;
|
|
38
|
+
vocab?: string | undefined;
|
|
39
|
+
autoCapitalize?: string | undefined;
|
|
40
|
+
autoCorrect?: string | undefined;
|
|
41
|
+
autoSave?: string | undefined;
|
|
42
|
+
color?: string | undefined;
|
|
43
|
+
itemProp?: string | undefined;
|
|
44
|
+
itemScope?: boolean | undefined;
|
|
45
|
+
itemType?: string | undefined;
|
|
46
|
+
itemID?: string | undefined;
|
|
47
|
+
itemRef?: string | undefined;
|
|
48
|
+
results?: number | undefined;
|
|
49
|
+
security?: string | undefined;
|
|
50
|
+
unselectable?: "on" | "off" | undefined;
|
|
51
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
52
|
+
is?: string | undefined;
|
|
53
|
+
"aria-activedescendant"?: string | undefined;
|
|
54
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
55
|
+
"aria-autocomplete"?: "list" | "none" | "both" | "inline" | undefined;
|
|
56
|
+
"aria-braillelabel"?: string | undefined;
|
|
57
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
58
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
59
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
60
|
+
"aria-colcount"?: number | undefined;
|
|
61
|
+
"aria-colindex"?: number | undefined;
|
|
62
|
+
"aria-colindextext"?: string | undefined;
|
|
63
|
+
"aria-colspan"?: number | undefined;
|
|
64
|
+
"aria-controls"?: string | undefined;
|
|
65
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
66
|
+
"aria-describedby"?: string | undefined;
|
|
67
|
+
"aria-description"?: string | undefined;
|
|
68
|
+
"aria-details"?: string | undefined;
|
|
69
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
70
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
71
|
+
"aria-errormessage"?: string | undefined;
|
|
72
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
73
|
+
"aria-flowto"?: string | undefined;
|
|
74
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
75
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
76
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
78
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
79
|
+
"aria-label"?: string | undefined;
|
|
80
|
+
"aria-labelledby"?: string | undefined;
|
|
81
|
+
"aria-level"?: number | undefined;
|
|
82
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
83
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
84
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
87
|
+
"aria-owns"?: string | undefined;
|
|
88
|
+
"aria-placeholder"?: string | undefined;
|
|
89
|
+
"aria-posinset"?: number | undefined;
|
|
90
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
91
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
92
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
93
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
94
|
+
"aria-roledescription"?: string | undefined;
|
|
95
|
+
"aria-rowcount"?: number | undefined;
|
|
96
|
+
"aria-rowindex"?: number | undefined;
|
|
97
|
+
"aria-rowindextext"?: string | undefined;
|
|
98
|
+
"aria-rowspan"?: number | undefined;
|
|
99
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
100
|
+
"aria-setsize"?: number | undefined;
|
|
101
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
102
|
+
"aria-valuemax"?: number | undefined;
|
|
103
|
+
"aria-valuemin"?: number | undefined;
|
|
104
|
+
"aria-valuenow"?: number | undefined;
|
|
105
|
+
"aria-valuetext"?: string | undefined;
|
|
106
|
+
dangerouslySetInnerHTML?: {
|
|
107
|
+
__html: string | TrustedHTML;
|
|
108
|
+
} | undefined;
|
|
109
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
110
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
111
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
112
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
115
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
116
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
117
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLDivElement>, never>> & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
|
|
267
|
+
export declare const StyledOpeningInputWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
268
|
+
type StyledOpeningInputTextProps = WithTheme<{
|
|
269
|
+
isDisabled?: boolean;
|
|
270
|
+
}>;
|
|
271
|
+
export declare const StyledOpeningInputText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledOpeningInputTextProps>>;
|
|
272
|
+
export declare const StyledOpeningInputButtonWrapper: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
273
|
+
export declare const StyledOpeningInputPseudoButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
274
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledOpeningInputWrapper = exports.StyledOpeningInputText = exports.StyledOpeningInputPseudoButton = exports.StyledOpeningInputButtonWrapper = exports.StyledOpeningInput = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _framerMotion = require("framer-motion");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const StyledOpeningInput = exports.StyledOpeningInput = (0, _styledComponents.default)(_framerMotion.motion.div)`
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 6px;
|
|
14
|
+
`;
|
|
15
|
+
const StyledOpeningInputWrapper = exports.StyledOpeningInputWrapper = _styledComponents.default.div`
|
|
16
|
+
width: 60px;
|
|
17
|
+
`;
|
|
18
|
+
const StyledOpeningInputText = exports.StyledOpeningInputText = _styledComponents.default.div`
|
|
19
|
+
opacity: ${_ref => {
|
|
20
|
+
let {
|
|
21
|
+
isDisabled
|
|
22
|
+
} = _ref;
|
|
23
|
+
return isDisabled ? 0.5 : 1;
|
|
24
|
+
}};
|
|
25
|
+
`;
|
|
26
|
+
const StyledOpeningInputButtonWrapper = exports.StyledOpeningInputButtonWrapper = _styledComponents.default.div`
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: 20px;
|
|
29
|
+
background-color: ${_ref2 => {
|
|
30
|
+
let {
|
|
31
|
+
theme
|
|
32
|
+
} = _ref2;
|
|
33
|
+
return theme['202'];
|
|
34
|
+
}};
|
|
35
|
+
border-radius: 3px;
|
|
36
|
+
box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);
|
|
37
|
+
border: none;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
`;
|
|
43
|
+
const StyledOpeningInputPseudoButton = exports.StyledOpeningInputPseudoButton = _styledComponents.default.div`
|
|
44
|
+
width: 20px;
|
|
45
|
+
`;
|
|
46
|
+
//# sourceMappingURL=OpeningInput.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpeningInput.styles.js","names":["_styledComponents","_interopRequireDefault","require","_framerMotion","obj","__esModule","default","StyledOpeningInput","exports","styled","motion","div","StyledOpeningInputWrapper","StyledOpeningInputText","_ref","isDisabled","StyledOpeningInputButtonWrapper","_ref2","theme","StyledOpeningInputPseudoButton"],"sources":["../../../../../src/components/opening-times/opening-inputs/opening-input/OpeningInput.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport type { WithTheme } from '../../../color-scheme-provider/ColorSchemeProvider';\nimport { motion } from 'framer-motion';\n\nexport const StyledOpeningInput = styled(motion.div)`\n display: flex;\n align-items: center;\n gap: 6px;\n`;\n\nexport const StyledOpeningInputWrapper = styled.div`\n width: 60px;\n`;\n\ntype StyledOpeningInputTextProps = WithTheme<{ isDisabled?: boolean }>;\n\nexport const StyledOpeningInputText = styled.div<StyledOpeningInputTextProps>`\n opacity: ${({ isDisabled }) => (isDisabled ? 0.5 : 1)};\n`;\n\ntype StyledOpeningInputButtonWrapperProps = WithTheme<unknown>;\n\nexport const StyledOpeningInputButtonWrapper = styled.div`\n width: 20px;\n height: 20px;\n background-color: ${({ theme }: StyledOpeningInputButtonWrapperProps) => theme['202']};\n border-radius: 3px;\n box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const StyledOpeningInputPseudoButton = styled.div`\n width: 20px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAAuC,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,yBAAM,EAACC,oBAAM,CAACC,GAAG,CAAE;AACrD;AACA;AACA;AACA,CAAC;AAEM,MAAMC,yBAAyB,GAAAJ,OAAA,CAAAI,yBAAA,GAAGH,yBAAM,CAACE,GAAI;AACpD;AACA,CAAC;AAIM,MAAME,sBAAsB,GAAAL,OAAA,CAAAK,sBAAA,GAAGJ,yBAAM,CAACE,GAAiC;AAC9E,eAAeG,IAAA;EAAA,IAAC;IAAEC;EAAW,CAAC,GAAAD,IAAA;EAAA,OAAMC,UAAU,GAAG,GAAG,GAAG,CAAC;AAAA,CAAE;AAC1D,CAAC;AAIM,MAAMC,+BAA+B,GAAAR,OAAA,CAAAQ,+BAAA,GAAGP,yBAAM,CAACE,GAAI;AAC1D;AACA;AACA,wBAAwBM,KAAA;EAAA,IAAC;IAAEC;EAA4C,CAAC,GAAAD,KAAA;EAAA,OAAKC,KAAK,CAAC,KAAK,CAAC;AAAA,CAAC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,8BAA8B,GAAAX,OAAA,CAAAW,8BAAA,GAAGV,yBAAM,CAACE,GAAI;AACzD;AACA,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export type ProgressBarProps = {
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The label that should be displayed under the progressbar.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
label?: string;
|
|
7
7
|
/**
|
|
8
8
|
* The percentage of the progress. Number between 0 and 100.
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
11
11
|
const ProgressBar = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
percentage,
|
|
14
|
-
|
|
14
|
+
label
|
|
15
15
|
} = _ref;
|
|
16
16
|
const [internalPercentage, setInternalPercentage] = (0, _react.useState)(0);
|
|
17
17
|
(0, _react.useEffect)(() => {
|
|
@@ -32,7 +32,7 @@ const ProgressBar = _ref => {
|
|
|
32
32
|
transition: {
|
|
33
33
|
type: 'tween'
|
|
34
34
|
}
|
|
35
|
-
}), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarBackground, null),
|
|
35
|
+
}), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarBackground, null), label && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarLable, null, label)), [label, internalPercentage]);
|
|
36
36
|
};
|
|
37
37
|
ProgressBar.displayName = 'ProgressBar';
|
|
38
38
|
var _default = exports.default = ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_ProgressBar","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ProgressBar","_ref","percentage","
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_ProgressBar","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ProgressBar","_ref","percentage","label","internalPercentage","setInternalPercentage","useState","useEffect","useMemo","createElement","StyledProgressBar","StyledMotionProgressBarProgress","initial","width","animate","exit","transition","type","StyledProgressBarBackground","StyledProgressBarLable","displayName","_default","exports"],"sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useEffect, useMemo, useState } from 'react';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLable,\n} from './ProgressBar.styles';\n\nexport type ProgressBarProps = {\n /**\n * The label that should be displayed under the progressbar.\n */\n label?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({ percentage, label }) => {\n const [internalPercentage, setInternalPercentage] = useState(0);\n\n useEffect(() => {\n if (percentage >= 0 && percentage <= 100) {\n setInternalPercentage(percentage);\n }\n }, [percentage]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n <StyledMotionProgressBarProgress\n initial={{ width: '0%' }}\n animate={{ width: `${internalPercentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n />\n <StyledProgressBarBackground />\n {label && <StyledProgressBarLable>{label}</StyledProgressBarLable>}\n </StyledProgressBar>\n ),\n [label, internalPercentage],\n );\n};\n\nProgressBar.displayName = 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-
* A function to format the thumb
|
|
32
|
+
* A function to format the thumb label.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
thumbLabelFormatter?: (value: number) => string;
|
|
35
35
|
/**
|
|
36
36
|
* the Value that the slider should have.
|
|
37
37
|
*/
|
|
@@ -17,7 +17,7 @@ const Slider = _ref => {
|
|
|
17
17
|
value,
|
|
18
18
|
onChange,
|
|
19
19
|
interval,
|
|
20
|
-
|
|
20
|
+
thumbLabelFormatter,
|
|
21
21
|
shouldShowThumbLable = false,
|
|
22
22
|
steps = 1
|
|
23
23
|
} = _ref;
|
|
@@ -151,10 +151,10 @@ const Slider = _ref => {
|
|
|
151
151
|
}), /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumb, {
|
|
152
152
|
ref: fromSliderThumbRef,
|
|
153
153
|
position: fromSliderThumbPosition
|
|
154
|
-
}, shouldShowThumbLable && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumbLable, null, typeof
|
|
154
|
+
}, shouldShowThumbLable && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumbLable, null, typeof thumbLabelFormatter === 'function' ? thumbLabelFormatter(fromValue) : fromValue)), interval && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumb, {
|
|
155
155
|
ref: toSliderThumbRef,
|
|
156
156
|
position: toSliderThumbPosition
|
|
157
|
-
}, shouldShowThumbLable && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumbLable, null, typeof
|
|
157
|
+
}, shouldShowThumbLable && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderThumbLable, null, typeof thumbLabelFormatter === 'function' ? thumbLabelFormatter(toValue) : toValue)), interval && /*#__PURE__*/_react.default.createElement(_Slider.StyledSliderInput, {
|
|
158
158
|
ref: toSliderRef,
|
|
159
159
|
isInterval: !!interval,
|
|
160
160
|
type: "range",
|
|
@@ -163,7 +163,7 @@ const Slider = _ref => {
|
|
|
163
163
|
max: maxValue,
|
|
164
164
|
min: minValue,
|
|
165
165
|
onChange: handleControlToSlider
|
|
166
|
-
})), [steps, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, interval, maxValue, minValue, shouldShowThumbLable,
|
|
166
|
+
})), [steps, fromSliderThumbPosition, fromValue, handleControlToSlider, handleInputChange, interval, maxValue, minValue, shouldShowThumbLable, thumbLabelFormatter, toSliderThumbPosition, toValue]);
|
|
167
167
|
};
|
|
168
168
|
Slider.displayName = 'Slider';
|
|
169
169
|
var _default = exports.default = Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","names":["_react","_interopRequireWildcard","require","_Slider","_slider","_styledComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Slider","_ref","maxValue","minValue","value","onChange","interval","thumbLableFormatter","shouldShowThumbLable","steps","fromValue","setFromValue","useState","toValue","setToValue","fromSliderRef","useRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","theme","useTheme","useEffect","handleControlFromSlider","useCallback","event","current","Number","target","from","to","undefined","fillSlider","toSlider","fromSlider","String","handleControlToSlider","handleInputChange","newValue","fromSliderThumbPosition","useMemo","offsetWidth","toSliderThumbPosition","createElement","StyledSlider","StyledSliderInput","ref","isInterval","type","step","max","min","StyledSliderThumb","position","StyledSliderThumbLable","displayName","_default","exports"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLable,\n} from './Slider.styles';\nimport { fillSlider } from '../../utils/slider';\nimport { useTheme } from 'styled-components';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The range that can be selected with two thumbs..\n */\n interval?: SliderInterval;\n /**\n * The maximum value of the slider.\n */\n maxValue: number;\n /**\n * The minimum value of the slider.\n */\n minValue: number;\n /**\n * Function that will be executed when the value is changed.\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Whether the current value should be displayed inside the slider thumb.\n */\n shouldShowThumbLable?: boolean;\n /**\n * The steps of the slider.\n */\n steps?: number;\n /**\n * A function to format the thumb lable.\n */\n thumbLableFormatter?: (value: number) => string;\n /**\n * the Value that the slider should have.\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n maxValue,\n minValue,\n value,\n onChange,\n interval,\n thumbLableFormatter,\n shouldShowThumbLable = false,\n steps = 1,\n}) => {\n const [fromValue, setFromValue] = useState(0);\n const [toValue, setToValue] = useState(maxValue);\n\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n\n const theme = useTheme();\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (typeof value !== 'number') {\n return;\n }\n\n if (value >= minValue && value <= maxValue) {\n setFromValue(value);\n }\n }, [maxValue, minValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n setFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n setToValue(fromValue);\n }\n }, [fromValue, toValue]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setFromValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from > to) {\n fromSliderRef.current.value = String(to);\n } else {\n fromSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setToValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from <= to) {\n toSliderRef.current.value = String(to);\n } else {\n toSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n setFromValue(interval.minValue);\n setToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: interval can´t be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const newValue = Number(event.target.value);\n\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n setFromValue(newValue);\n\n if (onChange) {\n onChange(newValue);\n }\n },\n [handleControlFromSlider, interval, onChange],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (fromSliderRef.current && fromSliderThumbRef.current) {\n return (\n ((fromValue - minValue) / (maxValue - minValue)) *\n (fromSliderRef.current.offsetWidth - fromSliderThumbRef.current.offsetWidth / 2)\n );\n }\n return 0;\n }, [fromValue, maxValue, minValue]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (toSliderRef.current && toSliderThumbRef.current) {\n return (\n ((toValue - minValue) / (maxValue - minValue)) *\n (toSliderRef.current.offsetWidth - toSliderThumbRef.current.offsetWidth / 2)\n );\n }\n return 0;\n }, [toValue, maxValue, minValue]);\n\n return useMemo(\n () => (\n <StyledSlider>\n <StyledSliderInput\n ref={fromSliderRef}\n isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onChange={handleInputChange}\n />\n <StyledSliderThumb ref={fromSliderThumbRef} position={fromSliderThumbPosition}>\n {shouldShowThumbLable && (\n <StyledSliderThumbLable>\n {typeof thumbLableFormatter === 'function'\n ? thumbLableFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLable>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb ref={toSliderThumbRef} position={toSliderThumbPosition}>\n {shouldShowThumbLable && (\n <StyledSliderThumbLable>\n {typeof thumbLableFormatter === 'function'\n ? thumbLableFormatter(toValue)\n : toValue}\n </StyledSliderThumbLable>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n ref={toSliderRef}\n isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onChange={handleControlToSlider}\n />\n )}\n </StyledSlider>\n ),\n [\n steps,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n interval,\n maxValue,\n minValue,\n shouldShowThumbLable,\n thumbLableFormatter,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAA6C,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA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","_Slider","_slider","_styledComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Slider","_ref","maxValue","minValue","value","onChange","interval","thumbLabelFormatter","shouldShowThumbLable","steps","fromValue","setFromValue","useState","toValue","setToValue","fromSliderRef","useRef","toSliderRef","fromSliderThumbRef","toSliderThumbRef","theme","useTheme","useEffect","handleControlFromSlider","useCallback","event","current","Number","target","from","to","undefined","fillSlider","toSlider","fromSlider","String","handleControlToSlider","handleInputChange","newValue","fromSliderThumbPosition","useMemo","offsetWidth","toSliderThumbPosition","createElement","StyledSlider","StyledSliderInput","ref","isInterval","type","step","max","min","StyledSliderThumb","position","StyledSliderThumbLable","displayName","_default","exports"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["import React, { ChangeEvent, FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n StyledSlider,\n StyledSliderInput,\n StyledSliderThumb,\n StyledSliderThumbLable,\n} from './Slider.styles';\nimport { fillSlider } from '../../utils/slider';\nimport { useTheme } from 'styled-components';\n\nexport interface SliderInterval {\n maxValue: number;\n minValue: number;\n}\n\nexport type SliderProps = {\n /**\n * The range that can be selected with two thumbs..\n */\n interval?: SliderInterval;\n /**\n * The maximum value of the slider.\n */\n maxValue: number;\n /**\n * The minimum value of the slider.\n */\n minValue: number;\n /**\n * Function that will be executed when the value is changed.\n */\n onChange?: (value?: number, interval?: SliderInterval) => void;\n /**\n * Whether the current value should be displayed inside the slider thumb.\n */\n shouldShowThumbLable?: boolean;\n /**\n * The steps of the slider.\n */\n steps?: number;\n /**\n * A function to format the thumb label.\n */\n thumbLabelFormatter?: (value: number) => string;\n /**\n * the Value that the slider should have.\n */\n value?: number;\n};\n\nconst Slider: FC<SliderProps> = ({\n maxValue,\n minValue,\n value,\n onChange,\n interval,\n thumbLabelFormatter,\n shouldShowThumbLable = false,\n steps = 1,\n}) => {\n const [fromValue, setFromValue] = useState(0);\n const [toValue, setToValue] = useState(maxValue);\n\n const fromSliderRef = useRef<HTMLInputElement>(null);\n const toSliderRef = useRef<HTMLInputElement>(null);\n const fromSliderThumbRef = useRef<HTMLDivElement>(null);\n const toSliderThumbRef = useRef<HTMLDivElement>(null);\n\n const theme = useTheme();\n\n /**\n * This function sets the value\n */\n useEffect(() => {\n if (typeof value !== 'number') {\n return;\n }\n\n if (value >= minValue && value <= maxValue) {\n setFromValue(value);\n }\n }, [maxValue, minValue, value]);\n\n useEffect(() => {\n if (fromValue > toValue) {\n setFromValue(toValue);\n }\n\n if (toValue < fromValue) {\n setToValue(fromValue);\n }\n }, [fromValue, toValue]);\n\n const handleControlFromSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setFromValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from > to) {\n fromSliderRef.current.value = String(to);\n } else {\n fromSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n const handleControlToSlider = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n if (!fromSliderRef.current || !toSliderRef.current) {\n return;\n }\n\n setToValue(Number(event.target.value));\n\n const from = Number(fromSliderRef.current.value);\n const to = Number(toSliderRef.current.value);\n\n if (typeof onChange === 'function') {\n onChange(undefined, { maxValue: to, minValue: from });\n }\n\n fillSlider({\n toSlider: toSliderRef.current,\n fromSlider: fromSliderRef.current,\n theme,\n });\n\n if (from <= to) {\n toSliderRef.current.value = String(to);\n } else {\n toSliderRef.current.value = String(from);\n }\n },\n [onChange, theme],\n );\n\n useEffect(() => {\n if (!fromSliderRef.current || !toSliderRef.current || !interval) {\n return;\n }\n\n setFromValue(interval.minValue);\n setToValue(interval.maxValue);\n\n fromSliderRef.current.value = String(interval.minValue);\n toSliderRef.current.value = String(interval.maxValue);\n\n fillSlider({\n fromSlider: fromSliderRef.current,\n toSlider: toSliderRef.current,\n theme,\n });\n // Note: interval can´t be in the deps because of rerender\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [theme]);\n\n /**\n * This function updates the value\n */\n const handleInputChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n const newValue = Number(event.target.value);\n\n if (interval) {\n handleControlFromSlider(event);\n\n return;\n }\n\n setFromValue(newValue);\n\n if (onChange) {\n onChange(newValue);\n }\n },\n [handleControlFromSlider, interval, onChange],\n );\n\n const fromSliderThumbPosition = useMemo(() => {\n if (fromSliderRef.current && fromSliderThumbRef.current) {\n return (\n ((fromValue - minValue) / (maxValue - minValue)) *\n (fromSliderRef.current.offsetWidth - fromSliderThumbRef.current.offsetWidth / 2)\n );\n }\n return 0;\n }, [fromValue, maxValue, minValue]);\n\n const toSliderThumbPosition = useMemo(() => {\n if (toSliderRef.current && toSliderThumbRef.current) {\n return (\n ((toValue - minValue) / (maxValue - minValue)) *\n (toSliderRef.current.offsetWidth - toSliderThumbRef.current.offsetWidth / 2)\n );\n }\n return 0;\n }, [toValue, maxValue, minValue]);\n\n return useMemo(\n () => (\n <StyledSlider>\n <StyledSliderInput\n ref={fromSliderRef}\n isInterval={!!interval}\n type=\"range\"\n value={fromValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onChange={handleInputChange}\n />\n <StyledSliderThumb ref={fromSliderThumbRef} position={fromSliderThumbPosition}>\n {shouldShowThumbLable && (\n <StyledSliderThumbLable>\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(fromValue)\n : fromValue}\n </StyledSliderThumbLable>\n )}\n </StyledSliderThumb>\n {interval && (\n <StyledSliderThumb ref={toSliderThumbRef} position={toSliderThumbPosition}>\n {shouldShowThumbLable && (\n <StyledSliderThumbLable>\n {typeof thumbLabelFormatter === 'function'\n ? thumbLabelFormatter(toValue)\n : toValue}\n </StyledSliderThumbLable>\n )}\n </StyledSliderThumb>\n )}\n {interval && (\n <StyledSliderInput\n ref={toSliderRef}\n isInterval={!!interval}\n type=\"range\"\n value={toValue}\n step={steps}\n max={maxValue}\n min={minValue}\n onChange={handleControlToSlider}\n />\n )}\n </StyledSlider>\n ),\n [\n steps,\n fromSliderThumbPosition,\n fromValue,\n handleControlToSlider,\n handleInputChange,\n interval,\n maxValue,\n minValue,\n shouldShowThumbLable,\n thumbLabelFormatter,\n toSliderThumbPosition,\n toValue,\n ],\n );\n};\n\nSlider.displayName = 'Slider';\n\nexport default Slider;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAMA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAA6C,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA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B,iBACjBnC,MAAA,CAAAY,OAAA,CAAA0D,aAAA,CAACnE,OAAA,CAAA8E,sBAAsB,QAClB,OAAO/C,mBAAmB,KAAK,UAAU,GACpCA,mBAAmB,CAACM,OAAO,CAAC,GAC5BA,OACc,CAEb,CACtB,EACAP,QAAQ,iBACLjC,MAAA,CAAAY,OAAA,CAAA0D,aAAA,CAACnE,OAAA,CAAAqE,iBAAiB;IACdC,GAAG,EAAE7B,WAAY;IACjB8B,UAAU,EAAE,CAAC,CAACzC,QAAS;IACvB0C,IAAI,EAAC,OAAO;IACZ5C,KAAK,EAAES,OAAQ;IACfoC,IAAI,EAAExC,KAAM;IACZyC,GAAG,EAAEhD,QAAS;IACdiD,GAAG,EAAEhD,QAAS;IACdE,QAAQ,EAAE+B;EAAsB,CACnC,CAEK,CACjB,EACD,CACI3B,KAAK,EACL8B,uBAAuB,EACvB7B,SAAS,EACT0B,qBAAqB,EACrBC,iBAAiB,EACjB/B,QAAQ,EACRJ,QAAQ,EACRC,QAAQ,EACRK,oBAAoB,EACpBD,mBAAmB,EACnBmC,qBAAqB,EACrB7B,OAAO,CAEf,CAAC;AACL,CAAC;AAEDb,MAAM,CAACuD,WAAW,GAAG,QAAQ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAxE,OAAA,GAEfe,MAAM"}
|
package/lib/index.d.ts
CHANGED
|
@@ -59,3 +59,5 @@ export { default as Signature } from './components/signature/Signature';
|
|
|
59
59
|
export type { SignatureRef } from './components/signature/Signature';
|
|
60
60
|
export { default as SliderButton } from './components/slider-button/SliderButton';
|
|
61
61
|
export type { SliderButtonItem } from './types/slider-button';
|
|
62
|
+
export { default as OpeningTimes } from './components/opening-times/OpeningTimes';
|
|
63
|
+
export type { Weekday, OpeningTime, Time } from './types/openingTimes';
|
package/lib/index.js
CHANGED
|
@@ -171,6 +171,12 @@ Object.defineProperty(exports, "NumberInput", {
|
|
|
171
171
|
return _NumberInput.default;
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
+
Object.defineProperty(exports, "OpeningTimes", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () {
|
|
177
|
+
return _OpeningTimes.default;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
174
180
|
Object.defineProperty(exports, "Popup", {
|
|
175
181
|
enumerable: true,
|
|
176
182
|
get: function () {
|
|
@@ -364,6 +370,7 @@ var _uploadFile = require("./utils/uploadFile");
|
|
|
364
370
|
var _SelectButton = _interopRequireDefault(require("./components/select-button/SelectButton"));
|
|
365
371
|
var _Signature = _interopRequireDefault(require("./components/signature/Signature"));
|
|
366
372
|
var _SliderButton = _interopRequireDefault(require("./components/slider-button/SliderButton"));
|
|
373
|
+
var _OpeningTimes = _interopRequireDefault(require("./components/opening-times/OpeningTimes"));
|
|
367
374
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
368
375
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
369
376
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_Badge","_Button","_Checkbox","_CodeHighlighter","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_DateInfo","_FileInput","_FilterButtons","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_NumberInput","_Popup","_ProgressBar","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SetupWizardItem","_SetupWizard","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_TextArea","_Tooltip","_Truncation","_codeHighlighter","_comboBox","_fileDialog","_isTobitEmployee","_uploadFile","_SelectButton","_Signature","_SliderButton","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj"],"sources":["../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as CodeHighlighter } from './components/code-highlighter/CodeHighlighter';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as DateInfo } from './components/date-info/DateInfo';\nexport { default as FileInput } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport type {\n FilterButtonItemShape,\n FilterButtonSize,\n IFilterButtonItem as FilterButtonItem,\n} from './components/filter-buttons/types';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as Popup } from './components/popup/Popup';\nexport type { PopupRef } from './components/popup/types';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { default as RadioButtonGroup } from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport type { ISearchBoxItem as SearchBoxItem } from './components/search-box/types';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { CodeHighlighterTheme } from './types/codeHighlighter';\nexport type { CodeHighlighterLanguage, HighlightedLines } from './types/codeHighlighter';\nexport { ComboBoxDirection } from './types/comboBox';\nexport type { FileItem, Image, Meta, Video } from './types/file';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { uploadFile } from './utils/uploadFile';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport type { SelectButtonItem } from './components/select-button/types';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport type { SliderButtonItem } from './types/slider-button';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Accordion","_interopRequireDefault","require","_AccordionContent","_AccordionGroup","_AccordionIntro","_AccordionItem","_AmountControl","_Badge","_Button","_Checkbox","_CodeHighlighter","_ColorSchemeProvider","_ComboBox","_ContentCard","_ContextMenu","_DateInfo","_FileInput","_FilterButtons","_GridImage","_Icon","_Input","_List","_ListItemContent","_ListItem","_alignment","_MentionFinder","_NumberInput","_Popup","_ProgressBar","_RadioButtonGroup","_RadioButton","_ScrollView","_SearchBox","_SearchInput","_SetupWizardItem","_SetupWizard","_SharingBar","_Slider","_SmallWaitCursor","_interopRequireWildcard","_TextArea","_Tooltip","_Truncation","_codeHighlighter","_comboBox","_fileDialog","_isTobitEmployee","_uploadFile","_SelectButton","_Signature","_SliderButton","_OpeningTimes","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj"],"sources":["../src/index.ts"],"sourcesContent":["// noinspection JSUnusedGlobalSymbols\nexport { default as Accordion } from './components/accordion/Accordion';\nexport { default as AccordionContent } from './components/accordion/accordion-content/AccordionContent';\nexport { default as AccordionGroup } from './components/accordion/accordion-group/AccordionGroup';\nexport { default as AccordionIntro } from './components/accordion/accordion-intro/AccordionIntro';\nexport { default as AccordionItem } from './components/accordion/accordion-item/AccordionItem';\nexport { default as AmountControl } from './components/amount-control/AmountControl';\nexport { default as Badge } from './components/badge/Badge';\nexport { default as Button } from './components/button/Button';\nexport { default as Checkbox } from './components/checkbox/Checkbox';\nexport { default as CodeHighlighter } from './components/code-highlighter/CodeHighlighter';\nexport { default as ColorSchemeProvider } from './components/color-scheme-provider/ColorSchemeProvider';\nexport type {\n FramerMotionBugFix,\n WithTheme,\n} from './components/color-scheme-provider/ColorSchemeProvider';\nexport { default as ComboBox } from './components/combobox/ComboBox';\nexport type { IComboBoxItem as ComboBoxItem } from './components/combobox/ComboBox';\nexport { default as ContentCard } from './components/content-card/ContentCard';\nexport { default as ContextMenu } from './components/context-menu/ContextMenu';\nexport { default as DateInfo } from './components/date-info/DateInfo';\nexport { default as FileInput } from './components/file-input/FileInput';\nexport { default as FilterButtons } from './components/filter-buttons/FilterButtons';\nexport type {\n FilterButtonItemShape,\n FilterButtonSize,\n IFilterButtonItem as FilterButtonItem,\n} from './components/filter-buttons/types';\nexport { default as GridImage } from './components/grid-image/GridImage';\nexport { default as Icon } from './components/icon/Icon';\nexport { default as Input } from './components/input/Input';\nexport { default as List } from './components/list/List';\nexport { default as ListItemContent } from './components/list/list-item/list-item-content/ListItemContent';\nexport { default as ListItem } from './components/list/list-item/ListItem';\nexport { MentionFinderPopupAlignment } from './components/mention-finder/constants/alignment';\nexport { default as MentionFinder } from './components/mention-finder/MentionFinder';\nexport type { MentionMember } from './components/mention-finder/MentionFinder';\nexport { default as NumberInput } from './components/number-input/NumberInput';\nexport { default as Popup } from './components/popup/Popup';\nexport type { PopupRef } from './components/popup/types';\nexport { default as ProgressBar } from './components/progress-bar/ProgressBar';\nexport { default as RadioButtonGroup } from './components/radio-button/radio-button-group/RadioButtonGroup';\nexport { default as RadioButton } from './components/radio-button/RadioButton';\nexport { default as ScrollView } from './components/scroll-view/ScrollView';\nexport { default as SearchBox } from './components/search-box/SearchBox';\nexport type { ISearchBoxItem as SearchBoxItem } from './components/search-box/types';\nexport { default as SearchInput } from './components/search-input/SearchInput';\nexport { default as SetupWizardItem } from './components/setup-wizard/setup-wizard-item/SetupWizardItem';\nexport { default as SetupWizard } from './components/setup-wizard/SetupWizard';\nexport type { SetupWizardRef } from './components/setup-wizard/SetupWizard';\nexport { default as SharingBar } from './components/sharing-bar/SharingBar';\nexport { default as Slider } from './components/slider/Slider';\nexport {\n default as SmallWaitCursor,\n SmallWaitCursorSize,\n SmallWaitCursorSpeed,\n} from './components/small-wait-cursor/SmallWaitCursor';\nexport { default as TextArea } from './components/text-area/TextArea';\nexport { default as Tooltip } from './components/tooltip/Tooltip';\nexport { default as Truncation } from './components/truncation/Truncation';\nexport { CodeHighlighterTheme } from './types/codeHighlighter';\nexport type { CodeHighlighterLanguage, HighlightedLines } from './types/codeHighlighter';\nexport { ComboBoxDirection } from './types/comboBox';\nexport type { FileItem, Image, Meta, Video } from './types/file';\nexport { getFileAsArrayBuffer, selectFiles } from './utils/fileDialog';\nexport { isTobitEmployee } from './utils/isTobitEmployee';\nexport { uploadFile } from './utils/uploadFile';\nexport { default as SelectButton } from './components/select-button/SelectButton';\nexport type { SelectButtonItem } from './components/select-button/types';\nexport { default as Signature } from './components/signature/Signature';\nexport type { SignatureRef } from './components/signature/Signature';\nexport { default as SliderButton } from './components/slider-button/SliderButton';\nexport type { SliderButtonItem } from './types/slider-button';\nexport { default as OpeningTimes } from './components/opening-times/OpeningTimes';\nexport type { Weekday, OpeningTime, Time } from './types/openingTimes';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAA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