@helpwave/hightide 0.1.27 → 0.1.28
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/dist/coloring/index.d.mts +2 -0
- package/dist/coloring/index.d.ts +2 -0
- package/dist/coloring/index.js +85 -0
- package/dist/coloring/index.js.map +1 -0
- package/dist/coloring/index.mjs +48 -0
- package/dist/coloring/index.mjs.map +1 -0
- package/dist/components/branding/index.d.mts +3 -0
- package/dist/components/branding/index.d.ts +3 -0
- package/dist/components/branding/index.js +140 -0
- package/dist/components/branding/index.js.map +1 -0
- package/dist/components/branding/index.mjs +104 -0
- package/dist/components/branding/index.mjs.map +1 -0
- package/dist/components/date/index.d.mts +10 -0
- package/dist/components/date/index.d.ts +10 -0
- package/dist/components/date/index.js +1168 -0
- package/dist/components/date/index.js.map +1 -0
- package/dist/components/date/index.mjs +1124 -0
- package/dist/components/date/index.mjs.map +1 -0
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/form/index.d.mts +5 -0
- package/dist/components/form/index.d.ts +5 -0
- package/dist/components/form/index.js +100 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/form/index.mjs +64 -0
- package/dist/components/form/index.mjs.map +1 -0
- package/dist/components/icons-and-geometry/index.d.mts +7 -0
- package/dist/components/icons-and-geometry/index.d.ts +7 -0
- package/dist/components/icons-and-geometry/index.js +3955 -0
- package/dist/components/icons-and-geometry/index.js.map +1 -0
- package/dist/components/icons-and-geometry/index.mjs +3939 -0
- package/dist/components/icons-and-geometry/index.mjs.map +1 -0
- package/dist/components/index.d.mts +83 -0
- package/dist/components/index.d.ts +83 -0
- package/dist/components/index.js +15471 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +15377 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/layout/index.d.mts +18 -0
- package/dist/components/layout/index.d.ts +18 -0
- package/dist/components/layout/index.js +3111 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/index.mjs +3064 -0
- package/dist/components/layout/index.mjs.map +1 -0
- package/dist/components/loading-states/index.d.mts +12 -0
- package/dist/components/loading-states/index.d.ts +12 -0
- package/dist/components/loading-states/index.js +614 -0
- package/dist/components/loading-states/index.js.map +1 -0
- package/dist/components/loading-states/index.mjs +573 -0
- package/dist/components/loading-states/index.mjs.map +1 -0
- package/dist/components/navigation/index.d.mts +9 -0
- package/dist/components/navigation/index.d.ts +9 -0
- package/dist/components/navigation/index.js +4660 -0
- package/dist/components/navigation/index.js.map +1 -0
- package/dist/components/navigation/index.mjs +4648 -0
- package/dist/components/navigation/index.mjs.map +1 -0
- package/dist/components/properties/index.d.mts +12 -0
- package/dist/components/properties/index.d.ts +12 -0
- package/dist/components/properties/index.js +2983 -0
- package/dist/components/properties/index.js.map +1 -0
- package/dist/components/properties/index.mjs +2951 -0
- package/dist/components/properties/index.mjs.map +1 -0
- package/dist/components/table/index.d.mts +10 -0
- package/dist/components/table/index.d.ts +10 -0
- package/dist/components/table/index.js +2329 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/index.mjs +2293 -0
- package/dist/components/table/index.mjs.map +1 -0
- package/dist/components/user-action/index.d.mts +30 -0
- package/dist/components/user-action/index.d.ts +30 -0
- package/dist/components/user-action/index.js +4257 -0
- package/dist/components/user-action/index.js.map +1 -0
- package/dist/components/user-action/index.mjs +4195 -0
- package/dist/components/user-action/index.mjs.map +1 -0
- package/dist/components/user-action/input/index.d.mts +6 -0
- package/dist/components/user-action/input/index.d.ts +6 -0
- package/dist/components/user-action/input/index.js +398 -0
- package/dist/components/user-action/input/index.js.map +1 -0
- package/dist/components/user-action/input/index.mjs +357 -0
- package/dist/components/user-action/input/index.mjs.map +1 -0
- package/dist/components/user-action/select/index.d.mts +4 -0
- package/dist/components/user-action/select/index.d.ts +4 -0
- package/dist/components/user-action/select/index.js +1369 -0
- package/dist/components/user-action/select/index.js.map +1 -0
- package/dist/components/user-action/select/index.mjs +1333 -0
- package/dist/components/user-action/select/index.mjs.map +1 -0
- package/dist/components/utils/index.d.mts +4 -0
- package/dist/components/utils/index.d.ts +4 -0
- package/dist/components/utils/index.js +302 -0
- package/dist/components/utils/index.js.map +1 -0
- package/dist/components/utils/index.mjs +275 -0
- package/dist/components/utils/index.mjs.map +1 -0
- package/dist/hooks/focus/index.d.mts +6 -0
- package/dist/hooks/focus/index.d.ts +6 -0
- package/dist/hooks/focus/index.js +379 -0
- package/dist/hooks/focus/index.js.map +1 -0
- package/dist/hooks/focus/index.mjs +339 -0
- package/dist/hooks/focus/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +16 -0
- package/dist/hooks/index.d.ts +16 -0
- package/dist/hooks/index.js +844 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +794 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index.d.mts +110 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +16101 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +15941 -0
- package/dist/index.mjs.map +1 -0
- package/dist/localization/defaults/index.d.mts +4 -0
- package/dist/localization/defaults/index.d.ts +4 -0
- package/dist/localization/defaults/index.js +223 -0
- package/dist/localization/defaults/index.js.map +1 -0
- package/dist/localization/defaults/index.mjs +195 -0
- package/dist/localization/defaults/index.mjs.map +1 -0
- package/dist/localization/index.d.mts +7 -0
- package/dist/localization/index.d.ts +7 -0
- package/dist/localization/index.js +415 -0
- package/dist/localization/index.js.map +1 -0
- package/dist/localization/index.mjs +380 -0
- package/dist/localization/index.mjs.map +1 -0
- package/dist/theming/index.d.mts +5 -0
- package/dist/theming/index.d.ts +5 -0
- package/dist/theming/index.js +174 -0
- package/dist/theming/index.js.map +1 -0
- package/dist/theming/index.mjs +145 -0
- package/dist/theming/index.mjs.map +1 -0
- package/dist/utils/index.d.mts +15 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +553 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +493 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +25 -24
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EditCompleteOptions, EditCompleteOptionsResolved, Input, InputProps, InputUncontrolled } from './Input.mjs';
|
|
2
|
+
export { InsideLabelInput, InsideLabelInputUncontrolled } from './InsideLabelInput.mjs';
|
|
3
|
+
export { ToggleableInput, ToggleableInputUncontrolled } from './ToggleableInput.mjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../../hooks/useDelay.mjs';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { EditCompleteOptions, EditCompleteOptionsResolved, Input, InputProps, InputUncontrolled } from './Input.js';
|
|
2
|
+
export { InsideLabelInput, InsideLabelInputUncontrolled } from './InsideLabelInput.js';
|
|
3
|
+
export { ToggleableInput, ToggleableInputUncontrolled } from './ToggleableInput.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../../hooks/useDelay.js';
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/user-action/input/index.ts
|
|
30
|
+
var input_exports = {};
|
|
31
|
+
__export(input_exports, {
|
|
32
|
+
Input: () => Input,
|
|
33
|
+
InputUncontrolled: () => InputUncontrolled,
|
|
34
|
+
InsideLabelInput: () => InsideLabelInput,
|
|
35
|
+
InsideLabelInputUncontrolled: () => InsideLabelInputUncontrolled,
|
|
36
|
+
ToggleableInput: () => ToggleableInput,
|
|
37
|
+
ToggleableInputUncontrolled: () => ToggleableInputUncontrolled
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(input_exports);
|
|
40
|
+
|
|
41
|
+
// src/components/user-action/input/Input.tsx
|
|
42
|
+
var import_react3 = require("react");
|
|
43
|
+
var import_clsx = __toESM(require("clsx"));
|
|
44
|
+
|
|
45
|
+
// src/hooks/useDelay.ts
|
|
46
|
+
var import_react = require("react");
|
|
47
|
+
var defaultOptions = {
|
|
48
|
+
delay: 3e3,
|
|
49
|
+
disabled: false
|
|
50
|
+
};
|
|
51
|
+
function useDelay(options) {
|
|
52
|
+
const [timer, setTimer] = (0, import_react.useState)(void 0);
|
|
53
|
+
const { delay, disabled } = {
|
|
54
|
+
...defaultOptions,
|
|
55
|
+
...options
|
|
56
|
+
};
|
|
57
|
+
const clearTimer = () => {
|
|
58
|
+
clearTimeout(timer);
|
|
59
|
+
setTimer(void 0);
|
|
60
|
+
};
|
|
61
|
+
const restartTimer = (onDelayFinish) => {
|
|
62
|
+
if (disabled) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
clearTimeout(timer);
|
|
66
|
+
setTimer(setTimeout(() => {
|
|
67
|
+
onDelayFinish();
|
|
68
|
+
setTimer(void 0);
|
|
69
|
+
}, delay));
|
|
70
|
+
};
|
|
71
|
+
(0, import_react.useEffect)(() => {
|
|
72
|
+
return () => {
|
|
73
|
+
clearTimeout(timer);
|
|
74
|
+
};
|
|
75
|
+
}, [timer]);
|
|
76
|
+
(0, import_react.useEffect)(() => {
|
|
77
|
+
if (disabled) {
|
|
78
|
+
clearTimeout(timer);
|
|
79
|
+
setTimer(void 0);
|
|
80
|
+
}
|
|
81
|
+
}, [disabled, timer]);
|
|
82
|
+
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// src/hooks/focus/useFocusManagement.ts
|
|
86
|
+
var import_react2 = require("react");
|
|
87
|
+
function useFocusManagement() {
|
|
88
|
+
const getFocusableElements = (0, import_react2.useCallback)(() => {
|
|
89
|
+
return Array.from(
|
|
90
|
+
document.querySelectorAll(
|
|
91
|
+
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
92
|
+
)
|
|
93
|
+
).filter(
|
|
94
|
+
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
95
|
+
);
|
|
96
|
+
}, []);
|
|
97
|
+
const getNextFocusElement = (0, import_react2.useCallback)(() => {
|
|
98
|
+
const elements = getFocusableElements();
|
|
99
|
+
if (elements.length === 0) {
|
|
100
|
+
return void 0;
|
|
101
|
+
}
|
|
102
|
+
let nextElement = elements[0];
|
|
103
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
104
|
+
const currentIndex = elements.indexOf(document.activeElement);
|
|
105
|
+
nextElement = elements[(currentIndex + 1) % elements.length];
|
|
106
|
+
}
|
|
107
|
+
return nextElement;
|
|
108
|
+
}, [getFocusableElements]);
|
|
109
|
+
const focusNext = (0, import_react2.useCallback)(() => {
|
|
110
|
+
const nextElement = getNextFocusElement();
|
|
111
|
+
nextElement?.focus();
|
|
112
|
+
}, [getNextFocusElement]);
|
|
113
|
+
const getPreviousFocusElement = (0, import_react2.useCallback)(() => {
|
|
114
|
+
const elements = getFocusableElements();
|
|
115
|
+
if (elements.length === 0) {
|
|
116
|
+
return void 0;
|
|
117
|
+
}
|
|
118
|
+
let previousElement = elements[0];
|
|
119
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
120
|
+
const currentIndex = elements.indexOf(document.activeElement);
|
|
121
|
+
if (currentIndex === 0) {
|
|
122
|
+
previousElement = elements[elements.length - 1];
|
|
123
|
+
} else {
|
|
124
|
+
previousElement = elements[currentIndex - 1];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return previousElement;
|
|
128
|
+
}, [getFocusableElements]);
|
|
129
|
+
const focusPrevious = (0, import_react2.useCallback)(() => {
|
|
130
|
+
const previousElement = getPreviousFocusElement();
|
|
131
|
+
if (previousElement) previousElement.focus();
|
|
132
|
+
}, [getPreviousFocusElement]);
|
|
133
|
+
return {
|
|
134
|
+
getFocusableElements,
|
|
135
|
+
getNextFocusElement,
|
|
136
|
+
getPreviousFocusElement,
|
|
137
|
+
focusNext,
|
|
138
|
+
focusPrevious
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// src/components/user-action/input/Input.tsx
|
|
143
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
144
|
+
var defaultEditCompleteOptions = {
|
|
145
|
+
allowEnterComplete: false,
|
|
146
|
+
onBlur: true,
|
|
147
|
+
afterDelay: true,
|
|
148
|
+
delay: 2500
|
|
149
|
+
};
|
|
150
|
+
var Input = (0, import_react3.forwardRef)(function Input2({
|
|
151
|
+
value,
|
|
152
|
+
onChange,
|
|
153
|
+
onChangeText,
|
|
154
|
+
onEditCompleted,
|
|
155
|
+
editCompleteOptions,
|
|
156
|
+
disabled = false,
|
|
157
|
+
invalid = false,
|
|
158
|
+
defaultStyle = true,
|
|
159
|
+
className,
|
|
160
|
+
...props
|
|
161
|
+
}, forwardedRef) {
|
|
162
|
+
const {
|
|
163
|
+
onBlur: allowEditCompleteOnBlur,
|
|
164
|
+
afterDelay,
|
|
165
|
+
delay,
|
|
166
|
+
allowEnterComplete
|
|
167
|
+
} = { ...defaultEditCompleteOptions, ...editCompleteOptions };
|
|
168
|
+
const {
|
|
169
|
+
restartTimer,
|
|
170
|
+
clearTimer
|
|
171
|
+
} = useDelay({ delay, disabled: !afterDelay });
|
|
172
|
+
const innerRef = (0, import_react3.useRef)(null);
|
|
173
|
+
(0, import_react3.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
174
|
+
const { focusNext } = useFocusManagement();
|
|
175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
|
+
"input",
|
|
177
|
+
{
|
|
178
|
+
...props,
|
|
179
|
+
ref: innerRef,
|
|
180
|
+
value,
|
|
181
|
+
disabled,
|
|
182
|
+
className: defaultStyle ? (0, import_clsx.default)(
|
|
183
|
+
"px-2.5 py-1.75 rounded-md border-1 text-sm",
|
|
184
|
+
{
|
|
185
|
+
"bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
|
|
186
|
+
"bg-on-negative text-negative border-negative-border hover:border-negative-border-hover focus-visible:ring-negative-border": !disabled && invalid,
|
|
187
|
+
"bg-disabled-background text-disabled-text border-disabled-border": disabled
|
|
188
|
+
},
|
|
189
|
+
className
|
|
190
|
+
) : className,
|
|
191
|
+
onKeyDown: (event) => {
|
|
192
|
+
props.onKeyDown?.(event);
|
|
193
|
+
if (!allowEnterComplete) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
innerRef.current?.blur();
|
|
199
|
+
onEditCompleted?.(event.target.value);
|
|
200
|
+
focusNext();
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
onBlur: (event) => {
|
|
204
|
+
props.onBlur?.(event);
|
|
205
|
+
if (allowEditCompleteOnBlur) {
|
|
206
|
+
onEditCompleted?.(event.target.value);
|
|
207
|
+
clearTimer();
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
onChange: (event) => {
|
|
211
|
+
onChange?.(event);
|
|
212
|
+
const value2 = event.target.value;
|
|
213
|
+
restartTimer(() => {
|
|
214
|
+
innerRef.current?.blur();
|
|
215
|
+
onEditCompleted?.(value2);
|
|
216
|
+
});
|
|
217
|
+
onChangeText?.(value2);
|
|
218
|
+
},
|
|
219
|
+
"aria-invalid": props["aria-invalid"] ?? invalid,
|
|
220
|
+
"aria-disabled": props["aria-disabled"] ?? disabled
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
});
|
|
224
|
+
var InputUncontrolled = ({
|
|
225
|
+
value = "",
|
|
226
|
+
onChangeText,
|
|
227
|
+
...props
|
|
228
|
+
}) => {
|
|
229
|
+
const [usedValue, setUsedValue] = (0, import_react3.useState)(value);
|
|
230
|
+
(0, import_react3.useEffect)(() => {
|
|
231
|
+
setUsedValue(value);
|
|
232
|
+
}, [value]);
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
234
|
+
Input,
|
|
235
|
+
{
|
|
236
|
+
...props,
|
|
237
|
+
value: usedValue,
|
|
238
|
+
onChangeText: (text) => {
|
|
239
|
+
onChangeText?.(text);
|
|
240
|
+
setUsedValue(text);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// src/components/user-action/input/InsideLabelInput.tsx
|
|
247
|
+
var import_react4 = require("react");
|
|
248
|
+
var import_react5 = require("react");
|
|
249
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
250
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
251
|
+
var InsideLabelInput = (0, import_react5.forwardRef)(function InsideLabelInput2({
|
|
252
|
+
id: customId,
|
|
253
|
+
label,
|
|
254
|
+
...props
|
|
255
|
+
}, forwardedRef) {
|
|
256
|
+
const { value } = props;
|
|
257
|
+
const [isFocused, setIsFocused] = (0, import_react5.useState)(false);
|
|
258
|
+
const generatedId = (0, import_react4.useId)();
|
|
259
|
+
const id = customId ?? generatedId;
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: (0, import_clsx2.default)("relative"), children: [
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
262
|
+
Input,
|
|
263
|
+
{
|
|
264
|
+
...props,
|
|
265
|
+
id,
|
|
266
|
+
className: (0, import_clsx2.default)("h-14 px-4 pb-2 py-6.5", props.className),
|
|
267
|
+
ref: forwardedRef,
|
|
268
|
+
"aria-labelledby": id + "-label",
|
|
269
|
+
onFocus: (event) => {
|
|
270
|
+
props.onFocus?.(event);
|
|
271
|
+
setIsFocused(true);
|
|
272
|
+
},
|
|
273
|
+
onBlur: (event) => {
|
|
274
|
+
props.onBlur?.(event);
|
|
275
|
+
setIsFocused(false);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
),
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
280
|
+
"label",
|
|
281
|
+
{
|
|
282
|
+
id: id + "-label",
|
|
283
|
+
"aria-hidden": true,
|
|
284
|
+
"data-display": isFocused || !!value ? "small" : "full",
|
|
285
|
+
className: (0, import_clsx2.default)(
|
|
286
|
+
"absolute left-4 top-2 transition-all pointer-events-none touch-none",
|
|
287
|
+
"data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm-regular data-[display=small]:overflow-y-hidden",
|
|
288
|
+
"data-[display=full]:top-1/2 data-[display=full]:-translate-y-1/2 data-[display=full]:typography-body-md-regular"
|
|
289
|
+
),
|
|
290
|
+
children: label
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
] });
|
|
294
|
+
});
|
|
295
|
+
var InsideLabelInputUncontrolled = ({
|
|
296
|
+
value: initialValue,
|
|
297
|
+
...props
|
|
298
|
+
}) => {
|
|
299
|
+
const [value, setValue] = (0, import_react5.useState)(initialValue);
|
|
300
|
+
(0, import_react5.useEffect)(() => {
|
|
301
|
+
setValue(initialValue);
|
|
302
|
+
}, [initialValue]);
|
|
303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
304
|
+
InsideLabelInput,
|
|
305
|
+
{
|
|
306
|
+
...props,
|
|
307
|
+
value,
|
|
308
|
+
onChangeText: (text) => {
|
|
309
|
+
props.onChangeText?.(text);
|
|
310
|
+
setValue(text);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// src/components/user-action/input/ToggleableInput.tsx
|
|
317
|
+
var import_react6 = require("react");
|
|
318
|
+
var import_lucide_react = require("lucide-react");
|
|
319
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
320
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
321
|
+
var ToggleableInput = (0, import_react6.forwardRef)(function ToggleableInput2({
|
|
322
|
+
value,
|
|
323
|
+
initialState = "display",
|
|
324
|
+
editCompleteOptions,
|
|
325
|
+
...props
|
|
326
|
+
}, forwardedRef) {
|
|
327
|
+
const [isEditing, setIsEditing] = (0, import_react6.useState)(initialState !== "display");
|
|
328
|
+
const innerRef = (0, import_react6.useRef)(null);
|
|
329
|
+
(0, import_react6.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
330
|
+
(0, import_react6.useEffect)(() => {
|
|
331
|
+
if (isEditing) {
|
|
332
|
+
innerRef.current?.focus();
|
|
333
|
+
}
|
|
334
|
+
}, [isEditing]);
|
|
335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_clsx3.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
337
|
+
Input,
|
|
338
|
+
{
|
|
339
|
+
...props,
|
|
340
|
+
ref: innerRef,
|
|
341
|
+
value,
|
|
342
|
+
onEditCompleted: (text) => {
|
|
343
|
+
props.onEditCompleted?.(text);
|
|
344
|
+
setIsEditing(false);
|
|
345
|
+
},
|
|
346
|
+
onFocus: (event) => {
|
|
347
|
+
props.onFocus?.(event);
|
|
348
|
+
setIsEditing(true);
|
|
349
|
+
event.target.select();
|
|
350
|
+
},
|
|
351
|
+
editCompleteOptions: {
|
|
352
|
+
...editCompleteOptions,
|
|
353
|
+
allowEnterComplete: true
|
|
354
|
+
},
|
|
355
|
+
className: (0, import_clsx3.default)(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {
|
|
356
|
+
"underline": isEditing,
|
|
357
|
+
"text-transparent": !isEditing
|
|
358
|
+
}),
|
|
359
|
+
defaultStyle: false
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
!isEditing && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
363
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx3.default)(" truncate"), children: value }),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Pencil, { className: (0, import_clsx3.default)(`size-force-4`, { "text-transparent": isEditing }) })
|
|
365
|
+
] })
|
|
366
|
+
] });
|
|
367
|
+
});
|
|
368
|
+
var ToggleableInputUncontrolled = ({
|
|
369
|
+
value: initialValue,
|
|
370
|
+
onChangeText,
|
|
371
|
+
...restProps
|
|
372
|
+
}) => {
|
|
373
|
+
const [value, setValue] = (0, import_react6.useState)(initialValue);
|
|
374
|
+
(0, import_react6.useEffect)(() => {
|
|
375
|
+
setValue(initialValue);
|
|
376
|
+
}, [initialValue]);
|
|
377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
378
|
+
ToggleableInput,
|
|
379
|
+
{
|
|
380
|
+
value,
|
|
381
|
+
onChangeText: (text) => {
|
|
382
|
+
onChangeText?.(text);
|
|
383
|
+
setValue(text);
|
|
384
|
+
},
|
|
385
|
+
...restProps
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
};
|
|
389
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
390
|
+
0 && (module.exports = {
|
|
391
|
+
Input,
|
|
392
|
+
InputUncontrolled,
|
|
393
|
+
InsideLabelInput,
|
|
394
|
+
InsideLabelInputUncontrolled,
|
|
395
|
+
ToggleableInput,
|
|
396
|
+
ToggleableInputUncontrolled
|
|
397
|
+
});
|
|
398
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/user-action/input/index.ts","../../../../src/components/user-action/input/Input.tsx","../../../../src/hooks/useDelay.ts","../../../../src/hooks/focus/useFocusManagement.ts","../../../../src/components/user-action/input/InsideLabelInput.tsx","../../../../src/components/user-action/input/ToggleableInput.tsx"],"sourcesContent":["export * from './Input'\nexport * from './InsideLabelInput'\nexport * from './ToggleableInput'\n","import type { InputHTMLAttributes } from 'react'\nimport React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport clsx from 'clsx'\nimport type { UseDelayOptionsResolved } from '@/src/hooks/useDelay'\nimport { useDelay } from '@/src/hooks/useDelay'\nimport { useFocusManagement } from '@/src/hooks/focus/useFocusManagement'\n\nexport type EditCompleteOptionsResolved = {\n onBlur: boolean,\n afterDelay: boolean,\n allowEnterComplete?: boolean,\n} & Omit<UseDelayOptionsResolved, 'disabled'>\n\nexport type EditCompleteOptions = Partial<EditCompleteOptionsResolved>\n\nconst defaultEditCompleteOptions: EditCompleteOptionsResolved = {\n allowEnterComplete: false,\n onBlur: true,\n afterDelay: true,\n delay: 2500\n}\n\nexport type InputProps = InputHTMLAttributes<HTMLInputElement> & {\n invalid?: boolean,\n onChangeText?: (text: string) => void,\n onEditCompleted?: (text: string) => void,\n editCompleteOptions?: EditCompleteOptions,\n defaultStyle?: boolean,\n}\n\n/**\n * A Component for inputting text or other information\n *\n * Its state is managed must be managed by the parent\n */\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input({\n value,\n onChange,\n onChangeText,\n onEditCompleted,\n editCompleteOptions,\n disabled = false,\n invalid = false,\n defaultStyle = true,\n className,\n ...props\n }, forwardedRef) {\n const {\n onBlur: allowEditCompleteOnBlur,\n afterDelay,\n delay,\n allowEnterComplete\n } = { ...defaultEditCompleteOptions, ...editCompleteOptions }\n\n const {\n restartTimer,\n clearTimer\n } = useDelay({ delay, disabled: !afterDelay })\n\n const innerRef = useRef<HTMLInputElement>(null)\n useImperativeHandle(forwardedRef, () => innerRef.current)\n\n const { focusNext } = useFocusManagement()\n\n return (\n <input\n {...props}\n ref={innerRef}\n value={value}\n disabled={disabled}\n className={defaultStyle ? clsx(\n 'px-2.5 py-1.75 rounded-md border-1 text-sm',\n {\n 'bg-input-background text-input-text hover:border-primary focus:border-primary': !disabled && !invalid,\n 'bg-on-negative text-negative border-negative-border hover:border-negative-border-hover focus-visible:ring-negative-border': !disabled && invalid,\n 'bg-disabled-background text-disabled-text border-disabled-border': disabled,\n }, className\n ) : className}\n onKeyDown={event => {\n props.onKeyDown?.(event)\n if (!allowEnterComplete) {\n return\n }\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault()\n innerRef.current?.blur()\n onEditCompleted?.((event.target as HTMLInputElement).value)\n focusNext()\n }\n }}\n onBlur={event => {\n props.onBlur?.(event)\n if (allowEditCompleteOnBlur) {\n onEditCompleted?.(event.target.value)\n clearTimer()\n }\n }}\n onChange={event => {\n onChange?.(event)\n const value = event.target.value\n restartTimer(() => {\n innerRef.current?.blur()\n onEditCompleted?.(value)\n })\n onChangeText?.(value)\n }}\n\n aria-invalid={props['aria-invalid'] ?? invalid}\n aria-disabled={props['aria-disabled'] ?? disabled}\n />\n )\n})\n\n\n/**\n * A Component for inputting text or other information\n *\n * Its state is managed by the component itself\n */\nexport const InputUncontrolled = ({\n value = '',\n onChangeText,\n ...props\n }: InputProps) => {\n const [usedValue, setUsedValue] = useState(value)\n\n useEffect(() => {\n setUsedValue(value)\n }, [value])\n\n return (\n <Input\n {...props}\n value={usedValue}\n onChangeText={text => {\n onChangeText?.(text)\n setUsedValue(text)\n }}\n />\n )\n}\n","import { useEffect, useState } from 'react'\n\nexport type UseDelayOptionsResolved = {\n delay: number,\n disabled: boolean,\n}\n\nexport type UseDelayOptions = Partial<UseDelayOptionsResolved>\n\nconst defaultOptions: UseDelayOptionsResolved = {\n delay: 3000,\n disabled: false,\n}\n\nexport function useDelay(options?: UseDelayOptions) {\n const [timer, setTimer] = useState<NodeJS.Timeout | undefined>(undefined)\n const { delay, disabled }: UseDelayOptionsResolved = {\n ...defaultOptions,\n ...options\n }\n\n const clearTimer = () => {\n clearTimeout(timer)\n setTimer(undefined)\n }\n\n const restartTimer = (onDelayFinish: () => void) => {\n if(disabled) {\n return\n }\n clearTimeout(timer)\n setTimer(setTimeout(() => {\n onDelayFinish()\n setTimer(undefined)\n }, delay))\n }\n\n useEffect(() => {\n return () => {\n clearTimeout(timer)\n }\n }, [timer])\n\n useEffect(() => {\n if(disabled){\n clearTimeout(timer)\n setTimer(undefined)\n }\n }, [disabled, timer])\n\n return { restartTimer, clearTimer, hasActiveTimer: !!timer }\n}","import { useCallback } from 'react'\n\nexport function useFocusManagement() {\n const getFocusableElements = useCallback((): HTMLElement[] => {\n return Array.from(\n document.querySelectorAll(\n 'input, button, select, textarea, a[href], [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter(\n (el): el is HTMLElement =>\n el instanceof HTMLElement &&\n !el.hasAttribute('disabled') &&\n !el.hasAttribute('hidden') &&\n el.tabIndex !== -1\n )\n }, [])\n\n const getNextFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let nextElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n nextElement = elements[(currentIndex + 1) % elements.length]\n }\n return nextElement\n }, [getFocusableElements])\n\n const focusNext = useCallback(() => {\n const nextElement = getNextFocusElement()\n nextElement?.focus()\n }, [getNextFocusElement])\n\n const getPreviousFocusElement = useCallback((): HTMLElement | undefined => {\n const elements = getFocusableElements()\n if(elements.length === 0) {\n return undefined\n }\n let previousElement = elements[0]\n if(document.activeElement instanceof HTMLElement) {\n const currentIndex = elements.indexOf(document.activeElement)\n if(currentIndex === 0) {\n previousElement = elements[elements.length - 1]\n } else {\n previousElement = elements[currentIndex - 1]\n }\n }\n return previousElement\n }, [getFocusableElements])\n\n const focusPrevious = useCallback(() => {\n const previousElement = getPreviousFocusElement()\n if (previousElement) previousElement.focus()\n }, [getPreviousFocusElement])\n\n return {\n getFocusableElements,\n getNextFocusElement,\n getPreviousFocusElement,\n focusNext,\n focusPrevious,\n }\n}","import type { ReactNode } from 'react'\nimport { useId } from 'react'\nimport { forwardRef, useEffect, useState } from 'react'\nimport clsx from 'clsx'\nimport type { InputProps } from '@/src/components/user-action/input/Input'\nimport { Input } from '@/src/components/user-action/input/Input'\n\ntype InsideLabelInputProps = Omit<InputProps, 'aria-label' | 'aria-labelledby' | 'placeholder'> & {\n label: ReactNode,\n}\n\n/**\n * Text input component with a label inside the input that moves up when editing\n *\n * The State is managed by the parent\n */\nexport const InsideLabelInput = forwardRef<HTMLInputElement, InsideLabelInputProps>(function InsideLabelInput({\n id: customId,\n label,\n ...props\n }, forwardedRef) {\n const { value } = props\n const [isFocused, setIsFocused] = useState(false)\n const generatedId = useId()\n const id = customId ?? generatedId\n\n return (\n <div className={clsx('relative')}>\n <Input\n {...props}\n id={id}\n className={clsx('h-14 px-4 pb-2 py-6.5', props.className)}\n ref={forwardedRef}\n aria-labelledby={id+ '-label'}\n onFocus={event => {\n props.onFocus?.(event)\n setIsFocused(true)\n }}\n onBlur={event => {\n props.onBlur?.(event)\n setIsFocused(false)\n }}\n />\n <label\n id={id+ '-label'}\n aria-hidden={true}\n data-display={isFocused || !!value ? 'small' : 'full'}\n className={clsx(\n 'absolute left-4 top-2 transition-all pointer-events-none touch-none',\n 'data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm-regular data-[display=small]:overflow-y-hidden',\n 'data-[display=full]:top-1/2 data-[display=full]:-translate-y-1/2 data-[display=full]:typography-body-md-regular'\n )}\n >\n {label}\n </label>\n </div>\n )\n})\n\nexport const InsideLabelInputUncontrolled = ({\n value: initialValue,\n ...props\n }: InsideLabelInputProps) => {\n const [value, setValue] = useState(initialValue)\n\n useEffect(() => {\n setValue(initialValue)\n }, [initialValue])\n\n return (\n <InsideLabelInput\n {...props}\n value={value}\n onChangeText={text => {\n props.onChangeText?.(text)\n setValue(text)\n }}\n />\n )\n}\n","import { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react'\nimport { Pencil } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { EditCompleteOptions, InputProps } from '@/src/components/user-action/input/Input'\nimport { Input } from '@/src/components/user-action/input/Input'\n\ntype ToggleableInputProps = Omit<InputProps, 'defaultStyle'> & {\n initialState?: 'editing' | 'display',\n editCompleteOptions?: Omit<EditCompleteOptions, 'allowEnterComplete'>,\n}\n\n/**\n * A Text input component for inputting text. It changes appearance upon entering the edit mode and switches\n * back to display mode on loss of focus or on enter\n *\n * The State is managed by the parent\n */\nexport const ToggleableInput = forwardRef<HTMLInputElement, ToggleableInputProps>(function ToggleableInput({\n value,\n initialState = 'display',\n editCompleteOptions,\n ...props\n }, forwardedRef) {\n const [isEditing, setIsEditing] = useState(initialState !== 'display')\n\n const innerRef = useRef<HTMLInputElement>(null)\n useImperativeHandle(forwardedRef, () => innerRef.current)\n\n useEffect(() => {\n if (isEditing) {\n innerRef.current?.focus()\n }\n }, [isEditing])\n\n return (\n <div className={clsx('relative flex-row-2', { 'flex-1': isEditing })}>\n <Input\n {...props}\n ref={innerRef}\n value={value}\n onEditCompleted={(text) => {\n props.onEditCompleted?.(text)\n setIsEditing(false)\n }}\n onFocus={event => {\n props.onFocus?.(event)\n setIsEditing(true)\n event.target.select()\n }}\n editCompleteOptions={{\n ...editCompleteOptions,\n allowEnterComplete: true\n }}\n className={clsx(`w-full ring-0 outline-0 decoration-primary underline-offset-4`, {\n 'underline': isEditing,\n 'text-transparent': !isEditing,\n })}\n defaultStyle={false}\n />\n {!isEditing && (\n <div className=\"absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden\">\n <span className={clsx(' truncate')}>\n {value}\n </span>\n <Pencil className={clsx(`size-force-4`, { 'text-transparent': isEditing })} />\n </div>\n )}\n </div>\n )\n})\n\nexport const ToggleableInputUncontrolled = ({\n value: initialValue,\n onChangeText,\n ...restProps\n }: ToggleableInputProps) => {\n const [value, setValue] = useState(initialValue)\n\n useEffect(() => {\n setValue(initialValue)\n }, [initialValue])\n\n return (\n <ToggleableInput\n value={value}\n onChangeText={text => {\n onChangeText?.(text)\n setValue(text)\n }}\n {...restProps}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,gBAAoF;AACpF,kBAAiB;;;ACFjB,mBAAoC;AASpC,IAAM,iBAA0C;AAAA,EAC9C,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,SAAS,SAAS,SAA2B;AAClD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAqC,MAAS;AACxE,QAAM,EAAE,OAAO,SAAS,IAA6B;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,QAAM,aAAa,MAAM;AACvB,iBAAa,KA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8CAAC,SAAI,WAAU,iGACb;AAAA,mDAAC,UAAK,eAAW,aAAAA,SAAK,WAAW,GAC9B,iBACH;AAAA,MACA,6CAAC,8BAAO,eAAW,aAAAA,SAAK,gBAAgB,EAAE,oBAAoB,UAAU,CAAC,GAAG;AAAA,OAC9E;AAAA,KAEJ;AAEJ,CAAC;AAEM,IAAM,8BAA8B,CAAC;AAAA,EACE,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAA4B;AACtE,QAAM,CAAC,OAAO,QAAQ,QAAI,wBAAS,YAAY;AAE/C,+BAAU,MAAM;AACd,aAAS,YAAY;AAAA,EACvB,GAAG,CAAC,YAAY,CAAC;AAEjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,cAAc,UAAQ;AACpB,uBAAe,IAAI;AACnB,iBAAS,IAAI;AAAA,MACf;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":["import_react","import_react","Input","clsx","value","import_react","import_clsx","import_jsx_runtime","InsideLabelInput","clsx","import_react","import_clsx","import_jsx_runtime","ToggleableInput","clsx"]}
|