@infonomic/uikit 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/inputs/@types/autocomplete.d.ts +35 -0
- package/dist/components/inputs/@types/autocomplete.d.ts.map +1 -0
- package/dist/components/inputs/@types/autocomplete.js +11 -0
- package/dist/components/inputs/autocomplete.d.ts +42 -0
- package/dist/components/inputs/autocomplete.d.ts.map +1 -0
- package/dist/components/inputs/autocomplete.js +87 -0
- package/dist/components/inputs/autocomplete.module.css +371 -0
- package/dist/components/inputs/autocomplete.module.js +36 -0
- package/dist/components/inputs/autocomplete_module.css +312 -0
- package/dist/components/inputs/calendar.js +2 -2
- package/dist/components/inputs/index.js +1 -0
- package/dist/components/tooltip/tooltip_module.css +1 -1
- package/dist/react.d.ts +1 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +1 -0
- package/package.json +17 -17
- package/src/components/inputs/@types/autocomplete.ts +39 -0
- package/src/components/inputs/autocomplete.module.css +371 -0
- package/src/components/inputs/autocomplete.stories.tsx +184 -0
- package/src/components/inputs/autocomplete.tsx +173 -0
- package/src/components/inputs/index.tsx +1 -0
- package/src/react.ts +1 -0
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Intent as t } from '../../@types/shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Available visual style variants for the Autocomplete input.
|
|
4
|
+
*/
|
|
5
|
+
export declare const variant: readonly ["outlined", "filled", "underlined"];
|
|
6
|
+
/**
|
|
7
|
+
* Visual style variant of the autocomplete input field.
|
|
8
|
+
*
|
|
9
|
+
* - `outlined` — full border on all sides with a transparent background (default)
|
|
10
|
+
* - `filled` — tinted background
|
|
11
|
+
* - `underlined` — bottom border only, no background (minimal style)
|
|
12
|
+
*
|
|
13
|
+
* @default 'outlined'
|
|
14
|
+
*/
|
|
15
|
+
export type Variant = (typeof variant)[number];
|
|
16
|
+
/**
|
|
17
|
+
* Available size tokens for the Autocomplete component.
|
|
18
|
+
*/
|
|
19
|
+
export declare const size: readonly ["sm", "md", "lg"];
|
|
20
|
+
/**
|
|
21
|
+
* Visual size of the autocomplete component.
|
|
22
|
+
*
|
|
23
|
+
* - `sm` — compact, suitable for inline forms or dense layouts
|
|
24
|
+
* - `md` — standard form size (default)
|
|
25
|
+
* - `lg` — large, prominent input
|
|
26
|
+
*
|
|
27
|
+
* @default 'md'
|
|
28
|
+
*/
|
|
29
|
+
export type Size = (typeof size)[number];
|
|
30
|
+
/**
|
|
31
|
+
* Semantic color intent applied to the autocomplete border and focus ring.
|
|
32
|
+
* @default 'primary'
|
|
33
|
+
*/
|
|
34
|
+
export type Intent = 'primary' | t;
|
|
35
|
+
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/@types/autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,wBAAwB,CAAA;AAEzD;;GAEG;AACH,eAAO,MAAM,OAAO,+CAAgD,CAAA;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,IAAI,6BAA8B,CAAA;AAE/C;;;;;;;;GAQG;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAA;AAExC;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { Autocomplete as AutocompletePrimitive } from '@base-ui/react/autocomplete';
|
|
3
|
+
import type { Intent, Size, Variant } from './@types/autocomplete.js';
|
|
4
|
+
type AutocompleteRootProps = React.ComponentProps<typeof AutocompletePrimitive.Root>;
|
|
5
|
+
export interface AutocompleteProps<Item = string> extends Omit<AutocompleteRootProps, 'items' | 'children'> {
|
|
6
|
+
id: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
variant?: Variant;
|
|
9
|
+
inputSize?: Size;
|
|
10
|
+
intent?: Intent;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
autoComplete?: string;
|
|
14
|
+
error?: boolean;
|
|
15
|
+
helpText?: string;
|
|
16
|
+
errorText?: string;
|
|
17
|
+
emptyText?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
inputClassName?: string;
|
|
20
|
+
wrapperClassName?: string;
|
|
21
|
+
items: Item[];
|
|
22
|
+
children: React.ComponentProps<typeof AutocompletePrimitive.List>['children'];
|
|
23
|
+
sideOffset?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function Autocomplete<Item = string>({ id, label, variant, inputSize, intent, required, placeholder, autoComplete, error, helpText, errorText, emptyText, className, inputClassName, wrapperClassName, items, children, sideOffset, ...rest }: AutocompleteProps<Item>): React.JSX.Element;
|
|
26
|
+
export declare const AutocompleteItem: {
|
|
27
|
+
({ ref: forwardedRef, children, className, ...props }: React.ComponentProps<typeof AutocompletePrimitive.Item> & {
|
|
28
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
29
|
+
}): React.JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const AutocompleteGroup: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AutocompleteGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export declare const AutocompleteGroupLabel: {
|
|
34
|
+
({ children, className, ...props }: React.ComponentProps<typeof AutocompletePrimitive.GroupLabel>): React.JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
export declare const AutocompleteSeparator: {
|
|
38
|
+
({ className, ...props }: React.ComponentProps<typeof AutocompletePrimitive.Separator>): React.JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/autocomplete.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAOnF,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAErE,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAA;AAEpF,MAAM,WAAW,iBAAiB,CAAC,IAAI,GAAG,MAAM,CAC9C,SAAQ,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,UAAU,CAAC;IACzD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAA;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,YAAY,CAAC,IAAI,GAAG,MAAM,EAAE,EAC1C,EAAE,EACF,KAAK,EACL,OAAoB,EACpB,SAAgB,EAChB,MAAkB,EAClB,QAAQ,EACR,WAAgB,EAChB,YAAoB,EACpB,KAAa,EACb,QAAa,EACb,SAAc,EACd,SAA+B,EAC/B,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,KAAK,EACL,QAAQ,EACR,UAAc,EACd,GAAG,IAAI,EACR,EAAE,iBAAiB,CAAC,IAAI,CAAC,qBA8DzB;AAED,eAAO,MAAM,gBAAgB;2DAK1B,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;QAC3D,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;KACtC;;CAUA,CAAA;AAID,eAAO,MAAM,iBAAiB,qIAA8B,CAAA;AAC5D,eAAO,MAAM,sBAAsB;wCAIhC,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC;;CAS/D,CAAA;AAID,eAAO,MAAM,qBAAqB;8BAG/B,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC;;CAO9D,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
4
|
+
import classnames from "classnames";
|
|
5
|
+
import autocomplete_module from "./autocomplete.module.js";
|
|
6
|
+
import { ErrorText } from "./error-text.js";
|
|
7
|
+
import { HelpText } from "./help-text.js";
|
|
8
|
+
import { Label } from "./label.js";
|
|
9
|
+
function autocomplete_Autocomplete({ id, label, variant = 'outlined', inputSize = 'md', intent = 'primary', required, placeholder = '', autoComplete = 'off', error = false, helpText = '', errorText = '', emptyText = 'No results found.', className, inputClassName, wrapperClassName, items, children, sideOffset = 4, ...rest }) {
|
|
10
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
11
|
+
className: classnames('infonomic-autocomplete-wrapper', autocomplete_module["autocomplete-wrapper"], wrapperClassName),
|
|
12
|
+
children: [
|
|
13
|
+
/*#__PURE__*/ jsxs(Autocomplete.Root, {
|
|
14
|
+
items: items,
|
|
15
|
+
...rest,
|
|
16
|
+
children: [
|
|
17
|
+
null != label && /*#__PURE__*/ jsx(Label, {
|
|
18
|
+
id: id,
|
|
19
|
+
htmlFor: id,
|
|
20
|
+
required: required,
|
|
21
|
+
label: label
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ jsx(Autocomplete.Input, {
|
|
24
|
+
id: id,
|
|
25
|
+
placeholder: placeholder,
|
|
26
|
+
autoComplete: autoComplete,
|
|
27
|
+
"aria-labelledby": label ? `label-for-${id}` : void 0,
|
|
28
|
+
"aria-invalid": error,
|
|
29
|
+
"aria-required": required,
|
|
30
|
+
"aria-errormessage": error ? errorText : void 0,
|
|
31
|
+
"aria-describedby": error ? `error-for-${id}` : void 0,
|
|
32
|
+
className: classnames('infonomic-autocomplete-input', `infonomic-autocomplete-input-${variant}`, `infonomic-autocomplete-input-${inputSize}`, `infonomic-autocomplete-input-${intent}`, autocomplete_module.input, autocomplete_module[variant], autocomplete_module[inputSize], autocomplete_module[intent], {
|
|
33
|
+
[autocomplete_module.error]: error
|
|
34
|
+
}, className, inputClassName)
|
|
35
|
+
}),
|
|
36
|
+
/*#__PURE__*/ jsx(Autocomplete.Portal, {
|
|
37
|
+
children: /*#__PURE__*/ jsx(Autocomplete.Positioner, {
|
|
38
|
+
className: classnames('infonomic-autocomplete-positioner', autocomplete_module.positioner),
|
|
39
|
+
sideOffset: sideOffset,
|
|
40
|
+
children: /*#__PURE__*/ jsxs(Autocomplete.Popup, {
|
|
41
|
+
className: classnames('infonomic-autocomplete-popup', autocomplete_module.popup, null != inputSize && autocomplete_module[`popup-${inputSize}`]),
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ jsx(Autocomplete.Empty, {
|
|
44
|
+
className: classnames('infonomic-autocomplete-empty', autocomplete_module.empty),
|
|
45
|
+
children: emptyText
|
|
46
|
+
}),
|
|
47
|
+
/*#__PURE__*/ jsx(Autocomplete.List, {
|
|
48
|
+
className: classnames('infonomic-autocomplete-list', autocomplete_module.list),
|
|
49
|
+
children: children
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}),
|
|
57
|
+
error ? /*#__PURE__*/ jsx(ErrorText, {
|
|
58
|
+
id: `error-for-${id}`,
|
|
59
|
+
size: inputSize,
|
|
60
|
+
text: errorText ?? helpText
|
|
61
|
+
}) : helpText?.length > 0 && /*#__PURE__*/ jsx(HelpText, {
|
|
62
|
+
size: inputSize,
|
|
63
|
+
text: helpText
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const AutocompleteItem = ({ ref: forwardedRef, children, className, ...props })=>/*#__PURE__*/ jsx(Autocomplete.Item, {
|
|
69
|
+
className: classnames('infonomic-autocomplete-item', autocomplete_module["autocomplete-item"], className),
|
|
70
|
+
...props,
|
|
71
|
+
ref: forwardedRef,
|
|
72
|
+
children: children
|
|
73
|
+
});
|
|
74
|
+
AutocompleteItem.displayName = 'AutocompleteItem';
|
|
75
|
+
const AutocompleteGroup = Autocomplete.Group;
|
|
76
|
+
const AutocompleteGroupLabel = ({ children, className, ...props })=>/*#__PURE__*/ jsx(Autocomplete.GroupLabel, {
|
|
77
|
+
className: classnames('infonomic-autocomplete-group-label', autocomplete_module["group-label"], className),
|
|
78
|
+
...props,
|
|
79
|
+
children: children
|
|
80
|
+
});
|
|
81
|
+
AutocompleteGroupLabel.displayName = 'AutocompleteGroupLabel';
|
|
82
|
+
const AutocompleteSeparator = ({ className, ...props })=>/*#__PURE__*/ jsx(Autocomplete.Separator, {
|
|
83
|
+
className: classnames('infonomic-autocomplete-separator', autocomplete_module.separator, className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
AutocompleteSeparator.displayName = 'AutocompleteSeparator';
|
|
87
|
+
export { AutocompleteGroup, AutocompleteGroupLabel, AutocompleteItem, AutocompleteSeparator, autocomplete_Autocomplete as Autocomplete };
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
@layer infonomic-base,
|
|
2
|
+
infonomic-functional,
|
|
3
|
+
infonomic-utilities,
|
|
4
|
+
infonomic-theme,
|
|
5
|
+
infonomic-typography,
|
|
6
|
+
infonomic-components;
|
|
7
|
+
|
|
8
|
+
@layer infonomic-components {
|
|
9
|
+
|
|
10
|
+
/* ── Wrapper ── */
|
|
11
|
+
|
|
12
|
+
.autocomplete-wrapper,
|
|
13
|
+
:global(.infonomic-autocomplete-wrapper) {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--gap-1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* ── Input ── */
|
|
20
|
+
|
|
21
|
+
.input,
|
|
22
|
+
:global(.infonomic-autocomplete-input) {
|
|
23
|
+
border: none;
|
|
24
|
+
outline: 1px solid transparent;
|
|
25
|
+
outline-offset: 2px;
|
|
26
|
+
font-weight: normal;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
gap: var(--gap-2);
|
|
29
|
+
align-items: center;
|
|
30
|
+
width: 100%;
|
|
31
|
+
transition: all var(--transition-normal);
|
|
32
|
+
border-radius: var(--border-radius-sm);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.input:focus,
|
|
36
|
+
.input:active,
|
|
37
|
+
:global(.infonomic-autocomplete-input):focus,
|
|
38
|
+
:global(.infonomic-autocomplete-input):active {
|
|
39
|
+
outline-color: var(--ring-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.input:disabled,
|
|
43
|
+
.input[disabled],
|
|
44
|
+
:global(.infonomic-autocomplete-input):disabled,
|
|
45
|
+
:global(.infonomic-autocomplete-input)[disabled] {
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ── Sizes ── */
|
|
50
|
+
|
|
51
|
+
.sm,
|
|
52
|
+
:global(.infonomic-autocomplete-input-sm) {
|
|
53
|
+
min-height: 32px;
|
|
54
|
+
font-size: 0.875rem;
|
|
55
|
+
line-height: 0;
|
|
56
|
+
padding: 0.25rem 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.md,
|
|
60
|
+
:global(.infonomic-autocomplete-input-md) {
|
|
61
|
+
min-height: 36px;
|
|
62
|
+
font-size: 1rem;
|
|
63
|
+
line-height: 0;
|
|
64
|
+
padding: 0.3rem 0.5rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.lg,
|
|
68
|
+
:global(.infonomic-autocomplete-input-lg) {
|
|
69
|
+
min-height: 40px;
|
|
70
|
+
font-size: 1.175rem;
|
|
71
|
+
line-height: 0;
|
|
72
|
+
padding: 0.4rem 0.5rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ── Variants ── */
|
|
76
|
+
|
|
77
|
+
.outlined,
|
|
78
|
+
:global(.infonomic-autocomplete-input-outlined) {
|
|
79
|
+
border: 1px solid var(--input-variant-outlined-border);
|
|
80
|
+
background-color: transparent;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.outlined:hover,
|
|
84
|
+
:global(.infonomic-autocomplete-input-outlined):hover {
|
|
85
|
+
border: 1px solid var(--input-variant-outlined-hover-border);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.outlined:focus,
|
|
89
|
+
.outlined:active,
|
|
90
|
+
:global(.infonomic-autocomplete-input-outlined):focus,
|
|
91
|
+
:global(.infonomic-autocomplete-input-outlined):active {
|
|
92
|
+
--ring-color: var(--input-variant-outline-ring-color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.underlined,
|
|
96
|
+
:global(.infonomic-autocomplete-input-underlined) {
|
|
97
|
+
border-bottom: 1px solid var(--input-variant-underlined-border);
|
|
98
|
+
border-radius: 0;
|
|
99
|
+
gap: var(--gap-1);
|
|
100
|
+
background-color: var(--input-variant-underlined);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.underlined.sm,
|
|
104
|
+
:global(.infonomic-autocomplete-input-underlined.infonomic-autocomplete-input-sm) {
|
|
105
|
+
padding: 0.25rem 0.1rem;
|
|
106
|
+
min-height: 26px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.underlined.md,
|
|
110
|
+
:global(.infonomic-autocomplete-input-underlined.infonomic-autocomplete-input-md) {
|
|
111
|
+
padding: 0.25rem 0.1rem;
|
|
112
|
+
min-height: 30px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.underlined.lg,
|
|
116
|
+
:global(.infonomic-autocomplete-input-underlined.infonomic-autocomplete-input-lg) {
|
|
117
|
+
padding: 0 0.1rem;
|
|
118
|
+
min-height: 34px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.underlined:hover,
|
|
122
|
+
:global(.infonomic-autocomplete-input-underlined):hover {
|
|
123
|
+
border-bottom: 1px solid var(--input-variant-underlined-hover-border);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.underlined:focus,
|
|
127
|
+
.underlined:active,
|
|
128
|
+
:global(.infonomic-autocomplete-input-underlined):focus,
|
|
129
|
+
:global(.infonomic-autocomplete-input-underlined):active {
|
|
130
|
+
outline: none;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.filled,
|
|
134
|
+
:global(.infonomic-autocomplete-input-filled) {
|
|
135
|
+
background-color: var(--input-variant-filled);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* ── Error ── */
|
|
139
|
+
|
|
140
|
+
.error,
|
|
141
|
+
:global(.infonomic-autocomplete-input-error) {
|
|
142
|
+
border: 1px solid var(--red-400);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.error:hover,
|
|
146
|
+
:global(.infonomic-autocomplete-input-error):hover {
|
|
147
|
+
border: 1px solid var(--red-400);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.error:focus,
|
|
151
|
+
.error:active,
|
|
152
|
+
:global(.infonomic-autocomplete-input-error):focus,
|
|
153
|
+
:global(.infonomic-autocomplete-input-error):active {
|
|
154
|
+
--ring-color: var(--red-300);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ── Intents ── */
|
|
158
|
+
|
|
159
|
+
.primary,
|
|
160
|
+
:global(.infonomic-autocomplete-input-primary) {
|
|
161
|
+
--input-variant-outlined-border: var(--stroke-primary);
|
|
162
|
+
--input-variant-outlined-hover-border: var(--stroke-primary-hover);
|
|
163
|
+
--input-variant-outline-ring-color: var(--ring-primary);
|
|
164
|
+
--input-variant-underlined-border: var(--stroke-primary);
|
|
165
|
+
--input-variant-underlined-hover-border: var(--stroke-primary-hover);
|
|
166
|
+
--input-variant-filled: var(--fill-primary-weak);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.secondary,
|
|
170
|
+
:global(.infonomic-autocomplete-input-secondary) {
|
|
171
|
+
--input-variant-outlined-border: var(--stroke-secondary);
|
|
172
|
+
--input-variant-outlined-hover-border: var(--stroke-secondary-hover);
|
|
173
|
+
--input-variant-outline-ring-color: var(--ring-secondary);
|
|
174
|
+
--input-variant-underlined-border: var(--stroke-secondary);
|
|
175
|
+
--input-variant-underlined-hover-border: var(--stroke-secondary-hover);
|
|
176
|
+
--input-variant-filled: var(--fill-secondary-weak);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.noeffect,
|
|
180
|
+
:global(.infonomic-autocomplete-input-noeffect) {
|
|
181
|
+
--input-variant-outlined-border: var(--stroke-noeffect);
|
|
182
|
+
--input-variant-outlined-hover-border: var(--stroke-noeffect-hover);
|
|
183
|
+
--input-variant-outline-ring-color: var(--ring-noeffect);
|
|
184
|
+
--input-variant-underlined-border: var(--stroke-noeffect);
|
|
185
|
+
--input-variant-underlined-hover-border: var(--stroke-noeffect-hover);
|
|
186
|
+
--input-variant-filled: var(--fill-noeffect-weak);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.success,
|
|
190
|
+
:global(.infonomic-autocomplete-input-success) {
|
|
191
|
+
--input-variant-outlined-border: var(--stroke-success);
|
|
192
|
+
--input-variant-outlined-hover-border: var(--stroke-success-hover);
|
|
193
|
+
--input-variant-outline-ring-color: var(--ring-success);
|
|
194
|
+
--input-variant-underlined-border: var(--stroke-success);
|
|
195
|
+
--input-variant-underlined-hover-border: var(--stroke-success-hover);
|
|
196
|
+
--input-variant-filled: var(--fill-success-weak);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.info,
|
|
200
|
+
:global(.infonomic-autocomplete-input-info) {
|
|
201
|
+
--input-variant-outlined-border: var(--stroke-info);
|
|
202
|
+
--input-variant-outlined-hover-border: var(--stroke-info-hover);
|
|
203
|
+
--input-variant-outline-ring-color: var(--ring-info);
|
|
204
|
+
--input-variant-underlined-border: var(--stroke-info);
|
|
205
|
+
--input-variant-underlined-hover-border: var(--stroke-info-hover);
|
|
206
|
+
--input-variant-filled: var(--fill-info-weak);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.warning,
|
|
210
|
+
:global(.infonomic-autocomplete-input-warning) {
|
|
211
|
+
--input-variant-outlined-border: var(--stroke-warning);
|
|
212
|
+
--input-variant-outlined-hover-border: var(--stroke-warning-hover);
|
|
213
|
+
--input-variant-outline-ring-color: var(--ring-warning);
|
|
214
|
+
--input-variant-underlined-border: var(--stroke-warning);
|
|
215
|
+
--input-variant-underlined-hover-border: var(--stroke-warning-hover);
|
|
216
|
+
--input-variant-filled: var(--fill-warning-weak);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.danger,
|
|
220
|
+
:global(.infonomic-autocomplete-input-danger) {
|
|
221
|
+
--input-variant-outlined-border: var(--stroke-danger);
|
|
222
|
+
--input-variant-outlined-hover-border: var(--stroke-danger-hover);
|
|
223
|
+
--input-variant-outline-ring-color: var(--ring-danger);
|
|
224
|
+
--input-variant-underlined-border: var(--stroke-danger);
|
|
225
|
+
--input-variant-underlined-hover-border: var(--stroke-danger-hover);
|
|
226
|
+
--input-variant-filled: var(--fill-danger-weak);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* ── Positioner ── */
|
|
230
|
+
|
|
231
|
+
.positioner,
|
|
232
|
+
:global(.infonomic-autocomplete-positioner) {
|
|
233
|
+
z-index: 50;
|
|
234
|
+
outline: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* ── Popup ── */
|
|
238
|
+
|
|
239
|
+
.popup,
|
|
240
|
+
:global(.infonomic-autocomplete-popup) {
|
|
241
|
+
z-index: 50;
|
|
242
|
+
margin-top: 2px;
|
|
243
|
+
border: 1px solid var(--surface-panel-border);
|
|
244
|
+
box-shadow: var(--shadow-md);
|
|
245
|
+
border-radius: var(--border-radius-md);
|
|
246
|
+
background-color: var(--surface-panel-elevated);
|
|
247
|
+
padding: 6px;
|
|
248
|
+
width: var(--anchor-width);
|
|
249
|
+
max-height: min(23rem, var(--available-height));
|
|
250
|
+
max-width: var(--available-width);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.popup-sm {
|
|
254
|
+
padding: 4px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.popup-md {
|
|
258
|
+
padding: 6px;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.popup-lg {
|
|
262
|
+
padding: 8px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* ── List ── */
|
|
266
|
+
|
|
267
|
+
.list,
|
|
268
|
+
:global(.infonomic-autocomplete-list) {
|
|
269
|
+
box-sizing: border-box;
|
|
270
|
+
overflow-y: auto;
|
|
271
|
+
overscroll-behavior: contain;
|
|
272
|
+
padding-block: 0.25rem;
|
|
273
|
+
scroll-padding-block: 0.25rem;
|
|
274
|
+
outline: 0;
|
|
275
|
+
max-height: min(23rem, var(--available-height));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.list[data-empty],
|
|
279
|
+
:global(.infonomic-autocomplete-list)[data-empty] {
|
|
280
|
+
padding: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* ── Item ── */
|
|
284
|
+
|
|
285
|
+
.autocomplete-item,
|
|
286
|
+
:global(.infonomic-autocomplete-item) {
|
|
287
|
+
position: relative;
|
|
288
|
+
user-select: none;
|
|
289
|
+
cursor: default;
|
|
290
|
+
outline: 0;
|
|
291
|
+
color: var(--surface-item-text);
|
|
292
|
+
background-color: var(--surface-item);
|
|
293
|
+
font-size: 1rem;
|
|
294
|
+
line-height: 1;
|
|
295
|
+
padding-block: 0.5rem;
|
|
296
|
+
padding-left: 0.75rem;
|
|
297
|
+
padding-right: 0.75rem;
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
border-radius: 6px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.autocomplete-item[data-disabled],
|
|
304
|
+
:global(.infonomic-autocomplete-item[data-disabled]) {
|
|
305
|
+
color: var(--surface-item-text-disabled);
|
|
306
|
+
pointer-events: none;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.autocomplete-item[data-highlighted],
|
|
310
|
+
:global(.infonomic-autocomplete-item[data-highlighted]) {
|
|
311
|
+
outline: none;
|
|
312
|
+
background-color: var(--surface-item-hover);
|
|
313
|
+
color: var(--surface-item-text-hover);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* ── Size-scoped items ── */
|
|
317
|
+
|
|
318
|
+
.popup-sm .autocomplete-item {
|
|
319
|
+
font-size: 0.75rem;
|
|
320
|
+
padding-block: 0.375rem;
|
|
321
|
+
padding-left: 0.5rem;
|
|
322
|
+
padding-right: 0.5rem;
|
|
323
|
+
border-radius: 4px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.popup-md .autocomplete-item {
|
|
327
|
+
font-size: 0.875rem;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.popup-lg .autocomplete-item {
|
|
331
|
+
font-size: 1.125rem;
|
|
332
|
+
padding-block: 0.625rem;
|
|
333
|
+
padding-left: 1rem;
|
|
334
|
+
padding-right: 1rem;
|
|
335
|
+
border-radius: 8px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* ── Group label ── */
|
|
339
|
+
|
|
340
|
+
.group-label,
|
|
341
|
+
:global(.infonomic-autocomplete-group-label) {
|
|
342
|
+
padding: 0.375rem 0.75rem;
|
|
343
|
+
font-size: 0.75rem;
|
|
344
|
+
font-weight: 600;
|
|
345
|
+
color: var(--muted);
|
|
346
|
+
text-transform: uppercase;
|
|
347
|
+
letter-spacing: 0.05em;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* ── Separator ── */
|
|
351
|
+
|
|
352
|
+
.separator,
|
|
353
|
+
:global(.infonomic-autocomplete-separator) {
|
|
354
|
+
margin: 0.375rem 0.75rem;
|
|
355
|
+
height: 1px;
|
|
356
|
+
background-color: var(--surface-panel-border);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* ── Empty ── */
|
|
360
|
+
|
|
361
|
+
.empty:not(:empty),
|
|
362
|
+
:global(.infonomic-autocomplete-empty):not(:empty) {
|
|
363
|
+
box-sizing: border-box;
|
|
364
|
+
padding: 1rem;
|
|
365
|
+
font-size: 0.925rem;
|
|
366
|
+
line-height: 1;
|
|
367
|
+
color: var(--muted);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/* Dark mode handled by semantic tokens in theme layer */
|
|
371
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "./autocomplete_module.css";
|
|
2
|
+
const autocomplete_module = {
|
|
3
|
+
"autocomplete-wrapper": "autocomplete-wrapper-JirsmI",
|
|
4
|
+
autocompleteWrapper: "autocomplete-wrapper-JirsmI",
|
|
5
|
+
input: "input-nIzHob",
|
|
6
|
+
sm: "sm-m41uwR",
|
|
7
|
+
md: "md-pauitB",
|
|
8
|
+
lg: "lg-XirY1c",
|
|
9
|
+
outlined: "outlined-Sg0shm",
|
|
10
|
+
underlined: "underlined-TOTDkZ",
|
|
11
|
+
filled: "filled-LBQC5g",
|
|
12
|
+
error: "error-Wyckbu",
|
|
13
|
+
primary: "primary-j2veZ2",
|
|
14
|
+
secondary: "secondary-zC8OiE",
|
|
15
|
+
noeffect: "noeffect-sFS4eb",
|
|
16
|
+
success: "success-rkhMDk",
|
|
17
|
+
info: "info-Fnv8u5",
|
|
18
|
+
warning: "warning-MCe1Jq",
|
|
19
|
+
danger: "danger-uyUS1z",
|
|
20
|
+
positioner: "positioner-LkIIwT",
|
|
21
|
+
popup: "popup-MGvAiW",
|
|
22
|
+
"popup-sm": "popup-sm-Fk47F5",
|
|
23
|
+
popupSm: "popup-sm-Fk47F5",
|
|
24
|
+
"popup-md": "popup-md-zIhzgb",
|
|
25
|
+
popupMd: "popup-md-zIhzgb",
|
|
26
|
+
"popup-lg": "popup-lg-hTq8_O",
|
|
27
|
+
popupLg: "popup-lg-hTq8_O",
|
|
28
|
+
list: "list-U6_3IW",
|
|
29
|
+
"autocomplete-item": "autocomplete-item-GHvdpB",
|
|
30
|
+
autocompleteItem: "autocomplete-item-GHvdpB",
|
|
31
|
+
"group-label": "group-label-yz4GS8",
|
|
32
|
+
groupLabel: "group-label-yz4GS8",
|
|
33
|
+
separator: "separator-sgreyb",
|
|
34
|
+
empty: "empty-xvhK78"
|
|
35
|
+
};
|
|
36
|
+
export default autocomplete_module;
|