@orient-ai/aurora-ui 1.0.0-alpha.6 → 1.0.0-alpha.7
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/Filters/Select/Select.d.ts +10 -2
- package/dist/components/Filters/Select/Select.d.ts.map +1 -1
- package/dist/components/IndexTable/Toolbar/components/Filter/Filter.d.ts.map +1 -1
- package/dist/components/IndexTable/Toolbar/types.d.ts +3 -10
- package/dist/components/IndexTable/Toolbar/types.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +4 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +99 -63
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11893,25 +11893,25 @@ var K = {
|
|
|
11893
11893
|
};
|
|
11894
11894
|
//#endregion
|
|
11895
11895
|
//#region src/components/Popover/Popover.tsx
|
|
11896
|
-
function um({ children: e, header: n, blockSize: r = "auto", minBlockSize: i = "0", maxBlockSize: a = "none", inlineSize: o = "auto", minInlineSize: s = "0", maxInlineSize: c = "none", matchAnchorWidth: l = !1,
|
|
11896
|
+
function um({ children: e, header: n, blockSize: r = "auto", minBlockSize: i = "0", maxBlockSize: a = "none", inlineSize: o = "auto", minInlineSize: s = "0", maxInlineSize: c = "none", matchAnchorWidth: l = !1, scrollRef: u, scrollTabIndex: d, anchor: f, side: m = "bottom", align: v = "start", sideOffset: y = 4, alignOffset: b = 0, collisionPadding: x = 16, collisionAvoidance: S = {
|
|
11897
11897
|
side: "flip",
|
|
11898
11898
|
align: "shift",
|
|
11899
11899
|
fallbackAxisSide: "none"
|
|
11900
|
-
}, initialFocus:
|
|
11901
|
-
let
|
|
11900
|
+
}, initialFocus: C, finalFocus: w }) {
|
|
11901
|
+
let T = t();
|
|
11902
11902
|
return /* @__PURE__ */ h(_.Portal, { children: /* @__PURE__ */ h(_.Positioner, {
|
|
11903
|
-
dir:
|
|
11904
|
-
anchor:
|
|
11905
|
-
side:
|
|
11906
|
-
align:
|
|
11907
|
-
sideOffset:
|
|
11908
|
-
alignOffset:
|
|
11909
|
-
collisionPadding:
|
|
11910
|
-
collisionAvoidance:
|
|
11903
|
+
dir: T,
|
|
11904
|
+
anchor: f,
|
|
11905
|
+
side: m,
|
|
11906
|
+
align: v,
|
|
11907
|
+
sideOffset: y,
|
|
11908
|
+
alignOffset: b,
|
|
11909
|
+
collisionPadding: x,
|
|
11910
|
+
collisionAvoidance: S,
|
|
11911
11911
|
className: K.positioner,
|
|
11912
11912
|
children: /* @__PURE__ */ g(_.Popup, {
|
|
11913
|
-
initialFocus:
|
|
11914
|
-
finalFocus:
|
|
11913
|
+
initialFocus: C,
|
|
11914
|
+
finalFocus: w,
|
|
11915
11915
|
className: p("aurora-base", K.popover),
|
|
11916
11916
|
style: {
|
|
11917
11917
|
blockSize: r === "auto" ? "fit-content" : r,
|
|
@@ -11925,8 +11925,9 @@ function um({ children: e, header: n, blockSize: r = "auto", minBlockSize: i = "
|
|
|
11925
11925
|
className: K.header,
|
|
11926
11926
|
children: n
|
|
11927
11927
|
}), /* @__PURE__ */ h("div", {
|
|
11928
|
+
ref: u,
|
|
11928
11929
|
className: p(K.scroll, K.spacious),
|
|
11929
|
-
tabIndex:
|
|
11930
|
+
tabIndex: d,
|
|
11930
11931
|
children: e
|
|
11931
11932
|
})]
|
|
11932
11933
|
})
|
|
@@ -14106,32 +14107,52 @@ function qh({ id: e, label: n = "Date", preset: r, onPresetsChange: i, value: a,
|
|
|
14106
14107
|
});
|
|
14107
14108
|
}
|
|
14108
14109
|
var Jh = {
|
|
14109
|
-
search: "
|
|
14110
|
-
options: "
|
|
14111
|
-
option: "
|
|
14112
|
-
checkbox: "
|
|
14113
|
-
"option-label": "_option-
|
|
14114
|
-
|
|
14115
|
-
|
|
14110
|
+
search: "_search_1fbkm_1",
|
|
14111
|
+
options: "_options_1fbkm_7",
|
|
14112
|
+
option: "_option_1fbkm_7",
|
|
14113
|
+
checkbox: "_checkbox_1fbkm_38",
|
|
14114
|
+
"option-label": "_option-label_1fbkm_44",
|
|
14115
|
+
loadMore: "_loadMore_1fbkm_49",
|
|
14116
|
+
loading: "_loading_1fbkm_53",
|
|
14117
|
+
empty: "_empty_1fbkm_59"
|
|
14116
14118
|
};
|
|
14117
14119
|
//#endregion
|
|
14118
14120
|
//#region src/components/Filters/Select/Select.tsx
|
|
14119
|
-
function Yh({ id: e, label: t,
|
|
14120
|
-
let
|
|
14121
|
-
return
|
|
14122
|
-
|
|
14123
|
-
|
|
14121
|
+
function Yh({ id: e, label: t, selectedOptions: n, options: r, value: i, onChange: a, inputValue: o, onInputChange: c, open: l, onOpenChange: u, searchPlaceholder: m = "Search options", empty: _ = "No results found", loading: v = !1, hasMore: y = !1, loadMore: b, isLoadingMore: x = !1, disabled: S = !1 }) {
|
|
14122
|
+
let C = d(null), w = d(null), [T, E] = f(null);
|
|
14123
|
+
return s(() => {
|
|
14124
|
+
if (!l || S || v || x || !y || !b || !T) return;
|
|
14125
|
+
let e = new IntersectionObserver(([t]) => {
|
|
14126
|
+
t.isIntersecting && (e.disconnect(), b());
|
|
14127
|
+
}, {
|
|
14128
|
+
root: w.current,
|
|
14129
|
+
rootMargin: "0px 0px 32px 0px"
|
|
14130
|
+
});
|
|
14131
|
+
return e.observe(T), () => e.disconnect();
|
|
14132
|
+
}, [
|
|
14133
|
+
l,
|
|
14134
|
+
S,
|
|
14135
|
+
v,
|
|
14136
|
+
x,
|
|
14137
|
+
y,
|
|
14138
|
+
b,
|
|
14139
|
+
T,
|
|
14140
|
+
r.length
|
|
14141
|
+
]), /* @__PURE__ */ g(pm, {
|
|
14142
|
+
open: l && !S,
|
|
14143
|
+
onOpenChange: u,
|
|
14124
14144
|
children: [/* @__PURE__ */ h(Hh, {
|
|
14125
|
-
ref:
|
|
14145
|
+
ref: C,
|
|
14126
14146
|
id: e,
|
|
14127
14147
|
label: t,
|
|
14128
|
-
segments: [{ values:
|
|
14129
|
-
open:
|
|
14130
|
-
disabled:
|
|
14148
|
+
segments: [{ values: n.map((e) => e.text) }],
|
|
14149
|
+
open: l,
|
|
14150
|
+
disabled: S,
|
|
14131
14151
|
renderTrigger: /* @__PURE__ */ h(mm, {}),
|
|
14132
14152
|
onClear: () => a?.([])
|
|
14133
14153
|
}), /* @__PURE__ */ h(um, {
|
|
14134
|
-
anchor:
|
|
14154
|
+
anchor: C,
|
|
14155
|
+
scrollRef: w,
|
|
14135
14156
|
matchAnchorWidth: !0,
|
|
14136
14157
|
minInlineSize: "256px",
|
|
14137
14158
|
maxBlockSize: "264px",
|
|
@@ -14139,40 +14160,52 @@ function Yh({ id: e, label: t, options: n, filteredOptions: r, value: i, onChang
|
|
|
14139
14160
|
className: Jh.search,
|
|
14140
14161
|
children: /* @__PURE__ */ h(Tm, {
|
|
14141
14162
|
value: o,
|
|
14142
|
-
onChange: (e) =>
|
|
14143
|
-
placeholder:
|
|
14163
|
+
onChange: (e) => c?.(e.currentTarget.value),
|
|
14164
|
+
placeholder: m,
|
|
14144
14165
|
prefix: /* @__PURE__ */ h(V, { type: "search" })
|
|
14145
14166
|
})
|
|
14146
14167
|
}),
|
|
14147
|
-
children:
|
|
14148
|
-
|
|
14149
|
-
children:
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14168
|
+
children: /* @__PURE__ */ g("div", {
|
|
14169
|
+
"aria-busy": v || x,
|
|
14170
|
+
children: [r.length > 0 ? /* @__PURE__ */ h("div", {
|
|
14171
|
+
className: Jh.options,
|
|
14172
|
+
children: r.map((e) => {
|
|
14173
|
+
let t = i.includes(e.value);
|
|
14174
|
+
return /* @__PURE__ */ g("button", {
|
|
14175
|
+
type: "button",
|
|
14176
|
+
disabled: v || e.disabled,
|
|
14177
|
+
"data-selected": t || void 0,
|
|
14178
|
+
className: p("aurora-base", "aurora-button", Jh.option),
|
|
14179
|
+
onClick: () => a?.(t ? i.filter((t) => t !== e.value) : [...i, e.value]),
|
|
14180
|
+
children: [/* @__PURE__ */ h("span", {
|
|
14181
|
+
className: Jh.checkbox,
|
|
14182
|
+
inert: !0,
|
|
14183
|
+
children: /* @__PURE__ */ h(Sm, {
|
|
14184
|
+
checked: t,
|
|
14185
|
+
disabled: v || e.disabled
|
|
14186
|
+
})
|
|
14187
|
+
}), /* @__PURE__ */ h("span", {
|
|
14188
|
+
className: Jh["option-label"],
|
|
14189
|
+
children: e.label
|
|
14190
|
+
})]
|
|
14191
|
+
}, e.value);
|
|
14192
|
+
})
|
|
14193
|
+
}) : v ? /* @__PURE__ */ h("div", {
|
|
14194
|
+
className: Jh.loading,
|
|
14195
|
+
children: /* @__PURE__ */ h(Te, {})
|
|
14196
|
+
}) : x ? null : /* @__PURE__ */ h("div", {
|
|
14197
|
+
className: Jh.empty,
|
|
14198
|
+
children: _
|
|
14199
|
+
}), (y || x) && /* @__PURE__ */ h("div", {
|
|
14200
|
+
ref: E,
|
|
14201
|
+
className: Jh.loadMore,
|
|
14202
|
+
children: x && /* @__PURE__ */ h("div", {
|
|
14203
|
+
className: Jh.loading,
|
|
14204
|
+
role: "status",
|
|
14205
|
+
"aria-label": "Loading more options",
|
|
14206
|
+
children: /* @__PURE__ */ h(Te, {})
|
|
14207
|
+
})
|
|
14208
|
+
})]
|
|
14176
14209
|
})
|
|
14177
14210
|
})]
|
|
14178
14211
|
});
|
|
@@ -14214,14 +14247,17 @@ function Zh({ definition: e, filter: t, onChange: n }) {
|
|
|
14214
14247
|
return /* @__PURE__ */ h(Yh, {
|
|
14215
14248
|
label: e.label,
|
|
14216
14249
|
disabled: e.disabled,
|
|
14250
|
+
selectedOptions: e.selectedOptions,
|
|
14217
14251
|
options: e.options,
|
|
14218
|
-
filteredOptions: e.filteredOptions,
|
|
14219
14252
|
value: t?.type === "select" ? t.value : [],
|
|
14220
14253
|
inputValue: e.inputValue,
|
|
14221
14254
|
onInputChange: e.onInputChange,
|
|
14222
14255
|
searchPlaceholder: e.searchPlaceholder,
|
|
14223
14256
|
empty: e.empty,
|
|
14224
14257
|
loading: e.loading,
|
|
14258
|
+
hasMore: e.hasMore,
|
|
14259
|
+
loadMore: e.loadMore,
|
|
14260
|
+
isLoadingMore: e.isLoadingMore,
|
|
14225
14261
|
open: a && r,
|
|
14226
14262
|
onOpenChange: i,
|
|
14227
14263
|
onChange: (t) => {
|