@harborclient/sdk 1.0.14 → 1.0.16
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/components/VariableInput/index.js +2 -2
- package/dist/components/forms/Radio.js +2 -2
- package/dist/components/forms/classes.d.ts +5 -3
- package/dist/components/forms/classes.d.ts.map +1 -1
- package/dist/components/forms/classes.js +5 -3
- package/dist/components/forms/index.d.ts +1 -1
- package/dist/components/forms/index.d.ts.map +1 -1
- package/dist/components/forms/index.js +1 -1
- package/package.json +1 -1
|
@@ -163,14 +163,14 @@ export function VariableInput({ value, onChange, variables, placeholder, onKeyDo
|
|
|
163
163
|
const tooltipContent = tooltip ? getVariableTooltipContent(tooltip.key, variables) : null;
|
|
164
164
|
return (_jsxs("div", { className: wrapperClassName
|
|
165
165
|
? `hc-variable-input relative min-w-0 ${wrapperClassName}`
|
|
166
|
-
: 'hc-variable-input relative min-w-0 flex-1', children: [_jsx("div", { ref: backdropRef, "aria-hidden": true, className: "pointer-events-none absolute inset-0 overflow-hidden whitespace-nowrap px-2 py-1.5 text-[
|
|
166
|
+
: 'hc-variable-input relative min-w-0 flex-1', children: [_jsx("div", { ref: backdropRef, "aria-hidden": true, className: "pointer-events-none absolute inset-0 overflow-hidden whitespace-nowrap px-2.5 py-1.5 text-[16px] text-inherit", children: safeValue ? (tokens.map((token, index) => token.key ? (_jsx("span", { ref: (el) => {
|
|
167
167
|
if (el)
|
|
168
168
|
spanRefs.current.set(index, el);
|
|
169
169
|
else
|
|
170
170
|
spanRefs.current.delete(index);
|
|
171
171
|
}, className: "text-[#32D2E2]", children: token.text }, index)) : (_jsx("span", { children: token.text }, index)))) : (_jsx("span", { className: "text-muted", children: placeholder })) }), _jsx(Input, { ref: inputRef, id: id, variant: "plain", role: source ? 'combobox' : undefined, "aria-autocomplete": source ? 'list' : undefined, "aria-expanded": source ? autocompleteOpen : undefined, "aria-controls": source && autocompleteOpen ? listboxId : undefined, "aria-activedescendant": source && autocompleteOpen && autocompleteActiveIndex >= 0
|
|
172
172
|
? `${listboxId}-option-${autocompleteActiveIndex}`
|
|
173
|
-
: undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": tooltip ? tooltipId : undefined, className: `relative w-full min-w-0 border-none bg-transparent px-2 py-1.5 text-[
|
|
173
|
+
: undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": tooltip ? tooltipId : undefined, className: `relative w-full min-w-0 border-none bg-transparent px-2.5 py-1.5 text-[16px] text-transparent caret-text focus-visible:shadow-none ${className}`, type: "text", placeholder: placeholder, value: safeValue, onChange: (e) => {
|
|
174
174
|
onChange(e.target.value);
|
|
175
175
|
queueMicrotask(updateTooltipFromCaret);
|
|
176
176
|
}, onFocus: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@harborclient/sdk/jsx-runtime";
|
|
2
|
-
import { radioCircle, radioInput } from './classes.js';
|
|
2
|
+
import { radioCircle, radioDot, radioInput } from './classes.js';
|
|
3
3
|
/**
|
|
4
4
|
* macOS-style radio button with a custom circle slightly larger than the native control.
|
|
5
5
|
*/
|
|
@@ -7,5 +7,5 @@ export function Radio({ ref, className, ...props }) {
|
|
|
7
7
|
const wrapperClasses = className
|
|
8
8
|
? `hc-radio relative inline-flex h-[18px] w-[18px] shrink-0 leading-none ${className}`
|
|
9
9
|
: 'hc-radio relative inline-flex h-[18px] w-[18px] shrink-0 leading-none';
|
|
10
|
-
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "radio", className: radioInput, ...props }), _jsx("span", { className: radioCircle, "aria-hidden": true, children: _jsx("span", { className:
|
|
10
|
+
return (_jsxs("span", { className: wrapperClasses, children: [_jsx("input", { ref: ref, type: "radio", className: radioInput, ...props }), _jsx("span", { className: radioCircle, "aria-hidden": true, children: _jsx("span", { className: radioDot }) })] }));
|
|
11
11
|
}
|
|
@@ -10,9 +10,9 @@ export type FieldVariant = 'control' | 'surface' | 'plain';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const fieldFrame = "overflow-hidden rounded-md border border-separator bg-field";
|
|
12
12
|
/** Inset control style for standard settings and editor fields. */
|
|
13
|
-
export declare const field = "rounded-md border border-separator bg-field px-2 py-1 text-[
|
|
13
|
+
export declare const field = "rounded-md border border-separator bg-field px-2.5 py-1.5 text-[16px] text-text app-no-drag";
|
|
14
14
|
/** Surface style for modal and Team Hub form fields. */
|
|
15
|
-
export declare const surfaceField = "w-full rounded-md border border-separator bg-field px-3 py-2 text-[
|
|
15
|
+
export declare const surfaceField = "w-full rounded-md border border-separator bg-field px-3 py-2.5 text-[15px] text-text";
|
|
16
16
|
/** Transparent overlay checkbox input sized to {@link checkboxBox}. */
|
|
17
17
|
export declare const checkboxInput = "peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed";
|
|
18
18
|
/** Custom checkbox box styled via `peer-checked` / `peer-focus-visible` on {@link checkboxInput}. */
|
|
@@ -20,7 +20,9 @@ export declare const checkboxBox = "pointer-events-none flex h-[18px] w-[18px] s
|
|
|
20
20
|
/** Transparent overlay radio input sized to {@link radioCircle}. */
|
|
21
21
|
export declare const radioInput = "peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed";
|
|
22
22
|
/** Custom radio circle styled via `peer-checked` / `peer-focus-visible` on {@link radioInput}. */
|
|
23
|
-
export declare const radioCircle = "pointer-events-none
|
|
23
|
+
export declare const radioCircle = "pointer-events-none relative h-[18px] w-[18px] shrink-0 leading-none rounded-full border border-separator bg-field peer-checked:border-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-accent peer-disabled:cursor-not-allowed peer-disabled:opacity-50 [&>span]:opacity-0 peer-checked:[&>span]:opacity-100";
|
|
24
|
+
/** Checked-state dot centered inside {@link radioCircle}. */
|
|
25
|
+
export declare const radioDot = "absolute left-1/2 top-1/2 block h-2 w-2 -translate-x-1/2 -translate-y-1/2 shrink-0 rounded-full bg-accent";
|
|
24
26
|
/**
|
|
25
27
|
* Merges a field variant preset with optional caller classes.
|
|
26
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../src/components/forms/classes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,UAAU,gEAAgE,CAAC;AAExF,mEAAmE;AACnE,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../src/components/forms/classes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,UAAU,gEAAgE,CAAC;AAExF,mEAAmE;AACnE,eAAO,MAAM,KAAK,gGAC6E,CAAC;AAEhG,wDAAwD;AACxD,eAAO,MAAM,YAAY,yFAC+D,CAAC;AAEzF,uEAAuE;AACvE,eAAO,MAAM,aAAa,iGACsE,CAAC;AAEjG,qGAAqG;AACrG,eAAO,MAAM,WAAW,qaAC4Y,CAAC;AAEra,oEAAoE;AACpE,eAAO,MAAM,UAAU,iGACyE,CAAC;AAEjG,kGAAkG;AAClG,eAAO,MAAM,WAAW,+XACsW,CAAC;AAE/X,6DAA6D;AAC7D,eAAO,MAAM,QAAQ,8GACwF,CAAC;AAO9G;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,YAAY,EACrB,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAOpB"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export const fieldFrame = 'overflow-hidden rounded-md border border-separator bg-field';
|
|
8
8
|
/** Inset control style for standard settings and editor fields. */
|
|
9
|
-
export const field = 'rounded-md border border-separator bg-field px-2 py-1 text-[
|
|
9
|
+
export const field = 'rounded-md border border-separator bg-field px-2.5 py-1.5 text-[16px] text-text app-no-drag';
|
|
10
10
|
/** Surface style for modal and Team Hub form fields. */
|
|
11
|
-
export const surfaceField = 'w-full rounded-md border border-separator bg-field px-3 py-2 text-[
|
|
11
|
+
export const surfaceField = 'w-full rounded-md border border-separator bg-field px-3 py-2.5 text-[15px] text-text';
|
|
12
12
|
/** Transparent overlay checkbox input sized to {@link checkboxBox}. */
|
|
13
13
|
export const checkboxInput = 'peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed';
|
|
14
14
|
/** Custom checkbox box styled via `peer-checked` / `peer-focus-visible` on {@link checkboxInput}. */
|
|
@@ -16,7 +16,9 @@ export const checkboxBox = 'pointer-events-none flex h-[18px] w-[18px] shrink-0
|
|
|
16
16
|
/** Transparent overlay radio input sized to {@link radioCircle}. */
|
|
17
17
|
export const radioInput = 'peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed';
|
|
18
18
|
/** Custom radio circle styled via `peer-checked` / `peer-focus-visible` on {@link radioInput}. */
|
|
19
|
-
export const radioCircle = 'pointer-events-none
|
|
19
|
+
export const radioCircle = 'pointer-events-none relative h-[18px] w-[18px] shrink-0 leading-none rounded-full border border-separator bg-field peer-checked:border-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-accent peer-disabled:cursor-not-allowed peer-disabled:opacity-50 [&>span]:opacity-0 peer-checked:[&>span]:opacity-100';
|
|
20
|
+
/** Checked-state dot centered inside {@link radioCircle}. */
|
|
21
|
+
export const radioDot = 'absolute left-1/2 top-1/2 block h-2 w-2 -translate-x-1/2 -translate-y-1/2 shrink-0 rounded-full bg-accent';
|
|
20
22
|
const VARIANT_CLASSES = {
|
|
21
23
|
control: field,
|
|
22
24
|
surface: surfaceField
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { field, fieldFrame, surfaceField, checkboxInput, checkboxBox, radioInput, radioCircle, mergeFieldClasses, type FieldVariant } from './classes.js';
|
|
1
|
+
export { field, fieldFrame, surfaceField, checkboxInput, checkboxBox, radioInput, radioCircle, radioDot, mergeFieldClasses, type FieldVariant } from './classes.js';
|
|
2
2
|
export { Checkbox } from './Checkbox.js';
|
|
3
3
|
export { Radio } from './Radio.js';
|
|
4
4
|
export { Input } from './Input.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,UAAU,EACV,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { field, fieldFrame, surfaceField, checkboxInput, checkboxBox, radioInput, radioCircle, mergeFieldClasses } from './classes.js';
|
|
1
|
+
export { field, fieldFrame, surfaceField, checkboxInput, checkboxBox, radioInput, radioCircle, radioDot, mergeFieldClasses } from './classes.js';
|
|
2
2
|
export { Checkbox } from './Checkbox.js';
|
|
3
3
|
export { Radio } from './Radio.js';
|
|
4
4
|
export { Input } from './Input.js';
|