@inseefr/lunatic 3.12.2 → 3.12.3
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/components/Dropdown/Dropdown.js +1 -2
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.spec.js +13 -5
- package/components/Dropdown/Dropdown.spec.js.map +1 -1
- package/components/Suggester/CustomSuggester.d.ts +6 -0
- package/components/Suggester/CustomSuggester.js +1 -1
- package/components/Suggester/CustomSuggester.js.map +1 -1
- package/components/shared/Combobox/Combobox.js +5 -6
- package/components/shared/Combobox/Combobox.js.map +1 -1
- package/components/shared/Combobox/ComboboxType.d.ts +1 -0
- package/components/shared/Combobox/Panel/ComboboxOption.d.ts +1 -0
- package/components/shared/Combobox/Panel/ComboboxOption.js +4 -4
- package/components/shared/Combobox/Panel/ComboboxOption.js.map +1 -1
- package/components/shared/Combobox/Panel/ComboboxOption.spec.js +18 -5
- package/components/shared/Combobox/Panel/ComboboxOption.spec.js.map +1 -1
- package/components/shared/Combobox/Panel/ComboboxPanel.d.ts +1 -1
- package/components/shared/Combobox/Panel/ComboboxPanel.js +2 -2
- package/components/shared/Combobox/Panel/ComboboxPanel.js.map +1 -1
- package/components/type.d.ts +6 -0
- package/esm/components/Dropdown/Dropdown.js +1 -2
- package/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/esm/components/Dropdown/Dropdown.spec.js +14 -6
- package/esm/components/Dropdown/Dropdown.spec.js.map +1 -1
- package/esm/components/Suggester/CustomSuggester.d.ts +6 -0
- package/esm/components/Suggester/CustomSuggester.js +1 -1
- package/esm/components/Suggester/CustomSuggester.js.map +1 -1
- package/esm/components/shared/Combobox/Combobox.js +5 -6
- package/esm/components/shared/Combobox/Combobox.js.map +1 -1
- package/esm/components/shared/Combobox/ComboboxType.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.js +5 -5
- package/esm/components/shared/Combobox/Panel/ComboboxOption.js.map +1 -1
- package/esm/components/shared/Combobox/Panel/ComboboxOption.spec.js +18 -5
- package/esm/components/shared/Combobox/Panel/ComboboxOption.spec.js.map +1 -1
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.d.ts +1 -1
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.js +2 -2
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.js.map +1 -1
- package/esm/components/type.d.ts +6 -0
- package/package.json +2 -9
- package/src/components/Dropdown/Dropdown.spec.tsx +22 -6
- package/src/components/Dropdown/Dropdown.tsx +1 -2
- package/src/components/Dropdown/__snapshots__/Dropdown.spec.tsx.snap +2 -2
- package/src/components/Suggester/CustomSuggester.tsx +7 -0
- package/src/components/shared/Combobox/Combobox.tsx +5 -4
- package/src/components/shared/Combobox/ComboboxType.ts +1 -0
- package/src/components/shared/Combobox/Panel/ComboboxOption.spec.tsx +27 -5
- package/src/components/shared/Combobox/Panel/ComboboxOption.tsx +10 -6
- package/src/components/shared/Combobox/Panel/ComboboxPanel.tsx +3 -1
- package/src/components/type.ts +6 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/components/Dropdown/renderer/SimpleOptionRenderer.d.ts +0 -7
- package/components/Dropdown/renderer/SimpleOptionRenderer.js +0 -16
- package/components/Dropdown/renderer/SimpleOptionRenderer.js.map +0 -1
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.d.ts +0 -7
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.js +0 -10
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.js.map +0 -1
- package/src/components/Dropdown/renderer/SimpleOptionRenderer.tsx +0 -26
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ComboboxOptionType } from '../../shared/Combobox/ComboboxType';
|
|
2
|
-
type Props = {
|
|
3
|
-
option: ComboboxOptionType;
|
|
4
|
-
selected?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function SimpleOptionRenderer({ option, selected }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SimpleOptionRenderer = SimpleOptionRenderer;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
-
function SimpleOptionRenderer({ option, selected }) {
|
|
10
|
-
const { value, label } = option;
|
|
11
|
-
if (label && typeof label === 'string' && label.length) {
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('lunatic-dropdown-option', { selected }), children: [(0, jsx_runtime_1.jsx)("span", { className: "id", children: value }), (0, jsx_runtime_1.jsx)("span", { children: "\u00A0\u2014\u00A0" }), (0, jsx_runtime_1.jsx)("span", { className: "label", children: label })] }));
|
|
13
|
-
}
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('lunatic-dropdown-option', { selected }), children: (0, jsx_runtime_1.jsx)("span", { className: "id", children: label }) }));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=SimpleOptionRenderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleOptionRenderer.js","sourceRoot":"","sources":["../../../src/components/Dropdown/renderer/SimpleOptionRenderer.tsx"],"names":[],"mappings":";;;;;AAQA,oDAiBC;;AAzBD,4DAAoC;AAQpC,SAAgB,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAS;IAC/D,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEhC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACxD,OAAO,CACN,iCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,yBAAyB,EAAE,EAAE,QAAQ,EAAE,CAAC,aAClE,iCAAM,SAAS,EAAC,IAAI,YAAE,KAAK,GAAQ,EACnC,kEAAiC,EACjC,iCAAM,SAAS,EAAC,OAAO,YAAE,KAAK,GAAQ,IACjC,CACN,CAAC;IACH,CAAC;IACD,OAAO,CACN,gCAAK,SAAS,EAAE,IAAA,oBAAU,EAAC,yBAAyB,EAAE,EAAE,QAAQ,EAAE,CAAC,YAClE,iCAAM,SAAS,EAAC,IAAI,YAAE,KAAK,GAAQ,GAC9B,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ComboboxOptionType } from '../../shared/Combobox/ComboboxType';
|
|
2
|
-
type Props = {
|
|
3
|
-
option: ComboboxOptionType;
|
|
4
|
-
selected?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare function SimpleOptionRenderer({ option, selected }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
export function SimpleOptionRenderer({ option, selected }) {
|
|
4
|
-
const { value, label } = option;
|
|
5
|
-
if (label && typeof label === 'string' && label.length) {
|
|
6
|
-
return (_jsxs("div", { className: classnames('lunatic-dropdown-option', { selected }), children: [_jsx("span", { className: "id", children: value }), _jsx("span", { children: "\u00A0\u2014\u00A0" }), _jsx("span", { className: "label", children: label })] }));
|
|
7
|
-
}
|
|
8
|
-
return (_jsx("div", { className: classnames('lunatic-dropdown-option', { selected }), children: _jsx("span", { className: "id", children: label }) }));
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=SimpleOptionRenderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleOptionRenderer.js","sourceRoot":"","sources":["../../../../src/components/Dropdown/renderer/SimpleOptionRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,MAAM,UAAU,oBAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAS;IAC/D,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAEhC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QACxD,OAAO,CACN,eAAK,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,EAAE,QAAQ,EAAE,CAAC,aAClE,eAAM,SAAS,EAAC,IAAI,YAAE,KAAK,GAAQ,EACnC,gDAAiC,EACjC,eAAM,SAAS,EAAC,OAAO,YAAE,KAAK,GAAQ,IACjC,CACN,CAAC;IACH,CAAC;IACD,OAAO,CACN,cAAK,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,EAAE,QAAQ,EAAE,CAAC,YAClE,eAAM,SAAS,EAAC,IAAI,YAAE,KAAK,GAAQ,GAC9B,CACN,CAAC;AACH,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import classnames from 'classnames';
|
|
2
|
-
import type { ComboboxOptionType } from '../../shared/Combobox/ComboboxType';
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
option: ComboboxOptionType;
|
|
6
|
-
selected?: boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export function SimpleOptionRenderer({ option, selected }: Props) {
|
|
10
|
-
const { value, label } = option;
|
|
11
|
-
|
|
12
|
-
if (label && typeof label === 'string' && label.length) {
|
|
13
|
-
return (
|
|
14
|
-
<div className={classnames('lunatic-dropdown-option', { selected })}>
|
|
15
|
-
<span className="id">{value}</span>
|
|
16
|
-
<span> — </span>
|
|
17
|
-
<span className="label">{label}</span>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
return (
|
|
22
|
-
<div className={classnames('lunatic-dropdown-option', { selected })}>
|
|
23
|
-
<span className="id">{label}</span>
|
|
24
|
-
</div>
|
|
25
|
-
);
|
|
26
|
-
}
|