@nar-bus/ui-kit 1.14.0 → 1.16.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/{Button-DsTGnChX.js → Button-BN_yX87x.js} +6 -2
- package/dist/atoms/Button.d.ts.map +1 -1
- package/dist/atoms/Select.d.ts +10 -0
- package/dist/atoms/Select.d.ts.map +1 -1
- package/dist/index.js +2795 -2675
- package/dist/map.js +1 -1
- package/dist/molecules/Combobox.d.ts +12 -1
- package/dist/molecules/Combobox.d.ts.map +1 -1
- package/dist/organisms/FilterPanel.d.ts +43 -1
- package/dist/organisms/FilterPanel.d.ts.map +1 -1
- package/dist/organisms/JsonViewer.d.ts.map +1 -1
- package/dist/organisms/Sidebar.d.ts.map +1 -1
- package/dist/theme.css +1 -1
- package/dist/ui-kit.css +1 -1
- package/package.json +1 -1
package/dist/map.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as f, useState as D, useEffect as U } from "react";
|
|
3
3
|
import { useTranslation as T } from "react-i18next";
|
|
4
|
-
import { a as h, B as V } from "./Button-
|
|
4
|
+
import { a as h, B as V } from "./Button-BN_yX87x.js";
|
|
5
5
|
function X() {
|
|
6
6
|
if (typeof document > "u") return !1;
|
|
7
7
|
try {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface ComboboxOption {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
@@ -12,6 +13,16 @@ interface ComboboxPropsBase {
|
|
|
12
13
|
onSearch?: (query: string) => void;
|
|
13
14
|
className?: string;
|
|
14
15
|
creatable?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Static hint rendered inside the open panel, under the search box, whenever
|
|
18
|
+
* `creatable` is on — it stays visible before AND after typing, so the
|
|
19
|
+
* "a new value can be entered here" affordance does not depend on the user
|
|
20
|
+
* already having typed (the create row only appears once there is a query).
|
|
21
|
+
* Caller-supplied content (no package default literal — see the shared-copy
|
|
22
|
+
* rule); ignored when `creatable` is false. Closed-state affordance stays the
|
|
23
|
+
* caller's `placeholder`. (NB-COMBO-CREATE-HINT-01)
|
|
24
|
+
*/
|
|
25
|
+
createHint?: ReactNode;
|
|
15
26
|
}
|
|
16
27
|
interface ComboboxPropsSingle extends ComboboxPropsBase {
|
|
17
28
|
multiple?: false;
|
|
@@ -24,6 +35,6 @@ interface ComboboxPropsMultiple extends ComboboxPropsBase {
|
|
|
24
35
|
onChange?: (value: string[]) => void;
|
|
25
36
|
}
|
|
26
37
|
export type ComboboxProps = ComboboxPropsSingle | ComboboxPropsMultiple;
|
|
27
|
-
export declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, multiple, disabled, error, loading, onSearch, className, creatable, }: ComboboxProps): import("react").JSX.Element;
|
|
38
|
+
export declare function Combobox({ options, value, onChange, placeholder, searchPlaceholder, multiple, disabled, error, loading, onSearch, className, creatable, createHint, }: ComboboxProps): import("react").JSX.Element;
|
|
28
39
|
export {};
|
|
29
40
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/molecules/Combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../src/molecules/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4D,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAC;AAUrI,MAAM,WAAW,cAAc;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;CAAE;AAEjE,UAAU,iBAAiB;IACzB,OAAO,EAAE,cAAc,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC5E;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AACD,UAAU,mBAAoB,SAAQ,iBAAiB;IAAG,QAAQ,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAAE;AACjI,UAAU,qBAAsB,SAAQ,iBAAiB;IAAG,QAAQ,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAAE;AACrI,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AA0NxE,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAgB,EAAE,iBAAiB,EAAE,QAAgB,EAC/E,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAiB,EAAE,UAAU,GAC7E,EAAE,aAAa,+BA0Jf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectOption } from '../atoms/Select';
|
|
2
|
-
export type FilterFieldType = "text" | "select" | "date" | "number" | "boolean" | "combobox";
|
|
2
|
+
export type FilterFieldType = "text" | "select" | "date" | "daterange" | "number" | "boolean" | "combobox";
|
|
3
3
|
export interface FilterField {
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
@@ -28,6 +28,48 @@ export interface FilterField {
|
|
|
28
28
|
* (via {@link FilterPanelProps.onDraftChange}) and re-pass `fields`.
|
|
29
29
|
*/
|
|
30
30
|
dependsOn?: string;
|
|
31
|
+
/**
|
|
32
|
+
* For `type: "daterange"` — the `FilterValue.field` key carrying the range
|
|
33
|
+
* START bound. @default `` `${key}From` ``
|
|
34
|
+
*
|
|
35
|
+
* The emitted `FilterValue.field` values for a `daterange` field are ALWAYS its
|
|
36
|
+
* two bound keys (`fromKey` / `toKey`) — the field's own `key` drives only the
|
|
37
|
+
* label, the React key, the active chip and `dependsOn` targeting. That is what
|
|
38
|
+
* lets `FilterValue.value` stay a `string`: a range is two entries, not one
|
|
39
|
+
* `{from,to}` object, so no consumer has to narrow a union. Defaults follow the
|
|
40
|
+
* suffix pattern, so `{ key: "date", type: "daterange" }` emits `dateFrom` +
|
|
41
|
+
* `dateTo`; a consumer whose wire keys differ (e.g. `startDate`/`endDate`)
|
|
42
|
+
* passes `fromKey`/`toKey` explicitly.
|
|
43
|
+
*
|
|
44
|
+
* The operator is ALWAYS the documented one (`">="` for the start bound, `"<="`
|
|
45
|
+
* for the end bound) and a seeded operator on a bound key is deliberately
|
|
46
|
+
* IGNORED — see {@link FilterPanelProps.showOperators}, whose "a seeded operator
|
|
47
|
+
* survives even when the picker is hidden" rule this field type is the one
|
|
48
|
+
* documented exception to. A `daterange` has no operator picker and never will
|
|
49
|
+
* (the two bounds *are* its semantics), so there is no user intent to preserve.
|
|
50
|
+
*
|
|
51
|
+
* REQUIRED of the caller: `fromKey` and `toKey` must differ from each other, and
|
|
52
|
+
* neither may collide with another field's `key` or bound key. The panel keys its
|
|
53
|
+
* internal draft by these names, so a collision makes two controls share one
|
|
54
|
+
* slot — the same pre-existing constraint that already applies to two plain
|
|
55
|
+
* fields sharing a `key`. Setting this field's own `key` equal to one of its
|
|
56
|
+
* bound keys is harmless, but then that `key` does appear in the output.
|
|
57
|
+
*/
|
|
58
|
+
fromKey?: string;
|
|
59
|
+
/**
|
|
60
|
+
* For `type: "daterange"` — the `FilterValue.field` key carrying the range
|
|
61
|
+
* END bound, always emitted with operator `"<="`. @default `` `${key}To` ``
|
|
62
|
+
* See {@link FilterField.fromKey} for the full contract (operator
|
|
63
|
+
* normalization + the key-uniqueness requirement).
|
|
64
|
+
*/
|
|
65
|
+
toKey?: string;
|
|
66
|
+
/**
|
|
67
|
+
* For `type: "daterange"` — render the underlying `DateRangePicker`'s
|
|
68
|
+
* quick-range preset row (Today / Last 7 days / …). Off by default: the 280px
|
|
69
|
+
* filter rail is too narrow for the preset row to sit on one line.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
presets?: boolean;
|
|
31
73
|
}
|
|
32
74
|
export interface FilterValue {
|
|
33
75
|
field: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterPanel.d.ts","sourceRoot":"","sources":["../../src/organisms/FilterPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterPanel.d.ts","sourceRoot":"","sources":["../../src/organisms/FilterPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAwB5D,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,QAAQ,GACR,MAAM,GACN,WAAW,GACX,QAAQ,GACR,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB;;0FAEsF;IACtF,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB;+EAC2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;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AE,OAAO,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wFAAwF;IACxF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gEAAgE;IAChE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"JsonViewer.d.ts","sourceRoot":"","sources":["../../src/organisms/JsonViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAuB3F,MAAM,WAAW,eAAe;IAC9B;;;mCAG+B;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qFAAqF;IACrF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wFAAwF;IACxF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gEAAgE;IAChE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkMD,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,WAAkB,EAClB,gBAAwB,EACxB,QAAe,EACf,UAAkB,EAClB,SAAS,EACT,YAAkB,EAClB,SAAS,GACV,EAAE,eAAe,+BAwEjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../src/organisms/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,cAAc,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